On Sat, 17 Feb 2001 16:38:13 +0900, Jong B. Lee wrote:

>>From: Fritz Thielemann 
>>Subject: Q: cygwin1.1.8+xfree4+lesstif0.92.6 
>>Date: Sat, 10 Feb 2001 14:10:10 -0800 
>>
>>Hi folks,
>>
>>tried to build lesstif (0.92.6) on cygwin 1.1.8 with latest xfree installed.
>>got an error on stage ./clients/Motif-1.2/uil in main.c with optarg and optind
>
>The following files should be modified on cygwin (not tested on other platform)
>
>clients/Motif-1.2/uil/main.c
>clients/Motif-2.0/uil/main.c
>clients/Motif-2.1/uil/main.c
>
>#ifndef HAVE_GETOPT
>#error You need getopt() to build this client!
>#endif
>----->  should be
>#ifndef HAVE_GETOPT
>#error You need getopt() to build this client!
>#else
>#include <getopt.h>
>#endif
>
>Good luck!
>
>JBL
>

No, this code is non-standard, perhaps a "GNUism".
Any libc aiming at UNIX or POSIX compatibility should be able to
do  this better ...
Reference e.g.:

                 The Single UNIX (R) Specification, Version 2
                      Copyright (c) 1997 The Open Group
    ----------------------------------------------------------------------
    NAME

    getopt, optarg, optind, opterr, optopt - command option parsing

    SYNOPSIS


   #include <unistd.h>

   int getopt(int argc, char * const argv[], const char *optstring);
   extern char *optarg;
   extern int optind, opterr, optopt;


We try to remove 
#ifdef _some_specific_platform
code sections, not add them currently ...


---
Alexander Mai
[EMAIL PROTECTED]


Reply via email to