From: Paul Eggert Date: Mon, 14 Jul 2003 05:37:52 +0000 (+0000) Subject: (pure, staticvec): Initialize these arrays to nonzero, so that they're X-Git-Tag: ttn-vms-21-2-B4~9351 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=379b98b161ca1a4ff9a6b392aa5367308885a18d;p=emacs.git (pure, staticvec): Initialize these arrays to nonzero, so that they're not put into BSS by that optimization. --- diff --git a/src/alloc.c b/src/alloc.c index cffd0408e24..18770929532 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -185,9 +185,10 @@ Lisp_Object Vmemory_full; #ifndef HAVE_SHM -/* Force it into data space! */ +/* Force it into data space! Initialize it to a nonzero value; + otherwise some compilers put it into BSS. */ -EMACS_INT pure[PURESIZE / sizeof (EMACS_INT)] = {0,}; +EMACS_INT pure[PURESIZE / sizeof (EMACS_INT)] = {1,}; #define PUREBEG (char *) pure #else /* HAVE_SHM */ @@ -404,10 +405,11 @@ static void check_gcpros P_ ((void)); struct gcpro *gcprolist; -/* Addresses of staticpro'd variables. */ +/* Addresses of staticpro'd variables. Initialize it to a nonzero + value; otherwise some compilers put it into BSS. */ #define NSTATICS 1280 -Lisp_Object *staticvec[NSTATICS] = {0}; +Lisp_Object *staticvec[NSTATICS] = {&Vpurify_flag}; /* Index of next unused slot in staticvec. */