mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* file.c (utimbuf): use utimbuf instead of _utimbuf if defined _WIN32.
* win32/Makefile.sub (LIBS): use oldnames.lib. * win32/win32.c (rb_w32_getcwd): follow above change. * win32/win32.h: ditto. * wince/direct.c, wince/direct.h (getcwd): ditto. * wince/io.h: ditto. * wince/string.c, wince/wince.h (stricmp, strnicmp): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d80285a9fe
commit
b369eea79f
10 changed files with 34 additions and 55 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
Sun Jan 5 03:12:32 2003 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* file.c (utimbuf): use utimbuf instead of _utimbuf if defined _WIN32.
|
||||
|
||||
* win32/Makefile.sub (LIBS): use oldnames.lib.
|
||||
|
||||
* win32/win32.c (rb_w32_getcwd): follow above change.
|
||||
|
||||
* win32/win32.h: ditto.
|
||||
|
||||
* wince/direct.c, wince/direct.h (getcwd): ditto.
|
||||
|
||||
* wince/io.h: ditto.
|
||||
|
||||
* wince/string.c, wince/wince.h (stricmp, strnicmp): ditto.
|
||||
|
||||
Sat Jan 4 15:18:50 2003 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* process.c (rb_proc_exec): use same logic as DJGPP on win32 ports.
|
||||
|
|
3
file.c
3
file.c
|
@ -1201,9 +1201,6 @@ struct utimbuf {
|
|||
long modtime;
|
||||
};
|
||||
#endif
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE)&& (defined(_MSC_VER) || defined(__MINGW__))
|
||||
# define utimbuf _utimbuf
|
||||
#endif
|
||||
|
||||
static void
|
||||
utime_internal(path, utp)
|
||||
|
|
|
@ -92,7 +92,7 @@ RFLAGS = -r
|
|||
!if !defined(EXTLIBS)
|
||||
EXTLIBS =
|
||||
!endif
|
||||
LIBS = user32.lib advapi32.lib wsock32.lib $(EXTLIBS)
|
||||
LIBS = oldnames.lib user32.lib advapi32.lib wsock32.lib $(EXTLIBS)
|
||||
MISSING = acosh.obj crypt.obj win32.obj isinf.obj isnan.obj
|
||||
|
||||
ARFLAGS = -machine:$(MACHINE) -out:
|
||||
|
|
|
@ -2398,12 +2398,8 @@ rb_w32_getcwd(buffer, size)
|
|||
int length;
|
||||
char *bp;
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#undef getcwd
|
||||
if (getcwd(buffer, size) == NULL) {
|
||||
#else
|
||||
if (_getcwd(buffer, size) == NULL) {
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
length = strlen(buffer);
|
||||
|
|
|
@ -98,46 +98,17 @@ extern "C++" {
|
|||
#define fgetchar() getchar()
|
||||
#define fputchar(_c) putchar(_c)
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
|
||||
#define access _access
|
||||
#define chmod _chmod
|
||||
#define chsize _chsize
|
||||
#define dup _dup
|
||||
#define dup2 _dup2
|
||||
#define isatty _isatty
|
||||
#define open _open
|
||||
#define setmode _setmode
|
||||
#define execl _execl
|
||||
#define execle _execle
|
||||
#define execlp _execlp
|
||||
#define execlpe _execlpe
|
||||
#define execv _execv
|
||||
#define execve _execve
|
||||
#define execvp _execvp
|
||||
#define execvpe _execvpe
|
||||
#define lseek _lseek
|
||||
#define spawnl _spawnl
|
||||
#define spawnle _spawnle
|
||||
#define spawnlp _spawnlp
|
||||
#define spawnlpe _spawnlpe
|
||||
#define spawnv _spawnv
|
||||
#define spawnve _spawnve
|
||||
#define spawnvp _spawnvp
|
||||
#define spawnvpe _spawnvpe
|
||||
#if _MSC_VER < 800
|
||||
#define fileno _fileno
|
||||
#endif
|
||||
#define strcasecmp _stricmp
|
||||
#define strncasecmp _strnicmp
|
||||
#else
|
||||
#define strcasecmp stricmp
|
||||
#define strncasecmp strnicmp
|
||||
#ifdef __BORLANDC__
|
||||
#define _open _sopen
|
||||
#endif
|
||||
|
||||
#define close rb_w32_close
|
||||
#define fclose rb_w32_fclose
|
||||
#define getpid rb_w32_getpid
|
||||
#define sleep(x) rb_w32_sleep((x)*1000)
|
||||
#ifdef __BORLANDC__
|
||||
#define creat _creat
|
||||
#define eof _eof
|
||||
#define filelength _filelength
|
||||
|
@ -150,9 +121,8 @@ extern "C++" {
|
|||
#define umask _umask
|
||||
#define unlink _unlink
|
||||
#define write _write
|
||||
#define getpid rb_w32_getpid
|
||||
#define sleep(x) rb_w32_sleep((x)*1000)
|
||||
#define utime _utime
|
||||
#endif
|
||||
#define vsnprintf _vsnprintf
|
||||
#define snprintf _snprintf
|
||||
#undef stat
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
static char _currentdir[MAX_PATH+1];
|
||||
|
||||
|
||||
char *_getcwd(char* buffer, int maxlen)
|
||||
char *getcwd(char* buffer, int maxlen)
|
||||
{
|
||||
strcpy( buffer, _currentdir );
|
||||
return buffer;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
char *_getcwd(char* buffer, int maxlen);
|
||||
char *getcwd(char* buffer, int maxlen);
|
||||
int _chdir(const char * dirname);
|
||||
int _rmdir(const char * dir);
|
||||
int _mkdir(const char * dir);
|
||||
|
@ -15,7 +15,6 @@ int _mkdir(const char * dir);
|
|||
};
|
||||
#endif
|
||||
|
||||
#define getcwd _getcwd
|
||||
#define chdir _chdir
|
||||
#define rmdir _rmdir
|
||||
#define mkdir _mkdir
|
||||
|
|
|
@ -49,6 +49,7 @@ int _findclose( long handle );
|
|||
};
|
||||
#endif
|
||||
|
||||
#define chmod _chmod
|
||||
#define chsize _chsize
|
||||
#define rename _rename
|
||||
#define unlink _unlink
|
||||
|
@ -61,6 +62,8 @@ int _findclose( long handle );
|
|||
#define isatty _isatty
|
||||
#define access _access
|
||||
#define pipe _pipe
|
||||
#define setmode _setmode
|
||||
#define lseek _lseek
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ char* strerror(int errno)
|
|||
return rb_w32_strerror(errno);
|
||||
}
|
||||
|
||||
/* _strnicmp already exists in stdlib.h? */
|
||||
int _strnicmp( const char *s1, const char *s2, size_t count )
|
||||
/* strnicmp already exists in stdlib.h? */
|
||||
int strnicmp( const char *s1, const char *s2, size_t count )
|
||||
{
|
||||
wchar_t *w1, *w2;
|
||||
int n;
|
||||
|
@ -53,7 +53,7 @@ char *strrchr( const char *p, int c )
|
|||
return pp==p ? NULL : pp;
|
||||
}
|
||||
|
||||
int _stricmp( const char *s1, const char *s2 )
|
||||
int stricmp( const char *s1, const char *s2 )
|
||||
{
|
||||
wchar_t *w1, *w2;
|
||||
int n;
|
||||
|
|
|
@ -57,10 +57,8 @@ extern "C" {
|
|||
/* Win32 API redifinition. */
|
||||
|
||||
#ifdef GetCommandLine
|
||||
#undef GetCommandLine
|
||||
#define GetCommandLine GetCommandLineA
|
||||
#else
|
||||
#define GetCommandLine GetCommandLineA
|
||||
#undef GetCommandLine
|
||||
#define GetCommandLine GetCommandLineA
|
||||
#endif
|
||||
|
||||
#ifdef SetFileAttributes
|
||||
|
@ -141,7 +139,7 @@ char *_fullpath(char *absPath, const char *relPath, size_t maxLength);
|
|||
/* string.c */
|
||||
char *strdup(const char * str);
|
||||
/* char *strerror(int errno); */
|
||||
int _strnicmp( const char *s1, const char *s2, size_t count );
|
||||
int strnicmp( const char *s1, const char *s2, size_t count );
|
||||
|
||||
#define strnicmp _strnicmp
|
||||
|
||||
|
@ -192,7 +190,7 @@ void wce_FreeCommandLine(void);
|
|||
#if _WIN32_WCE < 300
|
||||
/* for Handheld PC Pro. */
|
||||
char *strrchr( const char *p, int c );
|
||||
int _stricmp( const char *p1, const char *p2 );
|
||||
int stricmp( const char *p1, const char *p2 );
|
||||
VOID ZeroMemory(PVOID p, DWORD length);
|
||||
|
||||
#define isascii(c) ( (c>=0x00&&c<=0x7f)?1:0 )
|
||||
|
|
Loading…
Add table
Reference in a new issue