On Fri, Jan 19, 2001 at 07:35:04PM +0100, [EMAIL PROTECTED] wrote:
: Thanks Lars, it's great!
Here's a patch:
2000-01-19 Lars J. Aas <[EMAIL PROTECTED]>
* aclang.m4 (_AC_GROG_CXX_EXIT_DECLARATION): Take care of
the _CRTIMP business with libc declarations with MS Visual C++.
Index: aclang.m4
===================================================================
RCS file: /cvs/autoconf/aclang.m4,v
retrieving revision 1.112
diff -u -r1.112 aclang.m4
--- aclang.m4 2001/01/19 14:03:14 1.112
+++ aclang.m4 2001/01/19 18:39:49
@@ -1126,12 +1128,15 @@
# -----------------------------
# Find a valid prototype for exit and declare it in confdefs.h.
m4_define([_AC_PROG_CXX_EXIT_DECLARATION],
-[for ac_declaration in \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);' \
+[echo "#ifndef _CRTIMP" >>confdefs.h
+echo "#define _CRTIMP" >>confdefs.h
+echo "#endif" >>confdefs.h
+for ac_declaration in \
+ '_CRTIMP extern "C" void std::exit (int) throw (); using std::exit;' \
+ '_CRTIMP extern "C" void std::exit (int); using std::exit;' \
+ '_CRTIMP extern "C" void exit (int) throw ();' \
+ '_CRTIMP extern "C" void exit (int);' \
+ '_CRTIMP void exit (int);' \
''
do
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([@%:@include <stdlib.h>