]> git.proxmox.com Git - mirror_edk2.git/blob - UnixPkg/Sec/X64/NameManglingFix.c
MdePkg/BaseSynchronizationLib: Added ARM Aarch64 architecture support
[mirror_edk2.git] / UnixPkg / Sec / X64 / NameManglingFix.c
1 /** @file
2
3 Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
4
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #include "SecMain.h"
16
17 //
18 // OS X Posix does some strange name mangling on these names in C.
19 // If you call from assembler you get the wrong version of the function
20 // So these globals get you the correct name mangled functions that can
21 // be accessed from assembly
22 //
23 UnixRmDir gUnixRmDir = rmdir;
24 UnixOpenDir gUnixOpenDir = opendir;
25 UnixStat gUnixStat = (UnixStat)stat;
26 UnixStatFs gUnixStatFs = statfs;
27 UnixReadDir gUnixReaddir = readdir;
28 UnixRewindDir gUnixRewinddir = rewinddir;
29
30 int
31 UnixIoCtl1 (
32 int fd,
33 unsigned long int __request,
34 UINTN Arg
35 )
36 {
37 return ioctl (fd, __request, Arg);
38 }
39
40 int
41 UnixFcntl1 (int __fd, int __cmd, UINTN Arg)
42 {
43 return fcntl (__fd, __cmd, Arg);
44 }