From owner-dev-commits-src-all@freebsd.org Mon Mar 1 15:01:54 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 93E7F5606EC; Mon, 1 Mar 2021 15:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq3Pt3s8jz4fTt; Mon, 1 Mar 2021 15:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77B17257A3; Mon, 1 Mar 2021 15:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121F1sX6017445; Mon, 1 Mar 2021 15:01:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121F1soq017444; Mon, 1 Mar 2021 15:01:54 GMT (envelope-from git) Date: Mon, 1 Mar 2021 15:01:54 GMT Message-Id: <202103011501.121F1soq017444@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 95da5e131a0a - main - dialog: fix macro redefinition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 95da5e131a0a9e48f0a063e3ff75000434cc5c52 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 15:01:54 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=95da5e131a0a9e48f0a063e3ff75000434cc5c52 commit 95da5e131a0a9e48f0a063e3ff75000434cc5c52 Author: Baptiste Daroussin AuthorDate: 2021-03-01 14:58:34 +0000 Commit: Baptiste Daroussin CommitDate: 2021-03-01 15:01:44 +0000 dialog: fix macro redefinition dialog.h defines MIN and MAX (making sure to undefine the previous macros if it already exists), but sys/param.h also defines those macros (without guards) and is included after dialog.h resulting in both gcc and clang complaining about macro redefiniton While clang do accept -Wno-macro-redefined to ignore the redefinition warning, gcc does not [1] Undefine both macros prior inclusion of sys/param.h to avoid the warning Reported by: arichardson --- contrib/dialog/util.c | 2 ++ gnu/lib/libdialog/Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/dialog/util.c b/contrib/dialog/util.c index 992be3f433f5..726a36a5031d 100644 --- a/contrib/dialog/util.c +++ b/contrib/dialog/util.c @@ -39,6 +39,8 @@ #endif #ifdef HAVE_SYS_PARAM_H +#undef MIN +#undef MAX #include #endif diff --git a/gnu/lib/libdialog/Makefile b/gnu/lib/libdialog/Makefile index 8c6b84b64f90..b97e4df9373a 100644 --- a/gnu/lib/libdialog/Makefile +++ b/gnu/lib/libdialog/Makefile @@ -15,7 +15,7 @@ MAN= dialog.3 LIBADD= ncursesw m -CFLAGS+= -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED -Wno-macro-redefined +CFLAGS+= -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED .PATH: ${DIALOG} WARNS?= 1