From: Harald Maier <harald@maierh.de>
Subject: Problems Building Emacs-21.3 or Later with Mingw Runtime 3.2
Date: Thu, 26 Feb 2004 10:45:59 +0100 [thread overview]
Message-ID: <m3ad369ns8.fsf@ate.maierh> (raw)
[-- Attachment #1: Type: text/plain, Size: 124 bytes --]
Just for your info, I submit the following bug report (904946) to the
mingw maintainer at http://sourceforge.net.
Harald
[-- Attachment #2: stdio.bug.txt --]
[-- Type: text/plain, Size: 2758 bytes --]
I found two stdio.h issue during building NT emacs-21.3 or later with
the actual mingw runtime.
OS-Version is Windows 2000.
I am using the following packages:
- binutils-2.15.90-20040222-1.tar.gz
- mingw-runtime-3.2.tar.gz
- gcc-core-3.3.1-20030804-1.tar.gz
- w32api-2.5.tar.gz
1. The following line at 388 in the stdio.h file
,----
| _CRTIMP int __cdecl fileno (FILE*);
`----
causes the following compilation error:
,----
| gcc -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 -D_X86_=1 -c -g -mcpu=i686
| -O2 -Di386 -D_CRTAPI1=_cdecl -Demacs=1 -DWINDOWSNT -DDOS_NT -DHAVE_CONFIG_H -
| I../nt/inc -D_UCHAR_T -DHAVE_NTGUI=1 -DUSE_CRT_DLL=1 -o oo-spd/i386/lread.o lrea
| d.c
| In file included from s/ms-w32.h:394,
| from config.h:281,
| from lread.c:23:
| d:/usr/mingw-new/include/stdio.h:388: error: parse error before '*' token
| make.exe[1]: *** [oo-spd/i386/lread.o] Error 1
| make.exe[1]: Leaving directory `g:/cvs/emacs-cygwin/src'
`----
If I set the line 388 in comments then all works fine.
2. In the -O2 mode dumping emacs fails to due the inline getc
function in the stdio.h file.
During the emacs build process a bare emacs (temacs.exe) dumps itself
into the emacs.exe. During this phase emacs reads the byte compiled
lisp file into memory. By some of the byte compiled lisp files emacs
receives a end of file assertion because the inline 'getc' function of
the stdio.h file returns a character that is less zero. If I set the
function 'getc' in the stdio.h file into comments, so that the library
'getc' function is used, then all works fine.
Here the patched stdio.h file with that building emacs works:
*** stdio.h.orig Fri Oct 10 17:24:32 2003
--- stdio.h Thu Feb 26 10:00:12 2004
***************
*** 262,273 ****
#if !defined _MT
! __CRT_INLINE int __cdecl getc (FILE* __F)
! {
! return (--__F->_cnt >= 0)
! ? (int) *__F->_ptr++
! : _filbuf (__F);
! }
__CRT_INLINE int __cdecl putc (int __c, FILE* __F)
{
--- 262,273 ----
#if !defined _MT
! /* __CRT_INLINE int __cdecl getc (FILE* __F) */
! /* { */
! /* return (--__F->_cnt >= 0) */
! /* ? (int) *__F->_ptr++ */
! /* : _filbuf (__F); */
! /* } */
__CRT_INLINE int __cdecl putc (int __c, FILE* __F)
{
***************
*** 385,391 ****
_CRTIMP int __cdecl fgetchar (void);
_CRTIMP int __cdecl fputchar (int);
_CRTIMP FILE* __cdecl fdopen (int, const char*);
! _CRTIMP int __cdecl fileno (FILE*);
#define fileno(__F) ((__F)->_file)
--- 385,391 ----
_CRTIMP int __cdecl fgetchar (void);
_CRTIMP int __cdecl fputchar (int);
_CRTIMP FILE* __cdecl fdopen (int, const char*);
! //_CRTIMP int __cdecl fileno (FILE*);
#define fileno(__F) ((__F)->_file)
[-- Attachment #3: Type: text/plain, Size: 148 bytes --]
_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs
reply other threads:[~2004-02-26 9:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=m3ad369ns8.fsf@ate.maierh \
--to=harald@maierh.de \
/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).