From: "Edmund Horner" Newsgroups: comp.os.msdos.djgpp References: <003f01c03608$472020a0$0500a8c0 AT brk> Subject: Re: DJGPP <--> Linux portability Lines: 65 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Organization: Paradise Net Message-ID: <971580286.527904@shelley.paradise.net.nz> Cache-Post-Path: shelley.paradise.net.nz!unknown AT 203-96-154-184 DOT tnt7 DOT paradise DOT net DOT nz X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) Date: Sun, 15 Oct 2000 16:25:24 +1300 NNTP-Posting-Host: 203.96.152.26 X-Complaints-To: newsadmin AT xtra DOT co DOT nz X-Trace: news.xtra.co.nz 971580287 203.96.152.26 (Sun, 15 Oct 2000 16:24:47 NZDT) NNTP-Posting-Date: Sun, 15 Oct 2000 16:24:47 NZDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Do you use the more POSIX-ish functions directly, or do you have your own abstraction layer (via. wrapper functions or #defines) to make portable programs? "Johan Henriksson" wrote in message news:003f01c03608$472020a0$0500a8c0 AT brk... > > from: Johan Henriksson, leadprogrammer @ www.realsoftware.cjb.net > "It is not the length of life that counts but what you make out of it" - me > -------------------------------------------------------------------------- -- > ------------ > >Hi all. > > > >Warning: these questions may appear slightly OT. > OT questions are usually most interesting of some reason :/ > > >I have been experimenting in compiling my DJGPP-intended programs using gcc > >in Linux. Unfortunately I'm having lots of trouble (this is not alleviated > >by the fact that I'm not Linux-adept). > > > >1. I have a disquieting feeling that doing graphics stuff in Linux is > >tricky. For example when I try to run the examples that come with the > >Allegro WIP, I get errors about Mode-X (this only happens for some of the > > I don't know if all funny Mode-X-stuff is supported on Linux. I don't think > so. > > >examples). Does a program need to do stuff with permissions in order to > >change video mode, or something? > Depends. This question should have been send to the Allegro mailinglist. > For X (I think your programs should run in X), you can do w/o. But to > access DGA, you need root-permissions. > > > >2. Backslash-newlines, which i use occassionally for the more complicated > >#defines, aren't recognised by cpp, apparently because of the CRLF problem. > >Is there a simple way I can get around this? I'd like to be able to > compile > >the same sources that I edit with RHIDE in dos. > > You're kidding??? I've never got this problem. Either try upgrading or > use the utod/dtou-utilities > > >3. Lots of functions I use often in DJGPP, usually in connection with > files, > >simply don't exist in the linux library. (But I can get around this by > >using more complicated things like fstat().) Still, the question > remains... > > Simple solution: Don't use such functions. My games work in both Win32, > X, Dos, Windows & BeOS simply because I make as little use of LibC > as possible. > And yes, you have to live with more advanced functions. itoa() doesn't exist > either > so you have to sprintf() >