emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unexmacosx.c and limits.h problem


From: Paul Eggert
Subject: Re: unexmacosx.c and limits.h problem
Date: Sat, 17 Sep 2016 11:14:10 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Eli Zaretskii wrote:
Which to me sounds like lib/limits.h is not a good place to define
these constants, or at least Emacs shouldn't rely on Gnulib's limits.h
to do its magic on all systems.

The ISO technical spec says the settings should go into <limits.h>, and if we put them somewhere else that will just make things more confusing in the long run.

I installed the attached patch, which should fix the immediate problem.

The fundamental problem here is that Emacs <config.h> over the years has bloated to contain many things that it should not. <config.h> should always be included first -- this is a key assumption of Autoconf and Gnulib -- and should contain only stuff that can appear in an included-first file. It should therefore not contain things like "#include <stdlib.h>" that can cause trouble in the cases we're talking about.

It's understandable why config.h has bloated, as it's a convenient catchall for stuff that has to be visible "everywhare" at the C level. The visibility-"everywhere" problem needs to be addressed in some other way, that's all. I'll look into fixing this.

Attachment: 0001-Define-_GNU_SOURCE-in-files-delaying-config.h.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]