1
0
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:
wm4 2012-07-30 21:19:44 +02:00
parent 261243496e
commit 6e8633c734
11 changed files with 0 additions and 65 deletions

29
configure vendored
View File

@ -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

View File

@ -18,9 +18,6 @@
#include "config.h"
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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>

View File

@ -24,9 +24,6 @@
#include <libavutil/common.h>
#include "config.h"
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
#include "stream/stream.h"
#include "stream/stream_dvdnav.h"