summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-12 04:35:30 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-12 04:35:30 +0000
commiteca7c7bdf01a8d99be3390e1ba1c6464419623c1 (patch)
treeae3b57bf9351caaab88f0f6f117079b585b79324 /win32
parent6531904a1c6eeb092da7d7f2f4b6a559b1edd6f6 (diff)
* win32/win32.c (link): raise NotImplementedError on Win9X.
contributed by Tietew. [ruby-dev:22713] * win32/win32.c, win32/win32.h (link): add const. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c5
-rw-r--r--win32/win32.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 43c69078d4..4436464697 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -2593,7 +2593,7 @@ kill(int pid, int sig)
}
int
-link(char *from, char *to)
+link(const char *from, const char *to)
{
static BOOL (WINAPI *pCreateHardLink)(LPCTSTR, LPCTSTR, LPSECURITY_ATTRIBUTES) = NULL;
static int myerrno = 0;
@@ -2605,9 +2605,8 @@ link(char *from, char *to)
if (hKernel) {
pCreateHardLink = (BOOL (WINAPI *)(LPCTSTR, LPCTSTR, LPSECURITY_ATTRIBUTES))GetProcAddress(hKernel, "CreateHardLinkA");
if (!pCreateHardLink) {
- myerrno = map_errno(GetLastError());
+ rb_notimplement();
}
- CloseHandle(hKernel);
}
else {
myerrno = map_errno(GetLastError());
diff --git a/win32/win32.h b/win32/win32.h
index 33aa60619c..82bc90ed77 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -172,7 +172,7 @@ extern int rb_w32_vsnprintf(char *, size_t, const char *, va_list);
extern int rb_w32_snprintf(char *, size_t, const char *, ...);
extern int chown(const char *, int, int);
-extern int link(char *, char *);
+extern int link(const char *, const char *);
extern int gettimeofday(struct timeval *, struct timezone *);
extern pid_t waitpid (pid_t, int *, int);
extern int do_spawn(int, char *);