SunOS4 - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject SunOS4
Date
Msg-id 20010221155258R.t-ishii@sra.co.jp
Whole thread Raw
Responses Re: SunOS4
Re: SunOS4
Re: SunOS4
List pgsql-hackers
I've been working to make PostgreSQL run on SunOS4 (again).

So far I have found following issues:

o c.h 's sunos4 part should not include varargs.h. (Tom has already fixed it) Instead, stdlib.h and stdarg.h should be
included.

o no RAND_MAX or EXIT_FAILURE found. I simply added them to c.h.

o regex/utils.h included twice somewhere. I added #ifndef UTILS_H... to utils.h

o utils/adt/formatting.c rely on sprintf() returns length of formatted strings. This is not true for SunOS4. I have
changedsprintf to snprintf.
 

o SunOS4 does not have strdup, strtoul. --> use backend/port/strtoul.c etc.

o SunOS4 does not have atexit (used in psql). --> igore it

o SunOS4 does not have getopt. --> use utils/getopt.c. also getopt.h need to be created, and checking for getopt is
neededto configure.in.
 

o to make shared library I have added an entry for SunOS4 in Makefile.shlib.

o to make shared libraries (such as libpgeasy.so) relying on libpq, "ld foo.o bar.o ... -L ../libpq -lpq" is executed
butfails. I changed it to:
 
   ld foo.o bar.o ... ../libpq.a
   instead.

o pg_id needs Makefile.in.

included are patched for *7.0.x*. Sould I make same changes to 7.1?
Comments anyone?

pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: beta5 ...
Next
From: Karel Zak
Date:
Subject: Encoding names