Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
f1a0de99
Commit
f1a0de99
authored
Jan 07, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added configure check for pread/pwrite.
parent
99a5cfea
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
0 deletions
+71
-0
configure
configure
+0
-0
configure.in
configure.in
+2
-0
config.h.in
include/config.h.in
+6
-0
obj_storage.h
include/wine/obj_storage.h
+1
-0
port.h
include/wine/port.h
+9
-0
port.c
library/port.c
+53
-0
No files found.
configure
View file @
f1a0de99
This diff is collapsed.
Click to expand it.
configure.in
View file @
f1a0de99
...
@@ -818,6 +818,8 @@ AC_CHECK_FUNCS(\
...
@@ -818,6 +818,8 @@ AC_CHECK_FUNCS(\
lstat \
lstat \
memmove \
memmove \
mmap \
mmap \
pread \
pwrite \
rfork \
rfork \
select \
select \
sendmsg \
sendmsg \
...
...
include/config.h.in
View file @
f1a0de99
...
@@ -121,6 +121,12 @@
...
@@ -121,6 +121,12 @@
/* Define if you have the openpty function. */
/* Define if you have the openpty function. */
#undef HAVE_OPENPTY
#undef HAVE_OPENPTY
/* Define if you have the pread function. */
#undef HAVE_PREAD
/* Define if you have the pwrite function. */
#undef HAVE_PWRITE
/* Define if you have the resizeterm function. */
/* Define if you have the resizeterm function. */
#undef HAVE_RESIZETERM
#undef HAVE_RESIZETERM
...
...
include/wine/obj_storage.h
View file @
f1a0de99
...
@@ -14,6 +14,7 @@ extern "C" {
...
@@ -14,6 +14,7 @@ extern "C" {
*/
*/
typedef
enum
tagLOCKTYPE
typedef
enum
tagLOCKTYPE
{
{
#undef LOCK_WRITE
LOCK_WRITE
=
1
,
LOCK_WRITE
=
1
,
LOCK_EXCLUSIVE
=
2
,
LOCK_EXCLUSIVE
=
2
,
LOCK_ONLYONCE
=
4
LOCK_ONLYONCE
=
4
...
...
include/wine/port.h
View file @
f1a0de99
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
# error You must include config.h to use this header
# error You must include config.h to use this header
#endif
#endif
#define _GNU_SOURCE
/* for pread/pwrite */
#include <fcntl.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/time.h>
...
@@ -135,6 +136,14 @@ int usleep (unsigned int useconds);
...
@@ -135,6 +136,14 @@ int usleep (unsigned int useconds);
int
lstat
(
const
char
*
file_name
,
struct
stat
*
buf
);
int
lstat
(
const
char
*
file_name
,
struct
stat
*
buf
);
#endif
/* HAVE_LSTAT */
#endif
/* HAVE_LSTAT */
#ifndef HAVE_PREAD
ssize_t
pread
(
int
fd
,
void
*
buf
,
size_t
count
,
off_t
offset
);
#endif
/* HAVE_PREAD */
#ifndef HAVE_PWRITE
ssize_t
pwrite
(
int
fd
,
const
void
*
buf
,
size_t
count
,
off_t
offset
);
#endif
/* HAVE_PWRITE */
#ifndef S_ISLNK
#ifndef S_ISLNK
#define S_ISLNK(mod) (0)
#define S_ISLNK(mod) (0)
#endif
/* S_ISLNK */
#endif
/* S_ISLNK */
...
...
library/port.c
View file @
f1a0de99
...
@@ -379,6 +379,59 @@ int lstat(const char *file_name, struct stat *buf)
...
@@ -379,6 +379,59 @@ int lstat(const char *file_name, struct stat *buf)
}
}
#endif
/* HAVE_LSTAT */
#endif
/* HAVE_LSTAT */
/***********************************************************************
* pread
*
* FIXME: this is not thread-safe
*/
#ifndef HAVE_PREAD
ssize_t
pread
(
int
fd
,
void
*
buf
,
size_t
count
,
off_t
offset
)
{
ssize_t
ret
;
off_t
old_pos
;
if
((
old_pos
=
lseek
(
fd
,
0
,
SEEK_CUR
))
==
-
1
)
return
-
1
;
if
(
lseek
(
fd
,
offset
,
SEEK_SET
)
==
-
1
)
return
-
1
;
if
((
ret
=
read
(
fd
,
buf
,
count
))
==
-
1
)
{
int
err
=
errno
;
/* save errno */
lseek
(
fd
,
old_pos
,
SEEK_SET
);
errno
=
err
;
return
-
1
;
}
if
(
lseek
(
fd
,
old_pos
,
SEEK_SET
)
==
-
1
)
return
-
1
;
return
ret
;
}
#endif
/* HAVE_PREAD */
/***********************************************************************
* pwrite
*
* FIXME: this is not thread-safe
*/
#ifndef HAVE_PWRITE
ssize_t
pwrite
(
int
fd
,
const
void
*
buf
,
size_t
count
,
off_t
offset
)
{
ssize_t
ret
;
off_t
old_pos
;
if
((
old_pos
=
lseek
(
fd
,
0
,
SEEK_CUR
))
==
-
1
)
return
-
1
;
if
(
lseek
(
fd
,
offset
,
SEEK_SET
)
==
-
1
)
return
-
1
;
if
((
ret
=
write
(
fd
,
buf
,
count
))
==
-
1
)
{
int
err
=
errno
;
/* save errno */
lseek
(
fd
,
old_pos
,
SEEK_SET
);
errno
=
err
;
return
-
1
;
}
if
(
lseek
(
fd
,
old_pos
,
SEEK_SET
)
==
-
1
)
return
-
1
;
return
ret
;
}
#endif
/* HAVE_PWRITE */
/***********************************************************************
/***********************************************************************
* getrlimit
* getrlimit
*/
*/
...
...
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