summaryrefslogtreecommitdiffstats
path: root/include/base
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2005-02-23 18:19:13 +0000
committerRob Crittenden <rcritten@redhat.com>2005-02-23 18:19:13 +0000
commit21305115e547133a0122c44b7e9956ef78dc94be (patch)
treeb72f28ba737b35c0f13003478f5e777146789ef3 /include/base
parentf64e827b9c3011b07b5d78dd52466236dc77346e (diff)
downloadds-21305115e547133a0122c44b7e9956ef78dc94be.tar.gz
ds-21305115e547133a0122c44b7e9956ef78dc94be.tar.xz
ds-21305115e547133a0122c44b7e9956ef78dc94be.zip
149510
Strip down ACL code and support libraries to the bare minimum.
Diffstat (limited to 'include/base')
-rw-r--r--include/base/crit.h6
-rw-r--r--include/base/ereport.h29
-rw-r--r--include/base/pool.h16
-rw-r--r--include/base/util.h123
4 files changed, 2 insertions, 172 deletions
diff --git a/include/base/crit.h b/include/base/crit.h
index 1ff7e957..e9a3498a 100644
--- a/include/base/crit.h
+++ b/include/base/crit.h
@@ -32,9 +32,7 @@
/* Define C++ interface */
#ifdef __cplusplus
-#ifndef BASE_NSASSERT_H
-#include "nsassert.h"
-#endif /* !BASE_NSASSERT_H */
+#include "prlog.h" /* NSPR */
#ifndef prmon_h___
#include "prmon.h"
@@ -55,7 +53,7 @@ private:
inline CriticalSection::CriticalSection():_crtsec(0)
{
_crtsec = PR_NewMonitor();
- NS_ASSERT(_crtsec);
+ PR_ASSERT(_crtsec);
}
inline CriticalSection::~CriticalSection()
diff --git a/include/base/ereport.h b/include/base/ereport.h
index 0c74e957..16a4bc68 100644
--- a/include/base/ereport.h
+++ b/include/base/ereport.h
@@ -16,10 +16,6 @@
* Rob McCool
*/
-#ifndef BASE_SESSION_H
-#include "session.h"
-#endif /* !BASE_SESSION_H */
-
#ifndef PUBLIC_BASE_EREPORT_H
#include "public/base/ereport.h"
#endif /* !PUBLIC_BASE_EREPORT_H */
@@ -39,37 +35,12 @@ NSPR_BEGIN_EXTERN_C
NSAPI_PUBLIC int INTereport(int degree, char *fmt, ...);
NSAPI_PUBLIC int INTereport_v(int degree, char *fmt, va_list args);
-/*
- * INTereport_init initializes the error logging subsystem and opens the static
- * file descriptors. It returns NULL upon success and an error string upon
- * error. If a userpw is given, the logs will be chowned to that user.
- *
- * email is the address of a person to mail upon catastrophic error. It
- * can be NULL if no e-mail is desired. INTereport_init will not duplicate
- * its own copy of this string; you must make sure it stays around and free
- * it when you shut down the server.
- */
-
-NSAPI_PUBLIC
-char *INTereport_init(char *err_fn, char *email, PASSWD pwuser, char *version);
-
-/*
- * log_terminate closes the error and common log file descriptors.
- */
-NSAPI_PUBLIC void INTereport_terminate(void);
-
-/* For restarts */
-NSAPI_PUBLIC SYS_FILE INTereport_getfd(void);
-
NSPR_END_EXTERN_C
/* --- End function prototypes --- */
#define ereport INTereport
#define ereport_v INTereport_v
-#define ereport_init INTereport_init
-#define ereport_terminate INTereport_terminate
-#define ereport_getfd INTereport_getfd
#endif /* INTNSAPI */
diff --git a/include/base/pool.h b/include/base/pool.h
index bca055c7..a76dc483 100644
--- a/include/base/pool.h
+++ b/include/base/pool.h
@@ -30,18 +30,6 @@
#include "netsite.h"
#endif /* !NETSITE_H */
-#ifndef BASE_PBLOCK_H
-#include "pblock.h"
-#endif /* !BASE_PBLOCK_H */
-
-#ifndef BASE_SESSION_H
-#include "session.h"
-#endif /* !BASE_SESSION_H */
-
-#ifndef FRAME_REQ_H
-#include "frame/req.h"
-#endif /* !FRAME_REQ_H */
-
#ifndef PUBLIC_BASE_POOL_H
#include "public/base/pool.h"
#endif /* !PUBLIC_BASE_POOL_H */
@@ -54,8 +42,6 @@ NSPR_BEGIN_EXTERN_C
int pool_internal_init(void);
-NSAPI_PUBLIC int INTpool_init(pblock *pb, Session *sn, Request *rq);
-
#ifdef DEBUG_CACHES
NSAPI_PUBLIC int INTpool_service_debug(pblock *pb, Session *sn, Request *rq);
#endif
@@ -81,8 +67,6 @@ char *INTpool_strdup(pool_handle_t *pool_handle, const char *orig_str );
NSPR_END_EXTERN_C
-#define pool_init INTpool_init
-
#ifdef DEBUG_CACHES
#define pool_service_debug INTpool_service_debug
#endif /* DEBUG_CACHES */
diff --git a/include/base/util.h b/include/base/util.h
index 7778b924..c33a7c39 100644
--- a/include/base/util.h
+++ b/include/base/util.h
@@ -17,15 +17,6 @@
* Rob McCool
*/
-/* Needed for various reentrant functions */
-#define DEF_CTIMEBUF 26
-#define DEF_ERRBUF 256
-#define DEF_PWBUF 256
-
-#ifndef BASE_BUFFER_H
-#include "buffer.h" /* filebuf for getline */
-#endif /* !BASE_BUFFER_H */
-
#ifndef PUBLIC_BASE_UTIL_H
#include "public/base/util.h"
#endif /* !PUBLIC_BASE_UTIL_H */
@@ -36,49 +27,8 @@
NSPR_BEGIN_EXTERN_C
-NSAPI_PUBLIC
-int INTutil_getline(filebuffer *buf, int lineno, int maxlen, char *l);
-
-NSAPI_PUBLIC char **INTutil_env_create(char **env, int n, int *pos);
-
-NSAPI_PUBLIC char *INTutil_env_str(char *name, char *value);
-
-NSAPI_PUBLIC void INTutil_env_replace(char **env, char *name, char *value);
-
-NSAPI_PUBLIC void INTutil_env_free(char **env);
-
-NSAPI_PUBLIC char **INTutil_env_copy(char **src, char **dst);
-
-NSAPI_PUBLIC char *INTutil_env_find(char **env, char *name);
-
NSAPI_PUBLIC char *INTutil_hostname(void);
-NSAPI_PUBLIC int INTutil_chdir2path(char *path);
-
-NSAPI_PUBLIC int INTutil_is_mozilla(char *ua, char *major, char *minor);
-
-NSAPI_PUBLIC int INTutil_is_url(char *url);
-
-NSAPI_PUBLIC int INTutil_later_than(struct tm *lms, char *ims);
-
-NSAPI_PUBLIC int INTutil_time_equal(struct tm *lms, char *ims);
-
-NSAPI_PUBLIC int INTutil_str_time_equal(char *t1, char *t2);
-
-NSAPI_PUBLIC int INTutil_uri_is_evil(char *t);
-
-NSAPI_PUBLIC void INTutil_uri_parse(char *uri);
-
-NSAPI_PUBLIC void INTutil_uri_unescape(char *s);
-
-NSAPI_PUBLIC char *INTutil_uri_escape(char *d, char *s);
-
-NSAPI_PUBLIC char *INTutil_url_escape(char *d, char *s);
-
-NSAPI_PUBLIC char *INTutil_sh_escape(char *s);
-
-NSAPI_PUBLIC int INTutil_mime_separator(char *sep);
-
NSAPI_PUBLIC int INTutil_itoa(int i, char *a);
NSAPI_PUBLIC
@@ -93,18 +43,8 @@ NSAPI_PUBLIC int INTutil_snprintf(char *s, int n, const char *fmt, ...);
NSAPI_PUBLIC int INTutil_strftime(char *s, const char *format, const struct tm *t);
-NSAPI_PUBLIC char *INTutil_strtok(char *s1, const char *s2, char **lasts);
-
NSAPI_PUBLIC struct tm *INTutil_localtime(const time_t *clock, struct tm *res);
-NSAPI_PUBLIC char *INTutil_ctime(const time_t *clock, char *buf, int buflen);
-
-NSAPI_PUBLIC char *INTutil_strerror(int errnum, char *msg, int buflen);
-
-NSAPI_PUBLIC struct tm *INTutil_gmtime(const time_t *clock, struct tm *res);
-
-NSAPI_PUBLIC char *INTutil_asctime(const struct tm *tm,char *buf, int buflen);
-
#ifdef NEED_STRCASECMP
NSAPI_PUBLIC int INTutil_strcasecmp(CASECMPARG_T char *one, CASECMPARG_T char *two);
#endif /* NEED_STRCASECMP */
@@ -115,56 +55,9 @@ NSAPI_PUBLIC int INTutil_strncasecmp(CASECMPARG_T char *one, CASECMPARG_T char *
/* --- End common function prototypes --- */
-/* --- Begin Unix-only function prototypes --- */
-
-#ifdef XP_UNIX
-
-NSAPI_PUBLIC int INTutil_can_exec(struct stat *finfo, uid_t uid, gid_t gid);
-
-NSAPI_PUBLIC
-struct passwd *INTutil_getpwnam(const char *name, struct passwd *result,
- char *buffer, int buflen);
-
-NSAPI_PUBLIC pid_t INTutil_waitpid(pid_t pid, int *statptr, int options);
-
-#endif /* XP_UNIX */
-
-/* --- End Unix-only function prototypes --- */
-
-/* --- Begin Windows-only function prototypes --- */
-
-#ifdef XP_WIN32
-
-NSAPI_PUBLIC
-VOID INTutil_delete_directory(char *FileName, BOOL delete_directory);
-
-#endif /* XP_WIN32 */
-
-/* --- End Windows-only function prototypes --- */
-
NSPR_END_EXTERN_C
-#define util_getline INTutil_getline
-#define util_env_create INTutil_env_create
-#define util_env_str INTutil_env_str
-#define util_env_replace INTutil_env_replace
-#define util_env_free INTutil_env_free
-#define util_env_copy INTutil_env_copy
-#define util_env_find INTutil_env_find
#define util_hostname INTutil_hostname
-#define util_chdir2path INTutil_chdir2path
-#define util_is_mozilla INTutil_is_mozilla
-#define util_is_url INTutil_is_url
-#define util_later_than INTutil_later_than
-#define util_time_equal INTutil_time_equal
-#define util_str_time_equal INTutil_str_time_equal
-#define util_uri_is_evil INTutil_uri_is_evil
-#define util_uri_parse INTutil_uri_parse
-#define util_uri_unescape INTutil_uri_unescape
-#define util_uri_escape INTutil_uri_escape
-#define util_url_escape INTutil_url_escape
-#define util_sh_escape INTutil_sh_escape
-#define util_mime_separator INTutil_mime_separator
#define util_itoa INTutil_itoa
#define util_vsprintf INTutil_vsprintf
#define util_sprintf INTutil_sprintf
@@ -173,22 +66,7 @@ NSPR_END_EXTERN_C
#define util_strftime INTutil_strftime
#define util_strcasecmp INTutil_strcasecmp
#define util_strncasecmp INTutil_strncasecmp
-#define util_strtok INTutil_strtok
#define util_localtime INTutil_localtime
-#define util_ctime INTutil_ctime
-#define util_strerror INTutil_strerror
-#define util_gmtime INTutil_gmtime
-#define util_asctime INTutil_asctime
-
-#ifdef XP_UNIX
-#define util_can_exec INTutil_can_exec
-#define util_getpwnam INTutil_getpwnam
-#define util_waitpid INTutil_waitpid
-#endif /* XP_UNIX */
-
-#ifdef XP_WIN32
-#define util_delete_directory INTutil_delete_directory
-#endif /* XP_WIN32 */
#ifdef NEED_STRCASECMP
#define util_strcasecmp INTutil_strcasecmp
@@ -207,4 +85,3 @@ NSPR_END_EXTERN_C
#endif /* INTNSAPI */
#endif /* !BASE_UTIL_H */
-