Remove outdated autoconf tests in bnlib

This commit is contained in:
Travis Cross 2012-06-23 00:02:49 +00:00
parent f840eecdb8
commit 95c26f9a6b
22 changed files with 0 additions and 331 deletions

View File

@ -31,9 +31,6 @@
#ifndef HAVE_STRINGS_H
#define HAVE_STRINGS_H 0
#endif
#ifndef NEED_MEMORY_H
#define NEED_MEMORY_H 0
#endif
#include <stdio.h>
@ -48,9 +45,6 @@ long strtol(const char *, char **, int);
#elif HAVE_STRINGS_H
#include <strings.h>
#endif
#if NEED_MEMORY_H
#include <memory.h>
#endif
#include "cputime.h"
#include "lbn16.h"

View File

@ -27,7 +27,6 @@
#define NO_STRING_H !HAVE_STRING_H
#define HAVE_STRINGS_H 0
#define NEED_MEMORY_H 0
/* We go to some trouble to find accurate times... */
@ -51,20 +50,6 @@
/* Defines for various kinds of library brokenness */
/* Define if <stdio.h> is missing prototypes (= lots of warnings!) */
#define NO_STDIO_PROTOS 0
/* Define if <assert.h> depends on <stdio.h> and breaks without it */
#define ASSERT_NEEDS_STDIO 0
/* Define if <assert.h> depends on <stdlib.h> and complains without it */
#define ASSERT_NEEDS_STDLIB 0
/*
* Define if <string.h> delcares the mem* functions to take char *
* instead of void * parameters (= lots of warnings)
*/
#define MEM_PROTOS_BROKEN 0
/* If not available, bcopy() is substituted */
#define HAVE_MEMMOVE 1
#define NO_MEMMOVE !HAVE_MEMMOVE

View File

@ -11,28 +11,10 @@
* Some compilers complain about #if FOO if FOO isn't defined,
* so do the ANSI-mandated thing explicitly...
*/
#ifndef ASSERT_NEEDS_STDIO
#define ASSERT_NEEDS_STDIO 0
#endif
#ifndef ASSERT_NEEDS_STDLIB
#define ASSERT_NEEDS_STDLIB 0
#endif
#ifndef NO_STDLIB_H
#define NO_STDLIB_H 0
#endif
/* SunOS 4.1.x <assert.h> needs "stderr" defined, and "exit" declared... */
#ifdef assert
#if ASSERT_NEEDS_STDIO
#include <stdio.h>
#endif
#if ASSERT_NEEDS_STDLIB
#if !NO_STDLIB_H
#include <stdlib.h>
#endif
#endif
#endif
#ifndef NO_MEMMOVE
#define NO_MEMMOVE 0
#endif
@ -47,43 +29,6 @@
#define memcpy(dest,src,len) bcopy(src,dest,len)
#endif
#ifndef MEM_PROTOS_BROKEN
#define MEM_PROTOS_BROKEN 0
#endif
#if MEM_PROTOS_BROKEN
#define memcpy(d,s,l) memcpy((void *)(d), (void const *)(s), l)
#define memmove(d,s,l) memmove((void *)(d), (void const *)(s), l)
#define memcmp(d,s,l) memcmp((void const *)(d), (void const *)(s), l)
#define memset(d,v,l) memset((void *)(d), v, l)
#endif
/*
* If there are no prototypes for the stdio functions, use these to
* reduce compiler warnings. Uses EOF as a giveaway to indicate
* that <stdio.h> was #included.
*/
#ifndef NO_STDIO_PROTOS
#define NO_STDIO_PROTOS 0
#endif
#if NO_STDIO_PROTOS /* Missing prototypes for "simple" functions */
#ifdef EOF
#ifdef __cplusplus
extern "C" {
#endif
int (puts)(char const *);
int (fputs)(char const *, FILE *);
int (fflush)(FILE *);
int (printf)(char const *, ...);
int (fprintf)(FILE *, char const *, ...);
/* If we have a sufficiently old-fashioned stdio, it probably uses these... */
int (_flsbuf)(int, FILE *);
int (_filbuf)(FILE *);
#ifdef __cplusplus
}
#endif
#endif /* EOF */
#endif /* NO_STDIO_PROTOS */
/*
* Borland C seems to think that it's a bad idea to decleare a
* structure tag and not declare the contents. I happen to think

View File

@ -84,9 +84,6 @@
#ifndef HAVE_STRINGS_H
#define HAVE_STRINGS_H 0
#endif
#ifndef NEED_MEMORY_H
#define NEED_MEMORY_H 0
#endif
#if !NO_ASSERT_H
#include <assert.h>
@ -99,9 +96,6 @@
#elif HAVE_STRINGS_H
#include <strings.h>
#endif
#if NEED_MEMORY_H
#include <memory.h>
#endif
#include "lbn.h"
#include "lbn16.h"

View File

@ -31,9 +31,6 @@
#ifndef HAVE_STRINGS_H
#define HAVE_STRINGS_H 0
#endif
#ifndef NEED_MEMORY_H
#define NEED_MEMORY_H 0
#endif
#if !NO_STDLIB_H
#include <stdlib.h> /* For malloc() & co. */
@ -48,9 +45,6 @@ void free();
#elif HAVE_STRINGS_H
#include <strings.h>
#endif
#if NEED_MEMORY_H
#include <memory.h>
#endif
#ifndef DBMALLOC
#define DBMALLOC 0

