Menu

__GNUG__ (?)

Developers
2003-04-04
2013-10-17
  • Nobody/Anonymous

    Hi,

    I just tried to install (successfully) nco-2.7.3
    on both HPUX and IRIX using the gnu compilers.
    However, in order to do so I had changed lines

       #ifndef __GNUG__

    into

       #ifndef __GNUC__

    in the files ./src/nco/nco_var_rth.c and
    ./src/nco/nco_var_scv.c.

    There are also the following two type
    declarations around line2 429 and 430 in
    ./src/nco/ncap_utl.c

          extern float fmodf(float,float);
          extern float fabsf(float);

    which I surrounded by a similar #ifndef __GNUC__
    as in the two files above.

    Does that make sense?

    An additional thing: On Irix, the configure
    script (correctly) finds getop and getopt.h
    somewhere, but the compiler complains about
    struct option not defined later on (e.g., in ncap.c). There is a comment in ncap.c, saying that it is unclear how SGI handles getopt; well, I'd conclude nit really well;-))

    For me, undefining HAVE_GETOPT and HAVE_GETOPT_H in config.h after ./configure, but previous to make, seems to have fixed the problem.

    Otherwise, thanks for making nco available!!!

    Regards from Bracknell in the UK,

      Christian

      ( christian_AT_marquardt.fsnet.co.uk , -or-
        christian.marquardt_AT_metoffice.com )

     
    • Charlie Zender

      Charlie Zender - 2003-04-04

      Thanks for the tips. It's good to know the configure
      mechanism works well with the GNU compilers on
      these systems.

      > Does that make sense?

      Not to me. __GNUG__ applies only to g++, so the
      tokens are only meant to be defined if g++ is not
      being used. gcc does not want them on my systems.
      Change to __GNUC__ should cause"symbol re-defined"
      warnings or something like that. I'm afraid if I make the changes you needed to the main tree,
      there will be unacceptable regressions in other
      environments. We will refer people who use gcc
      on SGI or HPPA to your email if the have problems
      though.

      Thanks for the report!
      Charlie

       

Log in to post a comment.