[Mingw-w64-public] Patch w/o thunderbird

2016-08-08 Thread David Wohlferd
Sorry for the spam, but if this list is how patches are expected to be
sent, I've got to get this working.  I'm using gmail's web interface
instead of TB this time.  I'm also only sending 1 patch.  Fingers crossed...

ext2.patch - Fix macro pasting error and duplicate symbol names.

dw
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] Compiling skia, part 2: xpsobjectmodel.h

2016-08-08 Thread Ruben Van Boxem
Hi guys,

I'm compiling skia with MinGW-w64 GCC, and after the stuff in my previous
mail and some other small things, I came across this:

In file included from C:/Development/skia/src/xps/SkDocument_XPS.cpp:12:0:
C:/Development/skia/src/xps/SkXPSDevice.h:187:15: error: 'XPS_SIZE' does
not name a type
 const XPS_SIZE& pageSize,
   ^~~~
C:/Development/skia/src/xps/SkXPSDevice.h:259:9: error: 'XPS_GLYPH_INDEX'
has not been declared
 XPS_GLYPH_INDEX* xpsGlyphs,
 ^~~
C:/Development/skia/src/xps/SkXPSDevice.h:261:9: error: 'XPS_POINT' has not
been declared
 XPS_POINT *origin,
 ^
C:/Development/skia/src/xps/SkXPSDevice.h:263:9: error:
'XPS_STYLE_SIMULATION' has not been declared
 XPS_STYLE_SIMULATION sims,
 ^~~~
C:/Development/skia/src/xps/SkXPSDevice.h:277:41: error: 'XPS_RECT' does
not name a type
 const SkRect& leftPoints, const XPS_RECT& left,
 ^~~~
C:/Development/skia/src/xps/SkXPSDevice.h:292:9: error: 'XPS_FILL_RULE' has
not been declared
 XPS_FILL_RULE fillRule);
 ^

Now, looking into xpsobjectmodel.h, I see the typedef for e.g. XPS_SIZE
like so:
typedef struct __WIDL_xpsobjectmodel_generated_name_0037 {
FLOAT width;
FLOAT height;
} XPS_SIZE;

along with all the other symbols in the error message. But this doesn't
look right, and well, the compiler agrees. Did something go wrong here in
the widl step or what is this construct?

I'm using MSYS2's MinGW-w64, which is 5.0.0.4680.362c947-1, so git rev
362c947 I guess.

How do I fix this?

Thanks!

Ruben
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
___
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 4/5] RFC: arm: Make sure to at least run a certain number of rounds in 'log' functions

2016-08-08 Thread André Hentschel
Am 08.08.2016 um 15:24 schrieb Martin Storsjö:
> ---
> The value 30 is a blind guesstimate of what's sensible; with that, I
> get log() returning values close to the real values (differing only in
> the third digit or so).
> 
> I'm not sure exactly how the original logic for the number of rounds
> is supposed to work; with any value over 16, it will currently
> run 0 rounds and return 0.
> ---
>  mingw-w64-crt/math/softmath/softmath_private.h | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/mingw-w64-crt/math/softmath/softmath_private.h 
> b/mingw-w64-crt/math/softmath/softmath_private.h
> index 72df747..401f7c6 100644
> --- a/mingw-w64-crt/math/softmath/softmath_private.h
> +++ b/mingw-w64-crt/math/softmath/softmath_private.h
> @@ -61,6 +61,9 @@ static inline double softmath_log(double x)
>  else if (x < 0.0001)
>  aprox = 32768;
>  
> +if (aprox < 30)
> +aprox = 30;
> +
>  for(n = 0; n < aprox; n++)
>  {
>  result += bsd__ieee754_pow((x - 1.0) / (x + 1.0), 2 * n + 1) * (1.0 
> / (2.0 * n + 1.0));
> @@ -82,6 +85,9 @@ static inline float softmath_logf(float x)
>  else if (x < 0.0001)
>  aprox = 32768;
>  
> +if (aprox < 30)
> +aprox = 30;
> +
>  for(n = 0; n < aprox; n++)
>  {
>  result += bsd__ieee754_powf((x - 1.0) / (x + 1.0), 2 * n + 1) * (1.0 
> / (2.0 * n + 1.0));
> 

looks good

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
___
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 2/5] arm: Actually return the __fpclassify return value in __fpclassifyl

2016-08-08 Thread André Hentschel
Am 08.08.2016 um 15:24 schrieb Martin Storsjö:
> Previously the value wasn't used, and the function was missing
> a return statement.
> ---
>  mingw-w64-headers/crt/math.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mingw-w64-headers/crt/math.h b/mingw-w64-headers/crt/math.h
> index 4cbb4d0..b06ca79 100644
> --- a/mingw-w64-headers/crt/math.h
> +++ b/mingw-w64-headers/crt/math.h
> @@ -428,7 +428,7 @@ typedef long double double_t;
>FP_INFINITE : FP_NAN);
>  return FP_NORMAL;
>  #elif defined(__arm__) || defined(_ARM_)
> -__fpclassify(x);
> +return __fpclassify(x);
>  #elif defined(__i386__) || defined(_X86_)
>  unsigned short sw;
>  __asm__ __volatile__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
> 

