Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

libcountm.h

Go to the documentation of this file.
00001 
00011 #ifndef LIBCOUNTM_H
00012 #define LIBCOUNTM_H
00013 
00014 #ifndef x_stringify
00015 # define x_stringify(x) #x
00016 #endif
00017 #ifndef stringify
00018 # define stringify(x) x_stringify(x)
00019 #endif
00020 #ifndef makefname
00021 # define makefname(ifacenum, fname) iface##ifacenum##_##fname
00022 #endif
00023 
00024 #ifdef DOVERSIONING
00025   /* define the interfaces */
00026 # define IFACE_0     0
00027 #endif /* DOVERSIONING */
00028 
00029 #ifdef LIBCOUNTM_BUILD
00030 /* BUILDING LIBRARY SPECIFIC */
00031 /* note FDECLARE is binary API dependent */
00032 /* note version_symbol is binary API dependent */
00033 /* ELF version (for normal .text segment functions) */
00034 #ifdef DOVERSIONING
00035 #define FDECLARE(ifacenum, fname, type) \
00036 __asm__(".symver iface" stringify(ifacenum) "_" #fname "," #fname "@" #ifacenum); \
type \
makefname(ifacenum, fname)
#else
#define FDECLARE(ifacenum, fname, type) type fname
#endif

#else /* LIBCOUNTM_BUILD */
/* Application Specific */

#ifdef DOVERSIONING
# define version_symbol(ifacenum, fname)\
  __asm__(".symver " #fname "," #fname "@" #ifacenum);
#else /* DOVERSIONING */
# define version_symbol(ifacenum, fname)
#endif /* DOVERSIONING */

/* function prototypes */
/* TEST: libcountm linking */
int libcountm_test(int);

version_symbol(IFACE_0, libcountm_test);
#endif /* LIBCOUNTM_BUILD */

#endif /* LIBCOUNTM_H */

Generated on Sat Jan 7 15:48:39 2006 for mod_countm by  doxygen 1.4.2