Skip to content

Commit d62548a

Browse files
committed
tune some visibility
1 parent 01bf1e1 commit d62548a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

include/string.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ typedef __size_t size_t;
5252
#endif
5353

5454
__BEGIN_DECLS
55-
#if __XSI_VISIBLE >= 600
55+
#if __XSI_VISIBLE >= 600 || __ISO_C_VISIBLE >= 2023
5656
void *memccpy(void * __restrict, const void * __restrict, int, size_t);
5757
#endif
5858
void *memchr(const void *, int, size_t) __pure;
@@ -86,7 +86,7 @@ int strcmp(const char *, const char *) __pure;
8686
int strcoll(const char *, const char *);
8787
char *strcpy(char * __restrict, const char * __restrict);
8888
size_t strcspn(const char *, const char *) __pure;
89-
#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
89+
#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE || __ISO_C_VISIBLE >= 2023
9090
char *strdup(const char *) __malloc_like;
9191
#endif
9292
char *strerror(int);
@@ -104,8 +104,10 @@ void strmode(int, char *);
104104
char *strncat(char * __restrict, const char * __restrict, size_t);
105105
int strncmp(const char *, const char *, size_t) __pure;
106106
char *strncpy(char * __restrict, const char * __restrict, size_t);
107-
#if __POSIX_VISIBLE >= 200809
107+
#if __POSIX_VISIBLE >= 200809 || __ISO_C_VISIBLE >= 2023
108108
char *strndup(const char *, size_t) __malloc_like;
109+
#endif
110+
#if __POSIX_VISIBLE >= 200809
109111
size_t strnlen(const char *, size_t) __pure;
110112
#endif
111113
#if __BSD_VISIBLE

include/time.h

+2
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ int clock_nanosleep(clockid_t, int, const struct timespec *, struct timespec *);
157157
#if __POSIX_VISIBLE >= 199506
158158
char *asctime_r(const struct tm *, char *);
159159
char *ctime_r(const time_t *, char *);
160+
#endif
161+
#if __POSIX_VISIBLE >= 199506 || __ISO_C_VISIBLE >= 2023
160162
struct tm *gmtime_r(const time_t *, struct tm *);
161163
struct tm *localtime_r(const time_t *, struct tm *);
162164
#endif

0 commit comments

Comments
 (0)