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
165f8734
Commit
165f8734
authored
Mar 12, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp60: Share misc functions implementation with msvcp90.
parent
2466ed26
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
93 deletions
+17
-93
Makefile.in
dlls/msvcp60/Makefile.in
+0
-1
main.c
dlls/msvcp60/main.c
+3
-0
misc.c
dlls/msvcp60/misc.c
+0
-90
misc.c
dlls/msvcp90/misc.c
+10
-2
msvcp90.h
dlls/msvcp90/msvcp90.h
+4
-0
No files found.
dlls/msvcp60/Makefile.in
View file @
165f8734
...
...
@@ -3,7 +3,6 @@ IMPORTS = msvcrt
EXTRADEFS
=
-D_MSVCP_VER
=
60
PARENTSRC
=
../msvcp90
C_SRCS
=
\
exception.c
\
ios.c
\
...
...
dlls/msvcp60/main.c
View file @
165f8734
...
...
@@ -59,6 +59,7 @@ const __int64 std_Fpz = 0;
void
*
(
__cdecl
*
MSVCRT_operator_new
)(
MSVCP_size_t
);
void
(
__cdecl
*
MSVCRT_operator_delete
)(
void
*
);
void
*
(
__cdecl
*
MSVCRT_set_new_handler
)(
void
*
);
static
void
init_cxx_funcs
(
void
)
{
...
...
@@ -68,11 +69,13 @@ static void init_cxx_funcs(void)
{
MSVCRT_operator_new
=
(
void
*
)
GetProcAddress
(
hmod
,
"??2@YAPEAX_K@Z"
);
MSVCRT_operator_delete
=
(
void
*
)
GetProcAddress
(
hmod
,
"??3@YAXPEAX@Z"
);
MSVCRT_set_new_handler
=
(
void
*
)
GetProcAddress
(
hmod
,
"?_set_new_handler@@YAP6AH_K@ZP6AH0@Z@Z"
);
}
else
{
MSVCRT_operator_new
=
(
void
*
)
GetProcAddress
(
hmod
,
"??2@YAPAXI@Z"
);
MSVCRT_operator_delete
=
(
void
*
)
GetProcAddress
(
hmod
,
"??3@YAXPAX@Z"
);
MSVCRT_set_new_handler
=
(
void
*
)
GetProcAddress
(
hmod
,
"?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z"
);
}
}
...
...
dlls/msvcp60/misc.c
deleted
100644 → 0
View file @
2466ed26
/*
* Copyright 2010 Piotr Caban for CodeWeavers
*
* 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 <stdarg.h>
#include <limits.h>
#include "msvcp.h"
#include "windef.h"
#include "winbase.h"
static
CRITICAL_SECTION
lockit_cs
;
void
init_lockit
(
void
)
{
InitializeCriticalSection
(
&
lockit_cs
);
lockit_cs
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": _Lockit critical section"
);
}
void
free_lockit
(
void
)
{
lockit_cs
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
lockit_cs
);
}
_Lockit
*
__thiscall
_Lockit_ctor_locktype
(
_Lockit
*
this
,
int
locktype
)
{
EnterCriticalSection
(
&
lockit_cs
);
return
this
;
}
/* ??0_Lockit@std@@QAE@XZ */
/* ??0_Lockit@std@@QEAA@XZ */
DEFINE_THISCALL_WRAPPER
(
_Lockit_ctor
,
4
)
_Lockit
*
__thiscall
_Lockit_ctor
(
_Lockit
*
this
)
{
return
_Lockit_ctor_locktype
(
this
,
0
);
}
/* ??1_Lockit@std@@QAE@XZ */
/* ??1_Lockit@std@@QEAA@XZ */
DEFINE_THISCALL_WRAPPER
(
_Lockit_dtor
,
4
)
void
__thiscall
_Lockit_dtor
(
_Lockit
*
this
)
{
LeaveCriticalSection
(
&
lockit_cs
);
}
/* wctype */
unsigned
short
__cdecl
wctype
(
const
char
*
property
)
{
static
const
struct
{
const
char
*
name
;
unsigned
short
mask
;
}
properties
[]
=
{
{
"alnum"
,
_DIGIT
|
_ALPHA
},
{
"alpha"
,
_ALPHA
},
{
"cntrl"
,
_CONTROL
},
{
"digit"
,
_DIGIT
},
{
"graph"
,
_DIGIT
|
_PUNCT
|
_ALPHA
},
{
"lower"
,
_LOWER
},
{
"print"
,
_DIGIT
|
_PUNCT
|
_BLANK
|
_ALPHA
},
{
"punct"
,
_PUNCT
},
{
"space"
,
_SPACE
},
{
"upper"
,
_UPPER
},
{
"xdigit"
,
_HEX
}
};
unsigned
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
properties
)
/
sizeof
(
properties
[
0
]);
i
++
)
if
(
!
strcmp
(
property
,
properties
[
i
].
name
))
return
properties
[
i
].
mask
;
return
0
;
}
dlls/msvcp90/misc.c
View file @
165f8734
...
...
@@ -125,6 +125,14 @@ void CDECL mutex_mutex_dtor(mutex *m)
static
CRITICAL_SECTION
lockit_cs
[
_MAX_LOCK
];
#if _MSVCP_VER >= 70
static
inline
int
get_locktype
(
_Lockit
*
lockit
)
{
return
lockit
->
locktype
;
}
static
inline
void
set_locktype
(
_Lockit
*
lockit
,
int
type
)
{
lockit
->
locktype
=
type
;
}
#else
static
inline
int
get_locktype
(
_Lockit
*
lockit
)
{
return
0
;
}
static
inline
void
set_locktype
(
_Lockit
*
lockit
,
int
type
)
{
}
#endif
/* ?_Lockit_ctor@_Lockit@std@@SAXH@Z */
void
__cdecl
_Lockit_init
(
int
locktype
)
{
InitializeCriticalSection
(
&
lockit_cs
[
locktype
]);
...
...
@@ -156,7 +164,7 @@ void free_lockit(void) {
/* ?_Lockit_ctor@_Lockit@std@@CAXPEAV12@H@Z */
void
__cdecl
_Lockit__Lockit_ctor_locktype
(
_Lockit
*
lockit
,
int
locktype
)
{
lockit
->
locktype
=
locktype
;
set_locktype
(
lockit
,
locktype
)
;
EnterCriticalSection
(
&
lockit_cs
[
locktype
]);
}
...
...
@@ -189,7 +197,7 @@ _Lockit* __thiscall _Lockit_ctor(_Lockit *this)
/* ?_Lockit_dtor@_Lockit@std@@CAXPEAV12@@Z */
void
__cdecl
_Lockit__Lockit_dtor
(
_Lockit
*
lockit
)
{
LeaveCriticalSection
(
&
lockit_cs
[
lockit
->
locktype
]);
LeaveCriticalSection
(
&
lockit_cs
[
get_locktype
(
lockit
)
]);
}
/* ??1_Lockit@std@@QAE@XZ */
...
...
dlls/msvcp90/msvcp90.h
View file @
165f8734
...
...
@@ -250,7 +250,11 @@ ctype_wchar* ctype_short_use_facet(const locale*);
/* class _Lockit */
typedef
struct
{
#if _MSVCP_VER >= 70
int
locktype
;
#else
char
empty_struct
;
#endif
}
_Lockit
;
#define _LOCK_LOCALE 0
...
...
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