Skip to contentSkip to conversation

Debug compile fix

PATCH In review maximilian attems 2 participants 4 messages Jul 8, 2010 – Sep 8, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Debug compile fix

No point in tracing a no longer undeclared "ps->cmd", fixes:
jobs.c: In function ‘commandtext’:
jobs.c:1192: error: ‘ps’ undeclared (first use in this function) jobs.c:1192: error: (Each undeclared identifier is reported only once jobs.c:1192: error: for each function it appears in.)

---
 src/jobs.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
src/jobs.c +1 -2
index 060187c..826a9af 100644
@@ -1189,8 +1189,7 @@ commandtext(union node *n)
 	STARTSTACKSTR(cmdnextc);
 	cmdtxt(n);
 	name = stackblock();
-	TRACE(("commandtext: name %p, end %p\n\t\"%s\"\n",
-		name, cmdnextc, ps->cmd));
+	TRACE(("commandtext: name %p, end %p\n", name, cmdnextc));
 	return savestr(name);
 }
 
Signature · 1 line
1.7.1
#1 lore raw

PATCH 2/2 clean up myhistedit.h

fixes debug compilation of klibc:
In file included from usr/dash/eval.c:64:
usr/dash/myhistedit.h:34:22: error: histedit.h: No such file or directory
In file included from usr/dash/eval.c:64:
usr/dash/myhistedit.h:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token usr/dash/myhistedit.h:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__

as none of the History or EditLine seem to have an usage, removed them.

---
 src/myhistedit.h |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
src/myhistedit.h +0 -1
index 22e5c43..4699b34 100644
@@ -31,10 +31,6 @@
  *	@(#)myhistedit.h	8.2 (Berkeley) 5/4/95
  */
 
-#include <histedit.h>
#2 lore raw

Re: [PATCH 2/2] [EVAL] clean up myhistedit.h

Quoted 10 lines · maximilian attems

fixes debug compilation of klibc:
In file included from usr/dash/eval.c:64:
usr/dash/myhistedit.h:34:22: error: histedit.h: No such file or directory
In file included from usr/dash/eval.c:64:
usr/dash/myhistedit.h:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token usr/dash/myhistedit.h:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__

as none of the History or EditLine seem to have an usage, removed them.

Actually this shouldn't happen. myhistedit.h is only included when built without -DSMALL, which means that libedit is present.

Cheers,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#3 lore raw
In reply to maximilian attems
Quoted 7 lines · maximilian attems

No point in tracing a no longer undeclared "ps->cmd", fixes:
jobs.c: In function ‘commandtext’:
jobs.c:1192: error: ‘ps’ undeclared (first use in this function) jobs.c:1192: error: (Each undeclared identifier is reported only once jobs.c:1192: error: for each function it appears in.)

Patch applied. Thanks!

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt