tdb fails to build when using gcc3. The problem is that it does not
allow multiple line strings (which seem to be an old K&R thing).
The fix is to quote each line, add \n's where appropiate and
backslashes at the end of all lines. The attached patch fixes it.
Sample patch
Logged In: YES
user_id=671203
I got this error:
/opt/csw/gcc3/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.
-mcpu=v9 -c tdbtool.c
tdbtool.c:172:16: missing terminating " character
tdbtool.c: In function `help':
tdbtool.c:173: error: parse error before "tdbtool"
tdbtool.c:187: error: stray '\' in program
tdbtool.c:187: error: stray '\' in program
tdbtool.c:187:34: warning: multi-character character constant
tdbtool.c:188:1: missing terminating " character
It's this code:
static void help(void)
{
printf("
tdbtool:
create dbname : create a database
open dbname : open an existing database
erase : erase the database
dump dumpname : dump the database as strings
insert key data : insert a record
store key data : store a record (replace)
show key : show a record by key
delete key : delete a record by key
list : print the database hash table and
freelist
free : print the database freelist
1 | first : print the first record
n | next : print the next record
q | quit : terminate
\\n : repeat 'next' command
");
}
Same problem? It does compile if i remove that code.