* Re: What's cooking in git.git (Dec 2012, #04; Sun, 16)
@ 2012-12-17 21:37 Matt Kraai
2012-12-18 8:28 ` Joachim Schmitz
2012-12-18 8:38 ` Johannes Sixt
0 siblings, 2 replies; 9+ messages in thread
From: Matt Kraai @ 2012-12-17 21:37 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Junio C Hamano wrote:
> It could turn out that we may be able to get rid of sys/param.h
> altogether, but one step at a time. Inputs from people on minority
> platforms are very much appreciated---does your platform build fine
> when the inclusion of the file is removed from git-compat-util.h?
QNX builds fine when sys/param.h is not included.
--
Matt Kraai
https://ftbfs.org/kraai
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: What's cooking in git.git (Dec 2012, #04; Sun, 16)
2012-12-17 21:37 What's cooking in git.git (Dec 2012, #04; Sun, 16) Matt Kraai
@ 2012-12-18 8:28 ` Joachim Schmitz
2012-12-18 8:38 ` Johannes Sixt
1 sibling, 0 replies; 9+ messages in thread
From: Joachim Schmitz @ 2012-12-18 8:28 UTC (permalink / raw)
To: git
Matt Kraai wrote:
> Junio C Hamano wrote:
>> It could turn out that we may be able to get rid of sys/param.h
>> altogether, but one step at a time. Inputs from people on minority
>> platforms are very much appreciated---does your platform build fine
>> when the inclusion of the file is removed from git-compat-util.h?
>
> QNX builds fine when sys/param.h is not included.
HP-NonStop build fine too without it.
Bye, Jojo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: What's cooking in git.git (Dec 2012, #04; Sun, 16)
2012-12-17 21:37 What's cooking in git.git (Dec 2012, #04; Sun, 16) Matt Kraai
2012-12-18 8:28 ` Joachim Schmitz
@ 2012-12-18 8:38 ` Johannes Sixt
2012-12-18 17:01 ` sys/param.h Junio C Hamano
1 sibling, 1 reply; 9+ messages in thread
From: Johannes Sixt @ 2012-12-18 8:38 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
> Junio C Hamano wrote:
>> It could turn out that we may be able to get rid of sys/param.h
>> altogether, but one step at a time. Inputs from people on minority
>> platforms are very much appreciated---does your platform build fine
>> when the inclusion of the file is removed from git-compat-util.h?
MinGW works fine with sys/param.h removed from git-compat-util.h.
-- Hannes
^ permalink raw reply [flat|nested] 9+ messages in thread
* sys/param.h
2012-12-18 8:38 ` Johannes Sixt
@ 2012-12-18 17:01 ` Junio C Hamano
2012-12-18 17:35 ` [RFH/PATCH] git-compat-util.h: do not #include <sys/param.h> by default Junio C Hamano
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Junio C Hamano @ 2012-12-18 17:01 UTC (permalink / raw)
To: git
Johannes Sixt <j.sixt@viscovery.net> writes:
>> Junio C Hamano wrote:
>>> It could turn out that we may be able to get rid of sys/param.h
>>> altogether, but one step at a time. Inputs from people on minority
>>> platforms are very much appreciated---does your platform build fine
>>> when the inclusion of the file is removed from git-compat-util.h?
>
> MinGW works fine with sys/param.h removed from git-compat-util.h.
It seems that OpenBSD 5.2 does not mind it getting removed, either.
Debian 5 and Debian 6 seem OK; so do Ubuntu 10.04 and 12.04. I have
a hunch that Fedora or anything based on glibc would be fine, too.
What other platforms do we care deeply about?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFH/PATCH] git-compat-util.h: do not #include <sys/param.h> by default
2012-12-18 17:01 ` sys/param.h Junio C Hamano
@ 2012-12-18 17:35 ` Junio C Hamano
2012-12-18 19:46 ` sys/param.h Torsten Bögershausen
2012-12-19 7:59 ` sys/param.h Erik Faye-Lund
2 siblings, 0 replies; 9+ messages in thread
From: Junio C Hamano @ 2012-12-18 17:35 UTC (permalink / raw)
To: git
Earlier we allowed platforms that lack <sys/param.h> not to include
the header file from git-compat-util.h; we have included this header
file since the early days back when we used MAXPATHLEN (which we no
longer use) and also depended on it slurping ULONG_MAX (which we get
by including stdint.h or inttypes.h these days).
It turns out that we can compile our modern codebase just file
without including it on many platforms (so far, Debian, Ubuntu,
MinGW, HP-Nonstop, QNX and z/OS are reported to be OK).
Let's stop including it by default, and on platforms that need it to
be included, leave "make NEEDS_SYS_PARAM_H=YesPlease" as an escape
hatch and ask them to report to us, so that we can find out about
the real dependency and fix it in a more platform agnostic way.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
* I'd propose queuing this on top of dm/port topic, cook it in
'next' for a while and then unleash it to the public.
Makefile | 8 +++++---
configure.ac | 6 ------
git-compat-util.h | 2 +-
3 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile
index 5cd1de0..2c1f04f 100644
--- a/Makefile
+++ b/Makefile
@@ -167,7 +167,9 @@ all::
# Define NO_POLL if you do not have or don't want to use poll().
# This also implies NO_SYS_POLL_H.
#
-# Define NO_SYS_PARAM_H if you don't have sys/param.h.
+# Define NEEDS_SYS_PARAM_H if you need to include sys/param.h to compile,
+# *PLEASE* REPORT to git@vger.kernel.org if your platform needs this;
+# we want to know more about the issue.
#
# Define NO_PTHREADS if you do not have or do not want to use Pthreads.
#
@@ -1747,8 +1749,8 @@ endif
ifdef NO_SYS_POLL_H
BASIC_CFLAGS += -DNO_SYS_POLL_H
endif
-ifdef NO_SYS_PARAM_H
- BASIC_CFLAGS += -DNO_SYS_PARAM_H
+ifdef NEEDS_SYS_PARAM_H
+ BASIC_CFLAGS += -DNEEDS_SYS_PARAM_H
endif
ifdef NO_INTTYPES_H
BASIC_CFLAGS += -DNO_INTTYPES_H
diff --git a/configure.ac b/configure.ac
index e3ab6fe..8fbb533 100644
--- a/configure.ac
+++ b/configure.ac
@@ -699,12 +699,6 @@ AC_CHECK_HEADER([sys/poll.h],
[NO_SYS_POLL_H=UnfortunatelyYes])
GIT_CONF_SUBST([NO_SYS_POLL_H])
#
-# Define NO_SYS_PARAM_H if you don't have sys/param.h
-AC_CHECK_HEADER([sys/param.h],
-[NO_SYS_PARAM_H=],
-[NO_SYS_PARAM_H=UnfortunatelyYes])
-GIT_CONF_SUBST([NO_SYS_PARAM_H])
-#
# Define NO_INTTYPES_H if you don't have inttypes.h
AC_CHECK_HEADER([inttypes.h],
[NO_INTTYPES_H=],
diff --git a/git-compat-util.h b/git-compat-util.h
index d7359ef..a88147b 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -104,7 +104,7 @@
#endif
#include <errno.h>
#include <limits.h>
-#ifndef NO_SYS_PARAM_H
+#ifdef NEEDS_SYS_PARAM_H
#include <sys/param.h>
#endif
#include <sys/types.h>
--
1.8.1.rc2.136.gb42b73a
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: sys/param.h
2012-12-18 17:01 ` sys/param.h Junio C Hamano
2012-12-18 17:35 ` [RFH/PATCH] git-compat-util.h: do not #include <sys/param.h> by default Junio C Hamano
@ 2012-12-18 19:46 ` Torsten Bögershausen
2012-12-19 7:59 ` sys/param.h Erik Faye-Lund
2 siblings, 0 replies; 9+ messages in thread
From: Torsten Bögershausen @ 2012-12-18 19:46 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On 18.12.12 18:01, Junio C Hamano wrote:
> Johannes Sixt <j.sixt@viscovery.net> writes:
>
>>> Junio C Hamano wrote:
>>>> It could turn out that we may be able to get rid of sys/param.h
>>>> altogether, but one step at a time. Inputs from people on minority
>>>> platforms are very much appreciated---does your platform build fine
>>>> when the inclusion of the file is removed from git-compat-util.h?
>>
>> MinGW works fine with sys/param.h removed from git-compat-util.h.
>
> It seems that OpenBSD 5.2 does not mind it getting removed, either.
> Debian 5 and Debian 6 seem OK; so do Ubuntu 10.04 and 12.04. I have
> a hunch that Fedora or anything based on glibc would be fine, too.
>
> What other platforms do we care deeply about?
Mac OS X 10.6.8: OK
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: sys/param.h
2012-12-18 17:01 ` sys/param.h Junio C Hamano
2012-12-18 17:35 ` [RFH/PATCH] git-compat-util.h: do not #include <sys/param.h> by default Junio C Hamano
2012-12-18 19:46 ` sys/param.h Torsten Bögershausen
@ 2012-12-19 7:59 ` Erik Faye-Lund
2012-12-20 2:49 ` sys/param.h Mark Levedahl
2 siblings, 1 reply; 9+ messages in thread
From: Erik Faye-Lund @ 2012-12-19 7:59 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Tue, Dec 18, 2012 at 6:01 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Johannes Sixt <j.sixt@viscovery.net> writes:
>
>>> Junio C Hamano wrote:
>>>> It could turn out that we may be able to get rid of sys/param.h
>>>> altogether, but one step at a time. Inputs from people on minority
>>>> platforms are very much appreciated---does your platform build fine
>>>> when the inclusion of the file is removed from git-compat-util.h?
>>
>> MinGW works fine with sys/param.h removed from git-compat-util.h.
>
> It seems that OpenBSD 5.2 does not mind it getting removed, either.
> Debian 5 and Debian 6 seem OK; so do Ubuntu 10.04 and 12.04. I have
> a hunch that Fedora or anything based on glibc would be fine, too.
And just to be sure; Fedora 17: OK.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: sys/param.h
2012-12-19 7:59 ` sys/param.h Erik Faye-Lund
@ 2012-12-20 2:49 ` Mark Levedahl
2012-12-20 3:03 ` sys/param.h Junio C Hamano
0 siblings, 1 reply; 9+ messages in thread
From: Mark Levedahl @ 2012-12-20 2:49 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, git
On 12/19/2012 02:59 AM, Erik Faye-Lund wrote:
> On Tue, Dec 18, 2012 at 6:01 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Johannes Sixt <j.sixt@viscovery.net> writes:
>>
>>>> Junio C Hamano wrote:
>>>>> It could turn out that we may be able to get rid of sys/param.h
>>>>> altogether, but one step at a time. Inputs from people on minority
>>>>> platforms are very much appreciated---does your platform build fine
>>>>> when the inclusion of the file is removed from git-compat-util.h?
cygwin is fine with that removed.
Mark
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: sys/param.h
2012-12-20 2:49 ` sys/param.h Mark Levedahl
@ 2012-12-20 3:03 ` Junio C Hamano
0 siblings, 0 replies; 9+ messages in thread
From: Junio C Hamano @ 2012-12-20 3:03 UTC (permalink / raw)
To: Mark Levedahl; +Cc: git
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-12-20 3:03 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-17 21:37 What's cooking in git.git (Dec 2012, #04; Sun, 16) Matt Kraai
2012-12-18 8:28 ` Joachim Schmitz
2012-12-18 8:38 ` Johannes Sixt
2012-12-18 17:01 ` sys/param.h Junio C Hamano
2012-12-18 17:35 ` [RFH/PATCH] git-compat-util.h: do not #include <sys/param.h> by default Junio C Hamano
2012-12-18 19:46 ` sys/param.h Torsten Bögershausen
2012-12-19 7:59 ` sys/param.h Erik Faye-Lund
2012-12-20 2:49 ` sys/param.h Mark Levedahl
2012-12-20 3:03 ` sys/param.h Junio C Hamano
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).