Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

553 lines
20 KiB

  1. /***
  2. *mtdll.h - DLL/Multi-thread include
  3. *
  4. * Copyright (c) 1987-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *
  8. * [Internal]
  9. *
  10. *Revision History:
  11. * 10-27-87 JCR Module created.
  12. * 11-13-87 SKS Added _HEAP_LOCK
  13. * 12-15-87 JCR Added _EXIT_LOCK
  14. * 01-07-88 BCM Added _SIGNAL_LOCK; upped MAXTHREADID from 16 to 32
  15. * 02-01-88 JCR Added _dll_mlock/_dll_munlock macros
  16. * 05-02-88 JCR Added _BHEAP_LOCK
  17. * 06-17-88 JCR Corrected prototypes for special mthread debug routines
  18. * 08-15-88 JCR _check_lock now returns int, not void
  19. * 08-22-88 GJF Modified to also work for the 386 (small model only)
  20. * 06-05-89 JCR 386 mthread support
  21. * 06-09-89 JCR 386: Added values to _tiddata struc (for _beginthread)
  22. * 07-13-89 JCR 386: Added _LOCKTAB_LOCK
  23. * 08-17-89 GJF Cleanup, now specific to OS/2 2.0 (i.e., 386 flat model)
  24. * 10-30-89 GJF Fixed copyright
  25. * 01-02-90 JCR Moved a bunch of definitions from os2dll.inc
  26. * 04-06-90 GJF Added _INC_OS2DLL stuff and #include <cruntime.h>. Made
  27. * all function _CALLTYPE2 (for now).
  28. * 04-10-90 GJF Added prototypes for _[un]lockexit().
  29. * 08-16-90 SBM Made _terrno and _tdoserrno int, not unsigned
  30. * 09-14-90 GJF Added _pxcptacttab, _pxcptinfoptr and _fpecode fields
  31. * to _tiddata struct.
  32. * 10-09-90 GJF Thread ids are of type unsigned long.
  33. * 12-06-90 SRW Added _OSFHND_LOCK
  34. * 06-04-91 GJF Win32 version of multi-thread types and prototypes.
  35. * 08-15-91 GJF Made _tdoserrno an unsigned long for Win32.
  36. * 08-20-91 JCR C++ and ANSI naming
  37. * 09-29-91 GJF Conditionally added prototypes for _getptd_lk
  38. * and _getptd1_lk for Win32 under DEBUG.
  39. * 10-03-91 JCR Added _cvtbuf to _tiddata structure
  40. * 02-17-92 GJF For Win32, replaced _NFILE_ with _NHANDLE_ and
  41. * _NSTREAM_.
  42. * 03-06-92 GJF For Win32, made _[un]mlock_[fh|stream]() macros
  43. * directly call _[un]lock().
  44. * 03-17-92 GJF Dropped _namebuf field from _tiddata structure for
  45. * Win32.
  46. * 08-05-92 GJF Function calling type and variable type macros.
  47. * 12-03-91 ETC Added _wtoken to _tiddata, added intl LOCK's;
  48. * added definition of wchar_t (needed for _wtoken).
  49. * 08-14-92 KRS Port ETC's _wtoken change from other tree.
  50. * 08-21-92 GJF Merged 08-05-92 and 08-14-92 versions.
  51. * 12-03-92 KRS Added _mtoken field for MTHREAD _mbstok().
  52. * 01-21-93 GJF Removed support for C6-386's _cdecl.
  53. * 02-25-93 GJF Purged Cruiser support and many outdated definitions
  54. * and declarations.
  55. * 04-07-93 SKS Add _CRTIMP keyword for CRT DLL model
  56. * 10-11-93 GJF Support NT and Cuda builds. Also, purged some old
  57. * non-Win32 support (it was incomplete anyway) and
  58. * replace MTHREAD with _MT.
  59. * 10-13-93 SKS Change name from <MTDLL.H> to <MTDLL.H>
  60. * 10-27-93 SKS Add Per-Thread Variables for C++ Exception Handling
  61. * 12-13-93 SKS Add _freeptd(), which frees per-thread CRT data
  62. * 12-17-93 CFW Add Per-Thread Variable for _wasctime().
  63. * 04-15-93 CFW Add _MB_CP_LOCK.
  64. * 04-21-94 GJF Made declaration of __tlsindex and definition of the
  65. * lock macros conditional on ndef DLL_FOR_WIN32S.
  66. * Also, conditionally include win32s.h.
  67. * 12-14-94 SKS Increase file handle and FILE * limits for MSVCRT30.DLL
  68. * 02-14-95 CFW Clean up Mac merge.
  69. * 03-06-95 GJF Added _[un]lock_file[2] prototypes, _[un]lock_str2
  70. * macros, and changed the _[un]lock_str macros.
  71. * 03-13-95 GJF _IOB_ENTRIES replaced _NSTREAM_ as the number of
  72. * stdio locks in _locktable[].
  73. * 03-29-95 CFW Add error message to internal headers.
  74. * 04-13-95 DAK Add NT Kernel EH support
  75. * 04-18-95 SKS Add 5 per-thread variables for MIPS EH use
  76. * 05-02-95 SKS Add _initptd() which initializes per-thread data
  77. * 05-08-95 CFW Official ANSI C++ new handler added.
  78. * 05-19-95 DAK More Kernel EH work.
  79. * 06-05-95 JWM _NLG_dwcode & _NLG_LOCK added.
  80. * 06-11-95 GJF The critical sections for file handles are now in the
  81. * ioinfo struct rather than the lock table.
  82. * 07-20-95 CFW Remove _MBCS ifdef - caused ctime/wctime bug.
  83. * 10-03-95 GJF Support for new scheme to lock locale including
  84. * _[un]lock_locale() macros and decls of _setlc_active
  85. * and __unguarded_readlc_active. Also commented out
  86. * obsolete *_LOCK macros.
  87. * 10-19-95 BWT Fixup _NTSUBSET_ usage.
  88. * 12-07-95 SKS Fix misspelling of _NTSUBSET_ (final _ was missing)
  89. * 12-14-95 JWM Add "#pragma once".
  90. * 05-02-96 SKS Variables _setlc_active and __unguarded_readlc_active
  91. * are used by MSVCP42*.DLL and so must be _CRTIMP.
  92. * 07-16-96 GJF Locale locking wasn't really thread safe. Replaced ++
  93. * and -- with InterlockedIncrement and
  94. * InterlockedDecrement API, respectively.
  95. * 07-18-96 GJF Further mod to locale locking to fix race condition.
  96. * 02-05-97 GJF Cleaned out obsolete support for Win32s, _CRTAPI* and
  97. * _NTSDK. Also, replaced #if defined with #ifdef where
  98. * appropriate.
  99. * 10-07-97 RDL Added IA64.
  100. * 02-02-98 GJF Changes for Win64: changed _thandle type to uintptr_t.
  101. * 04-27-98 GJF Added support for per-thread mbc information.
  102. * 07-28-98 JWM Added __pceh to per-thread data for comerr support.
  103. * 09-10-98 GJF Added support for per-thread locale information.
  104. * 12-05-98 JWM Pulled all comerr support.
  105. * 03-24-99 GJF More reference counters for threadlocinfo.
  106. * 04-24-99 PML Added lconv_intl_refcount to threadlocinfo.
  107. * 05-17-99 PML Remove all Macintosh support.
  108. * 10-06-99 PML Add _W64 modifier to types which are 32 bits in Win32,
  109. * 64 bits in Win64.
  110. * 11-24-99 GB Add _werrmsg in struct _tiddata for error support in
  111. * wide char version of strerror.
  112. * 12-10-99 GB Add _ProcessingThrow in struct _tiddata.
  113. * 12-10-99 GB Added a new Lock _UNDNAME_LOCK for critical section in
  114. * unDName().
  115. * 26-01-00 GB Added lc_clike in threadlocinfostruct.
  116. * 06-08-00 PML Remove threadmbcinfo.{pprev,pnext}. Rename
  117. * THREADLOCALEINFO to _THREADLOCALEINFO and
  118. * THREADMBCINFO to _THREADMBCINFO.
  119. * 09-06-00 GB deleted _wctype and _pwctype from threadlocinfo.
  120. * 01-29-01 GB Added _func function version of data variable in
  121. * _lock_locale to work with STATIC_CPPLIB
  122. * 02-20-01 PML vs7#172586 Avoid _RT_LOCK by preallocating all locks
  123. * that will be required, and returning failure back on
  124. * inability to allocate a lock.
  125. * 03-22-01 PML Add _DEBUG_LOCK for _CrtSetReportHook2 (vs7#124998)
  126. * 03-25-01 PML Add ww_caltype & ww_lcid to __lc_time_data (vs7#196892)
  127. * 07-15-01 PML Remove all ALPHA, MIPS, and PPC code
  128. * 09-18-01 GB Support for exception specification.
  129. * 09-21-01 GB ReWrite of C++Eh for IA64
  130. * 10-16-01 GB Added fiber support
  131. * 04-02-02 GB Changed FLS macros to just use redirection funciton pointers.
  132. * 04-15-02 BWT Remove kernel EH support
  133. *
  134. ****/
  135. #if _MSC_VER > 1000 /*IFSTRIP=IGN*/
  136. #pragma once
  137. #endif
  138. #ifndef _INC_MTDLL
  139. #define _INC_MTDLL
  140. #ifndef _CRTBLD
  141. /*
  142. * This is an internal C runtime header file. It is used when building
  143. * the C runtimes only. It is not to be used as a public header file.
  144. */
  145. #error ERROR: Use of C runtime library internal header file.
  146. #endif /* _CRTBLD */
  147. #ifdef __cplusplus
  148. extern "C" {
  149. #endif
  150. #include <cruntime.h>
  151. #include <windows.h>
  152. #if !defined(_W64)
  153. #if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 /*IFSTRIP=IGN*/
  154. #define _W64 __w64
  155. #else
  156. #define _W64
  157. #endif
  158. #endif
  159. /* Define _CRTIMP */
  160. #ifndef _CRTIMP
  161. #ifdef CRTDLL
  162. #define _CRTIMP __declspec(dllexport)
  163. #else /* ndef CRTDLL */
  164. #ifdef _DLL
  165. #define _CRTIMP __declspec(dllimport)
  166. #else /* ndef _DLL */
  167. #define _CRTIMP
  168. #endif /* _DLL */
  169. #endif /* CRTDLL */
  170. #endif /* _CRTIMP */
  171. /* Define __cdecl for non-Microsoft compilers */
  172. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  173. #define __cdecl
  174. #endif
  175. #ifndef _UINTPTR_T_DEFINED
  176. #ifdef _WIN64
  177. typedef unsigned __int64 uintptr_t;
  178. #else
  179. typedef _W64 unsigned int uintptr_t;
  180. #endif
  181. #define _UINTPTR_T_DEFINED
  182. #endif
  183. /*
  184. * Define the number of supported handles and streams. The definitions
  185. * here must exactly match those in internal.h (for _NHANDLE_) and stdio.h
  186. * (for _NSTREAM_).
  187. */
  188. #define _IOB_ENTRIES 20
  189. /* Lock symbols */
  190. #define _SIGNAL_LOCK 0 /* lock for signal() */
  191. #define _IOB_SCAN_LOCK 1 /* _iob[] table lock */
  192. #define _TMPNAM_LOCK 2 /* lock global tempnam variables */
  193. #define _CONIO_LOCK 3 /* lock for conio routines */
  194. #define _HEAP_LOCK 4 /* lock for heap allocator routines */
  195. #define _UNDNAME_LOCK 5 /* lock for unDName() routine */
  196. #define _TIME_LOCK 6 /* lock for time functions */
  197. #define _ENV_LOCK 7 /* lock for environment variables */
  198. #define _EXIT_LOCK1 8 /* lock #1 for exit code */
  199. #define _POPEN_LOCK 9 /* lock for _popen/_pclose database */
  200. #define _LOCKTAB_LOCK 10 /* lock to protect semaphore lock table */
  201. #define _OSFHND_LOCK 11 /* lock to protect _osfhnd array */
  202. #define _SETLOCALE_LOCK 12 /* lock for locale handles, etc. */
  203. #define _MB_CP_LOCK 13 /* lock for multibyte code page */
  204. #define _TYPEINFO_LOCK 14 /* lock for type_info access */
  205. #define _DEBUG_LOCK 15 /* lock for debug global structs */
  206. #define _STREAM_LOCKS 16 /* Table of stream locks */
  207. #define _LAST_STREAM_LOCK (_STREAM_LOCKS+_IOB_ENTRIES-1) /* Last stream lock */
  208. #define _TOTAL_LOCKS (_LAST_STREAM_LOCK+1)
  209. #define _LOCK_BIT_INTS (_TOTAL_LOCKS/(sizeof(unsigned)*8))+1 /* # of ints to hold lock bits */
  210. #ifndef __assembler
  211. /* Multi-thread macros and prototypes */
  212. #if defined(_MT)
  213. #define __TRY __try{
  214. #define __FINALLY }__finally{
  215. #define __END_TRY_FINALLY }
  216. /* need wchar_t for _wtoken field in _tiddata */
  217. #ifndef _WCHAR_T_DEFINED
  218. typedef unsigned short wchar_t;
  219. #define _WCHAR_T_DEFINED
  220. #endif
  221. #ifdef ANSI_NEW_HANDLER
  222. /* ANSI C++ new handler */
  223. #ifndef _ANSI_NH_DEFINED
  224. typedef void (__cdecl * new_handler) ();
  225. #define _ANSI_NH_DEFINED
  226. #endif
  227. #endif /* ANSI_NEW_HANDLER */
  228. #ifdef _MT
  229. #ifndef _THREADMBCINFO
  230. typedef struct threadmbcinfostruct {
  231. int refcount;
  232. int mbcodepage;
  233. int ismbcodepage;
  234. int mblcid;
  235. unsigned short mbulinfo[6];
  236. char mbctype[257];
  237. char mbcasemap[256];
  238. } threadmbcinfo;
  239. typedef threadmbcinfo * pthreadmbcinfo;
  240. #define _THREADMBCINFO
  241. #endif
  242. #endif
  243. #ifndef __LC_TIME_DATA
  244. struct __lc_time_data {
  245. char *wday_abbr[7];
  246. char *wday[7];
  247. char *month_abbr[12];
  248. char *month[12];
  249. char *ampm[2];
  250. char *ww_sdatefmt;
  251. char *ww_ldatefmt;
  252. char *ww_timefmt;
  253. LCID ww_lcid;
  254. int ww_caltype;
  255. #ifdef _MT
  256. int refcount;
  257. #endif
  258. };
  259. #define __LC_TIME_DATA
  260. #endif
  261. #ifdef _MT
  262. #ifndef _THREADLOCALEINFO
  263. typedef struct threadlocaleinfostruct {
  264. int refcount;
  265. UINT lc_codepage;
  266. UINT lc_collate_cp;
  267. LCID lc_handle[6]; /* 6 == LC_MAX - LC_MIN + 1 */
  268. int lc_clike;
  269. int mb_cur_max;
  270. int * lconv_intl_refcount;
  271. int * lconv_num_refcount;
  272. int * lconv_mon_refcount;
  273. struct lconv * lconv;
  274. struct lconv * lconv_intl;
  275. int * ctype1_refcount;
  276. unsigned short * ctype1;
  277. const unsigned short * pctype;
  278. struct __lc_time_data * lc_time_curr;
  279. struct __lc_time_data * lc_time_intl;
  280. } threadlocinfo;
  281. typedef threadlocinfo * pthreadlocinfo;
  282. #define _THREADLOCALEINFO
  283. #endif
  284. #endif
  285. _CRTIMP extern unsigned long __cdecl __threadid(void);
  286. #define _threadid (__threadid())
  287. _CRTIMP extern uintptr_t __cdecl __threadhandle(void);
  288. #define _threadhandle (__threadhandle())
  289. /* Structure for each thread's data */
  290. struct _tiddata {
  291. unsigned long _tid; /* thread ID */
  292. uintptr_t _thandle; /* thread handle */
  293. int _terrno; /* errno value */
  294. unsigned long _tdoserrno; /* _doserrno value */
  295. unsigned int _fpds; /* Floating Point data segment */
  296. unsigned long _holdrand; /* rand() seed value */
  297. char * _token; /* ptr to strtok() token */
  298. wchar_t * _wtoken; /* ptr to wcstok() token */
  299. unsigned char * _mtoken; /* ptr to _mbstok() token */
  300. #ifdef ANSI_NEW_HANDLER
  301. new_handler _newh; /* ptr to ANSI C++ new handler function */
  302. #endif /* ANSI_NEW_HANDLER */
  303. /* following pointers get malloc'd at runtime */
  304. char * _errmsg; /* ptr to strerror()/_strerror() buff */
  305. wchar_t * _werrmsg; /* ptr to _wcserror()/__wcserror() buff */
  306. char * _namebuf0; /* ptr to tmpnam() buffer */
  307. wchar_t * _wnamebuf0; /* ptr to _wtmpnam() buffer */
  308. char * _namebuf1; /* ptr to tmpfile() buffer */
  309. wchar_t * _wnamebuf1; /* ptr to _wtmpfile() buffer */
  310. char * _asctimebuf; /* ptr to asctime() buffer */
  311. wchar_t * _wasctimebuf; /* ptr to _wasctime() buffer */
  312. void * _gmtimebuf; /* ptr to gmtime() structure */
  313. char * _cvtbuf; /* ptr to ecvt()/fcvt buffer */
  314. /* following fields are needed by _beginthread code */
  315. void * _initaddr; /* initial user thread address */
  316. void * _initarg; /* initial user thread argument */
  317. /* following three fields are needed to support signal handling and
  318. * runtime errors */
  319. void * _pxcptacttab; /* ptr to exception-action table */
  320. void * _tpxcptinfoptrs; /* ptr to exception info pointers */
  321. int _tfpecode; /* float point exception code */
  322. /* pointer to the copy of the multibyte character information used by
  323. * the thread */
  324. pthreadmbcinfo ptmbcinfo;
  325. /* pointer to the copy of the locale informaton used by the thead */
  326. pthreadlocinfo ptlocinfo;
  327. /* following field is needed by NLG routines */
  328. unsigned long _NLG_dwCode;
  329. /*
  330. * Per-Thread data needed by C++ Exception Handling
  331. */
  332. void * _terminate; /* terminate() routine */
  333. void * _unexpected; /* unexpected() routine */
  334. void * _translator; /* S.E. translator */
  335. void * _curexception; /* current exception */
  336. void * _curcontext; /* current exception context */
  337. int _ProcessingThrow; /* for uncaught_exception */
  338. void * _curexcspec; /* for handling exceptions thrown from std::unexpected */
  339. #if defined(_M_IA64) || defined(_M_AMD64)
  340. void * _pExitContext;
  341. void * _pUnwindContext;
  342. void * _pFrameInfoChain;
  343. unsigned __int64 _ImageBase;
  344. #if defined(_M_IA64)
  345. unsigned __int64 _TargetGp;
  346. #endif
  347. unsigned __int64 _ThrowImageBase;
  348. void * _pForeignException;
  349. #elif defined(_M_IX86)
  350. void * _pFrameInfoChain;
  351. #endif
  352. };
  353. typedef struct _tiddata * _ptiddata;
  354. /*
  355. * Declaration of TLS index used in storing pointers to per-thread data
  356. * structures.
  357. */
  358. extern unsigned long __tlsindex;
  359. #ifdef __cplusplus
  360. extern "C" {
  361. #endif /* __cplusplus */
  362. /*
  363. * Flag indicating whether or not setlocale() is active. Its value is the
  364. * number of setlocale() calls currently active.
  365. */
  366. _CRTIMP extern int __setlc_active;
  367. /*
  368. * Flag indicating whether or not a function which references the locale
  369. * without having locked it is active. Its value is the number of such
  370. * functions.
  371. */
  372. _CRTIMP extern int __unguarded_readlc_active;
  373. #ifdef __cplusplus
  374. }
  375. #endif
  376. /* macros */
  377. #define _lock_fh(fh) _lock_fhandle(fh)
  378. #define _lock_str(s) _lock_file(s)
  379. #define _lock_str2(i,s) _lock_file2(i,s)
  380. #define _lock_fh_check(fh,flag) if (flag) _lock_fhandle(fh)
  381. #define _mlock(l) _lock(l)
  382. #define _munlock(l) _unlock(l)
  383. #define _unlock_fh(fh) _unlock_fhandle(fh)
  384. #define _unlock_str(s) _unlock_file(s)
  385. #define _unlock_str2(i,s) _unlock_file2(i,s)
  386. #define _unlock_fh_check(fh,flag) if (flag) _unlock_fhandle(fh)
  387. // This is only used with STDCPP stuff only
  388. #define _lock_locale(llf) \
  389. InterlockedIncrement( ___unguarded_readlc_active_add_func() ); \
  390. if ( ___setlc_active_func() ) { \
  391. InterlockedDecrement( ___unguarded_readlc_active_add_func() ); \
  392. _lock( _SETLOCALE_LOCK ); \
  393. llf = 1; \
  394. } \
  395. else \
  396. llf = 0;
  397. #define _unlock_locale(llf) \
  398. if ( llf ) \
  399. _unlock( _SETLOCALE_LOCK ); \
  400. else \
  401. InterlockedDecrement( ___unguarded_readlc_active_add_func() );
  402. /* multi-thread routines */
  403. void __cdecl _lock(int);
  404. void __cdecl _lock_file(void *);
  405. void __cdecl _lock_file2(int, void *);
  406. int __cdecl _lock_fhandle(int);
  407. void __cdecl _lockexit(void);
  408. void __cdecl _unlock(int);
  409. void __cdecl _unlock_file(void *);
  410. void __cdecl _unlock_file2(int, void *);
  411. void __cdecl _unlock_fhandle(int);
  412. void __cdecl _unlockexit(void);
  413. int __cdecl _mtinitlocknum(int);
  414. _ptiddata __cdecl _getptd(void); /* return address of per-thread CRT data */
  415. _ptiddata __cdecl _getptd_noexit(void); /* return address of per-thread CRT data - doesn't exit on malloc failure */
  416. void WINAPI _freefls(void *); /* free up per-fiber CRT data block */
  417. void __cdecl _freeptd(_ptiddata); /* free up a per-thread CRT data block */
  418. void __cdecl _initptd(_ptiddata); /* initialize a per-thread CRT data block */
  419. /* These functions are for enabling STATIC_CPPLIB functionality */
  420. _CRTIMP int __cdecl ___setlc_active_func(void);
  421. _CRTIMP int * __cdecl ___unguarded_readlc_active_add_func(void);
  422. //
  423. // Define Fiber Local Storage function prototypes and access macros.
  424. //
  425. typedef
  426. VOID
  427. (WINAPI *PFLS_CALLBACK_FUNCTION) (
  428. IN PVOID lpFlsData
  429. );
  430. typedef
  431. DWORD
  432. (WINAPI *PFLS_ALLOC_FUNCTION) (
  433. IN PFLS_CALLBACK_FUNCTION lpCallback OPTIONAL
  434. );
  435. typedef
  436. PVOID
  437. (WINAPI *PFLS_GETVALUE_FUNCTION) (
  438. IN DWORD dwFlsIndex
  439. );
  440. typedef
  441. BOOL
  442. (WINAPI *PFLS_SETVALUE_FUNCTION) (
  443. IN DWORD dwFlsIndex,
  444. IN PVOID lpFlsData
  445. );
  446. typedef
  447. BOOL
  448. (WINAPI *PFLS_FREE_FUNCTION) (
  449. IN DWORD dwFlsIndex
  450. );
  451. extern PFLS_ALLOC_FUNCTION gpFlsAlloc;
  452. extern PFLS_GETVALUE_FUNCTION gpFlsGetValue;
  453. extern PFLS_SETVALUE_FUNCTION gpFlsSetValue;
  454. extern PFLS_FREE_FUNCTION gpFlsFree;
  455. #define FLS_ALLOC(callback) ((gpFlsAlloc)(callback))
  456. #define FLS_GETVALUE(index) ((gpFlsGetValue)(index))
  457. #define FLS_SETVALUE(index, value) ((gpFlsSetValue)(index, value))
  458. #define FLS_FREE(index) ((gpFlsFree)(index))
  459. #else /* not _MT */
  460. /* macros */
  461. #define _lock_fh(fh)
  462. #define _lock_str(s)
  463. #define _lock_str2(i,s)
  464. #define _lock_fh_check(fh,flag)
  465. #define _mlock(l)
  466. #define _munlock(l)
  467. #define _unlock_fh(fh)
  468. #define _unlock_str(s)
  469. #define _unlock_str2(i,s)
  470. #define _unlock_fh_check(fh,flag)
  471. #define _lock_locale(llf)
  472. #define _unlock_locale(llf)
  473. #define __TRY
  474. #define __FINALLY
  475. #define __END_TRY_FINALLY
  476. #endif /* _MT */
  477. #endif /* __assembler */
  478. #ifdef __cplusplus
  479. }
  480. #endif
  481. #endif /* _INC_MTDLL */