{"thread":{"id":"31572","subject":"[PATCH v7 1/4] make poll available for other platforms lacking it","startedAt":"2012-09-17T21:16:39Z","lastAt":"2012-09-18T07:02:24Z","messageCount":5,"participants":["Joachim Schmitz","Junio C Hamano"],"isPatch":true,"patchVersion":7,"patchTotal":4},"messages":[{"id":"199290","messageId":"004b01cd9519$ba991cd0$2fcb5670$@schmitz-digital.de","threadId":"31572","inReplyTo":null,"subject":"[PATCH v7 1/4] make poll available for other platforms lacking it","fromName":"Joachim Schmitz","fromEmail":"jojo@schmitz-digital.de","sentAt":"2012-09-17T21:16:39Z","receivedAt":"2012-09-17T21:16:39Z","isPatch":true,"sender":{"key":"jojo@schmitz-digital.de","avatar":"https://avatars.githubusercontent.com/u/1786669?v=4"},"body":"move poll.[ch] out of compat/win32/ into compat/poll/ and adjust\nMakefile with the changed paths. Adding comments to Makefile about\nhow/when to enable it and add logic for this\n\nSigned-off-by: Joachim Schmitz <jojo@schmitz-digital.de>\n---\n Makefile                      | 20 +++++++++++++++-----\n compat/{win32 => poll}/poll.c |  0\n compat/{win32 => poll}/poll.h |  0\n 3 files changed, 15 insertions(+), 5 deletions(-)\n rename compat/{win32 => poll}/poll.c (100%)\n rename compat/{win32 => poll}/poll.h (100%)\n\ndiff --git a/Makefile b/Makefile\nindex ac49320..7893297 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -152,6 +152,11 @@ all::\n #\n # Define NO_MMAP if you want to avoid mmap.\n #\n+# Define NO_SYS_POLL_H if you don't have sys/poll.h.\n+#\n+# Define NO_POLL if you do not have or don't want to use poll().\n+# This also implies NO_SYS_POLL_H.\n+#\n # Define NO_PTHREADS if you do not have or do not want to use Pthreads.\n #\n # Define NO_PREAD if you have a problem with pread() system call (e.g.\n@@ -598,10 +603,10 @@ LIB_H += compat/bswap.h\n LIB_H += compat/cygwin.h\n LIB_H += compat/mingw.h\n LIB_H += compat/obstack.h\n+LIB_H += compat/poll/poll.h\n LIB_H += compat/precompose_utf8.h\n LIB_H += compat/terminal.h\n LIB_H += compat/win32/dirent.h\n-LIB_H += compat/win32/poll.h\n LIB_H += compat/win32/pthread.h\n LIB_H += compat/win32/syslog.h\n LIB_H += connected.h\n@@ -1220,7 +1225,7 @@ ifeq ($(uname_S),Windows)\n \tNO_PREAD = YesPlease\n \tNEEDS_CRYPTO_WITH_SSL = YesPlease\n \tNO_LIBGEN_H = YesPlease\n-\tNO_SYS_POLL_H = YesPlease\n+\tNO_POLL_H = YesPlease\n \tNO_SYMLINK_HEAD = YesPlease\n \tNO_IPV6 = YesPlease\n \tNO_UNIX_SOCKETS = YesPlease\n@@ -1261,7 +1266,7 @@ ifeq ($(uname_S),Windows)\n \tBASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H\n-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE\n \tCOMPAT_OBJS = compat/msvc.o compat/winansi.o \\\n \t\tcompat/win32/pthread.o compat/win32/syslog.o \\\n-\t\tcompat/win32/poll.o compat/win32/dirent.o\n+\t\tcompat/win32/dirent.o\n \tCOMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/regex -Icompat/win32\n-DSTRIP_EXTENSION=\\\".exe\\\"\n \tBASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib\n \tEXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib\n@@ -1316,7 +1321,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n \tNO_PREAD = YesPlease\n \tNEEDS_CRYPTO_WITH_SSL = YesPlease\n \tNO_LIBGEN_H = YesPlease\n-\tNO_SYS_POLL_H = YesPlease\n+\tNO_POLL_H = YesPlease\n \tNO_SYMLINK_HEAD = YesPlease\n \tNO_UNIX_SOCKETS = YesPlease\n \tNO_SETENV = YesPlease\n@@ -1351,7 +1356,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n \tCOMPAT_CFLAGS += -DSTRIP_EXTENSION=\\\".exe\\\"\n \tCOMPAT_OBJS += compat/mingw.o compat/winansi.o \\\n \t\tcompat/win32/pthread.o compat/win32/syslog.o \\\n-\t\tcompat/win32/poll.o compat/win32/dirent.o\n+\t\tcompat/win32/dirent.o\n \tEXTLIBS += -lws2_32\n \tPTHREAD_LIBS =\n \tX = .exe\n@@ -1605,6 +1610,11 @@ ifdef NO_GETTEXT\n \tBASIC_CFLAGS += -DNO_GETTEXT\n \tUSE_GETTEXT_SCHEME ?= fallthrough\n endif\n+ifdef NO_POLL\n+\tNO_SYS_POLL_H = YesPlease\n+\tCOMPAT_CFLAGS += -DNO_POLL -Icompat/poll\n+\tCOMPAT_OBJS += compat/poll/poll.o\n+endif\n ifdef NO_STRCASESTR\n \tCOMPAT_CFLAGS += -DNO_STRCASESTR\n \tCOMPAT_OBJS += compat/strcasestr.o\ndiff --git a/compat/win32/poll.c b/compat/poll/poll.c\nsimilarity index 100%\nrename from compat/win32/poll.c\nrename to compat/poll/poll.c\ndiff --git a/compat/win32/poll.h b/compat/poll/poll.h\nsimilarity index 100%\nrename from compat/win32/poll.h\nrename to compat/poll/poll.h\n-- \n1.7.12\n"},{"id":"199304","messageId":"7vmx0oqner.fsf@alter.siamese.dyndns.org","threadId":"31572","inReplyTo":"004b01cd9519$ba991cd0$2fcb5670$@schmitz-digital.de","subject":"Re: [PATCH v7 1/4] make poll available for other platforms lacking it","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-17T22:41:38Z","receivedAt":"2012-09-17T22:41:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Joachim Schmitz\" <jojo@schmitz-digital.de> writes:\n\n> move poll.[ch] out of compat/win32/ into compat/poll/ and adjust\n> Makefile with the changed paths. Adding comments to Makefile about\n> how/when to enable it and add logic for this\n>\n> Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>\n> ---\n>  Makefile                      | 20 +++++++++++++++-----\n>  compat/{win32 => poll}/poll.c |  0\n>  compat/{win32 => poll}/poll.h |  0\n>  3 files changed, 15 insertions(+), 5 deletions(-)\n>  rename compat/{win32 => poll}/poll.c (100%)\n>  rename compat/{win32 => poll}/poll.h (100%)\n>\n> diff --git a/Makefile b/Makefile\n> index ac49320..7893297 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -152,6 +152,11 @@ all::\n>  #\n>  # Define NO_MMAP if you want to avoid mmap.\n>  #\n> +# Define NO_SYS_POLL_H if you don't have sys/poll.h.\n> +#\n> +# Define NO_POLL if you do not have or don't want to use poll().\n> +# This also implies NO_SYS_POLL_H.\n\nSensible.\n\n> @@ -1220,7 +1225,7 @@ ifeq ($(uname_S),Windows)\n>  \tNO_PREAD = YesPlease\n>  \tNEEDS_CRYPTO_WITH_SSL = YesPlease\n>  \tNO_LIBGEN_H = YesPlease\n> -\tNO_SYS_POLL_H = YesPlease\n> +\tNO_POLL_H = YesPlease\n\nShould this be NO_POLL, not NO_POLL_H?\n\n> -DSTRIP_EXTENSION=\\\".exe\\\"\n>  \tBASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib\n>  \tEXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib\n> @@ -1316,7 +1321,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n>  \tNO_PREAD = YesPlease\n>  \tNEEDS_CRYPTO_WITH_SSL = YesPlease\n>  \tNO_LIBGEN_H = YesPlease\n> -\tNO_SYS_POLL_H = YesPlease\n> +\tNO_POLL_H = YesPlease\n\nLikewise.\n\n> @@ -1605,6 +1610,11 @@ ifdef NO_GETTEXT\n>  \tBASIC_CFLAGS += -DNO_GETTEXT\n>  \tUSE_GETTEXT_SCHEME ?= fallthrough\n>  endif\n> +ifdef NO_POLL\n> +\tNO_SYS_POLL_H = YesPlease\n> +\tCOMPAT_CFLAGS += -DNO_POLL -Icompat/poll\n> +\tCOMPAT_OBJS += compat/poll/poll.o\n> +endif\n\nI think my guesses above are correct, so will queue with the trivial\nand obvious fixup.\n\nThanks.\n"},{"id":"199334","messageId":"000101cd9566$df8b8d00$9ea2a700$@schmitz-digital.de","threadId":"31572","inReplyTo":"7vmx0oqner.fsf@alter.siamese.dyndns.org","subject":"RE: [PATCH v7 1/4] make poll available for other platforms lacking it","fromName":"Joachim Schmitz","fromEmail":"jojo@schmitz-digital.de","sentAt":"2012-09-18T06:28:52Z","receivedAt":"2012-09-18T06:28:52Z","isPatch":true,"sender":{"key":"jojo@schmitz-digital.de","avatar":"https://avatars.githubusercontent.com/u/1786669?v=4"},"body":"> From: Junio C Hamano [mailto:gitster@pobox.com]\n> Sent: Tuesday, September 18, 2012 12:42 AM\n> To: Joachim Schmitz\n> Cc: git@vger.kernel.org\n> Subject: Re: [PATCH v7 1/4] make poll available for other platforms lacking it\n> \n> \"Joachim Schmitz\" <jojo@schmitz-digital.de> writes:\n> \n> > move poll.[ch] out of compat/win32/ into compat/poll/ and adjust\n> > Makefile with the changed paths. Adding comments to Makefile about\n> > how/when to enable it and add logic for this\n> >\n> > Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>\n> > ---\n> >  Makefile                      | 20 +++++++++++++++-----\n> >  compat/{win32 => poll}/poll.c |  0\n> >  compat/{win32 => poll}/poll.h |  0\n> >  3 files changed, 15 insertions(+), 5 deletions(-)\n> >  rename compat/{win32 => poll}/poll.c (100%)\n> >  rename compat/{win32 => poll}/poll.h (100%)\n> >\n> > diff --git a/Makefile b/Makefile\n> > index ac49320..7893297 100644\n> > --- a/Makefile\n> > +++ b/Makefile\n> > @@ -152,6 +152,11 @@ all::\n> >  #\n> >  # Define NO_MMAP if you want to avoid mmap.\n> >  #\n> > +# Define NO_SYS_POLL_H if you don't have sys/poll.h.\n> > +#\n> > +# Define NO_POLL if you do not have or don't want to use poll().\n> > +# This also implies NO_SYS_POLL_H.\n> \n> Sensible.\n> \n> > @@ -1220,7 +1225,7 @@ ifeq ($(uname_S),Windows)\n> >  \tNO_PREAD = YesPlease\n> >  \tNEEDS_CRYPTO_WITH_SSL = YesPlease\n> >  \tNO_LIBGEN_H = YesPlease\n> > -\tNO_SYS_POLL_H = YesPlease\n> > +\tNO_POLL_H = YesPlease\n> \n> Should this be NO_POLL, not NO_POLL_H?\n> \n> > -DSTRIP_EXTENSION=\\\".exe\\\"\n> >  \tBASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib\n> >  \tEXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib\n> > @@ -1316,7 +1321,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n> >  \tNO_PREAD = YesPlease\n> >  \tNEEDS_CRYPTO_WITH_SSL = YesPlease\n> >  \tNO_LIBGEN_H = YesPlease\n> > -\tNO_SYS_POLL_H = YesPlease\n> > +\tNO_POLL_H = YesPlease\n> \n> Likewise.\n> \n> > @@ -1605,6 +1610,11 @@ ifdef NO_GETTEXT\n> >  \tBASIC_CFLAGS += -DNO_GETTEXT\n> >  \tUSE_GETTEXT_SCHEME ?= fallthrough\n> >  endif\n> > +ifdef NO_POLL\n> > +\tNO_SYS_POLL_H = YesPlease\n> > +\tCOMPAT_CFLAGS += -DNO_POLL -Icompat/poll\n> > +\tCOMPAT_OBJS += compat/poll/poll.o\n> > +endif\n> \n> I think my guesses above are correct, so will queue with the trivial\n> and obvious fixup.\n\nWell I was unde the impression that is <sys/poll.h> isn't available, there might be a <poll.h> and it that isn't available either we\nuse compat/.../poll.[ch]. But rethinking your changed does makes perfect sense.\n\nOK, so I guess I'm ready for the 'final touch', my NonStop specific changes, will post them shortly...\n\nBye, Jojo\n"},{"id":"199339","messageId":"7vehlzq0r3.fsf@alter.siamese.dyndns.org","threadId":"31572","inReplyTo":"000101cd9566$df8b8d00$9ea2a700$@schmitz-digital.de","subject":"Re: [PATCH v7 1/4] make poll available for other platforms lacking it","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-18T06:54:40Z","receivedAt":"2012-09-18T06:54:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Joachim Schmitz\" <jojo@schmitz-digital.de> writes:\n\n>> > @@ -1605,6 +1610,11 @@ ifdef NO_GETTEXT\n>> >  \tBASIC_CFLAGS += -DNO_GETTEXT\n>> >  \tUSE_GETTEXT_SCHEME ?= fallthrough\n>> >  endif\n>> > +ifdef NO_POLL\n>> > +\tNO_SYS_POLL_H = YesPlease\n>> > +\tCOMPAT_CFLAGS += -DNO_POLL -Icompat/poll\n>> > +\tCOMPAT_OBJS += compat/poll/poll.o\n>> > +endif\n>> \n>> I think my guesses above are correct, so will queue with the trivial\n>> and obvious fixup.\n>\n> Well I was unde the impression that is <sys/poll.h> isn't\n> available, there might be a <poll.h> and it that isn't available\n> either we use compat/.../poll.[ch]. But rethinking your changed\n> does makes perfect sense.\n\nHeh, my comment was not about names between NO_POLL_H vs NO_POLL.\nWith the way you wrote the code, the symbols defined for Windows and\nMINGW must match what controls the hunk around ll.1610, so what\nmakes perfect sense to you is indeed your code ;-)\n\n> OK, so I guess I'm ready for the 'final touch', my NonStop\n> specific changes, will post them shortly...\n"},{"id":"199342","messageId":"000301cd956b$8f29c110$ad7d4330$@schmitz-digital.de","threadId":"31572","inReplyTo":"7vehlzq0r3.fsf@alter.siamese.dyndns.org","subject":"RE: [PATCH v7 1/4] make poll available for other platforms lacking it","fromName":"Joachim Schmitz","fromEmail":"jojo@schmitz-digital.de","sentAt":"2012-09-18T07:02:24Z","receivedAt":"2012-09-18T07:02:24Z","isPatch":true,"sender":{"key":"jojo@schmitz-digital.de","avatar":"https://avatars.githubusercontent.com/u/1786669?v=4"},"body":"> From: Junio C Hamano [mailto:gitster@pobox.com]\n> Sent: Tuesday, September 18, 2012 8:55 AM\n> To: Joachim Schmitz\n> Cc: git@vger.kernel.org\n> Subject: Re: [PATCH v7 1/4] make poll available for other platforms lacking it\n> \n> \"Joachim Schmitz\" <jojo@schmitz-digital.de> writes:\n> \n> >> > @@ -1605,6 +1610,11 @@ ifdef NO_GETTEXT\n> >> >  \tBASIC_CFLAGS += -DNO_GETTEXT\n> >> >  \tUSE_GETTEXT_SCHEME ?= fallthrough\n> >> >  endif\n> >> > +ifdef NO_POLL\n> >> > +\tNO_SYS_POLL_H = YesPlease\n> >> > +\tCOMPAT_CFLAGS += -DNO_POLL -Icompat/poll\n> >> > +\tCOMPAT_OBJS += compat/poll/poll.o\n> >> > +endif\n> >>\n> >> I think my guesses above are correct, so will queue with the trivial\n> >> and obvious fixup.\n> >\n> > Well I was unde the impression that is <sys/poll.h> isn't\n> > available, there might be a <poll.h> and it that isn't available\n> > either we use compat/.../poll.[ch]. But rethinking your changed\n> > does makes perfect sense.\n> \n> Heh, my comment was not about names between NO_POLL_H vs NO_POLL.\n> With the way you wrote the code, the symbols defined for Windows and\n> MINGW must match what controls the hunk around ll.1610, so what\n> makes perfect sense to you is indeed your code ;-)\n\nYeah, I do understand myself pretty good ;-)\nNow I see my typo...\n"}]}