{"thread":{"id":"4721","subject":"fc046a75d539a78e6b2c16534c4078617a69a327 fails on OpenBSD 3.8","startedAt":"2006-06-30T16:57:03Z","lastAt":"2006-06-30T19:00:09Z","messageCount":6,"participants":["Randal L. Schwartz","Junio C Hamano","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"22929","messageId":"86wtayy42o.fsf@blue.stonehenge.com","threadId":"4721","inReplyTo":null,"subject":"fc046a75d539a78e6b2c16534c4078617a69a327 fails on OpenBSD 3.8","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2006-06-30T16:57:03Z","receivedAt":"2006-06-30T16:57:03Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":"\ngcc -o upload-pack.o -c -g -O2 -Wall -I/usr/local/include -DSHA1_HEADER='<openssl/sha.h>' -DNO_STRCASESTR upload-pack.c\nIn file included from /usr/include/sys/poll.h:54,\n                 from upload-pack.c:9:\n/usr/include/ctype.h:67: error: syntax error before ']' token\n/usr/include/ctype.h:68: error: syntax error before ']' token\n/usr/include/ctype.h:70: error: syntax error before ']' token\n/usr/include/ctype.h:75: error: syntax error before ']' token\n/usr/include/ctype.h:78: error: syntax error before '(' token\n/usr/include/ctype.h:79: error: syntax error before '(' token\n/usr/include/ctype.h:93: error: syntax error before \"c\"\nIn file included from /usr/include/sys/poll.h:54,\n                 from upload-pack.c:9:\n/usr/include/ctype.h:91:1: unterminated #if\n/usr/include/ctype.h:40:1: unterminated #ifndef\nIn file included from upload-pack.c:9:\n/usr/include/sys/poll.h:53:1: unterminated #ifndef\n/usr/include/sys/poll.h:28:1: unterminated #ifndef\ngmake: *** [upload-pack.o] Error 1\n\nThe lines in ctype.h that are probably relevant are:\n\n    #if defined(__GNUC__) || defined(_ANSI_LIBRARY) || defined(lint)\n    int\tisalnum(int);\n    int\tisalpha(int);\n    int\tiscntrl(int);\n    int\tisdigit(int);\n    int\tisgraph(int);\n    int\tislower(int);\n    int\tisprint(int);\n    int\tispunct(int);\n    int\tisspace(int);\n    int\tisupper(int);\n    int\tisxdigit(int);\n    int\ttolower(int);\n    int\ttoupper(int);\n\nLine 67 is \"int isalnum(int)\"\n\nAre you defining a macro when you shouldn't be in upload-pack?\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"298744","messageId":"7vy7veindn.fsf@assigned-by-dhcp.cox.net","threadId":"4721","inReplyTo":"86wtayy42o.fsf@blue.stonehenge.com","subject":"Re: fc046a75d539a78e6b2c16534c4078617a69a327 fails on OpenBSD 3.8","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-30T17:06:44Z","receivedAt":"2006-06-30T17:06:44Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"merlyn@stonehenge.com (Randal L. Schwartz) writes:\n\n> gcc -o upload-pack.o -c -g -O2 -Wall -I/usr/local/include -DSHA1_HEADER='<openssl/sha.h>' -DNO_STRCASESTR upload-pack.c\n> In file included from /usr/include/sys/poll.h:54,\n>                  from upload-pack.c:9:\n> /usr/include/ctype.h:67: error: syntax error before ']' token\n> /usr/include/ctype.h:68: error: syntax error before ']' token\n> /usr/include/ctype.h:70: error: syntax error before ']' token\n> /usr/include/ctype.h:75: error: syntax error before ']' token\n> /usr/include/ctype.h:78: error: syntax error before '(' token\n> /usr/include/ctype.h:79: error: syntax error before '(' token\n> /usr/include/ctype.h:93: error: syntax error before \"c\"\n> In file included from /usr/include/sys/poll.h:54,\n>                  from upload-pack.c:9:\n> /usr/include/ctype.h:91:1: unterminated #if\n> /usr/include/ctype.h:40:1: unterminated #ifndef\n\nCrap.  Including <sys/poll.h> pollutes your namespace with ctype\nmacros?\n"},{"id":"22931","messageId":"86sllmy3ia.fsf@blue.stonehenge.com","threadId":"4721","inReplyTo":"7vy7veindn.fsf@assigned-by-dhcp.cox.net","subject":"Re: fc046a75d539a78e6b2c16534c4078617a69a327 fails on OpenBSD 3.8","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2006-06-30T17:09:17Z","receivedAt":"2006-06-30T17:09:17Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Junio\" == Junio C Hamano <junkio@cox.net> writes:\n\nJunio> merlyn@stonehenge.com (Randal L. Schwartz) writes:\n>> gcc -o upload-pack.o -c -g -O2 -Wall -I/usr/local/include -DSHA1_HEADER='<openssl/sha.h>' -DNO_STRCASESTR upload-pack.c\n>> In file included from /usr/include/sys/poll.h:54,\n>> from upload-pack.c:9:\n>> /usr/include/ctype.h:67: error: syntax error before ']' token\n>> /usr/include/ctype.h:68: error: syntax error before ']' token\n>> /usr/include/ctype.h:70: error: syntax error before ']' token\n>> /usr/include/ctype.h:75: error: syntax error before ']' token\n>> /usr/include/ctype.h:78: error: syntax error before '(' token\n>> /usr/include/ctype.h:79: error: syntax error before '(' token\n>> /usr/include/ctype.h:93: error: syntax error before \"c\"\n>> In file included from /usr/include/sys/poll.h:54,\n>> from upload-pack.c:9:\n>> /usr/include/ctype.h:91:1: unterminated #if\n>> /usr/include/ctype.h:40:1: unterminated #ifndef\n\nJunio> Crap.  Including <sys/poll.h> pollutes your namespace with ctype\nJunio> macros?\n\n>From /usr/include/sys/poll.h:\n\n    #ifndef _KERNEL\n    #include <ctype.h>\n\nSo, I guess, it's ... Yes.\n\nThis sounds familiar.  Maybe the mailing list archive has me reporting\nthis bug last time too. :)\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"22934","messageId":"7vk66yilxd.fsf@assigned-by-dhcp.cox.net","threadId":"4721","inReplyTo":"86sllmy3ia.fsf@blue.stonehenge.com","subject":"Re: fc046a75d539a78e6b2c16534c4078617a69a327 fails on OpenBSD 3.8","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-30T17:38:06Z","receivedAt":"2006-06-30T17:38:06Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"merlyn@stonehenge.com (Randal L. Schwartz) writes:\n\n>>>>>> \"Junio\" == Junio C Hamano <junkio@cox.net> writes:\n>...\n>>> In file included from /usr/include/sys/poll.h:54,\n>>> from upload-pack.c:9:\n>>> /usr/include/ctype.h:91:1: unterminated #if\n>>> /usr/include/ctype.h:40:1: unterminated #ifndef\n>\n> Junio> Crap.  Including <sys/poll.h> pollutes your namespace with ctype\n> Junio> macros?\n\nI should stop imitating others -- not my style.  Sorry.\nWould this work for you?\n\ndiff --git a/upload-pack.c b/upload-pack.c\nindex 2b70c3d..b18eb9b 100644\n--- a/upload-pack.c\n+++ b/upload-pack.c\n@@ -1,3 +1,6 @@\n+#include <signal.h>\n+#include <sys/wait.h>\n+#include <sys/poll.h>\n #include \"cache.h\"\n #include \"refs.h\"\n #include \"pkt-line.h\"\n@@ -5,9 +8,6 @@ #include \"tag.h\"\n #include \"object.h\"\n #include \"commit.h\"\n #include \"exec_cmd.h\"\n-#include <signal.h>\n-#include <sys/poll.h>\n-#include <sys/wait.h>\n \n static const char upload_pack_usage[] = \"git-upload-pack [--strict] [--timeout=nn] <dir>\";\n \n"},{"id":"22943","messageId":"7vr716h4xm.fsf_-_@assigned-by-dhcp.cox.net","threadId":"4721","inReplyTo":"7vk66yilxd.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH/RFT] upload-pack.c: <sys/poll.h> includes <ctype.h> on OpenBSD 3.8","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-30T18:30:29Z","receivedAt":"2006-06-30T18:30:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Merlyn reports that <sys/poll.h> on OpenBSD 3.8 includes <ctype.h>\nand having our custom ctype (done in git-compat-util.h which is\nincluded via cache.h) makes upload-pack.c uncompilable.  Try to\nwork it around by including the system headers first.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n * Can somebody with OpenBSD who can reproduce the original\n   problem confirm or reject this patch, so that the issue can\n   be resolved before 1.4.1, please?\n\ndiff --git a/upload-pack.c b/upload-pack.c\nindex 2b70c3d..b18eb9b 100644\n--- a/upload-pack.c\n+++ b/upload-pack.c\n@@ -1,3 +1,6 @@\n+#include <signal.h>\n+#include <sys/wait.h>\n+#include <sys/poll.h>\n #include \"cache.h\"\n #include \"refs.h\"\n #include \"pkt-line.h\"\n@@ -5,9 +8,6 @@ #include \"tag.h\"\n #include \"object.h\"\n #include \"commit.h\"\n #include \"exec_cmd.h\"\n-#include <signal.h>\n-#include <sys/poll.h>\n-#include <sys/wait.h>\n \n static const char upload_pack_usage[] = \"git-upload-pack [--strict] [--timeout=nn] <dir>\";\n \n"},{"id":"22944","messageId":"e83sbc$4s0$1@sea.gmane.org","threadId":"4721","inReplyTo":"7vr716h4xm.fsf_-_@assigned-by-dhcp.cox.net","subject":"Re: [PATCH/RFT] upload-pack.c: <sys/poll.h> includes <ctype.h> on OpenBSD 3.8","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-06-30T19:00:09Z","receivedAt":"2006-06-30T19:00:09Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n\n> Try to work it around by including the system headers first.\n\nShouldn't it be always the case?\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"}]}