/* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
#include "config.h"
/* Linux needs the _XOPEN_SOURCE define, but others don't. It needs to be
#ifdef PREAD_WRAPPERS
#endif
#define IN_COMPAT_C
#include "lib.h"
#include <stdio.h>
#include <ctype.h>
#include <unistd.h>
#include <syslog.h>
#include <time.h>
#ifndef INADDR_NONE
#endif
#if !defined (HAVE_STRCASECMP) && !defined (HAVE_STRICMP)
{
}
}
{
}
}
#endif
#ifndef HAVE_INET_ATON
{
if (addr == INADDR_NONE)
return 0;
return 1;
}
#endif
#ifndef HAVE_VSYSLOG
{
T_BEGIN {
} T_END;
}
#endif
#ifndef HAVE_GETPAGESIZE
int i_my_getpagesize(void)
{
#ifdef _SC_PAGESIZE
return sysconf(_SC_PAGESIZE);
#else
# ifdef __GNUC__
# endif
return 4096;
#endif
}
#endif
#ifndef HAVE_WRITEV
{
int i;
written = 0;
if (ret < 0)
return -1;
break;
}
if (written > SSIZE_T_MAX) {
return -1;
}
}
#endif
#if !defined(HAVE_PREAD) || defined(PREAD_BROKEN)
{
if (old_offset == -1)
return -1;
return -1;
if (ret < 0)
return -1;
return -1;
return ret;
}
{
if (old_offset == -1)
return -1;
return -1;
if (ret < 0)
return -1;
return -1;
return ret;
}
#elif defined(PREAD_WRAPPERS)
{
return ret;
}
{
}
#endif
#ifndef HAVE_SETEUID
{
#ifdef HAVE_SETREUID
/* HP-UX at least doesn't have seteuid() but has setreuid() */
#else
#endif
}
#endif
#ifndef HAVE_SETEGID
{
#ifdef HAVE_SETRESGID
/* HP-UX at least doesn't have setegid() but has setresgid() */
#else
#endif
}
#endif
#ifndef HAVE_LIBGEN_H
{
char *p;
/* note that this isn't POSIX-compliant basename() replacement.
too much trouble without any gain. */
}
#endif
#ifdef HAVE_OLD_VSNPRINTF
{
char *tmp;
int ret;
/* On overflow HP-UX returns -1, IRIX and Tru64 return size-1. */
return ret;
/* see if data stack has enough available space for it */
if (size > 0) {
}
return ret;
}
} else {
}
/* try to allocate enough memory to get it to fit. */
do {
if (size > 0) {
}
return ret;
}
i_panic("my_vsnprintf(): Output string too big");
}
#endif
#ifndef HAVE_CLOCK_GETTIME
{
/* fallback to using microseconds */
return -1;
return 0;
}
#endif