--- lam-7.1.2/config/lam_memory_setup.m4.org 2006-07-07 22:31:19.000000000 -0400 +++ lam-7.1.2/config/lam_memory_setup.m4 2006-07-07 22:31:38.000000000 -0400 @@ -56,7 +56,7 @@ AC_DEFUN([LAM_DARWIN_MALLOC_SETUP],[ case "$host" in *apple-darwin*) - WRAPPER_EXTRA_LDFLAGS="-Wl,-u -Wl,_lam_darwin_malloc_linker_hack -Wl,-multiply_defined,suppress -Wl,-force_flat_namespace -Wl,-flat_namespace $WRAPPER_EXTRA_LDFLAGS" + WRAPPER_EXTRA_LDFLAGS="-Wl,-u -Wl,_lam_darwin_malloc_linker_hack -Wl,-multiply_defined,suppress -Wl,-flat_namespace $WRAPPER_EXTRA_LDFLAGS" LDFLAGS="-Wl,-multiply_defined,suppress $LDFLAGS" ;; *) diff -uNr lam-7.1.3.org/otb/mpirun/mpirun.c lam-7.1.3/otb/mpirun/mpirun.c --- lam-7.1.3.org/otb/mpirun/mpirun.c 2006-06-24 16:42:25.000000000 -0400 +++ lam-7.1.3/otb/mpirun/mpirun.c 2007-05-27 19:31:33.000000000 -0400 @@ -104,7 +104,12 @@ */ extern struct kio_t _kio; /* kernel I/O block */ extern struct fclient _ufd[FUMAX]; /* user file desc. */ +# ifdef __APPLE__ +# include +# define environ (*_NSGetEnviron()) +# else extern char **environ; +# endif /* * exported variables diff -uNr lam-7.1.3.org/otb/sys/haltd/haltd.c lam-7.1.3/otb/sys/haltd/haltd.c --- lam-7.1.3.org/otb/sys/haltd/haltd.c 2006-12-28 13:42:20.000000000 -0500 +++ lam-7.1.3/otb/sys/haltd/haltd.c 2007-05-27 19:32:26.000000000 -0400 @@ -44,7 +44,12 @@ /* * Access the environment */ +# ifdef __APPLE__ +# include +# define environ (*_NSGetEnviron()) +# else extern char **environ; +# endif /* * local variables diff -uNr lam-7.1.3.org/otb/sys/kernel/kernelio.c lam-7.1.3/otb/sys/kernel/kernelio.c --- lam-7.1.3.org/otb/sys/kernel/kernelio.c 2006-06-24 16:42:25.000000000 -0400 +++ lam-7.1.3/otb/sys/kernel/kernelio.c 2007-05-27 19:33:12.000000000 -0400 @@ -91,7 +91,12 @@ * external variables */ extern struct kproc *prun; /* current running client */ +# ifdef __APPLE__ +# include +# define environ (*_NSGetEnviron()) +# else extern char **environ; +# endif /* * local variables diff -uNr lam-7.1.3.org/share/boot/asc_parse.c lam-7.1.3/share/boot/asc_parse.c --- lam-7.1.3.org/share/boot/asc_parse.c 2006-06-24 16:42:42.000000000 -0400 +++ lam-7.1.3/share/boot/asc_parse.c 2007-05-27 19:34:20.000000000 -0400 @@ -652,7 +652,12 @@ int asc_environment(int exportme, char *varlist, char ***env) { +# ifdef __APPLE__ +# include +# define environ (*_NSGetEnviron()) +# else extern char **environ; /* current environment */ +# endif char **p; char *v; int nenv; diff -uNr lam-7.1.3.org/share/boot/hbootparse.c lam-7.1.3/share/boot/hbootparse.c --- lam-7.1.3.org/share/boot/hbootparse.c 2006-06-24 16:42:42.000000000 -0400 +++ lam-7.1.3/share/boot/hbootparse.c 2007-05-27 19:35:13.000000000 -0400 @@ -33,7 +33,12 @@ #include #include +# ifdef __APPLE__ +# include +# define environ (*_NSGetEnviron()) +# else extern char **environ; +# endif static char *conffile; static char **av_psc_path; diff -uNr lam-7.1.3.org/share/ssi/boot/base/ssi_boot_find_boot_schema.c lam-7.1.3/share/ssi/boot/base/ssi_boot_find_boot_schema.c --- lam-7.1.3.org/share/ssi/boot/base/ssi_boot_find_boot_schema.c 2006-06-24 16:42:36.000000000 -0400 +++ lam-7.1.3/share/ssi/boot/base/ssi_boot_find_boot_schema.c 2007-05-27 19:36:12.000000000 -0400 @@ -31,7 +31,12 @@ * Access the environment */ +# ifdef __APPLE__ +# include +# define environ (*_NSGetEnviron()) +# else extern char **environ; +# endif diff -uNr lam-7.1.3.org/share/ssi/boot/bproc/src/ssi_boot_bproc.c lam-7.1.3/share/ssi/boot/bproc/src/ssi_boot_bproc.c --- lam-7.1.3.org/share/ssi/boot/bproc/src/ssi_boot_bproc.c 2006-06-24 16:42:36.000000000 -0400 +++ lam-7.1.3/share/ssi/boot/bproc/src/ssi_boot_bproc.c 2007-05-27 19:37:18.000000000 -0400 @@ -101,7 +101,12 @@ /* * External variables */ +# ifdef __APPLE__ +# include +# define environ (*_NSGetEnviron()) +# else extern char **environ; +# endif int diff -uNr lam-7.1.3.org/share/ssi/boot/globus/src/ssi_boot_globus.c lam-7.1.3/share/ssi/boot/globus/src/ssi_boot_globus.c --- lam-7.1.3.org/share/ssi/boot/globus/src/ssi_boot_globus.c 2006-06-24 16:42:36.000000000 -0400 +++ lam-7.1.3/share/ssi/boot/globus/src/ssi_boot_globus.c 2007-05-27 19:38:32.000000000 -0400 @@ -42,7 +42,12 @@ /* * Access the environment */ +# ifdef __APPLE__ +# include +# define environ (*_NSGetEnviron()) +# else extern char **environ; +# endif /* diff -uNr lam-7.1.3.org/share/ssi/boot/tm/src/ssi_boot_tm.c lam-7.1.3/share/ssi/boot/tm/src/ssi_boot_tm.c --- lam-7.1.3.org/share/ssi/boot/tm/src/ssi_boot_tm.c 2006-06-24 16:42:36.000000000 -0400 +++ lam-7.1.3/share/ssi/boot/tm/src/ssi_boot_tm.c 2007-05-27 19:39:20.000000000 -0400 @@ -82,7 +82,12 @@ /* * External variables */ +# ifdef __APPLE__ +# include +# define environ (*_NSGetEnviron()) +# else extern char **environ; +# endif int diff -uNr lam-7.1.3.org/share/ssi/crlam/base/ssi_crlam.c lam-7.1.3/share/ssi/crlam/base/ssi_crlam.c --- lam-7.1.3.org/share/ssi/crlam/base/ssi_crlam.c 2006-06-24 16:42:42.000000000 -0400 +++ lam-7.1.3/share/ssi/crlam/base/ssi_crlam.c 2007-05-27 19:40:21.000000000 -0400 @@ -49,7 +49,12 @@ /* * external variables */ +# ifdef __APPLE__ +# include +# define environ (*_NSGetEnviron()) +# else extern char **environ; +# endif #define signal_puts(S) write(STDOUT_FILENO, (S), strlen(S)) diff -uNr lam-7.1.3.org/tools/wrappers/wrap.cc lam-7.1.3/tools/wrappers/wrap.cc --- lam-7.1.3.org/tools/wrappers/wrap.cc 2006-06-24 16:42:29.000000000 -0400 +++ lam-7.1.3/tools/wrappers/wrap.cc 2007-05-27 19:41:50.000000000 -0400 @@ -42,9 +42,17 @@ // External functions // +# ifdef __APPLE__ +# include +# endif + extern "C" { extern int cnfexec(char *argv[]); +# ifdef __APPLE__ +# define environ (*_NSGetEnviron()) +# else extern char **environ; +# endif } diff -uNr lam-7.1.3.org/tools/wrappers/wrap_cc.cc lam-7.1.3/tools/wrappers/wrap_cc.cc --- lam-7.1.3.org/tools/wrappers/wrap_cc.cc 2006-06-24 16:42:29.000000000 -0400 +++ lam-7.1.3/tools/wrappers/wrap_cc.cc 2007-05-27 19:42:52.000000000 -0400 @@ -42,9 +42,17 @@ // External functions // +# ifdef __APPLE__ +# include +# endif + extern "C" { extern int cnfexec(char *argv[]); +# ifdef __APPLE__ +# define environ (*_NSGetEnviron()) +# else extern char **environ; +# endif } diff -uNr lam-7.1.3.org/tools/wrappers/wrap_cxx.cc lam-7.1.3/tools/wrappers/wrap_cxx.cc --- lam-7.1.3.org/tools/wrappers/wrap_cxx.cc 2006-06-24 16:42:29.000000000 -0400 +++ lam-7.1.3/tools/wrappers/wrap_cxx.cc 2007-05-27 19:43:48.000000000 -0400 @@ -42,9 +42,17 @@ // External functions // +# ifdef __APPLE__ +# include +# endif + extern "C" { extern int cnfexec(char *argv[]); +# ifdef __APPLE__ +# define environ (*_NSGetEnviron()) +# else extern char **environ; +# endif } diff -uNr lam-7.1.3.org/tools/wrappers/wrap_f77.cc lam-7.1.3/tools/wrappers/wrap_f77.cc --- lam-7.1.3.org/tools/wrappers/wrap_f77.cc 2006-06-24 16:42:29.000000000 -0400 +++ lam-7.1.3/tools/wrappers/wrap_f77.cc 2007-05-27 19:44:55.000000000 -0400 @@ -42,9 +42,17 @@ // External functions // +# ifdef __APPLE__ +# include +# endif + extern "C" { extern int cnfexec(char *argv[]); +# ifdef __APPLE__ +# define environ (*_NSGetEnviron()) +# else extern char **environ; +# endif } --- lam-7.1.4-rh1/config/lam_check_prefix_memcpy.m4.gcc43 2006-06-24 16:42:44.000000000 -0400 +++ lam-7.1.4-rh1/config/lam_check_prefix_memcpy.m4 2008-06-24 20:16:47.000000000 -0400 @@ -28,7 +28,7 @@ AC_MSG_CHECKING([for glibc]) AC_TRY_RUN([ #include -int main(int argc, char* argv[]) +int main(int argc, char** argv) { FILE *fp = fopen("configtest.out", "w"); #ifdef __GLIBC__ --- lam-7.1.4-rh1/config/lam_check_bsd43_fd_passing.m4.gcc43 2006-06-24 16:42:44.000000000 -0400 +++ lam-7.1.4-rh1/config/lam_check_bsd43_fd_passing.m4 2008-06-24 20:16:47.000000000 -0400 @@ -76,7 +76,7 @@ LAM_TRY_RUN_FD_PASSING([#include ::member(int i) } int -main(int argc, char *argv[]) +main(int argc, char **argv) { foo var1(6); foo< foo > var2(var1); --- lam-7.1.4-rh1/config/lam_check_pthread_pids.m4.gcc43 2006-06-24 16:42:44.000000000 -0400 +++ lam-7.1.4-rh1/config/lam_check_pthread_pids.m4 2008-06-24 20:16:47.000000000 -0400 @@ -44,7 +44,7 @@ AC_TRY_RUN([#include #include #include void *checkpid(void *arg); -int main(int argc, char* argv[]) { +int main(int argc, char** argv) { pthread_t thr; int pid, retval; pid = getpid(); --- lam-7.1.4-rh1/config/lam_check_stdc.m4.gcc43 2006-06-24 16:42:44.000000000 -0400 +++ lam-7.1.4-rh1/config/lam_check_stdc.m4 2008-06-24 20:16:47.000000000 -0400 @@ -23,7 +23,7 @@ cat > conftest.c < struct foo { char c; $1 x; }; -int main(int argc, char* argv[]) +int main(int argc, char** argv) { struct foo *p = (struct foo *) malloc(sizeof(struct foo)); int diff; --- lam-7.1.4-rh1/config/cxx_have_nothrow_new.m4.gcc43 2006-06-24 16:42:44.000000000 -0400 +++ lam-7.1.4-rh1/config/cxx_have_nothrow_new.m4 2008-06-24 20:16:47.000000000 -0400 @@ -37,7 +37,7 @@ rm -f conftest.cc conftest.o cat > conftest.cc < -int main(int argc, char* argv[]) { +int main(int argc, char** argv) { int *baz; unsigned int foo = 3; baz = new(std::nothrow) int; --- lam-7.1.4-rh1/config/lam_mutex_pshared.m4.gcc43 2006-06-24 16:42:44.000000000 -0400 +++ lam-7.1.4-rh1/config/lam_mutex_pshared.m4 2008-06-24 20:16:47.000000000 -0400 @@ -17,7 +17,7 @@ dnl define(LAM_MUTEX_PSHARED,[ AC_MSG_CHECKING(for process shared pthread mutex) AC_TRY_RUN([#include -int main(int argc, char* argv[]) { +int main(int argc, char** argv) { pthread_mutex_t m; pthread_mutexattr_t mattr; if (pthread_mutexattr_init(&mattr)) return(1); if (pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED)) return(1); --- lam-7.1.4-rh1/config/lam_check_fd_setsize.m4.gcc43 2006-06-24 16:42:44.000000000 -0400 +++ lam-7.1.4-rh1/config/lam_check_fd_setsize.m4 2008-06-24 20:16:47.000000000 -0400 @@ -86,7 +86,7 @@ if test ! "$LAM_FD_SETSIZE" = "0" ; then #include #include int -main(int argc, char* argv[]) +main(int argc, char** argv) { int fd = 0; struct rlimit rlp; @@ -135,7 +135,7 @@ if test ! "$LAM_FD_SETSIZE" = "0"; then #include #endif int -main(int argc, char* argv[]) +main(int argc, char** argv) { int ret; fd_set fds; --- lam-7.1.4-rh1/config/lam_wrapper_extra_ldflags.m4.gcc43 2006-06-24 16:42:44.000000000 -0400 +++ lam-7.1.4-rh1/config/lam_wrapper_extra_ldflags.m4 2008-06-24 20:16:47.000000000 -0400 @@ -75,7 +75,7 @@ int foo(void) { return 1; } EOF cat > conftest.c < /dev/null 2>&1 --- lam-7.1.4-rh1/config/cxx_have_bool.m4.gcc43 2006-06-24 16:42:44.000000000 -0400 +++ lam-7.1.4-rh1/config/cxx_have_bool.m4 2008-06-24 20:16:47.000000000 -0400 @@ -42,7 +42,7 @@ cat > conftest.cc < #include -int main(int argc, char* argv[]) { +int main(int argc, char** argv) { bool foo = (bool) 0; printf("so foo is used and the compiler wont complain: %d", (int) foo); return 0; --- lam-7.1.4-rh1/config/cxx_have_true_false.m4.gcc43 2006-06-24 16:42:44.000000000 -0400 +++ lam-7.1.4-rh1/config/cxx_have_true_false.m4 2008-06-24 20:16:47.000000000 -0400 @@ -41,7 +41,7 @@ cat > conftest.cc < #include -int main(int argc, char* argv[]) { +int main(int argc, char** argv) { int foo; foo = (int) true; foo = (int) false;