Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-alt r1692 - in trunk/baselayout-prefix/src: . core
Date: Thu, 31 Mar 2011 16:38:17
Message-Id: 20110331163806.1A98120054@flycatcher.gentoo.org
1 Author: grobian
2 Date: 2011-03-31 16:38:02 +0000 (Thu, 31 Mar 2011)
3 New Revision: 1692
4
5 Modified:
6 trunk/baselayout-prefix/src/core/misc.c
7 trunk/baselayout-prefix/src/core/misc.h
8 trunk/baselayout-prefix/src/start-stop-daemon.c
9 Log:
10 applied updated baselayout-1.12.5-gnulib.patch
11
12 Modified: trunk/baselayout-prefix/src/core/misc.c
13 ===================================================================
14 --- trunk/baselayout-prefix/src/core/misc.c 2011-03-31 14:12:56 UTC (rev 1691)
15 +++ trunk/baselayout-prefix/src/core/misc.c 2011-03-31 16:38:02 UTC (rev 1692)
16 @@ -85,31 +85,6 @@
17 return new_path;
18 }
19
20 -char *strndup(const char *str, size_t size) {
21 - char *new_str = NULL;
22 - size_t len;
23 -
24 - if (NULL == str) {
25 - DBG_MSG("Invalid argument passed!\n");
26 - errno = EINVAL;
27 - return NULL;
28 - }
29 -
30 - /* Check lenght of str without breaching the size limit */
31 - for (len = 0;(len < size) && ('\0' != str[len]);len++);
32 -
33 - new_str = malloc(len + 1);
34 - if (NULL == new_str) {
35 - DBG_MSG("Failed to allocate buffer!\n");
36 - return NULL;
37 - }
38 -
39 - /* Make sure our string is NULL terminated */
40 - new_str[len] = '\0';
41 -
42 - return (char *)memcpy(new_str, str, len);
43 -}
44 -
45 char *gbasename(const char *path) {
46 char *new_path = NULL;
47
48
49 Modified: trunk/baselayout-prefix/src/core/misc.h
50 ===================================================================
51 --- trunk/baselayout-prefix/src/core/misc.h 2011-03-31 14:12:56 UTC (rev 1691)
52 +++ trunk/baselayout-prefix/src/core/misc.h 2011-03-31 16:38:02 UTC (rev 1692)
53 @@ -246,8 +246,6 @@
54 * with the malloc() call. */
55 char *strcatpaths(const char *pathname1, const char *pathname2);
56
57 -/* Compat functions for GNU extensions */
58 -char *strndup(const char *str, size_t size);
59 /* Same as basename(3), but do not modify path */
60 char *gbasename(const char *path);
61
62
63 Modified: trunk/baselayout-prefix/src/start-stop-daemon.c
64 ===================================================================
65 --- trunk/baselayout-prefix/src/start-stop-daemon.c 2011-03-31 14:12:56 UTC (rev 1691)
66 +++ trunk/baselayout-prefix/src/start-stop-daemon.c 2011-03-31 16:38:02 UTC (rev 1692)
67 @@ -30,6 +30,7 @@
68 *
69 */
70
71 +#undef VERSION
72 #define VERSION "1.13.11+gentoo"
73
74 #define NONRETURNPRINTFFORMAT(x, y) \