]> git.sesse.net Git - ffmpeg/commitdiff
Remove pointless #undefs of previously forbidden functions.
authorAnton Khirnov <anton@khirnov.net>
Sat, 20 Oct 2012 13:22:41 +0000 (15:22 +0200)
committerAnton Khirnov <anton@khirnov.net>
Tue, 4 Dec 2012 20:40:22 +0000 (21:40 +0100)
28 files changed:
libavcodec/golomb-test.c
libavcodec/iirfilter.c
libavcodec/libfaac.c
libavdevice/libcdio.c
libavdevice/libdc1394.c
libavdevice/timefilter.c
libavfilter/filtfmts.c
libavfilter/vf_drawtext.c
libavformat/network.c
libavformat/output-example.c
libavformat/seek-test.c
libavformat/url-test.c
libavformat/utils.c
libavutil/avstring.c
libavutil/base64.c
libavutil/blowfish.c
libavutil/cpu.c
libavutil/crc.c
libavutil/des.c
libavutil/eval.c
libavutil/fifo.c
libavutil/log.c
libavutil/md5.c
libavutil/mem.c
libavutil/opt.c
libavutil/parseutils.c
libavutil/sha.c
libavutil/xtea.c

index bc90f36baf6519cf3c500ade67d4dabc2405d163..e740a20aea77af2109a5cb9938e47bb4d3aa78d0 100644 (file)
@@ -25,7 +25,6 @@
 #include "golomb.h"
 #include "put_bits.h"
 
-#undef fprintf
 #define COUNT 8191
 #define SIZE (COUNT * 4)
 
index f9b9ff60d42ea751860ae2ce9bac8399c2986f0c..acfa9048b4125f7d240528d9d16bd85967c0126b 100644 (file)
@@ -312,7 +312,6 @@ av_cold void ff_iir_filter_free_coeffs(struct FFIIRFilterCoeffs *coeffs)
 }
 
 #ifdef TEST
-#undef printf
 #include <stdio.h>
 
 #define FILT_ORDER 4
index 24f3bf2027b13adfc0a91dc53a4c7c626db69517..745fee26743264642b1b46e8ea5d30fd400e3850 100644 (file)
@@ -159,9 +159,7 @@ static av_cold int Faac_encode_init(AVCodecContext *avctx)
             memcpy(avctx->extradata, buffer, avctx->extradata_size);
             faac_cfg->outputFormat = 0;
         }
-#undef free
         free(buffer);
