mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	win32.c: fake lchown
* win32/win32.c (lchown, rb_w32_ulchown): fake lchown. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									f4b66d24bb
								
							
						
					
					
						commit
						597da7b2d0
					
				
					 6 changed files with 22 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1106,6 +1106,7 @@ main()
 | 
			
		|||
		ac_cv_func_isinf=yes
 | 
			
		||||
		ac_cv_func_isnan=yes
 | 
			
		||||
		ac_cv_func_finite=yes
 | 
			
		||||
		ac_cv_func_lchown=yes
 | 
			
		||||
		ac_cv_func_link=yes
 | 
			
		||||
		ac_cv_func_readlink=yes
 | 
			
		||||
		ac_cv_func_symlink=yes
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -87,6 +87,7 @@ ifeq (@target_os@,mingw32)
 | 
			
		|||
$(OBJS) $(MAINOBJ): win32.h
 | 
			
		||||
 | 
			
		||||
dir.$(OBJEXT) win32/win32.$(OBJEXT): win32/dir.h
 | 
			
		||||
file.$(OBJEXT) win32/win32.$(OBJEXT): win32/file.h
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
$(LIBRUBY_SO): $(RUBYDEF)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3
									
								
								file.c
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								file.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -94,6 +94,7 @@ int flock(int, int);
 | 
			
		|||
 | 
			
		||||
/* define system APIs */
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
#include "win32/file.h"
 | 
			
		||||
#define STAT(p, s)	rb_w32_ustati64((p), (s))
 | 
			
		||||
#undef lstat
 | 
			
		||||
#define lstat(p, s)	rb_w32_ulstati64((p), (s))
 | 
			
		||||
| 
						 | 
				
			
			@ -103,6 +104,8 @@ int flock(int, int);
 | 
			
		|||
#define chmod(p, m)	rb_w32_uchmod((p), (m))
 | 
			
		||||
#undef chown
 | 
			
		||||
#define chown(p, o, g)	rb_w32_uchown((p), (o), (g))
 | 
			
		||||
#undef lchown
 | 
			
		||||
#define lchown(p, o, g)	rb_w32_ulchown((p), (o), (g))
 | 
			
		||||
#undef utime
 | 
			
		||||
#define utime(p, t)	rb_w32_uutime((p), (t))
 | 
			
		||||
#undef link
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -720,6 +720,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
 | 
			
		|||
#define HAVE_LINK 1
 | 
			
		||||
#define HAVE_READLINK 1
 | 
			
		||||
#define HAVE_SYMLINK 1
 | 
			
		||||
#define HAVE_LCHOWN 1
 | 
			
		||||
#define HAVE__SETJMP 1
 | 
			
		||||
#define HAVE_TELLDIR 1
 | 
			
		||||
#define HAVE_SEEKDIR 1
 | 
			
		||||
| 
						 | 
				
			
			@ -1138,6 +1139,7 @@ enc/jis/props.h: {$(srcdir)}enc/jis/props.h.blt
 | 
			
		|||
$(OBJS): {$(hdrdir)/ruby}win32.h
 | 
			
		||||
 | 
			
		||||
dir.$(OBJEXT) win32/win32.$(OBJEXT): {$(srcdir)}win32/dir.h
 | 
			
		||||
file.$(OBJEXT) win32/win32.$(OBJEXT): {$(VPATH)}win32/file.h
 | 
			
		||||
 | 
			
		||||
ext/extinit.obj: ext/extinit.c $(SETUP)
 | 
			
		||||
	$(ECHO) compiling ext/extinit.c
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,4 +37,7 @@ typedef struct {
 | 
			
		|||
int rb_w32_read_reparse_point(const WCHAR *path, rb_w32_reparse_buffer_t *rp,
 | 
			
		||||
			      size_t bufsize, WCHAR **result, DWORD *len);
 | 
			
		||||
 | 
			
		||||
int lchown(const char *path, int owner, int group);
 | 
			
		||||
int rb_w32_ulchown(const char *path, int owner, int group);
 | 
			
		||||
 | 
			
		||||
#endif	/* RUBY_WIN32_FILE_H */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4482,6 +4482,18 @@ rb_w32_uchown(const char *path, int owner, int group)
 | 
			
		|||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
lchown(const char *path, int owner, int group)
 | 
			
		||||
{
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
rb_w32_ulchown(const char *path, int owner, int group)
 | 
			
		||||
{
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* License: Ruby's */
 | 
			
		||||
int
 | 
			
		||||
kill(int pid, int sig)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue