diff options
author | Ed Maste <emaste@FreeBSD.org> | 2014-12-22 20:32:23 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2014-12-22 20:32:23 +0000 |
commit | 5eccfb5cf5403e9e564066e0a75d80534b49e91d (patch) | |
tree | 78347950207dea134308b7c9d4843204e80507e0 /test/ar/plugin | |
parent | 5265ace0e440a23fb522c516f4ee20f43eaed2b3 (diff) | |
download | src-5eccfb5cf5403e9e564066e0a75d80534b49e91d.tar.gz src-5eccfb5cf5403e9e564066e0a75d80534b49e91d.zip |
Import elftoolchain rev 3130vendor/elftoolchain/elftoolchain-r3130
From svn.code.sf.net/p/elftoolchain/code/trunk
Notes
Notes:
svn path=/vendor/elftoolchain/dist/; revision=276077
svn path=/vendor/elftoolchain/elftoolchain-r3130/; revision=276078; tag=vendor/elftoolchain/elftoolchain-r3130
Diffstat (limited to 'test/ar/plugin')
-rw-r--r-- | test/ar/plugin/Makefile | 4 | ||||
-rw-r--r-- | test/ar/plugin/Makefile.ardiff | 4 | ||||
-rw-r--r-- | test/ar/plugin/ardiff.c | 13 | ||||
-rw-r--r-- | test/ar/plugin/teraser.c | 10 |
4 files changed, 15 insertions, 16 deletions
diff --git a/test/ar/plugin/Makefile b/test/ar/plugin/Makefile index 58e00fd1b2de..36e33a35687c 100644 --- a/test/ar/plugin/Makefile +++ b/test/ar/plugin/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile 2080 2011-10-27 04:23:24Z jkoshy $ +# $Id: Makefile 3025 2014-04-18 16:20:25Z jkoshy $ PLUGINS= ardiff teraser @@ -9,7 +9,7 @@ ${PLUGINS}: ${MAKE} -f Makefile.${plugin} .endfor -clean depend: +clean cleandepend depend: .for plugin in ${PLUGINS} ${MAKE} -f Makefile.${plugin} ${.TARGET} .endfor diff --git a/test/ar/plugin/Makefile.ardiff b/test/ar/plugin/Makefile.ardiff index 1558cfe6065c..ec702c2ae585 100644 --- a/test/ar/plugin/Makefile.ardiff +++ b/test/ar/plugin/Makefile.ardiff @@ -1,9 +1,7 @@ -# $Id: Makefile.ardiff 2096 2011-11-01 04:42:04Z jkoshy $ +# $Id: Makefile.ardiff 3120 2014-12-21 05:45:51Z kaiwang27 $ TOP= ../../.. -.include "${TOP}/mk/elftoolchain.os.mk" - PROG= ardiff NOMAN= noman diff --git a/test/ar/plugin/ardiff.c b/test/ar/plugin/ardiff.c index e54f6a9f6cdc..907d1ea80da9 100644 --- a/test/ar/plugin/ardiff.c +++ b/test/ar/plugin/ardiff.c @@ -12,7 +12,7 @@ * By default, it compares nothing and consider the test "not ok" * iff it encounters errors while reading archive. * - * $Id: ardiff.c 2142 2011-11-10 15:29:59Z jkoshy $ + * $Id: ardiff.c 3102 2014-10-29 21:09:01Z jkoshy $ */ #include <archive.h> @@ -93,9 +93,8 @@ main(int argc, char **argv) /* Open file 1 */ a1 = archive_read_new(); - archive_read_support_compression_none(a1); archive_read_support_format_ar(a1); - if (archive_read_open_file(a1, argv[0], + if (archive_read_open_filename(a1, argv[0], 1024*10)) { warnx("%s", archive_error_string(a1)); filediff(tc, "archive open failed", NULL); @@ -103,9 +102,8 @@ main(int argc, char **argv) /* Open file 2 */ a2 = archive_read_new(); - archive_read_support_compression_none(a2); archive_read_support_format_ar(a2); - if (archive_read_open_file(a2, argv[1], + if (archive_read_open_filename(a2, argv[1], 1024*10)) { warnx("%s", archive_error_string(a2)); filediff(tc, "archive open failed", NULL); @@ -233,10 +231,11 @@ static void incct(const char *pathname) { FILE *fp; - char buf[10], *_buf; + char buf[10]; if ((fp = fopen(pathname, "r")) != NULL) { - _buf = fgets(buf, 10, fp); + if (fgets(buf, 10, fp) != buf) + perror("fgets"); snprintf(buf, 10, "%d\n", atoi(buf) + 1); fclose(fp); } diff --git a/test/ar/plugin/teraser.c b/test/ar/plugin/teraser.c index 59d587f7f048..d16752e7cefb 100644 --- a/test/ar/plugin/teraser.c +++ b/test/ar/plugin/teraser.c @@ -2,7 +2,7 @@ * make it easy to `diff'. (option -e) * 2. Check the sanity of timestamp. (option -c) * - * $Id: teraser.c 2142 2011-11-10 15:29:59Z jkoshy $ + * $Id: teraser.c 3102 2014-10-29 21:09:01Z jkoshy $ */ #include <errno.h> @@ -28,7 +28,7 @@ main(int argc, char **argv) char opt; char checktime; char erasetime; - char buf[TSLEN + 1], *_buf; + char buf[TSLEN + 1]; char *tc; int fd; int ts; @@ -85,7 +85,8 @@ main(int argc, char **argv) if (ts <= now && ts >= now - TDELAY) { fprintf(stderr, "%s - timestamp ok\n", tc); if ((ps = fopen(PASSED, "r")) != NULL) { - _buf = fgets(buf, TSLEN, ps); + if (fgets(buf, TSLEN, ps) != buf) + perror("fgets"); snprintf(buf, TSLEN, "%d\n", atoi(buf) + 1); fclose(ps); @@ -98,7 +99,8 @@ main(int argc, char **argv) fprintf(stderr, "%s - timestamp not ok\n", tc); } if ((ct = fopen(COUNTER, "r")) != NULL) { - _buf = fgets(buf, TSLEN, ct); + if (fgets(buf, TSLEN, ct) != buf) + perror("fgets"); snprintf(buf, TSLEN, "%d\n", atoi(buf) + 1); fclose(ct); } |