-#define free please_use_av_free
     }
 
     if (!faacEncSetConfiguration(s->faac_handle, faac_cfg)) {
index a82ad67f34c228a6d6fd9655de7346eae61e7816..e846ee635b27e5b6e20b9c060d8a8a5a2110bbeb 100644 (file)
@@ -33,9 +33,6 @@
 #include "libavformat/avformat.h"
 #include "libavformat/internal.h"
 
-/* cdio returns some malloced strings that need to be free()d */
-#undef free
-
 typedef struct CDIOContext {
     AVClass             *class;
     cdrom_drive_t       *drive;
index d953e12cbee23f39b0d9937acc5c73ae1c06fef6..f030e3e31d2f5070898a5156946f903730ebfe06 100644 (file)
@@ -48,8 +48,6 @@
 #define DC1394_FRAMERATE_240   FRAMERATE_240
 #endif
 
-#undef free
-
 typedef struct dc1394_data {
     AVClass *class;
 #if HAVE_LIBDC1394_1
index 8f52fc5d62889a8c452632c3744d502488588af3..8b98d338f0379efab51331fe4f8b5645df68f15f 100644 (file)
@@ -78,8 +78,6 @@ double ff_timefilter_update(TimeFilter *self, double system_time, double period)
 #include "libavutil/lfg.h"
 #define LFG_MAX ((1LL << 32) - 1)
 
-#undef printf
-
 int main(void)
 {
     AVLFG prng;
index 3ec8116635cde80666256062b94f353b286158b1..480b277468bc2e262796cdfa4f903414f8349403 100644 (file)
@@ -25,9 +25,6 @@
 #include "libavfilter/avfilter.h"
 #include "libavfilter/formats.h"
 
-#undef fprintf
-#undef printf
-
 int main(int argc, char **argv)
 {
     AVFilter *filter;
index e1c2bb192075ca65a40bcd013165c678a0a084dd..f8800d2820daf831581e1c335a986607023afa15 100644 (file)
@@ -46,8 +46,6 @@
 #include "internal.h"
 #include "video.h"
 
-#undef time
-
 #include <ft2build.h>
 #include <freetype/config/ftheader.h>
 #include FT_FREETYPE_H
index fe17bdf2eba9115bce67f3ba30d03aeb42a0c45e..1f6bc109957f76e7a16eadcc178c051df7b3cd47 100644 (file)
@@ -57,8 +57,6 @@ static unsigned long openssl_thread_id(void)
 #if HAVE_THREADS && GNUTLS_VERSION_NUMBER <= 0x020b00
 #include <gcrypt.h>
 #include <errno.h>
-#undef malloc
-#undef free
 GCRY_THREAD_OPTION_PTHREAD_IMPL;
 #endif
 #endif
index e4babb49a5a6164e78e824d9090d035c9b929129..2f83990011460362ff59363168a2360ae65abf1c 100644 (file)
@@ -38,8 +38,6 @@
 #include "libavformat/avformat.h"
 #include "libswscale/swscale.h"
 
-#undef exit
-
 /* 5 seconds stream duration */
 #define STREAM_DURATION   5.0
 #define STREAM_FRAME_RATE 25 /* 25 images/s */
index 57d3fa4da54959cb76f341ca103c7e56a4b8afb6..143f0b5ace46043c7b1d7284aec13ae5e454160b 100644 (file)
@@ -28,9 +28,6 @@
 #include "libavutil/mathematics.h"
 #include "libavformat/avformat.h"
 
-#undef printf
-#undef fprintf
-
 static char buffer[20];
 
 static const char *ret_str(int v)
index 58258e502a30bab72f019becc3b5019a9d1304ce..6639ccf7b807464b3738054190915393be8c3b63 100644 (file)
@@ -20,9 +20,6 @@
 
 #include "internal.h"
 
-#undef printf
-#undef exit
-
 static void test(const char *base, const char *rel)
 {
     char buf[200], buf2[200];
index 481760b5ad631383732a9569730000dd4948df5a..12b054d93557e80d2acbe00afa18780e7e9f1b02 100644 (file)
@@ -3092,7 +3092,6 @@ static void hex_dump_internal(void *avcl, FILE *f, int level,
                               const uint8_t *buf, int size)
 {
     int len, i, j, c;
-#undef fprintf
 #define PRINT(...) do { if (!f) av_log(avcl, level, __VA_ARGS__); else fprintf(f, __VA_ARGS__); } while(0)
 
     for(i=0;i<size;i+=16) {
@@ -3130,7 +3129,6 @@ void av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size)
 
 static void pkt_dump_internal(void *avcl, FILE *f, int level, AVPacket *pkt, int dump_payload, AVRational time_base)
 {
-#undef fprintf
 #define PRINT(...) do { if (!f) av_log(avcl, level, __VA_ARGS__); else fprintf(f, __VA_ARGS__); } while(0)
     PRINT("stream #%d:\n", pkt->stream_index);
     PRINT("  keyframe=%d\n", ((pkt->flags & AV_PKT_FLAG_KEY) != 0));
index 6b3a65c7f092164ef4baf749ffa42bb3f066a6d4..c14832e7b99a38f9875c769049f017be4f1d1711 100644 (file)
@@ -159,7 +159,6 @@ int av_strncasecmp(const char *a, const char *b, size_t n)
 #ifdef TEST
 
 #include "common.h"
-#undef printf
 
 int main(void)
 {
index c1fba897be5287edc874b46755a8df9e08696cc8..d16195f1b90fffca47c937cdfe4bea23968ca7e6 100644 (file)
@@ -101,8 +101,6 @@ char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size)
 
 #ifdef TEST
 
-#undef printf
-
 #define MAX_DATA_SIZE    1024
 #define MAX_ENCODED_SIZE 2048
 
index e6f07d6ad01d1e6061c247f0a04a73fc93e61f0b..63cc4043ff4df1ca3efb1c6bc0aa5ea60e5dafb5 100644 (file)
@@ -428,7 +428,6 @@ void av_blowfish_crypt(AVBlowfish *ctx, uint8_t *dst, const uint8_t *src,
 
 #ifdef TEST
 #include <stdio.h>
-#undef printf
 
 #define NUM_VARIABLE_KEY_TESTS 34
 
@@ -531,7 +530,6 @@ static const uint8_t ciphertext2[16] = {
 
 #define IV "blowfish"
 
-#undef exit
 static void test_blowfish(AVBlowfish *ctx, uint8_t *dst, const uint8_t *src,
                           const uint8_t *ref, int len, uint8_t *iv, int dir,
                           const char *test)
index 8db69be24e2d90698ea6d4da6fc4eda59baec55f..23016d68a9b55dcd20e11d56ee104b408358458c 100644 (file)
@@ -111,7 +111,6 @@ int av_parse_cpu_flags(const char *s)
 
 #ifdef TEST
 
-#undef printf
 #include <stdio.h>
 
 static const struct {
index 47520e5cf4d22a7a59009233d68d20254f2eaa7e..3d1d8760373f708fbed5d25edcc8955713303e51 100644 (file)
@@ -113,7 +113,6 @@ uint32_t av_crc(const AVCRC *ctx, uint32_t crc,
 }
 
 #ifdef TEST
-#undef printf
 int main(void)
 {
     uint8_t buf[1999];
index c7c6f1dbeec6d10d8c2f6ef2b1acdc5a3b1ecde5..01cb10b359f105ac8f704febfea53974f6f6c012 100644 (file)
@@ -337,9 +337,6 @@ void av_des_mac(AVDES *d, uint8_t *dst, const uint8_t *src, int count) {
 }
 
 #ifdef TEST
-#undef printf
-#undef rand
-#undef srand
 #include <stdlib.h>
 #include <stdio.h>
 #include "libavutil/time.h"
index 7a28dbe12dcbb9c031ed4f2542437fa1475070fa..7887cf6b0e9168c2fb35006b3c9c632382b733f5 100644 (file)
@@ -545,7 +545,6 @@ int av_expr_parse_and_eval(double *d, const char *s,
 }
 
 #ifdef TEST
-#undef printf
 #include <string.h>
 
 static const double const_values[] = {
index 5774d33d256b2b1944f4c09a2b23ad3e05f6a01a..26848999ec2e0590f8d1c9f78229853f622bedea 100644 (file)
@@ -130,8 +130,6 @@ void av_fifo_drain(AVFifoBuffer *f, int size)
 
 #ifdef TEST
 
-#undef printf
-
 int main(void)
 {
     /* create a FIFO buffer */
index 45c649aae67697c443ce2e8b60b2e999311fa504..80129769f656a9d1a4ad102bfe1f819755c7f82b 100644 (file)
@@ -55,7 +55,6 @@ static const uint8_t color[] = { 0x41, 0x41, 0x11, 0x03, 9, 0x02, 0x06 };
 #endif
 static int use_color = -1;
 
-#undef fprintf
 static void colored_fputs(int level, const char *str)
 {
     if (use_color < 0) {
@@ -104,7 +103,6 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
     if (level > av_log_level)
         return;
     line[0] = 0;
-#undef fprintf
     if (print_prefix && avc) {
         if (avc->parent_log_context_offset) {
             AVClass** parent = *(AVClass ***) (((uint8_t *) ptr) +
index 93a91d7812cc56ddf2b6d9d462a8a6f98d5c4c28..efb993e605d6f5bbd741f12bcea14513bdef25a4 100644 (file)
@@ -182,7 +182,6 @@ void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len)
 }
 
 #ifdef TEST
-#undef printf
 #include <stdio.h>
 
 static void print_md5(uint8_t *md5)
index b6c0b29319e3ebac4f6fd0e9cc57886b011765e1..3a4433d154434e346e1c3ff7975c179f30874d93 100644 (file)
 #include "intreadwrite.h"
 #include "mem.h"
 
-/* here we can use OS-dependent allocation functions */
-#undef free
-#undef malloc
-#undef realloc
-
 #ifdef MALLOC_PREFIX
 
 #define malloc         AV_JOIN(MALLOC_PREFIX, malloc)
index 61a72d0a40f3056a82ff40652f4fbb51c01a9a3f..d2cb9ef95a52fbda3f0d5c235e0f9df01d97e345 100644 (file)
@@ -685,8 +685,6 @@ const AVClass *av_opt_child_class_next(const AVClass *parent, const AVClass *pre
 
 #ifdef TEST
 
-#undef printf
-
 typedef struct TestContext
 {
     const AVClass *class;
index 28aa9c9521348fb4db950363dc69b87932b5bd36..917451eee7e13b90375c5144b209b0d2ea7f59a1 100644 (file)
@@ -498,7 +498,6 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration)
     char lastch;
     int negative = 0;
 
-#undef time
     time_t now = time(0);
 
     len = strlen(timestr);
@@ -643,8 +642,6 @@ int av_find_info_tag(char *arg, int arg_size, const char *tag1, const char *info
 
 #ifdef TEST
 
-#undef printf
-
 int main(void)
 {
     printf("Testing av_parse_video_rate()\n");
index d5831915c4dcdda7136d520ec01b14d40a2d602e..c7c6ce38cfc04ead96fc606840bc366a5467a4ef 100644 (file)
@@ -334,7 +334,6 @@ void av_sha_final(AVSHA* ctx, uint8_t *digest)
 
 #ifdef TEST
 #include <stdio.h>
-#undef printf
 
 int main(void)
 {
index f3357ce544af9fcb3e502708ff1e590af0fef222..1187662eb2a8ecaf296c18820f1fb1808e28d92c 100644 (file)
@@ -101,7 +101,6 @@ void av_xtea_crypt(AVXTEA *ctx, uint8_t *dst, const uint8_t *src, int count,
 
 #ifdef TEST
 #include <stdio.h>
-#undef printf
 
 #define XTEA_NUM_TESTS 6
 
@@ -138,7 +137,6 @@ static const uint8_t xtea_test_ct[XTEA_NUM_TESTS][8] = {
     { 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 }
 };
 
-#undef exit
 static void test_xtea(AVXTEA *ctx, uint8_t *dst, const uint8_t *src,
                       const uint8_t *ref, int len, uint8_t *iv, int dir,
                       const char *test)