Remove autoconf tests that are no longer used.

git-svn-id: http://caml.inria.fr/svn/ocaml/branches/cc-optim@16331 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Leroy 2015-08-04 14:12:09 +00:00
parent 423bfe29ba
commit 3b9aaeafaa
8 changed files with 0 additions and 271 deletions

View File

@ -1,32 +0,0 @@
/***********************************************************************/
/* */
/* OCaml */
/* */
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
/* */
/* Copyright 1996 Institut National de Recherche en Informatique et */
/* en Automatique. All rights reserved. This file is distributed */
/* under the terms of the GNU Library General Public License, with */
/* the special exception on linking described in file ../../LICENSE. */
/* */
/***********************************************************************/
char buffer[27];
#ifdef reverse
#define cpy(s1,s2,n) copy(s2,s1,n)
#else
#define cpy copy
#endif
int main(int argc, char ** argv)
{
cpy("abcdefghijklmnopqrstuvwxyz", buffer, 27);
if (strcmp(buffer, "abcdefghijklmnopqrstuvwxyz") != 0) exit(1);
cpy(buffer, buffer+3, 26-3);
if (strcmp(buffer, "abcabcdefghijklmnopqrstuvw") != 0) exit(1);
cpy("abcdefghijklmnopqrstuvwxyz", buffer, 27);
cpy(buffer+3, buffer, 26-3);
if (strcmp(buffer, "defghijklmnopqrstuvwxyzxyz") != 0) exit(1);
exit(0);
}

View File

@ -1,45 +0,0 @@
/***********************************************************************/
/* */
/* OCaml */
/* */
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
/* */
/* Copyright 1996 Institut National de Recherche en Informatique et */
/* en Automatique. All rights reserved. This file is distributed */
/* under the terms of the GNU Library General Public License, with */
/* the special exception on linking described in file ../../LICENSE. */
/* */
/***********************************************************************/
/* Test semantics of division and modulus for negative arguments */
long div4[] =
{ -4,-3,-3,-3,-3,-2,-2,-2,-2,-1,-1,-1,-1,0,0,0,
0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4 };
long divm4[] =
{ 4,3,3,3,3,2,2,2,2,1,1,1,1,0,0,0,
0,0,0,0,-1,-1,-1,-1,-2,-2,-2,-2,-3,-3,-3,-3,-4 };
long mod4[] =
{ 0,-3,-2,-1,0,-3,-2,-1,0,-3,-2,-1,0,-3,-2,-1,
0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0 };
long modm4[] =
{ 0,-3,-2,-1,0,-3,-2,-1,0,-3,-2,-1,0,-3,-2,-1,
0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0 };
long q1 = 4;
long q2 = -4;
int main()
{
int i;
for (i = -16; i <= 16; i++) {
if (i / q1 != div4[i+16]) return 1;
if (i / q2 != divm4[i+16]) return 1;
if (i % q1 != mod4[i+16]) return 1;
if (i % q2 != modm4[i+16]) return 1;
}
return 0;
}

View File

@ -1,24 +0,0 @@
/***********************************************************************/
/* */
/* OCaml */
/* */
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
/* */
/* Copyright 2011 Institut National de Recherche en Informatique et */
/* en Automatique. All rights reserved. This file is distributed */
/* under the terms of the GNU Library General Public License, with */
/* the special exception on linking described in file ../../LICENSE. */
/* */
/***********************************************************************/
#include <math.h>
volatile double x;
int main(int argc, char **argv)
{
x = 3.1415;
x = expm1(x);
x = log1p(x);
return 0;
}

View File

@ -1,41 +0,0 @@
/***********************************************************************/
/* */
/* OCaml */
/* */
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
/* */
/* Copyright 1996 Institut National de Recherche en Informatique et */
/* en Automatique. All rights reserved. This file is distributed */
/* under the terms of the GNU Library General Public License, with */
/* the special exception on linking described in file ../../LICENSE. */
/* */
/***********************************************************************/
#include <stdio.h>
#include <string.h>
/* Check for the availability of "long long" type as per ISO C9X */
/* Meaning of return code:
0 long long OK, printf with %ll
1 long long OK, printf with %q
2 long long OK, no printf
3 long long not suitable */
int main(int argc, char **argv)
{
long long l;
unsigned long long u;
char buffer[64];
if (sizeof(long long) != 8) return 3;
l = 123456789123456789LL;
buffer[0] = '\0';
sprintf(buffer, "%lld", l);
if (strcmp(buffer, "123456789123456789") == 0) return 0;
/* the MacOS X library uses qd to format long longs */
buffer[0] = '\0';
sprintf (buffer, "%qd", l);
if (strcmp (buffer, "123456789123456789") == 0) return 1;
return 2;
}

