emacs-devel
[Top][All Lists]
Advanced

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

Re: EXIT_SUCCESS and NO_RETURN in /lib-src


From: William Xue
Subject: Re: EXIT_SUCCESS and NO_RETURN in /lib-src
Date: Tue, 13 Feb 2007 11:07:26 +0800
User-agent: Opera Mail/9.20 (Win32)

On Tue, 13 Feb 2007 04:46:02 +0800, Eli Zaretskii <address@hidden> wrote:

Date: Mon, 12 Feb 2007 14:33:49 +0800
From: "William Xue" <address@hidden>

I build emacs-unicode-2 in winxp with MinGW, and it failed in /lib-src.

It says that the compile could not find the definition of EXIT_* and
NO_RETURN in hexl.c and ebrowser.c and sorted-doc.c.

In hexl.c, I added
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif

Can you explain why this problem doesn't happen on HEAD?  AFAICS, the
MinGW build of Emacs pulls in stdlib.h from src/s/ms-w32.h, which is
included by config.h.  Can you see why this doesn't happen for you?

in ebrowser.c, I added
#define NO_RETURN

Shouldn't be needed, either: NO_RETURN is defined in config.h.

NO_RETURN is defined in config.h, like this:

474 #ifndef NO_RETURN
475 #if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR >= 5))
476 #define NO_RETURN       __attribute__ ((__noreturn__))
477 #else
478 #define NO_RETURN       /* nothing */
479 #endif
480 #endif

maybe is skipped by line 475.


and in sorted-doc.c, I added
#else
#include <stdlib.h>
#endif
in #ifndef HAVE_STDLIB_H

Same here.  It sounds like your compilation doesn't include config.h
for some reason, or maybe config.h is empty.  Please try to see why.


IMHO, config.h was included. But could you teld how to confirm it?

Info: resolving __sys_nerr by linking to __imp___sys_nerr (auto-import)
Info: resolving __sys_errlist by linking to __imp___sys_errlist
(auto-import)
oo-spd/i386/movemail.o(.text+0x358):movemail.c: undefined reference to
`link'
fu000001.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
fu000003.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
nmth000000.o(.idata$4+0x0): undefined reference to `_nm___sys_nerr'
nmth000002.o(.idata$4+0x0): undefined reference to `_nm___sys_errlist'
mingw32-make: *** [oo-spd/i386/movemail.exe] Error 1

Probably for the same reason: the Windows build is not supposed to
compile the code that uses the `link' function.

I havn't known how to resolve this problem.

--
Sincerely yours,
William




reply via email to

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