File tree Expand file tree Collapse file tree 12 files changed +34
-71
lines changed
Expand file tree Collapse file tree 12 files changed +34
-71
lines changed Original file line number Diff line number Diff line change 4747 * Only one attempt is made to build any given package, no matter how many
4848 * other packages depend on it.
4949 */
50- #define _DEFAULT_SOURCE
51- #define _BSD_SOURCE
5250
5351#include <sys/file.h>
5452#include <sys/stat.h>
Original file line number Diff line number Diff line change 2323 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2424 */
2525
26- #ifdef HAVE_STRCASESTR
27- # define _GNU_SOURCE /* for strcasestr(3) */
28- #endif
29-
30- #include "compat.h"
31-
3226#include <assert.h>
3327#include <errno.h>
3428#include <fnmatch.h>
Original file line number Diff line number Diff line change 3232 * - Supports overlayfs on a temporary directory or a tmpfs mount.
3333 * - Supports read-only bind mounts.
3434 */
35- #define _GNU_SOURCE
36- #define _XOPEN_SOURCE 700
37- #include <sys/types.h>
38- #include <sys/prctl.h>
35+
3936#include <sys/fsuid.h>
4037#include <sys/mount.h>
38+ #include <sys/prctl.h>
4139#include <sys/syscall.h>
40+ #include <sys/types.h>
4241#include <sys/wait.h>
43- #include <unistd.h>
44- #include <stdio.h>
45- #include <fcntl.h>
46- #include <errno.h>
47- #include <stdarg.h>
48- #include <string.h>
42+
4943#include <assert.h>
50- #include <stdlib .h>
51- #include <sched .h>
52- #include <limits .h> /* PATH_MAX */
44+ #include <dirent .h>
45+ #include <errno .h>
46+ #include <fcntl .h>
5347#include <ftw.h>
54- #include <signal.h>
5548#include <getopt.h>
56- #include <dirent.h>
49+ #include <limits.h>
50+ #include <sched.h>
51+ #include <signal.h>
52+ #include <stdarg.h>
53+ #include <stdio.h>
54+ #include <stdlib.h>
55+ #include <string.h>
56+ #include <unistd.h>
5757
5858#include <xbps.h>
5959#include "queue.h"
Original file line number Diff line number Diff line change 2222 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2323 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2424 */
25- #define _GNU_SOURCE
26- #include <sys/types.h>
27- #include <sys/mount.h>
25+
2826#include <sys/fsuid.h>
27+ #include <sys/mount.h>
28+ #include <sys/types.h>
2929#include <sys/wait.h>
30+
31+ #include <assert.h>
32+ #include <errno.h>
33+ #include <fcntl.h>
34+ #include <getopt.h>
35+ #include <grp.h>
36+ #include <limits.h>
3037#include <sched.h>
38+ #include <signal.h>
39+ #include <stdarg.h>
3140#include <stdio.h>
3241#include <stdlib.h>
3342#include <string.h>
34- #include <unistd.h>
35- #include <stdarg.h>
36- #include <signal.h>
37- #include <fcntl.h>
38- #include <grp.h>
39- #include <errno.h>
40- #include <limits.h>
4143#include <syscall.h>
42- #include <assert.h>
43- #include <getopt.h>
44+ #include <unistd.h>
4445
4546#include <xbps.h>
4647#include "queue.h"
Original file line number Diff line number Diff line change @@ -219,9 +219,10 @@ if [ -n "$FULL_DEBUG" ]; then
219219 echo " CPPFLAGS+= -DFULL_DEBUG" >> $CONFIG_MK
220220fi
221221
222+ echo " CPPFLAGS += -D_DEFAULT_SOURCE" >> $CONFIG_MK
223+ echo " CPPFLAGS += -D_GNU_SOURCE" >> $CONFIG_MK
222224case " $OS " in
223225linux)
224- echo " CPPFLAGS += -D_XOPEN_SOURCE=700" >> $CONFIG_MK
225226 echo " CPPFLAGS += -D_FILE_OFFSET_BITS=64" >> $CONFIG_MK
226227 ;;
227228* )
Original file line number Diff line number Diff line change 2323 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2424 */
2525
26- #ifdef HAVE_VASPRINTF
27- # define _GNU_SOURCE /* for vasprintf(3) */
28- #endif
29-
3026#include <stdio.h>
3127#include <stdbool.h>
3228#include <stdlib.h>
Original file line number Diff line number Diff line change 3131#include <assert.h>
3232#include <stdio.h>
3333#include <stdlib.h>
34- #define _BSD_SOURCE
3534#include <string.h>
36- #undef _BSD_SOURCE
3735#include <strings.h>
3836#include <ctype.h>
3937
Original file line number Diff line number Diff line change 2727 * POSSIBILITY OF SUCH DAMAGE.
2828 */
2929
30- #define _BSD_SOURCE /* for vfork and chroot */
31- #define _DEFAULT_SOURCE /* glibc>=2.20 */
3230#include <sys/types.h>
33- #include <unistd.h>
34-
3531#include <sys/wait.h>
32+
3633#include <errno.h>
3734#include <stdarg.h>
3835#include <stdlib.h>
3936#include <string.h>
37+ #include <unistd.h>
4038
41- #undef _DEFAULT_SOURCE
42- #undef _BSD_SOURCE
4339#include "xbps_api_impl.h"
4440
4541static int
Original file line number Diff line number Diff line change 5757 *
5858 */
5959
60- #ifdef __linux__
61- /* Keep this down to Linux, it can create surprises else where. */
62- #define _GNU_SOURCE
63- #endif
64-
6560#include <sys/types.h>
6661#include <sys/socket.h>
6762
Original file line number Diff line number Diff line change 6262 * SUCH DAMAGE.
6363 */
6464
65- #if defined(__linux__ )
66- #define _GNU_SOURCE
67- #endif
68-
6965#include <sys/types.h>
7066#include <sys/socket.h>
7167
You can’t perform that action at this time.
0 commit comments