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
3a688e81
Commit
3a688e81
authored
Dec 05, 2022
by
Brendan Shanks
Committed by
Alexandre Julliard
Jan 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include/msvcrt: Add __WINE_(DEALLOC|MALLOC) attributes to _strdup and _wcsdup.
parent
8e942f9e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
corecrt.h
include/msvcrt/corecrt.h
+12
-0
corecrt_wstring.h
include/msvcrt/corecrt_wstring.h
+2
-1
string.h
include/msvcrt/string.h
+2
-1
No files found.
include/msvcrt/corecrt.h
View file @
3a688e81
...
...
@@ -342,4 +342,16 @@ typedef struct threadlocaleinfostruct {
#define __WINE_CRT_SCANF_ATTR(fmt,args)
#endif
#if defined(__GNUC__) && (__GNUC__ > 10)
#define __WINE_DEALLOC(...) __attribute__((malloc (__VA_ARGS__)))
#else
#define __WINE_DEALLOC(...)
#endif
#if defined(__GNUC__) && (__GNUC__ > 2)
#define __WINE_MALLOC __attribute__((malloc))
#else
#define __WINE_MALLOC
#endif
#endif
/* __WINE_CORECRT_H */
include/msvcrt/corecrt_wstring.h
View file @
3a688e81
...
...
@@ -7,6 +7,7 @@
#define _WSTRING_DEFINED
#include <corecrt.h>
#include <corecrt_malloc.h>
#ifdef __cplusplus
extern
"C"
{
...
...
@@ -29,7 +30,7 @@ static inline void* memccpy(void *s1, const void *s2, int c, size_t n) { return
_ACRTIMP
void
*
__cdecl
memmove
(
void
*
,
const
void
*
,
size_t
);
_ACRTIMP
wchar_t
*
__cdecl
_wcsdup
(
const
wchar_t
*
);
_ACRTIMP
wchar_t
*
__cdecl
_wcsdup
(
const
wchar_t
*
)
__WINE_DEALLOC
(
free
)
__WINE_MALLOC
;
_ACRTIMP
int
__cdecl
_wcsicmp
(
const
wchar_t
*
,
const
wchar_t
*
);
_ACRTIMP
int
__cdecl
_wcsicoll
(
const
wchar_t
*
,
const
wchar_t
*
);
_ACRTIMP
int
__cdecl
_wcsicoll_l
(
const
wchar_t
*
,
const
wchar_t
*
,
_locale_t
);
...
...
include/msvcrt/string.h
View file @
3a688e81
...
...
@@ -8,6 +8,7 @@
#ifndef __WINE_STRING_H
#define __WINE_STRING_H
#include <corecrt_malloc.h>
#include <corecrt_wstring.h>
#ifndef _NLSCMP_DEFINED
...
...
@@ -22,7 +23,7 @@ extern "C" {
_ACRTIMP
size_t
__cdecl
__strncnt
(
const
char
*
,
size_t
);
_ACRTIMP
int
__cdecl
_strcmpi
(
const
char
*
,
const
char
*
);
_ACRTIMP
int
__cdecl
_strcoll_l
(
const
char
*
,
const
char
*
,
_locale_t
);
_ACRTIMP
char
*
__cdecl
_strdup
(
const
char
*
);
_ACRTIMP
char
*
__cdecl
_strdup
(
const
char
*
)
__WINE_DEALLOC
(
free
)
__WINE_MALLOC
;
_ACRTIMP
char
*
__cdecl
_strerror
(
const
char
*
);
_ACRTIMP
errno_t
__cdecl
strerror_s
(
char
*
,
size_t
,
int
);
_ACRTIMP
int
__cdecl
_stricmp
(
const
char
*
,
const
char
*
);
...
...
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