View File

@ -29,9 +29,6 @@
#ifndef HAVE_STRINGS_H
#define HAVE_STRINGS_H 0
#endif
#ifndef NEED_MEMORY_H
#define NEED_MEMORY_H 0
#endif
#if !NO_ASSERT_H
#include <assert.h>
@ -44,9 +41,6 @@
#elif HAVE_STRINGS_H
#include <strings.h>
#endif
#if NEED_MEMORY_H
#include <memory.h>
#endif
/*
* This was useful during debugging, so it's left in here.

View File

@ -29,9 +29,6 @@
#ifndef HAVE_STRINGS_H
#define HAVE_STRINGS_H 0
#endif
#ifndef NEED_MEMORY_H
#define NEED_MEMORY_H 0
#endif
#if !NO_ASSERT_H
#include <assert.h>
@ -44,9 +41,6 @@
#elif HAVE_STRINGS_H
#include <strings.h>
#endif
#if NEED_MEMORY_H
#include <memory.h>
#endif
/*
* This was useful during debugging, so it's left in here.

View File

@ -29,9 +29,6 @@
#ifndef HAVE_STRINGS_H
#define HAVE_STRINGS_H 0
#endif
#ifndef NEED_MEMORY_H
#define NEED_MEMORY_H 0
#endif
#if !NO_ASSERT_H
#include <assert.h>
@ -44,9 +41,6 @@
#elif HAVE_STRINGS_H
#include <strings.h>
#endif
#if NEED_MEMORY_H
#include <memory.h>
#endif
/*
* This was useful during debugging, so it's left in here.

View File

@ -29,7 +29,6 @@
#define NO_STRING_H !HAVE_STRING_H
#define HAVE_STRINGS_H 0
#define NEED_MEMORY_H 0
/* We go to some trouble to find accurate times... */
@ -53,20 +52,6 @@
/* Defines for various kinds of library brokenness */
/* Define if <stdio.h> is missing prototypes (= lots of warnings!) */
#define NO_STDIO_PROTOS 0
/* Define if <assert.h> depends on <stdio.h> and breaks without it */
#define ASSERT_NEEDS_STDIO 0
/* Define if <assert.h> depends on <stdlib.h> and complains without it */
#define ASSERT_NEEDS_STDLIB 0
/*
* Define if <string.h> delcares the mem* functions to take char *
* instead of void * parameters (= lots of warnings)
*/
#define MEM_PROTOS_BROKEN 0
/* If not available, bcopy() is substituted */
#define HAVE_MEMMOVE 0
#define NO_MEMMOVE !HAVE_MEMMOVE

View File

