| OLD | NEW |
| (Empty) |
| 1 /*** | |
| 2 *charmax.c - definition of _charmax variable | |
| 3 * | |
| 4 * Copyright (c) Microsoft Corporation. All rights reserved. | |
| 5 * | |
| 6 *Purpose: | |
| 7 * defines _charmax | |
| 8 * | |
| 9 * According to ANSI, certain elements of the lconv structure must be | |
| 10 * initialized to CHAR_MAX and the value of CHAR_MAX changes when | |
| 11 * the user compiles -J. To reflect this change in the lconv structure, | |
| 12 * we initialize the structure to SCHAR_MAX, and when any of the users | |
| 13 * modules are compiled -J, the structure is updated. | |
| 14 * | |
| 15 * Note that this is not done for DLLs linked to the CRT DLL, because | |
| 16 * we do not want such DLLs to override the -J setting for an EXE | |
| 17 * linked to the CRT DLL. See comments in crtexe.c. | |
| 18 * | |
| 19 * Files involved: | |
| 20 * | |
| 21 * locale.h - if -J, generates an unresolved external to _charmax | |
| 22 * charmax.c - defines _charmax and sets to UCHAR_MAX (255), places | |
| 23 * _lconv_init in startup initializer table if pulled in by -J | |
| 24 * lconv.c - initializes lconv structure to SCHAR_MAX (127), | |
| 25 * since libraries built without -J | |
| 26 * lcnvinit.c - sets lconv members to 25. | |
| 27 ** | |
| 28 *******************************************************************************/ | |
| 29 | |
| 30 #ifdef _MSC_VER | |
| 31 | |
| 32 //#include <sect_attribs.h> | |
| 33 //#include <internal.h> | |
| 34 | |
| 35 //int __lconv_init(void); | |
| 36 | |
| 37 int _charmax = 255; | |
| 38 | |
| 39 //_CRTALLOC(".CRT$XIC") static _PIFV pinit = __lconv_init; | |
| 40 | |
| 41 #endif /* _MSC_VER */ | |
| OLD | NEW |