mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-21 19:35:28 -05:00
libiberty, gcc: Add memrchr to libiberty and use it [PR119283].
This adds an implementation of memrchr to libiberty and arranges to configure gcc to use it, if the host does not have it. PR cobol/119283 gcc/ChangeLog: * config.in: Regenerate. * configure: Regenerate. * configure.ac: Check for host memrchr. include/ChangeLog: * libiberty.h (memrchr): New. libiberty/ChangeLog: * Makefile.in: Add memrchr build rules. * config.in: Regenerate. * configure: Regenerate. * configure.ac: Check for memrchr. * functions.texi: Document memrchr. * memrchr.c: New file. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
This commit is contained in:
@@ -215,6 +215,16 @@ extern int ffs(int);
|
||||
extern int mkstemps(char *, int);
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_DECL_MKSTEMPS) && !HAVE_DECL_MKSTEMPS
|
||||
extern int mkstemps(char *, int);
|
||||
#endif
|
||||
|
||||
/* Make memrchr available on systems that do not have it. */
|
||||
#if !defined (__GNU_LIBRARY__ ) && !defined (__linux__) && \
|
||||
!defined (HAVE_MEMRCHR)
|
||||
extern void *memrchr(const void *, int, size_t);
|
||||
#endif
|
||||
|
||||
/* Get the working directory. The result is cached, so don't call
|
||||
chdir() between calls to getpwd(). */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user