From patchwork Sun Apr 17 09:11:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Janda X-Patchwork-Id: 8862621 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B1BCA9F1D3 for ; Sun, 17 Apr 2016 09:11:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9ACCE2017D for ; Sun, 17 Apr 2016 09:11:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5628420173 for ; Sun, 17 Apr 2016 09:11:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751563AbcDQJLp (ORCPT ); Sun, 17 Apr 2016 05:11:45 -0400 Received: from mout01.posteo.de ([185.67.36.65]:57858 "EHLO mout01.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751552AbcDQJLo (ORCPT ); Sun, 17 Apr 2016 05:11:44 -0400 Received: from dovecot03.posteo.de (dovecot03.posteo.de [172.16.0.13]) by mout01.posteo.de (Postfix) with ESMTPS id 30D1320A86 for ; Sun, 17 Apr 2016 11:11:42 +0200 (CEST) Received: from mail.posteo.de (localhost [127.0.0.1]) by dovecot03.posteo.de (Postfix) with ESMTPSA id 3qnlrt0LtCz5vNB; Sun, 17 Apr 2016 11:11:42 +0200 (CEST) Date: Sun, 17 Apr 2016 11:11:03 +0200 From: Felix Janda To: libtirpc-devel@lists.sourceforge.net Cc: linux-nfs@vger.kernel.org Subject: [PATCH 6/7] Remove dependency on the header Message-ID: <20160417091103.GE2737@nyan> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The header is of BSD origin and is mainly used for system limit constants such as MAXHOSTNAMELEN. Remove unecessary inclusions of and replace limit constants by equivalent POSIX constants from . Signed-off-by: Felix Janda --- configure.ac | 2 +- src/auth_unix.c | 4 ++-- src/clnt_simple.c | 1 - src/getpeereid.c | 1 - src/netname.c | 1 - src/netnamer.c | 1 - src/rpc_generic.c | 1 - src/rpc_prot.c | 2 -- src/svc_auth_des.c | 4 ++-- src/svc_vc.c | 1 - src/xdr_float.c | 1 - tirpc/rpc/types.h | 1 - 12 files changed, 5 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index 1f80cf7..8e00689 100644 --- a/configure.ac +++ b/configure.ac @@ -85,7 +85,7 @@ AC_CONFIG_HEADERS([config.h]) AC_PROG_LIBTOOL AC_HEADER_DIRENT AC_PREFIX_DEFAULT(/usr) -AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h features.h gssapi/gssapi_ext.h]) +AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h syslog.h unistd.h features.h gssapi/gssapi_ext.h]) AC_CHECK_LIB([pthread], [pthread_create]) AC_CHECK_FUNCS([getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent]) diff --git a/src/auth_unix.c b/src/auth_unix.c index fc2be02..c20ae1e 100644 --- a/src/auth_unix.c +++ b/src/auth_unix.c @@ -40,7 +40,6 @@ */ #include #include -#include #include #include @@ -49,6 +48,7 @@ #include #include #include +#include #include #include @@ -183,7 +183,7 @@ AUTH * authunix_create_default() { int len; - char machname[MAXHOSTNAMELEN + 1]; + char machname[HOST_NAME_MAX + 1]; uid_t uid; gid_t gid, *gids; AUTH *result; diff --git a/src/clnt_simple.c b/src/clnt_simple.c index 1700060..965717c 100644 --- a/src/clnt_simple.c +++ b/src/clnt_simple.c @@ -36,7 +36,6 @@ */ #include #include -#include #include #include #include diff --git a/src/getpeereid.c b/src/getpeereid.c index dd85270..8f71000 100644 --- a/src/getpeereid.c +++ b/src/getpeereid.c @@ -25,7 +25,6 @@ */ -#include #include #include diff --git a/src/netname.c b/src/netname.c index ea61b1a..96fe2eb 100644 --- a/src/netname.c +++ b/src/netname.c @@ -34,7 +34,6 @@ * the sun NIS domain architecture. */ -#include #include #include "rpc_com.h" #ifdef YP diff --git a/src/netnamer.c b/src/netnamer.c index 6b6c8e0..2475866 100644 --- a/src/netnamer.c +++ b/src/netnamer.c @@ -32,7 +32,6 @@ * will work with any unix system that has adopted the sun NIS domain * architecture. */ -#include #include #include "rpc_com.h" #ifdef YP diff --git a/src/rpc_generic.c b/src/rpc_generic.c index 2f09a8f..c2eb702 100644 --- a/src/rpc_generic.c +++ b/src/rpc_generic.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/src/rpc_prot.c b/src/rpc_prot.c index 5841e51..0f5a30a 100644 --- a/src/rpc_prot.c +++ b/src/rpc_prot.c @@ -39,8 +39,6 @@ * routines are also in this program. */ -#include - #include #include diff --git a/src/svc_auth_des.c b/src/svc_auth_des.c index 2e90146..73de033 100644 --- a/src/svc_auth_des.c +++ b/src/svc_auth_des.c @@ -46,12 +46,12 @@ */ #include #include +#include #include #include #include #include #include -#include #include #include #include @@ -445,7 +445,7 @@ struct bsdcred { short uid; /* cached uid */ short gid; /* cached gid */ short grouplen; /* length of cached groups */ - short groups[NGROUPS]; /* cached groups */ + short groups[NGROUPS_MAX]; /* cached groups */ }; /* diff --git a/src/svc_vc.c b/src/svc_vc.c index 97a76a3..a8df5f0 100644 --- a/src/svc_vc.c +++ b/src/svc_vc.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/src/xdr_float.c b/src/xdr_float.c index 26bc865..6bf4189 100644 --- a/src/xdr_float.c +++ b/src/xdr_float.c @@ -39,7 +39,6 @@ */ #include -#include #include diff --git a/tirpc/rpc/types.h b/tirpc/rpc/types.h index 52c30a2..fe36204 100644 --- a/tirpc/rpc/types.h +++ b/tirpc/rpc/types.h @@ -66,7 +66,6 @@ typedef int32_t rpc_inline_t; #define mem_free(ptr, bsize) free(ptr) #include -#include #include #include