Complete.Org: Mailing Lists: Archives: freeciv-dev: December 1998:
[Freeciv-Dev] Portability Issues
Home

[Freeciv-Dev] Portability Issues

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Portability Issues
From: pedson@xxxxxx
Date: Wed, 9 Dec 1998 09:07:17 -0500 (EST)

Hi,

I thought I would mention the small list of things that I have to
change to make libcivcommon compile on BeOS and some general
modifications in creating the server/client/common.

These are just observations in case they are things that can be
easily adjusted to increase portability.  I'm not making requests
or demands for wholesale changing of code just for me and the
BeOS users :)

This is from the 12/03 sources, but diffs after that don't change
any of these as far as I can tell.

For libcivcommon:

Different pointer types:
packets.c
Line 230: changed buffer to (char *)buffer (from unsigned char*)
Line 241: changed buffer to (char *)buffer

Sockets are not file descriptors on all systems:
packets.c
Line 1480, 1508, 1531, 1532: changed read/write to recv/send

min and max already defined:
city.h
Line 54: commented out min and max defines.  BTW, shared.h already has
MIN and MAX - why are min and max also needed?

Not everyone can/will call the lib from C:
*.h
Have to wrap function prototypes in
#if defined(__cplusplus)
extern "C" {
#endif
yada, yada, yada...

---------

In general (client/server/common):

Not everyone has X11:
I have to create a configure.cache that pretends configure
has already located the correct libraries, so that it doesn't bail
out at XOpenDisplayor XpmReadFileToPixmap. 

These included conflict/don't exist:
arpa/inet.h
sys/uio.h
sys/signal.h

Not having function prototypes for all functions causes warnings.

char[xx] in functions is not MT safe (as opposed to char * and malloc)

--------

Thanks for reading,
Patrick Edson
pedson@xxxxxx


[Prev in Thread] Current Thread [Next in Thread]