X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-lib%2Flib-lib.h;h=6dd3900be1196db5777ee54afad8c7f09e6cb648;hp=5f8974d993e9700c7b738f8e91d11fdf922f5ce7;hb=80566f6aedda1e4bdcca38f9cb27101b5ba1029f;hpb=230399f9632c37b66c1c117a17e8327eae6b3235 diff --git a/lib-lib/lib-lib.h b/lib-lib/lib-lib.h index 5f8974d..6dd3900 100644 --- a/lib-lib/lib-lib.h +++ b/lib-lib/lib-lib.h @@ -20,10 +20,99 @@ #ifndef MUTT_LIB_LIB_LIB_LIB_H #define MUTT_LIB_LIB_LIB_LIB_H -#include "macros.h" +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + +#ifndef __GNUC__ +# define __attribute__(a) +#endif + +/* very common and usual headers we just want to have available {{{ */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#if HAVE_STDINT_H +# include +#elif HAVE_INTTYPES_H +# include +#endif + +#ifdef HAVE_SYS_TIME_H +# include +#endif + +#ifdef HAVE_LOCALE_H +#include +#endif + +#ifndef _POSIX_PATH_MAX +#include +#endif + +/* }}} */ +/* useful and common macros {{{ */ + +#ifdef _ +# undef _ +#endif + +#ifdef ENABLE_NLS +# include +#define _(a) (gettext(a)) +# ifdef gettext_noop +# define N_(a) gettext_noop(a) +# else +# define N_(a) (a) +# endif +#else +# define _(a) (a) +# define N_(a) (a) +#endif + +#define TRUE 1 +#define FALSE 0 + +#undef MAX +#undef MIN +#define MAX(a,b) ((a) < (b) ? (b) : (a)) +#define MIN(a,b) ((a) < (b) ? (a) : (b)) + +/* }}} */ + +typedef union __attribute__((transparent_union)) anytype { + void *ptr; + long li; + int i; + short si; +} anytype; + #include "mem.h" +#include "str.h" +#include "utf8.h" -#include "ascii.h" +#include "array.h" #include "buffer.h" #include "date.h" #include "file.h" @@ -31,7 +120,6 @@ #include "list.h" #include "mapping.h" #include "rx.h" -#include "str.h" #include "url.h" #endif