Bug 199320

Summary: Defining _POSIX_SOURCE breaks some applications
Product: [Fedora] Fedora Reporter: Simon Wilkinson <simon>
Component: flexAssignee: Petr Machata <pmachata>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: mnewsome
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-18 21:20:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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