Re: [Mingw-w64-public] [PATCH] Re: stpcpy mystery

2013-10-16 Thread LRN
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 15.10.2013 19:14, LRN wrote:
 On 15.10.2013 16:34, LRN wrote:
 Testcase is attached. Some invocations of stpcpy work, some don't.
 
 expand_builtin_stpcpy() from gcc/builtins.c sheds some light on this
 (when return value is ignored, stpcpy() is replaced with strcpy()).
 After reading a diff between the asm output (at jon_y's suggestion) i
 concluded that builtin stpcpy is not a full implementation. It's there
 only to optimize for cases where second argument is known at compile
 time. When that is not the case, it just calls system stpcpy. Which
 isn't available :(
 
 Here are patches that add stpcpy() to mingw-w64.
 
Changed the patches in the way it was suggested on the IRC, used
__mingw_printf() as a template for inlining.


- -- 
O ascii ribbon - stop html email! - www.asciiribbon.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (MingW32)

iQEcBAEBAgAGBQJSXlnyAAoJEOs4Jb6SI2Cw7BIIAM1+l3vunkXgkZVp2E2mO0N8
iaQO/m76ftYsMNpEC2qCGY3ri6zYAAGpASzgt/zn2mhkZkMgGifow07zRIm1aeIs
O8LPpK/Oq4YU8RywBHwXJ4CPW0uHnsTCJv8juujqEUd+LcOSNcr4X3cQRSA+0hWM
iIdC1HcWQPGx4RnumjjJD+grlk2uWUqXepYs3nfOlkzijNgNOH0CHvTmB9TEf1ld
6+XYOKFJh5iQdrFzOeqOpetG1aglekj7i0svPStVQauLKFGtHwlO8wLrpjiy7iiX
akKeW880xkk0x/pmVQKWz6j568sp/96QF8onOUF0+XSz4PoIK+jgJ0FkUFnQkJU=
=/BN7
-END PGP SIGNATURE-
From eedb12b2124339e9e494a3d24bebd9a8ebde681f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?=
 =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= lrn1...@gmail.com
Date: Tue, 15 Oct 2013 13:21:25 +
Subject: [PATCH 1/2] Add stpcpy() implementation

---
 mingw-w64-crt/Makefile.am   |  2 +-
 mingw-w64-crt/misc/stpcpy.c | 11 +++
 2 files changed, 12 insertions(+), 1 deletion(-)
 create mode 100755 mingw-w64-crt/misc/stpcpy.c

diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index a2f89a6..fe634c7 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -233,7 +233,7 @@ src_libmingwex=\
   misc/wcsnlen.c misc/wcstof.cmisc/wcstoimax.c 
   misc/wcstold.c misc/wcstoumax.c  \
   misc/wctob.c   misc/wctrans.c   misc/wctype.c
   misc/wdirent.c misc/winbs_uint64.c   \
   misc/winbs_ulong.c misc/winbs_ushort.c  misc/wmemchr.c   
   misc/wmemcmp.c misc/wmemcpy.c\
-  misc/wmemmove.cmisc/wmempcpy.c  misc/wmemset.c   
   misc/purecall.c \
+  misc/wmemmove.cmisc/wmempcpy.c  misc/wmemset.c   
   misc/purecall.cmisc/stpcpy.c \
   \
   stdio/mingw_pformat.h\
   stdio/vfscanf2.S stdio/vfwscanf2.S stdio/vscanf2.S  
stdio/vsscanf2.S  stdio/vswscanf2.S \
diff --git a/mingw-w64-crt/misc/stpcpy.c b/mingw-w64-crt/misc/stpcpy.c
new file mode 100755
index 000..509341f
--- /dev/null
+++ b/mingw-w64-crt/misc/stpcpy.c
@@ -0,0 +1,11 @@
+#define __CRT__NO_INLINE
+
+#include string.h
+
+char * __cdecl __mingw_stpcpy (char * __restrict__ _Dest,const char * 
__restrict__ _Source)
+{
+  for (; *_Source; _Source++, _Dest++)
+*_Dest = *_Source;
+  *_Dest = '\0';
+  return _Dest;
+}
-- 
1.8.4

From 982326bf10d44f40477af904db890120dd48f615 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?=
 =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= lrn1...@gmail.com
Date: Tue, 15 Oct 2013 13:21:36 +
Subject: [PATCH 2/2] Add stpcpy() prototype

---
 mingw-w64-headers/crt/string.h | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/mingw-w64-headers/crt/string.h b/mingw-w64-headers/crt/string.h
index 972bd54..9bb04c2 100644
--- a/mingw-w64-headers/crt/string.h
+++ b/mingw-w64-headers/crt/string.h
@@ -49,6 +49,12 @@ extern C {
   char * __cdecl _strset(char *_Str,int _Val) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   char * __cdecl _strset_l(char *_Str,int _Val,_locale_t _Locale) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   char * __cdecl strcpy(char * __restrict__ _Dest,const char * __restrict__ 
_Source);
+  char * __cdecl __mingw_stpcpy(char * __restrict__ _Dest,const char * 
__restrict__ _Source) __MINGW_NOTHROW;
+#if (defined (_XOPEN_SOURCE)  _XOPEN_SOURCE = 700) || \
+(defined (_POSIX_C_SOURCE)  _POSIX_C_SOURCE = 200809L) || \
+(defined (_GNU_SOURCE))
+  __mingw_ovr char *stpcpy(char * __restrict__ _Dest,const char * __restrict__ 
_Source) { return __mingw_stpcpy(_Dest, _Source); }
+#endif
   char * __cdecl strcat(char * __restrict__ _Dest,const char * __restrict__ 
_Source);
   int __cdecl strcmp(const char *_Str1,const char *_Str2);
   size_t __cdecl strlen(const char *_Str);
-- 
1.8.4

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the 

Re: [Mingw-w64-public] quadmath.h's expq() crashes at runtime.

2013-10-16 Thread sisyphus1


-Original Message- 
From: JonY
Sent: Monday, October 07, 2013 12:00 AM
To: mingw-w64-public@lists.sourceforge.net
Subject: Re: [Mingw-w64-public] quadmath.h's expq() crashes at runtime.

 On 10/6/2013 20:31, sisyph...@optusnet.com.au wrote:
  Hi,
 
  Here's the simple demo:
 
  /***
  #include quadmath.h
 
  int main (void) {
__float128 r;
r = expq(2.0Q);
return 0;
  }
 
  ***/
 
  With recent MinGW64 ports of gcc, that program builds ok, but running it
  results in a crash.
  Seems to happen with 4.6.3, 4.7.0 and 4.8.1 (both 32-bit and 64-bit
  versions); I haven't tried any other versions.
 
  No such problem with mingw.org's gcc-4.7.0, nor with gcc-4.6.3 on 
  Ubuntu.
 

 Confirmed:

 Program received signal SIGSEGV, Segmentation fault.
 fesetenv (envp=envp@entry=0x28fe40) at ../misc/fesetenv.c:59
 59  __asm__ volatile (ldmxcsr %0 : : m (_mxcsr));
 (gdb) list
 54env.__unused1 = 0x;
 55__asm__ volatile (fldenv %0 : : m (env)
 56  : st, st(1), st(2), st(3), 
 st(4),
 57  st(5), st(6), st(7));
 58if (__mingw_has_sse ())
 59  __asm__ volatile (ldmxcsr %0 : : m (_mxcsr));
 60  }
 61
 62return 0;
 63  }
 (gdb) p _mxcsr
 $1 = -1

 I'm not too clear what the asm code mean, Kai?

