Re: Feature Branch Windows Build Broken - New GNULIB glob module
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Conrad T. Pino wrote: I updated with the recent commit of the glob module and we have a new warning on line 1184 of lib/glob.c file (see below) Let's revisit this after you provide definitions for the following macros in windows-NT/config.h.in.in: ../config.h.in line 101 has #undef GLOB_PREFIX not found in ./config.h.in.in ../config.h.in line 234 has #undef HAVE_DECL_STRDUP not found in ./config.h.in.in ../config.h.in line 297 has #undef HAVE_GETLOGIN_R not found in ./config.h.in.in ../config.h.in line 309 has #undef HAVE_GETPWNAM_R not found in ./config.h.in.in ../config.h.in line 533 has #undef HAVE_SIGINTERRUPT not found in ./config.h.in.in ../config.h.in line 548 has #undef HAVE_STAT64 not found in ./config.h.in.in ../config.h.in line 577 has #undef HAVE_STRDUP not found in ./config.h.in.in ../config.h.in line 607 has #undef HAVE_STRUCT_DIRENT64 not found in ./config.h.in.in ../config.h.in line 611 has #undef HAVE_STRUCT_DIRENT_D_TYPE not found in ./config.h.in.in ../config.h.in line 632 has #undef HAVE_SYS_CDEFS_H not found in ./config.h.in.in GLOB_PREFIX should be #defined to `rpl_'. The rest of the macros are looking for particular function declarations (prototypes), functions, headers, or type definitions and need to be defined or undefined as such are found or not on Windows with MSVC (or in the substitute functions in windows-NT/*.[ch]). HAVE_STRUCT_DIRENT_D_TYPE, in particular, wants to know if struct dirent has a member named `d_type'. Glancing at the lines that #define dirent direct in lib/glob.c, they depend on the absence of dirent.h. Assuming that Windows has dirent.h then, since it did not complain about a missing definition for struct dirent, but only about a bad typecast, a #define HAVE_DIRENT_H 1 may also be appropriate in config.h.in.in. Cheers, Derek -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (Cygwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCi2aELD1OTBfyMaQRAqQAAJ9bS1iHmJGQtBfs9dPxaKbxSX6aqwCeIDmB Y4z8mNkcVDh+Yq2saXEQVHY= =xVwO -END PGP SIGNATURE- ___ Bug-cvs mailing list Bug-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-cvs
Re: Feature Branch Windows Build Broken - New GNULIB glob module
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Conrad T. Pino wrote: The following patch lets me get this far in the Windows IDE build: Configuration: libcvs - Win32 Debug Compiling... glob.c H:\Conrad\Projects\cvs-1.12\lib\glob.c(253) : warning C4028: formal parameter 1 different from declaration H:\Conrad\Projects\cvs-1.12\lib\glob.c(253) : warning C4028: formal parameter 4 different from declaration H:\Conrad\Projects\cvs-1.12\lib\glob.c(668) : warning C4090: 'function' : different 'const' qualifiers H:\Conrad\Projects\cvs-1.12\lib\glob.c(668) : warning C4024: 'getpwnam' : different types for formal and actual parameter 1 H:\Conrad\Projects\cvs-1.12\lib\glob.c(739) : warning C4013: 'glob_pattern_p' undefined; assuming extern returning int H:\Conrad\Projects\cvs-1.12\lib\glob.c(334) : fatal error C1600: unsupported data type Error executing cl.exe. cvs.exe - 1 error(s), 5 warning(s) === The following patches do the following: 1. Add WIN32 conditional #defines to lib/glob_.h to hide compile errors. 2. Modify lib/libcvs.dsp to make lib/glob.h file from lib/glob_.h file. 3. Modify Modify lib/libcvs.dsp to build lib/glob.c which is where the compile is failing after my hacks to lib/glob_.h file. === Index: lib/glob_.h === RCS file: /cvs/ccvs/lib/glob_.h,v retrieving revision 1.5 diff -u -p -r1.5 glob_.h --- lib/glob_.h 15 May 2005 16:44:04 - 1.5 +++ lib/glob_.h 17 May 2005 04:18:51 - @@ -19,6 +19,12 @@ #ifndef _GLOB_H #define _GLOB_H 1 +#ifdef WIN32 +#define __BEGIN_DECLS +#define __END_DECLS +#define __const const +#endif I'm going to suggest something a little more general to the GNULIB maintainers: #ifndef __BEGIN_DECLS # define __BEGIN_DECLS #endif #ifndef __END_DECLS # define __END_DECLS #endif #ifndef __const # define __const const #endif I won't comment on the Windows build stuff - it sounds like you are mirroring what the UNIX build is doing, but otherwise I prefer to stay out of it. Derek -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (Cygwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCigN0LD1OTBfyMaQRAnTvAJsHGOa5tqkD9crYZZ1/lFoYrsIS4QCgkChQ eVG7KDjY6HnZUNK+LuIeUP0= =FheJ -END PGP SIGNATURE- ___ Bug-cvs mailing list Bug-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-cvs
RE: Feature Branch Windows Build Broken - New GNULIB glob module
The previous patch to lib/libcvs.dsp doesn't contain fix for the Win32 Release configuration so please don't commit this patch. I have a corrected patch which I plan to commit if that's what is indicated and will supply it if requested but haven't done so because it adds nothing to the debugging process. ___ Bug-cvs mailing list Bug-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-cvs
RE: Feature Branch Windows Build Broken - New GNULIB glob module
Hi Derek, From: Derek Price [mailto:[EMAIL PROTECTED] I'm going to suggest something a little more general to the GNULIB maintainers: #ifndef __BEGIN_DECLS # define __BEGIN_DECLS #endif #ifndef __END_DECLS # define __END_DECLS #endif #ifndef __const # define __const const #endif In general I agree the above is better. If __const is a keyword rather than a macro then it won't work but I can't say for sure what __const is in this context. I won't comment on the Windows build stuff - it sounds like you are mirroring what the UNIX build is doing, but otherwise I prefer to stay out of it. I saw you're involved with Paul Eggert on a New GNULIB module topic and assumed we had done another GNULib import which has often broken the Windows build. I have my nose buried in another project. My patch is a blind guess since I didn't look at the UNIX build to see what is going on there. Your comments lead me to believe I made a lucky guess using glob_.h and compiling glob.c in the libcvs build. I've come up with another patch set that seems to solve the situation. I'd appreciate your input on the revised lib/glob_.h file portion. The patched file so far are: Index: lib/glob_.h Index: lib/libcvs.dsp Index: windows-NT/pwd.c Index: windows-NT/pwd.h I'm willing to commit the Windows build and windows-NT/pwd.? files. What's your preference on who sends glob_.h patch to GNULib team? Derek Conrad === Configuration: libcvs - Win32 Debug Compiling... glob.c Creating library... Configuration: libdiff - Win32 Debug Creating library... Configuration: cvsnt - Win32 Debug Compiling... find_names.c H:\Conrad\Projects\cvs-1.12\src\find_names.c(338) : warning C4018: '' : signed/unsigned mismatch Linking... LINK : LNK6004: .\WinDebug\cvs.exe not found or not built by the last incremental link; performing full link cvs.exe - 0 error(s), 120 warning(s) === Index: lib/glob_.h === RCS file: /cvs/ccvs/lib/glob_.h,v retrieving revision 1.5 diff -u -p -r1.5 glob_.h --- lib/glob_.h 15 May 2005 16:44:04 - 1.5 +++ lib/glob_.h 17 May 2005 16:15:56 - @@ -19,6 +19,19 @@ #ifndef_GLOB_H #define_GLOB_H 1 +#ifndef __BEGIN_DECLS +# define __BEGIN_DECLS +#endif +#ifndef __END_DECLS +# define __END_DECLS +#endif +#ifndef __const +# define __const const +#endif +#ifndef __restrict +# define __restrict +#endif + #ifdef _LIBC # include sys/cdefs.h #else @@ -204,7 +217,7 @@ extern void globfree64 (glob64_t *__pglo #endif -#ifdef __USE_GNU +#if defined __USE_GNU || !defined _LIBC /* Return nonzero if PATTERN contains any metacharacters. Metacharacters can be quoted with backslashes if QUOTE is nonzero. Index: lib/libcvs.dsp === RCS file: /cvs/ccvs/lib/libcvs.dsp,v retrieving revision 1.22 diff -u -p -r1.22 libcvs.dsp --- lib/libcvs.dsp 8 May 2005 07:10:06 - 1.22 +++ lib/libcvs.dsp 17 May 2005 16:15:56 - @@ -157,10 +157,18 @@ SOURCE=.\gettime.c # End Source File # Begin Source File +SOURCE=.\glob.c +# End Source File +# Begin Source File + SOURCE=.\md5.c # End Source File # Begin Source File +SOURCE=.\mempcpy.c +# End Source File +# Begin Source File + SOURCE=.\pagealign_alloc.c # End Source File # Begin Source File @@ -418,6 +426,33 @@ SOURCE=.\gettext.h # End Source File # Begin Source File +SOURCE=.\glob_.h + +!IF $(CFG) == libcvs - Win32 Release + +# Begin Custom Build +InputPath=.\glob_.h + +.\glob.h : $(SOURCE) $(INTDIR) $(OUTDIR) + copy .\glob_.h .\glob.h + +# End Custom Build + +!ELSEIF $(CFG) == libcvs - Win32 Debug + +# Begin Custom Build +InputPath=.\glob_.h + +.\glob.h : $(SOURCE) $(INTDIR) $(OUTDIR) + copy .\glob_.h .\glob.h + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + SOURCE=.\md5.h # End Source File # Begin Source File @@ -482,11 +517,11 @@ SOURCE=.\timespec.h # End Source File # Begin Source File -SOURCE=..\windows-NT\unistd.h +SOURCE=.\unistd-safer.h # End Source File # Begin Source File -SOURCE=.\unistd-safer.h +SOURCE=..\windows-NT\unistd.h # End Source File # Begin Source File Index: windows-NT/pwd.c === RCS file: /cvs/ccvs/windows-NT/pwd.c,v retrieving revision 1.7 diff -u -p -r1.7 pwd.c --- windows-NT/pwd.c15 May 2004 17:32:22 - 1.7 +++ windows-NT/pwd.c17 May 2005 16:15:56 - @@ -63,7 +63,7 @@ getpwuid (int uid) } struct passwd * -getpwnam (char *name) +getpwnam (const char *name) { return (struct passwd *) 0; } @@ -79,7 +79,7 @@ getgrgid (int uid) }
RE: Feature Branch Windows Build Broken - New GNULIB glob module
Hi Derek, From: Derek Price [mailto:[EMAIL PROTECTED] Well, basically. I created the glob module myself and added it to CVS and Paul has been reviewing it and I've been correcting it in ways to make it compatible with GNULIB GLIBC. Cool. Another budding published author in our midst. :) I can't comment on how lucky you were, but you did arrive at the correct solution. :) Thank you much appreciated. I'm willing to commit the Windows build and windows-NT/pwd.? files. What's your preference on who sends glob_.h patch to GNULib team? I'll do it. It should slide into my ongoing discussion with Paul about this new module easily enough. +#ifndef __restrict +# define __restrict +#endif This is not correct. It should be #ifndef __restrict # define __restrict restrict #endif If the restrict keyword is not supported by MSVC, then in windows-NT/config.h.in.in, restrict should be defined to some variation of __restrict, __restrict__, _Restrict, or empty. I updated with the recent commit of the glob module and we have a new warning on line 1184 of lib/glob.c file (see below) and the __restrict change made looks fine. The rest of your patch looks fine. OK, I'll have it committed fairly soon. Regards, Ditto, Derek Conrad == Configuration: libcvs - Win32 Debug Performing Custom Build Step on .\glob_.h 1 file(s) copied. Compiling... glob.c h:\conrad\projects\cvs-1.12\lib\glob.c(1187) : warning C4133: ':' : incompatible types - from 'struct direct *' to 'struct dirent *' h:\conrad\projects\cvs-1.12\lib\glob.c(1187) : warning C4133: 'initializing' : incompatible types - from 'struct dirent *' to 'struct direct *' Creating library... Configuration: libdiff - Win32 Debug Creating library... Configuration: cvsnt - Win32 Debug Compiling... find_names.c H:\Conrad\Projects\cvs-1.12\src\find_names.c(338) : warning C4018: '' : signed/unsigned mismatch Linking... LINK : LNK6004: .\WinDebug\cvs.exe not found or not built by the last incremental link; performing full link cvs.exe - 0 error(s), 122 warning(s) == ___ Bug-cvs mailing list Bug-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-cvs