summary refs log tree commit diff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2005-10-29 21:47:28 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2005-10-29 21:47:28 +1000
commit5dd1a08bdc21aa9477a5d91fe309e8c2639bfc46 (patch)
tree5c1df51b44d4f9ef5c3a8bf56039568e7bb71a8b
parent[SYSTEM] Added dummy sysconf implementation (diff)
downloaddash-5dd1a08bdc21aa9477a5d91fe309e8c2639bfc46.tar.gz
dash-5dd1a08bdc21aa9477a5d91fe309e8c2639bfc46.zip
[SYSTEM] Include system.h for stpcpy in nodes.c
Since we have a fallback implementation for stpcpy we can now use it
unconditionally in nodes.c.pat.  This also fixes a link error with
klibc.
-rw-r--r--ChangeLog1
-rw-r--r--src/nodes.c.pat12
2 files changed, 2 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index df38cf6..9edac6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@
 	* Added dummy strtod implementation.
 	* Removed standalone/csh support from test.
 	* Added dummy sysconf implementation.
+	* Include system.h for stpcpy in nodes.c.
 
 2005-10-26  Herbert Xu <herbert@gondor.apana.org.au>
 
diff --git a/src/nodes.c.pat b/src/nodes.c.pat
index c5d3562..9125bc7 100644
--- a/src/nodes.c.pat
+++ b/src/nodes.c.pat
@@ -44,6 +44,7 @@
 #include "memalloc.h"
 #include "machdep.h"
 #include "mystring.h"
+#include "system.h"
 
 
 int     funcblocksize;		/* size of structures in function */
@@ -145,21 +146,10 @@ STATIC char *
 nodesavestr(s)
 	char   *s;
 {
-#ifdef _GNU_SOURCE
 	char   *rtn = funcstring;
 
 	funcstring = stpcpy(funcstring, s) + 1;
 	return rtn;
-#else
-	register char *p = s;
-	register char *q = funcstring;
-	char   *rtn = funcstring;
-
-	while ((*q++ = *p++) != '\0')
-		continue;
-	funcstring = q;
-	return rtn;
-#endif
 }
 
 
e14ca18dfe5e9b8a00a&follow=1'>Split fields by tab onlyJune McEnroe 2021-01-12List both Makefile and html.sh under README.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe 2021-01-09Add c -t flag to print expression typeJune McEnroe 2021-01-05Update taglineJune McEnroe