Commits

Anonymous committed 3309241

r2491@LENOVO-6D4C2336: sugawara | 2008-09-13 21:40:04 +0900

Comments (0)

Files changed (2)

ext/libtar/win32/tarruby_stat.c

-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <malloc.h>
-
-int tarruby_stat(const char *path, struct stat *buf) {
-  int len;
-  char *path0;
-
-  len = strlen(path);
-
-  if (path[len - 1] == '/' || path[len - 1] == '\\') {
-    path0 = _alloca(len);
-    memcpy_s(path0, len, path, len - 1);
-    path0[len - 1] = '\0';
-    return stat(path0, buf);
-  } else {
-    return stat(path, buf);
-  }
-}

ext/libtar/win32/tarruby_stat.h

-#ifndef __TARRUBY_STAT_H__
-#define __TARRUBY_STAT_H__
-
-int tarruby_stat(const char *path, struct stat *buf);
-
-#endif