Some additions/#ifdefs to target new OS NetWare

Поиск
Список
Период
Сортировка
От Ulrich Neumann
Тема Some additions/#ifdefs to target new OS NetWare
Дата
Msg-id a5vupn$r3o$1@jupiter.hub.org
обсуждение исходный текст
Ответы Re: Some additions/#ifdefs to target new OS NetWare  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello,

I am working on the port of PostgreSQL to NetWare.

During my work i�ve found the following that need to be added to
the sources in order to compile postgreSQL on NetWare. There
may be some more changes i�ve not seen until today, but if so
i�ll 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
(initializationof 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_NLMbuf = (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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: Re: Please, apply patch for contrib/tsearch
Следующее
От: Oleg Bartunov
Дата:
Сообщение: min,max aggregate functions