merge from gcc
This commit is contained in:
parent
9e1a94f4a1
commit
62b06a9e17
5 changed files with 15 additions and 39 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2010-11-20 Anthony Green <green@moxielogic.com>
|
||||||
|
|
||||||
|
* configure.ac: Turn PR_SET_NAME link test into a test for
|
||||||
|
sys/prctl.h.
|
||||||
|
* configure, config.in: Rebuilt.
|
||||||
|
* setproctitle.c: Test for HAVE_SYS_PRCTL_H.
|
||||||
|
(setproctitle) Test for PR_SET_NAME definition.
|
||||||
|
|
||||||
2010-11-20 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
2010-11-20 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||||
|
|
||||||
PR other/46202
|
PR other/46202
|
||||||
|
|
|
@ -169,9 +169,6 @@
|
||||||
/* Define to 1 if you have the `on_exit' function. */
|
/* Define to 1 if you have the `on_exit' function. */
|
||||||
#undef HAVE_ON_EXIT
|
#undef HAVE_ON_EXIT
|
||||||
|
|
||||||
/* Define if you have prctl PR_SET_NAME */
|
|
||||||
#undef HAVE_PRCTL_SET_NAME
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <process.h> header file. */
|
/* Define to 1 if you have the <process.h> header file. */
|
||||||
#undef HAVE_PROCESS_H
|
#undef HAVE_PROCESS_H
|
||||||
|
|
||||||
|
@ -304,6 +301,9 @@
|
||||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||||
#undef HAVE_SYS_PARAM_H
|
#undef HAVE_SYS_PARAM_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/prctl.h> header file. */
|
||||||
|
#undef HAVE_SYS_PRCTL_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/pstat.h> header file. */
|
/* Define to 1 if you have the <sys/pstat.h> header file. */
|
||||||
#undef HAVE_SYS_PSTAT_H
|
#undef HAVE_SYS_PSTAT_H
|
||||||
|
|
||||||
|
|
24
libiberty/configure
vendored
24
libiberty/configure
vendored
|
@ -4895,7 +4895,7 @@ host_makefile_frag=${frag}
|
||||||
# It's OK to check for header files. Although the compiler may not be
|
# It's OK to check for header files. Although the compiler may not be
|
||||||
# able to link anything, it had better be able to at least compile
|
# able to link anything, it had better be able to at least compile
|
||||||
# something.
|
# something.
|
||||||
for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h process.h
|
for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h process.h sys/prctl.h
|
||||||
do :
|
do :
|
||||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||||
ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header"
|
ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header"
|
||||||
|
@ -5719,28 +5719,6 @@ fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# check for prctl PR_SET_NAME
|
|
||||||
if test x$gcc_no_link = xyes; then
|
|
||||||
as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
|
|
||||||
fi
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
#include <sys/prctl.h>
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
return (prctl(PR_SET_NAME, "foo") == 0) ? 0 : 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
_ACEOF
|
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
|
||||||
|
|
||||||
$as_echo "#define HAVE_PRCTL_SET_NAME 1" >>confdefs.h
|
|
||||||
|
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
|
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
*-*-cygwin* | *-*-mingw*)
|
*-*-cygwin* | *-*-mingw*)
|
||||||
$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
|
$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
|
||||||
|
|
|
@ -246,7 +246,7 @@ AC_SUBST_FILE(host_makefile_frag)
|
||||||
# It's OK to check for header files. Although the compiler may not be
|
# It's OK to check for header files. Although the compiler may not be
|
||||||
# able to link anything, it had better be able to at least compile
|
# able to link anything, it had better be able to at least compile
|
||||||
# something.
|
# something.
|
||||||
AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h process.h)
|
AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h process.h sys/prctl.h)
|
||||||
AC_HEADER_SYS_WAIT
|
AC_HEADER_SYS_WAIT
|
||||||
AC_HEADER_TIME
|
AC_HEADER_TIME
|
||||||
|
|
||||||
|
@ -538,16 +538,6 @@ fi
|
||||||
AC_SUBST(CHECK)
|
AC_SUBST(CHECK)
|
||||||
AC_SUBST(target_header_dir)
|
AC_SUBST(target_header_dir)
|
||||||
|
|
||||||
# check for prctl PR_SET_NAME
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
|
||||||
#include <sys/prctl.h>
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
return (prctl(PR_SET_NAME, "foo") == 0) ? 0 : 1;
|
|
||||||
}
|
|
||||||
]])], AC_DEFINE(HAVE_PRCTL_SET_NAME, 1,
|
|
||||||
[Define if you have prctl PR_SET_NAME]))
|
|
||||||
|
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
*-*-cygwin* | *-*-mingw*)
|
*-*-cygwin* | *-*-mingw*)
|
||||||
AC_DEFINE(HAVE_SYS_ERRLIST)
|
AC_DEFINE(HAVE_SYS_ERRLIST)
|
||||||
|
|
|
@ -20,7 +20,7 @@ Boston, MA 02110-1301, USA. */
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_PRCTL_SET_NAME
|
#ifdef HAVE_SYS_PRCTL_H
|
||||||
#include <sys/prctl.h>
|
#include <sys/prctl.h>
|
||||||
#endif
|
#endif
|
||||||
#include "ansidecl.h"
|
#include "ansidecl.h"
|
||||||
|
@ -39,7 +39,7 @@ but defined for compatibility with BSD.
|
||||||
void
|
void
|
||||||
setproctitle (const char *name ATTRIBUTE_UNUSED, ...)
|
setproctitle (const char *name ATTRIBUTE_UNUSED, ...)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_PRCTL_SET_NAME
|
#ifdef PR_SET_NAME
|
||||||
/* On Linux this sets the top visible "comm", but not necessarily
|
/* On Linux this sets the top visible "comm", but not necessarily
|
||||||
the name visible in ps. */
|
the name visible in ps. */
|
||||||
prctl (PR_SET_NAME, name);
|
prctl (PR_SET_NAME, name);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue