Skip to contentSkip to conversation

dash klibc DEBUG compile question

DISCUSSION maximilian attems 2 participants 2 messages Sep 9, 2010

lore
Share & tools
lore
#0 lore raw

now with the proper flags passed and the jobs.c fix dash allmost compiles in DEBUG mode, the last two failures happen in show.c, which assumes some buffering functions that klibc doesn't provide:
usr/dash/show.o: In function `opentrace':
show.c:(.text+0x36): undefined reference to freopen' show.c:(.text+0x86): undefined reference to setlinebuf'

afais this code dates from the initial git import. any preferences on how to fix those Herbert?

Signature · 1 line
maks
#1 lore raw
Quoted 10 lines · maximilian attems

now with the proper flags passed and the jobs.c fix dash allmost compiles in DEBUG mode, the last two failures happen in show.c, which assumes some buffering functions that klibc doesn't provide:
usr/dash/show.o: In function `opentrace':
show.c:(.text+0x36): undefined reference to freopen' show.c:(.text+0x86): undefined reference to setlinebuf'

afais this code dates from the initial git import. any preferences on how to fix those Herbert?

setlinebuf is easy I guess if klibc doesn't do buffering. You can just skip it.

freopen is trickier. However, it's only needed if you enable history. So I guess you could put it inside ifndef SMALL and use fclose/fopen when not using history support.

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