Changeset 334

Show
Ignore:
Timestamp:
05/02/08 17:30:34 (2 months ago)
Author:
hsattler
Message:

allow cygwin to build ircp like on any other unix, not buildable on non-UNIX compile environments (all others in Windows)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ircp/dirtraverse.c

    r316 r334  
    99#include <sys/types.h> 
    1010 
    11 #ifndef _WIN32 
     11#if ! defined(_WIN32) 
    1212#include <dirent.h> 
    1313#include <sys/param.h> 
     
    2525int visit_dir(char *path, visit_cb cb, void *userdata) 
    2626{ 
    27 #ifdef _MSC_VER 
    28         /** TODO */ 
    29         return -1; 
    30 #else 
     27#if ! defined(_WIN32) 
    3128        struct stat statbuf; 
    3229        DIR *dir; 
     
    4845                else { 
    4946                        snprintf(t, MAXPATHLEN, "%s/%s", path, dirent->d_name); 
    50 #ifdef _WIN32 
    51 #warning "Do not use symbolic links in Windows Vista or fix this." 
    52                         if (stat(t, &statbuf) < 0) { 
    53 #else 
    5447                        if(lstat(t, &statbuf) < 0) { 
    55 #endif 
    5648                                return -1; 
    5749                        } 
     
    8476out: 
    8577        return ret; 
     78 
     79#else 
     80        /** TODO */ 
     81        return -1; 
    8682#endif 
    8783}