From: Paul Eggert Date: Thu, 31 May 2012 05:08:37 +0000 (-0700) Subject: Remove obsolete '#define static' cruft. X-Git-Tag: emacs-24.2.90~471^2~6^2~42 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ba93a18774352c97d6dd73c73141cbff6305581b;p=emacs.git Remove obsolete '#define static' cruft. * etc/PROBLEMS: Remove obsolete '#define static' cruft. * lwlib/xlwmenu.c [emacs]: Include "bitmaps/gray.xbm". (gray_bitmap_width, gray_bitmap_height, gray_bitmap_bits) [!emacs]: Remove; all uses replaced with definiens. * src/s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef. This #undef was "temporary" in 2000; it is no longer needed now that '#define static' has gone away. * src/xfns.c, src/xterm.h (gray_bitmap_width, gray_bitmap_height) (gray_bitmap_bits): Remove; no longer needed. All uses replaced with definiens. * src/xterm.c: Include "bitmaps/gray.xbm". --- diff --git a/etc/ChangeLog b/etc/ChangeLog index ffd9f7d31f6..167910f782f 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2012-05-31 Paul Eggert + + * PROBLEMS: Remove obsolete '#define static' cruft. + 2012-05-07 Glenn Morris * forms/forms-d2.el, forms/forms-pass.el: Move here from ../lisp. diff --git a/etc/PROBLEMS b/etc/PROBLEMS index cc591d6e1fe..6d5ee0498c7 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -2778,19 +2778,11 @@ build Emacs in a directory on a local disk. *** The dumped Emacs crashes when run, trying to write pure data. -Two causes have been seen for such problems. - -1) On a system where getpagesize is not a system call, it is defined +On a system where getpagesize is not a system call, it is defined as a macro. If the definition (in both unex*.c and malloc.c) is wrong, it can cause problems like this. You might be able to find the correct value in the man page for a.out (5). -2) Some systems allocate variables declared static among the -initialized variables. Emacs makes all initialized variables in most -of its files pure after dumping, but the variables declared static and -not initialized are not supposed to be pure. On these systems you -may need to add "#define static" to config.h. - * Runtime problems on legacy systems This section covers bugs reported on very old hardware or software. diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 5451fa38001..558b9960213 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,10 @@ +2012-05-31 Paul Eggert + + Remove obsolete '#define static' cruft. + * xlwmenu.c [emacs]: Include "bitmaps/gray.xbm". + (gray_bitmap_width, gray_bitmap_height, gray_bitmap_bits) [!emacs]: + Remove; all uses replaced with definiens. + 2012-04-18 Paul Eggert configure: new option --enable-gcc-warnings (Bug#11207) diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 0a328f09f1e..4406c505392 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -49,22 +49,12 @@ Boston, MA 02110-1301, USA. */ #ifdef emacs -/* Defined in xfns.c. When config.h defines `static' as empty, we get - redefinition errors when gray_bitmap is included more than once, so - we're referring to the one include in xfns.c here. */ - -extern int gray_bitmap_width; -extern int gray_bitmap_height; -extern char *gray_bitmap_bits; - #include +#include "bitmaps/gray.xbm" #else /* not emacs */ #include -#define gray_bitmap_width gray_width -#define gray_bitmap_height gray_height -#define gray_bitmap_bits gray_bits #endif /* not emacs */ @@ -1918,8 +1908,8 @@ XlwMenuInitialize (Widget request, Widget w, ArgList args, Cardinal *num_args) mw->menu.cursor = mw->menu.cursor_shape; mw->menu.gray_pixmap - = XCreatePixmapFromBitmapData (display, window, gray_bitmap_bits, - gray_bitmap_width, gray_bitmap_height, + = XCreatePixmapFromBitmapData (display, window, gray_bits, + gray_width, gray_height, (unsigned long)1, (unsigned long)0, 1); #ifdef HAVE_XFT diff --git a/src/ChangeLog b/src/ChangeLog index 767dfa47036..32bd9e2d18c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2012-05-31 Paul Eggert + + Remove obsolete '#define static' cruft. + * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef. + This #undef was "temporary" in 2000; it is no longer needed + now that '#define static' has gone away. + * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height) + (gray_bitmap_bits): Remove; no longer needed. + All uses replaced with definiens. + * xterm.c: Include "bitmaps/gray.xbm". + 2012-05-30 Paul Eggert Clean up __executable_start, monstartup when --enable-profiling. diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h index 3e25b1bd0d9..f1ae50c533a 100644 --- a/src/s/hpux10-20.h +++ b/src/s/hpux10-20.h @@ -95,12 +95,6 @@ along with GNU Emacs. If not, see . */ #define HAVE_XRMSETDATABASE #endif -/* 2000-11-21: Temporarily disable Unix 98 large file support found by - configure. It fails on HPUX 11, at least, because it enables - header sections which lose when `static' is defined away, as it is - on HP-UX. (You get duplicate symbol errors on linking). */ -#undef _FILE_OFFSET_BITS - /* Conservative garbage collection has not been tested, so for now play it safe and stick with the old-fashioned way of marking. */ #define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE diff --git a/src/xfns.c b/src/xfns.c index 767507805fb..1f1d3d3ef0c 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -126,14 +126,6 @@ extern LWLIB_ID widget_id_tick; #define MAXREQUEST(dpy) (XMaxRequestSize (dpy)) -/* The gray bitmap `bitmaps/gray'. This is done because xterm.c uses - it, and including `bitmaps/gray' more than once is a problem when - config.h defines `static' as an empty replacement string. */ - -int gray_bitmap_width = gray_width; -int gray_bitmap_height = gray_height; -char *gray_bitmap_bits = gray_bits; - /* Nonzero if using X. */ int x_in_use; diff --git a/src/xterm.c b/src/xterm.c index 0ebaf87c252..81726917efa 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -139,6 +139,8 @@ extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *); #endif #endif +#include "bitmaps/gray.xbm" + /* Default to using XIM if available. */ #ifdef USE_XIM int use_xim = 1; @@ -10383,8 +10385,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) { dpyinfo->gray = XCreatePixmapFromBitmapData (dpyinfo->display, dpyinfo->root_window, - gray_bitmap_bits, - gray_bitmap_width, gray_bitmap_height, + gray_bits, gray_width, gray_height, 1, 0, 1); } diff --git a/src/xterm.h b/src/xterm.h index 8919b648371..68e0372b05a 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -939,8 +939,6 @@ void x_handle_property_notify (XPropertyEvent *); struct frame *check_x_frame (Lisp_Object); EXFUN (Fx_display_grayscale_p, 1); extern void x_free_gcs (struct frame *); -extern int gray_bitmap_width, gray_bitmap_height; -extern char *gray_bitmap_bits; /* From xrdb.c. */