Bug 28633 - Fixes for glob.h and fnmatch.h on non-GNU systems
Fixes for glob.h and fnmatch.h on non-GNU systems
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-02-21 12:44 EST by Joe Orton
Modified: 2007-04-18 12:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-02-22 11:33:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch for glob.h (2.00 KB, patch)
2001-02-21 13:01 EST, Joe Orton
no flags Details | Diff
Patch for fnmatch.h (1.52 KB, patch)
2001-02-21 13:02 EST, Joe Orton
no flags Details | Diff

  None (edit)
Description Joe Orton 2001-02-21 12:44:31 EST
fnmatch.h and glob.h are included only if --with-glob is
enabled.  Whilst it appears that they come from glibc directly,
the checks for POSIX_C_SOURCE and whatnot aren't strictly
necessary and actually defeat the purpose of bundling them. rpm
uses the GNU #defines, but they only kick in if the compiler
sets POSIX_C_SOURCE and/or GNU_SOURCE to something valid.

These checks are redundant given the limited scope of the header
files, and if the compiler or pre-processor don't define
POSIX_C_SOURCE or GNU_SOURCE, then they aren't included at all
thereby breaking the build process.
Comment 1 Joe Orton 2001-02-21 13:01:31 EST
Created attachment 10660 [details]
Patch for glob.h
Comment 2 Joe Orton 2001-02-21 13:02:05 EST
Created attachment 10661 [details]
Patch for fnmatch.h
Comment 3 Jeff Johnson 2001-02-22 11:26:31 EST
FWIW, these are exact copies of what was in glibc, stolen for portability
retrofitting on non-GNU
systems,  presumably as portable as glibc is (i.e. failrly portable).

What's worng with simply adding -D_GNU_SOURCE when compiling rpm always, as that
essentially what is intended (i.e. GNU extensions to globbing) even though the
includes are
in the rpm tree rather than the glibc tree on non-GNU systems?
Comment 4 Joe Orton 2001-02-22 11:33:14 EST
That sounds like a better fix, I'll give it a go, thanks!
Comment 5 Jeff Johnson 2001-02-22 12:55:01 EST
OK, reopen if adding -D_GNU_SOURCE doesn't work for you.

BTW, some instructions on what you're doing wrto LDFLAGS, CFLAGS, etc
to build rpm on non-linuc platforms would be gratefully received. I'll even
it up if you just send me the output of a build for each platform.

Note You need to log in before you can comment on or make changes to this bug.