llvm.org GIT mirror llvm / 2333a31
Temporarily revert 185601 as it caused cmake build regressions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185603 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 6 years ago
5 changed file(s) with 1 addition(s) and 131 deletion(s). Raw diff Collapse all Expand all
16181618 AC_CHECK_FUNCS([strerror strerror_r setenv arc4random ])
16191619 AC_CHECK_FUNCS([strtoll strtoq sysconf malloc_zone_statistics ])
16201620 AC_CHECK_FUNCS([setjmp longjmp sigsetjmp siglongjmp writev])
1621 AC_CHECK_FUNCS([futimes futimens])
16221621 AC_C_PRINTF_A
16231622 AC_FUNC_RAND48
16241623
135135 check_symbol_exists(exp math.h HAVE_EXP)
136136 check_symbol_exists(exp2 math.h HAVE_EXP2)
137137 check_symbol_exists(exp10 math.h HAVE_EXP10)
138 check_symbol_exists(futimens sys/stat.h HAVE_FUTIMENS)
139 check_symbol_exists(futimes sys/time.h HAVE_FUTIMES)
140138 if( HAVE_SETJMP_H )
141139 check_symbol_exists(longjmp setjmp.h HAVE_LONGJMP)
142140 check_symbol_exists(setjmp setjmp.h HAVE_SETJMP)
1054510545 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1054610546 lt_status=$lt_dlunknown
1054710547 cat > conftest.$ac_ext <
10548 #line 10549 "configure"
10548 #line 10542 "configure"
1054910549 #include "confdefs.h"
1055010550
1055110551 #if HAVE_DLFCN_H
1895518955
1895618956
1895718957 for ac_func in setjmp longjmp sigsetjmp siglongjmp writev
18958 do
18959 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18960 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18961 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18962 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18963 echo $ECHO_N "(cached) $ECHO_C" >&6
18964 else
18965 cat >conftest.$ac_ext <<_ACEOF
18966 /* confdefs.h. */
18967 _ACEOF
18968 cat confdefs.h >>conftest.$ac_ext
18969 cat >>conftest.$ac_ext <<_ACEOF
18970 /* end confdefs.h. */
18971 /* Define $ac_func to an innocuous variant, in case declares $ac_func.
18972 For example, HP-UX 11i declares gettimeofday. */
18973 #define $ac_func innocuous_$ac_func
18974
18975 /* System header to define __stub macros and hopefully few prototypes,
18976 which can conflict with char $ac_func (); below.
18977 Prefer to if __STDC__ is defined, since
18978 exists even on freestanding compilers. */
18979
18980 #ifdef __STDC__
18981 # include
18982 #else
18983 # include
18984 #endif
18985
18986 #undef $ac_func
18987
18988 /* Override any GCC internal prototype to avoid an error.
18989 Use char because int might match the return type of a GCC
18990 builtin and then its argument prototype would still apply. */
18991 #ifdef __cplusplus
18992 extern "C"
18993 #endif
18994 char $ac_func ();
18995 /* The GNU C library defines this for functions which it implements
18996 to always fail with ENOSYS. Some functions are actually named
18997 something starting with __ and the normal name is an alias. */
18998 #if defined __stub_$ac_func || defined __stub___$ac_func
18999 choke me
19000 #endif
19001
19002 int
19003 main ()
19004 {
19005 return $ac_func ();
19006 ;
19007 return 0;
19008 }
19009 _ACEOF
19010 rm -f conftest.$ac_objext conftest$ac_exeext
19011 if { (ac_try="$ac_link"
19012 case "(($ac_try" in
19013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19014 *) ac_try_echo=$ac_try;;
19015 esac
19016 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19017 (eval "$ac_link") 2>conftest.er1
19018 ac_status=$?
19019 grep -v '^ *+' conftest.er1 >conftest.err
19020 rm -f conftest.er1
19021 cat conftest.err >&5
19022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19023 (exit $ac_status); } &&
19024 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19025 { (case "(($ac_try" in
19026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19027 *) ac_try_echo=$ac_try;;
19028 esac
19029 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19030 (eval "$ac_try") 2>&5
19031 ac_status=$?
19032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19033 (exit $ac_status); }; } &&
19034 { ac_try='test -s conftest$ac_exeext'
19035 { (case "(($ac_try" in
19036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19037 *) ac_try_echo=$ac_try;;
19038 esac
19039 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19040 (eval "$ac_try") 2>&5
19041 ac_status=$?
19042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19043 (exit $ac_status); }; }; then
19044 eval "$as_ac_var=yes"
19045 else
19046 echo "$as_me: failed program was:" >&5
19047 sed 's/^/| /' conftest.$ac_ext >&5
19048
19049 eval "$as_ac_var=no"
19050 fi
19051
19052 rm -f core conftest.err conftest.$ac_objext \
19053 conftest$ac_exeext conftest.$ac_ext
19054 fi
19055 ac_res=`eval echo '${'$as_ac_var'}'`
19056 { echo "$as_me:$LINENO: result: $ac_res" >&5
19057 echo "${ECHO_T}$ac_res" >&6; }
19058 if test `eval echo '${'$as_ac_var'}'` = yes; then
19059 cat >>confdefs.h <<_ACEOF
19060 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19061 _ACEOF
19062
19063 fi
19064 done
19065
19066
19067
19068 for ac_func in futimes futimens
1906918958 do
1907018959 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1907118960 { echo "$as_me:$LINENO: checking for $ac_func" >&5
165165 /* Define to 1 if you have the `fmodf' function. */
166166 #undef HAVE_FMODF
167167
168 /* Define to 1 if you have the `futimens' function. */
169 #undef HAVE_FUTIMENS
170
171 /* Define to 1 if you have the `futimes' function. */
172 #undef HAVE_FUTIMES
173
174168 /* Define to 1 if you have the `getcwd' function. */
175169 #undef HAVE_GETCWD
176170
625625 }
626626
627627 error_code setLastModificationAndAccessTime(int FD, TimeValue Time) {
628 #if HAVE_FUTIMENS
629 timespec Times[2];
630 Times[0].tv_sec = Time.toPosixTime();
631 Times[0].tv_nsec = 0;
632 Times[1] = Times[0];
633 if (::futimens(FD, Times))
634 #elif HAVE_FUTIMES
635628 timeval Times[2];
636629 Times[0].tv_sec = Time.toPosixTime();
637630 Times[0].tv_usec = 0;
638631 Times[1] = Times[0];
639632 if (::futimes(FD, Times))
640 #else
641 #error Missing futimes() and futimens()
642 #endif
643633 return error_code(errno, system_category());
644634 return error_code::success();
645635 }