⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure

📁 boa:Linux系统中的轻量级Web服务
💻
📖 第 1 页 / 共 5 页
字号:
#include "confdefs.h"int main() {/* Ultrix mips cc rejects this.  */typedef int charset[2]; const charset x;/* SunOS 4.1.1 cc rejects this.  */char const *const *ccp;char **p;/* NEC SVR4.0.2 mips cc rejects this.  */struct point {int x, y;};static struct point const zero = {0,0};/* AIX XL C 1.02.0.0 rejects this.   It does not let you subtract one const X* pointer from another in an arm   of an if-expression whose if-part is not a constant expression */const char *g = "string";ccp = &g + (g ? g-g : 0);/* HPUX 7.0 cc rejects these. */++ccp;p = (char**) ccp;ccp = (char const *const *) p;{ /* SCO 3.2v4 cc rejects this.  */  char *t;  char const *s = 0 ? (char *) 0 : (char const *) 0;  *t++ = 0;}{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */  int x[] = {25, 17};  const int *foo = &x[0];  ++foo;}{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */  typedef const int *iptr;  iptr p = 0;  ++p;}{ /* AIX XL C 1.02.0.0 rejects this saying     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */  struct s { int j; const int *ap[3]; };  struct s *b; b->j = 5;}{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */  const int foo = 10;}; return 0; }EOFif { (eval echo configure:1427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then  rm -rf conftest*  ac_cv_c_const=yeselse  echo "configure: failed program was:" >&5  cat conftest.$ac_ext >&5  rm -rf conftest*  ac_cv_c_const=nofirm -f conftest*fiecho "$ac_t""$ac_cv_c_const" 1>&6if test $ac_cv_c_const = no; then  cat >> confdefs.h <<\EOF#define const EOFfiecho $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6echo "configure:1448: checking for uid_t in sys/types.h" >&5if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then  echo $ac_n "(cached) $ac_c" 1>&6else  cat > conftest.$ac_ext <<EOF#line 1453 "configure"#include "confdefs.h"#include <sys/types.h>EOFif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |  egrep "uid_t" >/dev/null 2>&1; then  rm -rf conftest*  ac_cv_type_uid_t=yeselse  rm -rf conftest*  ac_cv_type_uid_t=nofirm -f conftest*fiecho "$ac_t""$ac_cv_type_uid_t" 1>&6if test $ac_cv_type_uid_t = no; then  cat >> confdefs.h <<\EOF#define uid_t intEOF  cat >> confdefs.h <<\EOF#define gid_t intEOFfiecho $ac_n "checking for pid_t""... $ac_c" 1>&6echo "configure:1482: checking for pid_t" >&5if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then  echo $ac_n "(cached) $ac_c" 1>&6else  cat > conftest.$ac_ext <<EOF#line 1487 "configure"#include "confdefs.h"#include <sys/types.h>#if STDC_HEADERS#include <stdlib.h>#include <stddef.h>#endifEOFif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then  rm -rf conftest*  ac_cv_type_pid_t=yeselse  rm -rf conftest*  ac_cv_type_pid_t=nofirm -f conftest*fiecho "$ac_t""$ac_cv_type_pid_t" 1>&6if test $ac_cv_type_pid_t = no; then  cat >> confdefs.h <<\EOF#define pid_t intEOFfiecho $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6echo "configure:1515: checking whether time.h and sys/time.h may both be included" >&5if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then  echo $ac_n "(cached) $ac_c" 1>&6else  cat > conftest.$ac_ext <<EOF#line 1520 "configure"#include "confdefs.h"#include <sys/types.h>#include <sys/time.h>#include <time.h>int main() {struct tm *tp;; return 0; }EOFif { (eval echo configure:1529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then  rm -rf conftest*  ac_cv_header_time=yeselse  echo "configure: failed program was:" >&5  cat conftest.$ac_ext >&5  rm -rf conftest*  ac_cv_header_time=nofirm -f conftest*fiecho "$ac_t""$ac_cv_header_time" 1>&6if test $ac_cv_header_time = yes; then  cat >> confdefs.h <<\EOF#define TIME_WITH_SYS_TIME 1EOFfiecho $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6echo "configure:1551: checking whether setvbuf arguments are reversed" >&5if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then  echo $ac_n "(cached) $ac_c" 1>&6else  if test "$cross_compiling" = yes; then    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }else  cat > conftest.$ac_ext <<EOF#line 1559 "configure"#include "confdefs.h"#include <stdio.h>/* If setvbuf has the reversed format, exit 0. */main () {  /* This call has the arguments reversed.     A reversed system may check and see that the address of main     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)    exit(1);  putc('\r', stdout);  exit(0);			/* Non-reversed systems segv here.  */}EOFif { (eval echo configure:1573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/nullthen  ac_cv_func_setvbuf_reversed=yeselse  echo "configure: failed program was:" >&5  cat conftest.$ac_ext >&5  rm -fr conftest*  ac_cv_func_setvbuf_reversed=nofirm -fr conftest*firm -f core core.* *.corefiecho "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6if test $ac_cv_func_setvbuf_reversed = yes; then  cat >> confdefs.h <<\EOF#define SETVBUF_REVERSED 1EOFfifor ac_hdr in unistd.hdoac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6echo "configure:1600: checking for $ac_hdr" >&5if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then  echo $ac_n "(cached) $ac_c" 1>&6else  cat > conftest.$ac_ext <<EOF#line 1605 "configure"#include "confdefs.h"#include <$ac_hdr>EOFac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"{ (eval echo configure:1610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`if test -z "$ac_err"; then  rm -rf conftest*  eval "ac_cv_header_$ac_safe=yes"else  echo "$ac_err" >&5  echo "configure: failed program was:" >&5  cat conftest.$ac_ext >&5  rm -rf conftest*  eval "ac_cv_header_$ac_safe=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then  echo "$ac_t""yes" 1>&6    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`  cat >> confdefs.h <<EOF#define $ac_tr_hdr 1EOF else  echo "$ac_t""no" 1>&6fidonefor ac_func in getpagesizedoecho $ac_n "checking for $ac_func""... $ac_c" 1>&6echo "configure:1639: checking for $ac_func" >&5if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then  echo $ac_n "(cached) $ac_c" 1>&6else  cat > conftest.$ac_ext <<EOF#line 1644 "configure"#include "confdefs.h"/* System header to define __stub macros and hopefully few prototypes,    which can conflict with char $ac_func(); below.  */#include <assert.h>/* Override any gcc2 internal prototype to avoid an error.  *//* We use char because int might match the return type of a gcc2    builtin and then its argument prototype would still apply.  */char $ac_func();int main() {/* The GNU C library defines this for functions which it implements    to always fail with ENOSYS.  Some functions are actually named    something starting with __ and the normal name is an alias.  */#if defined (__stub_$ac_func) || defined (__stub___$ac_func)choke me#else$ac_func();#endif; return 0; }EOFif { (eval echo configure:1667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then  rm -rf conftest*  eval "ac_cv_func_$ac_func=yes"else  echo "configure: failed program was:" >&5  cat conftest.$ac_ext >&5  rm -rf conftest*  eval "ac_cv_func_$ac_func=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then  echo "$ac_t""yes" 1>&6    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`  cat >> confdefs.h <<EOF#define $ac_tr_func 1EOF else  echo "$ac_t""no" 1>&6fidoneecho $ac_n "checking for working mmap""... $ac_c" 1>&6echo "configure:1692: checking for working mmap" >&5if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then  echo $ac_n "(cached) $ac_c" 1>&6else  if test "$cross_compiling" = yes; then  ac_cv_func_mmap_fixed_mapped=noelse  cat > conftest.$ac_ext <<EOF#line 1700 "configure"#include "confdefs.h"/* Thanks to Mike Haertel and Jim Avera for this test.   Here is a matrix of mmap possibilities:	mmap private not fixed	mmap private fixed at somewhere currently unmapped	mmap private fixed at somewhere already mapped	mmap shared not fixed	mmap shared fixed at somewhere currently unmapped	mmap shared fixed at somewhere already mapped   For private mappings, we should verify that changes cannot be read()   back from the file, nor mmap's back from the file at a different   address.  (There have been systems where private was not correctly   implemented like the infamous i386 svr4.0, and systems where the   VM page cache was not coherent with the filesystem buffer cache   like early versions of FreeBSD and possibly contemporary NetBSD.)   For shared mappings, we should conversely verify that changes get   propogated back to all the places they're supposed to be.   Grep wants private fixed already mapped.   The main things grep needs to know about mmap are:   * does it exist and is it safe to write into the mmap'd area   * how to use it (BSD variants)  */#include <sys/types.h>#include <fcntl.h>#include <sys/mman.h>/* This mess was copied from the GNU getpagesize.h.  */#ifndef HAVE_GETPAGESIZE# ifdef HAVE_UNISTD_H#  include <unistd.h># endif/* Assume that all systems that can run configure have sys/param.h.  */# ifndef HAVE_SYS_PARAM_H#  define HAVE_SYS_PARAM_H 1# endif# ifdef _SC_PAGESIZE#  define getpagesize() sysconf(_SC_PAGESIZE)# else /* no _SC_PAGESIZE */#  ifdef HAVE_SYS_PARAM_H#   include <sys/param.h>#   ifdef EXEC_PAGESIZE#    define getpagesize() EXEC_PAGESIZE#   else /* no EXEC_PAGESIZE */#    ifdef NBPG#     define getpagesize() NBPG * CLSIZE#     ifndef CLSIZE#      define CLSIZE 1#     endif /* no CLSIZE */#    else /* no NBPG */#     ifdef NBPC#      define getpagesize() NBPC#     else /* no NBPC */#      ifdef PAGESIZE#       define getpagesize() PAGESIZE#      endif /* PAGESIZE */#     endif /* no NBPC */#    endif /* no NBPG */#   endif /* no EXEC_PAGESIZE */#  else /* no HAVE_SYS_PARAM_H */#   define getpagesize() 8192	/* punt totally */#  endif /* no HAVE_SYS_PARAM_H */# endif /* no _SC_PAGESIZE */#endif /* no HAVE_GETPAGESIZE */#ifdef __cplusplusextern "C" { void *malloc(unsigned); }#elsechar *malloc();#endifintmain(){	char *data, *data2, *data3;	int i, pagesize;	int fd;	pagesize = getpagesize();	/*	 * First, make a file with some known garbage in it.	 */	data = malloc(pagesize);	if (!data)		exit(1);	for (i = 0; i < pagesize; ++i)		*(data + i) = rand();	umask(0);	fd = creat("conftestmmap", 0600);	if (fd < 0)		exit(1);	if (write(fd, data, pagesize) != pagesize)		exit(1);	close(fd);	/*	 * Next, try to mmap the file at a fixed address which	 * already has something else allocated at it.  If we can,	 * also make sure that we see the same garbage.	 */	fd = open("conftestmmap", O_RDWR);	if (fd < 0)		exit(1);	data2 = malloc(2 * pagesize);	if (!data2)		exit(1);	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,	    MAP_PRIVATE | MAP_FIXED, fd, 0L))		exit(1);	for (i = 0; i < pagesize; ++i)		if (*(data + i) != *(data2 + i))			exit(1);	/*	 * Finally, make sure that changes to the mapped area	 * do not percolate back to the file as seen by read().	 * (This is a bug on some variants of i386 svr4.0.)	 */	for (i = 0; i < pagesize; ++i)		*(data2 + i) = *(data2 + i) + 1;	data3 = malloc(pagesize);	if (!data3)		exit(1);	if (read(fd, data3, pagesize) != pagesize)		exit(1);	for (i = 0; i < pagesize; ++i)		if (*(data + i) != *(data3 + i))			exit(1);	close(fd);	unlink("conftestmmap");	exit(0);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -