]> git.saurik.com Git - apple/libc.git/blame - include/_.libc_internal.h
Libc-498.1.1.tar.gz
[apple/libc.git] / include / _.libc_internal.h
CommitLineData
224c7076
A
1/*
2 * Copyright (c) 2006, 2007 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24/***********************************************************************
25 * Not to be installed in /usr/include
26 ***********************************************************************/
27
28#ifndef __LIBC_INTERNAL_H_
29#define __LIBC_INTERNAL_H_
30
31#define LIBC_STRING(str) #str
32
33#if defined(VARIANT_LEGACY)
34# define LIBC_ALIAS(sym) /* nothing */
35# define LIBC_ALIAS_C(sym) /* nothing */
36# define LIBC_ALIAS_I(sym) /* nothing */
37# define LIBC_INODE64(sym) /* nothing */
38# define LIBC_1050(sym) /* nothing */
39#else /* !VARIANT_LEGACY */
40# if defined(__LP64__)
41# define LIBC_ALIAS(sym) /* nothing */
42# if defined(VARIANT_CANCELABLE)
43# define LIBC_ALIAS_C(sym) /* nothing */
44# else /* !VARIANT_CANCELABLE */
45# define LIBC_ALIAS_C(sym) _asm("_" LIBC_STRING(sym) "$NOCANCEL")
46# endif /* VARIANT_CANCELABLE */
47# if defined(VARIANT_INODE32)
48# define LIBC_ALIAS_I(sym) /* nothing */
49# else /* !VARIANT_INODE32 */
50# define LIBC_ALIAS_I(sym) _asm("_" LIBC_STRING(sym) "$INODE64")
51# endif /* VARIANT_INODE32 */
52# else /* !__LP64__ */
53# define LIBC_ALIAS(sym) _asm("_" LIBC_STRING(sym) "$UNIX2003")
54# if defined(VARIANT_CANCELABLE)
55# define LIBC_ALIAS_C(sym) _asm("_" LIBC_STRING(sym) "$UNIX2003")
56# else /* !VARIANT_CANCELABLE */
57# define LIBC_ALIAS_C(sym) _asm("_" LIBC_STRING(sym) "$NOCANCEL$UNIX2003")
58# endif /* VARIANT_CANCELABLE */
59# if defined(VARIANT_INODE32)
60# define LIBC_ALIAS_I(sym) _asm("_" LIBC_STRING(sym) "$UNIX2003")
61# else /* !VARIANT_INODE32 */
62# define LIBC_ALIAS_I(sym) _asm("_" LIBC_STRING(sym) "$INODE64$UNIX2003")
63# endif /* VARIANT_INODE32 */
64# endif /* __LP64__ */
65# if defined(VARIANT_INODE32)
66# define LIBC_INODE64(sym) /* nothing */
67# else /* !VARIANT_INODE32 */
68# define LIBC_INODE64(sym) _asm("_" LIBC_STRING(sym) "$INODE64")
69# endif /* VARIANT_INODE32 */
70# if defined(VARIANT_PRE1050)
71# define LIBC_1050(sym) /* nothing */
72# else /* !VARIANT_PRE1050 */
73# define LIBC_1050(sym) _asm("_" LIBC_STRING(sym) "$1050")
74# endif /* VARIANT_PRE1050 */
75#endif /* VARIANT_LEGACY */
76
77#define LIBC_EXTSN(sym) _asm("_" LIBC_STRING(sym) "$DARWIN_EXTSN")
78#if defined(VARIANT_CANCELABLE)
79# define LIBC_EXTSN_C(sym) _asm("_" LIBC_STRING(sym) "$DARWIN_EXTSN")
80#else /* !VARIANT_CANCELABLE */
81# define LIBC_EXTSN_C(sym) _asm("_" LIBC_STRING(sym) "$DARWIN_EXTSN$NOCANCEL")
82#endif /* !VARIANT_CANCELABLE */
83
84/* 5243343 - define PR_5243343 temporarily */
85#define PR_5243343
86
87#endif /* __LIBC_INTERNAL_H_ */