Changeset 21916 for trunk/src/oleaut32/old
- Timestamp:
- Dec 18, 2011, 10:28:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 bin 2 Makefile.inc 1 env.cmd 2 LocalConfig.kmk
-
-
Property svn:mergeinfo
set to
/branches/gcc-kmk merged eligible
- Property svn:ignore
-
trunk/src/oleaut32/old/typelib.cpp
r6505 r21916 20 20 #define DEBUG2 21 21 22 #ifdef DEBUG 23 #include <process.h> 24 #endif 25 22 26 #include "oleaut32.h" 23 27 #include "olectl.h" … … 25 29 #include "itypelib.h" 26 30 31 #if defined(__WIN32OS2__) && !defined(__GNUC__) 32 #define snprintf wsnprintfA 33 #endif 34 27 35 static FILE *_privateLogFile = NULL; 28 36 … … 35 43 char logname[1024]; 36 44 37 sprintf(logname, "tlib_%d.log", loadNr);45 sprintf(logname, "tlib_%d.log", getpid()); 38 46 _privateLogFile = fopen(logname, "w"); 39 47 if(_privateLogFile == NULL) 40 48 { 41 sprintf(logname, "%stlib_%d.log", oleaut32Path, loadNr);49 sprintf(logname, "%stlib_%d.log", oleaut32Path, getpid()); 42 50 _privateLogFile = fopen(logname, "w"); 43 51 } … … 268 276 guidA = HEAP_strdupWtoA(GetProcessHeap(), 0, guid); 269 277 #ifdef __WIN32OS2__ 270 s printf(keyName, "SOFTWARE\\Classes\\TypeLib\\%s\\%x.%x",278 snprintf(keyName, sizeof(keyName), "SOFTWARE\\Classes\\TypeLib\\%s\\%x.%x", 271 279 guidA, attr->wMajorVerNum, attr->wMinorVerNum); 272 280 #else … … 315 323 CHAR buf[20]; 316 324 /* FIXME: is %u correct? */ 317 #ifdef __WIN32OS2__ 318 sprintf(buf, "%u", attr->wLibFlags); 325 snprintf(buf, strlen(buf), "%u", attr->wLibFlags); 319 326 if (RegSetValueExA(subKey, NULL, 0, REG_SZ, 320 327 (LPBYTE)buf, lstrlenA(buf) + 1) != ERROR_SUCCESS) 321 #else322 snprintf(buf, strlen(buf), "%u", attr->wLibFlags);323 if (RegSetValueExA(subKey, NULL, 0, REG_SZ,324 buf, lstrlenA(buf) + 1) != ERROR_SUCCESS)325 #endif326 328 res = E_FAIL; 327 329 }
Note:
See TracChangeset
for help on using the changeset viewer.