This is a summary of changes made on December 14, 2006, by Mike Herman. 
The changes were inspired by the need to port candis to Mac OS, so the
changes were driven by the output of gcc version 4.0.1, which is included
in Mac OS 10.4.x.


*********************************
**** current debian behavior ****
*********************************
Compilation under linux (debian) elicits the following messages:

/pgraf/lolevels/pgtek.o 
warning: the 'gets' function is dangerous and should not be used

/nws/nwsuaorder.l
There are 4 errors that preclude compilation. Three are syntax errors that
don't seem to make sense. The other is as follows:
stdin:2640: m4: Warning: Excess arguments to builtin 'm4_ifdef' ignored

/pimage/pimage.c
There is a single warning, but no error:
pimage.c:675: Warning: function returns address of local variable
This is a reference to a char array being used as a return variable. 
Probably, the warning could be avoided by passing the array to the function
as an argument. However, the code was left alone.

/raf/radrp7.o
warning: the 'gets' function is dangerous and should not be used

All other source files compile fine under debian.


****************************************
**** current mac os x unix behavior ****
****************************************
Compilation under Mac OS 10.4.x UNIX elicits the following messages:

/sisal/*
compiling this directory requires 'osc', which is not included in Mac OS.

/pimage/pimage.c
pimage.c:663: Warning: function returns address of local variable
(This warning discussed above).

/nws/nwsuaorder.l
Gives lots of errors, beginning on line 82, then cascading down to a system
library: /usr/include/libkern/i386/OSByteOrder.h
(An internet search of this problem revealed little information).

All other source files compile fine under Mac Os 10.4.x.


**************************************
**** changes made to source files ****
**************************************
To the following files, '#include <string.h>' was added:
/utils/addcline.c
/utils/addfld.c
/utils/addpar.c
/utils/cdfio.c
/utils/getcmt.c
/utils/getfld.c
/utils/getpar.c
/utils/quickcandis.c
/utils/seekfld.c
/utils/seekpar.c
/pgraf/pgmain/pg.c
/pgraf/lolevels/pgx.c
/pgraf/lolevels/pgfig.c
/pgraf/lolevels/pgps.c
/pgraf/lolevels/pgeps.c
/pgraf/lolevels/pgsps.c
/general/cdfplot.c
/general/cdfmath.c
/general/cdfmerge.c
/general/cdfinvindex.c
/general/cdfcomment.c
/general/cdfgriv.c
/general/cdftable.c
/general/cdfuncat.c
/general/cdfpix.c
/general/cdfhisto.c
/general/cdfbadcut.c
/general/cdfdefint.c
/general/cdforder.c
/general/cdfmean.c
/general/cdfisocut.c
/general/cdfuniq.c
/general/cdfthresh.c
/general/cdfsmooth.c
/general/cdfocut.c          NOTE: this #include had been commented out.
/general/cdfpsel.c
/general/cdfthin.c
/general/cdflagr.c
/general/cdfcatf.c
/general/cdfwindow.c
/general/cdfcat.c
/general/cdfrdim.c
/hrd/hrdrad.c
/hrd/rawget2.c
/mcidas/mcmap.c
/mcidas/dispimage_X11.c
/mcidas/procimage.c
/mcidas/getimage.c
/mcidas/mccmd.l
/nws/nwsuaorder.l
/nws/scdua.c
/nws/nwsts.c
/nws/nwspv.c
/nws/nwsgrid.c
/nws/nwssa2.l
/nws/llpzap.c
/nws/nwsuafix.c
/nws/nwsua2.l
/nws/nwssa1.c
/pimage/pimage.c
/radar/raduffix.c
/radar/getrp7.c
/radar/radedit.l
/radar/radvort.c
/radar/radvert2.c
/radar/radvert3.c
/radar/radvert4.c
/radar/radsynth.c
/radar/radray.c
/radar/radfill.c
/radar/radsource.c
/radar/raduf.c
/radar/radvert.c
/radar/radcedric.c
/raf/rafsegsub.c
/raf/rafwinds.c
/raf/rafdap.c
/raf/rafhdr.h
/raf/rafhirate.h
/unidata/uniput.c

To the following files, '#include <stdlib.h>' was added:
/pgraf/metagens/pdc.c
/pgraf/lolevels/pgx.c
/pgraf/lolevels/pgps.c
/pgraf/lolevels/pgeps.c
/pgraf/lolevels/pgsps.c
/general/cdfplot.c
/general/cdfmath.c
/general/cdfj.c
/general/cdft.c
/hrd/rawget.c
/hrd/rawget2.c
/io/rtape.c
/io/wtape.c
/mcidas/getpng.c
/mcidas/mctranspng.c
/mcidas/mctrans.c
/mcidas/dumbinav.c
/mcidas/dumbnav.c
/mcidas/dispimage_X11.c
/mcidas/procimage.c
/mcidas/getlwtoa3.c
/mcidas/getstream.c
/mcidas/mcselect.c
/pimage/makebin.c
/pimage/viewsat.c
/pimage/pimage.c
/pimage/pidemo.c
/radar/raduffix.c
/radar/getrp7.c
/radar/getblock.c
/io/fzout.c

In the following files, the prototype for fatal() was moved above the
main function into the global namespace:
/utils/getcmt.c
/utils/getfld.c
/utils/getpar.c
/utils/seekfld.c
/utils/seekpar.c

To satisfy the X11 function, XGetGeometry(), the following declarations
were changed from 'static int' to 'static unsigned int':
/pgraf/lolevels/pgx: lines 62, 63 and 64.

To eliminate the warning, 'useless storage class specifier in empty 
declaration', names were appended to the following 'struct' declarations:
/general/cdfmath.c: line 50 (parsetable)
/mcidas/dumbnav.c: lines 27 and 30 (rec and mat)
/general/cdfmerge.c: line 13 (arrai)
/general/cdfmatlab.c: line 29 (myfield)

Several files had conflicts with string.h because they declare a variable
called 'index'. This matches a variable of the same name in string.h.
Therefore, all instances of 'index' in the following files were changed
to 'indexfld':
/general/cdfplot.c
/general/cdftable.c
/general/cdfmean.c
/general/cdflagr.c
/nws/nwsua1.c
/nws/nwsua2.l

Similarly, index was changed in the following file to 'index3d':
/radar/radsynth.c

There were a few arithmetic computations involving integers whose products
were assigned to 'unsigned long' types. However, the computation itself
was being performed using integer-sized memory blocks. Thus, 'ul' was 
appended to the integer values to expand the memory block size and thus 
avoid 'warning: integer overflow in expression':
/general/cdfpix.c: line 30
/mcidas/mcmap.c: line 44

The X11 function XCreateImage() wanted a character pointer, so the
following declarations were changed from 'unsigned char*' to 'char*':
/mcidas/dispimage_X11.c: line 147
/pimage/pimage.c: line 188

Likewise, the signal() function in signal.h expected a 'void' type. Thus,
a function prototype and its definition were changed from 'int' to 'void':
/mcidas/mccmd.l: lines 72 and 255

The sys.h library has a function called 'wait()'. The following file also
had a function of that name, thus 'wait()' was changed to 'waitnow()':
/pimage/viewsat.c

To satisfy the netCDF functions ncinquire(), ncattinq(), ncvarinq(), the
following 'int' declaration was made a 'long' declaration:
/unidata/uniput.c: line 33

Likewise, the following 'long' declarations were changed to 'int':
/unidata/uniget.c: lines 9-13, 21, 26, 28 and 35
/unidata/olrget.c: lines 16-19, 27, 31, 34 and 40

A couple preprocessor commands lacked references to MACOS. Also, they used
'#elseif', instead of '#elif', which seems to be the accepted syntax. Lastly,
'#endif BSD' was changed to '#endif', per the complaints of gcc:
/io/zin.c
/io/fzin.c


************************************
**** changes made to make files ****
************************************
Also, two makefiles were changed to facilitate header file discovery:

/pimage/Makefile: 
Added definitions for OLIBS = ../utils/libcdf.a -lm
                      IDIRS = -I../include
Also, added these to the compilation command line for satircan.c (line 25)

/unidata/Makefile:
Appended to the following definitions to accomodate Mac OS directory trees:
                      OLIBS = -L/sw/lib
                      IDIRS = -I/sw/include
(If a Mac user has 'fink' installed, he/she has a directory called /sw, which
has its own /bin /lib, and /include directories. Then, if 'fink' was used
to install netCDF, this is where it will reside).