mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-11 13:10:07 +00:00
acconfig.h removed IPC_RMID_DEFERRED_RELEASE check
* acconfig.h * configure.in: removed IPC_RMID_DEFERRED_RELEASE check * gdk/gdk.c: remove signal handlers, since we do an IPC_RMID after XShmAttach, and nobody complained -Yosh
This commit is contained in:
parent
30b9a28779
commit
58475f05a5
@ -1,3 +1,11 @@
|
||||
Mon Dec 14 23:05:20 PST 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* acconfig.h
|
||||
* configure.in: removed IPC_RMID_DEFERRED_RELEASE check
|
||||
|
||||
* gdk/gdk.c: remove signal handlers, since we do an IPC_RMID
|
||||
after XShmAttach, and nobody complained
|
||||
|
||||
Tue Dec 15 02:27:42 MET 1998 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* po/de.po: Replaced the crappy german po-file with a valid one.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Mon Dec 14 23:05:20 PST 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* acconfig.h
|
||||
* configure.in: removed IPC_RMID_DEFERRED_RELEASE check
|
||||
|
||||
* gdk/gdk.c: remove signal handlers, since we do an IPC_RMID
|
||||
after XShmAttach, and nobody complained
|
||||
|
||||
Tue Dec 15 02:27:42 MET 1998 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* po/de.po: Replaced the crappy german po-file with a valid one.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Mon Dec 14 23:05:20 PST 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* acconfig.h
|
||||
* configure.in: removed IPC_RMID_DEFERRED_RELEASE check
|
||||
|
||||
* gdk/gdk.c: remove signal handlers, since we do an IPC_RMID
|
||||
after XShmAttach, and nobody complained
|
||||
|
||||
Tue Dec 15 02:27:42 MET 1998 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* po/de.po: Replaced the crappy german po-file with a valid one.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Mon Dec 14 23:05:20 PST 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* acconfig.h
|
||||
* configure.in: removed IPC_RMID_DEFERRED_RELEASE check
|
||||
|
||||
* gdk/gdk.c: remove signal handlers, since we do an IPC_RMID
|
||||
after XShmAttach, and nobody complained
|
||||
|
||||
Tue Dec 15 02:27:42 MET 1998 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* po/de.po: Replaced the crappy german po-file with a valid one.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Mon Dec 14 23:05:20 PST 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* acconfig.h
|
||||
* configure.in: removed IPC_RMID_DEFERRED_RELEASE check
|
||||
|
||||
* gdk/gdk.c: remove signal handlers, since we do an IPC_RMID
|
||||
after XShmAttach, and nobody complained
|
||||
|
||||
Tue Dec 15 02:27:42 MET 1998 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* po/de.po: Replaced the crappy german po-file with a valid one.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Mon Dec 14 23:05:20 PST 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* acconfig.h
|
||||
* configure.in: removed IPC_RMID_DEFERRED_RELEASE check
|
||||
|
||||
* gdk/gdk.c: remove signal handlers, since we do an IPC_RMID
|
||||
after XShmAttach, and nobody complained
|
||||
|
||||
Tue Dec 15 02:27:42 MET 1998 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* po/de.po: Replaced the crappy german po-file with a valid one.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Mon Dec 14 23:05:20 PST 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* acconfig.h
|
||||
* configure.in: removed IPC_RMID_DEFERRED_RELEASE check
|
||||
|
||||
* gdk/gdk.c: remove signal handlers, since we do an IPC_RMID
|
||||
after XShmAttach, and nobody complained
|
||||
|
||||
Tue Dec 15 02:27:42 MET 1998 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* po/de.po: Replaced the crappy german po-file with a valid one.
|
||||
|
@ -29,12 +29,6 @@
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
#undef HAVE_XCONVERTCASE
|
||||
|
||||
/* some systems do not allow to ipcrm pages prior to
|
||||
* actual usage, namely: OSF1 V3.2, SunOS 4.1.1, 5.5, 5.5.1, 5.6,
|
||||
* IRIX 5.2 and 6.2.
|
||||
*/
|
||||
#undef IPC_RMID_DEFERRED_RELEASE
|
||||
|
||||
#undef NO_FD_SET
|
||||
|
||||
#undef RESOURCE_BASE
|
||||
|
@ -64,12 +64,6 @@
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
#undef HAVE_XCONVERTCASE
|
||||
|
||||
/* some systems do not allow to ipcrm pages prior to
|
||||
* actual usage, namely: OSF1 V3.2, SunOS 4.1.1, 5.5, 5.5.1, 5.6,
|
||||
* IRIX 5.2 and 6.2.
|
||||
*/
|
||||
#undef IPC_RMID_DEFERRED_RELEASE
|
||||
|
||||
#undef NO_FD_SET
|
||||
|
||||
#undef RESOURCE_BASE
|
||||
|
32
configure.in
32
configure.in
@ -333,38 +333,6 @@ if test "x$enable_shm" = "xyes"; then
|
||||
AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
|
||||
AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm=yes)
|
||||
|
||||
# Check whether shmctl IPC_RMID allowes subsequent attaches
|
||||
if test "$ac_cv_header_sys_shm_h" = "yes"; then
|
||||
AC_MSG_CHECKING(whether shmctl IPC_RMID allowes subsequent attaches)
|
||||
AC_TRY_RUN([
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
int main()
|
||||
{
|
||||
int id;
|
||||
char *shmaddr;
|
||||
id = shmget (IPC_PRIVATE, 4, IPC_CREAT | 0777);
|
||||
if (id == -1)
|
||||
exit (2);
|
||||
shmaddr = shmat (id, 0, 0);
|
||||
shmctl (id, IPC_RMID, 0);
|
||||
if ((char*) shmat (id, 0, 0) == (char*) -1)
|
||||
{
|
||||
shmdt (shmaddr);
|
||||
exit (1);
|
||||
}
|
||||
shmdt (shmaddr);
|
||||
shmdt (shmaddr);
|
||||
exit (0);
|
||||
}
|
||||
],
|
||||
AC_DEFINE(IPC_RMID_DEFERRED_RELEASE)
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no),
|
||||
AC_MSG_RESULT(assuming no))
|
||||
fi
|
||||
|
||||
# Check for the X shared memory extension header file
|
||||
AC_MSG_CHECKING(X11/extensions/XShm.h)
|
||||
if test "x$no_xext_lib" = "xyes"; then
|
||||
|
82
gdk/gdk.c
82
gdk/gdk.c
@ -18,12 +18,8 @@
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
/* If you don't want to use gdk's signal handlers define this */
|
||||
/* #define I_NEED_TO_ACTUALLY_DEBUG_MY_PROGRAMS 1 */
|
||||
|
||||
#include <X11/Xlocale.h>
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -131,7 +127,6 @@ static void gdk_exit_func (void);
|
||||
static int gdk_x_error (Display *display,
|
||||
XErrorEvent *error);
|
||||
static int gdk_x_io_error (Display *display);
|
||||
static RETSIGTYPE gdk_signal (int signum);
|
||||
|
||||
GdkFilterReturn gdk_wm_protocols_filter (GdkXEvent *xev,
|
||||
GdkEvent *event,
|
||||
@ -256,16 +251,6 @@ gdk_init (int *argc,
|
||||
|
||||
X_GETTIMEOFDAY (&start);
|
||||
|
||||
#ifndef I_NEED_TO_ACTUALLY_DEBUG_MY_PROGRAMS
|
||||
signal (SIGHUP, gdk_signal);
|
||||
signal (SIGINT, gdk_signal);
|
||||
signal (SIGQUIT, gdk_signal);
|
||||
signal (SIGBUS, gdk_signal);
|
||||
signal (SIGSEGV, gdk_signal);
|
||||
signal (SIGPIPE, gdk_signal);
|
||||
signal (SIGTERM, gdk_signal);
|
||||
#endif
|
||||
|
||||
gdk_display_name = NULL;
|
||||
|
||||
XSetErrorHandler (gdk_x_error);
|
||||
@ -3111,73 +3096,6 @@ gdk_x_io_error (Display *display)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
*--------------------------------------------------------------
|
||||
* gdk_signal
|
||||
*
|
||||
* The signal handler.
|
||||
*
|
||||
* Arguments:
|
||||
* "sig_num" is the number of the signal we received.
|
||||
*
|
||||
* Results:
|
||||
* The signals we catch are all fatal. So we simply build
|
||||
* up a nice little error message and print it and exit.
|
||||
* If in the process of doing so another signal is received
|
||||
* we notice that we are already exiting and simply kill
|
||||
* our process.
|
||||
*
|
||||
* Side effects:
|
||||
*
|
||||
*--------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static RETSIGTYPE
|
||||
gdk_signal (int sig_num)
|
||||
{
|
||||
static int caught_fatal_sig = 0;
|
||||
char *sig;
|
||||
|
||||
if (caught_fatal_sig)
|
||||
kill (getpid (), sig_num);
|
||||
caught_fatal_sig = 1;
|
||||
|
||||
switch (sig_num)
|
||||
{
|
||||
case SIGHUP:
|
||||
sig = "sighup";
|
||||
break;
|
||||
case SIGINT:
|
||||
sig = "sigint";
|
||||
break;
|
||||
case SIGQUIT:
|
||||
sig = "sigquit";
|
||||
break;
|
||||
case SIGBUS:
|
||||
sig = "sigbus";
|
||||
break;
|
||||
case SIGSEGV:
|
||||
sig = "sigsegv";
|
||||
break;
|
||||
case SIGPIPE:
|
||||
sig = "sigpipe";
|
||||
break;
|
||||
case SIGTERM:
|
||||
sig = "sigterm";
|
||||
break;
|
||||
default:
|
||||
sig = "unknown signal";
|
||||
break;
|
||||
}
|
||||
|
||||
g_message ("\n** ERROR **: %s caught", sig);
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
abort ();
|
||||
#else /* !G_ENABLE_DEBUG */
|
||||
gdk_exit (1);
|
||||
#endif /* !G_ENABLE_DEBUG */
|
||||
}
|
||||
|
||||
/* Sends a ClientMessage to all toplevel client windows */
|
||||
gboolean
|
||||
gdk_event_send_client_message (GdkEvent *event, guint32 xid)
|
||||
|
@ -18,12 +18,8 @@
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
/* If you don't want to use gdk's signal handlers define this */
|
||||
/* #define I_NEED_TO_ACTUALLY_DEBUG_MY_PROGRAMS 1 */
|
||||
|
||||
#include <X11/Xlocale.h>
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -131,7 +127,6 @@ static void gdk_exit_func (void);
|
||||
static int gdk_x_error (Display *display,
|
||||
XErrorEvent *error);
|
||||
static int gdk_x_io_error (Display *display);
|
||||
static RETSIGTYPE gdk_signal (int signum);
|
||||
|
||||
GdkFilterReturn gdk_wm_protocols_filter (GdkXEvent *xev,
|
||||
GdkEvent *event,
|
||||
@ -256,16 +251,6 @@ gdk_init (int *argc,
|
||||
|
||||
X_GETTIMEOFDAY (&start);
|
||||
|
||||
#ifndef I_NEED_TO_ACTUALLY_DEBUG_MY_PROGRAMS
|
||||
signal (SIGHUP, gdk_signal);
|
||||
signal (SIGINT, gdk_signal);
|
||||
signal (SIGQUIT, gdk_signal);
|
||||
signal (SIGBUS, gdk_signal);
|
||||
signal (SIGSEGV, gdk_signal);
|
||||
signal (SIGPIPE, gdk_signal);
|
||||
signal (SIGTERM, gdk_signal);
|
||||
#endif
|
||||
|
||||
gdk_display_name = NULL;
|
||||
|
||||
XSetErrorHandler (gdk_x_error);
|
||||
@ -3111,73 +3096,6 @@ gdk_x_io_error (Display *display)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
*--------------------------------------------------------------
|
||||
* gdk_signal
|
||||
*
|
||||
* The signal handler.
|
||||
*
|
||||
* Arguments:
|
||||
* "sig_num" is the number of the signal we received.
|
||||
*
|
||||
* Results:
|
||||
* The signals we catch are all fatal. So we simply build
|
||||
* up a nice little error message and print it and exit.
|
||||
* If in the process of doing so another signal is received
|
||||
* we notice that we are already exiting and simply kill
|
||||
* our process.
|
||||
*
|
||||
* Side effects:
|
||||
*
|
||||
*--------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static RETSIGTYPE
|
||||
gdk_signal (int sig_num)
|
||||
{
|
||||
static int caught_fatal_sig = 0;
|
||||
char *sig;
|
||||
|
||||
if (caught_fatal_sig)
|
||||
kill (getpid (), sig_num);
|
||||
caught_fatal_sig = 1;
|
||||
|
||||
switch (sig_num)
|
||||
{
|
||||
case SIGHUP:
|
||||
sig = "sighup";
|
||||
break;
|
||||
case SIGINT:
|
||||
sig = "sigint";
|
||||
break;
|
||||
case SIGQUIT:
|
||||
sig = "sigquit";
|
||||
break;
|
||||
case SIGBUS:
|
||||
sig = "sigbus";
|
||||
break;
|
||||
case SIGSEGV:
|
||||
sig = "sigsegv";
|
||||
break;
|
||||
case SIGPIPE:
|
||||
sig = "sigpipe";
|
||||
break;
|
||||
case SIGTERM:
|
||||
sig = "sigterm";
|
||||
break;
|
||||
default:
|
||||
sig = "unknown signal";
|
||||
break;
|
||||
}
|
||||
|
||||
g_message ("\n** ERROR **: %s caught", sig);
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
abort ();
|
||||
#else /* !G_ENABLE_DEBUG */
|
||||
gdk_exit (1);
|
||||
#endif /* !G_ENABLE_DEBUG */
|
||||
}
|
||||
|
||||
/* Sends a ClientMessage to all toplevel client windows */
|
||||
gboolean
|
||||
gdk_event_send_client_message (GdkEvent *event, guint32 xid)
|
||||
|
Loading…
Reference in New Issue
Block a user