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
356b2d2b
Commit
356b2d2b
authored
Nov 02, 2010
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implemented _wputenv_s.
parent
af2bc15e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
8 deletions
+60
-8
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+2
-2
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+2
-2
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+2
-2
environ.c
dlls/msvcrt/environ.c
+52
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+2
-2
No files found.
dlls/msvcr100/msvcr100.spec
View file @
356b2d2b
...
...
@@ -1035,7 +1035,7 @@
@ cdecl _putch(long) msvcrt._putch
@ stub _putch_nolock
@ cdecl _putenv(str) msvcrt._putenv
@
stub
_putenv_s
@
cdecl _putenv_s(str str) msvcrt.
_putenv_s
@ cdecl _putw(long ptr) msvcrt._putw
@ stub _putwch
@ stub _putwch_nolock
...
...
@@ -1371,7 +1371,7 @@
@ stub _wprintf_p_l
@ stub _wprintf_s_l
@ cdecl _wputenv(wstr) msvcrt._wputenv
@
stub
_wputenv_s
@
cdecl _wputenv_s(wstr wstr) msvcrt.
_wputenv_s
@ cdecl _wremove(wstr) msvcrt._wremove
@ cdecl _wrename(wstr wstr) msvcrt._wrename
@ cdecl _write(long ptr long) msvcrt._write
...
...
dlls/msvcr80/msvcr80.spec
View file @
356b2d2b
...
...
@@ -883,7 +883,7 @@
@ cdecl _putch(long) msvcrt._putch
@ stub _putch_nolock
@ cdecl _putenv(str) msvcrt._putenv
@
stub
_putenv_s
@
cdecl _putenv_s(str str) msvcrt.
_putenv_s
@ cdecl _putw(long ptr) msvcrt._putw
@ stub _putwch
@ stub _putwch_nolock
...
...
@@ -1227,7 +1227,7 @@
@ stub _wprintf_p_l
@ stub _wprintf_s_l
@ cdecl _wputenv(wstr) msvcrt._wputenv
@
stub
_wputenv_s
@
cdecl _wputenv_s(wstr wstr) msvcrt.
_wputenv_s
@ cdecl _wremove(wstr) msvcrt._wremove
@ cdecl _wrename(wstr wstr) msvcrt._wrename
@ cdecl _write(long ptr long) msvcrt._write
...
...
dlls/msvcr90/msvcr90.spec
View file @
356b2d2b
...
...
@@ -869,7 +869,7 @@
@ cdecl _putch(long) msvcrt._putch
@ stub _putch_nolock
@ cdecl _putenv(str) msvcrt._putenv
@
stub
_putenv_s
@
cdecl _putenv_s(str str) msvcrt.
_putenv_s
@ cdecl _putw(long ptr) msvcrt._putw
@ stub _putwch
@ stub _putwch_nolock
...
...
@@ -1211,7 +1211,7 @@
@ stub _wprintf_p_l
@ stub _wprintf_s_l
@ cdecl _wputenv(wstr) msvcrt._wputenv
@
stub
_wputenv_s
@
cdecl _wputenv_s(wstr wstr) msvcrt.
_wputenv_s
@ cdecl _wremove(wstr) msvcrt._wremove
@ cdecl _wrename(wstr wstr) msvcrt._wrename
@ cdecl _write(long ptr long) msvcrt._write
...
...
dlls/msvcrt/environ.c
View file @
356b2d2b
...
...
@@ -160,3 +160,55 @@ finish:
HeapFree
(
GetProcessHeap
(),
0
,
name
);
return
ret
;
}
/*********************************************************************
* _putenv_s (MSVCRT.@)
*/
int
CDECL
_putenv_s
(
const
char
*
name
,
const
char
*
value
)
{
int
ret
;
TRACE
(
"%s %s
\n
"
,
debugstr_a
(
name
),
debugstr_a
(
value
));
if
(
!
MSVCRT_CHECK_PMT
(
name
!=
NULL
)
||
!
MSVCRT_CHECK_PMT
(
value
!=
NULL
))
{
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
-
1
;
}
ret
=
SetEnvironmentVariableA
(
name
,
value
[
0
]
?
value
:
NULL
)
?
0
:
-
1
;
/* _putenv returns success on deletion of nonexistent variable, unlike [Rtl]SetEnvironmentVariable */
if
((
ret
==
-
1
)
&&
(
GetLastError
()
==
ERROR_ENVVAR_NOT_FOUND
))
ret
=
0
;
MSVCRT__environ
=
msvcrt_SnapshotOfEnvironmentA
(
MSVCRT__environ
);
MSVCRT__wenviron
=
msvcrt_SnapshotOfEnvironmentW
(
MSVCRT__wenviron
);
return
ret
;
}
/*********************************************************************
* _wputenv_s (MSVCRT.@)
*/
int
CDECL
_wputenv_s
(
const
MSVCRT_wchar_t
*
name
,
const
MSVCRT_wchar_t
*
value
)
{
int
ret
;
TRACE
(
"%s %s
\n
"
,
debugstr_w
(
name
),
debugstr_w
(
value
));
if
(
!
MSVCRT_CHECK_PMT
(
name
!=
NULL
)
||
!
MSVCRT_CHECK_PMT
(
value
!=
NULL
))
{
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
-
1
;
}
ret
=
SetEnvironmentVariableW
(
name
,
value
[
0
]
?
value
:
NULL
)
?
0
:
-
1
;
/* _putenv returns success on deletion of nonexistent variable, unlike [Rtl]SetEnvironmentVariable */
if
((
ret
==
-
1
)
&&
(
GetLastError
()
==
ERROR_ENVVAR_NOT_FOUND
))
ret
=
0
;
MSVCRT__environ
=
msvcrt_SnapshotOfEnvironmentA
(
MSVCRT__environ
);
MSVCRT__wenviron
=
msvcrt_SnapshotOfEnvironmentW
(
MSVCRT__wenviron
);
return
ret
;
}
dlls/msvcrt/msvcrt.spec
View file @
356b2d2b
...
...
@@ -817,7 +817,7 @@
@ cdecl _purecall()
@ cdecl _putch(long)
@ cdecl _putenv(str)
# stub _putenv_s
@ cdecl _putenv_s(str str)
@ cdecl _putw(long ptr) MSVCRT__putw
# stub _putwch
@ cdecl _putws(wstr)
...
...
@@ -1146,7 +1146,7 @@
# stub _wprintf_p_l
# stub _wprintf_s_l
@ cdecl _wputenv(wstr)
# stub _wputenv_s
@ cdecl _wputenv_s(wstr wstr)
@ cdecl _wremove(wstr)
@ cdecl _wrename(wstr wstr)
@ cdecl _write(long ptr long) MSVCRT__write
...
...
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