Blame include/aide.h

Packit 762fc5
/* aide, Advanced Intrusion Detection Environment
Packit 762fc5
 *
Packit 762fc5
 * Copyright (C) 1999-2002,2004-2006,2010,2011 Rami Lehti, Pablo
Packit 762fc5
 * Virolainen, Richard van den Berg, Hannes von Haugwitz
Packit 762fc5
 * $Header$
Packit 762fc5
 *
Packit 762fc5
 * This program is free software; you can redistribute it and/or
Packit 762fc5
 * modify it under the terms of the GNU General Public License as
Packit 762fc5
 * published by the Free Software Foundation; either version 2 of the
Packit 762fc5
 * License, or (at your option) any later version.
Packit 762fc5
 *
Packit 762fc5
 * This program is distributed in the hope that it will be useful, but
Packit 762fc5
 * WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 762fc5
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Packit 762fc5
 * General Public License for more details.
Packit 762fc5
 *
Packit 762fc5
 * You should have received a copy of the GNU General Public License
Packit 762fc5
 * along with this program; if not, write to the Free Software
Packit 762fc5
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Packit 762fc5
 */
Packit 762fc5
#ifndef _AIDE_H_INCLUDED
Packit 762fc5
#define _AIDE_H_INCLUDED
Packit 762fc5
Packit 762fc5
#include "config.h"
Packit 762fc5
#include "types.h"
Packit 762fc5
#include "db_config.h"
Packit 762fc5
#include <stdlib.h>
Packit 762fc5
#include <unistd.h>
Packit 762fc5
#if HAVE_INTTYPES_H
Packit 762fc5
# include <inttypes.h>
Packit 762fc5
#endif
Packit 762fc5
#if HAVE_FCNTL_H
Packit 762fc5
# include <fcntl.h>
Packit 762fc5
#endif
Packit 762fc5
#include "report.h"
Packit 762fc5
Packit 762fc5
#ifndef TEMP_FAILURE_RETRY
Packit 762fc5
/* Evaluate EXPRESSION, and repeat as long as it returns -1 with errno'
Packit 762fc5
   set to EINTR.  */
Packit 762fc5
Packit 762fc5
# define TEMP_FAILURE_RETRY(expression) \
Packit 762fc5
   (__extension__                                                              \
Packit 762fc5
     ({ long int __result;                                                     \
Packit 762fc5
        do __result = (long int) (expression);                                 \
Packit 762fc5
        while (__result == -1L && errno == EINTR);                             \
Packit 762fc5
        __result; }))
Packit 762fc5
#endif
Packit 762fc5
Packit 762fc5
#if !defined HAVE_VSNPRINTF || !defined HAVE_C99_VSNPRINTF
Packit 762fc5
#define vsnprintf rsync_vsnprintf
Packit 762fc5
int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
Packit 762fc5
#endif
Packit 762fc5
Packit 762fc5
#if !defined HAVE_SNPRINTF || !defined HAVE_C99_VSNPRINTF
Packit 762fc5
#define snprintf rsync_snprintf
Packit 762fc5
int snprintf(char *str,size_t count,const char *fmt,...);
Packit 762fc5
#endif
Packit 762fc5
Packit 762fc5
#ifndef O_NOATIME
Packit 762fc5
#if defined(__linux__) && (defined(__i386__) || defined(__PPC__))
Packit 762fc5
#define O_NOATIME 01000000
Packit 762fc5
#else
Packit 762fc5
#define O_NOATIME 0
Packit 762fc5
#endif
Packit 762fc5
#endif
Packit 762fc5
Packit 762fc5
#ifdef strtoimax
Packit 762fc5
# define HAVE_STRTOIMAX
Packit 762fc5
#endif
Packit 762fc5
Packit 762fc5
#if defined HAVE_OFF64_TYPE && SIZEOF_OFF64_T == SIZEOF_LONG_LONG || !defined HAVE_OFF64_TYPE && SIZEOF_OFF_T == SIZEOF_LONG_LONG
Packit 762fc5
# ifdef HAVE_STRTOLL
Packit 762fc5
#  define AIDE_STRTOLL_FUNC strtoll
Packit 762fc5
# else
Packit 762fc5
#  ifdef HAVE_STRTOIMAX
Packit 762fc5
#   define AIDE_STRTOLL_FUNC strtoimax
Packit 762fc5
#  else
Packit 762fc5
#   define AIDE_STRTOLL_FUNC strtol
Packit 762fc5
#  endif
Packit 762fc5
# endif
Packit 762fc5
#else
Packit 762fc5
# define AIDE_STRTOLL_FUNC strtol
Packit 762fc5
#endif
Packit 762fc5
Packit 762fc5
#ifndef __NetBSD__
Packit 762fc5
#ifndef _POSIX_C_SOURCE
Packit 762fc5
/* For _POSIX_THREAD_SEMANTICS _REENTRANT */
Packit 762fc5
#define _POSIX_C_SOURCE 199506L
Packit 762fc5
#endif /* _POSIX_C_SOURCE */
Packit 762fc5
#endif /* __NetBSD__ */
Packit 762fc5
Packit 762fc5
Packit 762fc5
#define ARGUMENT_SIZE 65536
Packit 762fc5
Packit 762fc5
/* This is a structure that has all configuration info */
Packit 762fc5
extern db_config* conf;
Packit 762fc5
Packit 762fc5
#endif
Packit 762fc5