[강좌] 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
약하다구요..-.-;
  이 름  암 호  보안코드  
번호작성자날짜조회제    목
677onion2007-05-216315   랩소디 삽질끝..하지만... (7)
676onion2007-05-146974   해킨토시..포기... (10)
675onion2007-05-074778   안열려서 놀랐습니다... (2)
674capri912007-05-02110989   [개발] Naver Dictionary Widget v3.7 (174)
673LineRoh2007-05-0115124   편집 앨범이란 무엇인가 (7)
672onion2007-04-274230   감사합니다..~.~ (2)
671LineRoh2007-04-224380   NEXTSTEP 표기법, 간단히 살을 붙이자면... (7)
670capri912007-04-195887   [강좌] NeXTSTEP Porting Tips (3)
669capri912007-04-1918426   [강좌] License Strings for NeXTSTEP Applications (2)
668onion2007-03-174632   성한사마.. 부탁이 있습니다... (15)
667LineRoh2007-03-105041   번개 후기 (2)
666LineRoh2007-03-074793   [알림] 번개 공지 (7)
665서지환2007-03-074470   위안부 관련 일본 사과에 대한 CNN 투표에서
664김두호2007-03-076503   넥스트큐브 하드교체 및 OS 빌드 문의 (2)
663다모토리2007-03-0718209   [드립니다]ibm 넷피니티 kb-7953 블랙+아론 A106 기계식 블랙 (13)
[≪] [<] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [>] [≫]