Changeset 59

Show
Ignore:
Timestamp:
07/13/04 23:26:09 (4 years ago)
Author:
morris
Message:

add test for declaration of optreset

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wire/trunk/config.h.in

    r53 r59  
    99/* Define to 1 if you have the <arpa/inet.h> header file. */ 
    1010#undef HAVE_ARPA_INET_H 
     11 
     12/* Define to 1 if you have the declaration of `optreset', and to 0 if you 
     13   don't. */ 
     14#undef HAVE_DECL_OPTRESET 
    1115 
    1216/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. 
  • wire/trunk/configure

    r54 r59  
    59555955 
    59565956fi 
     5957 
     5958echo "$as_me:$LINENO: checking whether optreset is declared" >&5 
     5959echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6 
     5960if test "${ac_cv_have_decl_optreset+set}" = set; then 
     5961  echo $ECHO_N "(cached) $ECHO_C" >&6 
     5962else 
     5963  cat >conftest.$ac_ext <<_ACEOF 
     5964#line $LINENO "configure" 
     5965/* confdefs.h.  */ 
     5966_ACEOF 
     5967cat confdefs.h >>conftest.$ac_ext 
     5968cat >>conftest.$ac_ext <<_ACEOF 
     5969/* end confdefs.h.  */ 
     5970$ac_includes_default 
     5971int 
     5972main () 
     5973{ 
     5974#ifndef optreset 
     5975  char *p = (char *) optreset; 
     5976#endif 
     5977 
     5978  ; 
     5979  return 0; 
     5980} 
     5981_ACEOF 
     5982rm -f conftest.$ac_objext 
     5983if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
     5984  (eval $ac_compile) 2>&5 
     5985  ac_status=$? 
     5986  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     5987  (exit $ac_status); } && 
     5988         { ac_try='test -s conftest.$ac_objext' 
     5989  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     5990  (eval $ac_try) 2>&5 
     5991  ac_status=$? 
     5992  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     5993  (exit $ac_status); }; }; then 
     5994  ac_cv_have_decl_optreset=yes 
     5995else 
     5996  echo "$as_me: failed program was:" >&5 
     5997sed 's/^/| /' conftest.$ac_ext >&5 
     5998 
     5999ac_cv_have_decl_optreset=no 
     6000fi 
     6001rm -f conftest.$ac_objext conftest.$ac_ext 
     6002fi 
     6003echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5 
     6004echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6 
     6005if test $ac_cv_have_decl_optreset = yes; then 
     6006 
     6007cat >>confdefs.h <<_ACEOF 
     6008#define HAVE_DECL_OPTRESET 1 
     6009_ACEOF 
     6010 
     6011 
     6012else 
     6013  cat >>confdefs.h <<_ACEOF 
     6014#define HAVE_DECL_OPTRESET 0 
     6015_ACEOF 
     6016 
     6017 
     6018fi 
     6019 
    59576020 
    59586021 
  • wire/trunk/configure.in

    r54 r59  
    201201AC_TYPE_SIGNAL 
    202202AC_TYPE_SIZE_T 
     203AC_CHECK_DECLS([optreset]) 
    203204 
    204205 
  • wire/trunk/wire/commands.c

    r58 r59  
    1 /* $Id: commands.c,v 1.25 2004/07/13 18:14:31 morris Exp $ */ 
     1/* $Id: commands.c,v 1.26 2004/07/13 21:26:09 morris Exp $ */ 
    22 
    33/* 
     
    870870         
    871871        /* parse arguments */ 
     872#ifdef HAVE_DECL_OPTRESET 
    872873        optreset = 1; 
     874#endif 
    873875        optind = 1; 
    874876