aboutsummaryrefslogtreecommitdiffstats
path: root/openbsd-compat
diff options
context:
space:
mode:
authorGilles Chehade <gilles@poolp.org>2019-11-17 13:37:02 +0100
committerGilles Chehade <gilles@poolp.org>2019-11-17 13:37:02 +0100
commite2d2eb9c17f71315ecb601c1a30d8a889d2e0f96 (patch)
tree68c5003a710b90394df4e901e4599e3c1066ef2b /openbsd-compat
parenttruncate() is not used in the project (diff)
downloadOpenSMTPD-e2d2eb9c17f71315ecb601c1a30d8a889d2e0f96.tar.xz
OpenSMTPD-e2d2eb9c17f71315ecb601c1a30d8a889d2e0f96.zip
remove unused functions unsetenv(), tcsendbreak(), tcgetpgrp(),
setlinebuf()
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/bsd-misc.c34
-rw-r--r--openbsd-compat/bsd-misc.h16
2 files changed, 0 insertions, 50 deletions
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c
index b17393c1..0a2e33ea 100644
--- a/openbsd-compat/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
@@ -134,40 +134,6 @@ int usleep(unsigned int useconds)
}
#endif
-#ifndef HAVE_TCGETPGRP
-pid_t
-tcgetpgrp(int fd)
-{
- int ctty_pgrp;
-
- if (ioctl(fd, TIOCGPGRP, &ctty_pgrp) == -1)
- return(-1);
- else
- return(ctty_pgrp);
-}
-#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 */
-
mysig_t
mysignal(int sig, mysig_t act)
{
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h
index 31d0d7c3..c040a2b3 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -43,10 +43,6 @@ int setegid(uid_t);
const char *strerror(int);
#endif
-#if !defined(HAVE_SETLINEBUF)
-#define setlinebuf(a) (setvbuf((a), NULL, _IOLBF, 0))
-#endif
-
#ifndef HAVE_STRUCT_TIMEVAL
struct timeval {
long tv_sec;
@@ -68,18 +64,6 @@ int nanosleep(const struct timespec *, struct timespec *);
int usleep(unsigned int useconds);
#endif
-#ifndef HAVE_TCGETPGRP
-pid_t tcgetpgrp(int);
-#endif
-
-#ifndef HAVE_TCSENDBREAK
-int tcsendbreak(int, int);
-#endif
-
-#ifndef HAVE_UNSETENV
-int unsetenv(const char *);
-#endif
-
/* wrapper for signal interface */
typedef void (*mysig_t)(int);
mysig_t mysignal(int sig, mysig_t act);