Skip to content

Commit bb562f7

Browse files
authored
Added missing libcxx headers and using:: declarations. (#532)
1 parent 26ea392 commit bb562f7

File tree

21 files changed

+154
-25
lines changed

21 files changed

+154
-25
lines changed

src/libc/include/fenv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@ int feupdateenv(const fenv_t *);
8383
}
8484
#endif
8585

86-
#endif
86+
#endif /* _FENV_P_ONLY */
8787

88-
#endif
88+
#endif /* _FENV_P */

src/libc/include/float.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
#define FLT_RADIX __FLT_RADIX__
88

9-
#if __STDC_VERSION__ >= 199901L
9+
#if (__STDC_VERSION__ >= 199901L) || (defined(__cplusplus) && __cplusplus >= 201103L)
1010
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
1111

1212
#define DECIMAL_DIG __DECIMAL_DIG__
1313
#endif
1414

15-
#if __STDC_VERSION__ >= 201112L
15+
#if (__STDC_VERSION__ >= 201112L) || (defined(__cplusplus) && __cplusplus >= 201703L)
1616
#define FLT_DECIMAL_DIG __FLT_DECIMAL_DIG__
1717
#define DBL_DECIMAL_DIG __DBL_DECIMAL_DIG__
1818
#define LDBL_DECIMAL_DIG __LDBL_DECIMAL_DIG__
@@ -64,4 +64,4 @@
6464

6565
#define FLT_ROUNDS ((__fe_cur_env ^ 1) & 3)
6666

67-
#endif
67+
#endif /* _FLOAT_H */

src/libc/include/inttypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
#define SCNxMAX __UINTMAX_FMTx__
166166

167167
#define SCNdPTR __INTPTR_FMTd__
168-
#define SCNiPTR __ INTPTR_FMTi__
168+
#define SCNiPTR __INTPTR_FMTi__
169169
#define SCNoPTR __UINTPTR_FMTo__
170170
#define SCNuPTR __UINTPTR_FMTu__
171171
#define SCNxPTR __UINTPTR_FMTx__

src/libc/include/math.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,4 +301,4 @@ long double truncl(long double);
301301
}
302302
#endif
303303

304-
#endif
304+
#endif /* _MATH_H */

src/libc/include/setjmp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ void longjmp(jmp_buf env, int val) __attribute__((noreturn));
1212

1313
__END_DECLS
1414

15-
#endif
15+
#endif /* _SETJMP_H */

src/libc/include/stdlib.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
#include <cdefs.h>
55

66
typedef struct {
7-
int quot;
8-
int rem;
7+
int quot;
8+
int rem;
99
} div_t;
1010

1111
typedef struct {
12-
long quot;
13-
long rem;
12+
long quot;
13+
long rem;
1414
} ldiv_t;
1515

1616
typedef struct {
17-
long long rem;
18-
long long quot;
17+
long long rem;
18+
long long quot;
1919
} lldiv_t;
2020

2121
#define EXIT_SUCCESS 0

src/libc/include/string.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ void *memmove(void *dest, const void *src, size_t n)
1414
void *memset(void *s, int c, size_t n) __attribute__((nonnull(1)));
1515

1616
int memcmp(const void *s1, const void *s2, size_t n)
17-
__attribute__((nonnull(1, 2)));
17+
__attribute__((nonnull(1, 2)));
1818

1919
void *memchr(const void *s, int c, size_t n) __attribute__((nonnull(1)));
2020

src/libc/include/time.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ typedef unsigned long time_t;
1515
typedef unsigned long clock_t;
1616

1717
struct tm {
18-
int tm_sec;
19-
int tm_min;
20-
int tm_hour;
21-
int tm_mday;
22-
int tm_mon;
23-
int tm_year;
24-
int tm_wday;
25-
int tm_yday;
26-
int tm_isdst;
18+
int tm_sec;
19+
int tm_min;
20+
int tm_hour;
21+
int tm_mday;
22+
int tm_mon;
23+
int tm_year;
24+
int tm_wday;
25+
int tm_yday;
26+
int tm_isdst;
2727
};
2828

2929
__BEGIN_DECLS

src/libcxx/include/cassert

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// -*- C++ -*-
2+
#ifndef _EZCXX_CASSERT
3+
#define _EZCXX_CASSERT
24

35
#include <assert.h>
46

57
#pragma clang system_header
8+
9+
#endif // _EZCXX_CASSERT

src/libcxx/include/cctype

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
namespace std {
1010
using ::isalnum;
1111
using ::isalpha;
12+
using ::isblank;
1213
using ::iscntrl;
1314
using ::isdigit;
1415
using ::isgraph;

0 commit comments

Comments
 (0)