<br>While porting many UNIX-progs to NeXTstep, I stumbled over some nasty but solveable problems:
<br>
<br><b>cc: Internal compiler error: program cc1obj got fatal signal 11</b>
<br>I found three memory related solutions so far:
<br>-> turn off Optimization (-Ox) ...or...
<br>-> turn off Debug (-g) ...or...
<br>-> limit stacksize 10000 (before make)
<br>
<br><b>foo.h:247: macro `index' used with just one arg</b>
<br>#undef index (index is already defined in string.h!)
<br>
<br><b>foo.c:1234: bad macro argument list</b>
<br>-> add --traditional-cpp to CFLAGS
<br>
<br><b>ld: Undefined symbols: _strdup</b>
<br>-> gcc -o foo bar.o -lstdc++ ...or...
<br>-> gcc -o foo bar.o -liberty
<br>
<br><b>ld: Undefined symbols: _mkfifo</b>
<br>-> mknod(path, S_IFIFO|mode, 0);
<br>
<br><b>undefined type, found `pid_t'</b>
<br>typedef int pid_t;
<br>
<br><b>POSIX (not recommend):</b>
<br>-> gcc -posix ... -lposix
<br>
<br>
<br><b><font size=+2>Functions and their Replacements</font></b>
<br>
<br><b>getcwd</b> can be replaced by the BSD-command getwd(pathname). The pathnames length must not be longer then MAXPATHLEN characters (1024), as defined in <sys/param.h>.
<br>
<br><b>waitpid</b> can be implemented as a macro, using one of the BSD waitN functions, e.g.,