mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 14:23:04 +00:00
* src/system.h: We don't need nor want bcopy.
Throw away MS-DOS crap: we don't need getpid. * configure.in: We don't need strndup. It was even causing problems: because Flex includes the headers *before* us, _GNU_SOURCE is not defined by config.h, and therefore strndup was not visible. * lib/xstrndup.c: New. * src/scan-skel.l: Use it. Be sure to initialize yylval.muscle member when scanning a MUSCLE. * src/parse-skel.y: Use %directives instead of #defines.
This commit is contained in:
18
src/system.h
18
src/system.h
@@ -26,16 +26,6 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef MSDOS
|
||||
# include <io.h>
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# include <stdlib.h>
|
||||
# include <process.h>
|
||||
# define getpid _getpid
|
||||
#endif
|
||||
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
@@ -62,9 +52,6 @@
|
||||
# if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
|
||||
# include <memory.h>
|
||||
# endif /* not STDC_HEADERS and HAVE_MEMORY_H */
|
||||
# ifndef bcopy
|
||||
# define bcopy(src, dst, num) memcpy((dst), (src), (num))
|
||||
# endif
|
||||
#else /* not STDC_HEADERS and not HAVE_STRING_H */
|
||||
# include <strings.h>
|
||||
/* memory.h and strings.h conflict on some systems. */
|
||||
@@ -102,6 +89,9 @@ char *alloca ();
|
||||
|
||||
# include "xalloc.h"
|
||||
|
||||
/* From xstrndup.c. */
|
||||
char *xstrndup PARAMS ((const char *s, size_t n));
|
||||
|
||||
/*---------------------.
|
||||
| Missing prototypes. |
|
||||
`---------------------*/
|
||||
@@ -319,4 +309,4 @@ do { \
|
||||
# include <dmalloc.h>
|
||||
# endif /* WITH_DMALLOC */
|
||||
|
||||
#endif /* BISON_SYSTEM_H */
|
||||
#endif /* ! BISON_SYSTEM_H */
|
||||
|
||||
Reference in New Issue
Block a user