Mail Archives: djgpp/1999/11/23/08:55:22
Robert S. Peterson (rpeterson AT kiwi DOT dep DOT anl DOT gov) wrote:
> I've been struggling to compile a SystemRPL developer for a HP48 called.
> 'rpp.exe'. The program compiles cleanly on my Linux OS (Slackware), but for
> obsure reasons I would like to compile under djgpp. Here's the output:
> 1st problem:
> C:\RPP\SRC>make
> gcc -static -Ic:/rpp/src -Ic:/djgpp/include/asm -s -DNDEBUG -O2 -Wall -c
> input.c -o input.o
The '-s' (strip) flag in a *compilation* run of gcc? Are you sure that
makes any sense? Same goes for the '-static' flag: it makes no sense
whatsoever, in DJGPP (it's a no-op, anyway).
> input.c:171: warning: implicit declaration of function `mmap'
> input.c:171: `MAP_PRIVATE' undeclared (first use this function)
> rplcomp.c:458: warning: implicit declaration of function `mmap'
> rplcomp.c:458: `MAP_PRIVATE' undeclared (first use this function)
> rplcomp.c:464: warning: implicit declaration of function `munmap'
The problem is that the program tries to use mmap()/munmap(), a
Unix-only system call to access files in a somewhat peculiar
way. DJGPP has no emulation of this feature, so you can't use it.
Typically, you'll find a #ifdef HAVE_MMAP or similar around those
particular parts of the source, if it was really written to be
portable, originally. Which means you can and should switch off this
flag (in some header file, or via -D/-U in the CFLAGS), and recompile.
If there is no such guarding, then the source is probably not portable
to non-Unix platforms, as is, and you'll have to put in quite some
work if you want to make it work on DJGPP.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -