1 |
vapier 12/07/05 04:11:29 |
2 |
|
3 |
Modified: 00_all_rpmatch.patch |
4 |
Log: |
5 |
pull in rpmatch from upstream to move it from header to C library for gnulib #423491 |
6 |
|
7 |
Revision Changes Path |
8 |
1.2 src/patchsets/uclibc/0.9.33.2/00_all_rpmatch.patch |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/uclibc/0.9.33.2/00_all_rpmatch.patch?rev=1.2&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/uclibc/0.9.33.2/00_all_rpmatch.patch?rev=1.2&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/uclibc/0.9.33.2/00_all_rpmatch.patch?r1=1.1&r2=1.2 |
13 |
|
14 |
Index: 00_all_rpmatch.patch |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/src/patchsets/uclibc/0.9.33.2/00_all_rpmatch.patch,v |
17 |
retrieving revision 1.1 |
18 |
retrieving revision 1.2 |
19 |
diff -u -r1.1 -r1.2 |
20 |
--- 00_all_rpmatch.patch 16 May 2012 03:34:52 -0000 1.1 |
21 |
+++ 00_all_rpmatch.patch 5 Jul 2012 04:11:29 -0000 1.2 |
22 |
@@ -1,3 +1,11 @@ |
23 |
+merge these two patches: |
24 |
+ |
25 |
+From: Bernhard Reutner-Fischer <rep.dot.nop@×××××.com> |
26 |
+Date: Thu, 3 May 2012 13:04:14 +0200 |
27 |
+Subject: [PATCH] rpmatch: provide out-of-line implementation |
28 |
+ |
29 |
+Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@×××××.com> |
30 |
+ |
31 |
From ecc6a1d1580086572c4c505330be52dbad205c27 Mon Sep 17 00:00:00 2001 |
32 |
From: Mike Frysinger <vapier@g.o> |
33 |
Date: Mon, 30 Apr 2012 00:40:49 -0400 |
34 |
@@ -16,7 +24,7 @@ |
35 |
index 352e58a..05a18eb 100644 |
36 |
--- a/include/stdlib.h |
37 |
+++ b/include/stdlib.h |
38 |
-@@ -828,12 +828,17 @@ __END_NAMESPACE_STD |
39 |
+@@ -828,7 +828,7 @@ __END_NAMESPACE_STD |
40 |
#endif /* __UCLIBC_HAS_WCHAR__ */ |
41 |
|
42 |
|
43 |
@@ -25,17 +33,50 @@ |
44 |
/* Determine whether the string value of RESPONSE matches the affirmation |
45 |
or negative response expression as specified by the LC_MESSAGES category |
46 |
in the program's current locale. Returns 1 if affirmative, 0 if |
47 |
- negative, and -1 if not matching. */ |
48 |
--extern int rpmatch (__const char *__response) __THROW __nonnull ((1)) __wur; |
49 |
-+__nonnull ((1)) __wur |
50 |
-+static __always_inline int rpmatch (__const char *__response) |
51 |
+diff --git a/libc/stdlib/Makefile.in b/libc/stdlib/Makefile.in |
52 |
+index d927807..2983d47 100644 |
53 |
+--- a/libc/stdlib/Makefile.in |
54 |
++++ b/libc/stdlib/Makefile.in |
55 |
+@@ -33,7 +33,7 @@ endif |
56 |
+ |
57 |
+ # multi source stdlib.c |
58 |
+ CSRC-y += abs.c labs.c atoi.c atol.c strtol.c strtoul.c _stdlib_strto_l.c \ |
59 |
+- qsort.c qsort_r.c bsearch.c \ |
60 |
++ qsort.c qsort_r.c bsearch.c rpmatch.c \ |
61 |
+ llabs.c atoll.c strtoll.c strtoull.c _stdlib_strto_ll.c |
62 |
+ # (aliases) strtoq.o strtouq.o |
63 |
+ CSRC-$(UCLIBC_HAS_FLOATS) += atof.c |
64 |
+diff --git a/libc/stdlib/rpmatch.c b/libc/stdlib/rpmatch.c |
65 |
+new file mode 100644 |
66 |
+index 0000000..dce06b6 |
67 |
+--- /dev/null |
68 |
++++ b/libc/stdlib/rpmatch.c |
69 |
+@@ -0,0 +1,7 @@ |
70 |
++/* Copyright (C) 2012 Bernhard Reutner-Fischer <uclibc@××××××.org> |
71 |
++ * |
72 |
++ * Licensed under the LGPL v2.1+, see the file COPYING.LIB in this tarball. |
73 |
++ */ |
74 |
++ |
75 |
++#define L_rpmatch |
76 |
++#include "stdlib.c" |
77 |
+diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c |
78 |
+index 9e8c347..de8f084 100644 |
79 |
+--- a/libc/stdlib/stdlib.c |
80 |
++++ b/libc/stdlib/stdlib.c |
81 |
+@@ -318,6 +318,14 @@ long long atoll(const char *nptr) |
82 |
+ |
83 |
+ #endif |
84 |
+ /**********************************************************************/ |
85 |
++#ifdef L_rpmatch |
86 |
++int rpmatch (__const char *__response) |
87 |
+{ |
88 |
+ return (__response[0] == 'y' || __response[0] == 'Y') ? 1 : |
89 |
+ (__response[0] == 'n' || __response[0] == 'N') ? 0 : -1; |
90 |
+} |
91 |
- #endif |
92 |
- |
93 |
++#endif |
94 |
++/**********************************************************************/ |
95 |
+ #if defined(L_strtol) || defined(L_strtol_l) |
96 |
|
97 |
+ libc_hidden_proto(__XL_NPP(strtol)) |
98 |
-- |
99 |
1.7.9.7 |
100 |
- |