Bug 60624

Summary: Using GNU specific macro values without defining _GNU_SOURCE
Product: Wayland Reporter: Adrián Pérez Heredia <aperezhrd>
Component: westonAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: -D_GNU_SOURCE added to configure.ac

Description Adrián Pérez Heredia 2013-02-11 05:37:15 UTC
Created attachment 74578 [details]
-D_GNU_SOURCE added to configure.ac

I've just checked out the weston code from git and some code in the master branch like tty.c uses macros like O_CLOEXEC that requires _GNU_SOURCE to be defined to be used. 

I've thought may be adding -D_GNU_SOURCE to CFLAGS in configure.ac would make unnecesary to define it everytime GNU specific macros are used.
Comment 1 Kristian Høgsberg 2013-02-26 16:05:01 UTC
I'd prefer to just add it to the files that need it instead of a project wide flag.
Comment 2 Kristian Høgsberg 2013-03-27 19:17:54 UTC
Closing this one.  I don't see build problems or warnings, and as I mentioned, I prefer to keep the _GNU_SOURCE #defines in the files that need them.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.