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
db7c934f
Commit
db7c934f
authored
Dec 01, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libport: Remove the strnlen() function replacement.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d9a58b60
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1 addition
and
48 deletions
+1
-48
configure
configure
+0
-1
configure.ac
configure.ac
+0
-1
shader_sm4.c
dlls/wined3d/shader_sm4.c
+1
-6
config.h.in
include/config.h.in
+0
-3
port.h
include/wine/port.h
+0
-5
Makefile.in
libs/port/Makefile.in
+0
-1
strnlen.c
libs/port/strnlen.c
+0
-31
No files found.
configure
View file @
db7c934f
...
...
@@ -17783,7 +17783,6 @@ for ac_func in \
setprogname
\
settimeofday
\
sigprocmask
\
strnlen
\
strtold
\
symlink
\
sysinfo
\
...
...
configure.ac
View file @
db7c934f
...
...
@@ -2192,7 +2192,6 @@ AC_CHECK_FUNCS(\
setprogname \
settimeofday \
sigprocmask \
strnlen \
strtold \
symlink \
sysinfo \
...
...
dlls/wined3d/shader_sm4.c
View file @
db7c934f
...
...
@@ -1939,18 +1939,13 @@ static HRESULT parse_dxbc(const char *data, SIZE_T data_size,
static
const
char
*
shader_get_string
(
const
char
*
data
,
size_t
data_size
,
DWORD
offset
)
{
size_t
len
,
max_len
;
if
(
offset
>=
data_size
)
{
WARN
(
"Invalid offset %#x (data size %#lx).
\n
"
,
offset
,
(
long
)
data_size
);
return
NULL
;
}
max_len
=
data_size
-
offset
;
len
=
strnlen
(
data
+
offset
,
max_len
);
if
(
len
==
max_len
)
if
(
!
memchr
(
data
+
offset
,
0
,
data_size
-
offset
))
return
NULL
;
return
data
+
offset
;
...
...
include/config.h.in
View file @
db7c934f
...
...
@@ -807,9 +807,6 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strnlen' function. */
#undef HAVE_STRNLEN
/* Define to 1 if you have the <stropts.h> header file. */
#undef HAVE_STROPTS_H
...
...
include/wine/port.h
View file @
db7c934f
...
...
@@ -273,10 +273,6 @@ ssize_t pwrite( int fd, const void *buf, size_t count, off_t offset );
int
readlink
(
const
char
*
path
,
char
*
buf
,
size_t
size
);
#endif
/* HAVE_READLINK */
#ifndef HAVE_STRNLEN
size_t
strnlen
(
const
char
*
str
,
size_t
maxlen
);
#endif
/* !defined(HAVE_STRNLEN) */
#ifndef HAVE_SYMLINK
int
symlink
(
const
char
*
from
,
const
char
*
to
);
#endif
...
...
@@ -296,7 +292,6 @@ extern int mkstemps(char *template, int suffix_len);
#define lstat __WINE_NOT_PORTABLE(lstat)
#define pread __WINE_NOT_PORTABLE(pread)
#define pwrite __WINE_NOT_PORTABLE(pwrite)
#define strnlen __WINE_NOT_PORTABLE(strnlen)
#define usleep __WINE_NOT_PORTABLE(usleep)
#endif
/* NO_LIBWINE_PORT */
...
...
libs/port/Makefile.in
View file @
db7c934f
...
...
@@ -12,6 +12,5 @@ C_SRCS = \
pwrite.c
\
readlink.c
\
spawn.c
\
strnlen.c
\
symlink.c
\
usleep.c
libs/port/strnlen.c
deleted
100644 → 0
View file @
d9a58b60
/*
* strnlen function
*
* Copyright 2017 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_STRNLEN
size_t
strnlen
(
const
char
*
str
,
size_t
maxlen
)
{
const
char
*
ptr
=
memchr
(
str
,
0
,
maxlen
);
if
(
!
ptr
)
return
maxlen
;
return
ptr
-
str
;
}
#endif
/* HAVE_STRNLEN */
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