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
3c9cf9b6
Commit
3c9cf9b6
authored
May 26, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Remove environ.c.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1b653e02
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
125 deletions
+62
-125
Makefile.in
dlls/kernel32/Makefile.in
+0
-1
environ.c
dlls/kernel32/environ.c
+0
-115
kernel_main.c
dlls/kernel32/kernel_main.c
+42
-3
kernel_private.h
dlls/kernel32/kernel_private.h
+0
-6
process.c
dlls/kernel32/process.c
+20
-0
No files found.
dlls/kernel32/Makefile.in
View file @
3c9cf9b6
...
...
@@ -12,7 +12,6 @@ C_SRCS = \
console.c
\
debugger.c
\
editline.c
\
environ.c
\
file.c
\
heap.c
\
kernel_main.c
\
...
...
dlls/kernel32/environ.c
deleted
100644 → 0
View file @
1b653e02
/*
* Process environment management
*
* Copyright 1996, 1998 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"
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wine/library.h"
#include "winternl.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "kernel_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
environ
);
/* Notes:
* - contrary to Microsoft docs, the environment strings do not appear
* to be sorted on Win95 (although they are on NT); so we don't bother
* to sort them either.
*/
static
STARTUPINFOA
startup_infoA
;
/***********************************************************************
* GetStartupInfoA (KERNEL32.@)
*/
VOID
WINAPI
GetStartupInfoA
(
LPSTARTUPINFOA
info
)
{
*
info
=
startup_infoA
;
}
/******************************************************************
* ENV_CopyStartupInformation (internal)
*
* Creates the STARTUPINFO information from the ntdll information
*/
void
ENV_CopyStartupInformation
(
void
)
{
RTL_USER_PROCESS_PARAMETERS
*
rupp
;
ANSI_STRING
ansi
;
RtlAcquirePebLock
();
rupp
=
NtCurrentTeb
()
->
Peb
->
ProcessParameters
;
startup_infoA
.
cb
=
sizeof
(
startup_infoA
);
startup_infoA
.
lpReserved
=
NULL
;
startup_infoA
.
lpDesktop
=
RtlUnicodeStringToAnsiString
(
&
ansi
,
&
rupp
->
Desktop
,
TRUE
)
==
STATUS_SUCCESS
?
ansi
.
Buffer
:
NULL
;
startup_infoA
.
lpTitle
=
RtlUnicodeStringToAnsiString
(
&
ansi
,
&
rupp
->
WindowTitle
,
TRUE
)
==
STATUS_SUCCESS
?
ansi
.
Buffer
:
NULL
;
startup_infoA
.
dwX
=
rupp
->
dwX
;
startup_infoA
.
dwY
=
rupp
->
dwY
;
startup_infoA
.
dwXSize
=
rupp
->
dwXSize
;
startup_infoA
.
dwYSize
=
rupp
->
dwYSize
;
startup_infoA
.
dwXCountChars
=
rupp
->
dwXCountChars
;
startup_infoA
.
dwYCountChars
=
rupp
->
dwYCountChars
;
startup_infoA
.
dwFillAttribute
=
rupp
->
dwFillAttribute
;
startup_infoA
.
dwFlags
=
rupp
->
dwFlags
;
startup_infoA
.
wShowWindow
=
rupp
->
wShowWindow
;
startup_infoA
.
cbReserved2
=
rupp
->
RuntimeInfo
.
MaximumLength
;
startup_infoA
.
lpReserved2
=
rupp
->
RuntimeInfo
.
MaximumLength
?
(
void
*
)
rupp
->
RuntimeInfo
.
Buffer
:
NULL
;
startup_infoA
.
hStdInput
=
rupp
->
hStdInput
?
rupp
->
hStdInput
:
INVALID_HANDLE_VALUE
;
startup_infoA
.
hStdOutput
=
rupp
->
hStdOutput
?
rupp
->
hStdOutput
:
INVALID_HANDLE_VALUE
;
startup_infoA
.
hStdError
=
rupp
->
hStdError
?
rupp
->
hStdError
:
INVALID_HANDLE_VALUE
;
RtlReleasePebLock
();
}
/***********************************************************************
* GetFirmwareEnvironmentVariableA (KERNEL32.@)
*/
DWORD
WINAPI
GetFirmwareEnvironmentVariableA
(
LPCSTR
name
,
LPCSTR
guid
,
PVOID
buffer
,
DWORD
size
)
{
FIXME
(
"stub: %s %s %p %u
\n
"
,
debugstr_a
(
name
),
debugstr_a
(
guid
),
buffer
,
size
);
SetLastError
(
ERROR_INVALID_FUNCTION
);
return
0
;
}
/***********************************************************************
* GetFirmwareEnvironmentVariableW (KERNEL32.@)
*/
DWORD
WINAPI
GetFirmwareEnvironmentVariableW
(
LPCWSTR
name
,
LPCWSTR
guid
,
PVOID
buffer
,
DWORD
size
)
{
FIXME
(
"stub: %s %s %p %u
\n
"
,
debugstr_w
(
name
),
debugstr_w
(
guid
),
buffer
,
size
);
SetLastError
(
ERROR_INVALID_FUNCTION
);
return
0
;
}
dlls/kernel32/kernel_main.c
View file @
3c9cf9b6
...
...
@@ -33,7 +33,6 @@
#include "wincon.h"
#include "winternl.h"
#include "wine/library.h"
#include "kernel_private.h"
#include "console_private.h"
#include "wine/debug.h"
...
...
@@ -42,6 +41,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(process);
extern
int
CDECL
__wine_set_signal_handler
(
unsigned
,
int
(
*
)(
unsigned
));
static
STARTUPINFOA
startup_infoA
;
/***********************************************************************
* set_entry_point
*/
...
...
@@ -78,6 +79,45 @@ static void set_entry_point( HMODULE module, const char *name, DWORD rva )
/***********************************************************************
* GetStartupInfoA (KERNEL32.@)
*/
VOID
WINAPI
GetStartupInfoA
(
LPSTARTUPINFOA
info
)
{
*
info
=
startup_infoA
;
}
static
void
copy_startup_info
(
void
)
{
RTL_USER_PROCESS_PARAMETERS
*
rupp
;
ANSI_STRING
ansi
;
RtlAcquirePebLock
();
rupp
=
NtCurrentTeb
()
->
Peb
->
ProcessParameters
;
startup_infoA
.
cb
=
sizeof
(
startup_infoA
);
startup_infoA
.
lpReserved
=
NULL
;
startup_infoA
.
lpDesktop
=
!
RtlUnicodeStringToAnsiString
(
&
ansi
,
&
rupp
->
Desktop
,
TRUE
)
?
ansi
.
Buffer
:
NULL
;
startup_infoA
.
lpTitle
=
!
RtlUnicodeStringToAnsiString
(
&
ansi
,
&
rupp
->
WindowTitle
,
TRUE
)
?
ansi
.
Buffer
:
NULL
;
startup_infoA
.
dwX
=
rupp
->
dwX
;
startup_infoA
.
dwY
=
rupp
->
dwY
;
startup_infoA
.
dwXSize
=
rupp
->
dwXSize
;
startup_infoA
.
dwYSize
=
rupp
->
dwYSize
;
startup_infoA
.
dwXCountChars
=
rupp
->
dwXCountChars
;
startup_infoA
.
dwYCountChars
=
rupp
->
dwYCountChars
;
startup_infoA
.
dwFillAttribute
=
rupp
->
dwFillAttribute
;
startup_infoA
.
dwFlags
=
rupp
->
dwFlags
;
startup_infoA
.
wShowWindow
=
rupp
->
wShowWindow
;
startup_infoA
.
cbReserved2
=
rupp
->
RuntimeInfo
.
MaximumLength
;
startup_infoA
.
lpReserved2
=
rupp
->
RuntimeInfo
.
MaximumLength
?
(
void
*
)
rupp
->
RuntimeInfo
.
Buffer
:
NULL
;
startup_infoA
.
hStdInput
=
rupp
->
hStdInput
?
rupp
->
hStdInput
:
INVALID_HANDLE_VALUE
;
startup_infoA
.
hStdOutput
=
rupp
->
hStdOutput
?
rupp
->
hStdOutput
:
INVALID_HANDLE_VALUE
;
startup_infoA
.
hStdError
=
rupp
->
hStdError
?
rupp
->
hStdError
:
INVALID_HANDLE_VALUE
;
RtlReleasePebLock
();
}
/***********************************************************************
* KERNEL process initialisation routine
*/
static
BOOL
process_attach
(
HMODULE
module
)
...
...
@@ -94,8 +134,7 @@ static BOOL process_attach( HMODULE module )
CONSOLE_Init
(
params
);
/* copy process information from ntdll */
ENV_CopyStartupInformation
();
copy_startup_info
();
if
(
!
(
GetVersion
()
&
0x80000000
))
{
...
...
dlls/kernel32/kernel_private.h
View file @
3c9cf9b6
...
...
@@ -66,13 +66,7 @@ extern DWORD FILE_name_WtoA( LPCWSTR src, INT srclen, LPSTR dest, INT destlen )
extern
BOOL
NLS_IsUnicodeOnlyLcid
(
LCID
)
DECLSPEC_HIDDEN
;
/* environ.c */
extern
void
ENV_CopyStartupInformation
(
void
)
DECLSPEC_HIDDEN
;
/* computername.c */
extern
void
COMPUTERNAME_Init
(
void
)
DECLSPEC_HIDDEN
;
/* oldconfig.c */
extern
void
convert_old_config
(
void
)
DECLSPEC_HIDDEN
;
#endif
dlls/kernel32/process.c
View file @
3c9cf9b6
...
...
@@ -741,6 +741,26 @@ DWORD64 WINAPI GetEnabledXStateFeatures(void)
return
0
;
}
/***********************************************************************
* GetFirmwareEnvironmentVariableA (KERNEL32.@)
*/
DWORD
WINAPI
GetFirmwareEnvironmentVariableA
(
LPCSTR
name
,
LPCSTR
guid
,
PVOID
buffer
,
DWORD
size
)
{
FIXME
(
"stub: %s %s %p %u
\n
"
,
debugstr_a
(
name
),
debugstr_a
(
guid
),
buffer
,
size
);
SetLastError
(
ERROR_INVALID_FUNCTION
);
return
0
;
}
/***********************************************************************
* GetFirmwareEnvironmentVariableW (KERNEL32.@)
*/
DWORD
WINAPI
GetFirmwareEnvironmentVariableW
(
LPCWSTR
name
,
LPCWSTR
guid
,
PVOID
buffer
,
DWORD
size
)
{
FIXME
(
"stub: %s %s %p %u
\n
"
,
debugstr_w
(
name
),
debugstr_w
(
guid
),
buffer
,
size
);
SetLastError
(
ERROR_INVALID_FUNCTION
);
return
0
;
}
/**********************************************************************
* GetNumaNodeProcessorMask (KERNEL32.@)
*/
...
...
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