audacia/cmake-proxies/libsndfile/clipcheck.c
Leland Lucius 6217351a12 Updates the cmake build system
It's still has some work, but it successfully builds on
all 3 main platforms.  Some of the outstanding items
include:

   Install target testing (mostly important for Linux)
   CMakeList clean up and comments
   Debug and Release build verification
   Audit of compile/link options
   Need a Mac signed and notarized build
   (and probably more)
2020-02-03 00:39:43 -06:00

45 lines
694 B
C

#define _ISOC9X_SOURCE 1
#define _ISOC99_SOURCE 1
#define __USE_ISOC99 1
#define __USE_ISOC9X 1
#include <math.h>
#include <stdio.h>
int main (void)
{
double fval ;
int k, ival ;
int pos = 0 ;
int neg = 0 ;
fval = 1.0 * 0x7FFFFFFF ;
for (k = 0 ; k < 100 ; k++)
{
ival = (lrint (fval)) >> 24 ;
if (ival != 127)
{
pos = 1 ;
break ;
}
fval *= 1.2499999 ;
}
fval = -8.0 * 0x10000000 ;
for (k = 0 ; k < 100 ; k++)
{
ival = (lrint (fval)) >> 24 ;
if (ival != -128)
{
neg = 1 ;
break ;
}
fval *= 1.2499999 ;
}
printf("%d;%d", pos, neg) ;
return 0 ;
}