emacs-pretest-bug
[Top][All Lists]
Advanced

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

emacs Cann't be buildt with gcc 4


From: sangu
Subject: emacs Cann't be buildt with gcc 4
Date: Thu, 17 Mar 2005 21:59:21 +0900

[...]
gcc -D_BSD_SOURCE -DHAVE_CONFIG_H -I. -I../src
-I/usr/src/redhat/BUILD/emacs-22.0.50/lib-src
-I/usr/src/redhat/BUILD/emacs-22.0.50/lib-src/../src -Wl,-znocombreloc
-L/usr/X11R6/lib -D_BSD_SOURCE   -DMAIL_USE_LOCKF -O2 -Wall -g -pipe
-Wp,-D_FORTIFY_SOURCE=2 -m32 -march=athlon
/usr/src/redhat/BUILD/emacs-22.0.50/lib-src/emacsclient.c getopt.o getopt1.o
-DVERSION="\"22.0.50\"" -lc -o emacsclient
/usr/src/redhat/BUILD/emacs-22.0.50/lib-src/emacsclient.c:45:15: error: macro
"getcwd" requires 2 arguments, but only 1 given
/usr/src/redhat/BUILD/emacs-22.0.50/lib-src/emacsclient.c:45: error: 'getcwd'
redeclared as different kind of symbol
/usr/include/unistd.h:449: error: previous declaration of 'getcwd' was here
/usr/src/redhat/BUILD/emacs-22.0.50/lib-src/emacsclient.c: In function 'main':
/usr/src/redhat/BUILD/emacs-22.0.50/lib-src/emacsclient.c:458: error: called
object 'getcwd' is not a function
make[1]: *** [emacsclient] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/emacs-22.0.50/lib-src'
make: *** [lib-src] Error 2

-----
please see :
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=151260#c2
>From Jakub
Jelinek 
on 2005-03-17
07:34 EST




That's a bug in emacs.  POSIX allows getcwd (actually, most of its functions)
to be also defined as function-like macros.
If emacs wants to use getcwd for something else, it should either #undef getcwd
first or prevent its expansion as function-like macro (e.g. using (getcwd) (...)
instead of getcwd (...)).

----
$gcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-languages=c,c
++,objc,java,f95,ada --enable-java-awt=gtk
--host=i386-redhat-linuxThread model: posix
gcc version 4.0.0 20050314 (Red Hat 4.0.0-0.34)






reply via email to

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