Blame include/aide.h

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