Skip to content

Commit

Permalink
Disable feature test macros on FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
grimreaper authored and PromyLOPh committed Jul 11, 2011
1 parent a5411df commit f1f0e46
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libezxml/ezxml.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#ifndef __FreeBSD__
#define _BSD_SOURCE /* required by strdup() */
#endif

#include <stdlib.h>
#include <stdio.h>
Expand Down
2 changes: 2 additions & 0 deletions src/libpiano/piano.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#ifndef __FreeBSD__
#define _BSD_SOURCE /* required by strdup() */
#endif

#include <stdio.h>
#include <string.h>
Expand Down
2 changes: 2 additions & 0 deletions src/libpiano/xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#ifndef __FreeBSD__
#define _BSD_SOURCE /* required by strdup() */
#endif

#include <stdio.h>
#include <string.h>
Expand Down
2 changes: 2 additions & 0 deletions src/libwaitress/waitress.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#ifndef __FreeBSD__
#define _POSIX_C_SOURCE 1 /* required by getaddrinfo() */
#define _BSD_SOURCE /* snprintf() */
#endif

#include <sys/types.h>
#include <sys/socket.h>
Expand Down
2 changes: 2 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#ifndef __FreeBSD__
#define _POSIX_C_SOURCE 1 /* fileno() */
#define _BSD_SOURCE /* strdup() */
#endif

/* system includes */
#include <stdlib.h>
Expand Down
2 changes: 2 additions & 0 deletions src/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ THE SOFTWARE.

/* application settings */

#ifndef __FreeBSD__
#define _POSIX_C_SOURCE 1 /* PATH_MAX */
#define _BSD_SOURCE /* strdup() */
#endif

#include <string.h>
#include <stdlib.h>
Expand Down
2 changes: 2 additions & 0 deletions src/terminal.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#ifndef __FreeBSD__
#define _POSIX_C_SOURCE 1 /* fileno() */
#define _BSD_SOURCE /* setlinebuf() */
#endif

#include <termios.h>
#include <stdio.h>
Expand Down
2 changes: 2 additions & 0 deletions src/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ THE SOFTWARE.

/* everything that interacts with the user */

#ifndef __FreeBSD__
#define _POSIX_C_SOURCE 1 /* fileno() */
#define _BSD_SOURCE /* strdup() */
#endif

#include <stdio.h>
#include <stdarg.h>
Expand Down

0 comments on commit f1f0e46

Please sign in to comment.