git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v7 1/4] make poll available for other platforms lacking it

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 17, 2012, 22:41 UTC
Message-ID
<7vmx0oqner.fsf@alter.siamese.dyndns.org>
In-Reply-To
<004b01cd9519$ba991cd0$2fcb5670$@schmitz-digital.de>
"Joachim Schmitz" <jojo@schmitz-digital.de> writes:
Show 25 quoted lines
> move poll.[ch] out of compat/win32/ into compat/poll/ and adjust
> Makefile with the changed paths. Adding comments to Makefile about
> how/when to enable it and add logic for this
>
> Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
> ---
>  Makefile                      | 20 +++++++++++++++-----
>  compat/{win32 => poll}/poll.c |  0
>  compat/{win32 => poll}/poll.h |  0
>  3 files changed, 15 insertions(+), 5 deletions(-)
>  rename compat/{win32 => poll}/poll.c (100%)
>  rename compat/{win32 => poll}/poll.h (100%)
>
> diff --git a/Makefile b/Makefile
> index ac49320..7893297 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -152,6 +152,11 @@ all::
>  #
>  # Define NO_MMAP if you want to avoid mmap.
>  #
> +# Define NO_SYS_POLL_H if you don't have sys/poll.h.
> +#
> +# Define NO_POLL if you do not have or don't want to use poll().
> +# This also implies NO_SYS_POLL_H.
Sensible.
Show 6 quoted lines
> @@ -1220,7 +1225,7 @@ ifeq ($(uname_S),Windows)
>  	NO_PREAD = YesPlease
>  	NEEDS_CRYPTO_WITH_SSL = YesPlease
>  	NO_LIBGEN_H = YesPlease
> -	NO_SYS_POLL_H = YesPlease
> +	NO_POLL_H = YesPlease
Should this be NO_POLL, not NO_POLL_H?
Show 9 quoted lines
> -DSTRIP_EXTENSION=\".exe\"
>  	BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib
>  	EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib
> @@ -1316,7 +1321,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
>  	NO_PREAD = YesPlease
>  	NEEDS_CRYPTO_WITH_SSL = YesPlease
>  	NO_LIBGEN_H = YesPlease
> -	NO_SYS_POLL_H = YesPlease
> +	NO_POLL_H = YesPlease
Likewise.
Show 9 quoted lines
> @@ -1605,6 +1610,11 @@ ifdef NO_GETTEXT
>  	BASIC_CFLAGS += -DNO_GETTEXT
>  	USE_GETTEXT_SCHEME ?= fallthrough
>  endif
> +ifdef NO_POLL
> +	NO_SYS_POLL_H = YesPlease
> +	COMPAT_CFLAGS += -DNO_POLL -Icompat/poll
> +	COMPAT_OBJS += compat/poll/poll.o
> +endif

I think my guesses above are correct, so will queue with the trivial and obvious fixup.

Thanks.
Previous: Joachim SchmitzNext: Joachim Schmitz
Message 2 of 5 in “make poll available for other platforms lacking it”
  1. 1/4 make poll available for other platforms lacking itJoachim Schmitz, Sep 17, 2012
  2. Junio C HamanoSep 17, 2012
  3. Joachim SchmitzSep 18, 2012
  4. Junio C HamanoSep 18, 2012
  5. Joachim SchmitzSep 18, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.