Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2015-07-06 22:58:51 +0300
committerYaakov Selkowitz <yselkowi@redhat.com>2015-07-06 22:58:51 +0300
commit79e419de6261c4e04785908828096cb4d56b8680 (patch)
tree72f17165f0acb9ad42eb45c801acfd7624570c5c /newlib/ChangeLog
parentf9b87aaf109366342777521fe93fe9f795e8f1fa (diff)
Rework handling of basename variants
As a commonly-included header, the #define basename in <string.h> can affect code which uses "basename" for its own purposes (e.g. struct members or C++ namespaced functions). When such cases occur and some code includes <string.h> and some not, then errors result. OTOH, <libgen.h> is rarely used, and that's where the renaming occurs in glibc, so code using <libgen.h> should already be safe. * libc/include/libgen.h (basename): Define as __xpg_basename for source compatibility with glibc. Declare with __ASMNAME("basename") for ABI compatibility. * libc/include/string.h (basename): Define as basename for source compatibility with glibc. Declare with __ASMNAME("__gnu_basename") for ABI compatibility.
Diffstat (limited to 'newlib/ChangeLog')
-rw-r--r--newlib/ChangeLog9
1 files changed, 9 insertions, 0 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 994f1ca0e..24a6c9c58 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,12 @@
+2015-07-06 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * libc/include/libgen.h (basename): Define as __xpg_basename
+ for source compatibility with glibc.
+ Declare with __ASMNAME("basename") for ABI compatibility.
+ * libc/include/string.h (basename): Define as basename for
+ source compatibility with glibc.
+ Declare with __ASMNAME("__gnu_basename") for ABI compatibility.
+
2015-07-06 Corinna Vinschen <corinna@vinschen.de>
* libc/include/sys/time.h: Explicitely include sys/cdefs.h.