Skip to contentSkip to conversation

LVM2 ./WHATS_NEW ./configure ./configure.in li ...

PATCH [email protected] 1 participant 1 message Sep 28, 2009

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2009-09-28 21:23:03

Modified files:
. : WHATS_NEW configure configure.in
lib/misc : configure.h.in lvm-wrappers.h

Log message:
Provide alternative implementation of obsolete siginterrupt().

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1276&r2=1.1277
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/configure.diff?cvsroot=lvm2&r1=1.107&r2=1.108
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/configure.in.diff?cvsroot=lvm2&r1=1.115&r2=1.116
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/configure.h.in.diff?cvsroot=lvm2&r1=1.14&r2=1.15
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/lvm-wrappers.h.diff?cvsroot=lvm2&r1=1.3&r2=1.4

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.54 -
 =====================================
+  Provide alternative implementation of obsolete siginterrupt().
   Consolidate LV allocation into alloc_lv().
   Treat input units of both 's' and 'S' as 512-byte sectors.  (2.02.49)
   Use standard output units for 'PE Size' and 'Stripe size' in pv/lvdisplay.
configure +101 -0

107 lines not on this page · raw message

configure.in +1 -0
@@ -118,6 +118,7 @@
 AC_CHECK_FUNCS([gethostname getpagesize memset mkdir rmdir munmap setlocale \
   strcasecmp strchr strdup strncasecmp strerror strrchr strstr strtol strtoul \
   uname], , [AC_MSG_ERROR(bailing out)])
+AC_CHECK_FUNCS(siginterrupt)
 AC_FUNC_ALLOCA
 AC_FUNC_CLOSEDIR_VOID
 AC_FUNC_FORK
lib/misc/configure.h.in +3 -0
@@ -212,6 +212,9 @@
 /* Define to 1 if you have the `setlocale' function. */
 #undef HAVE_SETLOCALE
 
+/* Define to 1 if you have the `siginterrupt' function. */
+#undef HAVE_SIGINTERRUPT
+
 /* Define to 1 if you have the <signal.h> header file. */
 #undef HAVE_SIGNAL_H
 
lib/misc/lvm-wrappers.h +15 -0
@@ -23,4 +23,19 @@
  */
 int read_urandom(void *buf, size_t len);
 
+#  ifndef HAVE_SIGINTERRUPT
+#    define siginterrupt(sig, flag) \
+	do { \
+		int ret; \
+		struct sigaction act; \
+		(void) sigaction(sig, NULL, &act); \
+		if (flag) \
+			act.sa_flags &= SA_RESTART; \
+		else \
+			act.sa_flags |= SA_RESTART; \
+		ret = sigaction(sig, &act, NULL); \
+		return ret; \
+	while (0)
+#  endif
+
 #endif