#include "config.h"
#endif
-#include <sys/types.h>
-
-#include <sys/stat.h>
-#include <stdio.h>
-
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#endif
#endif
-#ifdef HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-
#if !defined(HAVE_STPCPY)
char * stpcpy(char * dest, const char * src);
#endif
char * stpncpy(char * dest, const char * src, size_t n);
#endif
-#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
-#if HAVE___SECURE_GETENV
+#if HAVE_SECURE_GETENV
+#define getenv(_s) secure_getenv(_s)
+#elif HAVE___SECURE_GETENV
#define getenv(_s) __secure_getenv(_s)
#endif
-#ifdef STDC_HEADERS
-/* FIX: shrug */
-#define getopt system_getopt
-#include <stdlib.h>
-#undef getopt
-#else /* not STDC_HEADERS */
-char *getenv (const char *name);
-#endif /* STDC_HEADERS */
-
-/* XXX solaris2.5.1 has not */
-#if !defined(EXIT_FAILURE)
-#define EXIT_FAILURE 1
-#endif
-
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#else
# endif /* HAVE_NDIR_H */
#endif /* HAVE_DIRENT_H */
-#include <ctype.h>
-
#if HAVE_LIMITS_H
#include <limits.h>
#endif
#if WITH_SELINUX
#include <selinux/selinux.h>
+#include <selinux/label.h>
+#include <selinux/avc.h>
#else
typedef char * security_context_t;
#define matchpathcon_fini() (0)
#define matchpathcon(_fn, _fm, _c) (-1)
+#define selabel_lookup_raw(_hnd, _scon, _key,_type) (-1)
+
+#define selinux_file_context_path() (0)
+
#define rpm_execcon(_v, _fn, _av, _envp) (0)
#endif
extern const char *__progname;
/* Take care of NLS matters. */
-
-#if HAVE_LOCALE_H
-# include <locale.h>
-#endif
-#if !HAVE_SETLOCALE
-# define setlocale(Category, Locale) /* empty */
-#endif
-
#if ENABLE_NLS
+# include <locale.h>
# include <libintl.h>
# define _(Text) dgettext (PACKAGE, Text)
#else
-# undef bindtextdomain
-# define bindtextdomain(Domain, Directory) /* empty */
-# undef textdomain
-# define textdomain(Domain) /* empty */
# define _(Text) Text
-# undef dgettext
-# define dgettext(DomainName, Text) Text
#endif
#define N_(Text) Text
/* ============== from misc/miscfn.h */
-#if !defined(USE_GNU_GLOB)
-#if HAVE_FNMATCH_H
-#include <fnmatch.h>
-#endif
-
-#if HAVE_GLOB_H
-#include <glob.h>
-#endif
-#else
-#include "misc/glob.h"
#include "misc/fnmatch.h"
-#endif
-
-#if NEED_STRINGS_H
-#include <strings.h>
-#endif
-#if HAVE_GETMNTINFO || HAVE_GETMNTINFO_R || HAVE_MNTCTL
-# define GETMNTENT_ONE 0
-# define GETMNTENT_TWO 0
-# if HAVE_SYS_MNTCTL_H
-# include <sys/mntctl.h>
-# endif
-# if HAVE_SYS_VMOUNT_H
-# include <sys/vmount.h>
-# endif
-# if HAVE_SYS_MOUNT_H
-# include <sys/mount.h>
-# endif
-#elif HAVE_MNTENT_H || !(HAVE_GETMNTENT) || HAVE_STRUCT_MNTTAB
-# if HAVE_MNTENT_H
-# include <stdio.h>
-# include <mntent.h>
-# define our_mntent struct mntent
-# define our_mntdir mnt_dir
-# elif HAVE_STRUCT_MNTTAB
-# include <stdio.h>
-# include <mnttab.h>
- struct our_mntent {
- char * our_mntdir;
- };
- struct our_mntent *getmntent(FILE *filep);
-# define our_mntent struct our_mntent
-# else
-# include <stdio.h>
- struct our_mntent {
- char * our_mntdir;
- };
- struct our_mntent *getmntent(FILE *filep);
-# define our_mntent struct our_mntent
-# endif
-# define GETMNTENT_ONE 1
-# define GETMNTENT_TWO 0
-#elif HAVE_SYS_MNTTAB_H
-# include <stdio.h>
-# include <sys/mnttab.h>
-# define GETMNTENT_ONE 0
-# define GETMNTENT_TWO 1
-# define our_mntent struct mnttab
-# define our_mntdir mnt_mountp
-#else /* if !HAVE_MNTCTL */
-# error Neither mntent.h, mnttab.h, or mntctl() exists. I cannot build on this system.
-#endif
-
-#ifndef MOUNTED
-#define MOUNTED "/etc/mnttab"
-#endif
+#include <dlfcn.h>
#endif /* H_SYSTEM */