Ignore:
Timestamp:
Dec 18, 2011, 10:28:22 PM (14 years ago)
Author:
dmik
Message:

Merge branch gcc-kmk to trunk.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 bin
        2 Makefile.inc
         1env.cmd
         2LocalConfig.kmk
    • Property svn:mergeinfo set to
      /branches/gcc-kmkmergedeligible
  • trunk/src/oleaut32/old/typelib.cpp

    r6505 r21916  
    2020#define DEBUG2
    2121
     22#ifdef DEBUG
     23#include <process.h>
     24#endif
     25
    2226#include "oleaut32.h"
    2327#include "olectl.h"
     
    2529#include "itypelib.h"
    2630
     31#if defined(__WIN32OS2__) && !defined(__GNUC__)
     32#define snprintf wsnprintfA
     33#endif
     34
    2735static FILE *_privateLogFile = NULL;
    2836
     
    3543    char logname[1024];
    3644
    37     sprintf(logname, "tlib_%d.log", loadNr);
     45    sprintf(logname, "tlib_%d.log", getpid());
    3846    _privateLogFile = fopen(logname, "w");
    3947    if(_privateLogFile == NULL)
    4048    {
    41         sprintf(logname, "%stlib_%d.log", oleaut32Path, loadNr);
     49        sprintf(logname, "%stlib_%d.log", oleaut32Path, getpid());
    4250        _privateLogFile = fopen(logname, "w");
    4351    }
     
    268276    guidA = HEAP_strdupWtoA(GetProcessHeap(), 0, guid);
    269277#ifdef __WIN32OS2__
    270     sprintf(keyName, "SOFTWARE\\Classes\\TypeLib\\%s\\%x.%x",
     278    snprintf(keyName, sizeof(keyName), "SOFTWARE\\Classes\\TypeLib\\%s\\%x.%x",
    271279            guidA, attr->wMajorVerNum, attr->wMinorVerNum);
    272280#else
     
    315323            CHAR buf[20];
    316324            /* FIXME: is %u correct? */
    317 #ifdef __WIN32OS2__
    318             sprintf(buf, "%u", attr->wLibFlags);
     325            snprintf(buf, strlen(buf), "%u", attr->wLibFlags);
    319326            if (RegSetValueExA(subKey, NULL, 0, REG_SZ,
    320327                (LPBYTE)buf, lstrlenA(buf) + 1) != ERROR_SUCCESS)
    321 #else
    322             snprintf(buf, strlen(buf), "%u", attr->wLibFlags);
    323             if (RegSetValueExA(subKey, NULL, 0, REG_SZ,
    324                 buf, lstrlenA(buf) + 1) != ERROR_SUCCESS)
    325 #endif
    326328                res = E_FAIL;
    327329        }
Note: See TracChangeset for help on using the changeset viewer.