| OLD | NEW |
| 1 #if (defined(_WIN64) || defined(_WIN32_WCE)) && !defined(UNICODE) | 1 #if (defined(_WIN64) || defined(_WIN32_WCE)) && !defined(UNICODE) |
| 2 #define UNICODE | 2 #define UNICODE |
| 3 #endif | 3 #endif |
| 4 #if defined(UNICODE) && !defined(_UNICODE) | 4 #if defined(UNICODE) && !defined(_UNICODE) |
| 5 #define _UNICODE | 5 #define _UNICODE |
| 6 #endif | 6 #endif |
| 7 #if defined(_UNICODE) && !defined(UNICODE) | 7 #if defined(_UNICODE) && !defined(UNICODE) |
| 8 #define UNICODE | 8 #define UNICODE |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 * buffer, but what's the worst thing that can happen? Error | 33 * buffer, but what's the worst thing that can happen? Error |
| 34 * message might be misleading or corrupted. As error condition | 34 * message might be misleading or corrupted. As error condition |
| 35 * is fatal and should never be risen, I accept the risk... */ | 35 * is fatal and should never be risen, I accept the risk... */ |
| 36 /* One can argue that I should have used InterlockedExchangePointer | 36 /* One can argue that I should have used InterlockedExchangePointer |
| 37 * or something to update static variables and table[]. Well, | 37 * or something to update static variables and table[]. Well, |
| 38 * store instructions are as atomic as they can get and assigned | 38 * store instructions are as atomic as they can get and assigned |
| 39 * values are effectively constant... So that volatile qualifier | 39 * values are effectively constant... So that volatile qualifier |
| 40 * should be sufficient [it prohibits compiler to reorder memory | 40 * should be sufficient [it prohibits compiler to reorder memory |
| 41 * access instructions]. */ | 41 * access instructions]. */ |
| 42 do { | 42 do { |
| 43 » len = _stprintf (msg,_T("OPENSSL_Uplink(%p,%02X): "),table,index); | 43 » len = _sntprintf (msg,sizeof(msg)/sizeof(TCHAR), |
| 44 » » » _T("OPENSSL_Uplink(%p,%02X): "),table,index); |
| 44 _tcscpy (msg+len,_T("unimplemented function")); | 45 _tcscpy (msg+len,_T("unimplemented function")); |
| 45 | 46 |
| 46 if ((h=apphandle)==NULL) | 47 if ((h=apphandle)==NULL) |
| 47 { if ((h=GetModuleHandle(NULL))==NULL) | 48 { if ((h=GetModuleHandle(NULL))==NULL) |
| 48 { apphandle=(HMODULE)-1; | 49 { apphandle=(HMODULE)-1; |
| 49 _tcscpy (msg+len,_T("no host application")); | 50 _tcscpy (msg+len,_T("no host application")); |
| 50 break; | 51 break; |
| 51 } | 52 } |
| 52 apphandle = h; | 53 apphandle = h; |
| 53 } | 54 } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 lazy6, lazy7, lazy8, lazy9, lazy10, | 108 lazy6, lazy7, lazy8, lazy9, lazy10, |
| 108 lazy11,lazy12,lazy13,lazy14,lazy15, | 109 lazy11,lazy12,lazy13,lazy14,lazy15, |
| 109 lazy16,lazy17,lazy18,lazy19,lazy20, | 110 lazy16,lazy17,lazy18,lazy19,lazy20, |
| 110 lazy21,lazy22,lazy23,lazy24,lazy25, | 111 lazy21,lazy22,lazy23,lazy24,lazy25, |
| 111 }; | 112 }; |
| 112 #endif | 113 #endif |
| 113 | 114 |
| 114 #ifdef SELFTEST | 115 #ifdef SELFTEST |
| 115 main() { UP_fprintf(UP_stdout,"hello, world!\n"); } | 116 main() { UP_fprintf(UP_stdout,"hello, world!\n"); } |
| 116 #endif | 117 #endif |
| OLD | NEW |