Fri Dec 9 22:25:28 2016 UTC ()
Mark command_child_exec as noreturn. Fix typo.


(joerg)
diff -r1.4 -r1.5 pkgsrc/pkgtools/cwrappers/files/bin/Makefile
diff -r1.5 -r1.6 pkgsrc/pkgtools/cwrappers/files/bin/common.c

cvs diff -r1.4 -r1.5 pkgsrc/pkgtools/cwrappers/files/bin/Makefile (expand / switch to unified diff)

--- pkgsrc/pkgtools/cwrappers/files/bin/Makefile 2016/12/08 16:58:50 1.4
+++ pkgsrc/pkgtools/cwrappers/files/bin/Makefile 2016/12/09 22:25:28 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.4 2016/12/08 16:58:50 joerg Exp $ 1# $NetBSD: Makefile,v 1.5 2016/12/09 22:25:28 joerg Exp $
2# 2#
3PROGS= as-wrapper cc-wrapper c++-wrapper cpp-wrapper f77-wrapper \ 3PROGS= as-wrapper cc-wrapper c++-wrapper cpp-wrapper f77-wrapper \
4 imake-wrapper ld-wrapper libtool-wrapper shlibtool-wrapper 4 imake-wrapper ld-wrapper libtool-wrapper shlibtool-wrapper
5 5
6BINDIR= ${PREFIX}/libexec/cwrappers 6BINDIR= ${PREFIX}/libexec/cwrappers
7 7
8LIB_SRCS= alloc.c cleanup-cc.c common.c reorder-cc.c 8LIB_SRCS= alloc.c cleanup-cc.c common.c reorder-cc.c
9 9
10.ifdef NEED_MI_VECTOR_HASH 10.ifdef NEED_MI_VECTOR_HASH
11LIB_SRCS+= mi_vector_hash.c 11LIB_SRCS+= mi_vector_hash.c
12CPPFLAGS+= -DNEED_MI_VECTOR_HASH 12CPPFLAGS+= -DNEED_MI_VECTOR_HASH
13.endif 13.endif
14 14
@@ -29,19 +29,19 @@ SRCS.libtool-wrapper= ${LIB_SRCS} generi @@ -29,19 +29,19 @@ SRCS.libtool-wrapper= ${LIB_SRCS} generi
29SRCS.shlibtool-wrapper= ${LIB_SRCS} generic-transform-libtool.c \ 29SRCS.shlibtool-wrapper= ${LIB_SRCS} generic-transform-libtool.c \
30 normalise-cc.c shlibtool-wrapper.c fixup-libtool.c 30 normalise-cc.c shlibtool-wrapper.c fixup-libtool.c
31 31
32WARNS= 4 32WARNS= 4
33NOMAN= 33NOMAN=
34 34
35CLEANFILES+= .work-new.log \ 35CLEANFILES+= .work-new.log \
36 transform-gcc-rules-fixed.map \ 36 transform-gcc-rules-fixed.map \
37 transform-gcc-rules-fixed1.c \ 37 transform-gcc-rules-fixed1.c \
38 transform-gcc-rules-fixed2.c 38 transform-gcc-rules-fixed2.c
39 39
40transform-cc.c: transform-gcc.c 40transform-cc.c: transform-gcc.c
41 41
42.ifdef MAINTAINER_NODE 42.ifdef MAINTAINER_MODE
43transform-gcc.c: transform-gcc-rules rules2src.awk 43transform-gcc.c: transform-gcc-rules rules2src.awk
44 awk -v output=transform-gcc.c -f rules2src.awk transform-gcc-rules 44 awk -v output=transform-gcc.c -f rules2src.awk transform-gcc-rules
45.endif 45.endif
46 46
47.include <bsd.prog.mk> 47.include <bsd.prog.mk>

cvs diff -r1.5 -r1.6 pkgsrc/pkgtools/cwrappers/files/bin/common.c (expand / switch to unified diff)

--- pkgsrc/pkgtools/cwrappers/files/bin/common.c 2016/11/27 11:46:45 1.5
+++ pkgsrc/pkgtools/cwrappers/files/bin/common.c 2016/12/09 22:25:28 1.6
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: common.c,v 1.5 2016/11/27 11:46:45 joerg Exp $ */ 1/* $NetBSD: common.c,v 1.6 2016/12/09 22:25:28 joerg Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2009 Joerg Sonnenberger <joerg@NetBSD.org>. 4 * Copyright (c) 2009 Joerg Sonnenberger <joerg@NetBSD.org>.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in 14 * notice, this list of conditions and the following disclaimer in
@@ -304,26 +304,29 @@ worklog_cmd(FILE *worklog, const char *p @@ -304,26 +304,29 @@ worklog_cmd(FILE *worklog, const char *p
304 buf = xmalloc(buflen); 304 buf = xmalloc(buflen);
305 shquote(arg->val, buf, buflen); 305 shquote(arg->val, buf, buflen);
306 } 306 }
307 fputc(' ', worklog); 307 fputc(' ', worklog);
308 fputs(buf, worklog); 308 fputs(buf, worklog);
309 } 309 }
310 310
311 fputc('\n', worklog); 311 fputc('\n', worklog);
312 312
313 if (buf) 313 if (buf)
314 free(buf); 314 free(buf);
315} 315}
316 316
 317#if __GNUC__ + 0 >= 3
 318__attribute__((__noreturn__))
 319#endif
317static void 320static void
318command_child_exec(char **argv) 321command_child_exec(char **argv)
319{ 322{
320 static const char failed_exec_msg[] = "exec failed\n"; 323 static const char failed_exec_msg[] = "exec failed\n";
321 int status; 324 int status;
322 325
323 execvp(exec_name, argv); 326 execvp(exec_name, argv);
324 status = write(STDERR_FILENO, failed_exec_msg, 327 status = write(STDERR_FILENO, failed_exec_msg,
325 sizeof(failed_exec_msg) - 1); 328 sizeof(failed_exec_msg) - 1);
326 _exit(255 | status); 329 _exit(255 | status);
327} 330}
328 331
329int 332int