From patchwork Mon Nov 12 12:51:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ross X-Patchwork-Id: 10995 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 06FE444C463 for ; Mon, 12 Nov 2018 14:51:35 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 73F3068A2AF; Mon, 12 Nov 2018 14:51:06 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mx.sdf.org (ol.sdf.org [205.166.94.20]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3E1D068A216 for ; Mon, 12 Nov 2018 14:50:59 +0200 (EET) Received: from c4544fa37676e9ac9963c6998ef1f82d (pa49-199-130-245.pa.vic.optusnet.com.au [49.199.130.245]) (authenticated (128 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id wACCpPmT014079 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO) for ; Mon, 12 Nov 2018 12:51:29 GMT Date: Mon, 12 Nov 2018 23:51:26 +1100 From: Peter Ross To: ffmpeg-devel@ffmpeg.org Message-ID: References: <3aeac525b964740ddd2a6cabf6f73fd0f4d05b39.1542026632.git.pross@xvid.org> MIME-Version: 1.0 In-Reply-To: <3aeac525b964740ddd2a6cabf6f73fd0f4d05b39.1542026632.git.pross@xvid.org> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: [FFmpeg-devel] [PATCH 2/2] fmin/fmax/fminf/fmaxf implementation for djgpp libc X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- 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 <