[강좌] NeXTSTEP Porting Tips
이름: capri91 [수정] 2007-04-19 23:46:45
General Porting Tips

While porting many UNIX-progs to NeXTstep, I stumbled over some nasty but solveable problems:

cc: Internal compiler error: program cc1obj got fatal signal 11
I found three memory related solutions so far:
-> turn off Optimization (-Ox) ...or...
-> turn off Debug (-g) ...or...
-> limit stacksize 10000 (before make)

foo.h:247: macro `index' used with just one arg
#undef index (index is already defined in string.h!)

foo.c:1234: bad macro argument list
-> add --traditional-cpp to CFLAGS

ld: Undefined symbols: _strdup
-> gcc -o foo bar.o -lstdc++ ...or...
-> gcc -o foo bar.o -liberty

ld: Undefined symbols: _mkfifo
-> mknod(path, S_IFIFO|mode, 0);

undefined type, found `pid_t'
typedef int pid_t;

POSIX (not recommend):
-> gcc -posix ... -lposix


Functions and their Replacements

getcwd 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>.

waitpid can be implemented as a macro, using one of the BSD waitN functions, e.g.,
#define waitpid(p, s, o)  wait3((union wait *)(s), (o), (struct rusage *) 0)

NeXTstep 3.3 does not have uname.

Functions
[ basename.c | getcwd.c | getschr.c | mmap.c | putenv.c | setenv.c | sp_offset.c | strdup.c | tcgetattr.c | tempnam.c | tempname.c | termios.c ]

POSIX-binaries
On a black NeXT you can use otool, to get some working functions out of libposix.a, e.g.
[ sigaction.o | sigsetops.o ]

출처: http://www.drolls.de/NeXT/Porting.html, http://www.math.unl.edu/~rdieter/OpenStep/Developer/PortingTips/
이름: onion[삭제] [수정] 2007-04-23 11:36:48
흑...영어......T.T
이름: capri91[삭제] [수정] 2007-04-23 12:54:17
갑자기 약한 척 하시기는... ^^;
이름: onion[삭제] [수정] 2007-04-24 07:16:24
약하다구요..-.-;
  이 름  암 호  보안코드  
번호작성자날짜조회제    목
662capri912007-04-195886   [강좌] NeXTSTEP Porting Tips (3)
661capri912007-04-1918425   [강좌] License Strings for NeXTSTEP Applications (2)
660onion2007-03-174631   성한사마.. 부탁이 있습니다... (15)
659LineRoh2007-03-105040   번개 후기 (2)
658LineRoh2007-03-074792   [알림] 번개 공지 (7)
657다모토리2007-03-0718208   [드립니다]ibm 넷피니티 kb-7953 블랙+아론 A106 기계식 블랙 (13)
656서지환2007-03-074469   위안부 관련 일본 사과에 대한 CNN 투표에서
655김두호2007-03-076502   넥스트큐브 하드교체 및 OS 빌드 문의 (2)
654김진수2007-03-044151   성한사마, 집에 서 어떤 장비쓰시나요 ? (7)
653동성...2007-03-058585   NeXTSTEP 써 보려면.. (3)
652서지환2007-03-065154   NextStation Color Turbo 판매 (3)
651김진수2007-03-044367   [드립니다] 집에 있는 소소한 것들 정리 (8)
650다모토리2007-02-084834   NeXT 벙개공지 (14)
649nonuke2007-02-234315   연락못혀서 미안하다... (6)
648비주류2007-02-216234   NeXTSTEP 설치해 봤습니다^^ (3)
[≪] [<] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [>] [≫]