From: Michael J Gruber <git@drmicha•warpmail.net>
To: Jonathan Callen <abcd@gentoo•org>
Cc: git@vger•kernel.org, mduft@gentoo•org, jrnieder@gmail•com
Subject: Re: [PATCH 1/3] Support building on systems without poll(2)
Date: Thu, 27 May 2010 10:51:18 +0200 [thread overview]
Message-ID: <4BFE3286.8070508@drmicha.warpmail.net> (raw)
In-Reply-To: <1274948384-167-2-git-send-email-abcd@gentoo.org>
Jonathan Callen venit, vidit, dixit 27.05.2010 10:19:
> Some systems do not have sys/poll.h or poll(2). Don't build
> git-daemon, git-upload-archive, or git-upload-pack on such systems.
>
> Signed-off-by: Jonathan Callen <abcd@gentoo•org>
> ---
> Makefile | 21 ++++++++++++++++-----
> builtin.h | 2 ++
> git-compat-util.h | 2 ++
> git.c | 2 ++
> 4 files changed, 22 insertions(+), 5 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 07cab8f..4b36534 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -62,6 +62,8 @@ all::
> #
> # Define NO_MKSTEMPS if you don't have mkstemps in the C library.
> #
> +# Define NO_POLL if you don't have poll in the C library, or it does not work.
> +#
> # Define NO_LIBGEN_H if you don't have libgen.h.
> #
> # Define NEEDS_LIBGEN if your libgen needs -lgen when linking
> @@ -386,7 +388,6 @@ PROGRAM_OBJS += fast-import.o
> PROGRAM_OBJS += imap-send.o
> PROGRAM_OBJS += shell.o
> PROGRAM_OBJS += show-index.o
> -PROGRAM_OBJS += upload-pack.o
> PROGRAM_OBJS += http-backend.o
>
> PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))
> @@ -434,9 +435,7 @@ OTHER_PROGRAMS = git$X
>
> # what test wrappers are needed and 'install' will install, in bindir
> BINDIR_PROGRAMS_NEED_X += git
> -BINDIR_PROGRAMS_NEED_X += git-upload-pack
> BINDIR_PROGRAMS_NEED_X += git-receive-pack
> -BINDIR_PROGRAMS_NEED_X += git-upload-archive
> BINDIR_PROGRAMS_NEED_X += git-shell
>
> BINDIR_PROGRAMS_NO_X += git-cvsserver
> @@ -722,7 +721,6 @@ BUILTIN_OBJS += builtin/unpack-objects.o
> BUILTIN_OBJS += builtin/update-index.o
> BUILTIN_OBJS += builtin/update-ref.o
> BUILTIN_OBJS += builtin/update-server-info.o
> -BUILTIN_OBJS += builtin/upload-archive.o
> BUILTIN_OBJS += builtin/var.o
> BUILTIN_OBJS += builtin/verify-pack.o
> BUILTIN_OBJS += builtin/verify-tag.o
> @@ -1162,8 +1160,17 @@ ifdef ZLIB_PATH
> endif
> EXTLIBS += -lz
>
> +ifndef NO_POLL
> + BUILTIN_OBJS += builtin/upload-archive.o
> + PROGRAM_OBJS += upload-pack.o
> + BINDIR_PROGRAMS_NEED_X += git-upload-archive
> + BINDIR_PROGRAMS_NEED_X += git-upload-pack
> +endif
> +
> ifndef NO_POSIX_ONLY_PROGRAMS
> - PROGRAM_OBJS += daemon.o
> + ifndef NO_POLL
> + PROGRAM_OBJS += daemon.o
> + endif
> endif
> ifndef NO_OPENSSL
> OPENSSL_LIBSSL = -lssl
> @@ -1322,6 +1329,10 @@ ifdef OLD_ICONV
> BASIC_CFLAGS += -DOLD_ICONV
> endif
>
> +ifdef NO_POLL
> + BASIC_CFLAGS += -DNO_POLL
> +endif
> +
> ifdef NO_DEFLATE_BOUND
> BASIC_CFLAGS += -DNO_DEFLATE_BOUND
> endif
> diff --git a/builtin.h b/builtin.h
> index 5c887ef..165a748 100644
> --- a/builtin.h
> +++ b/builtin.h
> @@ -127,7 +127,9 @@ extern int cmd_unpack_objects(int argc, const char **argv, const char *prefix);
> extern int cmd_update_index(int argc, const char **argv, const char *prefix);
> extern int cmd_update_ref(int argc, const char **argv, const char *prefix);
> extern int cmd_update_server_info(int argc, const char **argv, const char *prefix);
> +#ifdef NO_POLL
> extern int cmd_upload_archive(int argc, const char **argv, const char *prefix);
> +#endif
Shouldn't this be "ifndef"? makes me wonder how the test compile worked...
> extern int cmd_upload_tar(int argc, const char **argv, const char *prefix);
> extern int cmd_var(int argc, const char **argv, const char *prefix);
> extern int cmd_verify_tag(int argc, const char **argv, const char *prefix);
> diff --git a/git-compat-util.h b/git-compat-util.h
> index edf352d..c5188e5 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -94,7 +94,9 @@
> #include <utime.h>
> #ifndef __MINGW32__
> #include <sys/wait.h>
> +#ifndef NO_POLL
> #include <sys/poll.h>
> +#endif
> #include <sys/socket.h>
> #include <sys/ioctl.h>
> #include <termios.h>
> diff --git a/git.c b/git.c
> index 99f0363..8c081db 100644
> --- a/git.c
> +++ b/git.c
> @@ -390,7 +390,9 @@ static void handle_internal_command(int argc, const char **argv)
> { "update-index", cmd_update_index, RUN_SETUP },
> { "update-ref", cmd_update_ref, RUN_SETUP },
> { "update-server-info", cmd_update_server_info, RUN_SETUP },
> +#ifndef NO_POLL
> { "upload-archive", cmd_upload_archive },
> +#endif
> { "var", cmd_var },
> { "verify-tag", cmd_verify_tag, RUN_SETUP },
> { "version", cmd_version },
next prev parent reply other threads:[~2010-05-27 8:51 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-27 8:19 [PATCH 0/3] Interix support Jonathan Callen
2010-05-27 8:19 ` [PATCH 1/3] Support building on systems without poll(2) Jonathan Callen
2010-05-27 8:43 ` Sverre Rabbelier
2010-05-27 13:02 ` Jeff King
2010-05-27 8:51 ` Michael J Gruber [this message]
2010-05-27 9:13 ` Jonathan Callen
2010-05-27 10:10 ` [PATCH] compat: Add another rudimentary poll() emulation Jonathan Nieder
2010-05-27 11:00 ` Erik Faye-Lund
2010-05-27 11:39 ` Marko Kreen
2010-05-27 12:00 ` Erik Faye-Lund
2010-05-27 12:36 ` Marko Kreen
2010-05-27 12:57 ` Erik Faye-Lund
2010-05-27 13:43 ` [msysGit] " Albert Dvornik
2010-05-30 7:44 ` Paolo Bonzini
2010-05-27 13:06 ` Erik Faye-Lund
2010-05-27 13:29 ` Marko Kreen
2010-05-27 13:46 ` Erik Faye-Lund
2010-05-27 13:58 ` Marko Kreen
2010-05-27 14:06 ` Erik Faye-Lund
2010-05-27 14:11 ` Marko Kreen
2010-05-27 14:15 ` Erik Faye-Lund
2010-05-27 14:32 ` Marko Kreen
2010-05-27 14:44 ` Erik Faye-Lund
2010-05-27 15:17 ` Peter Kjellerstedt
2010-05-27 14:14 ` [msysGit] " Albert Dvornik
2010-05-27 14:05 ` Albert Dvornik
2010-05-30 0:37 ` [PATCH v2] " Jonathan Nieder
2010-05-30 19:19 ` Johannes Sixt
2010-05-30 20:40 ` Jonathan Nieder
2010-05-30 22:39 ` Joshua Juran
2010-05-31 3:19 ` Mac OS 9 (Lamp) port Jonathan Nieder
2010-05-31 4:35 ` Joshua Juran
2010-05-31 5:49 ` Jonathan Nieder
2010-05-31 12:12 ` [PATCH v2] compat: Add another rudimentary poll() emulation Albert Dvornik
2010-05-31 12:46 ` Jonathan Nieder
2010-05-31 13:10 ` Albert Dvornik
2010-05-27 8:19 ` [PATCH 2/3] Support building without inttypes.h Jonathan Callen
2010-05-27 8:19 ` [PATCH 3/3] Add Interix support Jonathan Callen
2010-05-28 2:11 ` [PATCH 0/3] " Jakub Narebski
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=4BFE3286.8070508@drmicha.warpmail.net \
--to=git@drmicha$(echo .)warpmail.net \
--cc=abcd@gentoo$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
--cc=jrnieder@gmail$(echo .)com \
--cc=mduft@gentoo$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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