Bug 207963 - errors in header and out dated manpage
Summary: errors in header and out dated manpage
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-09-25 15:50 UTC by Francois Charles Matthieu BERENGER
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-09-26 18:40:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Francois Charles Matthieu BERENGER 2006-09-25 15:50:16 UTC
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):
glibc-headers-2.4-4

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

Steps to Reproduce:
1. edit
2. compile
3.

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 18:40:44 UTC
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
details).


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