Template:Stub-Header: Difference between revisions

From CBLFS
Jump to navigationJump to search
No edit summary
No edit summary
Line 3: Line 3:
  cat > {{{2|/usr/include}}}/{{{1}}} << "EOF"
  cat > {{{2|/usr/include}}}/{{{1}}} << "EOF"
  /* {{{1}}} - Stub Header  */
  /* {{{1}}} - Stub Header  */
  #ifndef __STUB__{{UC:{{{1}}}}}__
  #ifndef __STUB__{{#replace:{{UC:{{{1}}}}}|.|_}}__
  #define __STUB__{{UC:{{{1}}}}}__
  #define __STUB__{{#replace:{{UC:{{{1}}}}}|.|_}}__
   
   
  #if defined(__x86_64) || \
  #if defined(__x86_64) || \
Line 16: Line 16:
  #endif
  #endif
   
   
  #endif /* __STUB__{{UC:{{{1}}}}}__ */
  #endif /* __STUB__{{#replace:{{UC:{{{1}}}}}|.|_}}__ */
  EOF
  EOF


Line 23: Line 23:
  cat > {{{2|/usr/include}}}/{{{1}}} << "EOF"
  cat > {{{2|/usr/include}}}/{{{1}}} << "EOF"
  /* {{{1}}} - Stub Header  */
  /* {{{1}}} - Stub Header  */
  #ifndef __STUB__{{UC:{{{1}}}}}__
  #ifndef __STUB__{{#replace:{{UC:{{{1}}}}}|.|_}}__
  #define __STUB__{{UC:{{{1}}}}}__
  #define __STUB__{{#replace:{{UC:{{{1}}}}}|.|_}}__
   
   
  #include <sgidefs.h>
  #include <sgidefs.h>
Line 36: Line 36:
  #endif
  #endif
   
   
  #endif /* __STUB__{{UC:{{{1}}}}}__ */
  #endif /* __STUB__{{#replace:{{UC:{{{1}}}}}|.|_}}__ */
  EOF
  EOF

Revision as of 17:16, 26 December 2006

Creating a Stub Header

cat > /usr/include/{{{1}}} << "EOF"
/* {{{1}}} - Stub Header  */
#ifndef __STUB__{{#replace:{{{1}}}|.|_}}__
#define __STUB__{{#replace:{{{1}}}|.|_}}__

#if defined(__x86_64) || \
    defined(__sparc64__) || \
    defined(__arch64__) || \
    defined(__powerpc64__) || \
    defined (__s390x__)
# include "{{{1}}}-64.h"
#else
# include "{{{1}}}-32.h"
#endif

#endif /* __STUB__{{#replace:{{{1}}}|.|_}}__ */
EOF

Creating a Stub Header For Mips

cat > /usr/include/{{{1}}} << "EOF"
/* {{{1}}} - Stub Header  */
#ifndef __STUB__{{#replace:{{{1}}}|.|_}}__
#define __STUB__{{#replace:{{{1}}}|.|_}}__

#include <sgidefs.h>

#if (_MIPS_SIM == _ABIO32)
# include "{{{1}}}-32.h"
#elif (_MIPS_SIM == _ABIN32)
# include "{{{1}}}-n32.h"
#elif (_MIPS_SIM == _ABI64)
# include "{{{1}}}-64.h"
#endif

#endif /* __STUB__{{#replace:{{{1}}}|.|_}}__ */
EOF