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
7f9b9df0
Commit
7f9b9df0
authored
Feb 17, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
439600d5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
20 deletions
+19
-20
Makefile.in
programs/cmd/Makefile.in
+0
-1
builtins.c
programs/cmd/builtins.c
+10
-10
directory.c
programs/cmd/directory.c
+2
-2
wcmdmain.c
programs/cmd/wcmdmain.c
+7
-7
No files found.
programs/cmd/Makefile.in
View file @
7f9b9df0
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
cmd.exe
IMPORTS
=
shell32 user32 advapi32
...
...
programs/cmd/builtins.c
View file @
7f9b9df0
...
...
@@ -344,7 +344,7 @@ void WCMD_choice (const WCHAR * args) {
}
if
(
opt_timeout
)
WINE_FIXME
(
"timeout not supported: %c,%d
\n
"
,
opt_default
,
opt_timeout
);
WINE_FIXME
(
"timeout not supported: %c,%
l
d
\n
"
,
opt_default
,
opt_timeout
);
if
(
have_console
)
SetConsoleMode
(
GetStdHandle
(
STD_INPUT_HANDLE
),
0
);
...
...
@@ -396,7 +396,7 @@ void WCMD_choice (const WCHAR * args) {
SetConsoleMode
(
GetStdHandle
(
STD_INPUT_HANDLE
),
oldmode
);
errorlevel
=
(
ptr
-
opt_c
)
+
1
;
WINE_TRACE
(
"answer: %d
\n
"
,
errorlevel
);
WINE_TRACE
(
"answer: %
l
d
\n
"
,
errorlevel
);
heap_free
(
my_command
);
return
;
}
...
...
@@ -427,12 +427,12 @@ static BOOL WCMD_AppendEOF(WCHAR *filename)
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
h
==
INVALID_HANDLE_VALUE
)
{
WINE_ERR
(
"Failed to open %s (%d)
\n
"
,
wine_dbgstr_w
(
filename
),
GetLastError
());
WINE_ERR
(
"Failed to open %s (%
l
d)
\n
"
,
wine_dbgstr_w
(
filename
),
GetLastError
());
return
FALSE
;
}
else
{
SetFilePointer
(
h
,
0
,
NULL
,
FILE_END
);
if
(
!
WriteFile
(
h
,
&
eof
,
1
,
&
bytes_written
,
NULL
))
{
WINE_ERR
(
"Failed to append EOF to %s (%d)
\n
"
,
wine_dbgstr_w
(
filename
),
GetLastError
());
WINE_ERR
(
"Failed to append EOF to %s (%
l
d)
\n
"
,
wine_dbgstr_w
(
filename
),
GetLastError
());
CloseHandle
(
h
);
return
FALSE
;
}
...
...
@@ -491,7 +491,7 @@ static BOOL WCMD_ManualCopy(WCHAR *srcname, WCHAR *dstname, BOOL ascii, BOOL app
in
=
CreateFileW
(
srcname
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
in
==
INVALID_HANDLE_VALUE
)
{
WINE_ERR
(
"Failed to open %s (%d)
\n
"
,
wine_dbgstr_w
(
srcname
),
GetLastError
());
WINE_ERR
(
"Failed to open %s (%
l
d)
\n
"
,
wine_dbgstr_w
(
srcname
),
GetLastError
());
return
FALSE
;
}
...
...
@@ -499,7 +499,7 @@ static BOOL WCMD_ManualCopy(WCHAR *srcname, WCHAR *dstname, BOOL ascii, BOOL app
out
=
CreateFileW
(
dstname
,
GENERIC_WRITE
,
0
,
NULL
,
append
?
OPEN_EXISTING
:
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
out
==
INVALID_HANDLE_VALUE
)
{
WINE_ERR
(
"Failed to open %s (%d)
\n
"
,
wine_dbgstr_w
(
dstname
),
GetLastError
());
WINE_ERR
(
"Failed to open %s (%
l
d)
\n
"
,
wine_dbgstr_w
(
dstname
),
GetLastError
());
CloseHandle
(
in
);
return
FALSE
;
}
...
...
@@ -526,12 +526,12 @@ static BOOL WCMD_ManualCopy(WCHAR *srcname, WCHAR *dstname, BOOL ascii, BOOL app
if
(
bytesread
)
{
ok
=
WriteFile
(
out
,
buffer
,
bytesread
,
&
byteswritten
,
NULL
);
if
(
!
ok
||
byteswritten
!=
bytesread
)
{
WINE_ERR
(
"Unexpected failure writing to %s, rc=%d
\n
"
,
WINE_ERR
(
"Unexpected failure writing to %s, rc=%
l
d
\n
"
,
wine_dbgstr_w
(
dstname
),
GetLastError
());
}
}
}
else
{
WINE_ERR
(
"Unexpected failure reading from %s, rc=%d
\n
"
,
WINE_ERR
(
"Unexpected failure reading from %s, rc=%
l
d
\n
"
,
wine_dbgstr_w
(
srcname
),
GetLastError
());
}
}
while
(
ok
&&
bytesread
>
0
);
...
...
@@ -2442,7 +2442,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) {
if
(
useNumbers
)
{
WCHAR
thisNum
[
20
];
WINE_TRACE
(
"FOR /L provided range from %
d to %d step %
d
\n
"
,
WINE_TRACE
(
"FOR /L provided range from %
ld to %ld step %l
d
\n
"
,
numbers
[
0
],
numbers
[
2
],
numbers
[
1
]);
for
(
i
=
numbers
[
0
];
(
numbers
[
1
]
<
0
)
?
i
>=
numbers
[
2
]
:
i
<=
numbers
[
2
];
...
...
@@ -4775,7 +4775,7 @@ void WCMD_assoc (const WCHAR *args, BOOL assoc) {
/* Open a key to HKEY_CLASSES_ROOT for enumerating */
if
(
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
L""
,
0
,
accessOptions
,
&
key
)
!=
ERROR_SUCCESS
)
{
WINE_FIXME
(
"Unexpected failure opening HKCR key: %d
\n
"
,
GetLastError
());
WINE_FIXME
(
"Unexpected failure opening HKCR key: %
l
d
\n
"
,
GetLastError
());
return
;
}
...
...
programs/cmd/directory.c
View file @
7f9b9df0
...
...
@@ -536,7 +536,7 @@ static void WCMD_dir_trailer(WCHAR drive) {
driveName
[
0
]
=
drive
;
status
=
GetDiskFreeSpaceExW
(
driveName
,
&
avail
,
&
total
,
&
freebytes
);
WINE_TRACE
(
"Writing trailer for '%s' gave %
d(%
d)
\n
"
,
wine_dbgstr_w
(
driveName
),
WINE_TRACE
(
"Writing trailer for '%s' gave %
ld(%l
d)
\n
"
,
wine_dbgstr_w
(
driveName
),
status
,
GetLastError
());
if
(
errorlevel
==
0
&&
!
bare
)
{
...
...
@@ -727,7 +727,7 @@ void WCMD_directory (WCHAR *args)
p
++
;
}
p
=
p
-
1
;
/* So when step on, move to '/' */
WINE_TRACE
(
"Result: showattrs %
x, bits %
x
\n
"
,
showattrs
,
attrsbits
);
WINE_TRACE
(
"Result: showattrs %
lx, bits %l
x
\n
"
,
showattrs
,
attrsbits
);
break
;
default:
SetLastError
(
ERROR_INVALID_PARAMETER
);
...
...
programs/cmd/wcmdmain.c
View file @
7f9b9df0
...
...
@@ -132,7 +132,7 @@ void WINAPIV WCMD_output (const WCHAR *format, ...) {
format
,
0
,
0
,
(
LPWSTR
)
&
string
,
0
,
&
ap
);
va_end
(
ap
);
if
(
len
==
0
&&
GetLastError
()
!=
ERROR_NO_WORK_DONE
)
WINE_FIXME
(
"Could not format string: le=%u, fmt=%s
\n
"
,
GetLastError
(),
wine_dbgstr_w
(
format
));
WINE_FIXME
(
"Could not format string: le=%
l
u, fmt=%s
\n
"
,
GetLastError
(),
wine_dbgstr_w
(
format
));
else
{
WCMD_output_asis_len
(
string
,
len
,
GetStdHandle
(
STD_OUTPUT_HANDLE
));
...
...
@@ -157,7 +157,7 @@ void WINAPIV WCMD_output_stderr (const WCHAR *format, ...) {
format
,
0
,
0
,
(
LPWSTR
)
&
string
,
0
,
&
ap
);
va_end
(
ap
);
if
(
len
==
0
&&
GetLastError
()
!=
ERROR_NO_WORK_DONE
)
WINE_FIXME
(
"Could not format string: le=%u, fmt=%s
\n
"
,
GetLastError
(),
wine_dbgstr_w
(
format
));
WINE_FIXME
(
"Could not format string: le=%
l
u, fmt=%s
\n
"
,
GetLastError
(),
wine_dbgstr_w
(
format
));
else
{
WCMD_output_asis_len
(
string
,
len
,
GetStdHandle
(
STD_ERROR_HANDLE
));
...
...
@@ -181,7 +181,7 @@ WCHAR* WINAPIV WCMD_format_string (const WCHAR *format, ...)
format
,
0
,
0
,
(
LPWSTR
)
&
string
,
0
,
&
ap
);
va_end
(
ap
);
if
(
len
==
0
&&
GetLastError
()
!=
ERROR_NO_WORK_DONE
)
{
WINE_FIXME
(
"Could not format string: le=%u, fmt=%s
\n
"
,
GetLastError
(),
wine_dbgstr_w
(
format
));
WINE_FIXME
(
"Could not format string: le=%
l
u, fmt=%s
\n
"
,
GetLastError
(),
wine_dbgstr_w
(
format
));
string
=
(
WCHAR
*
)
LocalAlloc
(
LMEM_FIXED
,
2
);
*
string
=
0
;
}
...
...
@@ -303,7 +303,7 @@ void WCMD_print_error (void) {
status
=
FormatMessageW
(
FORMAT_MESSAGE_ALLOCATE_BUFFER
|
FORMAT_MESSAGE_FROM_SYSTEM
,
NULL
,
error_code
,
0
,
(
LPWSTR
)
&
lpMsgBuf
,
0
,
NULL
);
if
(
!
status
)
{
WINE_FIXME
(
"Cannot display message for error %
d, status %
d
\n
"
,
WINE_FIXME
(
"Cannot display message for error %
ld, status %l
d
\n
"
,
error_code
,
GetLastError
());
return
;
}
...
...
@@ -1462,7 +1462,7 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects,
GetCurrentProcess
(),
&
h
,
0
,
TRUE
,
DUPLICATE_SAME_ACCESS
)
==
0
)
{
WINE_FIXME
(
"Duplicating handle failed with gle %d
\n
"
,
GetLastError
());
WINE_FIXME
(
"Duplicating handle failed with gle %
l
d
\n
"
,
GetLastError
());
}
WINE_TRACE
(
"Redirect %d (%p) to %d (%p)
\n
"
,
handle
,
GetStdHandle
(
idx_stdhandles
[
idx
]),
idx
,
h
);
...
...
@@ -1664,7 +1664,7 @@ WCHAR *WCMD_LoadMessage(UINT id) {
static
WCHAR
msg
[
2048
];
if
(
!
LoadStringW
(
GetModuleHandleW
(
NULL
),
id
,
msg
,
ARRAY_SIZE
(
msg
)))
{
WINE_FIXME
(
"LoadString failed with %d
\n
"
,
GetLastError
());
WINE_FIXME
(
"LoadString failed with %
l
d
\n
"
,
GetLastError
());
lstrcpyW
(
msg
,
L"Failed!"
);
}
return
msg
;
...
...
@@ -2442,7 +2442,7 @@ int __cdecl wmain (int argc, WCHAR *argvW[])
/* Pre initialize some messages */
lstrcpyW
(
anykey
,
WCMD_LoadMessage
(
WCMD_ANYKEY
));
sprintf
(
osver
,
"%
d.%d.%
d"
,
osv
.
dwMajorVersion
,
osv
.
dwMinorVersion
,
osv
.
dwBuildNumber
);
sprintf
(
osver
,
"%
ld.%ld.%l
d"
,
osv
.
dwMajorVersion
,
osv
.
dwMinorVersion
,
osv
.
dwBuildNumber
);
cmd
=
WCMD_format_string
(
WCMD_LoadMessage
(
WCMD_VERSION
),
osver
);
lstrcpyW
(
version_string
,
cmd
);
LocalFree
(
cmd
);
...
...
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