unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
       [not found]   ` <b8ejhdlvgn.fsf@fencepost.gnu.org>
@ 2007-09-05 20:01     ` Richard Stallman
  2007-09-06  7:04       ` Glenn Morris
  0 siblings, 1 reply; 15+ messages in thread
From: Richard Stallman @ 2007-09-05 20:01 UTC (permalink / raw)
  To: Glenn Morris; +Cc: philippe.waroquiers, emacs-devel

    According to the internet, it was released in 2000 and is 3 or 4
    versions old.

That's good.  I think it is ok to desupport versions older than that.

So what about USG systems.  There is no problem with USG 5.4.
Are the USG 5.3 derivatives totally gone now?

However, given this information

    I looked for non-file scope statics in src/*.c. I think there are only
    a handful that aren't definitely in Windows, Mac, or VMS specific code:

    alloca.c      find_stack_direction
    fringe.c      init_fringe_bitmap
    gtkutil.c     menu_grab_callback, xg_separator_p
    image.c       our_memory_fill_input_buffer, gif_load
    xselect.c     x_reply_selection_request

I think we may as well fix the last four, unless that is hard.  Can
you fix them?

alloca.c is not an issue.  It checks for #define static and gives an
error.  It is also surely obsolete since 15 years ago; let's delete it
and its whole support mechanism in Emacs 23.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-05 20:01     ` emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set Richard Stallman
@ 2007-09-06  7:04       ` Glenn Morris
  2007-09-07  6:32         ` Richard Stallman
  2007-09-07  6:32         ` Richard Stallman
  0 siblings, 2 replies; 15+ messages in thread
From: Glenn Morris @ 2007-09-06  7:04 UTC (permalink / raw)
  To: rms; +Cc: philippe.waroquiers, emacs-devel

Richard Stallman wrote:

> So what about USG systems.  There is no problem with USG 5.4.
> Are the USG 5.3 derivatives totally gone now?

No idea, sorry.

>     fringe.c      init_fringe_bitmap
>     gtkutil.c     menu_grab_callback, xg_separator_p
>     image.c       our_memory_fill_input_buffer, gif_load
>     xselect.c     x_reply_selection_request
>
> I think we may as well fix the last four, unless that is hard.  Can
> you fix them?

I guess so. Do I just move all static variables to file scope,
irrespective of type? Does it matter whether they are explicitly
initialized, or if the values never change?

> alloca.c is not an issue.  It checks for #define static and gives an
> error.  It is also surely obsolete since 15 years ago; let's delete it
> and its whole support mechanism in Emacs 23.

Remove src/alloca.c from the trunk, you mean?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-06  7:04       ` Glenn Morris
@ 2007-09-07  6:32         ` Richard Stallman
  2007-09-07  7:05           ` Glenn Morris
  2007-09-14  3:00           ` Glenn Morris
  2007-09-07  6:32         ` Richard Stallman
  1 sibling, 2 replies; 15+ messages in thread
From: Richard Stallman @ 2007-09-07  6:32 UTC (permalink / raw)
  To: Glenn Morris; +Cc: philippe.waroquiers, emacs-devel

    I guess so. Do I just move all static variables to file scope,
    irrespective of type? Does it matter whether they are explicitly
    initialized, or if the values never change?

If the values never change, it is ok to have an initializer.
Variables with initializer may be put in pure space when Emacs is
dumped.

If the value can change, there must be no initializer.  So initialize
the variable in init_FILENAME or some such function that is called at
a suitable time.

It is a good idea to rename the variable
to a name that relates to the function that uses it.
Don't keep a short name like `cnt'.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-06  7:04       ` Glenn Morris
  2007-09-07  6:32         ` Richard Stallman
@ 2007-09-07  6:32         ` Richard Stallman
  2007-09-12  7:31           ` Glenn Morris
  1 sibling, 1 reply; 15+ messages in thread
From: Richard Stallman @ 2007-09-07  6:32 UTC (permalink / raw)
  To: Glenn Morris; +Cc: philippe.waroquiers, emacs-devel

    > alloca.c is not an issue.  It checks for #define static and gives an
    > error.  It is also surely obsolete since 15 years ago; let's delete it
    > and its whole support mechanism in Emacs 23.

    Remove src/alloca.c from the trunk, you mean?

Delete that file, and everything in Makefile.in and configure and m/
and s/ files that supports using it.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-07  6:32         ` Richard Stallman
@ 2007-09-07  7:05           ` Glenn Morris
  2007-09-08  7:01             ` Richard Stallman
  2007-09-14  3:00           ` Glenn Morris
  1 sibling, 1 reply; 15+ messages in thread
