[SCM] Samba Shared Repository - branch v4-0-test updated -
release-4-0-0alpha5-204-gb395cd7
Stefan Metzmacher
metze at samba.org
Fri Aug 1 15:50:18 GMT 2008
The branch, v4-0-test has been updated
via b395cd7acdb3ca5b25368fbbad0606efe4699d04 (commit)
from 6d640ee4b84c72f6c2da0ee047c9bac916bf3e57 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test
- Log -----------------------------------------------------------------
commit b395cd7acdb3ca5b25368fbbad0606efe4699d04
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Aug 1 17:49:07 2008 +0200
heimdal: add missing files
metze
-----------------------------------------------------------------------
Summary of changes:
.../lib/roken/{freeaddrinfo.c => cloexec.c} | 33 +++++++++++---------
source/heimdal/lib/roken/{h_errno.c => xfree.c} | 16 ++++++---
2 files changed, 29 insertions(+), 20 deletions(-)
copy source/heimdal/lib/roken/{freeaddrinfo.c => cloexec.c} (82%)
copy source/heimdal/lib/roken/{h_errno.c => xfree.c} (90%)
Changeset truncated at 500 lines:
diff --git a/source/heimdal/lib/roken/freeaddrinfo.c b/source/heimdal/lib/roken/cloexec.c
similarity index 82%
copy from source/heimdal/lib/roken/freeaddrinfo.c
copy to source/heimdal/lib/roken/cloexec.c
index 71b5abb..6308daa 100644
--- a/source/heimdal/lib/roken/freeaddrinfo.c
+++ b/source/heimdal/lib/roken/cloexec.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999 - 2001 Kungliga Tekniska Högskolan
+ * Copyright (c) 2008 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -33,25 +33,28 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-RCSID("$Id: freeaddrinfo.c 14773 2005-04-12 11:29:18Z lha $");
+RCSID("$Id$");
#endif
-#include <roken.h>
+#include <unistd.h>
+#include <fcntl.h>
-/*
- * free the list of `struct addrinfo' starting at `ai'
- */
+#include <roken.h>
void ROKEN_LIB_FUNCTION
-freeaddrinfo(struct addrinfo *ai)
+rk_cloexec(int fd)
{
- struct addrinfo *tofree;
+ int ret;
- while(ai != NULL) {
- free (ai->ai_canonname);
- free (ai->ai_addr);
- tofree = ai;
- ai = ai->ai_next;
- free (tofree);
- }
+ ret = fcntl(fd, F_GETFD);
+ if (ret == -1)
+ return;
+ if (fcntl(fd, F_SETFD, ret | FD_CLOEXEC) == -1)
+ return;
+}
+
+void ROKEN_LIB_FUNCTION
+rk_cloexec_file(FILE *f)
+{
+ rk_cloexec(fileno(f));
}
diff --git a/source/heimdal/lib/roken/h_errno.c b/source/heimdal/lib/roken/xfree.c
similarity index 90%
copy from source/heimdal/lib/roken/h_errno.c
copy to source/heimdal/lib/roken/xfree.c
index 11dcb08..7bc21af 100644
--- a/source/heimdal/lib/roken/h_errno.c
+++ b/source/heimdal/lib/roken/xfree.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001 Kungliga Tekniska Högskolan
+ * Copyright (c) 2008 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -33,9 +33,15 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-RCSID("$Id: h_errno.c 10442 2001-08-08 03:47:23Z assar $");
+RCSID("$Id$");
#endif
-#ifndef HAVE_H_ERRNO
-int h_errno = -17; /* Some magic number */
-#endif
+#include <unistd.h>
+
+#include <roken.h>
+
+void ROKEN_LIB_FUNCTION
+rk_xfree (void *buf)
+{
+ free(buf);
+}
--
Samba Shared Repository
More information about the samba-cvs
mailing list