History

configure: Set WIN32_LEAN_AND_MEAN at configure time

Including winsock2.h or windows.h without WIN32_LEAN_AND_MEAN cause bzlib.h to parse as nonsense, due to an instance of #define char small in rpcndr.h. See: https://stackoverflow.com/a/27794577

L. E. Segovia committed 3 years ago

Commit ddc1cd51 parent c7049019 files · +5 −11Browse files

Unified · Split

9 files
  1. compat/atomics/win32/stdatomic.h +0 −1
  2. compat/w32pthreads.h +0 −1
  3. configure +3 −0
  4. libavdevice/dshow_capture.h +0 −1
  5. libavdevice/opengl_enc.c +0 −1
  6. libavfilter/vsrc_ddagrab.c +0 −1
  7. libavformat/os_support.c +2 −4
  8. libavutil/wchar_filename.h +0 −1
  9. libswscale/utils.c +0 −1
compat/atomics/win32/stdatomic.h+0−1
@@ -19,7 +19,6 @@ · 18 unmodified lines
19#ifndef COMPAT_ATOMICS_WIN32_STDATOMIC_H19#ifndef COMPAT_ATOMICS_WIN32_STDATOMIC_H
20#define COMPAT_ATOMICS_WIN32_STDATOMIC_H20#define COMPAT_ATOMICS_WIN32_STDATOMIC_H
21 21
22#define WIN32_LEAN_AND_MEAN
23#include <stddef.h>22#include <stddef.h>
24#include <stdint.h>23#include <stdint.h>
25#include <windows.h>24#include <windows.h>
compat/w32pthreads.h+0−1
@@ -35,7 +35,6 @@ · 34 unmodified lines
35 * As most functions here are used without checking return values,35 * As most functions here are used without checking return values,
36 * only implement return values as necessary. */36 * only implement return values as necessary. */
37 37
38#define WIN32_LEAN_AND_MEAN
39#include <windows.h>38#include <windows.h>
40#include <process.h>39#include <process.h>
41#include <time.h>40#include <time.h>
configure+3−0
@@ -5666,6 +5666,7 @@ case $target_os in · 5665 unmodified lines
5666 fi5666 fi
5667 ! enabled small && test_cmd $windres --version && enable gnu_windres5667 ! enabled small && test_cmd $windres --version && enable gnu_windres
5668 enabled x86_32 && check_ldflags -Wl,--large-address-aware5668 enabled x86_32 && check_ldflags -Wl,--large-address-aware
5669 add_cppflags -DWIN32_LEAN_AND_MEAN
5669 shlibdir_default="$bindir_default"5670 shlibdir_default="$bindir_default"
5670 SLIBPREF=""5671 SLIBPREF=""
5671 SLIBSUF=".dll"5672 SLIBSUF=".dll"
@@ -5716,6 +5717,7 @@ case $target_os in · 44 unmodified lines
5716 fi5717 fi
5717 ! enabled small && test_cmd $windres --version && enable gnu_windres5718 ! enabled small && test_cmd $windres --version && enable gnu_windres
5718 enabled x86_32 && check_ldflags -LARGEADDRESSAWARE5719 enabled x86_32 && check_ldflags -LARGEADDRESSAWARE
5720 add_cppflags -DWIN32_LEAN_AND_MEAN
5719 shlibdir_default="$bindir_default"5721 shlibdir_default="$bindir_default"
5720 SLIBPREF=""5722 SLIBPREF=""
5721 SLIBSUF=".dll"5723 SLIBSUF=".dll"
@@ -5745,6 +5747,7 @@ case $target_os in · 23 unmodified lines
5745 enabled x86_64 && objformat="win64" || objformat="win32"5747 enabled x86_64 && objformat="win64" || objformat="win32"
5746 enable dos_paths5748 enable dos_paths
5747 ! enabled small && test_cmd $windres --version && enable gnu_windres5749 ! enabled small && test_cmd $windres --version && enable gnu_windres
5750 add_cppflags -DWIN32_LEAN_AND_MEAN
5748 add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=6005751 add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
5749 ;;5752 ;;
5750 *-dos|freedos|opendos)5753 *-dos|freedos|opendos)
libavdevice/dshow_capture.h+0−1
@@ -27,7 +27,6 @@ · 26 unmodified lines
27#include "avdevice.h"27#include "avdevice.h"
28 28
29#define COBJMACROS29#define COBJMACROS
30#define WIN32_LEAN_AND_MEAN
31#include <windows.h>30#include <windows.h>
32#define NO_DSHOW_STRSAFE31#define NO_DSHOW_STRSAFE
33#include <dshow.h>32#include <dshow.h>
libavdevice/opengl_enc.c+0−1
@@ -30,7 +30,6 @@ · 29 unmodified lines
30#include "config.h"30#include "config.h"
31 31
32#if HAVE_WINDOWS_H32#if HAVE_WINDOWS_H
33#define WIN32_LEAN_AND_MEAN
34#include <windows.h>33#include <windows.h>
35#endif34#endif
36#if HAVE_OPENGL_GL3_H35#if HAVE_OPENGL_GL3_H
libavfilter/vsrc_ddagrab.c+0−1
@@ -22,7 +22,6 @@ · 21 unmodified lines
22#undef _WIN32_WINNT22#undef _WIN32_WINNT
23#define _WIN32_WINNT 0x0A0023#define _WIN32_WINNT 0x0A00
24#endif24#endif
25#define WIN32_LEAN_AND_MEAN
26 25
27#include <windows.h>26#include <windows.h>
28 27
libavformat/os_support.c+2−4
@@ -34,11 +34,9 @@ · 33 unmodified lines
34#if HAVE_SYS_TIME_H34#if HAVE_SYS_TIME_H
35#include <sys/time.h>35#include <sys/time.h>
36#endif /* HAVE_SYS_TIME_H */36#endif /* HAVE_SYS_TIME_H */
37#if HAVE_WINSOCK2_H37#if HAVE_SYS_SELECT_H
38#include <winsock2.h>
39#elif HAVE_SYS_SELECT_H
40#include <sys/select.h>38#include <sys/select.h>
41#endif /* HAVE_WINSOCK2_H */39#endif /* HAVE_SYS_SELECT_H */
42#endif /* !HAVE_POLL_H */40#endif /* !HAVE_POLL_H */
43 41
44#include "network.h"42#include "network.h"
libavutil/wchar_filename.h+0−1
@@ -21,7 +21,6 @@ · 20 unmodified lines
21 21
22#ifdef _WIN3222#ifdef _WIN32
23 23
24#define WIN32_LEAN_AND_MEAN
25#include <windows.h>24#include <windows.h>
26#include "mem.h"25#include "mem.h"
27 26
libswscale/utils.c+0−1
@@ -34,7 +34,6 @@ · 33 unmodified lines
34#endif34#endif
35#endif35#endif
36#if HAVE_VIRTUALALLOC36#if HAVE_VIRTUALALLOC
37#define WIN32_LEAN_AND_MEAN
38#include <windows.h>37#include <windows.h>
39#endif38#endif
40 39

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t