X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: Unresolved externals. Date: 2 Jan 2002 15:14:22 GMT Organization: Aachen University of Technology (RWTH) Lines: 25 Message-ID: References: NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1009984462 11053 137.226.32.75 (2 Jan 2002 15:14:22 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 2 Jan 2002 15:14:22 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com HARY wrote: > Now I can link this program with: 'Dlstat=stat -Dsetegid=setgid > --Dseteuid=setuid' options. > But I've never before tried to port UNIX program to DOS. Is it > preferred method or should I do it in another way? The original program is somewhat unportable as it is --- segegid and seteuid are BSD'ism. They may be widely available on non-BSD Unixes, but no portable program should blindly assume they're there. The canonical GNU method would be to add autoconf code such that 'configure' detects the presence of these functions, and then you wrap all usages of it like this: #if HAVE_SETEGID /* use it */ #else /* solve the task in some other way */ #endif -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.