Skip to content

Commit 93c906c

Browse files
Pull up following revision(s) (requested by mrg in ticket #56):
tools/compat/configure.ac: revision 1.111 tools/compat/compat_defs.h: revision 1.126 tools/compat/compat_defs.h: revision 1.127 tools/compat/nbtool_config.h.in: revision 1.60 tools/compat/nbtool_config.h.in: revision 1.61 lib/libc/stdio/mkstemps.c: revision 1.2 tools/compat/configure: revision 1.108 tools/compat/configure: revision 1.109 tools/compat/nbtool_config.h.in: revision 1.59 tools/compat/Makefile: revision 1.95 tools/compat/configure.ac: revision 1.110 Add more functions needed by mandoc regen add vsyslog decl check regen Do the nbtool dance.
1 parent 2dd1679 commit 93c906c

File tree

6 files changed

+4437
-3270
lines changed

6 files changed

+4437
-3270
lines changed

lib/libc/stdio/mkstemps.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: mkstemps.c,v 1.1 2014/06/18 17:47:58 christos Exp $ */
1+
/* $NetBSD: mkstemps.c,v 1.1.42.1 2025/10/19 09:37:13 martin Exp $ */
22

33
/*-
44
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -27,10 +27,14 @@
2727
*/
2828
#include "gettemp.h"
2929

30+
#if !HAVE_NBTOOL_CONFIG_H || !HAVE_MKSTEMP
31+
3032
int
3133
mkstemps(char *path, int slen)
3234
{
3335
int fd;
3436

3537
return GETTEMP(path, &fd, 0, slen, 0) ? fd : -1;
3638
}
39+
40+
#endif /* !HAVE_NBTOOL_CONFIG_H || !HAVE_MKSTEMP */

tools/compat/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: Makefile,v 1.94 2025/05/14 23:37:17 riastradh Exp $
1+
# $NetBSD: Makefile,v 1.94.2.1 2025/10/19 09:37:13 martin Exp $
22

33
HOSTLIB= nbcompat
44

@@ -10,7 +10,7 @@ SRCS= atoll.c basename.c cdbr.c cdbw.c dirname.c \
1010
heapsort.c getsubopt.c \
1111
issetugid.c lchflags.c lchmod.c lchown.c libyywrap.c \
1212
md2.c md2hl.c md4c.c md4hl.c md5c.c md5hl.c \
13-
mi_vector_hash.c mkdtemp.c \
13+
mi_vector_hash.c mkdtemp.c mkstemps.c \
1414
mkstemp.c pread.c putc_unlocked.c pwcache.c pwrite.c \
1515
pw_scan.c \
1616
raise_default_signal.c rb.c reallocarr.c reallocarray.c \
@@ -22,8 +22,8 @@ SRCS= atoll.c basename.c cdbr.c cdbw.c dirname.c \
2222
shquote.c \
2323
snprintb.c snprintf.c \
2424
stat_flags.c strlcat.c strlcpy.c strmode.c \
25-
strcasecmp.c strncasecmp.c strndup.c strnlen.c \
26-
strsep.c strsuftoll.c strtoll.c \
25+
strcasecmp.c strncasecmp.c strcasestr.c strndup.c strnlen.c \
26+
strsep.c strsuftoll.c strtonum.c strtoll.c \
2727
strtoi.c strtou.c \
2828
unvis.c vis.c err.c errx.c errc.c verr.c verrx.c verrc.c \
2929
vwarn.c vwarnx.c vwarnc.c warn.c warnx.c warnc.c \

tools/compat/compat_defs.h

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: compat_defs.h,v 1.125 2025/05/05 14:21:50 christos Exp $ */
1+
/* $NetBSD: compat_defs.h,v 1.125.2.1 2025/10/19 09:37:13 martin Exp $ */
22

33
#ifndef __NETBSD_COMPAT_DEFS_H__
44
#define __NETBSD_COMPAT_DEFS_H__
@@ -448,6 +448,10 @@ int issetugid(void);
448448
int mkstemp(char *);
449449
#endif
450450

451+
#if !HAVE_DECL_MKSTEMPS
452+
int mkstemps(char *, int);
453+
#endif
454+
451455
#if !HAVE_DECL_MKDTEMP
452456
char *mkdtemp(char *);
453457
#endif
@@ -543,6 +547,9 @@ int strcasecmp(const char *, const char *);
543547
#if !HAVE_DECL_STRNCASECMP
544548
int strncasecmp(const char *, const char *, size_t);
545549
#endif
550+
#if !HAVE_DECL_STRCASESTR
551+
char *strcasestr(const char *, const char *);
552+
#endif
546553
#if !HAVE_DECL_LCHFLAGS
547554
int lchflags(const char *, unsigned long);
548555
#endif
@@ -619,6 +626,10 @@ long long strsuftollx(const char *, const char *,
619626
long long strtoll(const char *, char **, int);
620627
#endif
621628

629+
#if !HAVE_DECL_STRTONUM
630+
long long strtonum(const char *, long long, long long, const char **);
631+
#endif
632+
622633
#if !HAVE_DECL_STRTOI
623634
intmax_t strtoi(const char * __restrict, char ** __restrict, int,
624635
intmax_t, intmax_t, int *);
@@ -649,6 +660,10 @@ int vasnprintf(char **, size_t, const char *, va_list);
649660
int vsnprintf(char *, size_t, const char *, va_list);
650661
#endif
651662

663+
#if !HAVE_DECL_VSYSLOG
664+
void vsyslog(int, const char *, va_list);
665+
#endif
666+
652667
/*
653668
* getmode() and setmode() are always defined, as these function names
654669
* exist but with very different meanings on other OS's. The compat

0 commit comments

Comments
 (0)