bug-cvs
[Top][All Lists]
Advanced

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

RE: Feature Branch Windows Build Broken - New GNULIB glob module


From: Conrad T. Pino
Subject: RE: Feature Branch Windows Build Broken - New GNULIB glob module
Date: Tue, 17 May 2005 09:26:15 -0700

Hi Derek,

> From: Derek Price [mailto:address@hidden
> 
> 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 -0000      1.5
+++ lib/glob_.h 17 May 2005 16:15:56 -0000
@@ -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 -0000       1.22
+++ lib/libcvs.dsp      17 May 2005 16:15:56 -0000
@@ -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.c    15 May 2004 17:32:22 -0000      1.7
+++ windows-NT/pwd.c    17 May 2005 16:15:56 -0000
@@ -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)
 }
 
 struct group *
-getgrnam (char *name)
+getgrnam (const char *name)
 {
   return (struct group *) 0;
 }
Index: windows-NT/pwd.h
===================================================================
RCS file: /cvs/ccvs/windows-NT/pwd.h,v
retrieving revision 1.5
diff -u -p -r1.5 pwd.h
--- windows-NT/pwd.h    11 Aug 1997 01:09:33 -0000      1.5
+++ windows-NT/pwd.h    17 May 2005 16:15:56 -0000
@@ -42,9 +42,9 @@ struct group
 };
 
 extern struct passwd *getpwuid (int);
-extern struct passwd *getpwnam (char *);
+extern struct passwd *getpwnam (const char *);
 extern struct group *getgrgid (int);
-extern struct group *getgrnam (char *);
+extern struct group *getgrnam (const char *);
 extern char *getlogin (void);
 extern char *getgr_name (void);
 extern int getuid (void);




reply via email to

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