Bug 199320 - Defining _POSIX_SOURCE breaks some applications
Defining _POSIX_SOURCE breaks some applications
Status: CLOSED DUPLICATE of bug 199316
Product: Fedora
Classification: Fedora
Component: flex (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Petr Machata
Depends On:
  Show dependency treegraph
Reported: 2006-07-18 17:14 EDT by Simon Wilkinson
Modified: 2015-05-04 21:32 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-18 17:20:36 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 Simon Wilkinson 2006-07-18 17:14:43 EDT
Description of problem:

With release 39, #define _POSIX_SOURCE was added to the flex preamble. This causes sys/types.h to
not define certain common types such as u_short, which in turn breaks a number of applications.
It can't be overriden by changes to the lexer file, as sys/types.h is included before any of the header
files from the lexer source are included.

The work around is to explicitly force _BSD_SOURCE when compiling the resulting .c file, but this
requires wide spread changes to application build files.

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


How reproducible:


Steps to Reproduce:
1. Take application which requires BSD typedefs such as u_short from within lexer included files
2. Build against recent flex
3. Things break
Actual results:

u_short isn't defined.

Expected results:

u_short (and other BSD source symbols) should be defined in order to match existing behaviour

Additional info:

I'm happy to create an explicit test case for this if you would like - this is a real pain for a number
of applications, including OpenAFS.
Comment 1 Petr Machata 2006-07-18 17:20:36 EDT

*** This bug has been marked as a duplicate of 199316 ***

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