summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-02-26 01:55:51 +0100
committerLennart Poettering <lennart@poettering.net>2009-02-26 03:18:16 +0100
commitc891735f10f65e84896172da5d7c0064efa72feb (patch)
treeb7903d4e71d43925fc8840c84c085555632171b2
parenta1563d125f757bdfd336d9a317f436f6aee836f9 (diff)
instead of defining _GNU_SOURCE manually use AC_USE_SYSTEM_EXTENSIONS
-rw-r--r--configure.ac2
-rw-r--r--modem-modeswitch/Makefile.am2
-rw-r--r--modem-modeswitch/modem-modeswitch.c3
-rw-r--r--modem-probe/Makefile.am3
-rw-r--r--modem-probe/modem-probe.c9
5 files changed, 6 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index 5f5a726..2ba046e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,8 +3,8 @@ AC_INIT([udev-extras],
[linux-hotplug@vger.kernel.org])
AC_PREREQ(2.60)
AM_INIT_AUTOMAKE([check-news foreign 1.9 subdir-objects dist-bzip2])
-AC_GNU_SOURCE
AC_DISABLE_STATIC
+AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_CONFIG_HEADERS(config.h)
AC_PROG_CC
diff --git a/modem-modeswitch/Makefile.am b/modem-modeswitch/Makefile.am
index 2be969a..706fd5a 100644
--- a/modem-modeswitch/Makefile.am
+++ b/modem-modeswitch/Makefile.am
@@ -4,7 +4,7 @@ udevhomedir = $(udev_prefix)/lib/udev
udevhome_PROGRAMS = modem-modeswitch
modem_modeswitch_SOURCES = modem-modeswitch.c
-modem_modeswitch_CPPFLAGS = $(LIBUSB_CFLAGS)
+modem_modeswitch_CPPFLAGS = $(AM_CPPFLAGS) $(LIBUSB_CFLAGS)
modem_modeswitch_LDADD = $(LIBUSB_LIBS)
udevrulesdir = $(udev_prefix)/lib/udev/rules.d
diff --git a/modem-modeswitch/modem-modeswitch.c b/modem-modeswitch/modem-modeswitch.c
index 2c1c764..72e1966 100644
--- a/modem-modeswitch/modem-modeswitch.c
+++ b/modem-modeswitch/modem-modeswitch.c
@@ -332,7 +332,7 @@ int main(int argc, char **argv)
dev->filename);
do_exit (6);
}
-
+
/* detach running default driver */
signal (SIGTERM, release_usb_device);
ret = usb_get_driver_np (handle, 0, buffer, sizeof (buffer));
@@ -392,4 +392,3 @@ int main(int argc, char **argv)
do_exit (0);
return 0;
}
-
diff --git a/modem-probe/Makefile.am b/modem-probe/Makefile.am
index c1df87f..12b396d 100644
--- a/modem-probe/Makefile.am
+++ b/modem-probe/Makefile.am
@@ -4,10 +4,9 @@ udevhomedir = $(udev_prefix)/lib/udev
udevhome_PROGRAMS = modem-probe
modem_probe_SOURCES = modem-probe.c
-modem_probe_CPPFLAGS = $(GLIB_CFLAGS)
+modem_probe_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
modem_probe_LDADD = $(GLIB_LIBS)
udevrulesdir = $(udev_prefix)/lib/udev/rules.d
dist_udevrules_DATA = 77-probe-modem-capabilities.rules
dist_man_MANS = modem-probe.8
-
diff --git a/modem-probe/modem-probe.c b/modem-probe/modem-probe.c
index ddeb413..66fec96 100644
--- a/modem-probe/modem-probe.c
+++ b/modem-probe/modem-probe.c
@@ -14,10 +14,6 @@
* GNU General Public License for more details:
*/
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
#include <termios.h>
#include <unistd.h>
#include <fcntl.h>
@@ -37,7 +33,7 @@
#define MODEM_CAP_ES 0x0010 /* Error control selection (v.42) */
#define MODEM_CAP_FCLASS 0x0020 /* Group III Fax */
#define MODEM_CAP_MS 0x0040 /* Modulation selection */
-#define MODEM_CAP_W 0x0080 /* Wireless commands */
+#define MODEM_CAP_W 0x0080 /* Wireless commands */
#define MODEM_CAP_IS856 0x0100 /* CDMA 3G EVDO rev 0 */
#define MODEM_CAP_IS856_A 0x0200 /* CDMA 3G EVDO rev A */
@@ -468,7 +464,7 @@ main(int argc, char *argv[])
attrs.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB);
attrs.c_cflag |= (B9600 | CS8 | CREAD | PARENB);
-
+
tcsetattr (fd, TCSANOW, &attrs);
caps = modem_probe_caps (fd);
tcsetattr (fd, TCSANOW, &orig);
@@ -502,4 +498,3 @@ main(int argc, char *argv[])
do_exit (0);
return 0;
}
-