looks good

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
___
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 1/5] arm: Add missing it instructions

2016-08-08 Thread André Hentschel
Am 08.08.2016 um 15:24 schrieb Martin Storsjö:
> When building in thumb mode, the conditional instructions are supposed
> to have 'it' instructions preceding them (unless the assembler is
> set to automatically inject such).
> 
> This fixes building with clang/llvm 3.9, while the build passed
> with clang/llvm 3.8 (unsure whether it actually injected such instructions
> though)
> ---
>  mingw-w64-crt/math/copysignl.S | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mingw-w64-crt/math/copysignl.S b/mingw-w64-crt/math/copysignl.S
> index 77237e9..0becf53 100644
> --- a/mingw-w64-crt/math/copysignl.S
> +++ b/mingw-w64-crt/math/copysignl.S
> @@ -38,10 +38,12 @@ __MINGW_USYMBOL(copysignl):
>   bmi 1f /* jump if d1 is negative */
>   fcmpzd  d0
>   fmstat
> + it mi
>   vnegmi.f64  d0, d0 /* negate d0 if it is negative */
>   bx  lr
>   1: fcmpzd   d0
>   fmstat
> + it pl
>   vnegpl.f64  d0, d0 /* negate d0 if it is positive */
>   bx  lr
>  #elif defined(_X86_) || defined(__i386__)
> 

looks good

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
___
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 4/5] RFC: arm: Make sure to at least run a certain number of rounds in 'log' functions

2016-08-08 Thread Martin Storsjö

On Mon, 8 Aug 2016, Martin Storsjö wrote:


---
The value 30 is a blind guesstimate of what's sensible; with that, I
get log() returning values close to the real values (differing only in
the third digit or so).

I'm not sure exactly how the original logic for the number of rounds
is supposed to work; with any value over 16, it will currently
run 0 rounds and return 0.
---
mingw-w64-crt/math/softmath/softmath_private.h | 6 ++
1 file changed, 6 insertions(+)

diff --git a/mingw-w64-crt/math/softmath/softmath_private.h 
b/mingw-w64-crt/math/softmath/softmath_private.h
index 72df747..401f7c6 100644
--- a/mingw-w64-crt/math/softmath/softmath_private.h
+++ b/mingw-w64-crt/math/softmath/softmath_private.h
@@ -61,6 +61,9 @@ static inline double softmath_log(double x)
else if (x < 0.0001)
aprox = 32768;

