[libdispatch-changes] [53] trunk

source_changes at macosforge.org source_changes at macosforge.org
Sat Oct 3 07:19:06 PDT 2009


Revision: 53
          http://trac.macosforge.org/projects/libdispatch/changeset/53
Author:   robert at fledge.watson.org
Date:     2009-10-03 07:19:05 -0700 (Sat, 03 Oct 2009)
Log Message:
-----------
Detect FD_COPY(), and if not defined, provide a compat implementation.

Modified Paths:
--------------
    trunk/configure.ac
    trunk/src/internal.h

Added Paths:
-----------
    trunk/compat/fd_copy.h

Added: trunk/compat/fd_copy.h
===================================================================
--- trunk/compat/fd_copy.h	                        (rev 0)
+++ trunk/compat/fd_copy.h	2009-10-03 14:19:05 UTC (rev 53)
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2009 Apple Inc. All rights reserved.
+ *
+ * @APPLE_APACHE_LICENSE_HEADER_START@
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * @APPLE_APACHE_LICENSE_HEADER_END@
+ */
+
+#ifndef __COMPAT_FD_COPY_H__
+#define __COMPAT_FD_COPY_H__
+
+#define	FD_COPY(f, t)	(void)(*(t) = *(f))
+
+#endif /* __COMPAT_FD_COPY_H__ */

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2009-10-03 14:17:19 UTC (rev 52)
+++ trunk/configure.ac	2009-10-03 14:19:05 UTC (rev 53)
@@ -176,6 +176,7 @@
   [[#include <time.h>]])
 AC_CHECK_DECLS([EVFILT_SESSION, NOTE_NONE, NOTE_REAP, NOTE_SIGNAL], [], [],
   [[#include <sys/event.h>]])
+AC_CHECK_DECLS([FD_COPY], [], [], [[#include <sys/select.h>]])
 AC_CHECK_DECLS([SIGEMT], [], [], [[#include <signal.h>]])
 AC_CHECK_DECLS([VQ_UPDATE, VQ_VERYLOWDISK], [], [], [[#include <sys/mount.h>]])
 AC_CHECK_FUNCS([pthread_key_init_np pthread_main_np mach_absolute_time malloc_create_zone sem_init])

Modified: trunk/src/internal.h
===================================================================
--- trunk/src/internal.h	2009-10-03 14:17:19 UTC (rev 52)
+++ trunk/src/internal.h	2009-10-03 14:19:05 UTC (rev 53)
@@ -42,6 +42,9 @@
 #ifndef HAVE_PRIVATE_EXTERN
 #include <compat/private_extern.h>
 #endif
+#if !HAVE_DECL_FD_COPY
+#include <compat/fd_copy.h>
+#endif
 
 #include <dispatch/dispatch.h>
 #include <dispatch/base.h>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/libdispatch-changes/attachments/20091003/b7dc25e6/attachment-0001.html>


More information about the libdispatch-changes mailing list