emacs-devel
[Top][All Lists]
Advanced

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

Re: Anyone building Emacs trunk with MinGW w64 (32 bits)


From: Eli Zaretskii
Subject: Re: Anyone building Emacs trunk with MinGW w64 (32 bits)
Date: Mon, 25 Mar 2013 22:48:01 +0200

> From: Óscar Fuentes <address@hidden>
> Date: Mon, 25 Mar 2013 20:46:35 +0100
> 
> D:\dev\emacs\emacs\src/fileio.c:1900: undefined reference to `_imp__lstat'
> oo-spd/i386/temacs1.a(dired.o): In function `file_attributes':
> D:\dev\emacs\emacs\src/dired.c:943: undefined reference to `_imp__fstatat'
> oo-spd/i386/temacs1.a(dired.o): In function `file_name_completion_stat':
> D:\dev\emacs\emacs\src/dired.c:818: undefined reference to `_imp__fstatat'
> D:\dev\emacs\emacs\src/dired.c:820: undefined reference to `_imp__fstatat'
> collect2.exe: error: ld returned 1 exit status
> mingw32-make[3]: *** [oo-spd/i386/temacs.exe] Error 1
> mingw32-make[3]: Leaving directory `D:/dev/emacs/emacs/src'
> 
> 
> 
> I have no time for investigating why the linker searches for lstat and
> fstatat as if they were dllimports and ignores those defined in w32.c.

Try removing _CRTIMP from the prototypes in nt/inc/sys/stat.h.

> -#define _WIN32_IE 0x400
> +/* 
> c:\apps\msys\1.0\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w6
>  */
> +/* 4-mingw32/include/shlguid.h:16:2: error: #error _WIN32_IE setting 
> conflicts */
> +/* #define _WIN32_IE 0x400 */

Please show the relevant parts of shlguid.h.

> --- a/nt/inc/ms-w32.h
> +++ b/nt/inc/ms-w32.h
> @@ -154,7 +154,7 @@ extern char *getenv ();
>  
>  #ifdef emacs
>  
> -#ifdef _MSC_VER
> +#if 1
>  #include <sys/timeb.h>
>  #include <sys/stat.h>
>  #include <signal.h>

What was the problem here?

> --- a/nt/inc/sys/time.h
> +++ b/nt/inc/sys/time.h
> @@ -6,6 +6,10 @@
>   * have the below stuff.
>   */
>  
> +#include <sys/types.h>
> +#include <time.h>
> +
> +#ifndef _TIMESPEC_DEFINED
>  struct timeval
>  {
>    long               tv_sec;         /* seconds */
> @@ -17,6 +21,7 @@ struct timezone
>    int                tz_minuteswest; /* minutes west of Greenwich */
>    int                tz_dsttime;     /* type of dst correction */
>  };
> +#endif

And here?

>  /* MinGW64 defines 'struct itimerval' and _TIMESPEC_DEFINED in sys/types.h.  
> */
> -#ifndef _TIMESPEC_DEFINED
> +// #ifndef _TIMESPEC_DEFINED
>  struct itimerval
>  {
>    struct  timeval it_interval;       /* timer interval */
>    struct  timeval it_value;  /* current value */
>  };
> -#endif
> +// #endif

What's wrong with the #ifndef here?

> +/* w32.c:2392:1: error: conflicting types for 'gettimeofday' */
> +/* In file included from w32.c:32:0: */
> +/* ../nt/inc/sys/time.h:25:6: note: previous declaration of 'gettimeofday' 
> was here */
>  
>  /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95).  */
> -void
> -gettimeofday (struct timeval *tv, struct timezone *tz)

That's not the right solution.  There's no conflict between w32.c and
nt/inc/sys/time.h in how they declare/define gettimeofday.  The reason
must be something else, like the order of definition of the relevant
structures.  Presumably, by the time the prototype in time.h is seen,
one or both of the types of its arguments are not yet defined.  Please
look deeper.

> --- a/src/w32term.c
> +++ b/src/w32term.c
> @@ -109,7 +109,7 @@ struct w32_display_info *x_display_list;
>  Lisp_Object w32_display_name_list;
>  
>  
> -#if _WIN32_WINNT < 0x0500
> +#if 0 // _WIN32_WINNT < 0x0500
>  /* Pre Windows 2000, this was not available, but define it here so
>     that Emacs compiled on such a platform will run on newer versions.  */

What's the problem here?




reply via email to

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