Add a features.h to auto enable _DEFAULT_SOURCE
Unless __STRICT_ANSI__ is defined (as it is when running the compiler in --std=c89 or --std=c99, but not when running it without any specific args), we can enable these by default and behave like most other systems. I don't know why no one has done this yet despite suggesting it multiple times and people prefer to #define _BSD_SOURCE manually everywhere. Remove all places in our Jamfiles and sources where it had been defined. _DEFAULT_SOURCE is now enabled by default for all sources of Haiku, since we let the compiler use GNU extensions (no strict C standard specified on command line) Use _DEFAULT_SOURCE as the define name to match current versions of glibc. Enable it if _BSD_SOURCE is #defined in compiler flags, for backward compatibility. Change-Id: I6db04da5f6db437723cdfba3478f5094a69d7727 Reviewed-on: https://review.haiku-os.org/c/1633 Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
70e55f0046
commit
4950607607
@@ -276,7 +276,7 @@ function BuildBroadcomFWCutter()
|
|||||||
|
|
||||||
# Build b43-fwcutter.
|
# Build b43-fwcutter.
|
||||||
echo "Compiling b43-fwcutter for installing Broadcom's firmware ..."
|
echo "Compiling b43-fwcutter for installing Broadcom's firmware ..."
|
||||||
make PREFIX=/boot/system CFLAGS="-I. -Wall -D_BSD_SOURCE" >/dev/null 2>&1
|
make PREFIX=/boot/system CFLAGS="-I. -Wall" >/dev/null 2>&1
|
||||||
result=$?
|
result=$?
|
||||||
if [ $result -gt 0 ]; then
|
if [ $result -gt 0 ]; then
|
||||||
echo "... failed to compile b43-fwcutter."
|
echo "... failed to compile b43-fwcutter."
|
||||||
|
|||||||
@@ -37,7 +37,10 @@
|
|||||||
#define _ARPA_FTP_H_
|
#define _ARPA_FTP_H_
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
/* Definitions for FTP; see RFC-765. */
|
/* Definitions for FTP; see RFC-765. */
|
||||||
|
|||||||
@@ -38,7 +38,10 @@
|
|||||||
#define _ARPA_TELNET_H_
|
#define _ARPA_TELNET_H_
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -38,7 +38,10 @@
|
|||||||
#define _ARPA_TFTP_H_
|
#define _ARPA_TFTP_H_
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#include_next <endian.h>
|
#include_next <endian.h>
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
#include <config/HaikuConfig.h>
|
#include <config/HaikuConfig.h>
|
||||||
#include <support/ByteOrder.h>
|
#include <support/ByteOrder.h>
|
||||||
|
|||||||
@@ -37,8 +37,9 @@
|
|||||||
#ifndef _ERR_H_
|
#ifndef _ERR_H_
|
||||||
#define _ERR_H_
|
#define _ERR_H_
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#include_next <errno.h>
|
#include_next <errno.h>
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#define EDOOFUS EINVAL
|
#define EDOOFUS EINVAL
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2019 Haiku, Inc. All rights reserved.
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
#ifndef _FEATURES_H
|
||||||
|
#define _FEATURES_H
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(_BSD_SOURCE) \
|
||||||
|
|| (!defined(__STRICT_ANSI__) && !defined(_POSIX_C_SOURCE))
|
||||||
|
#define _DEFAULT_SOURCE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif // _FEATURES_H
|
||||||
@@ -5,8 +5,9 @@
|
|||||||
#ifndef _IFADDRS_H
|
#ifndef _IFADDRS_H
|
||||||
#define _IFADDRS_H
|
#define _IFADDRS_H
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -39,8 +39,9 @@
|
|||||||
#ifndef _LIBUTIL_H_
|
#ifndef _LIBUTIL_H_
|
||||||
#define _LIBUTIL_H_
|
#define _LIBUTIL_H_
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|||||||
@@ -6,7 +6,10 @@
|
|||||||
#define _NETINET_IN_SYSTM_H_
|
#define _NETINET_IN_SYSTM_H_
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|||||||
@@ -37,8 +37,9 @@
|
|||||||
#ifndef _PATHS_H_
|
#ifndef _PATHS_H_
|
||||||
#define _PATHS_H_
|
#define _PATHS_H_
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
|
#if defined(_DEFAULT_SOURCE) || defined(_GNU_SOURCE)
|
||||||
|
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
@@ -141,7 +142,7 @@ __END_DECLS
|
|||||||
#endif /* RESCUE */
|
#endif /* RESCUE */
|
||||||
|
|
||||||
|
|
||||||
#endif /* _BSD_SOURCE || _GNU_SOURCE */
|
#endif /* _DEFAULT_SOURCE || _GNU_SOURCE */
|
||||||
|
|
||||||
|
|
||||||
#endif /* !_PATHS_H_ */
|
#endif /* !_PATHS_H_ */
|
||||||
|
|||||||
@@ -5,8 +5,9 @@
|
|||||||
#ifndef _BSD_PTY_H_
|
#ifndef _BSD_PTY_H_
|
||||||
#define _BSD_PTY_H_
|
#define _BSD_PTY_H_
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|||||||
@@ -23,7 +23,9 @@
|
|||||||
#ifndef _READPASSPHRASE_H_
|
#ifndef _READPASSPHRASE_H_
|
||||||
#define _READPASSPHRASE_H_
|
#define _READPASSPHRASE_H_
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#include <features.h>
|
||||||
|
|
||||||
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
#define RPP_ECHO_OFF 0x00 /* Turn off echo (default). */
|
#define RPP_ECHO_OFF 0x00 /* Turn off echo (default). */
|
||||||
#define RPP_ECHO_ON 0x01 /* Leave echo on. */
|
#define RPP_ECHO_ON 0x01 /* Leave echo on. */
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#include_next <signal.h>
|
#include_next <signal.h>
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#define sigmask(sig) (1 << ((sig) - 1))
|
#define sigmask(sig) (1 << ((sig) - 1))
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#include_next <stdio.h>
|
#include_next <stdio.h>
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#include_next <stdlib.h>
|
#include_next <stdlib.h>
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#include_next <string.h>
|
#include_next <string.h>
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -36,8 +36,9 @@
|
|||||||
#ifndef _STRINGLIST_H
|
#ifndef _STRINGLIST_H
|
||||||
#define _STRINGLIST_H
|
#define _STRINGLIST_H
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#include_next <sys/cdefs.h>
|
#include_next <sys/cdefs.h>
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#define __FBSDID(x)
|
#define __FBSDID(x)
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
#ifndef _SYS_IOCCOM_H
|
#ifndef _SYS_IOCCOM_H
|
||||||
#define _SYS_IOCCOM_H
|
#define _SYS_IOCCOM_H
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
#define _SYS_LINK_ELF_H_
|
#define _SYS_LINK_ELF_H_
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#include <os/kernel/elf.h>
|
#include <os/kernel/elf.h>
|
||||||
|
|||||||
@@ -27,8 +27,9 @@
|
|||||||
#ifndef _MD4_H_
|
#ifndef _MD4_H_
|
||||||
#define _MD4_H_
|
#define _MD4_H_
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
/* MD4 context. */
|
/* MD4 context. */
|
||||||
|
|||||||
@@ -28,8 +28,9 @@ documentation and/or software.
|
|||||||
#ifndef _SYS_MD5_H_
|
#ifndef _SYS_MD5_H_
|
||||||
#define _SYS_MD5_H_
|
#define _SYS_MD5_H_
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#include_next <sys/param.h>
|
#include_next <sys/param.h>
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#ifndef _ALIGNBYTES
|
#ifndef _ALIGNBYTES
|
||||||
|
|||||||
@@ -33,8 +33,9 @@
|
|||||||
#ifndef _SYS_QUEUE_H_
|
#ifndef _SYS_QUEUE_H_
|
||||||
#define _SYS_QUEUE_H_
|
#define _SYS_QUEUE_H_
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
@@ -619,6 +620,6 @@ void remque(void *a);
|
|||||||
|
|
||||||
#endif /* _KERNEL */
|
#endif /* _KERNEL */
|
||||||
|
|
||||||
#endif /* _BSD_SOURCE */
|
#endif /* _DEFAULT_SOURCE */
|
||||||
|
|
||||||
#endif /* !_SYS_QUEUE_H_ */
|
#endif /* !_SYS_QUEUE_H_ */
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#include_next <sys/time.h>
|
#include_next <sys/time.h>
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#include_next <sys/wait.h>
|
#include_next <sys/wait.h>
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#include_next <time.h>
|
#include_next <time.h>
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#include_next <unistd.h>
|
#include_next <unistd.h>
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#define L_SET SEEK_SET
|
#define L_SET SEEK_SET
|
||||||
|
|||||||
@@ -35,8 +35,9 @@
|
|||||||
#ifndef _VIS_H_
|
#ifndef _VIS_H_
|
||||||
#define _VIS_H_
|
#define _VIS_H_
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
|||||||
UsePrivateHeaders firewire ;
|
UsePrivateHeaders firewire ;
|
||||||
UsePrivateKernelHeaders ;
|
UsePrivateKernelHeaders ;
|
||||||
|
|
||||||
local defines = [ FDefines _KERNEL=1 _BSD_SOURCE=1 ] ;
|
local defines = [ FDefines _KERNEL=1 ] ;
|
||||||
SubDirCcFlags $(defines) ;
|
SubDirCcFlags $(defines) ;
|
||||||
SubDirC++Flags $(defines) ;
|
SubDirC++Flags $(defines) ;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
|||||||
UsePrivateHeaders firewire ;
|
UsePrivateHeaders firewire ;
|
||||||
UsePrivateKernelHeaders ;
|
UsePrivateKernelHeaders ;
|
||||||
|
|
||||||
SubDirCcFlags [ FDefines _KERNEL=1 _BSD_SOURCE=1 ] ;
|
SubDirCcFlags [ FDefines _KERNEL=1 ] ;
|
||||||
|
|
||||||
KernelAddon fw_raw :
|
KernelAddon fw_raw :
|
||||||
fw_raw.c
|
fw_raw.c
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers disk nvme ;
|
|||||||
|
|
||||||
UsePrivateKernelHeaders ;
|
UsePrivateKernelHeaders ;
|
||||||
SubDirHdrs $(HAIKU_TOP) src system kernel device_manager ;
|
SubDirHdrs $(HAIKU_TOP) src system kernel device_manager ;
|
||||||
|
SubDirSysHdrs $(HAIKU_TOP) headers compatibility bsd ;
|
||||||
|
|
||||||
UseHeaders [ FDirName $(SUBDIR) ] : true ;
|
UseHeaders [ FDirName $(SUBDIR) ] : true ;
|
||||||
|
|
||||||
|
|||||||
@@ -52,11 +52,8 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifdef __HAIKU__
|
|
||||||
#define _BSD_SOURCE
|
|
||||||
#include <compatibility/bsd/sys/queue.h>
|
|
||||||
#else
|
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
|
#ifndef __HAIKU__
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,6 @@
|
|||||||
[email protected]
|
[email protected]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _BSD_SOURCE
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
|||||||
UsePrivateHeaders firewire ;
|
UsePrivateHeaders firewire ;
|
||||||
UsePrivateHeaders media ;
|
UsePrivateHeaders media ;
|
||||||
UsePrivateHeaders shared ;
|
UsePrivateHeaders shared ;
|
||||||
SubDirC++Flags [ FDefines _BSD_SOURCE=1 ] ;
|
|
||||||
|
|
||||||
local architectureObject ;
|
local architectureObject ;
|
||||||
for architectureObject in [ MultiArchSubDirSetup ] {
|
for architectureObject in [ MultiArchSubDirSetup ] {
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ UseBuildFeatureHeaders libedit ;
|
|||||||
|
|
||||||
LINKFLAGS += -Wl,--exclude-libs,ALL ;
|
LINKFLAGS += -Wl,--exclude-libs,ALL ;
|
||||||
|
|
||||||
SubDirC++Flags [ FDefines _BSD_SOURCE=1 ] ;
|
|
||||||
|
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) settings ] ;
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) settings ] ;
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface cli ] ;
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface cli ] ;
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface cli commands ] ;
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) user_interface cli commands ] ;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ SubDir HAIKU_TOP src bin fwcontrol ;
|
|||||||
|
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
||||||
UsePrivateHeaders firewire ;
|
UsePrivateHeaders firewire ;
|
||||||
SubDirCcFlags [ FDefines _BSD_SOURCE=1 ] ;
|
|
||||||
|
|
||||||
BinCommand fwcontrol :
|
BinCommand fwcontrol :
|
||||||
eui64.c
|
eui64.c
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ UsePrivateHeaders kernel ;
|
|||||||
UsePrivateHeaders libroot ;
|
UsePrivateHeaders libroot ;
|
||||||
UsePrivateHeaders shared ;
|
UsePrivateHeaders shared ;
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
||||||
SubDirC++Flags [ FDefines _BSD_SOURCE=1 ] ;
|
|
||||||
|
|
||||||
StaticLibrary libmultiuser_utils.a : multiuser_utils.cpp ;
|
StaticLibrary libmultiuser_utils.a : multiuser_utils.cpp ;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ SubDir HAIKU_TOP src bin network ftpd ;
|
|||||||
|
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
||||||
UseHeaders $(SUBDIR) : true ;
|
UseHeaders $(SUBDIR) : true ;
|
||||||
SubDirCcFlags [ FDefines _BSD_SOURCE=1 ] ;
|
|
||||||
|
|
||||||
BinCommand ftpd :
|
BinCommand ftpd :
|
||||||
ftpd.c
|
ftpd.c
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ UsePrivateHeaders net ;
|
|||||||
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat ] : true ;
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
|
||||||
|
|
||||||
SubDirC++Flags [ FDefines _BSD_SOURCE=1 ] ;
|
|
||||||
|
|
||||||
BinCommand ifconfig :
|
BinCommand ifconfig :
|
||||||
ifconfig.cpp
|
ifconfig.cpp
|
||||||
MediaTypes.cpp
|
MediaTypes.cpp
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ UseHeaders [ FDirName $(HAIKU_TOP) src libs libtelnet ] : false ;
|
|||||||
|
|
||||||
UseBuildFeatureHeaders ncurses ;
|
UseBuildFeatureHeaders ncurses ;
|
||||||
|
|
||||||
local defines = [ FDefines USE_TERMIO=1 OLD_ENVIRON=1 ENV_HACK=1 _BSD_SOURCE=1 ] ;
|
local defines = [ FDefines USE_TERMIO=1 OLD_ENVIRON=1 ENV_HACK=1 ] ;
|
||||||
|
|
||||||
SubDirCcFlags $(defines) ;
|
SubDirCcFlags $(defines) ;
|
||||||
SubDirC++Flags $(defines) ;
|
SubDirC++Flags $(defines) ;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
|||||||
UseHeaders [ FDirName $(HAIKU_TOP) src libs ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) src libs ] : true ;
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) src libs libtelnet ] : false ;
|
UseHeaders [ FDirName $(HAIKU_TOP) src libs libtelnet ] : false ;
|
||||||
|
|
||||||
local defines = [ FDefines USE_TERMIO=1 _BSD_SOURCE=1 ] ;
|
local defines = [ FDefines USE_TERMIO=1 ] ;
|
||||||
|
|
||||||
SubDirCcFlags $(defines) ;
|
SubDirCcFlags $(defines) ;
|
||||||
SubDirC++Flags $(defines) ;
|
SubDirC++Flags $(defines) ;
|
||||||
|
|||||||
@@ -34,8 +34,6 @@ UsePrivateSystemHeaders ;
|
|||||||
|
|
||||||
LINKFLAGS += -Wl,--exclude-libs,ALL ;
|
LINKFLAGS += -Wl,--exclude-libs,ALL ;
|
||||||
|
|
||||||
SubDirC++Flags [ FDefines _BSD_SOURCE=1 ] ;
|
|
||||||
|
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) arch ] ;
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) arch ] ;
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) arch x86 ] ;
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) arch x86 ] ;
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) arch x86_64 ] ;
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) arch x86_64 ] ;
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
|
|||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers os add-ons network_settings ]
|
UseHeaders [ FDirName $(HAIKU_TOP) headers os add-ons network_settings ]
|
||||||
: true ;
|
: true ;
|
||||||
|
|
||||||
SubDirC++Flags [ FDefines _BSD_SOURCE=1 ] ;
|
|
||||||
|
|
||||||
local architectureObject ;
|
local architectureObject ;
|
||||||
for architectureObject in [ MultiArchSubDirSetup ] {
|
for architectureObject in [ MultiArchSubDirSetup ] {
|
||||||
on $(architectureObject) {
|
on $(architectureObject) {
|
||||||
|
|||||||
@@ -2,9 +2,6 @@ SubDir HAIKU_TOP src libs bsd ;
|
|||||||
|
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
||||||
|
|
||||||
SubDirCcFlags [ FDefines _BSD_SOURCE=1 ] ;
|
|
||||||
SubDirC++Flags [ FDefines _BSD_SOURCE=1 ] ;
|
|
||||||
|
|
||||||
local architectureObject ;
|
local architectureObject ;
|
||||||
for architectureObject in [ MultiArchSubDirSetup ] {
|
for architectureObject in [ MultiArchSubDirSetup ] {
|
||||||
on $(architectureObject) {
|
on $(architectureObject) {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
SubDir HAIKU_TOP src libs libtelnet ;
|
SubDir HAIKU_TOP src libs libtelnet ;
|
||||||
|
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
||||||
SubDirCcFlags [ FDefines _BSD_SOURCE=1 ] ;
|
|
||||||
|
|
||||||
StaticLibrary libtelnet.a :
|
StaticLibrary libtelnet.a :
|
||||||
auth.c
|
auth.c
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src libs util ;
|
|||||||
|
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
||||||
|
|
||||||
local defines = [ FDefines SCCSID=0 _BSD_SOURCE=1 ] ;
|
local defines = [ FDefines SCCSID=0 ] ;
|
||||||
SubDirCcFlags $(defines) ;
|
SubDirCcFlags $(defines) ;
|
||||||
|
|
||||||
local architectureObject ;
|
local architectureObject ;
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
|||||||
local services = [ FGristFiles services ] ;
|
local services = [ FGristFiles services ] ;
|
||||||
SEARCH on $(services) = [ FDirName $(SUBDIR) netresolv defaults ] ;
|
SEARCH on $(services) = [ FDirName $(SUBDIR) netresolv defaults ] ;
|
||||||
|
|
||||||
SubDirC++Flags [ FDefines _BSD_SOURCE=1 ] ;
|
|
||||||
|
|
||||||
local architectureObject ;
|
local architectureObject ;
|
||||||
for architectureObject in [ MultiArchSubDirSetup ] {
|
for architectureObject in [ MultiArchSubDirSetup ] {
|
||||||
on $(architectureObject) {
|
on $(architectureObject) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
|
|||||||
# we want to have the xxx_r functions, IPv6, and md5 implementation
|
# we want to have the xxx_r functions, IPv6, and md5 implementation
|
||||||
# we also need to use our BSD compatibility functions
|
# we also need to use our BSD compatibility functions
|
||||||
# and enable "lint" to remove the RCSID from all the files.
|
# and enable "lint" to remove the RCSID from all the files.
|
||||||
local defines = _REENTRANT=1 USE_MD5=1 _BSD_SOURCE INET6 lint LINT ;
|
local defines = _REENTRANT=1 USE_MD5=1 INET6 lint LINT ;
|
||||||
defines = [ FDefines $(defines) ] ;
|
defines = [ FDefines $(defines) ] ;
|
||||||
SubDirCcFlags $(defines) -Wno-sign-compare ;
|
SubDirCcFlags $(defines) -Wno-sign-compare ;
|
||||||
SubDirC++Flags $(defines) -Wno-sign-compare ;
|
SubDirC++Flags $(defines) -Wno-sign-compare ;
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#define _BSD_SOURCE
|
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user