Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
dc1a9f19
Commit
dc1a9f19
authored
Dec 22, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libport: Replacement for poll().
parent
028617b9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
105 additions
and
3 deletions
+105
-3
configure
configure
+4
-1
configure.ac
configure.ac
+2
-1
Makedll.rules.in
dlls/Makedll.rules.in
+1
-1
Makefile.in
dlls/winhttp/Makefile.in
+1
-0
config.h.in
include/config.h.in
+3
-0
port.h
include/wine/port.h
+16
-0
Makefile.in
libs/port/Makefile.in
+1
-0
poll.c
libs/port/poll.c
+77
-0
No files found.
configure
View file @
dc1a9f19
...
...
@@ -7438,6 +7438,7 @@ done
for
ac_header
in
\
AudioUnit/AudioUnit.h
\
Carbon/Carbon.h
\
...
...
@@ -7551,6 +7552,7 @@ for ac_header in \
termios.h
\
unistd.h
\
utime.h
\
winsock2.h
\
valgrind/memcheck.h
\
valgrind/valgrind.h
...
...
@@ -14580,6 +14582,7 @@ fi
for
ac_header
in
ft2build.h
\
freetype/freetype.h
\
freetype/ftglyph.h
\
...
...
@@ -17694,7 +17697,7 @@ case $host_os in
mingw32
*
)
CRTLIBS
=
"-lmsvcrt"
SOCKETLIBS
=
"-lws2_32"
SOCKETLIBS
=
"-
L
\$
(TOPOBJDIR)/dlls/ws2_32 -
lws2_32"
;;
esac
...
...
configure.ac
View file @
dc1a9f19
...
...
@@ -351,6 +351,7 @@ AC_CHECK_HEADERS(\
termios.h \
unistd.h \
utime.h \
winsock2.h \
valgrind/memcheck.h \
valgrind/valgrind.h
)
...
...
@@ -1334,7 +1335,7 @@ dnl Mingw needs explicit msvcrt for linking libwine and winsock for wininet
case $host_os in
mingw32*)
AC_SUBST(CRTLIBS,"-lmsvcrt")
AC_SUBST(SOCKETLIBS,"-lws2_32")
AC_SUBST(SOCKETLIBS,"-
L\$(TOPOBJDIR)/dlls/ws2_32 -
lws2_32")
;;
esac
...
...
dlls/Makedll.rules.in
View file @
dc1a9f19
...
...
@@ -18,7 +18,7 @@ MAINSPEC = $(BASEMODULE).spec
SPEC_DEF = $(BASEMODULE).def
WIN16_FILES = $(SPEC_SRCS16:.spec=.spec.o) $(C_SRCS16:.c=.o) $(EXTRA_OBJS16)
ALL_OBJS = @WIN16_FILES@ $(OBJS) $(RC_SRCS:.rc=.res)
ALL_LIBS = $(
EXTRALIBS) $(LIBPORT
) $(LDFLAGS) $(LIBS)
ALL_LIBS = $(
LIBPORT) $(EXTRALIBS
) $(LDFLAGS) $(LIBS)
IMPLIB_OBJS = $(IMPLIB_SRCS:.c=.o)
IMPORTLIBFILE = $(IMPORTLIB:%=lib%.$(IMPLIBEXT))
STATICIMPLIB = $(IMPORTLIBFILE:.def=.def.a)
...
...
dlls/winhttp/Makefile.in
View file @
dc1a9f19
...
...
@@ -6,6 +6,7 @@ MODULE = winhttp.dll
IMPORTLIB
=
winhttp
IMPORTS
=
shlwapi kernel32
DELAYIMPORTS
=
crypt32
EXTRALIBS
=
@SOCKETLIBS@
C_SRCS
=
\
cookie.c
\
...
...
include/config.h.in
View file @
dc1a9f19
...
...
@@ -960,6 +960,9 @@
/* Define to 1 if you have the `waitpid' function. */
#undef HAVE_WAITPID
/* Define to 1 if you have the <winsock2.h> header file. */
#undef HAVE_WINSOCK2_H
/* Define to 1 if you have the <X11/extensions/shape.h> header file. */
#undef HAVE_X11_EXTENSIONS_SHAPE_H
...
...
include/wine/port.h
View file @
dc1a9f19
...
...
@@ -305,6 +305,22 @@ int lstat(const char *file_name, struct stat *buf);
void
*
memmove
(
void
*
dest
,
const
void
*
src
,
size_t
len
);
#endif
/* !defined(HAVE_MEMMOVE) */
#ifndef HAVE_POLL
struct
pollfd
{
int
fd
;
short
events
;
short
revents
;
};
#define POLLIN 0x01
#define POLLPRI 0x02
#define POLLOUT 0x04
#define POLLERR 0x08
#define POLLHUP 0x10
#define POLLNVAL 0x20
int
poll
(
struct
pollfd
*
fds
,
unsigned
int
count
,
int
timeout
);
#endif
/* HAVE_POLL */
#ifndef HAVE_PREAD
ssize_t
pread
(
int
fd
,
void
*
buf
,
size_t
count
,
off_t
offset
);
#endif
/* HAVE_PREAD */
...
...
libs/port/Makefile.in
View file @
dc1a9f19
...
...
@@ -21,6 +21,7 @@ C_SRCS = \
memcpy_unaligned.c
\
memmove.c
\
mkstemps.c
\
poll.c
\
pread.c
\
pwrite.c
\
readlink.c
\
...
...
libs/port/poll.c
0 → 100644
View file @
dc1a9f19
/*
* poll function
*
* Copyright 2008 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#ifndef HAVE_POLL
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int
poll
(
struct
pollfd
*
fds
,
unsigned
int
count
,
int
timeout
)
{
fd_set
read_set
,
write_set
,
except_set
;
unsigned
int
i
;
int
maxfd
=
-
1
,
ret
;
FD_ZERO
(
&
read_set
);
FD_ZERO
(
&
write_set
);
FD_ZERO
(
&
except_set
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
fds
[
i
].
fd
==
-
1
)
continue
;
if
(
fds
[
i
].
events
&
(
POLLIN
|
POLLPRI
))
FD_SET
(
fds
[
i
].
fd
,
&
read_set
);
if
(
fds
[
i
].
events
&
POLLOUT
)
FD_SET
(
fds
[
i
].
fd
,
&
write_set
);
FD_SET
(
fds
[
i
].
fd
,
&
except_set
);
/* POLLERR etc. are always selected */
if
(
fds
[
i
].
fd
>
maxfd
)
maxfd
=
fds
[
i
].
fd
;
}
if
(
timeout
!=
-
1
)
{
struct
timeval
tv
;
tv
.
tv_sec
=
timeout
/
1000
;
tv
.
tv_usec
=
timeout
%
1000
;
ret
=
select
(
maxfd
+
1
,
&
read_set
,
&
write_set
,
&
except_set
,
&
tv
);
}
else
ret
=
select
(
maxfd
+
1
,
&
read_set
,
&
write_set
,
&
except_set
,
NULL
);
if
(
ret
>=
0
)
{
for
(
i
=
0
;
i
<
count
;
i
++
)
{
fds
[
i
].
revents
=
0
;
if
(
fds
[
i
].
fd
==
-
1
)
continue
;
if
(
FD_ISSET
(
fds
[
i
].
fd
,
&
read_set
))
fds
[
i
].
revents
|=
POLLIN
;
if
(
FD_ISSET
(
fds
[
i
].
fd
,
&
write_set
))
fds
[
i
].
revents
|=
POLLOUT
;
if
(
FD_ISSET
(
fds
[
i
].
fd
,
&
except_set
))
fds
[
i
].
revents
|=
POLLERR
;
}
}
return
ret
;
}
#endif
/* HAVE_POLL */
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