1 |
vapier 13/09/29 22:42:37 |
2 |
|
3 |
Modified: Makefile test.c |
4 |
Log: |
5 |
move all headers includes and such to a single porting.h to avoid duplicating in tests/ #406393 |
6 |
|
7 |
Revision Changes Path |
8 |
1.3 portage-utils/tests/mkdir/Makefile |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/mkdir/Makefile?rev=1.3&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/mkdir/Makefile?rev=1.3&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/mkdir/Makefile?r1=1.2&r2=1.3 |
13 |
|
14 |
Index: Makefile |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-projects/portage-utils/tests/mkdir/Makefile,v |
17 |
retrieving revision 1.2 |
18 |
retrieving revision 1.3 |
19 |
diff -u -r1.2 -r1.3 |
20 |
--- Makefile 12 Dec 2011 21:04:24 -0000 1.2 |
21 |
+++ Makefile 29 Sep 2013 22:42:36 -0000 1.3 |
22 |
@@ -1,13 +1,11 @@ |
23 |
thisdir = mkdir |
24 |
include ../subdir.mk |
25 |
|
26 |
-CFLAGS += -Wall |
27 |
- |
28 |
all: $(b)/m |
29 |
|
30 |
$(b)/m: $(s)/test.c |
31 |
mkdir -p $(b) |
32 |
- $(CC) $(CFLAGS) $< -o $@ |
33 |
+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ |
34 |
|
35 |
test check: dotest |
36 |
|
37 |
|
38 |
|
39 |
|
40 |
1.3 portage-utils/tests/mkdir/test.c |
41 |
|
42 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/mkdir/test.c?rev=1.3&view=markup |
43 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/mkdir/test.c?rev=1.3&content-type=text/plain |
44 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/tests/mkdir/test.c?r1=1.2&r2=1.3 |
45 |
|
46 |
Index: test.c |
47 |
=================================================================== |
48 |
RCS file: /var/cvsroot/gentoo-projects/portage-utils/tests/mkdir/test.c,v |
49 |
retrieving revision 1.2 |
50 |
retrieving revision 1.3 |
51 |
diff -u -r1.2 -r1.3 |
52 |
--- test.c 17 Mar 2011 01:57:27 -0000 1.2 |
53 |
+++ test.c 29 Sep 2013 22:42:36 -0000 1.3 |
54 |
@@ -1,44 +1,17 @@ |
55 |
/* |
56 |
- * Copyright 2005-2008 Gentoo Foundation |
57 |
+ * Copyright 2005-2013 Gentoo Foundation |
58 |
* Distributed under the terms of the GNU General Public License v2 |
59 |
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/tests/mkdir/test.c,v 1.2 2011/03/17 01:57:27 vapier Exp $ |
60 |
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/tests/mkdir/test.c,v 1.3 2013/09/29 22:42:36 vapier Exp $ |
61 |
* |
62 |
* Copyright 2005-2008 Ned Ludd - <solar@g.o> |
63 |
- * Copyright 2005-2008 Mike Frysinger - <vapier@g.o> |
64 |
+ * Copyright 2005-2013 Mike Frysinger - <vapier@g.o> |
65 |
*/ |
66 |
|
67 |
-#define _GNU_SOURCE |
68 |
+#include "tests/tests.h" |
69 |
|
70 |
-#include <stdio.h> |
71 |
-#include <stdbool.h> |
72 |
-#include <stdlib.h> |
73 |
-#include <sys/types.h> |
74 |
-#include <string.h> |
75 |
-#include <unistd.h> |
76 |
-#include <sys/stat.h> |
77 |
-#include <time.h> |
78 |
-#include <ctype.h> |
79 |
-#include <dirent.h> |
80 |
-#include <getopt.h> |
81 |
-#include <regex.h> |
82 |
-#include <errno.h> |
83 |
-#include <libgen.h> |
84 |
-#include <limits.h> |
85 |
-#include <assert.h> |
86 |
- |
87 |
-#define warnf(fmt, args...) fprintf(stderr, fmt "\n", ## args) |
88 |
-#define errf(fmt, args...) \ |
89 |
- do { \ |
90 |
- warnf(fmt, ## args); \ |
91 |
- exit(EXIT_FAILURE); \ |
92 |
- } while (0) |
93 |
-#define err(...) errf(__VA_ARGS__) |
94 |
-#define errp(...) errf(__VA_ARGS__) |
95 |
-#define _q_static static |
96 |
- |
97 |
-#include "../../libq/xmalloc.c" |
98 |
-#include "../../libq/xstrdup.c" |
99 |
-#include "../../libq/xmkdir.c" |
100 |
+#include "libq/xmalloc.c" |
101 |
+#include "libq/xstrdup.c" |
102 |
+#include "libq/xmkdir.c" |
103 |
|
104 |
int main(int argc, char *argv[]) |
105 |
{ |