cvs commit: ports/editors/emacs-devel Makefile distinfo ports/editors/emacs-devel/files patch-Makefile.in patch-configure patch-configure.in patch-doc-emacs-Makefile.in patch-doc-lispintro-Makefile.in patch-doc-lispref-Makefile.in patch-doc-misc-Makefile.in patch-src_config.in

Pan Tsu inyaoo at gmail.com
Sun May 1 02:59:14 UTC 2011


ashish at freebsd.org (Ashish SHUKLA) writes:

> Pan Tsu writes:
>> - Any reason to use autogen.sh instead of relying on AUTOTOOLS?
>
> Because autogen.sh works fine, and is provided by the upstream to configure
> the sources. So, I prefer to use upstream, unless it behaves badly.

It makes sure autotools use and dependencies are tracked properly by the
ports framework. For example, autoreconf (from autogen.sh) invokes
autoheader which you did not specify in AUTOTOOLS.

>> - Why patch-src_config.in was lost and not converted to patch-configure.in?
>
> As I see, in src/config.in (excerpt is pasted below) which get generated
> already includes "stdlib.h", so I don't see any need of the re-including it,
> unless you think it causes some issue.

Including stdlib.h makes sure both alloca(3) and _STDLIB_H_ are defined
at that point and no prior or future explicit inclusion of stdlib.h
redefines it. The warning described ports/149049 is still present

  $ make
  gcc46 -DHAVE_CONFIG_H -I. -I../src -I/work/emacs-24.0.50.104000/src   -I/usr/local/include  -O2 -pipe -fno-strict-aliasing -MT mktime.o -MD -MP -MF .deps/mktime.Tpo -c -o mktime.o mktime.c
  In file included from mktime.c:25:0:
  ../src/config.h:1355:0: warning: "alloca" redefined [enabled by default]
  /usr/local/lib/gcc46/gcc/x86_64-portbld-freebsd9.0/4.6.1/include-fixed/stdlib.h:250:0: note: this is the location of the previous definition
  mv -f .deps/mktime.Tpo .deps/mktime.P

and stems from...

>
> --8<---------------cut here---------------start------------->8---
> /* Define if the compiler supports function prototypes.  It may do so but
>    not define __STDC__ (e.g. DEC C by default) or may define it as zero.  */
> #undef PROTOTYPES
>
> #include <string.h>
> #include <stdlib.h>
>
> #ifdef HAVE_ALLOCA_H
> # include <alloca.h>
> #elif defined __FreeBSD__
> #include <stdlib.h>

> #elif defined __GNUC__
> # define alloca __builtin_alloca

this definition for gcc/clang/pcc/etc.

> #elif defined _AIX
> # define alloca __alloca
> #else
> # include <stddef.h>
> # ifdef  __cplusplus
> extern "C"
> # endif
> void *alloca (size_t);
> #endif
> --8<---------------cut here---------------end--------------->8---

As HAVE_STDLIB_H is gone since r101711 HAVE_ALLOCA_H can be completely
ignored on FreeBSD.

%%
Index: editors/emacs-devel/files/patch-configure.in
===================================================================
RCS file: /a/.cvsup/ports/editors/emacs-devel/files/patch-configure.in,v
retrieving revision 1.6
diff -u -p -r1.6 patch-configure.in
--- editors/emacs-devel/files/patch-configure.in	28 Apr 2011 15:08:25 -0000	1.6
+++ editors/emacs-devel/files/patch-configure.in	1 May 2011 02:50:27 -0000
@@ -44,3 +44,20 @@ $FreeBSD: ports/editors/emacs-devel/file
       case "$opsys" in
         dnl defined __FreeBSD__ || defined __NetBSD__ || defined __linux__
         gnu-linux|freebsd|netbsd)
+@@ -3550,6 +3550,7 @@
+ #include <string.h>
+ #include <stdlib.h>
+ 
++#ifndef __FreeBSD__
+ #ifdef HAVE_ALLOCA_H
+ # include <alloca.h>
+ #elif defined __GNUC__
+@@ -3563,6 +3564,7 @@
+ # endif
+ void *alloca (size_t);
+ #endif
++#endif
+ 
+ #ifndef HAVE_STRCHR
+ #define strchr(a, b) index (a, b)
+
%%


More information about the cvs-all mailing list