This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch hjl/pr19463 created. glibc-2.22-669-g5728e0c
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 14 Jan 2016 03:11:21 -0000
- Subject: GNU C Library master sources branch hjl/pr19463 created. glibc-2.22-669-g5728e0c
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr19463 has been created
at 5728e0c913fcd9623df94561acc7f0ee5ca1fef5 (commit)
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5728e0c913fcd9623df94561acc7f0ee5ca1fef5
commit 5728e0c913fcd9623df94561acc7f0ee5ca1fef5
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 13 15:03:46 2016 -0800
Avoid strdup/strndup/strsep
diff --git a/include/string.h b/include/string.h
index 2813fb0..8ed54a9 100644
--- a/include/string.h
+++ b/include/string.h
@@ -73,6 +73,12 @@ extern __typeof (strncasecmp_l) __strncasecmp_l;
__new[__len] = '\0'; \
(char *) memcpy (__new, __old, __len); \
}))
+
+# ifdef __OPTIMIZE_SIZE__
+# define strdup(s) __strdup ((s))
+# define strndup(s, n) __strndup ((s), (n))
+# define strsep(s, d) __strsep ((s), (d))
+# endif
#endif
libc_hidden_proto (__mempcpy)
@@ -101,6 +107,7 @@ libc_hidden_proto (memmem)
extern __typeof (memmem) __memmem;
libc_hidden_proto (__memmem)
libc_hidden_proto (__ffs)
+libc_hidden_proto (__strsep)
libc_hidden_builtin_proto (memchr)
libc_hidden_builtin_proto (memcpy)
diff --git a/string/strsep.c b/string/strsep.c
index 1054774..1d98885 100644
--- a/string/strsep.c
+++ b/string/strsep.c
@@ -66,4 +66,5 @@ __strsep (char **stringp, const char *delim)
}
weak_alias (__strsep, strsep)
strong_alias (__strsep, __strsep_g)
+libc_hidden_def (__strsep)
libc_hidden_def (__strsep_g)
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=76d3f84807a890aee1d600c0074d4eb99400c7b1
commit 76d3f84807a890aee1d600c0074d4eb99400c7b1
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 13 14:10:34 2016 -0800
Allow inline in sys/sysmacros.h when building glibc
diff --git a/sysdeps/unix/sysv/linux/sys/sysmacros.h b/sysdeps/unix/sysv/linux/sys/sysmacros.h
index 4c4a697..f9e2696 100644
--- a/sysdeps/unix/sysv/linux/sys/sysmacros.h
+++ b/sysdeps/unix/sysv/linux/sys/sysmacros.h
@@ -34,7 +34,7 @@ extern unsigned long long int gnu_dev_makedev (unsigned int __major,
unsigned int __minor)
__THROW __attribute_const__;
-#ifdef __USE_EXTERN_INLINES
+#if defined __USE_EXTERN_INLINES || defined _LIBC
__extension__ __extern_inline __attribute_const__ unsigned int
__NTH (gnu_dev_major (unsigned long long int __dev))
{
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=63f5376c8e66c4c5b68897a7f1cfad6c42837aa9
commit 63f5376c8e66c4c5b68897a7f1cfad6c42837aa9
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 13 13:31:34 2016 -0800
Include <bits/stdio.h> when building glibc
diff --git a/libio/bits/stdio.h b/libio/bits/stdio.h
index df57e7c..0c60296 100644
--- a/libio/bits/stdio.h
+++ b/libio/bits/stdio.h
@@ -27,7 +27,7 @@
#endif
-#ifdef __USE_EXTERN_INLINES
+#if defined __USE_EXTERN_INLINES || defined _LIBC
/* For -D_FORTIFY_SOURCE{,=2} bits/stdio2.h will define a different
inline. */
# if !(__USE_FORTIFY_LEVEL > 0 && defined __fortify_function)
@@ -138,7 +138,8 @@ __NTH (ferror_unlocked (FILE *__stream))
#endif /* Use extern inlines. */
-#if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__ \
+#if defined __USE_MISC && defined __GNUC__ \
+ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ \
&& !defined __cplusplus
/* Perform some simple optimizations. */
# define fread_unlocked(ptr, size, n, stream) \
diff --git a/libio/stdio.h b/libio/stdio.h
index d8d7fa0..44738a4 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -929,7 +929,7 @@ extern void funlockfile (FILE *__stream) __THROW;
/* If we are compiling with optimizing read this file. It contains
several optimizing inline functions and macros. */
-#ifdef __USE_EXTERN_INLINES
+#if defined __USE_EXTERN_INLINES || defined _LIBC
# include <bits/stdio.h>
#endif
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fbb2dd3c93c6f7d51760b1e51fd36745d3f241ed
commit fbb2dd3c93c6f7d51760b1e51fd36745d3f241ed
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jan 13 17:26:00 2016 -0800
Include <bits/string.h> for -Os build
diff --git a/include/string.h b/include/string.h
index a684fd9..2813fb0 100644
--- a/include/string.h
+++ b/include/string.h
@@ -50,6 +50,11 @@ extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen);
above are defined as macros in the headers. */
#include <string/string.h>
+#ifdef __OPTIMIZE_SIZE__
+/* Get _STRING_ARCH_unaligned. */
+# include <bits/string.h>
+#endif
+
#ifndef _ISOMAC
extern __typeof (strcoll_l) __strcoll_l;
extern __typeof (strxfrm_l) __strxfrm_l;
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources