Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/pax/ar_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ __RCSID("$NetBSD: ar_io.c,v 1.56 2015/03/09 23:38:08 sevan Exp $");
#include <ctype.h>
#include <errno.h>
#include <stdlib.h>
#include <time.h>
#ifdef SUPPORT_RMT
#define __RMTLIB_PRIVATE
#include <rmt.h>
Expand Down
2 changes: 1 addition & 1 deletion bin/pax/extern.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ void options(int, char **);
OPLIST * opt_next(void);
int bad_opt(void);
int mkpath(char *);
char *chdname;
//char *chdname;
#if !HAVE_NBTOOL_CONFIG_H
int do_chroot;
#endif
Expand Down
2 changes: 2 additions & 0 deletions bin/pax/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ int havechd = 0;
* parser
*/

char *chdname;

void
options(int argc, char **argv)
{
Expand Down
1 change: 1 addition & 0 deletions bin/pax/pax.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ __RCSID("$NetBSD: pax.c,v 1.47 2011/08/29 14:47:48 joerg Exp $");
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#include <time.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
Expand Down
2 changes: 2 additions & 0 deletions common/lib/libc/cdb/cdbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ __weak_alias(cdbr_open_mem,_cdbr_open_mem)
#define fast_remainder32(v,d,m,s1,s2) (v%d)
#endif

void mi_vector_hash(const void * __restrict, size_t, uint32_t, uint32_t[3]);

struct cdbr {
void (*unmap)(void *, void *, size_t);
void *cookie;
Expand Down
1 change: 1 addition & 0 deletions external/bsd/llvm/dist/llvm/include/llvm/ADT/STLExtras.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "llvm/Support/Compiler.h"
#include <cstddef> // for std::size_t
#include <cstdint> // for intptr_t
#include <cstdlib> // for qsort
#include <functional>
#include <iterator>
Expand Down
2 changes: 1 addition & 1 deletion external/bsd/llvm/dist/llvm/include/llvm/IR/ValueMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class ValueMap {

~ValueMap() {}

bool hasMD() const { return MDMap; }
bool hasMD() const { return static_cast<bool>(MDMap); }
MDMapT &MD() {
if (!MDMap)
MDMap.reset(new MDMapT);
Expand Down
2 changes: 2 additions & 0 deletions lib/libc/cdb/cdbw.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ __weak_alias(cdbw_put_data,_cdbw_put_data)
__weak_alias(cdbw_put_key,_cdbw_put_key)
#endif

void mi_vector_hash(const void * __restrict, size_t, uint32_t, uint32_t[3]);

struct key_hash {
SLIST_ENTRY(key_hash) link;
uint32_t hashes[3];
Expand Down
3 changes: 3 additions & 0 deletions lib/libc/gen/pw_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#include "compat_pwd.h"
#if HAVE_ERR_H
#include <err.h>
#endif

#else
#include <sys/cdefs.h>
Expand Down
15 changes: 8 additions & 7 deletions libexec/makewhatis/makewhatis.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ __RCSID("$NetBSD: makewhatis.c,v 1.49 2013/06/24 20:57:47 christos Exp $");
#include <sys/wait.h>

#include <ctype.h>
#include <time.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
Expand Down Expand Up @@ -97,10 +98,10 @@ static void addwhatis(whatis **, char *, char *);
static char *makesection(int);
static char *makewhatisline(const char *, const char *, const char *);
static void catpreprocess(char *);
static char *parsecatpage(const char *, gzFile *);
static char *parsecatpage(const char *, gzFile);
static int manpreprocess(char *);
static char *nroff(const char *, gzFile *);
static char *parsemanpage(const char *, gzFile *, int);
static char *nroff(const char *, gzFile);
static char *parsemanpage(const char *, gzFile, int);
static char *getwhatisdata(char *);
static void processmanpages(manpage **, whatis **);
static void dumpwhatis(FILE *, whatis *);
Expand Down Expand Up @@ -627,7 +628,7 @@ makewhatisline(const char *file, const char *line, const char *section)
}

static char *
parsecatpage(const char *name, gzFile *in)
parsecatpage(const char *name, gzFile in)
{
char buffer[8192];
char *section, *ptr, *last;
Expand Down Expand Up @@ -772,7 +773,7 @@ manpreprocess(char *line)
}

static char *
nroff(const char *inname, gzFile *in)
nroff(const char *inname, gzFile in)
{
char tempname[MAXPATHLEN], buffer[65536], *data;
int tempfd, bytes, pipefd[2], status;
Expand Down Expand Up @@ -871,7 +872,7 @@ nroff(const char *inname, gzFile *in)
}

static char *
parsemanpage(const char *name, gzFile *in, int defaultsection)
parsemanpage(const char *name, gzFile in, int defaultsection)
{
char *section, buffer[8192], *ptr;
static const char POD[] = ".\\\" Automatically generated by Pod";
Expand Down Expand Up @@ -1100,7 +1101,7 @@ parsemanpage(const char *name, gzFile *in, int defaultsection)
static char *
getwhatisdata(char *name)
{
gzFile *in;
gzFile in;
char *data;
int section;

Expand Down
4 changes: 2 additions & 2 deletions sbin/newfs_udf/newfs_udf.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ extern float meta_fract;


/* shared structure between udf_create.c users */
struct udf_create_context context;
struct udf_disclayout layout;
extern struct udf_create_context context;
extern struct udf_disclayout layout;

/* prototypes */
int udf_write_sector(void *sector, uint64_t location);
Expand Down
4 changes: 4 additions & 0 deletions sbin/newfs_udf/udf_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ __RCSID("$NetBSD: udf_create.c,v 1.25 2015/06/16 23:18:55 christos Exp $");
# endif
#endif

/* shared structure between udf_create.c users */
struct udf_create_context context;
struct udf_disclayout layout;

/*
* NOTE that there is some overlap between this code and the udf kernel fs.
* This is intentially though it might better be factored out one day.
Expand Down
17 changes: 17 additions & 0 deletions tools/compat/compat_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#undef _POSIX_SOURCE
#undef _POSIX_C_SOURCE
#define __USE_ISOC99 1
#define _XOPEN_SOURCE 600
#endif /* __linux__ && HAVE_FEATURES_H */

/* System headers needed for (re)definitions below. */
Expand Down Expand Up @@ -321,6 +322,10 @@ int dprintf(int, const char *, ...);
int flock(int, int);
#endif

#if !HAVE_FPURGE
int fpurge(FILE *);
#endif

#if !HAVE_FPARSELN || BROKEN_FPARSELN || defined(__NetBSD__) || defined(__minix)
# define FPARSELN_UNESCESC 0x01
# define FPARSELN_UNESCCONT 0x02
Expand Down Expand Up @@ -559,6 +564,18 @@ int vasnprintf(char **, size_t, const char *, va_list);
int vsnprintf(char *, size_t, const char *, va_list);
#endif

/* Wide character function declarations */
#if defined(__linux__)
#include <wchar.h>
#ifndef wcwidth
int wcwidth(wchar_t);
#endif
#endif

/* NetBSD-specific hash function */
void mi_vector_hash(const void * __restrict, size_t, uint32_t,
uint32_t[3]);

/*
* getmode() and setmode() are always defined, as these function names
* exist but with very different meanings on other OS's. The compat
Expand Down
8 changes: 7 additions & 1 deletion tools/compat/fpurge.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,18 @@
#if !HAVE_FPURGE
#include <stdio.h>
#include <fcntl.h>
#if HAVE___FPURGE
#include <stdio_ext.h>
#endif

void
int
fpurge(FILE *fp)
{
#if HAVE___FPURGE
__fpurge(fp);
return 0;
#else
return 0;
#endif
}
#endif
3 changes: 3 additions & 0 deletions tools/texinfo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ MODULE= texinfo

CONFIGURE_ARGS= --program-prefix=${_TOOL_PREFIX}

# Disable incompatible-pointer-types warning for old K&R style code
HOST_CFLAGS+= -Wno-incompatible-pointer-types

.include "${.CURDIR}/../Makefile.gnuhost"

.if !empty(.MAKE.OS:M*CYGWIN*) && target(install)
Expand Down
2 changes: 2 additions & 0 deletions usr.bin/make/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ char *makeDependfile;
pid_t myPid;
int makelevel;

FILE *debug_file;

Boolean forceJobs = FALSE;

extern Lst parseIncPath;
Expand Down
2 changes: 1 addition & 1 deletion usr.bin/make/make.h
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ extern pid_t myPid;
* There is one bit per module. It is up to the module what debug
* information to print.
*/
FILE *debug_file; /* Output written here - default stdout */
extern FILE *debug_file; /* Output written here - default stdout */
extern int debug;
#define DEBUG_ARCH 0x00001
#define DEBUG_COND 0x00002
Expand Down
1 change: 1 addition & 0 deletions usr.bin/tic/tic.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ __RCSID("$NetBSD: tic.c,v 1.24 2014/07/20 20:20:16 christos Exp $");
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <term_private.h>
#include <term.h>
#include <util.h>
Expand Down
4 changes: 2 additions & 2 deletions usr.sbin/installboot/machines.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ __RCSID("$NetBSD: machines.c,v 1.39 2014/02/24 07:23:44 skrll Exp $");
*/
struct ib_mach
ib_mach_alpha,
ib_mach_amd64,
// ib_mach_amd64,
ib_mach_amiga,
ib_mach_emips,
ib_mach_ews4800mips,
ib_mach_hp300,
ib_mach_hppa,
ib_mach_i386,
// ib_mach_i386,
ib_mach_landisk,
ib_mach_macppc,
ib_mach_news68k,
Expand Down