RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 16:47:02 Branch: HEAD Handle: 2007071915470200 Modified files: rpm/misc glob.c glob.h Log: Fix building under *non*-GCC compilers (here a Sun Studio 12 under Fedora 7 ;-) by making sure the glob_t used in the prototype is also overloaded. Additionally, use the correct "dirent" structure and callbacks functions. I'm sure nobody has -- at least recently -- built RPM with anything but GCC... ;-) Summary: Revision Changes Path 1.18 +6 -0 rpm/misc/glob.c 1.12 +1 -0 rpm/misc/glob.h ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/misc/glob.c ============================================================================ $ cvs diff -u -r1.17 -r1.18 glob.c --- rpm/misc/glob.c 28 Jan 2005 08:09:43 -0000 1.17 +++ rpm/misc/glob.c 19 Jul 2007 14:47:02 -0000 1.18 @@ -1066,9 +1066,15 @@ { const char *name; size_t len; +#ifdef _LARGEFILE64_SOURCE + struct dirent64 *d = ((flags & GLOB_ALTDIRFUNC) + ? (*pglob->gl_readdir) (stream) + : readdir64 ((DIR *) stream)); +#else struct dirent *d = ((flags & GLOB_ALTDIRFUNC) ? (*pglob->gl_readdir) (stream) : readdir ((DIR *) stream)); +#endif if (d == NULL) break; if (! REAL_DIR_ENTRY (d)) @@ . patch -p0 <<'@@ .' Index: rpm/misc/glob.h ============================================================================ $ cvs diff -u -r1.11 -r1.12 glob.h --- rpm/misc/glob.h 25 May 2007 17:36:08 -0000 1.11 +++ rpm/misc/glob.h 19 Jul 2007 14:47:02 -0000 1.12 @@ -172,6 +172,7 @@ # else # define glob glob64 # define globfree globfree64 +# define glob_t glob64_t # endif #endif @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org