While testing various compilers, I found that nco_fl_utl.c doesn't appear to be ansi-compliant because of resolv.h and nameserv.h. The documentation says NCO is, but maybe things have changed since that was written. I couldn't tell from the CVS history because it looks like nco_fl_utl.c is fairly new. I don't know much about ANSI-compliance, but can things be brought back in line? If not, I'll remove 'c89' from the list of possible compilers for NCO.
rorik
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are correct, that bit of code is not ANSI-compliant and the documentation is
self-serving propaganda.
Since it is networking code, I believe the resolv/nameserv structurestuff falls outside of
ANSI specs. Compilers
that do not have those headers usually will compile
NCO if PVM_ARCH is set to WIN32, which specifically
circumscribes that portion of the code. This is the type
of thing that should be much cleaner with autoconf.
i.e., ifdef HAVE_RESOLV_H blah blah blah.
There must be a macro for it somewhere.
NCO uses it to determine a machine's name for use
in machine-to-machine copying (rcp/scp).
Perhaps also there is a more modern way of
accomplishing this which is ANSI-compliant.
That item has been on the TODO list for a long time.
That would of course be preferable.
In any case, yes, remove c89.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
While testing various compilers, I found that nco_fl_utl.c doesn't appear to be ansi-compliant because of resolv.h and nameserv.h. The documentation says NCO is, but maybe things have changed since that was written. I couldn't tell from the CVS history because it looks like nco_fl_utl.c is fairly new. I don't know much about ANSI-compliance, but can things be brought back in line? If not, I'll remove 'c89' from the list of possible compilers for NCO.
rorik
You are correct, that bit of code is not ANSI-compliant and the documentation is
self-serving propaganda.
Since it is networking code, I believe the resolv/nameserv structurestuff falls outside of
ANSI specs. Compilers
that do not have those headers usually will compile
NCO if PVM_ARCH is set to WIN32, which specifically
circumscribes that portion of the code. This is the type
of thing that should be much cleaner with autoconf.
i.e., ifdef HAVE_RESOLV_H blah blah blah.
There must be a macro for it somewhere.
NCO uses it to determine a machine's name for use
in machine-to-machine copying (rcp/scp).
Perhaps also there is a more modern way of
accomplishing this which is ANSI-compliant.
That item has been on the TODO list for a long time.
That would of course be preferable.
In any case, yes, remove c89.