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
207068c4
Commit
207068c4
authored
Oct 06, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: Move some portability defines out of port.h.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
65f3c3ae
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
37 additions
and
69 deletions
+37
-69
port.h
include/wine/port.h
+0
-49
makedep.c
tools/makedep.c
+1
-8
tools.h
tools/tools.h
+25
-0
typelib.c
tools/widl/typelib.c
+1
-1
widl.c
tools/widl/widl.c
+1
-1
output.c
tools/winedump/output.c
+2
-2
pdb.c
tools/winedump/pdb.c
+2
-2
pe.c
tools/winedump/pe.c
+1
-1
mcl.c
tools/wmc/mcl.c
+1
-1
mcy.y
tools/wmc/mcy.y
+1
-1
utils.c
tools/wmc/utils.c
+1
-2
utils.h
tools/wmc/utils.h
+0
-1
wmc.h
tools/wmc/wmc.h
+1
-0
No files found.
include/wine/port.h
View file @
207068c4
...
...
@@ -53,17 +53,12 @@
#include <io.h>
#include <process.h>
#define mkdir(path,mode) mkdir(path)
static
inline
void
*
dlopen
(
const
char
*
name
,
int
flags
)
{
return
NULL
;
}
static
inline
void
*
dlsym
(
void
*
handle
,
const
char
*
name
)
{
return
NULL
;
}
static
inline
int
dlclose
(
void
*
handle
)
{
return
0
;
}
static
inline
const
char
*
dlerror
(
void
)
{
return
"No dlopen support on Windows"
;
}
#ifdef _MSC_VER
#define popen _popen
#define pclose _pclose
/* The UCRT headers in the Windows SDK #error out if we #define snprintf.
* The C headers that came with previous Visual Studio versions do not have
* snprintf. Check for VS 2015, which appears to be the first version to
...
...
@@ -71,25 +66,6 @@ static inline const char *dlerror(void) { return "No dlopen support on Windows";
#if _MSC_VER < 1900
# define snprintf _snprintf
#endif
#define strtoll _strtoi64
#define strtoull _strtoui64
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
typedef
long
off_t
;
typedef
int
pid_t
;
typedef
int
ssize_t
;
#endif
/* _MSC_VER */
#else
/* _WIN32 */
#ifndef __int64
# if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__) || defined(_WIN64)
# define __int64 long
# else
# define __int64 long long
# endif
#endif
#endif
/* _WIN32 */
...
...
@@ -106,36 +82,11 @@ typedef int ssize_t;
#define RTLD_GLOBAL 0x100
#endif
#ifndef S_ISLNK
# define S_ISLNK(mod) (0)
#endif
#ifndef S_ISDIR
# define S_ISDIR(mod) (((mod) & _S_IFMT) == _S_IFDIR)
#endif
#ifndef S_ISCHR
# define S_ISCHR(mod) (((mod) & _S_IFMT) == _S_IFCHR)
#endif
#ifndef S_ISREG
# define S_ISREG(mod) (((mod) & _S_IFMT) == _S_IFREG)
#endif
/* So we open files in 64 bit access mode on Linux */
#ifndef O_LARGEFILE
# define O_LARGEFILE 0
#endif
#ifndef O_NONBLOCK
# define O_NONBLOCK 0
#endif
#ifndef O_BINARY
# define O_BINARY 0
#endif
/****************************************************************
* Constants
*/
...
...
tools/makedep.c
View file @
207068c4
...
...
@@ -31,14 +31,7 @@
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#if defined(_WIN32) && !defined(__CYGWIN__)
#include <direct.h>
#include <io.h>
#define mkdir(path,mode) mkdir(path)
#endif
#include "tools.h"
#include "wine/list.h"
...
...
tools/tools.h
View file @
207068c4
...
...
@@ -26,6 +26,7 @@
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <time.h>
#include <errno.h>
...
...
@@ -34,10 +35,34 @@
#endif
#if defined(_WIN32) && !defined(__CYGWIN__)
# include <direct.h>
# include <io.h>
# include <process.h>
# define mkdir(path,mode) mkdir(path)
# ifndef S_ISREG
# define S_ISREG(mod) (((mod) & _S_IFMT) == _S_IFREG)
# endif
# ifdef _MSC_VER
# define popen _popen
# define pclose _pclose
# define strtoll _strtoi64
# define strtoull _strtoui64
# define strncasecmp _strnicmp
# define strcasecmp _stricmp
# endif
#else
# include <sys/wait.h>
# include <unistd.h>
# ifndef O_BINARY
# define O_BINARY 0
# endif
# ifndef __int64
# if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
# define __int64 long
# else
# define __int64 long long
# endif
# endif
#endif
#if !defined(__GNUC__) && !defined(__attribute__)
...
...
tools/widl/typelib.c
View file @
207068c4
...
...
@@ -250,7 +250,7 @@ static void tlb_read(int fd, void *buf, int count)
error
(
"error while reading importlib.
\n
"
);
}
static
void
tlb_lseek
(
int
fd
,
off_
t
offset
)
static
void
tlb_lseek
(
int
fd
,
in
t
offset
)
{
if
(
lseek
(
fd
,
offset
,
SEEK_SET
)
==
-
1
)
error
(
"lseek failed
\n
"
);
...
...
tools/widl/widl.c
View file @
207068c4
...
...
@@ -287,7 +287,7 @@ static void add_widl_version_define(void)
if
(
p
)
version
+=
atoi
(
p
+
1
);
s
nprintf
(
version_str
,
sizeof
(
version_str
)
,
"__WIDL__=0x%x"
,
version
);
s
printf
(
version_str
,
"__WIDL__=0x%x"
,
version
);
wpp_add_cmdline_define
(
version_str
);
}
...
...
tools/winedump/output.c
View file @
207068c4
...
...
@@ -68,7 +68,7 @@ void output_spec_symbol (const parsed_symbol *sym)
assert
(
sym
&&
sym
->
symbol
);
if
(
sym
->
ordinal
>=
0
)
s
nprintf
(
ord_spec
,
12
,
"%d"
,
sym
->
ordinal
);
s
printf
(
ord_spec
,
"%d"
,
sym
->
ordinal
);
else
{
ord_spec
[
0
]
=
'@'
;
...
...
@@ -485,7 +485,7 @@ void output_c_banner (const parsed_symbol *sym)
size_t
i
;
if
(
sym
->
ordinal
>=
0
)
s
nprintf
(
ord_spec
,
sizeof
(
ord_spec
)
,
"%d"
,
sym
->
ordinal
);
s
printf
(
ord_spec
,
"%d"
,
sym
->
ordinal
);
else
{
ord_spec
[
0
]
=
'@'
;
...
...
tools/winedump/pdb.c
View file @
207068c4
...
...
@@ -279,9 +279,9 @@ static void pdb_dump_symbols(struct pdb_reader* reader, PDB_STREAM_INDEXES* sidx
printf
(
"-Unknown symbol info version %d
\n
"
,
symbols
->
version
);
}
if
(
symbols
->
flags
&
0x8000
)
/* new */
s
nprintf
(
tcver
,
sizeof
(
tcver
)
,
"%u.%u"
,
(
symbols
->
flags
>>
8
)
&
0x7f
,
symbols
->
flags
&
0xff
);
s
printf
(
tcver
,
"%u.%u"
,
(
symbols
->
flags
>>
8
)
&
0x7f
,
symbols
->
flags
&
0xff
);
else
s
nprintf
(
tcver
,
sizeof
(
tcver
)
,
"old-%x"
,
symbols
->
flags
);
s
printf
(
tcver
,
"old-%x"
,
symbols
->
flags
);
printf
(
"Symbols:
\n
"
"
\t
signature: %08x
\n
"
"
\t
version: %u
\n
"
...
...
tools/winedump/pe.c
View file @
207068c4
...
...
@@ -2442,7 +2442,7 @@ static void do_grab_sym( void )
{
char
ordinal_text
[
256
];
/* Ordinal only entry */
s
nprintf
(
ordinal_text
,
sizeof
(
ordinal_text
)
,
"%s_%u"
,
s
printf
(
ordinal_text
,
"%s_%u"
,
globals
.
forward_dll
?
globals
.
forward_dll
:
OUTPUT_UC_DLL_NAME
,
exportDir
->
Base
+
i
);
str_toupper
(
ordinal_text
);
...
...
tools/wmc/mcl.c
View file @
207068c4
...
...
@@ -26,8 +26,8 @@
#include <assert.h>
#include <string.h>
#include "utils.h"
#include "wmc.h"
#include "utils.h"
#include "lang.h"
#include "mcy.tab.h"
...
...
tools/wmc/mcy.y
View file @
207068c4
...
...
@@ -44,8 +44,8 @@
#include <stdlib.h>
#include <assert.h>
#include "utils.h"
#include "wmc.h"
#include "utils.h"
#include "lang.h"
static const char err_syntax[] = "Syntax error\n";
...
...
tools/wmc/utils.c
View file @
207068c4
...
...
@@ -28,10 +28,9 @@
#include <assert.h>
#include <ctype.h>
#include "wmc
types
.h"
#include "wmc.h"
#include "winnls.h"
#include "utils.h"
#include "wmc.h"
#define SUPPRESS_YACC_ERROR_MESSAGE
...
...
tools/wmc/utils.h
View file @
207068c4
...
...
@@ -21,7 +21,6 @@
#ifndef __WMC_UTILS_H
#define __WMC_UTILS_H
#include "../tools.h"
#include "wmctypes.h"
int
mcy_error
(
const
char
*
s
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
...
...
tools/wmc/wmc.h
View file @
207068c4
...
...
@@ -21,6 +21,7 @@
#ifndef __WMC_WMC_H
#define __WMC_WMC_H
#include "../tools.h"
#include "wmctypes.h"
/*
...
...
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