Get repository to build with GCC 11

See #594
This commit is contained in:
Justine Tunney 2022-09-13 04:14:20 -07:00
parent 446a1f7c5a
commit 06f9a5b627
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
34 changed files with 115 additions and 51 deletions

View file

@ -17,11 +17,11 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/calls/calls.h"
#include "libc/intrin/strace.internal.h"
#include "libc/calls/syscall-nt.internal.h"
#include "libc/calls/syscall-sysv.internal.h"
#include "libc/dce.h"
#include "libc/intrin/asan.internal.h"
#include "libc/intrin/strace.internal.h"
#include "libc/sysv/errfuns.h"
/**

View file

@ -5,18 +5,18 @@
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
int __sys_utimensat(int, const char *, const struct timespec *, int) hidden;
int __sys_utimensat(int, const char *, const struct timespec[2], int) hidden;
int sys_clock_getres(int, struct timespec *) hidden;
int sys_clock_gettime(int, struct timespec *) hidden;
int sys_clock_gettime_nt(int, struct timespec *) hidden;
int sys_clock_gettime_xnu(int, struct timespec *) hidden;
int sys_futimens(int, const struct timespec *) hidden;
int sys_futimens(int, const struct timespec[2]) hidden;
int sys_nanosleep(const struct timespec *, struct timespec *) hidden;
int sys_nanosleep_nt(const struct timespec *, struct timespec *) hidden;
int sys_nanosleep_xnu(const struct timespec *, struct timespec *) hidden;
int sys_utimensat(int, const char *, const struct timespec *, int) hidden;
int sys_utimensat_nt(int, const char *, const struct timespec *, int) hidden;
int sys_utimensat_xnu(int, const char *, const struct timespec *, int) hidden;
int sys_utimensat(int, const char *, const struct timespec[2], int) hidden;
int sys_utimensat_nt(int, const char *, const struct timespec[2], int) hidden;
int sys_utimensat_xnu(int, const char *, const struct timespec[2], int) hidden;
const char *DescribeTimespec(char[45], int, const struct timespec *);
#define DescribeTimespec(rc, ts) DescribeTimespec(alloca(45), rc, ts)

View file

@ -21,7 +21,7 @@
#include "libc/testlib/testlib.h"
bool testlib_strcaseequals(size_t cw, const void *s1, const void *s2) {
return testlib_strncaseequals(cw, s1, s2, SIZE_MAX);
return testlib_strncaseequals(cw, s1, s2, LONG_MAX);
}
bool testlib_strncaseequals(size_t cw, const void *s1, const void *s2,

View file

@ -21,7 +21,7 @@
#include "libc/testlib/testlib.h"
bool testlib_strequals(size_t cw, const void *s1, const void *s2) {
return testlib_strnequals(cw, s1, s2, SIZE_MAX);
return testlib_strnequals(cw, s1, s2, LONG_MAX);
}
bool testlib_strnequals(size_t cw, const void *s1, const void *s2, size_t n) {

View file

@ -69,7 +69,7 @@
static char buf_asctime[MAX_ASCTIME_BUF_SIZE];
char *
asctime_r(register const struct tm *timeptr, char *buf)
asctime_r(register const struct tm *timeptr, char buf[hasatleast 26])
{
register const char * wn;
register const char * mn;

View file

@ -2,7 +2,7 @@
#include "libc/time/struct/tm.h"
#include "libc/time/time.h"
char *ctime_r(const time_t *timep, char *buf) {
char *ctime_r(const time_t *timep, char buf[hasatleast 26]) {
struct tm mytm;
struct tm *tmp = localtime_r(timep, &mytm);
return tmp ? asctime_r(tmp, buf) : NULL;

View file

@ -18,7 +18,7 @@ struct tm {
};
char *asctime(const struct tm *);
char *asctime_r(const struct tm *, char[hasatleast 64]);
char *asctime_r(const struct tm *, char[hasatleast 26]);
char *iso8601(char[hasatleast 20], struct tm *);
char *strptime(const char *, const char *, struct tm *);
int64_t mktime(struct tm *);

View file

@ -18,7 +18,7 @@ extern long timezone;
extern int daylight;
char *ctime(const int64_t *);
char *ctime_r(const int64_t *, char[hasatleast 64]);
char *ctime_r(const int64_t *, char[hasatleast 26]);
double difftime(int64_t, int64_t) dontthrow pureconst;
extern long double (*nowl)(void);
int64_t clock(void);