I guess I should file a bug report about this, so that it doesn't get lost.
Where's the place for that ?

Cheers,
Rob 


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] stpcpy mystery

2013-10-16 Thread LRN
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 15.10.2013 17:00, Kai Tietz wrote:
 Well, I don't believe in Voodoo here.  My bets would go for builtin
 function vs. C-library function.  Is there actually such a function in
 msvcrt?
No, there is no stpcpy in msvcrt.

On 15.10.2013 16:55, Ruben Van Boxem wrote:
 On 2013/10/15 LRN wrote:
 
 Testcase is attached. Some invocations of stpcpy work, some don't.
 
 
 I assume you meant something including string.h, like this:
 http://coliru.stacked-crooked.com/a/1b967a7cb671a204

 This also shows the supposed output you want I guess? With MinGW-w64 v3
 (through my Arch packages, grep 'stpcpy' /usr/x86_64-w64-mingw32/include/
 -R returns no results.
  
 This is not a standard C function, and a GNU extension. What are you
 expecting?

I'm expecting that when gcc says built-in function stpcpy, i can rely
on stpcpy being available. Turns out, that is not the case - it's only
partially built-in, and still requires a real stpcpy() to be available
for some invocations.

- -- 
O ascii ribbon - stop html email! - www.asciiribbon.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (MingW32)

iQEcBAEBAgAGBQJSXmxOAAoJEOs4Jb6SI2Cw1IYIAMPYYrSBLA/qxmSSovOe1H4/
Zcq6De/krKD8gKb3IUWJkYyjk+K9WYTTWRl5gfZlnNKR0rGhgwUta5C2y/bk8IGW
n8/WnaaM8TCJYmeKwPBw/4N+GFO0Qnp8ciN/VuC/9rnf49ExxQ2CdNLXzVy5ee7K
qaPk4lzyo35WE7Eg0KRml+ffvJ0hvWuhSojgnBYi0UkJ9MXfy7wjIerJx7PDuePm
9gmk17fzR8j8PX88TRH1/J9A8hbCTuGt3wQi8t/Z8uUY+QS7c1NI6lUWhIMjqWAw
jTcNC1GEE7TzXPos6cjj0KyJejcSaD710ukdj3Gdm8XjY9asKHPN2Ivr6t7E5Eg=
=G5Rn
-END PGP SIGNATURE-

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] Re: stpcpy mystery

