Menu

ANSI compliance

Developers
2002-08-22
2013-10-17
  • Rorik Peterson

    Rorik Peterson - 2002-08-22

    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

     
    • Charlie Zender

      Charlie Zender - 2002-08-22

      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.

       

Log in to post a comment.