1 2#ifdef _M_IX86 3#define SYM(name) _##name 4#define IMPSYM(name) __imp__##name 5#else 6#define SYM(name) name 7#define IMPSYM(name) __imp_##name 8#endif 9 10#if (defined(_M_IX86) || defined(_M_AMD64)) 11 12#include <asm.inc> 13 14MACRO(CREATE_ALIAS1, alias, target) 15#ifdef _USE_ML 16 EXTERN SYM(&target):PROC 17 ALIAS <SYM(&alias)> = <SYM(&target)> 18#else 19 .weakref SYM(&alias), SYM(&target) 20#endif 21ENDM 22 23MACRO(CREATE_ALIAS2, alias, target) 24#ifdef _USE_ML 25 EXTERN IMPSYM(&target):PROC 26 ALIAS <IMPSYM(&alias)> = <IMPSYM(&target)> 27#else 28 .weakref IMPSYM(&alias), IMPSYM(&target) 29#endif 30ENDM 31 32MACRO(CREATE_ALIAS, alias, target) 33 CREATE_ALIAS1 &alias, &target 34 CREATE_ALIAS2 &alias, &target 35ENDM 36 37#elif defined(_M_ARM) 38 39#include <kxarm.h> 40 41 MACRO 42 CREATE_ALIAS1 $alias, $target 43 IMPORT SYM($alias), WEAK SYM($target) 44 MEND 45 46 MACRO 47 CREATE_ALIAS2 $alias, $target 48 IMPORT IMPSYM($alias), WEAK IMPSYM($target) 49 MEND 50 51 MACRO 52 CREATE_ALIAS $alias, $target 53 CREATE_ALIAS1 $alias, $target 54 CREATE_ALIAS2 $alias, $target 55 MEND 56#else 57#error "Unsupported platform." 58#endif 59 60 /* Do not remove indentation, this would break ARM build! */ 61 CREATE_ALIAS access, _access 62 CREATE_ALIAS chdir, _chdir 63 CREATE_ALIAS chmod, _chmod 64 CREATE_ALIAS chsize, _chsize 65 CREATE_ALIAS close, _close 66 CREATE_ALIAS creat, _creat 67 CREATE_ALIAS cwait, _cwait 68 CREATE_ALIAS2 daylight, _daylight 69 CREATE_ALIAS dup, _dup 70 CREATE_ALIAS dup2, _dup2 71 CREATE_ALIAS ecvt, _ecvt 72 CREATE_ALIAS eof, _eof 73 CREATE_ALIAS execl, _execl 74 CREATE_ALIAS execle, _execle 75 CREATE_ALIAS execlp, _execlp 76 CREATE_ALIAS execlpe, _execlpe 77 CREATE_ALIAS execv, _execv 78 CREATE_ALIAS execve, _execve 79 CREATE_ALIAS execvp, _execvp 80 CREATE_ALIAS execvpe, _execvpe 81 CREATE_ALIAS fcvt, _fcvt 82 CREATE_ALIAS fdopen, _fdopen 83 CREATE_ALIAS fgetchar, _fgetchar 84 CREATE_ALIAS fgetwchar, _fgetwchar 85 CREATE_ALIAS filelength, _filelength 86 CREATE_ALIAS fileno, _fileno 87 CREATE_ALIAS fpreset, _fpreset 88 CREATE_ALIAS fputchar, _fputchar 89 CREATE_ALIAS fputwchar, _fputwchar 90 CREATE_ALIAS fstat, _fstat 91 CREATE_ALIAS ftime, _ftime 92 CREATE_ALIAS gcvt, _gcvt 93 CREATE_ALIAS getch, _getch 94 CREATE_ALIAS getche, _getche 95 CREATE_ALIAS getcwd, _getcwd 96 CREATE_ALIAS getpid, _getpid 97 CREATE_ALIAS getw, _getw 98 CREATE_ALIAS heapwalk, _heapwalk 99 CREATE_ALIAS isatty, _isatty 100 CREATE_ALIAS isascii, __isascii 101 CREATE_ALIAS itoa, _itoa 102 CREATE_ALIAS kbhit, _kbhit 103 CREATE_ALIAS lfind, _lfind 104 CREATE_ALIAS lsearch, _lsearch 105 CREATE_ALIAS lseek, _lseek 106 CREATE_ALIAS ltoa, _ltoa 107 CREATE_ALIAS memccpy, _memccpy 108 CREATE_ALIAS memicmp, _memicmp 109 CREATE_ALIAS mkdir, _mkdir 110 CREATE_ALIAS mktemp, _mktemp 111 CREATE_ALIAS open, _open 112 CREATE_ALIAS pclose, _pclose 113 CREATE_ALIAS popen, _popen 114 CREATE_ALIAS putch, _putch 115 CREATE_ALIAS putenv, _putenv 116 CREATE_ALIAS putw, _putw 117 CREATE_ALIAS read, _read 118 CREATE_ALIAS rmdir, _rmdir 119 CREATE_ALIAS rmtmp, _rmtmp 120 CREATE_ALIAS searchenv, _searchenv 121 CREATE_ALIAS setmode, _setmode 122 CREATE_ALIAS snprintf, _snprintf 123 CREATE_ALIAS sopen, _sopen 124 CREATE_ALIAS spawnl, _spawnl 125 CREATE_ALIAS spawnle, _spawnle 126 CREATE_ALIAS spawnlp, _spawnlp 127 CREATE_ALIAS spawnlpe, _spawnlpe 128 CREATE_ALIAS spawnv, _spawnv 129 CREATE_ALIAS spawnve, _spawnve 130 CREATE_ALIAS spawnvp, _spawnvp 131 CREATE_ALIAS spawnvpe, _spawnvpe 132 CREATE_ALIAS stat, _stat 133 CREATE_ALIAS strcmpi, _strcmpi 134 CREATE_ALIAS strdup, _strdup 135 CREATE_ALIAS stricmp, _stricmp 136 CREATE_ALIAS stricoll, _stricoll 137 CREATE_ALIAS strlwr, _strlwr 138 CREATE_ALIAS strnicmp, _strnicmp 139 CREATE_ALIAS strnset, _strnset 140 CREATE_ALIAS strrev, _strrev 141 CREATE_ALIAS strset, _strset 142 CREATE_ALIAS strupr, _strupr 143 CREATE_ALIAS swab, _swab 144 CREATE_ALIAS tell, _tell 145 CREATE_ALIAS tempnam, _tempnam 146 CREATE_ALIAS2 timezone, _timezone 147 CREATE_ALIAS2 tzname, _tzname 148 CREATE_ALIAS tzset, _tzset 149 CREATE_ALIAS umask, _umask 150 CREATE_ALIAS ungetch, _ungetch 151 CREATE_ALIAS unlink, _unlink 152 CREATE_ALIAS utime, _utime 153 CREATE_ALIAS wcsdup, _wcsdup 154 CREATE_ALIAS wcsicmp, _wcsicmp 155 CREATE_ALIAS wcsicoll, _wcsicoll 156 CREATE_ALIAS wcslwr, _wcslwr 157 CREATE_ALIAS wcsnicmp, _wcsnicmp 158 CREATE_ALIAS wcsnset, _wcsnset 159 CREATE_ALIAS wcsrev, _wcsrev 160 CREATE_ALIAS wcsset, _wcsset 161 CREATE_ALIAS wcsupr, _wcsupr 162 CREATE_ALIAS wpopen, _wpopen 163 CREATE_ALIAS write, _write 164 // non-ANSI functions declared in math.h 165 CREATE_ALIAS j0, _j0 166 CREATE_ALIAS j1, _j1 167 CREATE_ALIAS jn, _jn 168 CREATE_ALIAS y0, _y0 169 CREATE_ALIAS y1, _y1 170 CREATE_ALIAS yn, _yn 171 CREATE_ALIAS chgsign, _chgsign 172 CREATE_ALIAS scalb, _scalb 173 CREATE_ALIAS finite, _finite 174 CREATE_ALIAS fpclass, _fpclass 175 // C99 functions 176 CREATE_ALIAS cabs, _cabs 177 CREATE_ALIAS hypot, _hypot 178 CREATE_ALIAS logb, _logb 179 CREATE_ALIAS nextafter, _nextafter 180 181 END 182 183