projects
/
platform
/
upstream
/
dbus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e183399
)
Make more signal and locale interface use conditional.
author
Marcus Brinkmann
<marcus.brinkmann@ruhr-uni-bochum.de>
Tue, 16 Mar 2010 02:33:04 +0000
(
03:33
+0100)
committer
Ralf Habacker
<ralf.habacker@freenet.de>
Mon, 22 Mar 2010 16:28:55 +0000
(17:28 +0100)
bus/main.c
patch
|
blob
|
history
configure.in
patch
|
blob
|
history
dbus/dbus-sysdeps.c
patch
|
blob
|
history
dbus/dbus-test-main.c
patch
|
blob
|
history
test/test-segfault.c
patch
|
blob
|
history
diff --git
a/bus/main.c
b/bus/main.c
index
7150ce1
..
24bc905
100644
(file)
--- a/
bus/main.c
+++ b/
bus/main.c
@@
-29,7
+29,9
@@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_SIGNAL_H
#include <signal.h>
#include <signal.h>
+#endif
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
@@
-67,9
+69,11
@@
signal_handler (int sig)
}
break;
#endif
}
break;
#endif
+#ifdef SIGTERM
case SIGTERM:
_dbus_loop_quit (bus_context_get_loop (context));
break;
case SIGTERM:
_dbus_loop_quit (bus_context_get_loop (context));
break;
+#endif
}
}
}
}
@@
-474,7
+478,9
@@
main (int argc, char **argv)
#ifdef SIGHUP
_dbus_set_signal_handler (SIGHUP, signal_handler);
#endif
#ifdef SIGHUP
_dbus_set_signal_handler (SIGHUP, signal_handler);
#endif
+#ifdef SIGTERM
_dbus_set_signal_handler (SIGTERM, signal_handler);
_dbus_set_signal_handler (SIGTERM, signal_handler);
+#endif
#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
_dbus_set_signal_handler (SIGIO, signal_handler);
#endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX */
#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
_dbus_set_signal_handler (SIGIO, signal_handler);
#endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX */
diff --git
a/configure.in
b/configure.in
index
d856cf9
..
a0c0fd0
100644
(file)
--- a/
configure.in
+++ b/
configure.in
@@
-477,6
+477,10
@@
AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
AC_CHECK_HEADERS(errno.h)
AC_CHECK_HEADERS(errno.h)
+AC_CHECK_HEADERS(signal.h)
+
+AC_CHECK_HEADERS(locale.h)
+
AC_CHECK_HEADERS(byteswap.h)
AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(byteswap.h)
AC_CHECK_HEADERS(unistd.h)
diff --git
a/dbus/dbus-sysdeps.c
b/dbus/dbus-sysdeps.c
index
f9c6fc5
..
de9f904
100644
(file)
--- a/
dbus/dbus-sysdeps.c
+++ b/
dbus/dbus-sysdeps.c
@@
-35,7
+35,9
@@
*
* These are the standard ANSI C headers...
*/
*
* These are the standard ANSI C headers...
*/
+#if HAVE_LOCALE_H
#include <locale.h>
#include <locale.h>
+#endif
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@@
-623,10
+625,14
@@
ascii_strtod (const char *nptr,
fail_pos = NULL;
fail_pos = NULL;
+#if HAVE_LOCALE_H
locale_data = localeconv ();
decimal_point = locale_data->decimal_point;
locale_data = localeconv ();
decimal_point = locale_data->decimal_point;
- decimal_point_len = strlen (decimal_point);
+#else
+ decimal_point = ".";
+#endif
+ decimal_point_len = strlen (decimal_point);
_dbus_assert (decimal_point_len != 0);
decimal_point_pos = NULL;
_dbus_assert (decimal_point_len != 0);
decimal_point_pos = NULL;
diff --git
a/dbus/dbus-test-main.c
b/dbus/dbus-test-main.c
index
a8a30f3
..
b04bebc
100644
(file)
--- a/
dbus/dbus-test-main.c
+++ b/
dbus/dbus-test-main.c
@@
-27,7
+27,9
@@
#include "dbus-test.h"
#include <stdio.h>
#include <stdlib.h>
#include "dbus-test.h"
#include <stdio.h>
#include <stdlib.h>
+#if HAVE_LOCALE_H
#include <locale.h>
#include <locale.h>
+#endif
int
main (int argc,
int
main (int argc,
@@
-36,8
+38,9
@@
main (int argc,
const char *test_data_dir;
const char *specific_test;
const char *test_data_dir;
const char *specific_test;
+#if HAVE_LOCALE_H
setlocale(LC_ALL, "");
setlocale(LC_ALL, "");
-
+#endif
if (argc > 1)
test_data_dir = argv[1];
if (argc > 1)
test_data_dir = argv[1];
diff --git
a/test/test-segfault.c
b/test/test-segfault.c
index
bf4d964
..
329a21f
100644
(file)
--- a/
test/test-segfault.c
+++ b/
test/test-segfault.c
@@
-1,7
+1,9
@@
/* This is simply a process that segfaults */
#include <config.h>
#include <stdlib.h>
/* This is simply a process that segfaults */
#include <config.h>
#include <stdlib.h>
+#ifdef HAVE_SIGNAL_H
#include <signal.h>
#include <signal.h>
+#endif
#ifdef HAVE_SETRLIMIT
#include <sys/resource.h>
#ifdef HAVE_SETRLIMIT
#include <sys/resource.h>