pike.git / src / pike_macros.h

version» Context lines:

pike.git/src/pike_macros.h:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #ifndef MACROS_H   #define MACROS_H    + #include <global.h> +  + #ifdef HAVE_SYS_PARAM_H   #include <sys/param.h> -  + #endif +    #include "pike_memory.h"      #define OFFSETOF(str_type, field) ((long)& (((struct str_type *)0)->field))   #define BASEOF(ptr, str_type, field) \   ((struct str_type *)((char*)ptr - (char*)& (((struct str_type *)0)->field)))      #define NELEM(a) (sizeof (a) / sizeof ((a)[0]))   #define ALLOC_STRUCT(X) ( (struct X *)xalloc(sizeof(struct X)) )      #define MINIMUM(X,Y) ((X)<(Y)?(X):(Y))