From fcbf64b9064b87369fe839e0460391bd1e4d6b9f Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Thu, 18 Aug 2022 18:16:53 -0700 Subject: [PATCH] Remove warnings from amalgamation header --- libc/mem/mem.h | 2 +- libc/sysv/consts/_posix.h | 4 ---- libc/sysv/consts/xopen.h | 5 ++--- test/libc/release/test.mk | 2 ++ 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/libc/mem/mem.h b/libc/mem/mem.h index fb629e0fc..85b723c1e 100644 --- a/libc/mem/mem.h +++ b/libc/mem/mem.h @@ -23,7 +23,7 @@ void *valloc(size_t) attributeallocsize((1)) vallocesque; void *pvalloc(size_t) vallocesque; char *strdup(const char *) paramsnonnull() mallocesque; char *strndup(const char *, size_t) paramsnonnull() mallocesque; -void *aligned_alloc(size_t, size_t) attributeallocsize((1)) +void *aligned_alloc(size_t, size_t) attributeallocalign((1)) attributeallocsize((2)) returnspointerwithnoaliases libcesque dontdiscard; int posix_memalign(void **, size_t, size_t); bool __grow(void *, size_t *, size_t, size_t) paramsnonnull((1, 2)) libcesque; diff --git a/libc/sysv/consts/_posix.h b/libc/sysv/consts/_posix.h index 66f9062b7..3e9fcf6d9 100644 --- a/libc/sysv/consts/_posix.h +++ b/libc/sysv/consts/_posix.h @@ -52,8 +52,4 @@ #define _POSIX2_LINE_MAX 2048 #define _POSIX2_RE_DUP_MAX 255 -#define _XOPEN_IOV_MAX 16 -#define _XOPEN_NAME_MAX 255 -#define _XOPEN_PATH_MAX 1024 - #endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS__POSIX_H_ */ diff --git a/libc/sysv/consts/xopen.h b/libc/sysv/consts/xopen.h index 0a98e8829..4a9375a58 100644 --- a/libc/sysv/consts/xopen.h +++ b/libc/sysv/consts/xopen.h @@ -1,12 +1,11 @@ #ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_XOPEN_H_ #define COSMOPOLITAN_LIBC_SYSV_CONSTS_XOPEN_H_ -#define _XOPEN_IOV_MAX 0x10 +#define _XOPEN_IOV_MAX 16 #define _XOPEN_ENH_I18N 1 #define _XOPEN_UNIX 1 #define _XOPEN_NAME_MAX 63 -#define _XOPEN_PATH_MAX 255 -#define _XOPEN_VERSION 700 +#define _XOPEN_PATH_MAX 1024 #define _XOPEN_SOURCE 700 #endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_XOPEN_H_ */ diff --git a/test/libc/release/test.mk b/test/libc/release/test.mk index 814fd57d2..f33d01166 100644 --- a/test/libc/release/test.mk +++ b/test/libc/release/test.mk @@ -7,6 +7,7 @@ o/$(MODE)/test/libc/release/cosmopolitan.zip: \ o/$(MODE)/ape/ape.lds \ o/$(MODE)/libc/crt/crt.o \ o/$(MODE)/ape/ape.o \ + o/$(MODE)/ape/ape-copy-self.o \ o/$(MODE)/ape/ape-no-modify-self.o \ o/$(MODE)/cosmopolitan.a mkdir -p $(@D) @@ -15,6 +16,7 @@ o/$(MODE)/test/libc/release/cosmopolitan.zip: \ o/$(MODE)/ape/ape.lds \ o/$(MODE)/libc/crt/crt.o \ o/$(MODE)/ape/ape.o \ + o/$(MODE)/ape/ape-copy-self.o \ o/$(MODE)/ape/ape-no-modify-self.o \ o/$(MODE)/cosmopolitan.a