bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Windows Build Broken: /ccvs/lib/ getopt.h, getopt_.h, getopt_int.h


From: Conrad T. Pino
Subject: RE: Windows Build Broken: /ccvs/lib/ getopt.h, getopt_.h, getopt_int.h
Date: Sat, 9 Oct 2004 10:05:50 -0700

Hi Derek,

> From: Derek Robert Price
> Sent: Thursday, October 07, 2004 06:33
> 
> getopt.h needs to be created from getopt_.h when it doesn't exist on a
> system, as I presume it doesn't on Windows.  The procedure should be
> the same as for fnmatch_.h , alloca_.h, and the others.

I committed a fix for the above at 17:47:11 on 7-Oct-2004.

> I tried to define what I thought I could guess at accurately, but
> there are a few definitions missing on Windows now that probably
> aren't vital but could speed things up:
> 
> $ ./mkconfig -q ../config.h.in ./config.h.in ./config.h.in.in
> ./config.h.in.footer
> ../config.h.in line 468 has #undef HAVE_STDIO_EXT_H not found in
> ./config.h.in.in
> ../config.h.in line 474 has #undef HAVE_STRCASECMP not found in
> ./config.h.in.in../config.h.in line 495 has #undef HAVE_STRNCASECMP
> not found in ./config.h.in.in
> ../config.h.in line 629 has #undef HAVE_WMEMCHR not found in
> ./config.h.in.in
> ../config.h.in line 632 has #undef HAVE_WMEMCPY not found in
> ./config.h.in.in
> ../config.h.in line 992 has #undef optarg not found in ./config.h.in.in
> ../config.h.in line 995 has #undef optind not found in ./config.h.in.in
> ../config.h.in line 998 has #undef optopt not found in ./config.h.in.in
> 
> I'm guessing HAVE_STDIO_EXT_H won't exist and needs to be defined to
> 0, but I didn't really know.  HAVE_STRCASECMP and the other HAVE_s, I
> have no idea about.  I have no idea about optarg, optind, and optopt
> either.  Those need to be defined to rpl_optarg, rpl_optind, and
> rpl_optopt, respectively, if they don't exist on Windows.  These
> globals are normally exported as part of the getopt() function.  I
> gathered that Windows wouldn't have a GNU compatible getopt(), but
> didn't know if it had some form of getopt() which did export these
> variables.

The Windows Build completes without any of the above.  I don't claim to
know or imply that means anything about the function of the executable.

I really can't claim authorative knowledge about Windows having a GNU
compatible "getopt" function.  I coded a test program with a "getopt"
call with no arguments and the linker was unable to resolve it.

The patch at the end of this message quit the "mkconfig.pl" warnings
without acutally doing anything.  It's a crude starting point and I'd
like to know if you think it's worthwhile committing.

I'm open to other suggestions regarding lines of investigation leading
towards a better resolution.

> Cheers,
> 
> Derek

Conrad

Index: config.h.in.in
===================================================================
RCS file: /cvs/ccvs/windows-NT/config.h.in.in,v
retrieving revision 1.12
diff -u -p -r1.12 config.h.in.in
--- config.h.in.in      6 Oct 2004 23:57:51 -0000       1.12
+++ config.h.in.in      9 Oct 2004 16:48:51 -0000
@@ -462,9 +462,15 @@
    uintmax_t. */
 #undef HAVE_STDINT_H_WITH_UINTMAX
 
+/* Define to 1 if you have the <stdio_ext.h> header file. */
+#undef HAVE_STDIO_EXT_H
+
 /* Define to 1 if you have the <stdlib.h> header file. */
 #define HAVE_STDLIB_H 1
 
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
 /* Define if you have strchr (always for CVS). */
 #undef HAVE_STRCHR
 
@@ -483,6 +489,9 @@
 /* Define to 1 if you have the <string.h> header file. */
 #define HAVE_STRING_H 1
 
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
 /* Define to 1 if you have the `strstr' function. */
 #undef HAVE_STRSTR
 
@@ -614,6 +623,12 @@
 /* Define if you have the 'wint_t' type. */
 #undef HAVE_WINT_T
 
+/* Define to 1 if you have the `wmemchr' function. */
+#undef HAVE_WMEMCHR
+
+/* Define to 1 if you have the `wmemcpy' function. */
+#undef HAVE_WMEMCPY
+
 /* Define to 1 if you have the `wmempcpy' function. */
 #undef HAVE_WMEMPCPY
 
@@ -974,6 +989,15 @@
 /* Define to rpl_nanosleep if the replacement function should be used. */
 #undef nanosleep
 
+/* Define to rpl_optarg if the replacement variable should be used. */
+#undef optarg
+
+/* Define to rpl_optind if the replacement variable should be used. */
+#undef optind
+
+/* Define to rpl_optopt if the replacement variable should be used. */
+#undef optopt
+
 /* Define to `int' if <sys/types.h> does not define. */
 #define pid_t int
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]