mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 23:00:41 +00:00
configure: remove checks for malloc.h and alloca()
Including <malloc.h>, especially if all you want is malloc(), has no legitimate uses (on sane platforms at least). Remove the check for it, and remove all uses in the code. Remove unused check for alloca().
This commit is contained in:
parent
261243496e
commit
6e8633c734
29
configure
vendored
29
configure
vendored
@ -1713,29 +1713,6 @@ if test "$_inttypes" = no ; then
|
||||
fi
|
||||
|
||||
|
||||
echocheck "malloc.h"
|
||||
_malloc=no
|
||||
header_check malloc.h && _malloc=yes
|
||||
if test "$_malloc" = yes ; then
|
||||
def_malloc_h='#define HAVE_MALLOC_H 1'
|
||||
else
|
||||
def_malloc_h='#define HAVE_MALLOC_H 0'
|
||||
fi
|
||||
echores "$_malloc"
|
||||
|
||||
|
||||
|
||||
echocheck "alloca.h"
|
||||
_alloca=no
|
||||
statement_check alloca.h 'alloca(0)' && _alloca=yes
|
||||
if cc_check ; then
|
||||
def_alloca_h='#define HAVE_ALLOCA_H 1'
|
||||
else
|
||||
def_alloca_h='#undef HAVE_ALLOCA_H'
|
||||
fi
|
||||
echores "$_alloca"
|
||||
|
||||
|
||||
echocheck "mman.h"
|
||||
_mman=no
|
||||
statement_check sys/mman.h 'mmap(0, 0, 0, 0, 0, 0)' && _mman=yes
|
||||
@ -3074,10 +3051,6 @@ fi
|
||||
echores "$_openal"
|
||||
|
||||
echocheck "ALSA audio"
|
||||
if test "$_alloca" != yes ; then
|
||||
_alsa=no
|
||||
res_comment="alloca missing"
|
||||
fi
|
||||
if test "$_alsa" = auto ; then
|
||||
_alsa=no
|
||||
if pkg_config_add "alsa >= 1.0.9" ; then
|
||||
@ -4346,8 +4319,6 @@ $def_dvdcss
|
||||
|
||||
|
||||
/* system headers */
|
||||
$def_alloca_h
|
||||
$def_malloc_h
|
||||
$def_mman_h
|
||||
$def_mman_has_map_failed
|
||||
$def_soundcard_h
|
||||
|
@ -18,9 +18,6 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -23,9 +23,6 @@
|
||||
#include <endian.h>
|
||||
|
||||
#include "config.h"
|
||||
#if HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include "mp_msg.h"
|
||||
#include "m_option.h"
|
||||
|
@ -28,10 +28,6 @@
|
||||
#include "mp_msg.h"
|
||||
#include "cpudetect.h"
|
||||
|
||||
#if HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include "img_format.h"
|
||||
#include "mp_image.h"
|
||||
#include "vf.h"
|
||||
|
@ -28,10 +28,6 @@
|
||||
#include "config.h"
|
||||
#include "mp_msg.h"
|
||||
|
||||
#if HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include "libavutil/mem.h"
|
||||
|
||||
#include "img_format.h"
|
||||
|
@ -26,10 +26,6 @@
|
||||
#include "mp_msg.h"
|
||||
#include "cpudetect.h"
|
||||
|
||||
#if HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include "img_format.h"
|
||||
#include "mp_image.h"
|
||||
#include "vf.h"
|
||||
|
@ -30,10 +30,6 @@
|
||||
#include "mp_msg.h"
|
||||
#include "cpudetect.h"
|
||||
|
||||
#if HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include "libavutil/mem.h"
|
||||
|
||||
#include "img_format.h"
|
||||
|
@ -27,10 +27,6 @@
|
||||
#include "config.h"
|
||||
#include "mp_msg.h"
|
||||
|
||||
#if HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include "libavutil/avutil.h"
|
||||
#include "img_format.h"
|
||||
#include "mp_image.h"
|
||||
|
@ -28,10 +28,6 @@
|
||||
#include "mp_msg.h"
|
||||
#include "cpudetect.h"
|
||||
|
||||
#if HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include "img_format.h"
|
||||
#include "mp_image.h"
|
||||
#include "vf.h"
|
||||
|
@ -21,9 +21,6 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#if HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
Loading…
Reference in New Issue
Block a user