Hi, I've done some further checks and it appears that getopt_long is not broken... It seems to have a conflict with the definition of our own implementation in libwine_port (file getopt1.c). If I rename the latter, glibc's getopt_long works fine again. So I guess it's more a linking issue. Bye, Christian
Message du 13/02/04 16:28 De : Steven Edwards A : Dimitrie O. Paun Copie à : Christian Costa , wine-devel@winehq.com Objet : Re: Getopt - was Re: problem on the Cygwin port --- "Dimitrie O. Paun" wrote:
-#ifndef HAVE_GETOPT_LONG +#if !defined(HAVE_GETOPT_LONG) || defined (__CYGWIN__)
Shouldn't we check in configure if the getopt_long is broken, and if so, not use it?
Yes we should I just didnt have time to do the proper check and rerun configure. I am going to try to find time to do this soon if no one beats me to it.
Thanks Steven
Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html
Christian Costa titan.costa@wanadoo.fr writes:
Hi, I've done some further checks and it appears that getopt_long is not broken... It seems to have a conflict with the definition of our own implementation in libwine_port (file getopt1.c). If I rename the latter, glibc's getopt_long works fine again. So I guess it's more a linking issue.
Does this help?
Index: libs/port/getopt.c =================================================================== RCS file: /opt/cvs-commit/wine/libs/port/getopt.c,v retrieving revision 1.1 diff -u -p -r1.1 getopt.c --- libs/port/getopt.c 19 Mar 2003 22:44:55 -0000 1.1 +++ libs/port/getopt.c 13 Feb 2004 18:32:12 -0000 @@ -33,6 +33,10 @@ # include <config.h> #endif
+#ifdef HAVE_GETOPT_LONG +#define ELIDE_CODE +#endif + #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ Index: libs/port/getopt1.c =================================================================== RCS file: /opt/cvs-commit/wine/libs/port/getopt1.c,v retrieving revision 1.1 diff -u -p -r1.1 getopt1.c --- libs/port/getopt1.c 19 Mar 2003 22:44:55 -0000 1.1 +++ libs/port/getopt1.c 13 Feb 2004 18:32:12 -0000 @@ -24,6 +24,10 @@ #include <config.h> #endif
+#ifdef HAVE_GETOPT_LONG +#define ELIDE_CODE +#endif + #ifdef _LIBC # include <getopt.h> #else
Alexandre Julliard wrote:
Christian Costa titan.costa@wanadoo.fr writes:
Hi, I've done some further checks and it appears that getopt_long is not broken... It seems to have a conflict with the definition of our own implementation in libwine_port (file getopt1.c). If I rename the latter, glibc's getopt_long works fine again. So I guess it's more a linking issue.
Does this help?
Index: libs/port/getopt.c
RCS file: /opt/cvs-commit/wine/libs/port/getopt.c,v retrieving revision 1.1 diff -u -p -r1.1 getopt.c --- libs/port/getopt.c 19 Mar 2003 22:44:55 -0000 1.1 +++ libs/port/getopt.c 13 Feb 2004 18:32:12 -0000 @@ -33,6 +33,10 @@ # include <config.h> #endif
+#ifdef HAVE_GETOPT_LONG +#define ELIDE_CODE +#endif
#if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ Index: libs/port/getopt1.c =================================================================== RCS file: /opt/cvs-commit/wine/libs/port/getopt1.c,v retrieving revision 1.1 diff -u -p -r1.1 getopt1.c --- libs/port/getopt1.c 19 Mar 2003 22:44:55 -0000 1.1 +++ libs/port/getopt1.c 13 Feb 2004 18:32:12 -0000 @@ -24,6 +24,10 @@ #include <config.h> #endif
+#ifdef HAVE_GETOPT_LONG +#define ELIDE_CODE +#endif
#ifdef _LIBC # include <getopt.h> #else
I don't have cygwin installed at home. I will check on Monday.
Thanks, Christian