@ -29,7 +29,6 @@
#define NO_STRING_H !HAVE_STRING_H
#define HAVE_STRINGS_H 0
#define NEED_MEMORY_H 0
/* We go to some trouble to find accurate times... */
@ -53,20 +52,6 @@
/* Defines for various kinds of library brokenness */
/* Define if <stdio.h> is missing prototypes (= lots of warnings!) */
#define NO_STDIO_PROTOS 0
/* Define if <assert.h> depends on <stdio.h> and breaks without it */
#define ASSERT_NEEDS_STDIO 0
/* Define if <assert.h> depends on <stdlib.h> and complains without it */
#define ASSERT_NEEDS_STDLIB 0
/*
* Define if <string.h> delcares the mem* functions to take char *
* instead of void * parameters (= lots of warnings)
*/
#define MEM_PROTOS_BROKEN 0
/* If not available, bcopy() is substituted */
#define HAVE_MEMMOVE 1
#define NO_MEMMOVE !HAVE_MEMMOVE

View File

@ -38,9 +38,6 @@
#ifndef HAVE_STRINGS_H
#define HAVE_STRINGS_H 0
#endif
#ifndef NEED_MEMORY_H
#define NEED_MEMORY_H 0
#endif
#include <stdio.h>
@ -55,9 +52,6 @@ long strtol(const char *, char **, int);
#elif HAVE_STRINGS_H
#include <strings.h>
#endif
#if NEED_MEMORY_H
#include <memory.h>
#endif
#include "lbn16.h"
#include "kludge.h"

View File

@ -38,9 +38,6 @@
#ifndef HAVE_STRINGS_H
#define HAVE_STRINGS_H 0
#endif
#ifndef NEED_MEMORY_H
#define NEED_MEMORY_H 0
#endif
#include <stdio.h>
@ -55,9 +52,6 @@ long strtol(const char *, char **, int);
#elif HAVE_STRINGS_H
#include <strings.h>
#endif
#if NEED_MEMORY_H
#include <memory.h>
#endif
#include "lbn32.h"
#include "kludge.h"

View File

@ -38,9 +38,6 @@
#ifndef HAVE_STRINGS_H
#define HAVE_STRINGS_H 0
#endif
#ifndef NEED_MEMORY_H
#define NEED_MEMORY_H 0
#endif
#include <stdio.h>
@ -55,9 +52,6 @@ long strtol(const char *, char **, int);
#elif HAVE_STRINGS_H
#include <strings.h>
#endif
#if NEED_MEMORY_H
#include <memory.h>
#endif
#include "lbn64.h"
#include "kludge.h"

View File

@ -219,64 +219,9 @@ else # If non-ANSI, check for other brokenness.
AC_CHECK_HEADERS(assert.h limits.h stdlib.h string.h)
# Do we want to include memory.h?
if test $ac_cv_header_string_h = no; then
AC_CHECK_HEADERS(strings.h)
ac_found=no
else
AC_MSG_CHECKING(whether string.h declares mem functions)
AC_EGREP_HEADER(memset, string.h, ac_found=yes, ac_found=no)
AC_MSG_RESULT($ac_found)
fi
# ac_found is now "yes" if string.h exists and declares the mem*
# functions. If not, see if memory.h exists and include that
# as well.
if test $ac_found = no; then
AC_CHECK_HEADER(memory,h. [AC_DEFINE(NEED_MEMORY_H)])
fi
AC_CACHE_CHECK(whether <stdio.h> provides prototypes,
bn_cv_header_stdio_protos,
[AC_EGREP_HEADER(printf, stdio.h, bn_cv_header_stdio_protos=yes, bn_cv_header_stdio_protos=no)
])
if test $bn_cv_header_stdio_protos = no; then
AC_DEFINE(NO_STDIO_PROTOS)
fi
fi
# ^^ End of non-ANSI header brokenness tests (first part)
AC_CACHE_CHECK(whether <string.h> declares mem* wrong.,
bn_cv_header_mem_broken,
[AC_EGREP_HEADER(memcpy.*char, string.h, bn_cv_header_mem_broken=yes, bn_cv_header_mem_broken=no)
])
if test $bn_cv_header_mem_broken = yes; then
AC_DEFINE(MEM_PROTOS_BROKEN)
fi
# SunOS 4.1.x acc's <assert.h> is broken
AC_CACHE_CHECK(whether <assert.h> is broken and needs <stdio.h>,
bn_cv_header_assert_needs_stdio,
[AC_EGREP_CPP(stderr,
[#include <assert.h>
assert(foo)
], bn_cv_header_assert_needs_stdio=yes, bn_cv_header_assert_needs_stdio=no)
])
if test $bn_cv_header_assert_needs_stdio = yes; then
AC_DEFINE(ASSERT_NEEDS_STDIO)
fi
AC_CACHE_CHECK(whether <assert.h> is broken and needs <stdlib.h>,
bn_cv_header_assert_needs_stdlib,
[AC_EGREP_CPP(exit,
[#include <assert.h>
assert(foo)
], bn_cv_header_assert_needs_stdlib=yes, bn_cv_header_assert_needs_stdlib=no)
])
if test $bn_cv_header_assert_needs_stdlib = yes; then
AC_DEFINE(ASSERT_NEEDS_STDLIB)
fi
# Check that we have <sys/time.h> explicitly.
AC_CHECK_HEADERS(sys/time.h)
AC_HEADER_TIME

