* Problems Building Emacs-21.3 or Later with Mingw Runtime 3.2
@ 2004-02-26 9:45 Harald Maier
0 siblings, 0 replies; only message in thread
From: Harald Maier @ 2004-02-26 9:45 UTC (permalink / 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-02-26 9:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-26 9:45 Problems Building Emacs-21.3 or Later with Mingw Runtime 3.2 Harald Maier
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).