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 itoa, _itoa 101 CREATE_ALIAS kbhit, _kbhit 102 CREATE_ALIAS lfind, _lfind 103 CREATE_ALIAS lsearch, _lsearch 104 CREATE_ALIAS lseek, _lseek 105 CREATE_ALIAS ltoa, _ltoa 106 CREATE_ALIAS memccpy, _memccpy 107 CREATE_ALIAS memicmp, _memicmp 108 CREATE_ALIAS mkdir, _mkdir 109 CREATE_ALIAS mktemp, _mktemp 110 CREATE_ALIAS open, _open 111 CREATE_ALIAS pclose, _pclose 112 CREATE_ALIAS popen, _popen 113 CREATE_ALIAS putch, _putch 114 CREATE_ALIAS putenv, _putenv 115 CREATE_ALIAS putw, _putw 116 CREATE_ALIAS read, _read 117 CREATE_ALIAS rmdir, _rmdir 118 CREATE_ALIAS rmtmp, _rmtmp 119 CREATE_ALIAS searchenv, _searchenv 120 CREATE_ALIAS setmode, _setmode 121 CREATE_ALIAS snprintf, _snprintf 122 CREATE_ALIAS sopen, _sopen 123 CREATE_ALIAS spawnl, _spawnl 124 CREATE_ALIAS spawnle, _spawnle 125 CREATE_ALIAS spawnlp, _spawnlp 126 CREATE_ALIAS spawnlpe, _spawnlpe 127 CREATE_ALIAS spawnv, _spawnv 128 CREATE_ALIAS spawnve, _spawnve 129 CREATE_ALIAS spawnvp, _spawnvp 130 CREATE_ALIAS spawnvpe, _spawnvpe 131 CREATE_ALIAS stat, _stat 132 CREATE_ALIAS strcmpi, _strcmpi 133 CREATE_ALIAS strdup, _strdup 134 CREATE_ALIAS stricmp, _stricmp 135 CREATE_ALIAS stricoll, _stricoll 136 CREATE_ALIAS strlwr, _strlwr 137 CREATE_ALIAS strnicmp, _strnicmp 138 CREATE_ALIAS strnset, _strnset 139 CREATE_ALIAS strrev, _strrev 140 CREATE_ALIAS strset, _strset 141 CREATE_ALIAS strupr, _strupr 142 CREATE_ALIAS swab, _swab 143 CREATE_ALIAS tell, _tell 144 CREATE_ALIAS tempnam, _tempnam 145 CREATE_ALIAS2 timezone, _timezone 146 CREATE_ALIAS2 tzname, _tzname 147 CREATE_ALIAS tzset, _tzset 148 CREATE_ALIAS umask, _umask 149 CREATE_ALIAS ungetch, _ungetch 150 CREATE_ALIAS unlink, _unlink 151 CREATE_ALIAS utime, _utime 152 CREATE_ALIAS wcsdup, _wcsdup 153 CREATE_ALIAS wcsicmp, _wcsicmp 154 CREATE_ALIAS wcsicoll, _wcsicoll 155 CREATE_ALIAS wcslwr, _wcslwr 156 CREATE_ALIAS wcsnicmp, _wcsnicmp 157 CREATE_ALIAS wcsnset, _wcsnset 158 CREATE_ALIAS wcsrev, _wcsrev 159 CREATE_ALIAS wcsset, _wcsset 160 CREATE_ALIAS wcsupr, _wcsupr 161 CREATE_ALIAS wpopen, _wpopen 162 CREATE_ALIAS write, _write 163 // non-ANSI functions declared in math.h 164 CREATE_ALIAS j0, _j0 165 CREATE_ALIAS j1, _j1 166 CREATE_ALIAS jn, _jn 167 CREATE_ALIAS y0, _y0 168 CREATE_ALIAS y1, _y1 169 CREATE_ALIAS yn, _yn 170 CREATE_ALIAS chgsign, _chgsign 171 CREATE_ALIAS scalb, _scalb 172 CREATE_ALIAS finite, _finite 173 CREATE_ALIAS fpclass, _fpclass 174 // C99 functions 175 CREATE_ALIAS cabs, _cabs 176 CREATE_ALIAS hypot, _hypot 177 CREATE_ALIAS logb, _logb 178 CREATE_ALIAS nextafter, _nextafter 179 180 END 181 182