Subject: Re: win32 popen clone for mingw32 anyone?
From: [email-masked] (Peter Dalgaard BSA)

1 Aug 1998 05:19:07 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
To: Mumit Khan <[email-masked]>
Cc: Douglas Steele <[email-masked]>, [email-masked]

Mumit Khan <[email-masked]> writes:

> Perhaps the R folks are using an older version of egcs or mingw32 headers?

Mmmno.. that happened with a cross-development egcs1.0.2+your patches
+ binutils2.9.1 and header files snatched out of the native mingw32
distrib. Here's what happens exactly:

[pd@butterfly gnuwin32]$ export
PATH=~/mingw-cross/i386-mingw32/bin:$PATH 
[pd@butterfly gnuwin32]$ make
windres  -i wincons.rc -o res.o 
windres: /home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/include/stdarg.h:70:parse error
cpp: output pipe has been closed
make: *** [res.o] Error 1

The compile comes through neatly with Windows32/Defines.h instead of
windows.h. I forgot what happened when Douglas tried the same thing
with native mingw.

Here's what the preprocessor does, with blank lines removed:

[pd@butterfly gnuwin32]$ gcc -E -xc-header -DRC_INVOKED wincons.rc | grep -v '^ *$'
# 1 "wincons.rc"
# 1 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/windows.h" 1 3
# 1 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/include/limits.h" 1 3
# 1 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/include/syslimits.h" 1 3
# 1 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/limits.h" 1 3
# 7 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/include/syslimits.h" 2 3
# 11 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/include/limits.h" 2 3
# 35 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/windows.h" 2 3
# 1 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/include/stdarg.h" 1 3
typedef void *__gnuc_va_list;
void va_end (__gnuc_va_list);            
# 168 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/include/stdarg.h" 3
typedef __gnuc_va_list va_list;
# 36 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/windows.h" 2 3
# 1 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Base.h" 1 3
# 277 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Base.h" 3
# 325 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Base.h" 3
# 409 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Base.h" 3
# 545 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Base.h" 3
# 617 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Base.h" 3
# 39 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/windows.h" 2 3
# 1 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Messages.h" 1 3
# 292 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Messages.h" 3
# 408 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Messages.h" 3
# 759 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Messages.h" 3
# 866 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Messages.h" 3
# 42 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/windows.h" 2 3
# 1 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Defines.h" 1 3
# 3603 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Defines.h" 3
# 4357 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Defines.h" 3
# 5148 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Defines.h" 3
# 45 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/windows.h" 2 3
# 1 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Structures.h" 1 3
# 4678 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Structures.h" 3
# 48 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/windows.h" 2 3
# 1 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Functions.h" 1 3
# 1 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/CommonFunctions.h" 1 3
# 6867 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/CommonFunctions.h" 3
# 34 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Functions.h" 2 3
# 1 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/UnicodeFunctions.h" 1 3
# 3004 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/UnicodeFunctions.h" 3
# 37 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Functions.h" 2 3
# 1 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/ASCIIFunctions.h" 1 3
# 2984 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/ASCIIFunctions.h" 3
# 41 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Functions.h" 2 3
# 451 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Functions.h" 3
# 51 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/windows.h" 2 3
# 1 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/Windows32/Errors.h" 1 3
# 54 "/home/pd/mingw-cross/lib/gcc-lib/i386-mingw32/egcs-2.90.27/../../../../i386-mingw32/include/windows.h" 2 3
# 22 "wincons.rc" 2
... and then the real stuff.

so stdarg.h is the only place where it goes wrong. I think I know what
to do now, thanks.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - ([email-masked])             FAX: (+45) 35327907
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".