+if (aprox < 30)
+aprox = 30;
+
for(n = 0; n < aprox; n++)
{
result += bsd__ieee754_pow((x - 1.0) / (x + 1.0), 2 * n + 1) * (1.0 / 
(2.0 * n + 1.0));


A second solution would possibly be to drop the libmingwex log functions 
altogether - why are they needed? AFAIK, msvcrt.dll has got log 
implemented, at least since quite some time. (Long enough for the ARM 
target at least.)


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


[Mingw-w64-public] [PATCH 3/5] stdio: Convert from 64 bit doubles to 80 bit, on platforms that lack an 80 bit long double

2016-08-08 Thread Martin Storsjö
This fixes printf of floats/doubles with -D__USE_MINGW_ANSI_STDIO=1,
on arm.
---
 mingw-w64-crt/stdio/mingw_pformat.c | 21 -
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/mingw-w64-crt/stdio/mingw_pformat.c 
b/mingw-w64-crt/stdio/mingw_pformat.c
index d193519..dc12856 100644
--- a/mingw-w64-crt/stdio/mingw_pformat.c
+++ b/mingw-w64-crt/stdio/mingw_pformat.c
@@ -,9 +,28 @@ char *__pformat_cvt( int mode, __pformat_fpreg_t x, int 
nd, int *dp, int *sign )
   int k; unsigned int e = 0; char *ep;
   static FPI fpi = { 64, 1-16383-64+1, 32766-16383-64+1, FPI_Round_near, 0, 14 
/* Int_max */ };
  
+  k = __fpclassifyl( x.__pformat_fpreg_ldouble_t );
+
+  if( sizeof( double ) == sizeof( long double ) )
+  {
+/* The caller has written into x.__pformat_fpreg_ldouble_t, which
+ * actually isn't laid out in the way the rest of the union expects it.
+ */
+int exp = (x.__pformat_fpreg_mantissa >> 52) & 0x7ff;
+unsigned long long mant = x.__pformat_fpreg_mantissa & 
0x000fULL;
+int integer = exp ? 1 : 0;
+int signbit = x.__pformat_fpreg_mantissa >> 63;
+if (exp == 0x7ff)
+  exp = 0x7fff;
+else if (exp != 0)
+  exp = exp - 1023 + 16383;
+x.__pformat_fpreg_mantissa = (mant << 11) | ((unsigned long long)integer 
<< 63);
+x.__pformat_fpreg_exponent = exp | (signbit << 15);
+  }
+
   /* Classify the argument into an appropriate `__gdtoa()' category...
*/
-  if( (k = __fpclassifyl( x.__pformat_fpreg_ldouble_t )) & FP_NAN )
+  if( k & FP_NAN )
 /*
  * identifying infinities or not-a-number...
  */
-- 
2.7.4


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


Re: [Mingw-w64-public] Clean build of mingw-w64 (ie no more warning)

2016-08-08 Thread Martin Storsjö
On Mon, 8 Aug 2016, dw wrote:

> Q3: ARM is giving a bunch of warnings in the form: "dlltool.exe: Syntax error 
> in def file .../mingw-w64-crt/libarm32/powerwmiprovider.def:62."  I have 
> looked at the def file, but I don't understand what I am seeing. How do I 
> diagnose/repair this?

FWIW, I don't know about this, but as far as I know, you can't really use
dlltool to produce implibs for ARM (due to lacking binutils etc), you need
to build genlib (which is bundled in mingw-w64) and use --with-genlib
instead.

Since there are loads of other warnings (as you point out), and other 
bigger issues with the ARM port, I haven't paid attention to whether there 
are warnings int his part for me yet or not.

> Q4: As of 3.8.0, clang (the only compiler I know that builds mingw-w64 for 
> ARM) doesn't support __declspec(selectany) or __attribute__((gcc_struct)) on 
> ARM.  Since (essentially) no one is using this yet, can we assume it will get 
> fixed before people will start using the library?  Or must we code around it? 
> Right now I'm doing a bit of both.

It's not about it being supported on ARM, but about clang not supporting 
it at all, regardless of architecture.

I'd suggest doing

#if defined(__GNUC__) && !defined(__clang__)

instead of

#if defined(__GNUC__) && !defined(__arm__) && !defined(_ARM_)

Then one can later add specific compiler version checks if clang later
starts supporting it (although I doubt it's relevant since it says it's
about a gcc bug workaround).


// Martin

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


[Mingw-w64-public] [PATCH 1/5] arm: Add missing it instructions

2016-08-08 Thread Martin Storsjö
When building in thumb mode, the conditional instructions are supposed
to have 'it' instructions preceding them (unless the assembler is
set to automatically inject such).

This fixes building with clang/llvm 3.9, while the build passed
with clang/llvm 3.8 (unsure whether it actually injected such instructions
though)
---
 mingw-w64-crt/math/copysignl.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mingw-w64-crt/math/copysignl.S b/mingw-w64-crt/math/copysignl.S
index 77237e9..0becf53 100644
--- a/mingw-w64-crt/math/copysignl.S
+++ b/mingw-w64-crt/math/copysignl.S
@@ -38,10 +38,12 @@ __MINGW_USYMBOL(copysignl):
bmi 1f /* jump if d1 is negative */
fcmpzd  d0
fmstat
+   it mi
vnegmi.f64  d0, d0 /* negate d0 if it is negative */
bx  lr
1: fcmpzd   d0
fmstat
+   it pl
vnegpl.f64  d0, d0 /* negate d0 if it is positive */
bx  lr
 #elif defined(_X86_) || defined(__i386__)
-- 
2.7.4


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


[Mingw-w64-public] [PATCH 5/5] RFC: arm: Avoid making __fsqrt_internal a global symbol

2016-08-08 Thread Martin Storsjö
This fixes duplicate symbols if a calling app links in both e.g.
sqrt and sqrtf.
---
AFAIK, the .def is only there for debugging info - removing the
.global doesn't seem to be enough to avoid the linker failures
at least, but perhaps it can be made debug info for a static symbol
in some other way?
---
 mingw-w64-crt/math/sqrt.def.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mingw-w64-crt/math/sqrt.def.h b/mingw-w64-crt/math/sqrt.def.h
index 8e502ec..602409a 100644
--- a/mingw-w64-crt/math/sqrt.def.h
+++ b/mingw-w64-crt/math/sqrt.def.h
@@ -50,10 +50,8 @@
  * asm ("fsqrts %[dst], %[src];\n" : [dst] "=w" (res) : [src] "w" (x));
  */
 __FLT_TYPE __fsqrt_internal( __FLT_TYPE x );
-asm(".def __fsqrt_internal; .scl 2; .type 32; .endef\n"
-"\t.text\n"
+asm("\t.text\n"
 "\t.align 4\n"
-"\t.globl __fsqrt_internal\n"
 "__fsqrt_internal:\n"
 #if _NEW_COMPLEX_FLOAT
 "\t" "fsqrts s0, s0\n"
-- 
2.7.4


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


[Mingw-w64-public] CryptDlg.h?

2016-08-08 Thread Daniel Risacher
while trying to compile something, I find that MinGW-w64 cannot find
CryptDlg.h.  There is a version of this file in Wine; how hard is it to
pull in to MinGW-w64?
--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] Query regarding new version

2016-08-08 Thread Dattathreya Hr
Hi all,
Does this new version supports large-adress-aware for 64 bit applications.

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