Bug 493941 - glibc: getline from stdio.h declared by default
glibc: getline from stdio.h declared by default
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-03 07:47 EDT by Scott Tsai
Modified: 2009-04-13 22:52 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-03 07:55:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Scott Tsai 2009-04-03 07:47:31 EDT
Description of problem:
'make headers_install' in linux-2.6.27.6 fails because the function 'getline' from stdio.h is exposed without the user having to declare any extra feature test macros.

Version-Release number of selected component (if applicable):
glibc-headers-2.9.90-12.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Download and extract linux-2.6.27.6.tar.bz2
2. cd linux-2.6.27.6
3. make headers_install
  
Actual results:
linux-2.6.27.6]$ make headers_install
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep.c: In function ‘traps’:
scripts/basic/fixdep.c:377: warning: dereferencing type-punned pointer will break strict-aliasing rules
scripts/basic/fixdep.c:379: warning: dereferencing type-punned pointer will break strict-aliasing rules
  HOSTCC  scripts/basic/docproc
  HOSTCC  scripts/unifdef
scripts/unifdef.c:209: error: conflicting types for ‘getline’
/usr/include/stdio.h:653: note: previous declaration of ‘getline’ was here
make[1]: *** [scripts/unifdef] Error 1
make: *** [__headers] Error 2


Expected results:
'make headers_install' succeeds.

Additional info:
'getline' is a common function name. My uneducated guess is that we don't want __USE_XOPEN2K8 to be true without the user defining an extra feature test macro?
Comment 1 Jakub Jelinek 2009-04-03 07:55:12 EDT
This has been already fixed in newer kernels.
getline is a standard POSIX 2008 function and we do want POSIX C 2008 stuff by default.  If you don't like it, choose a different namespace or rename your functions.
Comment 2 Jason D. Clinton 2009-04-13 22:52:04 EDT
Just an FYI, this change also broke GNUChess which is no longer maintained upstream.

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