Ignore:
Timestamp:
Jun 18, 2012, 12:50:38 AM (13 years ago)
Author:
bird
Message:

kmk build fixes for win.amd64.

Location:
trunk/src/kmk/kmkbuiltin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/mscfakes.c

    r2484 r2592  
    533533
    534534
    535 #undef stat
    536535/*
    537536 * Workaround for directory names with trailing slashes.
    538  * Added by bird reasons stated.
    539537 */
     538#undef stat
    540539int
    541 my_other_stat(const char *path, struct stat *st)
     540bird_w32_stat(const char *path, struct stat *st)
    542541{
    543542    int rc = stat(path, st);
     
    564563        }
    565564    }
    566     return rc;
    567 }
    568 
     565#ifdef KMK_PRF
     566    {
     567        int err = errno;
     568        fprintf(stderr, "stat(%s,) -> %d/%d\n", path, rc, errno);
     569        errno = err;
     570    }
     571#endif
     572    return rc;
     573}
     574
  • trunk/src/kmk/kmkbuiltin/mscfakes.h

    r2413 r2592  
    3535#include "getopt.h"
    3636
     37/* Note: Duplicated it config.h.win */
     38#include <sys/stat.h>
     39#include <io.h>
     40#include <direct.h>
    3741#if defined(MSC_DO_64_BIT_IO) && _MSC_VER >= 1400 /* We want 64-bit file lengths here when possible. */
    3842# define off_t __int64
     43# undef stat
    3944# define stat  _stat64
    4045# define fstat _fstat64
    4146# define lseek _lseeki64
    4247#else
    43 # undef stat
    44 # define stat(_path, _st) my_other_stat(_path, _st)
    45 extern int my_other_stat(const char *, struct stat *);
     48# ifndef STAT_REDEFINED_ALREADY
     49#  define STAT_REDEFINED_ALREADY
     50#  undef stat
     51#  define stat(_path, _st) bird_w32_stat(_path, _st)
     52extern int bird_w32_stat(const char *, struct stat *);
     53# endif
    4654#endif
    47 
    48 
    4955
    5056#ifndef S_ISDIR
Note: See TracChangeset for help on using the changeset viewer.