Some additions/#ifdefs to target new OS NetWare

From: Ulrich Neumann <u_neumann(at)gne(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Some additions/#ifdefs to target new OS NetWare
Date: 2002-03-04 13:02:00
Message-ID: a5vupn$r3o$1@jupiter.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

I am working on the port of PostgreSQL to NetWare.

During my work ive found the following that need to be added to
the sources in order to compile postgreSQL on NetWare. There
may be some more changes ive not seen until today, but if so
ill post the upcomping issues here.

1. The following additions to main.c:
#ifdef N_PLAT_NLM
/* NetWare-specific actions on startup */
NWInit();
#endif /* N_PLAT_NLM */

and

#if !defined(__BEOS__) && !defined(N_PLAT_NLM)
if (geteuid() == 0)
{
...

2. in bootstrap.c/cleanup()
static void
cleanup()
{
static int beenhere = 0;

if (!beenhere)
beenhere = 1;
else
{
elog(FATAL, "Memory manager fault: cleanup called twice.\n");
proc_exit(1);
}
if (reldesc != (Relation) NULL)
heap_close(reldesc, NoLock);
CommitTransactionCommand();

#ifdef N_PLAT_NLM
NWCleanUp();
#endif

proc_exit(Warnings);
}

3. in xlog.c
#if !defined(__BEOS__) && !defined(N_PLAT_NLM)
if (link(tmppath, path) < 0)
elog(STOP, "link from %s to %s (initialization of log file %u, segment %u) failed: %m",
tmppath, path, log, seg);
unlink(tmppath);

4. in fd.c/filepath()
static char *
filepath(const char *filename)
{
char *buf;

#ifdef N_PLAT_NLM
buf = (char *) palloc(strlen(filename) + 1);
strcpy(buf, filename);
#else
/* Not an absolute path name? Then fill in with database path... */
if (*filename != '/')
{
...

5. in dfmgr.c/load_external_function()
#ifdef N_PLAT_NLM
file_scanner->handle = dlopen(filename, RTLD_LAZY);
#else
file_scanner->handle = pg_dlopen(filename);
#endif

6. in datetime.h
#if !defined(__CYGWIN__) && !defined(N_PLAT_NLM)
#define TIMEZONE_GLOBAL timezone
#else
#define TIMEZONE_GLOBAL _timezone
#endif

7. in dynamic_loader.h
#ifndef N_PLAT_NLM
extern void *pg_dlopen(char *filename);
extern PGFunction pg_dlsym(void *handle, char *funcname);
extern void pg_dlclose(void *handle);
extern char *pg_dlerror(void);
#endif

8. a directory backend/port/netware for some OS specific files I want to maintain.
Please give me some information how I can get access to such a directory and how
I can check in files to this directory. If you have another way please let me know.

As you see these are only some simple #ifdefs that need to be added to the code.

best regards

Ulrich Neumann
Novell Worldwide Developer Support

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ulrich Neumann 2002-03-04 14:58:00 Re: Some additions/#ifdefs to target new OS NetWare
Previous Message Teodor Sigaev 2002-03-04 11:10:22 Re: Please, apply patch for contrib/tsearch