summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
1 files changed, 10 insertions, 9 deletions
diff --git a/configure b/configure
index 1184ee4..e8434da 100755
--- a/configure
+++ b/configure
@@ -33956,29 +33956,30 @@ else
unsigned long long l = 0xa601e80bda85fcefULL;
long double ld;
unsigned char *c1, *c2;
- int endian, size;
+ size_t size;
+ int endian;
int tst_value = 1;
- int i;
- int ret = 0;
+ int ret = 0;
/* Determine this system's endianess */
c1 = (unsigned char*)calloc(1, sizeof(int));
- memcpy(c1, &tst_value, sizeof(int));
+ memcpy((void*)c1, &tst_value, sizeof(int));
if(c1[0]==1)
endian = 0; /* little endian */
else
endian = 1; /* big endian */
- memset(&ld, 0, 12);
+ size = sizeof(long double);
+ memset(&ld, 0, size);
ld = (long double)l;
- size = sizeof(long double);
- c2 = (unsigned char*)malloc(size);
- memcpy(c2, &ld, size);
+ c2 = (unsigned char*)calloc(1, size);
+ memcpy((void*)c2, &ld, size);
/* Test if the last 2 bytes of mantissa are lost. Mainly for FreeBSD on Intel
* architecture(sleipnir) where it happens. */
- if(endian==0 && c2[0]==0 && c2[1]==0) /*little endian*/
+ /*if(endian==0 && c2[0]==0 && c2[1]==0)*/ /*little endian*/
+ if(endian==0 && c2[0]==0) /*little endian*/
ret = 1;
free(c1);