From: Glenn Morris @ 2007-09-07  7:05 UTC (permalink / raw)
  To: rms; +Cc: philippe.waroquiers, emacs-devel

Richard Stallman wrote:

> If the values never change, it is ok to have an initializer.
> Variables with initializer may be put in pure space when Emacs is
> dumped.

I really meant: if they are explicitly initialized and never change,
is there any need to move them to file scope? In that case, they don't
actually have to _be_ static, AFAICS, so it's no problem if the HPUX
stuff defines "static" as a no-op.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-07  7:05           ` Glenn Morris
@ 2007-09-08  7:01             ` Richard Stallman
  2007-09-12  1:32               ` Glenn Morris
  0 siblings, 1 reply; 15+ messages in thread
From: Richard Stallman @ 2007-09-08  7:01 UTC (permalink / raw)
  To: Glenn Morris; +Cc: philippe.waroquiers, emacs-devel

    I really meant: if they are explicitly initialized and never change,
    is there any need to move them to file scope? In that case, they don't
    actually have to _be_ static, AFAICS, so it's no problem if the HPUX
    stuff defines "static" as a no-op.

If they don't need to be static, it is ok to delete `static'.
But please don't leave them file-scope static.
That is asking for confusion.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-08  7:01             ` Richard Stallman
@ 2007-09-12  1:32               ` Glenn Morris
  2007-09-13 16:30                 ` Richard Stallman
  0 siblings, 1 reply; 15+ messages in thread
From: Glenn Morris @ 2007-09-12  1:32 UTC (permalink / raw)
  To: rms; +Cc: philippe.waroquiers, emacs-devel

Richard Stallman wrote:

>     I really meant: if they are explicitly initialized and never change,
>     is there any need to move them to file scope? In that case, they don't
>     actually have to _be_ static, AFAICS, so it's no problem if the HPUX
>     stuff defines "static" as a no-op.
>
> If they don't need to be static, it is ok to delete `static'.
> But please don't leave them file-scope static.

I'm confused. Did you mean to say "function-scope" there?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-07  6:32         ` Richard Stallman
@ 2007-09-12  7:31           ` Glenn Morris
  0 siblings, 0 replies; 15+ messages in thread
From: Glenn Morris @ 2007-09-12  7:31 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

Richard Stallman wrote:

>     Remove src/alloca.c from the trunk, you mean?
>
> Delete that file, and everything in Makefile.in and configure and m/
> and s/ files that supports using it.

Done.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-12  1:32               ` Glenn Morris
@ 2007-09-13 16:30                 ` Richard Stallman
  0 siblings, 0 replies; 15+ messages in thread
From: Richard Stallman @ 2007-09-13 16:30 UTC (permalink / raw)
  To: Glenn Morris; +Cc: philippe.waroquiers, emacs-devel

    > If they don't need to be static, it is ok to delete `static'.
    > But please don't leave them file-scope static.

    I'm confused. Did you mean to say "function-scope" there?

Yes, I did.  Sorry.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-07  6:32         ` Richard Stallman
  2007-09-07  7:05           ` Glenn Morris
@ 2007-09-14  3:00           ` Glenn Morris
  2007-09-14  6:28             ` Jan Djärv
  2007-09-15  8:04             ` Richard Stallman
  1 sibling, 2 replies; 15+ messages in thread
From: Glenn Morris @ 2007-09-14  3:00 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel


Of the static uses I identified, five remain. I don't understand why
any of them need to be static, and I'm reluctant to change things I
don't understand. Which is better: leave them in function scope and
delete the `static', or move them to file scope?


fringe.c (init_fringe_bitmap) <swap_nibble>
gtkutil.c (xg_separator_p) <separator_names>
image.c  (our_memory_fill_input_buffer) <buffer>
         (gif_load) <interlace_start, interlace_increment>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-14  3:00           ` Glenn Morris
@ 2007-09-14  6:28             ` Jan Djärv
  2007-09-14  7:25               ` Glenn Morris
  2007-09-15  8:04             ` Richard Stallman
  1 sibling, 1 reply; 15+ messages in thread
From: Jan Djärv @ 2007-09-14  6:28 UTC (permalink / raw)
  To: Glenn Morris; +Cc: rms, emacs-devel



