Bug 28633 - Fixes for glob.h and fnmatch.h on non-GNU systems
Summary: Fixes for glob.h and fnmatch.h on non-GNU systems
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm   
(Show other bugs)
Version: 7.0
Hardware: i386 Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2001-02-21 17:44 UTC by Joe Orton
Modified: 2007-04-18 16:31 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-02-22 16:33:18 UTC
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 18:01 UTC, Joe Orton
no flags Details | Diff
Patch for fnmatch.h (1.52 KB, patch)
2001-02-21 18:02 UTC, Joe Orton
no flags Details | Diff

Description Joe Orton 2001-02-21 17:44:31 UTC
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 18:01:31 UTC
Created attachment 10660 [details]
Patch for glob.h

Comment 2 Joe Orton 2001-02-21 18:02:05 UTC
Created attachment 10661 [details]
Patch for fnmatch.h

Comment 3 Jeff Johnson 2001-02-22 16:26:31 UTC
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 16:33:14 UTC
That sounds like a better fix, I'll give it a go, thanks!

Comment 5 Jeff Johnson 2001-02-22 17:55:01 UTC
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.