summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2005-02-24 21:47:07 +0000
committerRich Megginson <rmeggins@redhat.com>2005-02-24 21:47:07 +0000
commit6703f63899ba102659292134a5abccc690fecae6 (patch)
tree86909fa808fb8c0cd38046d4b0bc20c1806e9c09 /lib
parent370d483a51167d5b9e7cf936a03f3bb42cae5cd4 (diff)
downloadds-6703f63899ba102659292134a5abccc690fecae6.tar.gz
ds-6703f63899ba102659292134a5abccc690fecae6.tar.xz
ds-6703f63899ba102659292134a5abccc690fecae6.zip
get rid of adminutil dependency on core DS
Diffstat (limited to 'lib')
-rw-r--r--lib/libadmin/error.c2
-rw-r--r--lib/libadmin/strlist.c46
-rw-r--r--lib/libadmin/util.c2
-rw-r--r--lib/libsi18n/coreres.c9
-rw-r--r--lib/libsi18n/coreres.h2
-rw-r--r--lib/libsi18n/getstrprop.c1
6 files changed, 4 insertions, 58 deletions
diff --git a/lib/libadmin/error.c b/lib/libadmin/error.c
index 2c3d740c..29ad0c93 100644
--- a/lib/libadmin/error.c
+++ b/lib/libadmin/error.c
@@ -63,7 +63,9 @@ void _report_error(int type, char *info, char *details, int shouldexit)
fprintf(stdout, "</SCRIPT>\n");
if(shouldexit) {
+#ifdef XP_WIN32
WSACleanup();
+#endif
exit(0);
}
}
diff --git a/lib/libadmin/strlist.c b/lib/libadmin/strlist.c
deleted file mode 100644
index 46a0c600..00000000
--- a/lib/libadmin/strlist.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * Copyright 2001 Sun Microsystems, Inc.
- * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-/*
- * strlist.c: Managing a handle to a list of strings
- *
- * All blame to Mike McCool
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "netsite.h"
-#include <libadmin/libadmin.h>
-
-NSAPI_PUBLIC char **new_strlist(int size)
-{
- char **new_list;
- register int x;
-
- new_list = (char **) MALLOC((size+1)*(sizeof(char *)));
-/* <= so we get the one right after the given size as well */
- for(x=0; x<= size; x++)
- new_list[x] = NULL;
-
- return new_list;
-}
-
-NSAPI_PUBLIC char **grow_strlist(char **strlist, int newsize)
-{
- char **ans;
-
- ans = (char **) REALLOC(strlist, (newsize+1)*sizeof(char *));
-
- return ans;
-}
-
-NSAPI_PUBLIC void free_strlist(char **strlist)
-{
- int x;
-
- for(x=0; (strlist[x]); x++) free(strlist[x]);
- free(strlist);
-}
diff --git a/lib/libadmin/util.c b/lib/libadmin/util.c
index 4af302f0..66795795 100644
--- a/lib/libadmin/util.c
+++ b/lib/libadmin/util.c
@@ -50,7 +50,7 @@ FILE *fopen_l(char *path, char *mode)
FILE *f = fopen(path, mode);
char *lockpath;
char *sn="admserv";
- char *flp=FILE_LOCK_PATH;
+ char *flp=get_flock_path();
if(f == NULL) return NULL;
lockpath=(char *) MALLOC(strlen(sn)+strlen(flp)+16);
diff --git a/lib/libsi18n/coreres.c b/lib/libsi18n/coreres.c
index 5e438069..438f14c2 100644
--- a/lib/libsi18n/coreres.c
+++ b/lib/libsi18n/coreres.c
@@ -9,18 +9,9 @@
#include <sys/stat.h>
#include "i18n.h"
-#include "libadminutil/resource.h"
#include "propset.h"
#include "coreres.h"
-#if 0
-typedef struct ResourceS
-{
- char *path;
- char *package;
- PropertiesSet *propset;
-} Resource;
-#endif
Resource* core_res_init_resource(const char* path, const char* package)
{
diff --git a/lib/libsi18n/coreres.h b/lib/libsi18n/coreres.h
index 9d27060a..43b9bdb1 100644
--- a/lib/libsi18n/coreres.h
+++ b/lib/libsi18n/coreres.h
@@ -6,7 +6,7 @@
#ifndef CORERES_H
#define CORERES_H
-#include "libadminutil/resource.h"
+#include "i18n.h"
Resource* core_res_init_resource(const char* path, const char* package);
const char *core_res_getstring(Resource *hres, char *key, ACCEPT_LANGUAGE_LIST lang);
diff --git a/lib/libsi18n/getstrprop.c b/lib/libsi18n/getstrprop.c
index 6b21fdd5..df1c40bc 100644
--- a/lib/libsi18n/getstrprop.c
+++ b/lib/libsi18n/getstrprop.c
@@ -12,7 +12,6 @@
#include "getstrmem.h"
-#include "libadminutil/resource.h"
#include "coreres.h"
Resource *hResource = NULL;