Compiling tmpwatch 2.14 with gcc 3.4.2 on Solaris 2.9 fails because there is no getopt.h (or getopt_long()) on Solaris 2.9: {{{ gcc -W -Wall -DVERSION=\"2.9.14\" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE tmpwatch.c -o tmpwatch tmpwatch.c:29:20: error: getopt.h: No such file or directory tmpwatch.c: In function 'check_fuser': tmpwatch.c:224: warning: missing sentinel in function call tmpwatch.c: In function 'main': tmpwatch.c:568: error: array type has incomplete element type tmpwatch.c:580: error: 'required_argument' undeclared (first use in this function) tmpwatch.c:580: error: (Each undeclared identifier is reported only once tmpwatch.c:580: error: for each function it appears in.) tmpwatch.c:600: warning: implicit declaration of function 'getopt_long' tmpwatch.c:653: warning: implicit declaration of function 'strtoimax' tmpwatch.c:568: warning: unused variable 'options' make: *** [tmpwatch] Error 1 }}}
Thanks for your report.
This would best be fixed by migrating to autoconf/automake and using glib to supply the missing functions. I'm afraid I probably won't be able to do this migration myself, but I'll be happy to apply a clean patch.
I'm not sure that using glib is necessary. Older versions (e.g. 2.9.1) of tmpwatch just fell back to cruder methods if it thought getopt_long() was not available.
I do agree that autoconf/automake is the right way to approach the platform portability issue. Unfortunately, I've never had much luck learning the autoconf/automake tools.
Note that IRIX-6.5 suffers a simillar problem.
Could you test tmpwatch-2.10, and report the results, please?
Closed due to lack of response. Please reopen at pagure.io if this is still relevant.