View File

@ -1,21 +0,0 @@
/***********************************************************************/
/* */
/* OCaml */
/* */
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
/* */
/* Copyright 1996 Institut National de Recherche en Informatique et */
/* en Automatique. All rights reserved. This file is distributed */
/* under the terms of the GNU Library General Public License, with */
/* the special exception on linking described in file ../../LICENSE. */
/* */
/***********************************************************************/
char foo[]="\377";
int main(int argc, char ** argv)
{
int i;
i = foo[0];
exit(i != -1);
}

View File

@ -1,21 +0,0 @@
/***********************************************************************/
/* */
/* OCaml */
/* */
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
/* */
/* Copyright 1996 Institut National de Recherche en Informatique et */
/* en Automatique. All rights reserved. This file is distributed */
/* under the terms of the GNU Library General Public License, with */
/* the special exception on linking described in file ../../LICENSE. */
/* */
/***********************************************************************/
signed char foo[]="\377";
int main(int argc, char ** argv)
{
int i;
i = foo[0];
exit(i != -1);
}

View File

@ -1,21 +0,0 @@
/***********************************************************************/
/* */
/* OCaml */
/* */
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
/* */
/* Copyright 1996 Institut National de Recherche en Informatique et */
/* en Automatique. All rights reserved. This file is distributed */
/* under the terms of the GNU Library General Public License, with */
/* the special exception on linking described in file ../../LICENSE. */
/* */
/***********************************************************************/
#include <signal.h>
int main(void)
{
SIGRETURN (*old)();
old = signal(SIGQUIT, SIG_DFL);
return 0;
}

View File

@ -1,66 +0,0 @@
/***********************************************************************/
/* */
/* OCaml */
/* */
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
/* */
/* Copyright 2001 Institut National de Recherche en Informatique et */
/* en Automatique. All rights reserved. This file is distributed */
/* under the terms of the GNU Library General Public License, with */
/* the special exception on linking described in file ../../LICENSE. */
/* */
/***********************************************************************/
#include <stdio.h>
#include <signal.h>
#include <sys/resource.h>
static char sig_alt_stack[SIGSTKSZ];
static char * system_stack_top;
#if defined(TARGET_i386) && defined(SYS_linux_elf)
static void segv_handler(int signo, struct sigcontext sc)
{
char * fault_addr = (char *) sc.cr2;
#else
static void segv_handler(int signo, siginfo_t * info, void * context)
{
char * fault_addr = (char *) info->si_addr;
#endif
struct rlimit limit;
if (getrlimit(RLIMIT_STACK, &limit) == 0 &&
((long) fault_addr & (sizeof(long) - 1)) == 0 &&
fault_addr < system_stack_top &&
fault_addr >= system_stack_top - limit.rlim_cur - 0x2000) {
_exit(0);
} else {
_exit(4);
}
}
int main(int argc, char ** argv)
{
stack_t stk;
struct sigaction act;
stk.ss_sp = sig_alt_stack;
stk.ss_size = SIGSTKSZ;
stk.ss_flags = 0;
#if defined(TARGET_i386) && defined(SYS_linux_elf)
act.sa_handler = (void (*)(int)) segv_handler;
act.sa_flags = SA_ONSTACK | SA_NODEFER;
#else
act.sa_sigaction = segv_handler;
act.sa_flags = SA_SIGINFO | SA_ONSTACK | SA_NODEFER;
#endif
sigemptyset(&act.sa_mask);
system_stack_top = (char *) &act;
if (sigaltstack(&stk, NULL) != 0) { perror("sigaltstack"); return 2; }
if (sigaction(SIGSEGV, &act, NULL) != 0) { perror("sigaction"); return 2; }
/* We used to trigger a stack overflow at this point to test whether
the code above works, but this causes problems with POSIX threads
on some BSD systems. So, instead, we just test that all this
code compiles, indicating that the required syscalls are there. */
return 0;
}