From: Junio C Hamano <junkio@cox.net>
To: Gerrit Pape <pape@smarden.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Build on Debian GNU/Hurd
Date: Fri, 15 Sep 2006 22:35:57 -0700 [thread overview]
Message-ID: <7vr6yce5ky.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20060915125846.10469.qmail@ccc765dd61a02d.315fe32.mid.smarden.org> (Gerrit Pape's message of "Fri, 15 Sep 2006 12:58:46 +0000")
Gerrit Pape <pape@smarden.org> writes:
> Patch from Cyril Brulebois to make the build process detect and support the
> Debian GNU/Hurd architecture, see
> http://bugs.debian.org/379841
>
> Signed-off-by: Gerrit Pape <pape@smarden.org>
>
> +ifeq ($(uname_S),GNU)
> + # GNU stands for GNU/Hurd
> + NO_STRLCPY = YesPlease
> + ALL_CFLAGS += -DPATH_MAX=4096
> +endif
Two questions come to mind. (1) Does GNU stand for GNU/Hurd and
nobody else? (2) Does everybody else have PATH_MAX?
Adding NO_STRLCPY I do not have much problems with, but
something like the attached may be cleaner to deal with PATH_MAX;
of course now there is an issue of what the appropriate value
for that symbol should be.
Would including git-compat-util.h in builtin.h break somebody?
-- >8 --
Define fallback PATH_MAX on systems that do not define one in <limits.h>
Notably GNU/Hurd, as reported by Gerrit Pape.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
diff --git a/git-compat-util.h b/git-compat-util.h
index 552b8ec..0272d04 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -26,6 +26,13 @@ #include <netinet/in.h>
#include <sys/types.h>
#include <dirent.h>
+/* On most systems <limits.h> would have given us this, but
+ * not on some systems (e.g. GNU/Hurd).
+ */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
#ifdef __GNUC__
#define NORETURN __attribute__((__noreturn__))
#else
diff --git a/builtin.h b/builtin.h
index 34ed7b9..1d41f83 100644
--- a/builtin.h
+++ b/builtin.h
@@ -1,8 +1,7 @@
#ifndef BUILTIN_H
#define BUILTIN_H
-#include <stdio.h>
-#include <limits.h>
+#include "git-compat-util.h"
extern const char git_version_string[];
extern const char git_usage_string[];
next prev parent reply other threads:[~2006-09-16 5:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-15 12:58 [PATCH] Build on Debian GNU/Hurd Gerrit Pape
2006-09-15 15:47 ` Martin Waitz
2006-09-16 5:35 ` Junio C Hamano [this message]
2006-09-19 17:03 ` Gerrit Pape
2006-09-21 17:37 ` Ramsay Jones
2006-09-21 17:53 ` Linus Torvalds
2006-09-22 17:22 ` Ramsay Jones
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=7vr6yce5ky.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=pape@smarden.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).