From 317412502b900ddecdafdfa171da99271846478b Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 19 May 2003 00:13:38 +1000 Subject: - (djm) Big KNF on openbsd-compat/ --- openbsd-compat/bsd-misc.h | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'openbsd-compat/bsd-misc.h') diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h index 78d9ccdd4..00e508cfc 100644 --- a/openbsd-compat/bsd-misc.h +++ b/openbsd-compat/bsd-misc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2000 Damien Miller. All rights reserved. + * Copyright (c) 1999-2003 Damien Miller. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,42 +22,41 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: bsd-misc.h,v 1.7 2003/03/18 18:21:41 tim Exp $ */ +/* $Id: bsd-misc.h,v 1.8 2003/05/18 14:13:39 djm Exp $ */ #ifndef _BSD_MISC_H #define _BSD_MISC_H #include "config.h" -char *get_progname(char *argv0); +char *get_progname(char *); #ifndef HAVE_SETSID #define setsid() setpgrp(0, getpid()) #endif /* !HAVE_SETSID */ #ifndef HAVE_SETENV -int setenv(const char *name, const char *value, int overwrite); +int setenv(const char *, const char *, int); #endif /* !HAVE_SETENV */ #ifndef HAVE_SETLOGIN -int setlogin(const char *name); +int setlogin(const char *); #endif /* !HAVE_SETLOGIN */ #ifndef HAVE_INNETGR -int innetgr(const char *netgroup, const char *host, - const char *user, const char *domain); +int innetgr(const char *, const char *, const char *, const char *); #endif /* HAVE_INNETGR */ #if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) -int seteuid(uid_t euid); +int seteuid(uid_t); #endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ #if !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) -int setegid(uid_t egid); +int setegid(uid_t); #endif /* !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) */ #if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR) -const char *strerror(int e); +const char *strerror(int); #endif @@ -69,15 +68,15 @@ struct timeval { } #endif /* HAVE_STRUCT_TIMEVAL */ -int utimes(char *filename, struct timeval *tvp); +int utimes(char *, struct timeval *); #endif /* HAVE_UTIMES */ #ifndef HAVE_TRUNCATE -int truncate (const char *path, off_t length); +int truncate (const char *, off_t); #endif /* HAVE_TRUNCATE */ #if !defined(HAVE_SETGROUPS) && defined(SETGROUPS_NOOP) -int setgroups(size_t size, const gid_t *list); +int setgroups(size_t, const gid_t *); #endif #if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP) @@ -87,7 +86,7 @@ struct timespec { long tv_nsec; }; #endif -int nanosleep(const struct timespec *req, struct timespec *rem); +int nanosleep(const struct timespec *, struct timespec *); #endif #endif /* _BSD_MISC_H */ -- cgit v1.2.3 From 2e9c9cf702d8e90809d901ec51358406be6f810a Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sat, 2 Aug 2003 23:31:42 +1000 Subject: - (dtucker) [openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h] Add a tcgetpgrp function. --- ChangeLog | 4 +++- openbsd-compat/bsd-misc.c | 15 ++++++++++++++- openbsd-compat/bsd-misc.h | 6 +++++- 3 files changed, 22 insertions(+), 3 deletions(-) (limited to 'openbsd-compat/bsd-misc.h') diff --git a/ChangeLog b/ChangeLog index 5e60f6c87..884d1a636 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,8 @@ replace 4 clause BSD licensed progressmeter code with a replacement from Nils Nordman and myself; ok deraadt@ (copied from OpenBSD an re-applied portable changes) + - (dtucker) [openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h] + Add a tcgetpgrp function. 20030730 - (djm) [auth-pam.c] Don't use crappy APIs like sprintf. Thanks bal @@ -761,4 +763,4 @@ - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. Report from murple@murple.net, diagnosis from dtucker@zip.com.au -$Id: ChangeLog,v 1.2872 2003/08/02 13:28:38 dtucker Exp $ +$Id: ChangeLog,v 1.2873 2003/08/02 13:31:42 dtucker Exp $ diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index cdc63c24d..64de6945c 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -25,7 +25,7 @@ #include "includes.h" #include "xmalloc.h" -RCSID("$Id: bsd-misc.c,v 1.13 2003/05/18 14:13:39 djm Exp $"); +RCSID("$Id: bsd-misc.c,v 1.14 2003/08/02 13:31:42 dtucker Exp $"); /* * NB. duplicate __progname in case it is an alias for argv[0] @@ -167,3 +167,16 @@ int nanosleep(const struct timespec *req, struct timespec *rem) #endif +#ifndef HAVE_TCGETPGRP +pid_t +tcgetpgrp(int fd) +{ + int result, ctty_pgrp; + + if (ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) == -1) + return(-1); + else + return(ctty_pgrp); +} +#endif /* HAVE_TCGETPGRP */ + diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h index 00e508cfc..03a1f3af0 100644 --- a/openbsd-compat/bsd-misc.h +++ b/openbsd-compat/bsd-misc.h @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: bsd-misc.h,v 1.8 2003/05/18 14:13:39 djm Exp $ */ +/* $Id: bsd-misc.h,v 1.9 2003/08/02 13:31:42 dtucker Exp $ */ #ifndef _BSD_MISC_H #define _BSD_MISC_H @@ -89,4 +89,8 @@ struct timespec { int nanosleep(const struct timespec *, struct timespec *); #endif +#ifndef HAVE_TCGETPGRP +pid_t tcgetpgrp(int); +#endif /* HAVE_TCGETPGRP */ + #endif /* _BSD_MISC_H */ -- cgit v1.2.3 From f38ea77c03a5473ec43fe07ec24cfb1ca7f27034 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Wed, 13 Aug 2003 20:48:07 +1000 Subject: - (dtucker) [configure.ac openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h] Add a tcsendbreak function for platforms that don't have one, based on the one from OpenBSD. Any more of these and I'll split them out into bsd-termio.[ch]. --- ChangeLog | 5 ++++- configure.ac | 6 +++--- openbsd-compat/bsd-misc.c | 22 +++++++++++++++++++++- openbsd-compat/bsd-misc.h | 8 ++++++-- 4 files changed, 34 insertions(+), 7 deletions(-) (limited to 'openbsd-compat/bsd-misc.h') diff --git a/ChangeLog b/ChangeLog index 2140b20c8..47e97438b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,9 @@ - markus@cvs.openbsd.org 2003/08/13 09:07:10 [readconf.c ssh.c] socks4->socks, since with support both 4 and 5; dtucker@zip.com.au + - (dtucker) [configure.ac openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h] + Add a tcsendbreak function for platforms that don't have one, based on the + one from OpenBSD. 20030811 - (dtucker) OpenBSD CVS Sync @@ -831,4 +834,4 @@ - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. Report from murple@murple.net, diagnosis from dtucker@zip.com.au -$Id: ChangeLog,v 1.2892 2003/08/13 10:38:36 dtucker Exp $ +$Id: ChangeLog,v 1.2893 2003/08/13 10:48:07 dtucker Exp $ diff --git a/configure.ac b/configure.ac index 68fa5c1f2..9644dcaf2 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.138 2003/08/02 12:24:49 dtucker Exp $ +# $Id: configure.ac,v 1.139 2003/08/13 10:48:07 dtucker Exp $ AC_INIT AC_CONFIG_SRCDIR([ssh.c]) @@ -695,8 +695,8 @@ AC_CHECK_FUNCS(\ setdtablesize setegid setenv seteuid setgroups setlogin setpcred \ setproctitle setregid setresgid setresuid setreuid setrlimit \ setsid setvbuf sigaction sigvec snprintf socketpair strerror \ - strlcat strlcpy strmode strnvis sysconf tcgetpgrp truncate utimes \ - vhangup vsnprintf waitpid \ + strlcat strlcpy strmode strnvis sysconf tcgetpgrp tcsendbreak \ + truncate utimes vhangup vsnprintf waitpid \ ) AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP)) diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index da8f77046..d4c793724 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -25,7 +25,7 @@ #include "includes.h" #include "xmalloc.h" -RCSID("$Id: bsd-misc.c,v 1.16 2003/08/02 14:36:16 dtucker Exp $"); +RCSID("$Id: bsd-misc.c,v 1.17 2003/08/13 10:48:07 dtucker Exp $"); /* * NB. duplicate __progname in case it is an alias for argv[0] @@ -180,3 +180,23 @@ tcgetpgrp(int fd) } #endif /* HAVE_TCGETPGRP */ +#ifndef HAVE_TCSENDBREAK +int +tcsendbreak(int fd, int duration) +{ +# if defined(TIOCSBRK) && defined(TIOCCBRK) + struct timeval sleepytime; + + sleepytime.tv_sec = 0; + sleepytime.tv_usec = 400000; + if (ioctl(fd, TIOCSBRK, 0) == -1) + return (-1); + (void)select(0, 0, 0, 0, &sleepytime); + if (ioctl(fd, TIOCCBRK, 0) == -1) + return (-1); + return (0); +# else + return -1; +# endif +} +#endif /* HAVE_TCSENDBREAK */ diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h index 03a1f3af0..f2fbdc2e3 100644 --- a/openbsd-compat/bsd-misc.h +++ b/openbsd-compat/bsd-misc.h @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: bsd-misc.h,v 1.9 2003/08/02 13:31:42 dtucker Exp $ */ +/* $Id: bsd-misc.h,v 1.10 2003/08/13 10:48:07 dtucker Exp $ */ #ifndef _BSD_MISC_H #define _BSD_MISC_H @@ -91,6 +91,10 @@ int nanosleep(const struct timespec *, struct timespec *); #ifndef HAVE_TCGETPGRP pid_t tcgetpgrp(int); -#endif /* HAVE_TCGETPGRP */ +#endif + +#ifndef HAVE_TCSENDBREAK +int tcsendbreak(int, int); +#endif #endif /* _BSD_MISC_H */ -- cgit v1.2.3 From 59d3d5b8b4813bdd1d4518d6839bd392ff6d21f7 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 22 Aug 2003 09:34:41 +1000 Subject: - (djm) s/get_progname/ssh_get_progname/g to avoid conflict with Heimdal -lbroken; ok dtucker --- ChangeLog | 6 +++++- logintest.c | 4 ++-- openbsd-compat/bsd-misc.c | 4 ++-- openbsd-compat/bsd-misc.h | 4 ++-- scp.c | 2 +- sftp-server.c | 2 +- sftp.c | 2 +- ssh-add.c | 2 +- ssh-agent.c | 2 +- ssh-keygen.c | 2 +- ssh-keyscan.c | 2 +- ssh-rand-helper.c | 4 ++-- ssh.c | 2 +- sshd.c | 2 +- 14 files changed, 22 insertions(+), 18 deletions(-) (limited to 'openbsd-compat/bsd-misc.h') diff --git a/ChangeLog b/ChangeLog index 081b07907..ded30f05a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +20030822 + - (djm) s/get_progname/ssh_get_progname/g to avoid conflict with Heimdal + -lbroken; ok dtucker + 20030821 - (dtucker) OpenBSD CVS Sync - markus@cvs.openbsd.org 2003/08/14 16:08:58 @@ -845,4 +849,4 @@ - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. Report from murple@murple.net, diagnosis from dtucker@zip.com.au -$Id: ChangeLog,v 1.2896 2003/08/21 07:58:29 dtucker Exp $ +$Id: ChangeLog,v 1.2897 2003/08/21 23:34:41 djm Exp $ diff --git a/logintest.c b/logintest.c index a0c08118b..3f3997d10 100644 --- a/logintest.c +++ b/logintest.c @@ -43,7 +43,7 @@ #include "loginrec.h" -RCSID("$Id: logintest.c,v 1.9 2003/06/02 00:42:17 djm Exp $"); +RCSID("$Id: logintest.c,v 1.10 2003/08/21 23:34:41 djm Exp $"); #ifdef HAVE___PROGNAME extern char *__progname; @@ -287,7 +287,7 @@ main(int argc, char *argv[]) { printf("Platform-independent login recording test driver\n"); - __progname = get_progname(argv[0]); + __progname = ssh_get_progname(argv[0]); if (argc == 2) { if (strncmp(argv[1], "-i", 3) == 0) compile_opts_only = 1; diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index d4c793724..56cb45ade 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -25,13 +25,13 @@ #include "includes.h" #include "xmalloc.h" -RCSID("$Id: bsd-misc.c,v 1.17 2003/08/13 10:48:07 dtucker Exp $"); +RCSID("$Id: bsd-misc.c,v 1.18 2003/08/21 23:34:42 djm Exp $"); /* * NB. duplicate __progname in case it is an alias for argv[0] * Otherwise it may get clobbered by setproctitle() */ -char *get_progname(char *argv0) +char *ssh_get_progname(char *argv0) { #ifdef HAVE___PROGNAME extern char *__progname; diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h index f2fbdc2e3..2857de59b 100644 --- a/openbsd-compat/bsd-misc.h +++ b/openbsd-compat/bsd-misc.h @@ -22,14 +22,14 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: bsd-misc.h,v 1.10 2003/08/13 10:48:07 dtucker Exp $ */ +/* $Id: bsd-misc.h,v 1.11 2003/08/21 23:34:42 djm Exp $ */ #ifndef _BSD_MISC_H #define _BSD_MISC_H #include "config.h" -char *get_progname(char *); +char *ssh_get_progname(char *); #ifndef HAVE_SETSID #define setsid() setpgrp(0, getpid()) diff --git a/scp.c b/scp.c index cf979f250..4f9247c2d 100644 --- a/scp.c +++ b/scp.c @@ -222,7 +222,7 @@ main(int argc, char **argv) extern char *optarg; extern int optind; - __progname = get_progname(argv[0]); + __progname = ssh_get_progname(argv[0]); args.list = NULL; addargs(&args, "ssh"); /* overwritten with ssh_program */ diff --git a/sftp-server.c b/sftp-server.c index 250814d72..9166853ed 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -1030,7 +1030,7 @@ main(int ac, char **av) /* XXX should use getopt */ - __progname = get_progname(av[0]); + __progname = ssh_get_progname(av[0]); handle_init(); #ifdef DEBUG_SFTP_SERVER diff --git a/sftp.c b/sftp.c index 4354bfd44..c2a6593b8 100644 --- a/sftp.c +++ b/sftp.c @@ -132,7 +132,7 @@ main(int argc, char **argv) extern int optind; extern char *optarg; - __progname = get_progname(argv[0]); + __progname = ssh_get_progname(argv[0]); args.list = NULL; addargs(&args, "ssh"); /* overwritten with ssh_program */ addargs(&args, "-oForwardX11 no"); diff --git a/ssh-add.c b/ssh-add.c index 5b0fbbce6..2e394e5c1 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -319,7 +319,7 @@ main(int argc, char **argv) char *sc_reader_id = NULL; int i, ch, deleting = 0, ret = 0; - __progname = get_progname(argv[0]); + __progname = ssh_get_progname(argv[0]); init_rng(); seed_rng(); diff --git a/ssh-agent.c b/ssh-agent.c index 6c8ff30dd..c05c61468 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -1024,7 +1024,7 @@ main(int ac, char **av) SSLeay_add_all_algorithms(); - __progname = get_progname(av[0]); + __progname = ssh_get_progname(av[0]); init_rng(); seed_rng(); diff --git a/ssh-keygen.c b/ssh-keygen.c index 2ce5553f6..dbc514737 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -809,7 +809,7 @@ main(int ac, char **av) extern int optind; extern char *optarg; - __progname = get_progname(av[0]); + __progname = ssh_get_progname(av[0]); SSLeay_add_all_algorithms(); log_init(av[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1); diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 358a1e353..9fa8aaebc 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -697,7 +697,7 @@ main(int argc, char **argv) extern int optind; extern char *optarg; - __progname = get_progname(argv[0]); + __progname = ssh_get_progname(argv[0]); init_rng(); seed_rng(); TAILQ_INIT(&tq); diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c index 88e6e7c05..7e65e4569 100644 --- a/ssh-rand-helper.c +++ b/ssh-rand-helper.c @@ -39,7 +39,7 @@ #include "pathnames.h" #include "log.h" -RCSID("$Id: ssh-rand-helper.c,v 1.12 2003/07/06 05:20:46 dtucker Exp $"); +RCSID("$Id: ssh-rand-helper.c,v 1.13 2003/08/21 23:34:41 djm Exp $"); /* Number of bytes we write out */ #define OUTPUT_SEED_SIZE 48 @@ -769,7 +769,7 @@ main(int argc, char **argv) extern char *optarg; LogLevel ll; - __progname = get_progname(argv[0]); + __progname = ssh_get_progname(argv[0]); log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1); ll = SYSLOG_LEVEL_INFO; diff --git a/ssh.c b/ssh.c index 694bb5acc..46640a857 100644 --- a/ssh.c +++ b/ssh.c @@ -212,7 +212,7 @@ main(int ac, char **av) extern int optind, optreset; extern char *optarg; - __progname = get_progname(av[0]); + __progname = ssh_get_progname(av[0]); init_rng(); /* diff --git a/sshd.c b/sshd.c index dc275b0cb..0e1bde3a3 100644 --- a/sshd.c +++ b/sshd.c @@ -819,7 +819,7 @@ main(int ac, char **av) #ifdef HAVE_SECUREWARE (void)set_auth_parameters(ac, av); #endif - __progname = get_progname(av[0]); + __progname = ssh_get_progname(av[0]); init_rng(); /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */ -- cgit v1.2.3 From 5ade9abc37df3dacacbe20104877ca6dab61082a Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Mon, 25 Aug 2003 01:16:21 +0000 Subject: - (bal) redo how we handle 'mysignal()'. Move it to openbsd-compat/bsd-misc.c, s/mysignal/signal/ and #define signal to be our 'mysignal' by default. OK djm@ --- ChangeLog | 7 +++++-- entropy.c | 6 +++--- misc.c | 26 -------------------------- misc.h | 4 ---- openbsd-compat/bsd-misc.c | 28 +++++++++++++++++++++++++++- openbsd-compat/bsd-misc.h | 8 +++++++- progressmeter.c | 4 ++-- sshd.c | 4 ++-- sshpty.c | 12 ++++++------ 9 files changed, 52 insertions(+), 47 deletions(-) (limited to 'openbsd-compat/bsd-misc.h') diff --git a/ChangeLog b/ChangeLog index 956a5e3a8..6ea448a37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,10 @@ - (djm) Bug #621: Select OpenSC keys by usage attributes. Patch from larsch@trustcenter.de - (bal) openbsd-compat/ OpenBSD updates. Mostly licensing, ansifications - and minor fixes. + and minor fixes. OK djm@ + - (bal) redo how we handle 'mysignal()'. Move it to + openbsd-compat/bsd-misc.c, s/mysignal/signal/ and #define signal to + be our 'mysignal' by default. OK djm@ 20030822 - (djm) s/get_progname/ssh_get_progname/g to avoid conflict with Heimdal @@ -857,4 +860,4 @@ - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. Report from murple@murple.net, diagnosis from dtucker@zip.com.au -$Id: ChangeLog,v 1.2900 2003/08/25 01:10:51 mouring Exp $ +$Id: ChangeLog,v 1.2901 2003/08/25 01:16:21 mouring Exp $ diff --git a/entropy.c b/entropy.c index a16ea10b3..216879786 100644 --- a/entropy.c +++ b/entropy.c @@ -45,7 +45,7 @@ * XXX: we should tell the child how many bytes we need. */ -RCSID("$Id: entropy.c,v 1.45 2003/05/16 05:51:45 djm Exp $"); +RCSID("$Id: entropy.c,v 1.46 2003/08/25 01:16:21 mouring Exp $"); #ifndef OPENSSL_PRNG_ONLY #define RANDOM_SEED_SIZE 48 @@ -75,7 +75,7 @@ seed_rng(void) if (pipe(p) == -1) fatal("pipe: %s", strerror(errno)); - old_sigchld = mysignal(SIGCHLD, SIG_DFL); + old_sigchld = signal(SIGCHLD, SIG_DFL); if ((pid = fork()) == -1) fatal("Couldn't fork: %s", strerror(errno)); if (pid == 0) { @@ -116,7 +116,7 @@ seed_rng(void) if (waitpid(pid, &ret, 0) == -1) fatal("Couldn't wait for ssh-rand-helper completion: %s", strerror(errno)); - mysignal(SIGCHLD, old_sigchld); + signal(SIGCHLD, old_sigchld); /* We don't mind if the child exits upon a SIGPIPE */ if (!WIFEXITED(ret) && diff --git a/misc.c b/misc.c index ff1966192..c457a952c 100644 --- a/misc.c +++ b/misc.c @@ -323,29 +323,3 @@ addargs(arglist *args, char *fmt, ...) args->list[args->num++] = xstrdup(buf); args->list[args->num] = NULL; } - -mysig_t -mysignal(int sig, mysig_t act) -{ -#ifdef HAVE_SIGACTION - struct sigaction sa, osa; - - if (sigaction(sig, NULL, &osa) == -1) - return (mysig_t) -1; - if (osa.sa_handler != act) { - memset(&sa, 0, sizeof(sa)); - sigemptyset(&sa.sa_mask); - sa.sa_flags = 0; -#if defined(SA_INTERRUPT) - if (sig == SIGALRM) - sa.sa_flags |= SA_INTERRUPT; -#endif - sa.sa_handler = act; - if (sigaction(sig, &sa, NULL) == -1) - return (mysig_t) -1; - } - return (osa.sa_handler); -#else - return (signal(sig, act)); -#endif -} diff --git a/misc.h b/misc.h index 3b4b87967..6d2869b36 100644 --- a/misc.h +++ b/misc.h @@ -31,7 +31,3 @@ struct arglist { int nalloc; }; void addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3))); - -/* wrapper for signal interface */ -typedef void (*mysig_t)(int); -mysig_t mysignal(int sig, mysig_t act); diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index 56cb45ade..08b089bdc 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -25,7 +25,7 @@ #include "includes.h" #include "xmalloc.h" -RCSID("$Id: bsd-misc.c,v 1.18 2003/08/21 23:34:42 djm Exp $"); +RCSID("$Id: bsd-misc.c,v 1.19 2003/08/25 01:16:21 mouring Exp $"); /* * NB. duplicate __progname in case it is an alias for argv[0] @@ -200,3 +200,29 @@ tcsendbreak(int fd, int duration) # endif } #endif /* HAVE_TCSENDBREAK */ + +mysig_t +mysignal(int sig, mysig_t act) +{ +#ifdef HAVE_SIGACTION + struct sigaction sa, osa; + + if (sigaction(sig, NULL, &osa) == -1) + return (mysig_t) -1; + if (osa.sa_handler != act) { + memset(&sa, 0, sizeof(sa)); + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; +#ifdef SA_INTERRUPT + if (sig == SIGALRM) + sa.sa_flags |= SA_INTERRUPT; +#endif + sa.sa_handler = act; + if (sigaction(sig, &sa, NULL) == -1) + return (mysig_t) -1; + } + return (osa.sa_handler); +#else + return (signal(sig, act)); +#endif +} diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h index 2857de59b..0d6076ab0 100644 --- a/openbsd-compat/bsd-misc.h +++ b/openbsd-compat/bsd-misc.h @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: bsd-misc.h,v 1.11 2003/08/21 23:34:42 djm Exp $ */ +/* $Id: bsd-misc.h,v 1.12 2003/08/25 01:16:22 mouring Exp $ */ #ifndef _BSD_MISC_H #define _BSD_MISC_H @@ -97,4 +97,10 @@ pid_t tcgetpgrp(int); int tcsendbreak(int, int); #endif +/* wrapper for signal interface */ +typedef void (*mysig_t)(int); +mysig_t mysignal(int sig, mysig_t act); + +#define signal(a,b) mysignal(a,b) + #endif /* _BSD_MISC_H */ diff --git a/progressmeter.c b/progressmeter.c index 170d869f4..9fe8cfa41 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -212,7 +212,7 @@ update_progress_meter(int ignore) if (can_output()) refresh_progress_meter(); - mysignal(SIGALRM, update_progress_meter); + signal(SIGALRM, update_progress_meter); alarm(UPDATE_INTERVAL); errno = save_errno; } @@ -243,7 +243,7 @@ start_progress_meter(char *f, off_t filesize, off_t *stat) if (can_output()) refresh_progress_meter(); - mysignal(SIGALRM, update_progress_meter); + signal(SIGALRM, update_progress_meter); alarm(UPDATE_INTERVAL); } diff --git a/sshd.c b/sshd.c index 0e1bde3a3..8d04f6a74 100644 --- a/sshd.c +++ b/sshd.c @@ -1368,7 +1368,7 @@ main(int ac, char **av) if ((options.protocol & SSH_PROTO_1) && key_used == 0) { /* Schedule server key regeneration alarm. */ - mysignal(SIGALRM, key_regeneration_alarm); + signal(SIGALRM, key_regeneration_alarm); alarm(options.key_regeneration_time); key_used = 1; } @@ -1457,7 +1457,7 @@ main(int ac, char **av) * mode; it is just annoying to have the server exit just when you * are about to discover the bug. */ - mysignal(SIGALRM, grace_alarm_handler); + signal(SIGALRM, grace_alarm_handler); if (!debug_flag) alarm(options.login_grace_time); diff --git a/sshpty.c b/sshpty.c index 109fc96ac..4747ceaf4 100644 --- a/sshpty.c +++ b/sshpty.c @@ -101,12 +101,12 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) error("/dev/ptmx: %.100s", strerror(errno)); return 0; } - old_signal = mysignal(SIGCHLD, SIG_DFL); + old_signal = signal(SIGCHLD, SIG_DFL); if (grantpt(ptm) < 0) { error("grantpt: %.100s", strerror(errno)); return 0; } - mysignal(SIGCHLD, old_signal); + signal(SIGCHLD, old_signal); if (unlockpt(ptm) < 0) { error("unlockpt: %.100s", strerror(errno)); return 0; @@ -274,9 +274,9 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname) fd = open(ttyname, O_RDWR|O_NOCTTY); if (fd != -1) { - mysignal(SIGHUP, SIG_IGN); + signal(SIGHUP, SIG_IGN); ioctl(fd, TCVHUP, (char *)NULL); - mysignal(SIGHUP, SIG_DFL); + signal(SIGHUP, SIG_DFL); setpgid(0, 0); close(fd); } else { @@ -323,9 +323,9 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname) error("SETPGRP %s",strerror(errno)); #endif /* HAVE_NEWS4 */ #ifdef USE_VHANGUP - old = mysignal(SIGHUP, SIG_IGN); + old = signal(SIGHUP, SIG_IGN); vhangup(); - mysignal(SIGHUP, old); + signal(SIGHUP, old); #endif /* USE_VHANGUP */ fd = open(ttyname, O_RDWR); if (fd < 0) { -- cgit v1.2.3 From 515d0f9a1eeedcbd03bb78cf09a17d99e597b5a3 Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Fri, 29 Aug 2003 16:59:52 +0000 Subject: - (bal) openbsd-compat/ clean up. Considate headers, add in $Id$ on our files, and added missing license to header. --- ChangeLog | 6 +- auth-passwd.c | 1 - monitor_mm.c | 1 - openbsd-compat/base64.h | 46 ++++++++++++- openbsd-compat/basename.h | 12 ---- openbsd-compat/bindresvport.h | 12 ---- openbsd-compat/bsd-arc4random.h | 37 ---------- openbsd-compat/bsd-cray.h | 9 ++- openbsd-compat/bsd-getpeereid.h | 38 ----------- openbsd-compat/bsd-misc.h | 6 +- openbsd-compat/bsd-nextstep.h | 4 +- openbsd-compat/bsd-snprintf.h | 19 ------ openbsd-compat/bsd-waitpid.h | 4 +- openbsd-compat/daemon.h | 11 --- openbsd-compat/dirname.h | 5 -- openbsd-compat/fake-rfc2553.h | 4 +- openbsd-compat/getcwd.h | 12 ---- openbsd-compat/getgrouplist.h | 16 ----- openbsd-compat/getopt.h | 14 ---- openbsd-compat/getrrsetbyname.h | 2 +- openbsd-compat/inet_aton.h | 12 ---- openbsd-compat/inet_ntoa.h | 12 ---- openbsd-compat/inet_ntop.h | 13 ---- openbsd-compat/mktemp.h | 13 ---- openbsd-compat/openbsd-compat.h | 147 +++++++++++++++++++++++++++++++++------- openbsd-compat/port-aix.h | 3 +- openbsd-compat/port-irix.h | 2 + openbsd-compat/realpath.h | 13 ---- openbsd-compat/rresvport.h | 12 ---- openbsd-compat/setenv.h | 14 ---- openbsd-compat/setproctitle.h | 13 ---- openbsd-compat/strlcat.h | 12 ---- openbsd-compat/strlcpy.h | 12 ---- openbsd-compat/strmode.h | 7 -- openbsd-compat/strsep.h | 12 ---- openbsd-compat/vis.c | 2 +- openbsd-compat/vis.h | 2 +- openbsd-compat/xcrypt.h | 28 -------- openbsd-compat/xmmap.h | 27 -------- 39 files changed, 190 insertions(+), 425 deletions(-) delete mode 100644 openbsd-compat/basename.h delete mode 100644 openbsd-compat/bindresvport.h delete mode 100644 openbsd-compat/bsd-arc4random.h delete mode 100644 openbsd-compat/bsd-getpeereid.h delete mode 100644 openbsd-compat/bsd-snprintf.h delete mode 100644 openbsd-compat/daemon.h delete mode 100644 openbsd-compat/dirname.h delete mode 100644 openbsd-compat/getcwd.h delete mode 100644 openbsd-compat/getgrouplist.h delete mode 100644 openbsd-compat/getopt.h delete mode 100644 openbsd-compat/inet_aton.h delete mode 100644 openbsd-compat/inet_ntoa.h delete mode 100644 openbsd-compat/inet_ntop.h delete mode 100644 openbsd-compat/mktemp.h delete mode 100644 openbsd-compat/realpath.h delete mode 100644 openbsd-compat/rresvport.h delete mode 100644 openbsd-compat/setenv.h delete mode 100644 openbsd-compat/setproctitle.h delete mode 100644 openbsd-compat/strlcat.h delete mode 100644 openbsd-compat/strlcpy.h delete mode 100644 openbsd-compat/strmode.h delete mode 100644 openbsd-compat/strsep.h delete mode 100644 openbsd-compat/xcrypt.h delete mode 100644 openbsd-compat/xmmap.h (limited to 'openbsd-compat/bsd-misc.h') diff --git a/ChangeLog b/ChangeLog index fb33982c0..d916025e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +20030829 + - (bal) openbsd-compat/ clean up. Considate headers, add in $Id: ChangeLog,v 1.2918 2003/08/29 16:59:52 mouring Exp $ on our + files, and added missing license to header. + 20030826 - (djm) Bug #629: Mark ssh_config option "pamauthenticationviakbdint" as deprecated. Remove mention from README.privsep. Patch from @@ -908,4 +912,4 @@ - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. Report from murple@murple.net, diagnosis from dtucker@zip.com.au -$Id: ChangeLog,v 1.2917 2003/08/26 04:22:12 dtucker Exp $ +$Id: ChangeLog,v 1.2918 2003/08/29 16:59:52 mouring Exp $ diff --git a/auth-passwd.c b/auth-passwd.c index 780e92344..a5d23b6bf 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -42,7 +42,6 @@ RCSID("$OpenBSD: auth-passwd.c,v 1.28 2003/07/22 13:35:22 markus Exp $"); #include "log.h" #include "servconf.h" #include "auth.h" -#include "openbsd-compat/xcrypt.h" #ifdef WITH_AIXAUTHENTICATE # include "buffer.h" # include "canohost.h" diff --git a/monitor_mm.c b/monitor_mm.c index b4a6e40c9..e57c87cc2 100644 --- a/monitor_mm.c +++ b/monitor_mm.c @@ -30,7 +30,6 @@ RCSID("$OpenBSD: monitor_mm.c,v 1.8 2002/08/02 14:43:15 millert Exp $"); #include #endif -#include "openbsd-compat/xmmap.h" #include "ssh.h" #include "xmalloc.h" #include "log.h" diff --git a/openbsd-compat/base64.h b/openbsd-compat/base64.h index a25003016..732c6b3f8 100644 --- a/openbsd-compat/base64.h +++ b/openbsd-compat/base64.h @@ -1,9 +1,51 @@ -/* $Id: base64.h,v 1.5 2003/05/15 03:57:51 djm Exp $ */ +/* $Id: base64.h,v 1.6 2003/08/29 16:59:52 mouring Exp $ */ + +/* + * Copyright (c) 1996 by Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +/* + * Portions Copyright (c) 1995 by International Business Machines, Inc. + * + * International Business Machines, Inc. (hereinafter called IBM) grants + * permission under its copyrights to use, copy, modify, and distribute this + * Software with or without fee, provided that the above copyright notice and + * all paragraphs of this notice appear in all copies, and that the name of IBM + * not be used in connection with the marketing of any product incorporating + * the Software or modifications thereof, without specific, written prior + * permission. + * + * To the extent it has a right to do so, IBM grants an immunity from suit + * under its patents, if any, for the use, sale or manufacture of products to + * the extent that such products are used for performing Domain Name System + * dynamic updates in TCP/IP networks by means of the Software. No immunity is + * granted for any product per se or for any other function of any product. + * + * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, + * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ #ifndef _BSD_BASE64_H #define _BSD_BASE64_H -#include "config.h" +#include "includes.h" #ifndef HAVE___B64_NTOP # ifndef HAVE_B64_NTOP diff --git a/openbsd-compat/basename.h b/openbsd-compat/basename.h deleted file mode 100644 index a8bd6c17c..000000000 --- a/openbsd-compat/basename.h +++ /dev/null @@ -1,12 +0,0 @@ -/* $Id: basename.h,v 1.3 2003/02/25 03:32:16 djm Exp $ */ - -#ifndef _BASENAME_H -#define _BASENAME_H -#include "config.h" - -#if !defined(HAVE_BASENAME) - -char *basename(const char *path); - -#endif /* !defined(HAVE_BASENAME) */ -#endif /* _BASENAME_H */ diff --git a/openbsd-compat/bindresvport.h b/openbsd-compat/bindresvport.h deleted file mode 100644 index b42f46983..000000000 --- a/openbsd-compat/bindresvport.h +++ /dev/null @@ -1,12 +0,0 @@ -/* $Id: bindresvport.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ - -#ifndef _BSD_BINDRESVPORT_H -#define _BSD_BINDRESVPORT_H - -#include "config.h" - -#ifndef HAVE_BINDRESVPORT_SA -int bindresvport_sa(int sd, struct sockaddr *sa); -#endif /* !HAVE_BINDRESVPORT_SA */ - -#endif /* _BSD_BINDRESVPORT_H */ diff --git a/openbsd-compat/bsd-arc4random.h b/openbsd-compat/bsd-arc4random.h deleted file mode 100644 index 7af757b2d..000000000 --- a/openbsd-compat/bsd-arc4random.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 1999-2000 Damien Miller. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* $Id: bsd-arc4random.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ - -#ifndef _BSD_ARC4RANDOM_H -#define _BSD_ARC4RANDOM_H - -#include "config.h" - -#ifndef HAVE_ARC4RANDOM -unsigned int arc4random(void); -void arc4random_stir(void); -#endif /* !HAVE_ARC4RANDOM */ - -#endif /* _BSD_ARC4RANDOM_H */ diff --git a/openbsd-compat/bsd-cray.h b/openbsd-compat/bsd-cray.h index 433144f6f..a121ea152 100644 --- a/openbsd-compat/bsd-cray.h +++ b/openbsd-compat/bsd-cray.h @@ -1,8 +1,6 @@ -/* - * $Id: bsd-cray.h,v 1.9 2003/05/18 14:13:39 djm Exp $ - * - * bsd-cray.h - * +/* $Id: bsd-cray.h,v 1.10 2003/08/29 16:59:52 mouring Exp $ */ + +/* * Copyright (c) 2002, Cray Inc. (Wendy Palm ) * Significant portions provided by * Wayne Schroeder, SDSC @@ -34,6 +32,7 @@ * on UNICOS systems. * */ + #ifndef _BSD_CRAY_H #define _BSD_CRAY_H diff --git a/openbsd-compat/bsd-getpeereid.h b/openbsd-compat/bsd-getpeereid.h deleted file mode 100644 index 771e9cbf9..000000000 --- a/openbsd-compat/bsd-getpeereid.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2002-2003 Damien Miller. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* $Id: bsd-getpeereid.h,v 1.2 2003/05/18 14:13:39 djm Exp $ */ - -#ifndef _BSD_GETPEEREID_H -#define _BSD_GETPEEREID_H - -#include "config.h" - -#include /* For uid_t, gid_t */ - -#ifndef HAVE_GETPEEREID -int getpeereid(int , uid_t *, gid_t *); -#endif /* HAVE_GETPEEREID */ - -#endif /* _BSD_GETPEEREID_H */ diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h index 0d6076ab0..6b70473f3 100644 --- a/openbsd-compat/bsd-misc.h +++ b/openbsd-compat/bsd-misc.h @@ -1,3 +1,5 @@ +/* $Id: bsd-misc.h,v 1.13 2003/08/29 16:59:52 mouring Exp $ */ + /* * Copyright (c) 1999-2003 Damien Miller. All rights reserved. * @@ -22,12 +24,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: bsd-misc.h,v 1.12 2003/08/25 01:16:22 mouring Exp $ */ - #ifndef _BSD_MISC_H #define _BSD_MISC_H -#include "config.h" +#include "includes.h" char *ssh_get_progname(char *); diff --git a/openbsd-compat/bsd-nextstep.h b/openbsd-compat/bsd-nextstep.h index 057462710..ca5b4b54a 100644 --- a/openbsd-compat/bsd-nextstep.h +++ b/openbsd-compat/bsd-nextstep.h @@ -1,3 +1,5 @@ +/* $Id: bsd-nextstep.h,v 1.9 2003/08/29 16:59:52 mouring Exp $ */ + /* * Copyright (c) 2000,2001 Ben Lindstrom. All rights reserved. * @@ -23,8 +25,6 @@ * */ -/* $Id: bsd-nextstep.h,v 1.8 2003/06/01 03:23:57 mouring Exp $ */ - #ifndef _NEXT_POSIX_H #define _NEXT_POSIX_H diff --git a/openbsd-compat/bsd-snprintf.h b/openbsd-compat/bsd-snprintf.h deleted file mode 100644 index 95e4d136c..000000000 --- a/openbsd-compat/bsd-snprintf.h +++ /dev/null @@ -1,19 +0,0 @@ -/* $Id: bsd-snprintf.h,v 1.3 2003/05/18 14:13:39 djm Exp $ */ - -#ifndef _BSD_SNPRINTF_H -#define _BSD_SNPRINTF_H - -#include "config.h" - -#include /* For size_t */ - -#ifndef HAVE_SNPRINTF -int snprintf(char *, size_t, const char *, ...); -#endif /* !HAVE_SNPRINTF */ - -#ifndef HAVE_VSNPRINTF -int vsnprintf(char *, size_t, const char *, va_list); -#endif /* !HAVE_SNPRINTF */ - - -#endif /* _BSD_SNPRINTF_H */ diff --git a/openbsd-compat/bsd-waitpid.h b/openbsd-compat/bsd-waitpid.h index 00bfb9144..2d853db61 100644 --- a/openbsd-compat/bsd-waitpid.h +++ b/openbsd-compat/bsd-waitpid.h @@ -1,3 +1,5 @@ +/* $Id: bsd-waitpid.h,v 1.5 2003/08/29 16:59:52 mouring Exp $ */ + /* * Copyright (c) 2000 Ben Lindstrom. All rights reserved. * @@ -23,8 +25,6 @@ * */ -/* $Id: bsd-waitpid.h,v 1.4 2003/06/01 03:23:57 mouring Exp $ */ - #ifndef _BSD_WAITPID_H #define _BSD_WAITPID_H diff --git a/openbsd-compat/daemon.h b/openbsd-compat/daemon.h deleted file mode 100644 index 95a077359..000000000 --- a/openbsd-compat/daemon.h +++ /dev/null @@ -1,11 +0,0 @@ -/* $Id: daemon.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ - -#ifndef _BSD_DAEMON_H -#define _BSD_DAEMON_H - -#include "config.h" -#ifndef HAVE_DAEMON -int daemon(int nochdir, int noclose); -#endif /* !HAVE_DAEMON */ - -#endif /* _BSD_DAEMON_H */ diff --git a/openbsd-compat/dirname.h b/openbsd-compat/dirname.h deleted file mode 100644 index 1d61dd06c..000000000 --- a/openbsd-compat/dirname.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef HAVE_DIRNAME - -char *dirname(const char *path); - -#endif diff --git a/openbsd-compat/fake-rfc2553.h b/openbsd-compat/fake-rfc2553.h index 1a6c31e9c..b70b928f8 100644 --- a/openbsd-compat/fake-rfc2553.h +++ b/openbsd-compat/fake-rfc2553.h @@ -1,3 +1,5 @@ +/* $Id: fake-rfc2553.h,v 1.6 2003/08/29 16:59:52 mouring Exp $ */ + /* * Copyright (C) 2000-2003 Damien Miller. All rights reserved. * Copyright (C) 1999 WIDE Project. All rights reserved. @@ -35,8 +37,6 @@ * that ai_family is AF_INET. Don't use it for another purpose. */ -/* $Id: fake-rfc2553.h,v 1.5 2003/08/08 02:15:12 dtucker Exp $ */ - #ifndef _FAKE_RFC2553_H #define _FAKE_RFC2553_H diff --git a/openbsd-compat/getcwd.h b/openbsd-compat/getcwd.h deleted file mode 100644 index 1137b3ed5..000000000 --- a/openbsd-compat/getcwd.h +++ /dev/null @@ -1,12 +0,0 @@ -/* $Id: getcwd.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ - -#ifndef _BSD_GETCWD_H -#define _BSD_GETCWD_H -#include "config.h" - -#if !defined(HAVE_GETCWD) - -char *getcwd(char *pt, size_t size); - -#endif /* !defined(HAVE_GETCWD) */ -#endif /* _BSD_GETCWD_H */ diff --git a/openbsd-compat/getgrouplist.h b/openbsd-compat/getgrouplist.h deleted file mode 100644 index 27a9703f2..000000000 --- a/openbsd-compat/getgrouplist.h +++ /dev/null @@ -1,16 +0,0 @@ -/* $Id: getgrouplist.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ - -#ifndef _BSD_GETGROUPLIST_H -#define _BSD_GETGROUPLIST_H - -#include "config.h" - -#ifndef HAVE_GETGROUPLIST - -#include - -int getgrouplist(const char *, gid_t, gid_t *, int *); - -#endif - -#endif diff --git a/openbsd-compat/getopt.h b/openbsd-compat/getopt.h deleted file mode 100644 index 9abdae8e9..000000000 --- a/openbsd-compat/getopt.h +++ /dev/null @@ -1,14 +0,0 @@ -/* $Id: getopt.h,v 1.4 2001/09/18 05:05:21 djm Exp $ */ - -#ifndef _BSDGETOPT_H -#define _BSDGETOPT_H - -#include "config.h" - -#if !defined(HAVE_GETOPT) || !defined(HAVE_GETOPT_OPTRESET) - -int BSDgetopt(int argc, char * const *argv, const char *opts); - -#endif - -#endif /* _BSDGETOPT_H */ diff --git a/openbsd-compat/getrrsetbyname.h b/openbsd-compat/getrrsetbyname.h index 9edaf0ae2..6466a54d6 100644 --- a/openbsd-compat/getrrsetbyname.h +++ b/openbsd-compat/getrrsetbyname.h @@ -46,7 +46,7 @@ #ifndef _GETRRSETBYNAME_H #define _GETRRSETBYNAME_H -#include "config.h" +#include "includes.h" #if defined(DNS) && !defined(HAVE_GETRRSETBYNAME) diff --git a/openbsd-compat/inet_aton.h b/openbsd-compat/inet_aton.h deleted file mode 100644 index 9b59cb908..000000000 --- a/openbsd-compat/inet_aton.h +++ /dev/null @@ -1,12 +0,0 @@ -/* $Id: inet_aton.h,v 1.4 2001/07/16 02:07:51 tim Exp $ */ - -#ifndef _BSD_INET_ATON_H -#define _BSD_INET_ATON_H - -#include "config.h" - -#ifndef HAVE_INET_ATON -int inet_aton(const char *cp, struct in_addr *addr); -#endif /* HAVE_INET_ATON */ - -#endif /* _BSD_INET_ATON_H */ diff --git a/openbsd-compat/inet_ntoa.h b/openbsd-compat/inet_ntoa.h deleted file mode 100644 index 85bc3d6fe..000000000 --- a/openbsd-compat/inet_ntoa.h +++ /dev/null @@ -1,12 +0,0 @@ -/* $Id: inet_ntoa.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ - -#ifndef _BSD_INET_NTOA_H -#define _BSD_INET_NTOA_H - -#include "config.h" - -#if defined(BROKEN_INET_NTOA) || !defined(HAVE_INET_NTOA) -char *inet_ntoa(struct in_addr in); -#endif /* defined(BROKEN_INET_NTOA) || !defined(HAVE_INET_NTOA) */ - -#endif /* _BSD_INET_NTOA_H */ diff --git a/openbsd-compat/inet_ntop.h b/openbsd-compat/inet_ntop.h deleted file mode 100644 index c774df95c..000000000 --- a/openbsd-compat/inet_ntop.h +++ /dev/null @@ -1,13 +0,0 @@ -/* $Id: inet_ntop.h,v 1.4 2001/08/09 00:56:53 mouring Exp $ */ - -#ifndef _BSD_INET_NTOP_H -#define _BSD_INET_NTOP_H - -#include "config.h" - -#ifndef HAVE_INET_NTOP -const char * -inet_ntop(int af, const void *src, char *dst, size_t size); -#endif /* !HAVE_INET_NTOP */ - -#endif /* _BSD_INET_NTOP_H */ diff --git a/openbsd-compat/mktemp.h b/openbsd-compat/mktemp.h deleted file mode 100644 index 505ca6a1f..000000000 --- a/openbsd-compat/mktemp.h +++ /dev/null @@ -1,13 +0,0 @@ -/* $Id: mktemp.h,v 1.3 2003/01/07 04:18:33 djm Exp $ */ - -#ifndef _BSD_MKTEMP_H -#define _BSD_MKTEMP_H - -#include "config.h" -#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) -int mkstemps(char *path, int slen); -int mkstemp(char *path); -char *mkdtemp(char *path); -#endif /* !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) */ - -#endif /* _BSD_MKTEMP_H */ diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h index 76862cc8a..852948c54 100644 --- a/openbsd-compat/openbsd-compat.h +++ b/openbsd-compat/openbsd-compat.h @@ -1,5 +1,9 @@ +/* $Id: openbsd-compat.h,v 1.24 2003/08/29 16:59:52 mouring Exp $ */ + /* * Copyright (c) 1999-2003 Damien Miller. All rights reserved. + * Copyright (c) 2003 Ben Lindstrom. All rights reserved. + * Copyright (c) 2002 Tim Rice. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,45 +26,136 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: openbsd-compat.h,v 1.23 2003/06/11 12:51:32 djm Exp $ */ - -#ifndef _OPENBSD_H -#define _OPENBSD_H +#ifndef _OPENBSD_COMPAT_H +#define _OPENBSD_COMPAT_H -#include "config.h" +#include "includes.h" /* OpenBSD function replacements */ -#include "basename.h" -#include "bindresvport.h" -#include "getcwd.h" -#include "realpath.h" -#include "rresvport.h" -#include "strlcpy.h" -#include "strlcat.h" -#include "strmode.h" -#include "mktemp.h" -#include "daemon.h" -#include "dirname.h" #include "base64.h" #include "sigact.h" -#include "inet_ntoa.h" -#include "inet_ntop.h" -#include "strsep.h" -#include "setproctitle.h" -#include "getgrouplist.h" #include "glob.h" #include "readpassphrase.h" -#include "getopt.h" #include "vis.h" #include "getrrsetbyname.h" + +#ifndef HAVE_BASENAME +char *basename(const char *path); +#endif + +#ifndef HAVE_BINDRESVPORT_SA +int bindresvport_sa(int sd, struct sockaddr *sa); +#endif + +#ifndef HAVE_GETCWD +char *getcwd(char *pt, size_t size); +#endif + +#if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH) +char *realpath(const char *path, char *resolved); +#endif + +#ifndef HAVE_RRESVPORT_AF +int rresvport_af(int *alport, sa_family_t af); +#endif + +#ifndef HAVE_STRLCPY +/* #include XXX Still needed? */ +size_t strlcpy(char *dst, const char *src, size_t siz); +#endif + +#ifndef HAVE_STRLCAT +/* #include XXX Still needed? */ +size_t strlcat(char *dst, const char *src, size_t siz); +#endif + +#ifndef HAVE_SETENV +int setenv(register const char *name, register const char *value, int rewrite); +#endif + +#ifndef HAVE_STRMODE +void strmode(int mode, char *p); +#endif + +#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) +int mkstemps(char *path, int slen); +int mkstemp(char *path); +char *mkdtemp(char *path); +#endif + +#ifndef HAVE_DAEMON +int daemon(int nochdir, int noclose); +#endif + +#ifndef HAVE_DIRNAME +char *dirname(const char *path); +#endif + +#if defined(BROKEN_INET_NTOA) || !defined(HAVE_INET_NTOA) +char *inet_ntoa(struct in_addr in); +#endif + +#ifndef HAVE_INET_NTOP +const char *inet_ntop(int af, const void *src, char *dst, size_t size); +#endif + +#ifndef HAVE_INET_ATON +int inet_aton(const char *cp, struct in_addr *addr); +#endif + +#ifndef HAVE_STRSEP +char *strsep(char **stringp, const char *delim); +#endif + +#ifndef HAVE_SETPROCTITLE +void setproctitle(const char *fmt, ...); +void compat_init_setproctitle(int argc, char *argv[]); +#endif + +#ifndef HAVE_GETGROUPLIST +/* #include XXXX Still needed ? */ +int getgrouplist(const char *, gid_t, gid_t *, int *); +#endif + +#if !defined(HAVE_GETOPT) || !defined(HAVE_GETOPT_OPTRESET) +int BSDgetopt(int argc, char * const *argv, const char *opts); +#endif + + /* Home grown routines */ -#include "bsd-arc4random.h" -#include "bsd-getpeereid.h" #include "bsd-misc.h" -#include "bsd-snprintf.h" #include "bsd-waitpid.h" +/*#include XXX Still needed? * For uid_t, gid_t * */ + +#ifndef HAVE_GETPEEREID +int getpeereid(int , uid_t *, gid_t *); +#endif + +#ifndef HAVE_ARC4RANDOM +unsigned int arc4random(void); +void arc4random_stir(void); +#endif /* !HAVE_ARC4RANDOM */ + + + + +/* #include XXX needed? For size_t */ + +#ifndef HAVE_SNPRINTF +int snprintf(char *, size_t, const char *, ...); +#endif + +#ifndef HAVE_VSNPRINTF +int vsnprintf(char *, size_t, const char *, va_list); +#endif + +void *xmmap(size_t size); +char *xcrypt(const char *password, const char *salt); +char *shadow_pw(struct passwd *pw); + + /* rfc2553 socket API replacements */ #include "fake-rfc2553.h" @@ -70,4 +165,4 @@ #include "port-irix.h" #include "port-aix.h" -#endif /* _OPENBSD_H */ +#endif /* _OPENBSD_COMPAT_H */ diff --git a/openbsd-compat/port-aix.h b/openbsd-compat/port-aix.h index 16863ec6d..09e7f9e97 100644 --- a/openbsd-compat/port-aix.h +++ b/openbsd-compat/port-aix.h @@ -1,3 +1,5 @@ +/* $Id: port-aix.h,v 1.14 2003/08/29 16:59:52 mouring Exp $ */ + /* * * Copyright (c) 2001 Gert Doering. All rights reserved. @@ -21,7 +23,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * */ #ifdef _AIX diff --git a/openbsd-compat/port-irix.h b/openbsd-compat/port-irix.h index bc8cc44ac..67c486307 100644 --- a/openbsd-compat/port-irix.h +++ b/openbsd-compat/port-irix.h @@ -1,3 +1,5 @@ +/* $Id: port-irix.h,v 1.4 2003/08/29 16:59:52 mouring Exp $ */ + /* * Copyright (c) 2000 Denis Parker. All rights reserved. * Copyright (c) 2000 Michael Stone. All rights reserved. diff --git a/openbsd-compat/realpath.h b/openbsd-compat/realpath.h deleted file mode 100644 index 25e4075d7..000000000 --- a/openbsd-compat/realpath.h +++ /dev/null @@ -1,13 +0,0 @@ -/* $Id: realpath.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ - -#ifndef _BSD_REALPATH_H -#define _BSD_REALPATH_H - -#include "config.h" - -#if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH) - -char *realpath(const char *path, char *resolved); - -#endif /* !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH) */ -#endif /* _BSD_REALPATH_H */ diff --git a/openbsd-compat/rresvport.h b/openbsd-compat/rresvport.h deleted file mode 100644 index a52e4515b..000000000 --- a/openbsd-compat/rresvport.h +++ /dev/null @@ -1,12 +0,0 @@ -/* $Id: rresvport.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ - -#ifndef _BSD_RRESVPORT_H -#define _BSD_RRESVPORT_H - -#include "config.h" - -#ifndef HAVE_RRESVPORT_AF -int rresvport_af(int *alport, sa_family_t af); -#endif /* !HAVE_RRESVPORT_AF */ - -#endif /* _BSD_RRESVPORT_H */ diff --git a/openbsd-compat/setenv.h b/openbsd-compat/setenv.h deleted file mode 100644 index 77256d802..000000000 --- a/openbsd-compat/setenv.h +++ /dev/null @@ -1,14 +0,0 @@ -/* $Id: setenv.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ - -#ifndef _BSD_SETENV_H -#define _BSD_SETENV_H - -#include "config.h" - -#ifndef HAVE_SETENV - -int setenv(register const char *name, register const char *value, int rewrite); - -#endif /* !HAVE_SETENV */ - -#endif /* _BSD_SETENV_H */ diff --git a/openbsd-compat/setproctitle.h b/openbsd-compat/setproctitle.h deleted file mode 100644 index 48d26c6ea..000000000 --- a/openbsd-compat/setproctitle.h +++ /dev/null @@ -1,13 +0,0 @@ -/* $Id: setproctitle.h,v 1.3 2003/01/09 22:53:13 djm Exp $ */ - -#ifndef _BSD_SETPROCTITLE_H -#define _BSD_SETPROCTITLE_H - -#include "config.h" - -#ifndef HAVE_SETPROCTITLE -void setproctitle(const char *fmt, ...); -void compat_init_setproctitle(int argc, char *argv[]); -#endif - -#endif /* _BSD_SETPROCTITLE_H */ diff --git a/openbsd-compat/strlcat.h b/openbsd-compat/strlcat.h deleted file mode 100644 index 753668563..000000000 --- a/openbsd-compat/strlcat.h +++ /dev/null @@ -1,12 +0,0 @@ -/* $Id: strlcat.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ - -#ifndef _BSD_STRLCAT_H -#define _BSD_STRLCAT_H - -#include "config.h" -#ifndef HAVE_STRLCAT -#include -size_t strlcat(char *dst, const char *src, size_t siz); -#endif /* !HAVE_STRLCAT */ - -#endif /* _BSD_STRLCAT_H */ diff --git a/openbsd-compat/strlcpy.h b/openbsd-compat/strlcpy.h deleted file mode 100644 index 3b137670d..000000000 --- a/openbsd-compat/strlcpy.h +++ /dev/null @@ -1,12 +0,0 @@ -/* $Id: strlcpy.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ - -#ifndef _BSD_STRLCPY_H -#define _BSD_STRLCPY_H - -#include "config.h" -#ifndef HAVE_STRLCPY -#include -size_t strlcpy(char *dst, const char *src, size_t siz); -#endif /* !HAVE_STRLCPY */ - -#endif /* _BSD_STRLCPY_H */ diff --git a/openbsd-compat/strmode.h b/openbsd-compat/strmode.h deleted file mode 100644 index 236ecf2f4..000000000 --- a/openbsd-compat/strmode.h +++ /dev/null @@ -1,7 +0,0 @@ -/* $Id: strmode.h,v 1.4 2003/08/25 01:10:52 mouring Exp $ */ - -#ifndef HAVE_STRMODE - -void strmode(int mode, char *p); - -#endif diff --git a/openbsd-compat/strsep.h b/openbsd-compat/strsep.h deleted file mode 100644 index 6ed810ac1..000000000 --- a/openbsd-compat/strsep.h +++ /dev/null @@ -1,12 +0,0 @@ -/* $Id: strsep.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ - -#ifndef _BSD_STRSEP_H -#define _BSD_STRSEP_H - -#include "config.h" - -#ifndef HAVE_STRSEP -char *strsep(char **stringp, const char *delim); -#endif /* HAVE_STRSEP */ - -#endif /* _BSD_STRSEP_H */ diff --git a/openbsd-compat/vis.c b/openbsd-compat/vis.c index b8dd20226..e6a2ce98d 100644 --- a/openbsd-compat/vis.c +++ b/openbsd-compat/vis.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -#include "config.h" +#include "includes.h" #if !defined(HAVE_STRNVIS) #if defined(LIBC_SCCS) && !defined(lint) diff --git a/openbsd-compat/vis.h b/openbsd-compat/vis.h index 9a3365317..1c131cc85 100644 --- a/openbsd-compat/vis.h +++ b/openbsd-compat/vis.h @@ -32,7 +32,7 @@ * @(#)vis.h 5.9 (Berkeley) 4/3/91 */ -#include "config.h" +#include "includes.h" #if !defined(HAVE_STRNVIS) #ifndef _VIS_H_ diff --git a/openbsd-compat/xcrypt.h b/openbsd-compat/xcrypt.h deleted file mode 100644 index 16c55fc67..000000000 --- a/openbsd-compat/xcrypt.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2003 Ben Lindstrom. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "includes.h" - -char *xcrypt(const char *password, const char *salt); -char *shadow_pw(struct passwd *pw); diff --git a/openbsd-compat/xmmap.h b/openbsd-compat/xmmap.h deleted file mode 100644 index cae884060..000000000 --- a/openbsd-compat/xmmap.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2002 Tim Rice. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* $Id: xmmap.h,v 1.2 2003/06/02 02:25:27 tim Exp $ */ - -void *xmmap(size_t size); -- cgit v1.2.3