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 47
47
* Only one attempt is made to build any given package, no matter how many
48
48
* other packages depend on it.
49
49
*/
50
- #define _DEFAULT_SOURCE
51
- #define _BSD_SOURCE
52
50
53
51
#include <sys/file.h>
54
52
#include <sys/stat.h>
Original file line number Diff line number Diff line change 23
23
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
24
*/
25
25
26
- #ifdef HAVE_STRCASESTR
27
- # define _GNU_SOURCE /* for strcasestr(3) */
28
- #endif
29
-
30
- #include "compat.h"
31
-
32
26
#include <assert.h>
33
27
#include <errno.h>
34
28
#include <fnmatch.h>
Original file line number Diff line number Diff line change 32
32
* - Supports overlayfs on a temporary directory or a tmpfs mount.
33
33
* - Supports read-only bind mounts.
34
34
*/
35
- #define _GNU_SOURCE
36
- #define _XOPEN_SOURCE 700
37
- #include <sys/types.h>
38
- #include <sys/prctl.h>
35
+
39
36
#include <sys/fsuid.h>
40
37
#include <sys/mount.h>
38
+ #include <sys/prctl.h>
41
39
#include <sys/syscall.h>
40
+ #include <sys/types.h>
42
41
#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
+
49
43
#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>
53
47
#include <ftw.h>
54
- #include <signal.h>
55
48
#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>
57
57
58
58
#include <xbps.h>
59
59
#include "queue.h"
Original file line number Diff line number Diff line change 22
22
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23
23
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
24
*/
25
- #define _GNU_SOURCE
26
- #include <sys/types.h>
27
- #include <sys/mount.h>
25
+
28
26
#include <sys/fsuid.h>
27
+ #include <sys/mount.h>
28
+ #include <sys/types.h>
29
29
#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>
30
37
#include <sched.h>
38
+ #include <signal.h>
39
+ #include <stdarg.h>
31
40
#include <stdio.h>
32
41
#include <stdlib.h>
33
42
#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>
41
43
#include <syscall.h>
42
- #include <assert.h>
43
- #include <getopt.h>
44
+ #include <unistd.h>
44
45
45
46
#include <xbps.h>
46
47
#include "queue.h"
Original file line number Diff line number Diff line change @@ -219,9 +219,10 @@ if [ -n "$FULL_DEBUG" ]; then
219
219
echo " CPPFLAGS+= -DFULL_DEBUG" >> $CONFIG_MK
220
220
fi
221
221
222
+ echo " CPPFLAGS += -D_DEFAULT_SOURCE" >> $CONFIG_MK
223
+ echo " CPPFLAGS += -D_GNU_SOURCE" >> $CONFIG_MK
222
224
case " $OS " in
223
225
linux)
224
- echo " CPPFLAGS += -D_XOPEN_SOURCE=700" >> $CONFIG_MK
225
226
echo " CPPFLAGS += -D_FILE_OFFSET_BITS=64" >> $CONFIG_MK
226
227
;;
227
228
* )
Original file line number Diff line number Diff line change 23
23
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
24
*/
25
25
26
- #ifdef HAVE_VASPRINTF
27
- # define _GNU_SOURCE /* for vasprintf(3) */
28
- #endif
29
-
30
26
#include <stdio.h>
31
27
#include <stdbool.h>
32
28
#include <stdlib.h>
Original file line number Diff line number Diff line change 31
31
#include <assert.h>
32
32
#include <stdio.h>
33
33
#include <stdlib.h>
34
- #define _BSD_SOURCE
35
34
#include <string.h>
36
- #undef _BSD_SOURCE
37
35
#include <strings.h>
38
36
#include <ctype.h>
39
37
Original file line number Diff line number Diff line change 27
27
* POSSIBILITY OF SUCH DAMAGE.
28
28
*/
29
29
30
- #define _BSD_SOURCE /* for vfork and chroot */
31
- #define _DEFAULT_SOURCE /* glibc>=2.20 */
32
30
#include <sys/types.h>
33
- #include <unistd.h>
34
-
35
31
#include <sys/wait.h>
32
+
36
33
#include <errno.h>
37
34
#include <stdarg.h>
38
35
#include <stdlib.h>
39
36
#include <string.h>
37
+ #include <unistd.h>
40
38
41
- #undef _DEFAULT_SOURCE
42
- #undef _BSD_SOURCE
43
39
#include "xbps_api_impl.h"
44
40
45
41
static int
Original file line number Diff line number Diff line change 57
57
*
58
58
*/
59
59
60
- #ifdef __linux__
61
- /* Keep this down to Linux, it can create surprises else where. */
62
- #define _GNU_SOURCE
63
- #endif
64
-
65
60
#include <sys/types.h>
66
61
#include <sys/socket.h>
67
62
Original file line number Diff line number Diff line change 62
62
* SUCH DAMAGE.
63
63
*/
64
64
65
- #if defined(__linux__ )
66
- #define _GNU_SOURCE
67
- #endif
68
-
69
65
#include <sys/types.h>
70
66
#include <sys/socket.h>
71
67
Original file line number Diff line number Diff line change 36
36
static pthread_mutex_t _prop_refcnt_mtx = PTHREAD_MUTEX_INITIALIZER ;
37
37
#endif /* _PROP_NEED_REFCNT_MTX */
38
38
39
- #define __USE_MISC /* MAP_ANON on glibc */
40
- # include <sys/mman.h>
41
- #undef __USE_MISC
39
+ #include <sys/mman.h>
42
40
#include <sys/stat.h>
43
41
#include <errno.h>
44
42
#include <fcntl.h>
Original file line number Diff line number Diff line change 22
22
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23
23
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
24
*/
25
-
26
- #ifdef HAVE_VASPRINTF
27
- # define _GNU_SOURCE /* for vasprintf(3) */
28
- #endif
29
-
30
- #if defined(HAVE_STRLCAT ) || defined(HAVE_STRLCPY )
31
- # define _BSD_SOURCE
32
- #endif
33
-
34
- #include "compat.h"
35
-
36
25
#include <sys/utsname.h>
37
26
38
27
#include <assert.h>
47
36
#include <stdlib.h>
48
37
#include <string.h>
49
38
39
+ #include "compat.h"
50
40
#include "xbps_api_impl.h"
51
41
52
42
#ifdef __clang__
You can’t perform that action at this time.
0 commit comments