Skip to content

Commit

Permalink
Add midnightbsd customizations.
Browse files Browse the repository at this point in the history
  • Loading branch information
laffer1 committed Dec 29, 2023
1 parent f17e049 commit 2dfa03d
Show file tree
Hide file tree
Showing 1,609 changed files with 44,898 additions and 12 deletions.
35 changes: 35 additions & 0 deletions contrib/mandoc/Makefile.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
BUILD_TARGETS =
INSTALL_TARGETS =
CC = cc
CFLAGS = -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter
LDADD = -lz
LDFLAGS =
STATIC = -static
PREFIX = /usr/local
BINDIR = /usr/local/bin
SBINDIR = /usr/local/sbin
BIN_FROM_SBIN = ../bin
INCLUDEDIR = /usr/local/include/mandoc
LIBDIR = /usr/local/lib/mandoc
MANDIR = /usr/local/man
WWWPREFIX = /var/www
HTDOCDIR = /var/www/htdocs
CGIBINDIR = /var/www/cgi-bin
BINM_APROPOS = apropos
BINM_CATMAN = catman
BINM_MAKEWHATIS = makewhatis
BINM_MAN = man
BINM_SOELIM = soelim
BINM_WHATIS = whatis
MANM_MAN = man
MANM_MANCONF = man.conf
MANM_MDOC = mdoc
MANM_ROFF = roff
MANM_EQN = eqn
MANM_TBL = tbl
INSTALL = install
INSTALL_PROGRAM = install -m 0555
INSTALL_LIB = install -m 0444
INSTALL_MAN = install -m 0444
INSTALL_DATA = install -m 0444
LN = ln -f
55 changes: 55 additions & 0 deletions contrib/mandoc/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#ifdef __cplusplus
#error "Do not use C++. See the INSTALL file."
#endif

#if !defined(__GNUC__) || (__GNUC__ < 4)
#define __attribute__(x)
#endif

#include <sys/types.h>

#define MAN_CONF_FILE "/etc/man.conf"
#define MANPATH_BASE "/usr/share/man"
#define MANPATH_DEFAULT "/usr/share/man:/usr/local/man"
#define OSENUM MANDOC_OS_OTHER
#define UTF8_LOCALE "en_US.UTF-8"
#define HAVE_CMSG_XPG42 0
#define HAVE_DIRENT_NAMLEN 1
#define HAVE_ENDIAN 0
#define HAVE_ERR 1
#define HAVE_FTS 1
#define HAVE_FTS_COMPARE_CONST 1
#define HAVE_GETLINE 1
#define HAVE_GETSUBOPT 1
#define HAVE_ISBLANK 1
#define HAVE_LESS_T 1
#define HAVE_MKDTEMP 1
#define HAVE_NTOHL 1
#define HAVE_PLEDGE 0
#define HAVE_PROGNAME 1
#define HAVE_REALLOCARRAY 1
#define HAVE_RECALLOCARRAY 0
#define HAVE_REWB_BSD 1
#define HAVE_REWB_SYSV 1
#define HAVE_SANDBOX_INIT 0
#define HAVE_STRCASESTR 1
#define HAVE_STRINGLIST 1
#define HAVE_STRLCAT 1
#define HAVE_STRLCPY 1
#define HAVE_STRNDUP 1
#define HAVE_STRPTIME 1
#define HAVE_STRSEP 1
#define HAVE_STRTONUM 1
#define HAVE_SYS_ENDIAN 1
#define HAVE_VASPRINTF 1
#define HAVE_WCHAR 1
#define HAVE_OHASH 1

#define BINM_APROPOS "apropos"
#define BINM_CATMAN "catman"
#define BINM_MAKEWHATIS "makewhatis"
#define BINM_MAN "man"
#define BINM_SOELIM "soelim"
#define BINM_WHATIS "whatis"

extern void *recallocarray(void *, size_t, size_t, size_t);
221 changes: 221 additions & 0 deletions contrib/mandoc/config.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
configure.local: no (fully automatic configuration)

dirent-namlen: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-dirent-namlen test-dirent-namlen.c
dirent-namlen: cc succeeded
dirent-namlen: yes

