Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37811816
en ru br
Репозитории ALT
S:2.13-alt13
5.1: 2.13-alt11
4.1: 2.13-alt9
4.0: 2.13-alt9
3.0: 2.13-alt9
www.altlinux.org/Changes

Группа :: Разработка/Прочее
Пакет: autoconf_2.13

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: autoconf-2.13-alt-c++exit.patch
Скачать


--- autoconf-2.13~/acgeneral.m4	Tue Jun 26 17:00:28 2001
+++ autoconf-2.13/acgeneral.m4	Tue Jun 26 17:00:28 2001
@@ -1817,10 +1817,6 @@
 [cat > conftest.$ac_ext <<EOF
 [#]line __oline__ "configure"
 #include "confdefs.h"
-ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
-extern "C" void exit(int);
-#endif
-])dnl
 [$1]
 EOF
 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
--- autoconf-2.13~/acspecific.m4	Tue Jun 26 17:04:34 2001
+++ autoconf-2.13/acspecific.m4		Tue Jun 26 17:04:34 2001
@@ -152,8 +152,46 @@
     CXXFLAGS=
   fi
 fi
+
+AC_PROG_CXX_EXIT_DECLARATION
 ])
 
+
+# AC_PROG_CXX_EXIT_DECLARATION
+# -----------------------------
+# Find a valid prototype for exit and declare it in confdefs.h.
+AC_DEFUN(AC_PROG_CXX_EXIT_DECLARATION,
+[for ac_declaration in \
+   ''\
+   '#include <stdlib.h>' \
+   'extern "C" void std::exit (int) throw() __attribute__ ((__noreturn__)); using std::exit;' \
+   'extern "C" void std::exit (int) throw(); using std::exit;' \
+   'extern "C" void std::exit (int) __attribute__ ((__noreturn__)); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw() __attribute__ ((__noreturn__));' \
+   'extern "C" void exit (int) throw();' \
+   'extern "C" void exit (int) __attribute__ ((__noreturn__));' \
+   'extern "C" void exit (int);' \
+   'void exit (int) __attribute__ ((__noreturn__));' \
+   'void exit (int);'
+do
+  AC_TRY_COMPILE([#include <stdlib.h>
+$ac_declaration], 
+                 [exit (42);],
+                 [],
+                 [continue])
+  AC_TRY_COMPILE([$ac_declaration],
+                 [exit (42);],
+                 [break])
+done
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+])# AC_PROG_CXX_EXIT_DECLARATION
+
+
 dnl Determine a Fortran 77 compiler to use.  If `F77' is not already set
 dnl in the environment, check for `g77', `f77' and `f2c', in that order.
 dnl Set the output variable `F77' to the name of the compiler found.
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin