Date: Tue, 19 Dec 1995 13:14:52 +0100 To: djgpp AT sun DOT soe DOT clarkson DOT edu From: Anton Helm Subject: Porting C-programs from DJGPP to UNIX Porting C-programs from DJGPP to UNIX (Yes I do, don't ask why...) I would like to ask some questions about programs that should compile and run on both platforms: 1) I use lots of FLEX/BISON scanners/parsers in my programs. How to tell FLEX that it has to read both UNIX and DOS style textfiles (on both platforms, e.g read DOS files on a UNIX host) ? 2) I need to use umask() for the UNIX part. DJGPP has a umask() too, but it is not documented. What does umask() in DJGPP ? 3) Is there an easy (!) way to make kbhit() and getkey() available under UNIX ? 4) I already have a C-function which simulates spawnlp() on UNIX, but it requires a lot of #if conditionals. Any hints for a more portable spawnlp() ? I'm using DJGPP 1.12m4 (GCC 2.6.3, BISON 1.22 FLEX 2.4.7). Thanks to all for your replies. I try to post a summary of all answers. Regards, Tony *************************************************************************** Dipl.-Ing. Anton HELM * mailto:tony AT nt DOT tuwien DOT ac DOT at Institut fuer Nachrichtentechnik * http://dictator.nt.tuwien.ac.at/~tony/ und Hochfrequenztechnik * http://www.tuwien.ac.at/nthft/ Guszhausstr. 25/389 * phoneto:+43-1-58801-3520 A-1040 Wien, AUSTRIA * faxto:+43-1-5870583 ***************************************************************************