be32toh: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-be32toh test-be32toh.c
./test-be32toh.c:4:10: fatal error: 'endian.h' file not found
#include <endian.h>
^
1 error generated.
be32toh: cc failed with 1

be32toh-DSYS_ENDIAN: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-be32toh test-be32toh.c -DSYS_ENDIAN
be32toh-DSYS_ENDIAN: cc succeeded
be32toh-DSYS_ENDIAN: yes

EFTYPE: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-EFTYPE test-EFTYPE.c
EFTYPE: cc succeeded
EFTYPE: yes

err: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-err test-err.c
err: cc succeeded
test-err: 1. warnx
test-err: 2. warn: No error: 0
test-err: 3. err: No error: 0
err: yes

getline: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-getline test-getline.c
./test-getline.c:12:9: error: implicit declaration of function 'getline' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return getline(&line, &linesz, stdin) != -1;
^
1 error generated.
getline: cc failed with 1

getsubopt: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-getsubopt test-getsubopt.c
getsubopt: cc succeeded
getsubopt: yes

isblank: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-isblank test-isblank.c
isblank: cc succeeded
isblank: yes

mkdtemp: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-mkdtemp test-mkdtemp.c
mkdtemp: cc succeeded
mkdtemp: yes

ntohl: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-ntohl test-ntohl.c
ntohl: cc succeeded
ntohl: yes

O_DIRECTORY: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-O_DIRECTORY test-O_DIRECTORY.c
O_DIRECTORY: cc succeeded
O_DIRECTORY: yes

PATH_MAX: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-PATH_MAX test-PATH_MAX.c
PATH_MAX: cc succeeded
PATH_MAX is defined to be 1024
PATH_MAX: yes

pledge: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-pledge test-pledge.c
./test-pledge.c:6:11: error: implicit declaration of function 'pledge' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return !!pledge("stdio", NULL);
^
1 error generated.
pledge: cc failed with 1

sandbox_init: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-sandbox_init test-sandbox_init.c
./test-sandbox_init.c:1:10: fatal error: 'sandbox.h' file not found
#include <sandbox.h>
^
1 error generated.
sandbox_init: cc failed with 1

progname: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-progname test-progname.c
progname: cc succeeded
progname: yes

reallocarray: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-reallocarray test-reallocarray.c
reallocarray: cc succeeded
reallocarray: yes

recallocarray: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-recallocarray test-recallocarray.c
./test-recallocarray.c:10:10: error: implicit declaration of function 'recallocarray' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return !recallocarray(p, 2, 3, 2);
^
./test-recallocarray.c:10:10: note: did you mean 'reallocarray'?
/usr/include/stdlib.h:107:10: note: 'reallocarray' declared here
void *reallocarray(void *, size_t, size_t);
^
1 error generated.
recallocarray: cc failed with 1

rewb-bsd: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-rewb-bsd test-rewb-bsd.c
rewb-bsd: cc succeeded
rewb-bsd: yes

rewb-sysv: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-rewb-sysv test-rewb-sysv.c
rewb-sysv: cc succeeded
rewb-sysv: execution failed with 2

strcasestr: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-strcasestr test-strcasestr.c
strcasestr: cc succeeded
strcasestr: yes

stringlist: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-stringlist test-stringlist.c
./test-stringlist.c:26:26: error: use of undeclared identifier 'NULL'
if ((sl = sl_init()) == NULL)
^
1 error generated.
stringlist: cc failed with 1

strlcat: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-strlcat test-strlcat.c
strlcat: cc succeeded
strlcat: yes

strlcpy: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-strlcpy test-strlcpy.c
strlcpy: cc succeeded
strlcpy: yes

strptime: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-strptime test-strptime.c
strptime: cc succeeded
strptime: yes

strsep: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-strsep test-strsep.c
strsep: cc succeeded
strsep: yes

strtonum: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-strtonum test-strtonum.c
strtonum: cc succeeded
strtonum: yes

vasprintf: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-vasprintf test-vasprintf.c
vasprintf: cc succeeded
vasprintf: yes

fts-DFTS_COMPARE_CONST: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-fts test-fts.c -DFTS_COMPARE_CONST
fts-DFTS_COMPARE_CONST: cc succeeded
fts-DFTS_COMPARE_CONST: yes

