Template:Stub-Header

From CBLFS
Revision as of 00:28, 5 January 2007 by Kalessin (talk | contribs) (I altered the format for the headings so that they fit into python's table of contents in a more reasonable manner.)
Jump to navigationJump to search

Creating a Stub Header

Creating a Generic Stub Header

cat > /usr/include/{{{1}}} << "EOF"
/* {{{1}}} - Stub Header  */
#ifndef __STUB__{{{1}}}__
#define __STUB__{{{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__{{{1}}}__ */
EOF

Creating a Stub Header For Mips

cat > /usr/include/{{{1}}} << "EOF"
/* {{{1}}} - Stub Header  */
#ifndef __STUB__{{{1}}}__
#define __STUB__{{{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__{{{1}}}__ */
EOF