svn commit: trunk/uClibc/libc/string

vapier at uclibc.org vapier at uclibc.org
Wed Jan 18 12:16:02 UTC 2006


Author: vapier
Date: 2006-01-18 04:16:01 -0800 (Wed, 18 Jan 2006)
New Revision: 13391

Log:
check for signal existence rather than using arch defines

Modified:
   trunk/uClibc/libc/string/__xpg_strerror_r.c
   trunk/uClibc/libc/string/_string_syssigmsgs.c
   trunk/uClibc/libc/string/strsignal.c
   trunk/uClibc/libc/string/sys_siglist.c


Changeset:
Modified: trunk/uClibc/libc/string/__xpg_strerror_r.c
===================================================================
--- trunk/uClibc/libc/string/__xpg_strerror_r.c	2006-01-18 12:11:42 UTC (rev 13390)
+++ trunk/uClibc/libc/string/__xpg_strerror_r.c	2006-01-18 12:16:01 UTC (rev 13391)
@@ -145,14 +145,14 @@
 	ENAVAIL,
 	EISNAM,
 	EREMOTEIO,
-#ifdef __mips__
-	0,							/* mips has an outrageous value for this... */
+#if EDQUOT > 200			/* mips has an outrageous value for this... */
+	0,							
 #else
 	EDQUOT,
 #endif
 	ENOMEDIUM,
 	EMEDIUMTYPE,
-#if defined(__mips__) || defined(__sparc__)
+#if EDEADLOCK != EDEADLK
 	EDEADLOCK,
 #endif
 };
@@ -181,11 +181,10 @@
 		}
 	}
 	i = INT_MAX;	/* Failed, but may need to check mips special case. */
-#ifdef __mips__
-	if (errnum == EDQUOT) {	/* Deal with large EDQUOT value on mips */
+#if EDQUOT > 200	/* Deal with large EDQUOT value on mips */
+	if (errnum == EDQUOT)
 		i = 122;
-	}
-#endif /* __mips__ */
+#endif
  GOT_ESTRIDX:
 #else
 	/* No errno to string index translation needed. */

Modified: trunk/uClibc/libc/string/_string_syssigmsgs.c
===================================================================
--- trunk/uClibc/libc/string/_string_syssigmsgs.c	2006-01-18 12:11:42 UTC (rev 13390)
+++ trunk/uClibc/libc/string/_string_syssigmsgs.c	2006-01-18 12:16:01 UTC (rev 13391)
@@ -43,7 +43,7 @@
 	/*  29:  445, 13 */ "I/O possible\0"
 	/*  30:  458, 14 */ "Power failure\0"
 	/*  31:  472, 16 */ "Bad system call"
-#if defined(__alpha__) || defined(__mips__) || defined(__hppa__) || defined(__sparc__)
+#if defined SIGEMT
 	/*  32:  488,  9 */ "\0EMT trap"
 #endif
 };

Modified: trunk/uClibc/libc/string/strsignal.c
===================================================================
--- trunk/uClibc/libc/string/strsignal.c	2006-01-18 12:11:42 UTC (rev 13390)
+++ trunk/uClibc/libc/string/strsignal.c	2006-01-18 12:16:01 UTC (rev 13391)
@@ -58,10 +58,10 @@
 	SIGPIPE,
 	SIGALRM,
 	SIGTERM,
-#if defined(__alpha__) || defined(__mips__) || defined(__sparc__)
+#if defined SIGSTKFLT
+	SIGSTKFLT,
+#else
 	0,
-#else
-	SIGSTKFLT,
 #endif
 	SIGCHLD,
 	SIGCONT,
@@ -78,7 +78,7 @@
 	SIGIO,
 	SIGPWR,
 	SIGSYS,
-#if defined(__alpha__) || defined(__mips__) || defined(__hppa__) || defined(__sparc__)
+#if defined SIGEMT
 	SIGEMT,
 #endif
 };

Modified: trunk/uClibc/libc/string/sys_siglist.c
===================================================================
--- trunk/uClibc/libc/string/sys_siglist.c	2006-01-18 12:11:42 UTC (rev 13390)
+++ trunk/uClibc/libc/string/sys_siglist.c	2006-01-18 12:16:01 UTC (rev 13391)
@@ -31,7 +31,7 @@
 	[SIGPIPE] =			_string_syssigmsgs + 178,
 	[SIGALRM] =			_string_syssigmsgs + 190,
 	[SIGTERM] =			_string_syssigmsgs + 202,
-#if !(defined(__alpha__) || defined(__mips__) || defined(__sparc__))
+#if defined SIGSTKFLT /* not all arches define this, yeah ! */
 	[SIGSTKFLT] =			_string_syssigmsgs + 213,
 #endif
 	[SIGCHLD] =			_string_syssigmsgs + 225,
@@ -49,7 +49,7 @@
 	[SIGIO] =			_string_syssigmsgs + 445,
 	[SIGPWR] =			_string_syssigmsgs + 458,
 	[SIGSYS] =			_string_syssigmsgs + 472,
-#if defined(__alpha__) || defined(__mips__) || defined(__hppa__) || defined(__sparc__)
+#if defined SIGEMT /* only some arches define this, yeah ! */
 	[SIGEMT] =			_string_syssigmsgs + 488,
 #endif
 };




More information about the uClibc-cvs mailing list