[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20000918: GEMPAK 5.5d minor changes




Steve and Scott,

I build under HPUX B.11.00 E using /opt/ansic, and have problems with several
includes:

1a) In $GEMPAK/source/programs/gui/nafos
The include file "nafintfc.h" redefines the macros "max" and "min".
If this routine is included, before <math.h> is included, then
a later include which tries to include math.h will fail:
        cc -Aa -D_HPUX_SOURCE -DHPUX -I/home/gempak/GEMPAK5.5/gempak/include
        -c nafmcnvw.c
cpp: "/usr/include/sys/time.h", line 492: warning 2001: Redefinition of macro  
FD_ISSET.
cc: "/usr/include/math.h", line 227: error 1000: Unexpected symbol: "float".
cc: "/usr/include/math.h", line 227: error 1000: Unexpected symbol: ">".
cc: "/usr/include/math.h", line 227: error 1000: Unexpected symbol: "?".
cc: "/usr/include/math.h", line 227: error 1000: Unexpected symbol: ":".
cc: "/usr/include/math.h", line 227: error 1505: Function may not return a 
function or an array.
cc: "/usr/include/math.h", line 228: error 1000: Unexpected symbol: "float".
cc: "/usr/include/math.h", line 228: error 1000: Unexpected symbol: "<".
cc: "/usr/include/math.h", line 228: error 1000: Unexpected symbol: "?".
cc: "/usr/include/math.h", line 228: error 1000: Unexpected symbol: ":".
cc: "/usr/include/math.h", line 228: error 1505: Function may not return a 
function or an array.
cc: error 2017: Cannot recover from earlier errors, terminating.
*** Error exit code 1

To ensure that math.h is included first, I have added
#include <math.h> to the top of the nafintfc.h file.

1b) Same as above, with nprogs/nsat/source/interface.h
1c) Same as above, with nprogs/nwx/source/interface.h

2) Another general problem I have is the use of #include <strings.h>
in any routine. 
   cc -Aa -D_HPUX_SOURCE -DHPUX -I/home/gempak/GEMPAK5.5/gempak/include
   -c nmap_dataw.c
cpp: "/usr/include/sys/time.h", line 492: warning 2001: Redefinition of macro 
FD_ISSET.
cc: "/usr/include/strings.h", line 30: error 1000: Unexpected symbol: "(".
cc: "/usr/include/strings.h", line 30: error 1573: Type of "size_t" is 
undefined due to an illegal declaration.
cc: "/usr/include/strings.h", line 30: error 1584: Inconsistent type 
declaration: "memmove".
cc: "/usr/include/strings.h", line 30: error 1711: Inconsistent parameter list 
declaration for "memmove".
cc: "/usr/include/strings.h", line 31: error 1000: Unexpected symbol: "(".
cc: error 2017: Cannot recover from earlier errors, terminating.
*** Error exit code 1

In believe this routine has been made obsolete by
<string.h> on all platforms. Most places that strings.h is included
in the code either immediately follows the include string.h, and many
have #ifndef AIX around them. As far as I know, none of my platforms
use strings.h, so I have commented all these occurences out.

Routines which reference strings.h are found in:
        $GEMPAK/source/programs/gui/nmap2
        nprogs/nmap/source
        nprogs/nsat/source
        nprogs/nwx/source


Other general:
$GEMPAK/source/contrib/tdl/radmap

        dinita2.f needs cdev added to arglist in call to hinita()

        This program seems to have problems for me....but, since it
        is contrib, should I go on?


Steve