Bug 199320 - Defining _POSIX_SOURCE breaks some applications
Summary: Defining _POSIX_SOURCE breaks some applications
Keywords:
Status: CLOSED DUPLICATE of bug 199316
Alias: None
Product: Fedora
Classification: Fedora
Component: flex
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Petr Machata
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-07-18 21:14 UTC by Simon Wilkinson
Modified: 2015-05-05 01:32 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-07-18 21:20:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Simon Wilkinson 2006-07-18 21:14:43 UTC
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):

2.5.4a-39

How reproducible:

Always

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 21:20:36 UTC

*** 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.