unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "William Xue" <william.xue@gmail.com>
To: "Eli Zaretskii" <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: EXIT_SUCCESS and NO_RETURN in /lib-src
Date: Tue, 13 Feb 2007 14:11:29 +0800	[thread overview]
Message-ID: <op.tnobhfo8hkv0w5@williamnb> (raw)
In-Reply-To: <uabzi65w4.fsf@gnu.org>

On Tue, 13 Feb 2007 12:25:15 +0800, Eli Zaretskii <eliz@gnu.org> wrote:

>> Date: Tue, 13 Feb 2007 11:07:26 +0800
>> From: "William Xue" <william.xue@gmail.com>
>> Cc: emacs-devel@gnu.org
>> >
>> >> 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.
>
> ??? You did say you use MinGW, didn't you?  If so, your compiler is
> GCC, which defines __GNUC__, and I cannot believe your GCC version is
> less than 2.5.  What does "gcc --version" say?

It is 3.2.3
---8<--------------------------------------------->8---
F:\MinGW\bin>gcc.exe --version
gcc.exe (GCC) 3.2.3 (mingw special 20030504-1)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
---8<--------------------------------------------->8---

I have found something in makefile:
---8<--------------------------------------------->8---
315 LOCAL_FLAGS     = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
316                   -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \
317                   -I../src
---8<--------------------------------------------->8---
when run configure.bat in nt folder, I have specified '--cflags -I./inc'.
After I removed the -I../nt/inc in the makefile in lib-src folder, the  
build is OK.

It seems that only one -I flag allowed in this situation.
I specified the include path because I put all the graphic's header  
files(gif, bmp, jpg, tiff, etc) in there.

I did not know many about the flags in MinGW and GCC. Is there something  
wrong or it is the limitation of the compiler?

>
>> IMHO, config.h was included.  But could you teld how to confirm it?
>
> Add to it an #error directive, and see if GCC emits the error
> message.  Add that directive at the beginning, then at the end, and
> see if the file is used in its entirety.
>
>> >> 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.
>
> I think when you find and solve the other problems, this one will be
> solved with them.

if removed the -I../nt/inc from makefile,
'mingw32-make movemail' make the following errors:
---8<--------------------------------------------->8---
gcc -o oo-spd/i386/movemail.exe   -mno-cygwin  oo-spd/i386/movemail.o  
oo-spd/i38
6/pop.o oo-spd/i386/ntlib.o oo-spd/i386/getopt.o oo-spd/i386/getopt1.o  
-lwsock32
    -ladvapi32
oo-spd/i386/movemail.o(.text+0x86d):movemail.c: undefined reference to  
`pop_open
'
oo-spd/i386/movemail.o(.text+0x88d):movemail.c: undefined reference to  
`pop_stat
'
oo-spd/i386/movemail.o(.text+0x8a4):movemail.c: undefined reference to  
`pop_clos
e'
oo-spd/i386/movemail.o(.text+0x9c1):movemail.c: undefined reference to  
`pop_quit
'
oo-spd/i386/movemail.o(.text+0x9d9):movemail.c: undefined reference to  
`pop_erro
r'
oo-spd/i386/movemail.o(.text+0xa08):movemail.c: undefined reference to  
`pop_dele
te'
---8<--------------------------------------------->8---

if not remvove the flag, make the following errors:
---8<--------------------------------------------->8---
../src/process.h:81: parse error before "update_tick"
../src/process.h:83: parse error before "decode_coding_system"
../src/process.h:85: parse error before "decoding_buf"
../src/process.h:87: parse error before "decoding_carryover"
../src/process.h:89: parse error before "encode_coding_system"
../src/process.h:91: parse error before "encoding_buf"
../src/process.h:93: parse error before "encoding_carryover"
../src/process.h:96: parse error before "inherit_coding_system_flag"
../src/process.h:102: parse error before "filter_multibyte"
../src/process.h:105: parse error before "adaptive_read_buffering"
../src/process.h:112: parse error before "read_output_delay"
../src/process.h:114: parse error before "read_output_skip"
../src/process.h:126: parse error before ':' token
../src/process.h:128: parse error before '}' token
../src/process.h:136: parse error before "chan_process"
../src/process.h:139: parse error before "Vprocess_alist"
In file included from movemail.c:90:
ntlib.h:24:17: pwd.h: No such file or directory
movemail.c:690:17: pwd.h: No such file or directory
../src/process.h:136: warning: array `chan_process' assumed to have one  
element
mingw32-make: *** [oo-spd/i386/movemail.o] Error 1
---8<--------------------------------------------->8---

I'll still try these things.
-- 
Sincerely yours,
William

  reply	other threads:[~2007-02-13  6:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-12  6:33 EXIT_SUCCESS and NO_RETURN in /lib-src William Xue
2007-02-12 20:46 ` Eli Zaretskii
2007-02-13  3:07   ` William Xue
2007-02-13  4:25     ` Eli Zaretskii
2007-02-13  6:11       ` William Xue [this message]
2007-02-13  9:09         ` Juanma Barranquero
2007-02-13  9:15           ` William Xue
2007-02-13  9:20             ` Juanma Barranquero
2007-02-14  2:22           ` William Xue
2007-02-14  2:34             ` Juanma Barranquero
2007-02-14  2:44               ` William Xue
2007-02-14  2:58                 ` Juanma Barranquero
2007-02-15  1:52                   ` William Xue
2007-02-14 15:13             ` Eli Zaretskii
2007-02-14 14:53         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=op.tnobhfo8hkv0w5@williamnb \
    --to=william.xue@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).