Glenn Morris skrev:
> Of the static uses I identified, five remain. I don't understand why
> any of them need to be static, and I'm reluctant to change things I
> don't understand. Which is better: leave them in function scope and
> delete the `static', or move them to file scope?
> 

Move them to file scope.

On bug-gnu-emacs it was suggested in "emacs-22.1 with GTK problems (with 
patches)" that this in s/hpux.h:

/* USG systems tend to put everything declared static
    into the initialized data area, which becomes pure after dumping Emacs.
    Foil this.  Emacs carefully avoids static vars inside functions.  */

#define static

be removed, as it seems to interfere with threading.  How does that relate to 
the work you are doing?

	Jan D.

> 
> fringe.c (init_fringe_bitmap) <swap_nibble>
> gtkutil.c (xg_separator_p) <separator_names>
> image.c  (our_memory_fill_input_buffer) <buffer>
>          (gif_load) <interlace_start, interlace_increment>
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-14  6:28             ` Jan Djärv
@ 2007-09-14  7:25               ` Glenn Morris
  2007-09-15  2:09                 ` Richard Stallman
  0 siblings, 1 reply; 15+ messages in thread
From: Glenn Morris @ 2007-09-14  7:25 UTC (permalink / raw)
  To: Jan Djärv; +Cc: rms, emacs-devel

Jan Djärv wrote:

> Move them to file scope.

Will do, thanks.

> On bug-gnu-emacs it was suggested in "emacs-22.1 with GTK problems (with 
> patches)" that this in s/hpux.h:
[...]
> #define static
>
> be removed, as it seems to interfere with threading.

I already removed this in the trunk, as this thread seems to show it
is not needed in recent versions of hpux.h. I left it alone in the
release branch, but if it is actively causing problems, it should
probably be removed there too.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-14  7:25               ` Glenn Morris
@ 2007-09-15  2:09                 ` Richard Stallman
  2007-09-15 19:50                   ` Glenn Morris
  0 siblings, 1 reply; 15+ messages in thread
From: Richard Stallman @ 2007-09-15  2:09 UTC (permalink / raw)
  To: Glenn Morris; +Cc: jan.h.d, emacs-devel

    I already removed this in the trunk, as this thread seems to show it
    is not needed in recent versions of hpux.h. I left it alone in the
    release branch, but if it is actively causing problems, it should
    probably be removed there too.

Please do remove that #define from hpux.h in Emacs 22.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-14  3:00           ` Glenn Morris
  2007-09-14  6:28             ` Jan Djärv
@ 2007-09-15  8:04             ` Richard Stallman
  1 sibling, 0 replies; 15+ messages in thread
From: Richard Stallman @ 2007-09-15  8:04 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

    fringe.c (init_fringe_bitmap) <swap_nibble>

That should be file-scope.

    image.c  (our_memory_fill_input_buffer) <buffer>

That should be file-scope.

	     (gif_load) <interlace_start, interlace_increment>

They should be file-scope.

I did not check the gtk file.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set
  2007-09-15  2:09                 ` Richard Stallman
@ 2007-09-15 19:50                   ` Glenn Morris
  0 siblings, 0 replies; 15+ messages in thread
From: Glenn Morris @ 2007-09-15 19:50 UTC (permalink / raw)
  To: rms; +Cc: jan.h.d, emacs-devel

Richard Stallman wrote:

> Please do remove that #define from hpux.h in Emacs 22.

Done. I believe this issue is now dealt with.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-09-15 19:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1B2B2EF98D55CB41BD16F13B18B9B0080303EEB4@FFBRUE001.cfmu.corp.eurocontrol.int>
     [not found] ` <E1IShLe-0002kt-UF@fencepost.gnu.org>
     [not found]   ` <b8ejhdlvgn.fsf@fencepost.gnu.org>
2007-09-05 20:01     ` emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set Richard Stallman
2007-09-06  7:04       ` Glenn Morris
2007-09-07  6:32         ` Richard Stallman
2007-09-07  7:05           ` Glenn Morris
2007-09-08  7:01             ` Richard Stallman
2007-09-12  1:32               ` Glenn Morris
2007-09-13 16:30                 ` Richard Stallman
2007-09-14  3:00           ` Glenn Morris
2007-09-14  6:28             ` Jan Djärv
2007-09-14  7:25               ` Glenn Morris
2007-09-15  2:09                 ` Richard Stallman
2007-09-15 19:50                   ` Glenn Morris
2007-09-15  8:04             ` Richard Stallman
2007-09-07  6:32         ` Richard Stallman
2007-09-12  7:31           ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).