Tue Aug 25 21:43:33 2020 UTC ()
devel/bmake: Fix compiling on QNX 6.5


(js)
diff -r1.5 -r1.6 pkgsrc/devel/bmake/files/meta.c
diff -r1.16 -r1.17 pkgsrc/devel/bmake/files/util.c

cvs diff -r1.5 -r1.6 pkgsrc/devel/bmake/files/meta.c (expand / switch to unified diff)

--- pkgsrc/devel/bmake/files/meta.c 2020/05/24 21:10:17 1.5
+++ pkgsrc/devel/bmake/files/meta.c 2020/08/25 21:43:33 1.6
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: meta.c,v 1.5 2020/05/24 21:10:17 nia Exp $ */ 1/* $NetBSD: meta.c,v 1.6 2020/08/25 21:43:33 js Exp $ */
2 2
3/* 3/*
4 * Implement 'meta' mode. 4 * Implement 'meta' mode.
5 * Adapted from John Birrell's patches to FreeBSD make. 5 * Adapted from John Birrell's patches to FreeBSD make.
6 * --sjg 6 * --sjg
7 */ 7 */
8/* 8/*
9 * Copyright (c) 2009-2016, Juniper Networks, Inc. 9 * Copyright (c) 2009-2016, Juniper Networks, Inc.
10 * Portions Copyright (c) 2009, John Birrell. 10 * Portions Copyright (c) 2009, John Birrell.
11 *  11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions  13 * modification, are permitted provided that the following conditions
14 * are met:  14 * are met:
@@ -36,26 +36,30 @@ @@ -36,26 +36,30 @@
36# include "config.h" 36# include "config.h"
37#endif 37#endif
38#include <sys/stat.h> 38#include <sys/stat.h>
39#ifdef HAVE_LIBGEN_H 39#ifdef HAVE_LIBGEN_H
40#include <libgen.h> 40#include <libgen.h>
41#elif !defined(HAVE_DIRNAME) 41#elif !defined(HAVE_DIRNAME)
42char * dirname(char *); 42char * dirname(char *);
43#endif 43#endif
44#include <errno.h> 44#include <errno.h>
45#if !defined(HAVE_CONFIG_H) || defined(HAVE_ERR_H) 45#if !defined(HAVE_CONFIG_H) || defined(HAVE_ERR_H)
46#include <err.h> 46#include <err.h>
47#endif 47#endif
48 48
 49#ifdef HAVE_SYS_SELECT_H
 50#include <sys/select.h>
 51#endif
 52
49#include "make.h" 53#include "make.h"
50#include "job.h" 54#include "job.h"
51 55
52#ifdef USE_FILEMON 56#ifdef USE_FILEMON
53#include "filemon/filemon.h" 57#include "filemon/filemon.h"
54#endif 58#endif
55 59
56static BuildMon Mybm; /* for compat */ 60static BuildMon Mybm; /* for compat */
57static Lst metaBailiwick; /* our scope of control */ 61static Lst metaBailiwick; /* our scope of control */
58static char *metaBailiwickStr; /* string storage for the list */ 62static char *metaBailiwickStr; /* string storage for the list */
59static Lst metaIgnorePaths; /* paths we deliberately ignore */ 63static Lst metaIgnorePaths; /* paths we deliberately ignore */
60static char *metaIgnorePathsStr; /* string storage for the list */ 64static char *metaIgnorePathsStr; /* string storage for the list */
61 65

cvs diff -r1.16 -r1.17 pkgsrc/devel/bmake/files/util.c (expand / switch to unified diff)

--- pkgsrc/devel/bmake/files/util.c 2020/05/24 21:10:17 1.16
+++ pkgsrc/devel/bmake/files/util.c 2020/08/25 21:43:33 1.17
@@ -1,38 +1,42 @@ @@ -1,38 +1,42 @@
1/* $NetBSD: util.c,v 1.16 2020/05/24 21:10:17 nia Exp $ */ 1/* $NetBSD: util.c,v 1.17 2020/08/25 21:43:33 js Exp $ */
2 2
3/* 3/*
4 * Missing stuff from OS's 4 * Missing stuff from OS's
5 * 5 *
6 * $Id: util.c,v 1.16 2020/05/24 21:10:17 nia Exp $ 6 * $Id: util.c,v 1.17 2020/08/25 21:43:33 js Exp $
7 */ 7 */
8#if defined(__MINT__) || defined(__linux__) 8#if defined(__MINT__) || defined(__linux__)
9#include <signal.h> 9#include <signal.h>
10#endif 10#endif
11 11
12#include "make.h" 12#include "make.h"
13 13
14#ifndef MAKE_NATIVE 14#ifndef MAKE_NATIVE
15static char rcsid[] = "$NetBSD: util.c,v 1.16 2020/05/24 21:10:17 nia Exp $"; 15static char rcsid[] = "$NetBSD: util.c,v 1.17 2020/08/25 21:43:33 js Exp $";
16#else 16#else
17#ifndef lint 17#ifndef lint
18__RCSID("$NetBSD: util.c,v 1.16 2020/05/24 21:10:17 nia Exp $"); 18__RCSID("$NetBSD: util.c,v 1.17 2020/08/25 21:43:33 js Exp $");
19#endif 19#endif
20#endif 20#endif
21 21
22#include <errno.h> 22#include <errno.h>
23#include <time.h> 23#include <time.h>
24#include <signal.h> 24#include <signal.h>
25 25
 26#ifndef SA_RESTART
 27#define SA_RESTART 0
 28#endif
 29
26#if !defined(HAVE_STRERROR) 30#if !defined(HAVE_STRERROR)
27extern int errno, sys_nerr; 31extern int errno, sys_nerr;
28extern char *sys_errlist[]; 32extern char *sys_errlist[];
29 33
30char * 34char *
31strerror(int e) 35strerror(int e)
32{ 36{
33 static char buf[100]; 37 static char buf[100];
34 if (e < 0 || e >= sys_nerr) { 38 if (e < 0 || e >= sys_nerr) {
35 snprintf(buf, sizeof(buf), "Unknown error %d", e); 39 snprintf(buf, sizeof(buf), "Unknown error %d", e);
36 return buf; 40 return buf;
37 } 41 }
38 else 42 else