summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-11-16 23:22:49 +0000
committerJeremy Allison <jra@samba.org>2001-11-16 23:22:49 +0000
commit355124adaf512eeb04a0badfcfefbce63f31f023 (patch)
tree061d36f801189312cb174a18a22ca8d76bc4f22d /source3
parentb0518da076991f1c70ae8fe752af0f5f558d0389 (diff)
downloadsamba-355124adaf512eeb04a0badfcfefbce63f31f023.tar.gz
samba-355124adaf512eeb04a0badfcfefbce63f31f023.tar.bz2
samba-355124adaf512eeb04a0badfcfefbce63f31f023.zip
Fixed detection of RedHat headers. Removed another file !
Jeremy. (This used to be commit d70674312d8b98367ccdbbc12fe880f9f539d258)
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in3
-rwxr-xr-xsource3/configure20
-rw-r--r--source3/configure.in2
-rw-r--r--source3/lib/util_list.c212
4 files changed, 12 insertions, 225 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 99165d7f6a..7546ded1fa 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -163,8 +163,7 @@ RPC_PARSE_OBJ = rpc_parse/parse_lsa.o rpc_parse/parse_net.o \
RPC_CLIENT_OBJ = rpc_client/cli_netlogon.o rpc_client/cli_pipe.o \
rpc_client/cli_login.o rpc_client/cli_trust.o \
- rpc_client/cli_spoolss_notify.o \
- lib/util_list.o
+ rpc_client/cli_spoolss_notify.o
LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o
diff --git a/source3/configure b/source3/configure
index b72b6ff4a6..4c32b6b34a 100755
--- a/source3/configure
+++ b/source3/configure
@@ -2524,12 +2524,12 @@ else
#line 2525 "configure"
#include "confdefs.h"
#include <stdio.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
+ if (!f) return(1);
fprintf(f, "%d\n", sizeof(int));
- exit(0);
+ return(0);
}
EOF
if { (eval echo configure:2536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -2563,12 +2563,12 @@ else
#line 2564 "configure"
#include "confdefs.h"
#include <stdio.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
+ if (!f) return(1);
fprintf(f, "%d\n", sizeof(long));
- exit(0);
+ return(0);
}
EOF
if { (eval echo configure:2575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -2602,12 +2602,12 @@ else
#line 2603 "configure"
#include "confdefs.h"
#include <stdio.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
+ if (!f) return(1);
fprintf(f, "%d\n", sizeof(short));
- exit(0);
+ return(0);
}
EOF
if { (eval echo configure:2614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -11037,7 +11037,7 @@ cat > conftest.$ac_ext <<EOF
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
-#ifdef HAVE_SYS_CAPABILITY
+#ifdef HAVE_SYS_CAPABILITY_H
#include <sys/capability.h>
#endif
diff --git a/source3/configure.in b/source3/configure.in
index 86493dbcb7..aacad250f8 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1501,7 +1501,7 @@ AC_TRY_COMPILE([
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
-#ifdef HAVE_SYS_CAPABILITY
+#ifdef HAVE_SYS_CAPABILITY_H
#include <sys/capability.h>
#endif
],[int i;],
diff --git a/source3/lib/util_list.c b/source3/lib/util_list.c
deleted file mode 100644
index b6c82b7371..0000000000
--- a/source3/lib/util_list.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- Unix SMB/Netbios implementation.
- Version 1.9.
- Samba utility functions
- Copyright (C) Andrew Tridgell 1992-1999
- Copyright (C) Gerald Carter <jerry@samba.org> 2000
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-/****************************************************************
- In order to make use of the GENERIC_LIST data structure, you
- should create wrapper functions around:
-
- BOOL generic_list_insert()
- void* generic_list_remove()
- void* generic_list_locate()
-
- The reason this is necessary is that the GENERIC_LIST uses a
- void pointer to store your data structure. This means that
- you get no type checking and can create a heterogenous list.
- However, you will need to have some way to determine the type
- of your data. If you are using a homogenous list, then
- wrapper functions are the easiest way. If you are creating
- a heterogenous list, then you will need to use the type field
- for your arbitrary identifiers.
-
- TODO:
- If necessary, you can add a few generic_list_*() to do things
- like grab from the front (to implement a FIFO queue) or from
- the tail (to implement a FILO stack)
- ****************************************************************/
-
-#include "includes.h"
-
-
-/*
- * list variables
- */
-static GENERIC_LIST hnds;
-
-
-/****************************************************************
- Initialize the list. This doesn't do much currently. Just make
- sure that you call it so we can determine whether the list is
- empty or not.
- ****************************************************************/
-static void generic_list_init(GENERIC_LIST *l)
-{
-
- l->head = NULL;
- l->tail = NULL;
- l->length = 0;
- l->initialized = True;
-
- return;
-}
-
-
-/*****************************************************************
- Insert some data into the list (appended to the end of the list)
- *****************************************************************/
-static BOOL generic_list_insert(GENERIC_LIST *l,
- void *item, uint8 type)
-{
- /* check for an emtpy list first */
- if (l->length == 0)
- {
- if ((l->head = malloc(sizeof(struct _list_node))) == NULL)
- {
- DEBUG(0, ("ERROR: out of memory! Cannot allocate a list node!\n"));
- return False;
- }
- l->head->data = item;
- l->head->type = type;
- l->head->next = NULL;
- l->length++;
- l->tail = l->head;
- }
-
- /* we already have an existing list */
- else
- {
- if ((l->tail->next = malloc(sizeof(struct _list_node))) == NULL)
- {
- DEBUG(0, ("ERROR: out of memory! Cannot allocate a list node!\n"));
- return False;
- }
- l->tail = l->tail->next;
- l->tail->next = NULL;
- l->tail->data = item;
- l->tail->type = type;
- l->length++;
- }
-
- /* return the list pointer in case this was the first node */
- return True;
-}
-
-/****************************************************************
- In order to locate an item in the list, we need a pointer to
- a compare function for the data items.
-
- We will return the actual pointer to the item in the list. Not
- a copy of the item.
- ****************************************************************/
-static void* generic_list_locate (GENERIC_LIST *l, void *search,
- BOOL(*cmp)(const void*,const void*))
-{
- struct _list_node *item;
-
- /* loop through the list in linear order */
- item = l->head;
- while (item != NULL)
- {
- if (cmp(search, item->data))
- return item->data;
- else
- {
- item = item->next;
- }
- }
-
- return NULL;
-}
-
-
-/***************************************************************
- In order to remove a node from the list, we will need a pointer
- to a compare function. The function will return a pointer to
- data in the removed node.
-
- **WARNING** It is the responsibility of the caller to save
- the pointer and destroy the data.
- ***************************************************************/
- static void* generic_list_remove(GENERIC_LIST *l, void *search,
- BOOL(*cmp)(const void*,const void*))
-{
- struct _list_node *item, *tag;
- void *data_ptr;
-
- /* loop through the list in linear order */
- tag = NULL;
- item = l->head;
- while (item != NULL)
- {
- /* did we find it? If so remove the node */
- if (cmp(search, item->data))
- {
- /* found, so remove the node */
-
- /* remove the first item in the list */
- if (item == l->head)
- l->head = item->next;
- /* remove from the middle or the end */
- else
- tag->next = item->next;
-
- /* check to see if we need to update the tail */
- if (l->tail == item)
- l->tail = tag;
-
- l->length--;
- data_ptr = item->data;
- SAFE_FREE(item);
- return data_ptr;
- }
- /* increment to the next node in the list */
- else
- {
- tag = item;
- item = item->next;
- }
- }
-
- return NULL;
-}
-
-/**************************************************************
- copy a POLICY_HND
- *************************************************************/
-BOOL copy_policy_hnd (POLICY_HND *dest, const POLICY_HND *src)
-{
- /* if we have no destination, return an error */
- if (dest == NULL)
- return False;
-
- /* if the src handle is NULL, then copy 0x00 to
- the dest handle */
- if (src == NULL)
- {
- /* if POLICY_HND internals ever changes,
- this will need to be fixed */
- ZERO_STRUCTP(dest);
- return True;
- }
-
- *dest = *src;
- return True;
-}