git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] some systems don't have (and need) sys/select.h
@ 2008-01-24 18:34 Robert Schiele
  2008-01-24 21:15 ` Johannes Schindelin
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Robert Schiele @ 2008-01-24 18:34 UTC (permalink / raw)
  To: git; +Cc: gitster

The select stuff is already in sys/time.h on on some systems like HP-UX
thus we should not include sys/select.h in that case.

Signed-off-by: Robert Schiele <rschiele@gmail.com>
---
This patch replaces my previously sent patch
"HP-UX traditionally has no sys/select.h".

 Makefile          |    5 +++++
 git-compat-util.h |    2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 5aac0c0..c9e54b1 100644
--- a/Makefile
+++ b/Makefile
@@ -42,6 +42,8 @@ all::
 #
 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
 #
+# Define NO_SYS_SELECT_H if you don't have sys/select.h.
+#
 # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
 # Enable it on Windows.  By default, symrefs are still used.
 #
@@ -635,6 +637,9 @@ ifdef NO_UNSETENV
 	COMPAT_CFLAGS += -DNO_UNSETENV
 	COMPAT_OBJS += compat/unsetenv.o
 endif
+ifdef NO_SYS_SELECT_H
+	BASIC_CFLAGS += -DNO_SYS_SELECT_H
+endif
 ifdef NO_MMAP
 	COMPAT_CFLAGS += -DNO_MMAP
 	COMPAT_OBJS += compat/mmap.o
diff --git a/git-compat-util.h b/git-compat-util.h
index b6ef544..4df90cb 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -68,7 +68,9 @@
 #include <sys/poll.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
+#ifndef NO_SYS_SELECT_H
 #include <sys/select.h>
+#endif
 #include <assert.h>
 #include <regex.h>
 #include <netinet/in.h>
-- 
1.5.2.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-01-26  9:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-24 18:34 [PATCH] some systems don't have (and need) sys/select.h Robert Schiele
2008-01-24 21:15 ` Johannes Schindelin
2008-01-24 21:17 ` Junio C Hamano
2008-01-24 21:58   ` Robert Schiele
2008-01-25 11:19 ` [PATCH] autoconf: Add test for sys/select.h header file Jakub Narebski
2008-01-25 12:30   ` Johannes Schindelin
2008-01-25 12:53     ` Robert Schiele
2008-01-26  6:25   ` Junio C Hamano
2008-01-26  9:42     ` Robert Schiele

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).