[FFmpeg-devel] [PATCH 2/2] fmin/fmax/fminf/fmaxf implementation for djgpp libc
Peter Ross
pross at xvid.org
Mon Nov 12 14:51:26 EET 2018
---
compat/djgpp/math.h | 22 ++++++++++++++++++++++
configure | 1 +
2 files changed, 23 insertions(+)
create mode 100644 compat/djgpp/math.h
diff --git a/compat/djgpp/math.h b/compat/djgpp/math.h
new file mode 100644
index 0000000000..28fae5212e
--- /dev/null
+++ b/compat/djgpp/math.h
@@ -0,0 +1,22 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#define fmin(x, y) ((x) > (y) ? (y) : ((x) == (x) ? (x) : (y)))
+#define fmax(x, y) ((x) < (y) ? (y) : ((x) == (x) ? (x) : (y)))
+#define fminf(x, y) fmin(x, y)
+#define fmaxf(x, y) fmax(x, y)
diff --git a/configure b/configure
index 6db4333f25..97778df1ae 100755
--- a/configure
+++ b/configure
@@ -5462,6 +5462,7 @@ EOF
elif test_${pfx}cpp_condition sys/version.h "defined __DJGPP__"; then
eval ${pfx}libc_type=djgpp
add_cppflags -U__STRICT_ANSI__
+ add_cflags "-include $source_path/compat/djgpp/math.h"
fi
test_${pfx}cc <<EOF
#include <time.h>
--
2.17.1
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20181112/99e04fb7/attachment.sig>
More information about the ffmpeg-devel
mailing list