Changeset 1363 in svn


Ignore:
Timestamp:
2013-09-09T13:34:16+02:00 (23 months ago)
Author:
Xuefer
Message:

cygwin hack unlink should be cygwin only

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache/xc_lock.c

    r1245 r1363  
    6767typedef struct {
    6868    HANDLE fd;
     69#ifdef __CYGWIN__
     70    /* store the path for unlink() later */
    6971    char *pathname;
     72#endif
    7073} xc_fcntl_lock_t;
    7174
     
    150153    if (fd != INVALID_HANDLE_VALUE) {
    151154
    152 #ifndef __CYGWIN__
    153         unlink(pathname);
    154 #endif
    155155        lck->fd = fd;
     156#ifdef __CYGWIN__
    156157        size = strlen(pathname) + 1;
    157158        lck->pathname = malloc(size);
    158159        memcpy(lck->pathname, pathname, size);
     160#else
     161        unlink(pathname);
     162#endif
    159163    }
    160164    else {
     
    175179#ifdef __CYGWIN__
    176180    unlink(lck->pathname);
    177 #endif
    178181    free(lck->pathname);
     182#endif
    179183}
    180184/* }}} */
Note: See TracChangeset for help on using the changeset viewer.