From 1ba25a936a0294a3b7def5a5396fb9c9127d7b12 Mon Sep 17 00:00:00 2001
From: Uwe Schulzweida <uwe.schulzweida@mpimet.mpg.de>
Date: Tue, 6 Jul 2010 13:07:06 +0000
Subject: [PATCH] Version 1.4.5.1 released

---
 config/default   |  2 +-
 src/Makefile.am  |  4 ++--
 src/Makefile.in  |  4 ++--
 src/stream_cdf.c | 12 +++++++-----
 4 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/config/default b/config/default
index 55c3fa322..7883d2672 100755
--- a/config/default
+++ b/config/default
@@ -37,7 +37,7 @@ case "${HOSTNAME}" in
                     --with-zlib=/sw/etch-ia32/zlib-1.2.3 \
                     --with-szlib=$HOME/local/etch-ia32 \
                     LIBS=-ljpeg \
-	            CC=gcc CFLAGS="-g -O2 -Wall -W -Wfloat-equal -pedantic" CFINT=-Df2cFortran
+	            CC=gcc CFLAGS="-g -O2 -Wall -W -Wfloat-equal -pedantic"
 	;;
 # sparc-sun-solaris2.8
     xxf)
diff --git a/src/Makefile.am b/src/Makefile.am
index ebaf48201..bde2e5bbd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -99,13 +99,13 @@ cdiFortran.o: cdiFortran.c
 	source='$<' object='$@' libtool=no \
 	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
 	$(CCDEPMODE) $(depcomp) \
-	$(COMPILE) $(CFINT) $(REAL4) -c `test -f '$<' || echo '$(srcdir)/'`$<
+	$(COMPILE) $(CFINT) -c `test -f '$<' || echo '$(srcdir)/'`$<
 #
 cdilib.c:
 	$(top_srcdir)/src/make_cdilib $(top_srcdir)/src
 #
 cdilib.o: cdilib.c
-	$(COMPILE) $(CFINT) $(REAL4) -c $<
+	$(COMPILE) $(CFINT) -c $<
 #
 all-local: $(LOCALTARGETS) 
 
diff --git a/src/Makefile.in b/src/Makefile.in
index f1d76db9b..bd6ca31e6 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -678,13 +678,13 @@ cdiFortran.o: cdiFortran.c
 	source='$<' object='$@' libtool=no \
 	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
 	$(CCDEPMODE) $(depcomp) \
-	$(COMPILE) $(CFINT) $(REAL4) -c `test -f '$<' || echo '$(srcdir)/'`$<
+	$(COMPILE) $(CFINT) -c `test -f '$<' || echo '$(srcdir)/'`$<
 #
 cdilib.c:
 	$(top_srcdir)/src/make_cdilib $(top_srcdir)/src
 #
 cdilib.o: cdilib.c
-	$(COMPILE) $(CFINT) $(REAL4) -c $<
+	$(COMPILE) $(CFINT) -c $<
 #
 all-local: $(LOCALTARGETS) 
 #
diff --git a/src/stream_cdf.c b/src/stream_cdf.c
index 029aae071..ffdb13d7f 100644
--- a/src/stream_cdf.c
+++ b/src/stream_cdf.c
@@ -3287,9 +3287,11 @@ int cdfReadVarSliceDP(int streamID, int varID, int levelID, double *data, int *n
     {
       if ( yid == dimids[ndims] && xid == dimids[ndims+1] && zid == dimids[ndims+2] )
 	swapyxz = TRUE;
+      if ( zid == dimids[ndims] && xid == dimids[ndims+1] && yid == dimids[ndims+2] )
+	swapxy = TRUE;
     }
 
-  if ( swapyxz == FALSE && zid != UNDEFID && yid != UNDEFID )
+  if ( swapyxz == FALSE && swapxy == FALSE && zid != UNDEFID && yid != UNDEFID )
     {
       if ( zid == dimids[ndims] && yid == dimids[ndims+1] )
 	swapyz = FALSE;
@@ -5190,13 +5192,13 @@ int cdfInqContents(int streamID)
 
 	  if ( nxdims == 2 )
 	    {
-	      xdimid = xdimids[0];
-	      ydimid = xdimids[1];
+	      xdimid = xdimids[1];
+	      ydimid = xdimids[0];
 	    }
 	  else if ( nydims == 2 )
 	    {
-	      xdimid = ydimids[0];
-	      ydimid = ydimids[1];
+	      xdimid = ydimids[1];
+	      ydimid = ydimids[0];
 	    }
 	  else
 	    {
-- 
GitLab