Wireshark-bugs: [Wireshark-bugs] [Bug 5608] build fails when it tries to #include <getopt.h>, no

Date: Sun, 23 Jan 2011 12:25:01 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5608

--- Comment #2 from Irwin Tillman <irwin@xxxxxxxxxxxxx> 2011-01-23 12:25:00 PST ---
getopt(3c) on  Solaris 9 (and Solaris 10) says:

  SVID3, XPG3
     #include <stdio.h>
     int getopt(int argc, char * const argv[], const char *optstring);
     extern char *optarg;
     extern int optind, opterr, optopt;

  POSIX.2, XPG4, SUS, SUSv2, SUSv3
     #include <unistd.h>
     int getopt(int argc, char * const argv[], const char *optstring);
     extern char *optarg;
     extern int optind, opterr, optopt;


So both those man pages says that the correct header varies
depending on the compilation environment.
I see that /usr/include/stdio.h and /usr/include/unistd.h
do indeed make the declaration of getopt() contingent
upon various other macros.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.