Move SC_PRIsizet to compat.h

Define the printf format macro for size_t in compat.h so that it can be
used from anywhere.

PR #3005 <https://github.com/Genymobile/scrcpy/pull/3005>
pull/3005/head
Romain Vimont 2 years ago
parent 0eadf95a3e
commit 8c50342fb2

@ -8,8 +8,10 @@
#ifndef __WIN32
# define PRIu64_ PRIu64
# define SC_PRIsizet "zu"
#else
# define PRIu64_ "I64u" // Windows...
# define SC_PRIsizet "Iu"
#endif
// In ffmpeg/doc/APIchanges:

@ -12,8 +12,6 @@
# include <winsock2.h>
# include <windows.h>
# define SC_PRIexitcode "lu"
// <https://stackoverflow.com/a/44383330/1987178>
# define SC_PRIsizet "Iu"
# define SC_PROCESS_NONE NULL
# define SC_EXIT_CODE_NONE -1UL // max value as unsigned long
typedef HANDLE sc_pid;
@ -23,7 +21,6 @@
#else
# include <sys/types.h>
# define SC_PRIsizet "zu"
# define SC_PRIexitcode "d"
# define SC_PROCESS_NONE -1
# define SC_EXIT_CODE_NONE -1

Loading…
Cancel
Save