2013-10-16 Thread Kai Tietz
Hello LRN,

both patches are ok for trunk.  Please apply.

Thanks,
Kai

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] SOLVED Short read mystery

2013-10-16 Thread Edscott Wilson
I appreciate all the responses. This is the result.

1. The option O_BINARY is not available in fcntl.h for gcc, So
open(test.dbh, O_RDWR|O_BINARY) does not work.

2. Neither will the unix2dos program work since the file to open is a
binary file which must be read byte by byte.

3. fopen(test.dbh, rb) seems to have nailed it. Since I require use of
lseek() later on, I need a file descriptor. So the solution (hack?) that
works is the following:
FILE *f = fopen(test.dbh, rb);
int fd = fileno(f);

With that, the read(fd, data, 256) will read the correct amount of bytes.

Thanks!



-- 

Dr. Edscott Wilson Garcia
Applied Mathematics and Computing
Mexican Petroleum Institute
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] SOLVED Short read mystery

2013-10-16 Thread Ruben Van Boxem
2013/10/16 Edscott Wilson edscott.wilson.gar...@gmail.com


 I appreciate all the responses. This is the result.

 1. The option O_BINARY is not available in fcntl.h for gcc, So
 open(test.dbh, O_RDWR|O_BINARY) does not work.


See MSDN for the flags you are looking for:
http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx

Ruben



 2. Neither will the unix2dos program work since the file to open is a
 binary file which must be read byte by byte.

 3. fopen(test.dbh, rb) seems to have nailed it. Since I require use of
 lseek() later on, I need a file descriptor. So the solution (hack?) that
 works is the following:
 FILE *f = fopen(test.dbh, rb);
 int fd = fileno(f);

 With that, the read(fd, data, 256) will read the correct amount of bytes.

 Thanks!



 --

 
 Dr. Edscott Wilson Garcia
 Applied Mathematics and Computing
 Mexican Petroleum Institute


 --
 October Webinars: Code for Performance
 Free Intel webinars can help you accelerate application performance.
 Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
 from
 the latest Intel processors and coprocessors. See abstracts and register 
 http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] to test for MinGW64

2013-10-16 Thread Incongruous
Thanks everyone.

From: Incongruous 
Sent: Tuesday, October 15, 2013 6:06 AM
To: MinGW-64 Mailinglist 
Subject: [Mingw-w64-public] to test for MinGW64

I would like to test for MinGW64 to include or exclude some code; something 
like:
#ifdef MinGW64
doThis();
#endif
#ifdef __MSV__
doSomthingElse
#endif

is this possible?

tia





--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk 



___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] SOLVED Short read mystery

2013-10-16 Thread niXman
 

Edscott Wilson писал 2013-10-16 18:53: 

 ... Since I require use of lseek() ...

man fseek

-- 
Regards, niXman
___
Dual-target(32  64-bit) MinGW compilers for 32 and 64-bit Windows:
http://sourceforge.net/projects/mingw-w64/
___
Another online IDE: http://liveworkspace.org/
 --
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] SOLVED Short read mystery

2013-10-16 Thread Edscott Wilson
2013/10/16 Ruben Van Boxem vanboxem.ru...@gmail.com

 2013/10/16 Edscott Wilson edscott.wilson.gar...@gmail.com


 I appreciate all the responses. This is the result.

 1. The option O_BINARY is not available in fcntl.h for gcc, So
 open(test.dbh, O_RDWR|O_BINARY) does not work.


 See MSDN for the flags you are looking for:
 http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx



The problem with that is I want to use mingw-64's gcc, and gcc does not
define O_BINARY, and does not seem likely that it will in the future. Maybe
the mingw port should include O_BINARY and O_TEXT.

