summaryrefslogtreecommitdiffstats
path: root/include/public/base
diff options
context:
space:
mode:
authorcvsadm <cvsadm>2005-01-21 00:44:34 +0000
committercvsadm <cvsadm>2005-01-21 00:44:34 +0000
commitb2093e3016027d6b5cf06b3f91f30769bfc099e2 (patch)
treecf58939393a9032182c4fbc4441164a9456e82f8 /include/public/base
downloadds-b2093e3016027d6b5cf06b3f91f30769bfc099e2.tar.gz
ds-b2093e3016027d6b5cf06b3f91f30769bfc099e2.tar.xz
ds-b2093e3016027d6b5cf06b3f91f30769bfc099e2.zip
Moving NSCP Directory Server from DirectoryBranch to TRUNK, initial drop. (foxworth)ldapserver7x
Diffstat (limited to 'include/public/base')
-rw-r--r--include/public/base/Makefile40
-rw-r--r--include/public/base/crit.h21
-rw-r--r--include/public/base/ereport.h21
-rw-r--r--include/public/base/file.h21
-rw-r--r--include/public/base/pool.h22
-rw-r--r--include/public/base/shexp.h22
-rw-r--r--include/public/base/systems.h242
-rw-r--r--include/public/base/systhr.h21
-rw-r--r--include/public/base/util.h21
9 files changed, 431 insertions, 0 deletions
diff --git a/include/public/base/Makefile b/include/public/base/Makefile
new file mode 100644
index 00000000..15fa95e3
--- /dev/null
+++ b/include/public/base/Makefile
@@ -0,0 +1,40 @@
+#
+# BEGIN COPYRIGHT BLOCK
+# Copyright 2001 Sun Microsystems, Inc.
+# Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+#
+# Makefile for netsite.h
+
+MCOM_ROOT = ../../../..
+MODULE=netsiteIncludeBase
+
+include ../../../nsdefs.mk
+
+HDRDEST=$(OBJDIR)/include/base
+
+PREFIX=../../copyrght.h
+
+
+NOSTDSTRIP=true
+NOSTDDEPEND=true
+
+#HDRS=$(wildcard *.h)
+HDRS=daemon.h cinfo.h crit.h ereport.h buffer.h net.h pblock.h sem.h session.h shexp.h shmem.h systhr.h util.h file.h pool.h regexp.h systems.h
+
+
+BINS=$(addprefix $(HDRDEST)/,$(HDRS))
+
+all: $(HDRDEST) $(BINS)
+
+$(HDRDEST):
+ mkdir -p $(HDRDEST)
+
+strip:
+depend:
+
+include ../../../nsconfig.mk
+
+$(HDRDEST)/%.h: %.h
+ cat $(PREFIX) $< > $(HDRDEST)/$*.h
diff --git a/include/public/base/crit.h b/include/public/base/crit.h
new file mode 100644
index 00000000..bca8c839
--- /dev/null
+++ b/include/public/base/crit.h
@@ -0,0 +1,21 @@
+/** BEGIN COPYRIGHT BLOCK
+ * Copyright 2001 Sun Microsystems, Inc.
+ * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
+ * All rights reserved.
+ * END COPYRIGHT BLOCK **/
+#ifndef PUBLIC_BASE_CRIT_H
+#define PUBLIC_BASE_CRIT_H
+
+/*
+ * File: crit.h
+ *
+ * Description:
+ *
+ * Deprecated include file.
+ */
+
+#ifndef PUBLIC_NSAPI_H
+#include "../nsapi.h"
+#endif /* !PUBLIC_NSAPI_H */
+
+#endif /* !PUBLIC_BASE_CRIT_H */
diff --git a/include/public/base/ereport.h b/include/public/base/ereport.h
new file mode 100644
index 00000000..742d77ea
--- /dev/null
+++ b/include/public/base/ereport.h
@@ -0,0 +1,21 @@
+/** BEGIN COPYRIGHT BLOCK
+ * Copyright 2001 Sun Microsystems, Inc.
+ * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
+ * All rights reserved.
+ * END COPYRIGHT BLOCK **/
+#ifndef PUBLIC_BASE_EREPORT_H
+#define PUBLIC_BASE_EREPORT_H
+
+/*
+ * File: ereport.h
+ *
+ * Description:
+ *
+ * Deprecated include file.
+ */
+
+#ifndef PUBLIC_NSAPI_H
+#include "../nsapi.h"
+#endif /* !PUBLIC_NSAPI_H */
+
+#endif /* !PUBLIC_BASE_EREPORT_H */
diff --git a/include/public/base/file.h b/include/public/base/file.h
new file mode 100644
index 00000000..73312bd2
--- /dev/null
+++ b/include/public/base/file.h
@@ -0,0 +1,21 @@
+/** BEGIN COPYRIGHT BLOCK
+ * Copyright 2001 Sun Microsystems, Inc.
+ * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
+ * All rights reserved.
+ * END COPYRIGHT BLOCK **/
+#ifndef PUBLIC_BASE_FILE_H
+#define PUBLIC_BASE_FILE_H
+
+/*
+ * File: file.h
+ *
+ * Description:
+ *
+ * Deprecated include file.
+ */
+
+#ifndef PUBLIC_NSAPI_H
+#include "../nsapi.h"
+#endif /* !PUBLIC_NSAPI_H */
+
+#endif /* !PUBLIC_BASE_FILE_H */
diff --git a/include/public/base/pool.h b/include/public/base/pool.h
new file mode 100644
index 00000000..9480d7c6
--- /dev/null
+++ b/include/public/base/pool.h
@@ -0,0 +1,22 @@
+/** BEGIN COPYRIGHT BLOCK
+ * Copyright 2001 Sun Microsystems, Inc.
+ * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
+ * All rights reserved.
+ * END COPYRIGHT BLOCK **/
+#ifndef PUBLIC_BASE_POOL_H
+#define PUBLIC_BASE_POOL_H
+
+/*
+ * File: pool.h
+ *
+ * Description:
+ *
+ * Deprecated include file.
+ */
+
+#ifndef PUBLIC_NSAPI_H
+#include "../nsapi.h"
+#endif /* !PUBLIC_NSAPI_H */
+
+#endif /* !PUBLIC_BASE_POOL_H */
+
diff --git a/include/public/base/shexp.h b/include/public/base/shexp.h
new file mode 100644
index 00000000..dd7acf9b
--- /dev/null
+++ b/include/public/base/shexp.h
@@ -0,0 +1,22 @@
+/** BEGIN COPYRIGHT BLOCK
+ * Copyright 2001 Sun Microsystems, Inc.
+ * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
+ * All rights reserved.
+ * END COPYRIGHT BLOCK **/
+#ifndef PUBLIC_BASE_SHEXP_H
+#define PUBLIC_BASE_SHEXP_H
+
+/*
+ * File: shexp.h
+ *
+ * Description:
+ *
+ * Deprecated include file.
+ */
+
+#ifndef PUBLIC_NSAPI_H
+#include "../nsapi.h"
+#endif /* !PUBLIC_NSAPI_H */
+
+#endif /* !PUBLIC_BASE_SHEXP_H */
+
diff --git a/include/public/base/systems.h b/include/public/base/systems.h
new file mode 100644
index 00000000..51be7bcd
--- /dev/null
+++ b/include/public/base/systems.h
@@ -0,0 +1,242 @@
+/** BEGIN COPYRIGHT BLOCK
+ * Copyright 2001 Sun Microsystems, Inc.
+ * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
+ * All rights reserved.
+ * END COPYRIGHT BLOCK **/
+#ifndef PUBLIC_BASE_SYSTEMS_H
+#define PUBLIC_BASE_SYSTEMS_H
+
+/*
+ * File: systems.h
+ *
+ * Description:
+ *
+ * This file defines various platform-dependent symbols, which are
+ * used to configure platform-dependent aspects of the API.
+ */
+
+/* --- Begin native platform configuration definitions --- */
+
+#if defined(AIX)
+
+#define FILE_UNIX
+#define FILE_UNIX_MMAP
+#define MALLOC_POOLS
+#define SEM_FLOCK
+#define SHMEM_UNIX_MMAP
+#define ZERO(ptr,len) memset(ptr,0,len)
+#define NEED_STRCASECMP
+#define NEED_STRNCASECMP
+#if OSVERSION > 4200
+#define TCPLEN_T size_t
+#endif /* OSVERSION > 4200 */
+
+#elif defined(BSDI)
+
+#define BSD_FLOCK
+#define FILE_UNIX
+#define FILE_UNIX_MMAP
+#define MALLOC_POOLS
+#define SEM_FLOCK
+#define SHMEM_UNIX_MMAP
+#define ZERO(ptr,len) memset(ptr,0,len)
+
+#elif defined(HPUX)
+
+#define FILE_UNIX
+#define FILE_UNIX_MMAP
+#define MALLOC_POOLS
+#define SEM_FLOCK
+/* warning: mmap doesn't work under 9.04 */
+#define SHMEM_UNIX_MMAP
+#define ZERO(ptr,len) memset(ptr,0,len)
+
+#elif defined (IRIX)
+
+#define FILE_UNIX
+#define FILE_UNIX_MMAP
+#define MALLOC_POOLS
+#define SEM_FLOCK
+#define SHMEM_UNIX_MMAP
+#define ZERO(ptr,len) memset(ptr,0,len)
+
+#elif defined(NCR)
+
+#define CASECMPARG_T unsigned
+#define FILE_UNIX
+#define FILE_UNIX_MMAP
+#define MALLOC_POOLS
+#define NEED_STRCASECMP
+#define NEED_STRNCASECMP
+#ifndef S_ISLNK
+#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#endif
+#define SEM_FLOCK
+#define SHMEM_UNIX_MMAP
+#define ZERO(ptr,len) memset(ptr,0,len)
+
+#elif defined(NEC)
+
+#define FILE_UNIX
+#define FILE_UNIX_MMAP
+#define MALLOC_POOLS
+#define NEED_STRCASECMP
+#define NEED_STRNCASECMP
+#ifndef S_ISLNK
+#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#endif
+#define SEM_FLOCK
+#define SHMEM_UNIX_MMAP
+#define ZERO(ptr,len) memset(ptr,0,len)
+
+#elif defined(OSF1)
+
+#undef BSD_FLOCK
+#define FILE_UNIX
+#define FILE_UNIX_MMAP
+#define MALLOC_POOLS
+#define SEM_FLOCK
+#define SHMEM_UNIX_MMAP
+#define ZERO(ptr,len) memset(ptr,0,len)
+
+#elif defined(SCO)
+
+#define FILE_UNIX
+#define FILE_UNIX_MMAP
+#define MALLOC_POOLS
+#define SEM_FLOCK
+#define SHMEM_UNIX_MMAP
+#define ZERO(ptr,len) memset(ptr,0,len)
+
+#elif defined(SNI)
+
+#define CASECMPARG_T const
+#define FILE_UNIX
+#define FILE_UNIX_MMAP
+#define MALLOC_POOLS
+#define NEED_STRCASECMP
+#define NEED_STRNCASECMP
+#define SEM_FLOCK
+#define SHMEM_UNIX_MMAP
+#if 0
+#define socketpair(a,b,c,d) pipe(d)
+#endif
+#define ZERO(ptr,len) memset(ptr,0,len)
+
+#elif defined(SOLARIS) || defined (SOLARISx86)
+
+#undef FILE_UNIX /* avoid redefinition message */
+#define FILE_UNIX
+#define FILE_UNIX_MMAP
+#define MALLOC_POOLS
+/* The Solaris routines return ENOSPC when too many semaphores are SEM_UNDO. */
+#define SEM_FLOCK
+#define SHMEM_UNIX_MMAP
+#define ZERO(ptr,len) memset(ptr,0,len)
+
+#elif defined (SONY)
+
+#define FILE_UNIX
+#define FILE_UNIX_MMAP
+#define NEED_STRCASECMP
+#define NEED_STRNCASECMP
+#define SEM_FLOCK
+#define SHMEM_UNIX_MMAP
+#define ZERO(ptr,len) memset(ptr,0,len)
+
+#elif defined(SUNOS4)
+
+#define BSD_FLOCK
+#define FILE_UNIX
+#define FILE_UNIX_MMAP
+#define MALLOC_POOLS
+#define SEM_FLOCK
+#define SHMEM_UNIX_MMAP
+#define ZERO(ptr,len) memset(ptr,0,len)
+
+#elif defined(UNIXWARE) || defined(UnixWare)
+
+#define CASECMPARG_T const
+#define FILE_UNIX
+#define FILE_UNIX_MMAP
+#define MALLOC_POOLS
+#define NEED_STRCASECMP
+#define NEED_STRNCASECMP
+#ifndef S_ISLNK
+#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#endif
+#define SEM_FLOCK
+#define SHMEM_UNIX_MMAP
+#define ZERO(ptr,len) memset(ptr,0,len)
+#define TCPLEN_T size_t
+
+#elif defined(Linux)
+
+#define FILE_UNIX
+#define FILE_UNIX_MMAP
+#define MALLOC_POOLS
+#define SEM_FLOCK
+#define SHMEM_UNIX_MMAP
+#define ZERO(ptr,len) memset(ptr,0,len)
+
+#elif defined (XP_WIN32) /* Windows NT */
+
+#include <wtypes.h>
+#include <winbase.h>
+
+typedef void* PASSWD;
+
+#define caddr_t PCHAR
+#define CASECMPARG_T const
+#define FILE_WIN32
+#define FILE_WIN32_MMAP
+#define MALLOC_POOLS
+#define NEED_STRCASECMP
+#define NEED_STRNCASECMP
+#define NET_WINSOCK
+#define NSAPI_PUBLIC __declspec(dllexport)
+/* The stat call under NT doesn't define these macros */
+#ifndef S_ISDIR
+#define S_ISDIR(mode) ((mode&S_IFMT) == S_IFDIR)
+#endif
+#ifndef S_ISREG
+#define S_ISREG(mode) ((mode&S_IFMT) == S_IFREG)
+#endif
+#ifndef S_ISLNK
+#define S_ISLNK(x) (0)
+#endif
+#define SEM_WIN32
+#define SHMEM_WIN32_MMAP
+#define ZERO(ptr, len) ZeroMemory(ptr, len)
+
+#else
+
+#error "Missing defines in ns/netsite/include/public/base/systems.h"
+
+#endif /* Windows NT */
+
+#ifndef NSPR_BEGIN_EXTERN_C
+#ifdef __cplusplus
+#define NSPR_BEGIN_EXTERN_C extern "C" {
+#define NSPR_END_EXTERN_C }
+#else
+#define NSPR_BEGIN_EXTERN_C
+#define NSPR_END_EXTERN_C
+#endif /* __cplusplus */
+#endif /* !NSPR_BEGIN_EXTERN_C */
+
+#ifndef TCPLEN_T
+#define TCPLEN_T int
+#endif
+
+#ifndef NSAPI_PUBLIC
+#define NSAPI_PUBLIC
+#endif /* !NSAPI_PUBLIC */
+
+#if defined(NEED_STRCASECMP) || defined(NEED_STRNCASECMP)
+#ifndef CASECMPARG_T
+#define CASECMPARG_T const
+#endif /* !CASECMPARG_T */
+#endif /* NEED_STRCASECMP || NEED_STRNCASECMP */
+
+#endif /* PUBLIC_BASE_SYSTEMS_H */
diff --git a/include/public/base/systhr.h b/include/public/base/systhr.h
new file mode 100644
index 00000000..d312c3b2
--- /dev/null
+++ b/include/public/base/systhr.h
@@ -0,0 +1,21 @@
+/** BEGIN COPYRIGHT BLOCK
+ * Copyright 2001 Sun Microsystems, Inc.
+ * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
+ * All rights reserved.
+ * END COPYRIGHT BLOCK **/
+#ifndef PUBLIC_BASE_SYSTHR_H
+#define PUBLIC_BASE_SYSTHR_H
+
+/*
+ * File: systhr.h
+ *
+ * Description:
+ *
+ * Deprecated include file.
+ */
+
+#ifndef PUBLIC_NSAPI_H
+#include "../nsapi.h"
+#endif /* !PUBLIC_NSAPI_H */
+
+#endif /* !PUBLIC_BASE_SYSTHR_H */
diff --git a/include/public/base/util.h b/include/public/base/util.h
new file mode 100644
index 00000000..88897e5d
--- /dev/null
+++ b/include/public/base/util.h
@@ -0,0 +1,21 @@
+/** BEGIN COPYRIGHT BLOCK
+ * Copyright 2001 Sun Microsystems, Inc.
+ * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
+ * All rights reserved.
+ * END COPYRIGHT BLOCK **/
+#ifndef PUBLIC_BASE_UTIL_H
+#define PUBLIC_BASE_UTIL_H
+
+/*
+ * File: util.h
+ *
+ * Description:
+ *
+ * Deprecated include file.
+ */
+
+#ifndef PUBLIC_NSAPI_H
+#include "../nsapi.h"
+#endif /* !PUBLIC_NSAPI_H */
+
+#endif /* PUBLIC_BASE_UTIL_H */