X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-lib%2Flib-lib.h;h=ca55f969c575622cdbfd28df1d025af946ec26bb;hp=e969bb5bb0436d97c7eb440a2321425f85cb64f7;hb=6920eb5798f2d9f25e5ea1af2ba86122cf408bd1;hpb=1ee89902de184a640c171ae3285bff6882a791bd diff --git a/lib-lib/lib-lib.h b/lib-lib/lib-lib.h index e969bb5..ca55f96 100644 --- a/lib-lib/lib-lib.h +++ b/lib-lib/lib-lib.h @@ -20,10 +20,16 @@ #ifndef MUTT_LIB_LIB_LIB_LIB_H #define MUTT_LIB_LIB_LIB_LIB_H -#if HAVE_CONFIG_H -# include "../config.h" +#ifdef HAVE_CONFIG_H +# include #endif +#ifndef __GNUC__ +# define __attribute__(a) +#endif + +/* very common and usual headers we just want to have available {{{ */ + #include #include #include @@ -46,11 +52,13 @@ #ifdef HAVE_UNISTD_H # include #endif + #if HAVE_STDINT_H # include #elif HAVE_INTTYPES_H # include #endif +#include #ifdef HAVE_SYS_TIME_H # include @@ -60,16 +68,64 @@ #include #endif -#include "macros.h" -#include "mem.h" +#ifndef _POSIX_PATH_MAX +#include +#endif + +/* }}} */ +/* useful and common macros {{{ */ -#include "ascii.h" +#ifdef _ +# undef _ +#endif + +#ifdef HAVE_LIBIDN +# 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)) + +#define __must_check__ __attribute__((warn_unused_result)) +#define IGNORE(expr) do { if (expr) (void)0; } while (0) + +#define __init __attribute__((__used__,__constructor__)) +#define __fini __attribute__((__used__,__destructor__)) + +/* }}} */ + +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 "array.h" +#include "bits.h" #include "buffer.h" -#include "date.h" #include "file.h" #include "hash.h" #include "list.h" +#include "md5.h" #include "mapping.h" #include "rx.h" #include "url.h"