Funny thing is that fread() and fwrite() assume a binary stream, even if
FILE is not opened with the b flag. (
http://manpages.courier-mta.org/htmlman3/fread.3.html) whileas read() and
write() do not make that assumption (http://linux.die.net/man/2/read). That
was why the test program could correctly read the binary file with fread()
(opened without the b flag), but read() failed miserably.

I do not see any reason why read() and write() should not assume binary
input/output just as fread() and fwrite() do.

-- 

Dr. Edscott Wilson Garcia
Applied Mathematics and Computing
Mexican Petroleum Institute
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] SOLVED Short read mystery

2013-10-16 Thread Edscott Wilson
You are absolutely right. I took a look into fcntl.h and there it was.

Apparently my configure script is defining NO_OLDNAMES and not defining
_POSIX. I dunno why. But the  _O_BINARY option works just fine and allows
me to avoid the hack with fopen/fileno.

Thanks a bunch. Now I can go ahead and release http://dbh.sf.net 5.0.8 for
windows sometime during the next few days.


2013/10/16 Ozkan Sezer seze...@gmail.com

 On 10/16/13, Edscott Wilson edscott.wilson.gar...@gmail.com wrote:
  2013/10/16 Ruben Van Boxem vanboxem.ru...@gmail.com
 
  2013/10/16 Edscott Wilson edscott.wilson.gar...@gmail.com
 
 
  I appreciate all the responses. This is the result.
 
  1. The option O_BINARY is not available in fcntl.h for gcc, So
  open(test.dbh, O_RDWR|O_BINARY) does not work.
 
 
  See MSDN for the flags you are looking for:
  http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx
 
 
 
  The problem with that is I want to use mingw-64's gcc, and gcc does not
  define O_BINARY, and does not seem likely that it will in the future.
 Maybe
  the mingw port should include O_BINARY and O_TEXT.

 gcc itself doesn't define O_BINARY, but fcntl.h from mingw[-w64]
 projects *do* define it: make sure that you include fcntl.h.
 If for some weird reason you are defining NO_OLDNAMES or something,
 then use _O_BINARY with the leading underscore.

 --
 O.S.


 --
 October Webinars: Code for Performance
 Free Intel webinars can help you accelerate application performance.
 Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
 from
 the latest Intel processors and coprocessors. See abstracts and register 
 http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public




-- 

Dr. Edscott Wilson Garcia
Applied Mathematics and Computing
Mexican Petroleum Institute
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] to test for MinGW64

2013-10-16 Thread Edscott Wilson
If you use gnu autotools it's really simple. Just put something like this
into configure.ac

AC_CHECK_HEADERS(windows.h)

And then use

#ifdef HAVE_WINDOWS_H
do this
#else
do that
#endif



2013/10/16 Incongruous incongru...@outlook.com

   Thanks everyone.

  *From:* Incongruous incongru...@outlook.com
 *Sent:* Tuesday, October 15, 2013 6:06 AM
 *To:* MinGW-64 Mailinglist mingw-w64-public@lists.sourceforge.net
 *Subject:* [Mingw-w64-public] to test for MinGW64

   I would like to test for MinGW64 to include or exclude some code;
 something like:
 #ifdef MinGW64
 doThis();
 #endif
 #ifdef __MSV__
 doSomthingElse
 #endif

 is this possible?

 tia



 --

 --
 October Webinars: Code for Performance
 Free Intel webinars can help you accelerate application performance.
 Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
 from
 the latest Intel processors and coprocessors. See abstracts and register 
 http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk

 --
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public



 --
 October Webinars: Code for Performance
 Free Intel webinars can help you accelerate application performance.
 Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
 from
 the latest Intel processors and coprocessors. See abstracts and register 
 http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public




-- 

Dr. Edscott Wilson Garcia
Applied Mathematics and Computing
Mexican Petroleum Institute
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] to test for MinGW64

2013-10-16 Thread Jon
No. You gave an answer to a question Incongruous did not ask.
Unfortunately, your answer could confuse newcomers searching this ML.

Read Incongruous' post again. It said I would like to test for MinGW64 to
include or exclude some code...

I think LRN, Ruben, and the FAQ provided the correct answers.


On Wed, Oct 16, 2013 at 5:26 PM, Edscott Wilson 
edscott.wilson.gar...@gmail.com wrote:

 If you use gnu autotools it's really simple. Just put something like this
 into configure.ac

 AC_CHECK_HEADERS(windows.h)

 And then use

 #ifdef HAVE_WINDOWS_H
 do this
 #else
 do that
 #endif



 2013/10/16 Incongruous incongru...@outlook.com

   Thanks everyone.

  *From:* Incongruous incongru...@outlook.com
 *Sent:* Tuesday, October 15, 2013 6:06 AM
 *To:* MinGW-64 Mailinglist mingw-w64-public@lists.sourceforge.net
 *Subject:* [Mingw-w64-public] to test for MinGW64

   I would like to test for MinGW64 to include or exclude some code;
 something like:
 #ifdef MinGW64
 doThis();
 #endif
 #ifdef __MSV__
 doSomthingElse
 #endif

 is this possible?


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public