Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Add version info for C++ versions of basename, strchrnul.
Browse files Browse the repository at this point in the history
These still won't get guards added by the preprocessor, because it
compiles with C-only.

Bug: android/ndk#440
Test: treehugger
Change-Id: I893b345e528ed1b761e0db00700037411bbb8b78
  • Loading branch information
jmgao committed Jun 30, 2017
1 parent 291e895 commit 16d9ba8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libc/include/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ char* strchr(const char* _Nonnull, int) __attribute_pure__ __overloadable
char* __strchr_chk(const char* _Nonnull, int, size_t) __INTRODUCED_IN(18);
#if defined(__USE_GNU)
#if defined(__cplusplus)
extern "C++" char* strchrnul(char* _Nonnull, int) __RENAME(strchrnul) __attribute_pure__;
extern "C++" const char* strchrnul(const char* _Nonnull, int) __RENAME(strchrnul) __attribute_pure__;
extern "C++" char* strchrnul(char* _Nonnull, int) __RENAME(strchrnul) __attribute_pure__ __INTRODUCED_IN(24);
extern "C++" const char* strchrnul(const char* _Nonnull, int) __RENAME(strchrnul) __attribute_pure__ __INTRODUCED_IN(24);
#else
char* strchrnul(const char* _Nonnull, int) __attribute_pure__ __INTRODUCED_IN(24);
#endif
Expand Down Expand Up @@ -142,8 +142,8 @@ size_t strxfrm_l(char* __restrict, const char* _Nonnull __restrict, size_t, loca
* It doesn't modify its argument, and in C++ it's const-correct.
*/
#if defined(__cplusplus)
extern "C++" char* basename(char* _Nonnull) __RENAME(__gnu_basename);
extern "C++" const char* basename(const char* _Nonnull) __RENAME(__gnu_basename);
extern "C++" char* basename(char* _Nonnull) __RENAME(__gnu_basename) __INTRODUCED_IN(23);
extern "C++" const char* basename(const char* _Nonnull) __RENAME(__gnu_basename) __INTRODUCED_IN(23);
#else
char* basename(const char* _Nonnull) __RENAME(__gnu_basename) __INTRODUCED_IN(23);
#endif
Expand Down

0 comments on commit 16d9ba8

Please # to comment.