Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
df9537ea
Commit
df9537ea
authored
Jan 11, 2003
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Jan 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use inline functions instead of macros to avoid problems in C++.
Inline functions respect scope, whereas macros don't. Define umask in sys/stat.h, and mode_t in sys/types.h.
parent
6843fee6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
26 deletions
+45
-26
io.h
include/msvcrt/io.h
+26
-20
stdio.h
include/msvcrt/stdio.h
+4
-1
stat.h
include/msvcrt/sys/stat.h
+7
-2
timeb.h
include/msvcrt/sys/timeb.h
+1
-1
types.h
include/msvcrt/sys/types.h
+6
-1
utime.h
include/msvcrt/sys/utime.h
+1
-1
No files found.
include/msvcrt/io.h
View file @
df9537ea
...
...
@@ -156,27 +156,33 @@ int _wunlink(const MSVCRT(wchar_t)*);
#ifndef USE_MSVCRT_PREFIX
#define access _access
#define chmod _chmod
#define chsize _chsize
#define close _close
#define creat _creat
#define dup _dup
#define dup2 _dup2
#define eof _eof
#define filelength _filelength
#define isatty _isatty
#define locking _locking
#define lseek _lseek
#define mktemp _mktemp
static
inline
int
access
(
const
char
*
path
,
int
mode
)
{
return
_access
(
path
,
mode
);
}
static
inline
int
chmod
(
const
char
*
path
,
int
mode
)
{
return
_chmod
(
path
,
mode
);
}
static
inline
int
chsize
(
int
fd
,
long
size
)
{
return
_chsize
(
fd
,
size
);
}
static
inline
int
close
(
int
fd
)
{
return
_close
(
fd
);
}
static
inline
int
creat
(
const
char
*
path
,
int
mode
)
{
return
_creat
(
path
,
mode
);
}
static
inline
int
dup
(
int
od
)
{
return
_dup
(
od
);
}
static
inline
int
dup2
(
int
od
,
int
nd
)
{
return
_dup2
(
od
,
nd
);
}
static
inline
int
eof
(
int
fd
)
{
return
_eof
(
fd
);
}
static
inline
long
filelength
(
int
fd
)
{
return
_filelength
(
fd
);
}
static
inline
int
isatty
(
int
fd
)
{
return
_isatty
(
fd
);
}
static
inline
int
locking
(
int
fd
,
int
mode
,
long
size
)
{
return
_locking
(
fd
,
mode
,
size
);
}
static
inline
long
lseek
(
int
fd
,
long
off
,
int
where
)
{
return
_lseek
(
fd
,
off
,
where
);
}
static
inline
char
*
mktemp
(
char
*
pat
)
{
return
_mktemp
(
pat
);
}
#define open _open
#define read _read
#define setmode _setmode
static
inline
int
read
(
int
fd
,
void
*
buf
,
unsigned
int
size
)
{
return
_read
(
fd
,
buf
,
size
);
}
static
inline
int
setmode
(
int
fd
,
int
mode
)
{
return
_setmode
(
fd
,
mode
);
}
#define sopen _sopen
#define tell _tell
#define umask _umask
#define unlink _unlink
#define write _write
#endif
/* USE_MSVCRT_PREFIX */
static
inline
long
tell
(
int
fd
)
{
return
_tell
(
fd
);
}
#ifndef MSVCRT_UMASK_DEFINED
static
inline
int
umask
(
int
fd
)
{
return
_umask
(
fd
);
}
#define MSVCRT_UMASK_DEFINED
#endif
#ifndef MSVCRT_UNLINK_DEFINED
static
inline
int
unlink
(
const
char
*
path
)
{
return
_unlink
(
path
);
}
#define MSVCRT_UNLINK_DEFINED
#endif
static
inline
int
write
(
int
fd
,
const
void
*
buf
,
unsigned
int
size
)
{
return
_write
(
fd
,
buf
,
size
);
}
#endif
/* USE _MSVCRT_PREFIX */
#endif
/* __WINE_IO_H */
include/msvcrt/stdio.h
View file @
df9537ea
...
...
@@ -263,7 +263,10 @@ int MSVCRT(wscanf)(const MSVCRT(wchar_t)*,...);
#define pclose _pclose
#define popen _popen
#define tempnam _tempnam
#define unlink _unlink
#ifndef MSVCRT_UNLINK_DEFINED
static
inline
int
unlink
(
const
char
*
path
)
{
return
_unlink
(
path
);
}
#define MSVCRT_UNLINK_DEFINED
#endif
#define fgetwchar _fgetwchar
#define fputwchar _fputwchar
...
...
include/msvcrt/sys/stat.h
View file @
df9537ea
...
...
@@ -106,6 +106,7 @@ int MSVCRT(_fstat)(int,struct _stat*);
int
MSVCRT
(
_stat
)(
const
char
*
,
struct
_stat
*
);
int
_fstati64
(
int
,
struct
_stati64
*
);
int
_stati64
(
const
char
*
,
struct
_stati64
*
);
int
_umask
(
int
);
#ifndef MSVCRT_WSTAT_DEFINED
#define MSVCRT_WSTAT_DEFINED
...
...
@@ -127,8 +128,12 @@ int _wstati64(const MSVCRT(wchar_t)*,struct _stati64*);
#define S_IWRITE _S_IWRITE
#define S_IEXEC _S_IEXEC
#define fstat _fstat
#define stat _stat
static
inline
int
fstat
(
int
fd
,
struct
_stat
*
ptr
)
{
return
_fstat
(
fd
,
ptr
);
}
static
inline
int
stat
(
const
char
*
path
,
struct
_stat
*
ptr
)
{
return
_stat
(
path
,
ptr
);
}
#ifndef MSVCRT_UMASK_DEFINED
static
inline
int
umask
(
int
fd
)
{
return
_umask
(
fd
);
}
#define MSVCRT_UMASK_DEFINED
#endif
#endif
/* USE_MSVCRT_PREFIX */
#endif
/* __WINE_SYS_STAT_H */
include/msvcrt/sys/timeb.h
View file @
df9537ea
...
...
@@ -60,7 +60,7 @@ void _ftime(struct _timeb*);
#ifndef USE_MSVCRT_PREFIX
#define timeb _timeb
#define ftime _ftime
static
inline
void
ftime
(
struct
_timeb
*
ptr
)
{
return
_ftime
(
ptr
);
}
#endif
/* USE_MSVCRT_PREFIX */
#endif
/* __WINE_SYS_TIMEB_H */
include/msvcrt/sys/types.h
View file @
df9537ea
...
...
@@ -39,6 +39,11 @@ typedef unsigned short _ino_t;
#define MSVCRT_INO_T_DEFINED
#endif
#ifndef MSVCRT_MODE_T_DEFINED
typedef
unsigned
short
_mode_t
;
#define MSVCRT_MODE_T_DEFINED
#endif
#ifndef MSVCRT_OFF_T_DEFINED
typedef
int
MSVCRT
(
_off_t
);
#define MSVCRT_OFF_T_DEFINED
...
...
@@ -49,10 +54,10 @@ typedef long MSVCRT(time_t);
#define MSVCRT_TIME_T_DEFINED
#endif
#ifndef USE_MSVCRT_PREFIX
#define dev_t _dev_t
#define ino_t _ino_t
#define mode_t _mode_t
#define off_t _off_t
#endif
/* USE_MSVCRT_PREFIX */
...
...
include/msvcrt/sys/utime.h
View file @
df9537ea
...
...
@@ -67,7 +67,7 @@ int _wutime(const MSVCRT(wchar_t)*,struct _utimbuf*);
#ifndef USE_MSVCRT_PREFIX
#define utimbuf _utimbuf
#define utime _utime
static
inline
int
utime
(
const
char
*
path
,
struct
_utimbuf
*
buf
)
{
return
_utime
(
path
,
buf
);
}
#endif
/* USE_MSVCRT_PREFIX */
#endif
/* __WINE_SYS_UTIME_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment