19 #if     __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) 
   20 #  define RPM_GNUC_EXTENSION __extension__ 
   22 #  define RPM_GNUC_EXTENSION 
   27 #if    __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) 
   28 #define RPM_GNUC_PURE                            \ 
   29   __attribute__((__pure__)) 
   30 #define RPM_GNUC_MALLOC                         \ 
   31   __attribute__((__malloc__)) 
   34 #define RPM_GNUC_MALLOC 
   37 #if     (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) 
   38 #define RPM_GNUC_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) 
   39 #define RPM_GNUC_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y))) 
   41 #define RPM_GNUC_ALLOC_SIZE(x) 
   42 #define RPM_GNUC_ALLOC_SIZE2(x,y) 
   46 #define RPM_GNUC_NULL_TERMINATED __attribute__((__sentinel__)) 
   48 #define RPM_GNUC_NULL_TERMINATED 
   51 #if     __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) 
   52 #define RPM_GNUC_PRINTF( format_idx, arg_idx )    \ 
   53   __attribute__((__format__ (__printf__, format_idx, arg_idx))) 
   54 #define RPM_GNUC_SCANF( format_idx, arg_idx )     \ 
   55   __attribute__((__format__ (__scanf__, format_idx, arg_idx))) 
   56 #define RPM_GNUC_FORMAT( arg_idx )                \ 
   57   __attribute__((__format_arg__ (arg_idx))) 
   58 #define RPM_GNUC_NORETURN                         \ 
   59   __attribute__((__noreturn__)) 
   60 #define RPM_GNUC_CONST                            \ 
   61   __attribute__((__const__)) 
   62 #define RPM_GNUC_UNUSED                           \ 
   63   __attribute__((__unused__)) 
   64 #define RPM_GNUC_NO_INSTRUMENT                  \ 
   65   __attribute__((__no_instrument_function__)) 
   67 #define RPM_GNUC_PRINTF( format_idx, arg_idx ) 
   68 #define RPM_GNUC_SCANF( format_idx, arg_idx ) 
   69 #define RPM_GNUC_FORMAT( arg_idx ) 
   70 #define RPM_GNUC_NORETURN 
   71 #define RPM_GNUC_CONST 
   72 #define RPM_GNUC_UNUSED 
   73 #define RPM_GNUC_NO_INSTRUMENT 
   76 #if    __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) 
   77 #define RPM_GNUC_DEPRECATED                            \ 
   78   __attribute__((__deprecated__)) 
   80 #define RPM_GNUC_DEPRECATED 
   83 #if     __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) 
   84 #define RPM_GNUC_MAY_ALIAS __attribute__((may_alias)) 
   85 #define RPM_GNUC_NONNULL( ... ) \ 
   86   __attribute__((__nonnull__ (__VA_ARGS__))) 
   88 #define RPM_GNUC_MAY_ALIAS 
   89 #define RPM_GNUC_NONNULL( ... ) 
   92 #if    __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) 
   93 #define RPM_GNUC_WARN_UNUSED_RESULT             \ 
   94   __attribute__((warn_unused_result)) 
   96 #define RPM_GNUC_WARN_UNUSED_RESULT 
   99 #if    __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) 
  100 #  define RPM_GNUC_INTERNAL __attribute__((visibility("hidden"))) 
  102 #  define RPM_GNUC_INTERNAL 
  108 # define RPM_BEGIN_DECLS  extern "C" { 
  109 # define RPM_END_DECLS    } 
  111 # define RPM_BEGIN_DECLS 
  112 # define RPM_END_DECLS 
  124 void * 
rcalloc(
size_t nmemb, 
size_t size);
 
  127 void * 
rrealloc(
void *ptr, 
size_t size);
 
  129 char * 
rstrdup(
const char *str);
 
  132 void * 
rfree(
void *ptr);
 
  145 typedef void * (*rpmMemFailFunc) (
size_t size, 
void *data);
 
void * rmalloc(size_t size)
#define RPM_GNUC_ALLOC_SIZE(x)
#define RPM_GNUC_ALLOC_SIZE2(x, y)
void * rrealloc(void *ptr, size_t size)
char * rstrdup(const char *str)
void *(* rpmMemFailFunc)(size_t size, void *data)
Memory allocation failure callback prototype. 
rpmMemFailFunc rpmSetMemFail(rpmMemFailFunc func, void *data)
Set memory allocation failure callback. 
void * rcalloc(size_t nmemb, size_t size)