Bug 207963 - errors in header and out dated manpage
errors in header and out dated manpage
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2006-09-25 11:50 EDT by Francois Charles Matthieu BERENGER
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-09-26 14:40:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Francois Charles Matthieu BERENGER 2006-09-25 11:50:16 EDT
Description of problem:
in files from glibc-headers-2.4-4:
#define __USE_GNU
#include <stdio.h>
shows compilation errors in stdio.h
(/usr/include/stdio.h:288: error: expected declaration specifiers
or ‘...’ before ‘_IO_cookie_io_functions_t’)

Not related, the man page says (man hsearch)
#define _GNU_SOURCE 
#include <search.h> 
in order to enable
int hcreate_r(size_t nel, struct hsearch_data *tab); 
int hsearch_r(ENTRY item, ACTION action, ENTRY **ret, struct hsearch_data *tab); 
void hdestroy_r(struct hsearch_data *tab);

Having a look at search.h, I see you need #define __USE_GNU
and not #define _GNU_SOURCE

Version-Release number of selected component (if applicable):

How reproducible:
compile a C source file with the given includes and #define directives

Steps to Reproduce:
1. edit
2. compile

Actual results:
compiler warning, outdated man page

Expected results:
no warning, up to date man page

Additional info:
I hope I was complete enough, good luck. :-)
Comment 1 Jakub Jelinek 2006-09-26 14:40:44 EDT
You should never define __USE_GNU, that's glibc internal macro.
_GNU_SOURCE is one of the feature test macros, see
info libc 'Feature Test Macros'
which should be defined via -D_GNU_SOURCE on compiler's command line or
via #define _GNU_SOURCE before inclusion of the first header in the source.
glibc headers then do the right thing (see /usr/include/features.h for the

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