* fc046a75d539a78e6b2c16534c4078617a69a327 fails on OpenBSD 3.8
@ 2006-06-30 16:57 Randal L. Schwartz
2006-06-30 17:06 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Randal L. Schwartz @ 2006-06-30 16:57 UTC (permalink / raw)
To: git
gcc -o upload-pack.o -c -g -O2 -Wall -I/usr/local/include -DSHA1_HEADER='<openssl/sha.h>' -DNO_STRCASESTR upload-pack.c
In file included from /usr/include/sys/poll.h:54,
from upload-pack.c:9:
/usr/include/ctype.h:67: error: syntax error before ']' token
/usr/include/ctype.h:68: error: syntax error before ']' token
/usr/include/ctype.h:70: error: syntax error before ']' token
/usr/include/ctype.h:75: error: syntax error before ']' token
/usr/include/ctype.h:78: error: syntax error before '(' token
/usr/include/ctype.h:79: error: syntax error before '(' token
/usr/include/ctype.h:93: error: syntax error before "c"
In file included from /usr/include/sys/poll.h:54,
from upload-pack.c:9:
/usr/include/ctype.h:91:1: unterminated #if
/usr/include/ctype.h:40:1: unterminated #ifndef
In file included from upload-pack.c:9:
/usr/include/sys/poll.h:53:1: unterminated #ifndef
/usr/include/sys/poll.h:28:1: unterminated #ifndef
gmake: *** [upload-pack.o] Error 1
The lines in ctype.h that are probably relevant are:
#if defined(__GNUC__) || defined(_ANSI_LIBRARY) || defined(lint)
int isalnum(int);
int isalpha(int);
int iscntrl(int);
int isdigit(int);
int isgraph(int);
int islower(int);
int isprint(int);
int ispunct(int);
int isspace(int);
int isupper(int);
int isxdigit(int);
int tolower(int);
int toupper(int);
Line 67 is "int isalnum(int)"
Are you defining a macro when you shouldn't be in upload-pack?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: fc046a75d539a78e6b2c16534c4078617a69a327 fails on OpenBSD 3.8
2006-06-30 16:57 fc046a75d539a78e6b2c16534c4078617a69a327 fails on OpenBSD 3.8 Randal L. Schwartz
@ 2006-06-30 17:06 ` Junio C Hamano
2006-06-30 17:09 ` Randal L. Schwartz
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2006-06-30 17:06 UTC (permalink / raw)
To: git
merlyn@stonehenge.com (Randal L. Schwartz) writes:
> gcc -o upload-pack.o -c -g -O2 -Wall -I/usr/local/include -DSHA1_HEADER='<openssl/sha.h>' -DNO_STRCASESTR upload-pack.c
> In file included from /usr/include/sys/poll.h:54,
> from upload-pack.c:9:
> /usr/include/ctype.h:67: error: syntax error before ']' token
> /usr/include/ctype.h:68: error: syntax error before ']' token
> /usr/include/ctype.h:70: error: syntax error before ']' token
> /usr/include/ctype.h:75: error: syntax error before ']' token
> /usr/include/ctype.h:78: error: syntax error before '(' token
> /usr/include/ctype.h:79: error: syntax error before '(' token
> /usr/include/ctype.h:93: error: syntax error before "c"
> In file included from /usr/include/sys/poll.h:54,
> from upload-pack.c:9:
> /usr/include/ctype.h:91:1: unterminated #if
> /usr/include/ctype.h:40:1: unterminated #ifndef
Crap. Including <sys/poll.h> pollutes your namespace with ctype
macros?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: fc046a75d539a78e6b2c16534c4078617a69a327 fails on OpenBSD 3.8
2006-06-30 17:06 ` Junio C Hamano
@ 2006-06-30 17:09 ` Randal L. Schwartz
2006-06-30 17:38 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Randal L. Schwartz @ 2006-06-30 17:09 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
>>>>> "Junio" == Junio C Hamano <junkio@cox.net> writes:
Junio> merlyn@stonehenge.com (Randal L. Schwartz) writes:
>> gcc -o upload-pack.o -c -g -O2 -Wall -I/usr/local/include -DSHA1_HEADER='<openssl/sha.h>' -DNO_STRCASESTR upload-pack.c
>> In file included from /usr/include/sys/poll.h:54,
>> from upload-pack.c:9:
>> /usr/include/ctype.h:67: error: syntax error before ']' token
>> /usr/include/ctype.h:68: error: syntax error before ']' token
>> /usr/include/ctype.h:70: error: syntax error before ']' token
>> /usr/include/ctype.h:75: error: syntax error before ']' token
>> /usr/include/ctype.h:78: error: syntax error before '(' token
>> /usr/include/ctype.h:79: error: syntax error before '(' token
>> /usr/include/ctype.h:93: error: syntax error before "c"
>> In file included from /usr/include/sys/poll.h:54,
>> from upload-pack.c:9:
>> /usr/include/ctype.h:91:1: unterminated #if
>> /usr/include/ctype.h:40:1: unterminated #ifndef
Junio> Crap. Including <sys/poll.h> pollutes your namespace with ctype
Junio> macros?
>From /usr/include/sys/poll.h:
#ifndef _KERNEL
#include <ctype.h>
So, I guess, it's ... Yes.
This sounds familiar. Maybe the mailing list archive has me reporting
this bug last time too. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: fc046a75d539a78e6b2c16534c4078617a69a327 fails on OpenBSD 3.8
2006-06-30 17:09 ` Randal L. Schwartz
@ 2006-06-30 17:38 ` Junio C Hamano
2006-06-30 18:30 ` [PATCH/RFT] upload-pack.c: <sys/poll.h> includes <ctype.h> " Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2006-06-30 17:38 UTC (permalink / raw)
To: Randal L. Schwartz; +Cc: git
merlyn@stonehenge.com (Randal L. Schwartz) writes:
>>>>>> "Junio" == Junio C Hamano <junkio@cox.net> writes:
>...
>>> In file included from /usr/include/sys/poll.h:54,
>>> from upload-pack.c:9:
>>> /usr/include/ctype.h:91:1: unterminated #if
>>> /usr/include/ctype.h:40:1: unterminated #ifndef
>
> Junio> Crap. Including <sys/poll.h> pollutes your namespace with ctype
> Junio> macros?
I should stop imitating others -- not my style. Sorry.
Would this work for you?
diff --git a/upload-pack.c b/upload-pack.c
index 2b70c3d..b18eb9b 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -1,3 +1,6 @@
+#include <signal.h>
+#include <sys/wait.h>
+#include <sys/poll.h>
#include "cache.h"
#include "refs.h"
#include "pkt-line.h"
@@ -5,9 +8,6 @@ #include "tag.h"
#include "object.h"
#include "commit.h"
#include "exec_cmd.h"
-#include <signal.h>
-#include <sys/poll.h>
-#include <sys/wait.h>
static const char upload_pack_usage[] = "git-upload-pack [--strict] [--timeout=nn] <dir>";
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH/RFT] upload-pack.c: <sys/poll.h> includes <ctype.h> on OpenBSD 3.8
2006-06-30 17:38 ` Junio C Hamano
@ 2006-06-30 18:30 ` Junio C Hamano
2006-06-30 19:00 ` Jakub Narebski
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2006-06-30 18:30 UTC (permalink / raw)
To: git; +Cc: Randal L. Schwartz
Merlyn reports that <sys/poll.h> on OpenBSD 3.8 includes <ctype.h>
and having our custom ctype (done in git-compat-util.h which is
included via cache.h) makes upload-pack.c uncompilable. Try to
work it around by including the system headers first.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
* Can somebody with OpenBSD who can reproduce the original
problem confirm or reject this patch, so that the issue can
be resolved before 1.4.1, please?
diff --git a/upload-pack.c b/upload-pack.c
index 2b70c3d..b18eb9b 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -1,3 +1,6 @@
+#include <signal.h>
+#include <sys/wait.h>
+#include <sys/poll.h>
#include "cache.h"
#include "refs.h"
#include "pkt-line.h"
@@ -5,9 +8,6 @@ #include "tag.h"
#include "object.h"
#include "commit.h"
#include "exec_cmd.h"
-#include <signal.h>
-#include <sys/poll.h>
-#include <sys/wait.h>
static const char upload_pack_usage[] = "git-upload-pack [--strict] [--timeout=nn] <dir>";
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH/RFT] upload-pack.c: <sys/poll.h> includes <ctype.h> on OpenBSD 3.8
2006-06-30 18:30 ` [PATCH/RFT] upload-pack.c: <sys/poll.h> includes <ctype.h> " Junio C Hamano
@ 2006-06-30 19:00 ` Jakub Narebski
0 siblings, 0 replies; 6+ messages in thread
From: Jakub Narebski @ 2006-06-30 19:00 UTC (permalink / raw)
To: git
Junio C Hamano wrote:
> Try to work it around by including the system headers first.
Shouldn't it be always the case?
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-06-30 19:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-30 16:57 fc046a75d539a78e6b2c16534c4078617a69a327 fails on OpenBSD 3.8 Randal L. Schwartz
2006-06-30 17:06 ` Junio C Hamano
2006-06-30 17:09 ` Randal L. Schwartz
2006-06-30 17:38 ` Junio C Hamano
2006-06-30 18:30 ` [PATCH/RFT] upload-pack.c: <sys/poll.h> includes <ctype.h> " Junio C Hamano
2006-06-30 19:00 ` Jakub Narebski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.