View File

@ -22,9 +22,6 @@
#elif HAVE_STRINGS_H
#include <strings.h>
#endif
#if NEED_MEMORY_H
#include <memory.h>
#endif
#include <stdlib.h> /* For malloc() */

View File

@ -15,28 +15,10 @@
* Some compilers complain about #if FOO if FOO isn't defined,
* so do the ANSI-mandated thing explicitly...
*/
#ifndef ASSERT_NEEDS_STDIO
#define ASSERT_NEEDS_STDIO 0
#endif
#ifndef ASSERT_NEEDS_STDLIB
#define ASSERT_NEEDS_STDLIB 0
#endif
#ifndef NO_STDLIB_H
#define NO_STDLIB_H 0
#endif
/* SunOS 4.1.x <assert.h> needs "stderr" defined, and "exit" declared... */
#ifdef assert
#if ASSERT_NEEDS_STDIO
#include <stdio.h>
#endif
#if ASSERT_NEEDS_STDLIB
#if !NO_STDLIB_H
#include <stdlib.h>
#endif
#endif
#endif
#ifndef NO_MEMMOVE
#define NO_MEMMOVE 0
#endif
@ -51,43 +33,6 @@
#define memcpy(dest,src,len) bcopy(src,dest,len)
#endif
#ifndef MEM_PROTOS_BROKEN
#define MEM_PROTOS_BROKEN 0
#endif
#if MEM_PROTOS_BROKEN
#define memcpy(d,s,l) memcpy((void *)(d), (void const *)(s), l)
#define memmove(d,s,l) memmove((void *)(d), (void const *)(s), l)
#define memcmp(d,s,l) memcmp((void const *)(d), (void const *)(s), l)
#define memset(d,v,l) memset((void *)(d), v, l)
#endif
/*
* If there are no prototypes for the stdio functions, use these to
* reduce compiler warnings. Uses EOF as a giveaway to indicate
* that <stdio.h> was #included.
*/
#ifndef NO_STDIO_PROTOS
#define NO_STDIO_PROTOS 0
#endif
#if NO_STDIO_PROTOS /* Missing prototypes for "simple" functions */
#ifdef EOF
#ifdef __cplusplus
extern "C" {
#endif
int (puts)(char const *);
int (fputs)(char const *, FILE *);
int (fflush)(FILE *);
int (printf)(char const *, ...);
int (fprintf)(FILE *, char const *, ...);
/* If we have a sufficiently old-fashioned stdio, it probably uses these... */
int (_flsbuf)(int, FILE *);
int (_filbuf)(FILE *);
#ifdef __cplusplus
}
#endif
#endif /* EOF */
#endif /* NO_STDIO_PROTOS */
/*
* Borland C seems to think that it's a bad idea to decleare a
* structure tag and not declare the contents. I happen to think

View File

@ -85,9 +85,6 @@
#ifndef HAVE_STRINGS_H
#define HAVE_STRINGS_H 0
#endif
#ifndef NEED_MEMORY_H
#define NEED_MEMORY_H 0
#endif
#if !NO_ASSERT_H
#include <assert.h>
@ -100,9 +97,6 @@
#elif HAVE_STRINGS_H
#include <strings.h>
#endif
#if NEED_MEMORY_H
#include <memory.h>
#endif
#include "lbn.h"
#include "lbn16.h"

View File

@ -85,9 +85,6 @@
#ifndef HAVE_STRINGS_H
#define HAVE_STRINGS_H 0
#endif
#ifndef NEED_MEMORY_H
#define NEED_MEMORY_H 0
#endif
#if !NO_ASSERT_H
#include <assert.h>
@ -100,9 +97,6 @@
#elif HAVE_STRINGS_H
#include <strings.h>
#endif
#if NEED_MEMORY_H
#include <memory.h>
#endif
#include "lbn.h"
#include "lbn32.h"

View File

@ -85,9 +85,6 @@
#ifndef HAVE_STRINGS_H
#define HAVE_STRINGS_H 0
#endif
#ifndef NEED_MEMORY_H
#define NEED_MEMORY_H 0
#endif
#if !NO_ASSERT_H
#include <assert.h>
@ -100,9 +97,6 @@
#elif HAVE_STRINGS_H
#include <strings.h>
#endif
#if NEED_MEMORY_H
#include <memory.h>
#endif
#include "lbn.h"
#include "lbn64.h"

View File

@ -32,9 +32,6 @@
#ifndef HAVE_STRINGS_H
#define HAVE_STRINGS_H 0
#endif
#ifndef NEED_MEMORY_H
#define NEED_MEMORY_H 0
#endif
#if !NO_STDLIB_H
#include <stdlib.h> /* For malloc() & co. */
@ -49,9 +46,6 @@ void free();
#elif HAVE_STRINGS_H
#include <strings.h>
#endif
#if NEED_MEMORY_H
#include <memory.h>
#endif
#ifndef DBMALLOC
#define DBMALLOC 0

