From: Robert Schiele <rschiele@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com
Subject: [PATCH] some systems don't have (and need) sys/select.h
Date: Thu, 24 Jan 2008 19:34:46 +0100 [thread overview]
Message-ID: <20080124183446.GJ30676@schiele.dyndns.org> (raw)
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
next reply other threads:[~2008-01-24 18:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-24 18:34 Robert Schiele [this message]
2008-01-24 21:15 ` [PATCH] some systems don't have (and need) sys/select.h 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080124183446.GJ30676@schiele.dyndns.org \
--to=rschiele@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).