UTF8_LOCALE: testing...
UTF8_LOCALE=en_US.UTF-8

wchar-DUTF8_LOCALE="en_US.UTF-8": testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-wchar test-wchar.c -DUTF8_LOCALE="en_US.UTF-8"
wchar-DUTF8_LOCALE="en_US.UTF-8": cc succeeded
*wchar-DUTF8_LOCALE="en_US.UTF-8": yes

nanosleep: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-nanosleep test-nanosleep.c
nanosleep: cc succeeded
nanosleep: yes

ohash: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-ohash test-ohash.c
./test-ohash.c:34:4: error: no member named 'calloc' in 'struct ohash_info'
i.calloc = xcalloc;
~ ^
./test-ohash.c:35:4: error: no member named 'free' in 'struct ohash_info'; did you mean 'hfree'?
i.free = xfree;
^~~~
hfree
/usr/include/ohash.h:32:9: note: 'hfree' declared here
void (*hfree)(void *, size_t, void *);
^
./test-ohash.c:35:9: error: incompatible pointer types assigning to 'void (*)(void *, size_t, void *)' from 'void (void *, void *)' [-Werror,-Wincompatible-pointer-types]
i.free = xfree;
^ ~~~~~
3 errors generated.
ohash: cc failed with 1

ohash-lutil: testing...
cc -g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -Wno-unused -Werror -o test-ohash test-ohash.c -lutil
./test-ohash.c:34:4: error: no member named 'calloc' in 'struct ohash_info'
i.calloc = xcalloc;
~ ^
./test-ohash.c:35:4: error: no member named 'free' in 'struct ohash_info'; did you mean 'hfree'?
i.free = xfree;
^~~~
hfree
/usr/include/ohash.h:32:9: note: 'hfree' declared here
void (*hfree)(void *, size_t, void *);
^
./test-ohash.c:35:9: error: incompatible pointer types assigning to 'void (*)(void *, size_t, void *)' from 'void (void *, void *)' [-Werror,-Wincompatible-pointer-types]
i.free = xfree;
^ ~~~~~
3 errors generated.
ohash-lutil: cc failed with 1

LDADD=" -lz"

config.h: written
Makefile.local: written
Empty file modified contrib/mandoc/configure
100755 → 100644
Empty file.
4 changes: 3 additions & 1 deletion contrib/mandoc/lib.in
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ LINE("libfsid", "Filesystem Identification Library (libfsid, \\-lfsid)")
LINE("libftpio", "FTP Connection Management Library (libftpio, \\-lftpio)")
LINE("libform", "Curses Form Library (libform, \\-lform)")
LINE("libgeom", "Userland API Library for Kernel GEOM subsystem (libgeom, \\-lgeom)")
LINE("libgmock", "GoogleMock library (libgmock, \\-lgmock)")
LINE("libgpio", "General-Purpose Input Output (GPIO) library (libgpio, \\-lgpio)")
LINE("libgtest", "GoogleTest library (libgtest, \\-lgtest)")
LINE("libhammer", "HAMMER Filesystem Userland Library (libhammer, \\-lhammer)")
LINE("libi386", "i386 Architecture Library (libi386, \\-li386)")
LINE("libintl", "Internationalized Message Handling Library (libintl, \\-lintl)")
Expand Down Expand Up @@ -116,7 +118,7 @@ LINE("libsaslc", "Simple Authentication and Security Layer client library (libsa
LINE("libsbuf", "Safe String Composition Library (libsbuf, \\-lsbuf)")
LINE("libsdp", "Bluetooth Service Discovery Protocol User Library (libsdp, \\-lsdp)")
LINE("libssp", "Buffer Overflow Protection Library (libssp, \\-lssp)")
LINE("libstand", "Standalone Applications Library (libstand, \\-lstand)")
LINE("libstdthreads", "C11 Threads Library (libstdthreads, \\-lstdthreads)")
LINE("libstdthreads", "C11 Threads Library (libstdthreads, \\-lstdthreads)")
LINE("libSystem", "System Library (libSystem, \\-lSystem)")
LINE("libsysdecode", "System Argument Decoding Library (libsysdecode, \\-lsysdecode)")
Expand Down
Loading

0 comments on commit 2dfa03d

Please sign in to comment.