View File

@ -108,9 +108,6 @@
#ifndef HAVE_STRINGS_H
#define HAVE_STRINGS_H 0
#endif
#ifndef NEED_MEMORY_H
#define NEED_MEMORY_H 0
#endif
#if !NO_ASSERT_H
#include <assert.h>
@ -127,9 +124,6 @@
#elif HAVE_STRINGS_H
#include <strings.h>
#endif
#if NEED_MEMORY_H
#include <memory.h>
#endif
#include "bn.h"
#include "sieve.h"

View File

@ -24,40 +24,6 @@
#define raise(sig) kill(getpid(),sig)
#endif
/*
* If there are no prototypes for the stdio functions, to reduce
* compiler warnings include these... conditional on EOF being
* defined (a giveaway that <stdio.h> was #included).
*/
#if defined(EOF)
#if NO_STDIO_PROTOS /* Missing prototypes for "simple" functions */
int (puts)(char const *);
int (fputs)(char const *, FILE *);
void (rewind)(FILE *);
int (fflush)(FILE *);
int (fclose)(FILE *);
int (printf)(char const *, ...);
int (fprintf)(FILE *, char const *, ...);
int (fseek)(FILE *, long, int);
int (remove)(char const *);
int (rename)(char const *, char const *);
void (perror)(char const *);
int (system)(char const *); /* Really in <stdlib.h>, but this'll do... */
int (pclose)(FILE *);
/* If we have a sufficiently old-fashioned stdio, it probably uses these... */
int (_flsbuf)(int, FILE *);
int (_filbuf)(FILE *);
int (ungetc)(int, FILE *);
size_t (fread)(char *, size_t, size_t, FILE *);
size_t (fwrite)(char const *, size_t, size_t, FILE *);
#if defined(va_start) || defined(va_arg) || defined(va_end)
int (vfprintf)(FILE *, char const *, ...);
#endif
#endif /* NO_STDIO_PROTOS */
#endif /* EOF */
/*
* Make Microsoft Visual C shut the hell up about a few things...
* Warning 4116 complains about the alignof() macro, saying: