Changeset 13 in libcf


Ignore:
Timestamp:
01/31/13 16:31:19 (11 years ago)
Author:
cheese
Message:

#1 remove getting disk block size using stat and fix windows project and compile error

Location:
trunk
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/cf_log.c

    r12 r13  
    1414
    1515#ifdef _WIN32
     16# include <Windows.h>
    1617#else // #ifdef _WIN32
    17 # include <sys/stat.h>
    1818# include <sys/time.h>
    1919#endif // #ifdef _WIN32
     
    5656
    5757typedef struct __cf_log_environment__ {
    58     __blksize_t fsBlockSize;
    5958    CF_Log_Ctx  * ctxPool;
    6059    int         ctxSize;
     
    125124
    126125    gettimeofday (&timeVal, NULL);
    127     timeSt = localtime (&timeVal.tv_sec);
     126    timeSt = localtime ((const time_t *)&timeVal.tv_sec);
    128127
    129128    dt->year    = timeSt->tm_year + 1900;
     
    181180CF_Log_Initialize (const int logPool)
    182181{
    183     struct stat fsstat;
    184 
    185182    memset (&gLogEnvironment, 0x00, sizeof (CF_LOG_ENVIRONMENT));
    186183
    187     if (stat (".", &fsstat) < 0)
    188         return CF_ERROR_LOG_INITIALIZE;
    189 
    190     gLogEnvironment.fsBlockSize = fsstat.st_blksize;
    191184    if (logPool > 0)
    192185    {
  • trunk/windows/libcf/libcf.vcproj

    r10 r13  
    188188            </File>
    189189            <File
     190                RelativePath="..\..\src\cf_log.c"
     191                >
     192            </File>
     193            <File
    190194                RelativePath="..\..\src\cf_socket.c"
    191195                >
     
    214218            </File>
    215219            <File
     220                RelativePath="..\..\include\cf_log.h"
     221                >
     222            </File>
     223            <File
    216224                RelativePath="..\..\include\cf_socket.h"
    217225                >
Note: See TracChangeset for help on using the changeset viewer.