llvm.org GIT mirror llvm / c85a9b2
Remove the configure and cmake checks for sys/wait.h If we don't have sys/wait.h and we're on a unix system there's no way that several of the llvm tools work at all. This includes clang. Just remove the configure and cmake checks entirely - we'll get a build error instead of building something broken now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243957 91177308-0d34-0410-b5e6-96231b3b80d8 Justin Bogner 4 years ago
7 changed file(s) with 1 addition(s) and 112 deletion(s). Raw diff Collapse all Expand all
17851785 AC_HEADER_DIRENT
17861786 AC_HEADER_MMAP_ANONYMOUS
17871787 AC_HEADER_STAT
1788 AC_HEADER_SYS_WAIT
17891788 AC_HEADER_TIME
17901789
17911790 AC_LANG_PUSH([C++])
6666 check_include_file(sys/stat.h HAVE_SYS_STAT_H)
6767 check_include_file(sys/time.h HAVE_SYS_TIME_H)
6868 check_include_file(sys/uio.h HAVE_SYS_UIO_H)
69 check_include_file(sys/wait.h HAVE_SYS_WAIT_H)
7069 check_include_file(termios.h HAVE_TERMIOS_H)
7170 check_include_file(unistd.h HAVE_UNISTD_H)
7271 check_include_file(utime.h HAVE_UTIME_H)
1112311123
1112411124 fi
1112511125
11126 { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
11127 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
11128 if test "${ac_cv_header_sys_wait_h+set}" = set; then
11129 echo $ECHO_N "(cached) $ECHO_C" >&6
11130 else
11131 cat >conftest.$ac_ext <<_ACEOF
11132 /* confdefs.h. */
11133 _ACEOF
11134 cat confdefs.h >>conftest.$ac_ext
11135 cat >>conftest.$ac_ext <<_ACEOF
11136 /* end confdefs.h. */
11137 #include
11138 #include
11139 #ifndef WEXITSTATUS
11140 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
11141 #endif
11142 #ifndef WIFEXITED
11143 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
11144 #endif
11145
11146 int
11147 main ()
11148 {
11149 int s;
11150 wait (&s);
11151 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
11152 ;
11153 return 0;
11154 }
11155 _ACEOF
11156 rm -f conftest.$ac_objext
11157 if { (ac_try="$ac_compile"
11158 case "(($ac_try" in
11159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11160 *) ac_try_echo=$ac_try;;
11161 esac
11162 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11163 (eval "$ac_compile") 2>conftest.er1
11164 ac_status=$?
11165 grep -v '^ *+' conftest.er1 >conftest.err
11166 rm -f conftest.er1
11167 cat conftest.err >&5
11168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11169 (exit $ac_status); } &&
11170 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11171 { (case "(($ac_try" in
11172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11173 *) ac_try_echo=$ac_try;;
11174 esac
11175 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11176 (eval "$ac_try") 2>&5
11177 ac_status=$?
11178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11179 (exit $ac_status); }; } &&
11180 { ac_try='test -s conftest.$ac_objext'
11181 { (case "(($ac_try" in
11182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11183 *) ac_try_echo=$ac_try;;
11184 esac
11185 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11186 (eval "$ac_try") 2>&5
11187 ac_status=$?
11188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11189 (exit $ac_status); }; }; then
11190 ac_cv_header_sys_wait_h=yes
11191 else
11192 echo "$as_me: failed program was:" >&5
11193 sed 's/^/| /' conftest.$ac_ext >&5
11194
11195 ac_cv_header_sys_wait_h=no
11196 fi
11197
11198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11199 fi
11200 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
11201 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
11202 if test $ac_cv_header_sys_wait_h = yes; then
11203
11204 cat >>confdefs.h <<\_ACEOF
11205 #define HAVE_SYS_WAIT_H 1
11206 _ACEOF
11207
11208 fi
11209
1121011126 { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
1121111127 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
1121211128 if test "${ac_cv_header_time+set}" = set; then
1979219708 cd "$ac_popdir"
1979319709 done
1979419710 fi
19795
323323 /* Define to 1 if you have the header file. */
324324 #cmakedefine HAVE_SYS_UIO_H ${HAVE_SYS_UIO_H}
325325
326 /* Define to 1 if you have that is POSIX.1 compatible. */
327 #cmakedefine HAVE_SYS_WAIT_H ${HAVE_SYS_WAIT_H}
328
329326 /* Define if the setupterm() function is supported this platform. */
330327 #cmakedefine HAVE_TERMINFO ${HAVE_TERMINFO}
331328
317317 /* Define to 1 if you have the header file. */
318318 #undef HAVE_SYS_UIO_H
319319
320 /* Define to 1 if you have that is POSIX.1 compatible. */
321 #undef HAVE_SYS_WAIT_H
322
323320 /* Define if the setupterm() function is supported this platform. */
324321 #undef HAVE_TERMINFO
325322
322322
323323 ProcessInfo sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait,
324324 bool WaitUntilTerminates, std::string *ErrMsg) {
325 #ifdef HAVE_SYS_WAIT_H
326325 struct sigaction Act, Old;
327326 assert(PI.Pid && "invalid pid to wait on, process not started?");
328327
416415 // signal during execution as opposed to failing to execute.
417416 WaitResult.ReturnCode = -2;
418417 }
419 #else
420 if (ErrMsg)
421 *ErrMsg = "Program::Wait is not implemented on this platform yet!";
422 ProcessInfo WaitResult;
423 WaitResult.ReturnCode = -2;
424 #endif
425418 return WaitResult;
426419 }
427420
2828 #include
2929 #include
3030 #include
31 #include
3132
3233 #ifdef HAVE_UNISTD_H
3334 #include
4243 #endif
4344 #include
4445
45 #ifdef HAVE_SYS_WAIT_H
46 # include
47 #endif
48
4946 #ifdef HAVE_DLFCN_H
5047 # include
51 #endif
52
53 #ifndef WEXITSTATUS
54 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
55 #endif
56
57 #ifndef WIFEXITED
58 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5948 #endif
6049
6150 /// This function builds an error message into \p ErrMsg using the \p prefix