From: cherierm Date: Mon, 22 Oct 2007 09:02:24 +0000 (+0000) Subject: Visual C++ already declare the environ variable in the stdlib.h. So this redeclaratio... X-Git-Tag: v3.3~959 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b26df2277c5891bfef2822891d4d7235da4c51c7 Visual C++ already declare the environ variable in the stdlib.h. So this redeclaration cause a warning for this compiler. The declaration of this variable is now platform depend (WIN32 doesn't need this declaration). The pointer of the callback functions context default an context terminate are now exported in the Win32 dll. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4841 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/xbt/ex.c b/src/xbt/ex.c index 3cbbbcd9db..21215dd52a 100644 --- a/src/xbt/ex.c +++ b/src/xbt/ex.c @@ -81,7 +81,9 @@ void xbt_backtrace_display_current(void) { xbt_backtrace_display(&e); } +#ifndef WIN32 extern char **environ; /* the environment, as specified by the opengroup */ +#endif void xbt_ex_setup_backtrace(xbt_ex_t *e) { #if defined(HAVE_EXECINFO_H) && defined(HAVE_POPEN) && defined(ADDR2LINE) @@ -366,8 +368,8 @@ void __xbt_ex_terminate_default(xbt_ex_t *e) { } /* the externally visible API */ -XBT_EXPORT_NO_IMPORT(ex_ctx_cb_t) __xbt_ex_ctx = &__xbt_ex_ctx_default; -XBT_EXPORT_NO_IMPORT(ex_term_cb_t) __xbt_ex_terminate = &__xbt_ex_terminate_default; +XBT_PUBLIC_DATA(ex_ctx_cb_t) __xbt_ex_ctx = &__xbt_ex_ctx_default; +XBT_PUBLIC_DATA(ex_term_cb_t) __xbt_ex_terminate = &__xbt_ex_terminate_default; void xbt_ex_free(xbt_ex_t e) {