All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Boris Kolpackov <boris@codesynthesis.com>
Cc: Luis Chamberlain <mcgrof@kernel.org>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH 2/2] kconfig: clean up header inclusion
Date: Mon, 2 Nov 2020 13:27:43 +0900	[thread overview]
Message-ID: <CAK7LNARRfK7LFrmJdMj4n77rb6pBYY=gXNLkfoSjk=pBJkg79w@mail.gmail.com> (raw)
In-Reply-To: <20201029155152.2467-3-boris@codesynthesis.com>

On Fri, Oct 30, 2020 at 12:52 AM Boris Kolpackov
<boris@codesynthesis.com> wrote:
>
> - Add missing includes.
> - Remove no longer necessary includes.
> - Separate non-portable header includes for easier porting.

I think the definition of "non-portable"
depends on how far we expand the supported system.

I guess you want to segregate <unistd.h> and <sys/mmap.h>
because you do not have them on Windows, correct?


>
> Signed-off-by: Boris Kolpackov <boris@codesynthesis.com>
> ---
>  scripts/kconfig/conf.c     | 6 +++---
>  scripts/kconfig/confdata.c | 4 +++-
>  scripts/kconfig/lexer.l    | 1 -
>  scripts/kconfig/symbol.c   | 3 ++-
>  4 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
> index f6e548b..74974df 100644
> --- a/scripts/kconfig/conf.c
> +++ b/scripts/kconfig/conf.c
> @@ -9,12 +9,12 @@
>  #include <stdlib.h>
>  #include <string.h>
>  #include <time.h>
> -#include <unistd.h>
>  #include <getopt.h>
> -#include <sys/stat.h>
> -#include <sys/time.h>
>  #include <errno.h>
>
> +#include <unistd.h>
> +#include <sys/time.h>
> +
>  #include "lkc.h"
>
>  static void conf(struct menu *menu);
> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> index a39d93e..64344b9 100644
> --- a/scripts/kconfig/confdata.c
> +++ b/scripts/kconfig/confdata.c
> @@ -3,7 +3,7 @@
>   * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
>   */
>
> -#include <sys/mman.h>
> +#include <sys/types.h>
>  #include <sys/stat.h>
>  #include <ctype.h>
>  #include <errno.h>
> @@ -14,7 +14,9 @@
>  #include <stdlib.h>
>  #include <string.h>
>  #include <time.h>
> +
>  #include <unistd.h>
> +#include <sys/mman.h>
>
>  #include "lkc.h"
>
> diff --git a/scripts/kconfig/lexer.l b/scripts/kconfig/lexer.l
> index 240109f..9c22cb5 100644
> --- a/scripts/kconfig/lexer.l
> +++ b/scripts/kconfig/lexer.l
> @@ -12,7 +12,6 @@
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
> -#include <unistd.h>
>
>  #include "lkc.h"
>  #include "parser.tab.h"
> diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
> index ffa3ec6..0e0f1cc 100644
> --- a/scripts/kconfig/symbol.c
> +++ b/scripts/kconfig/symbol.c
> @@ -6,8 +6,9 @@
>  #include <ctype.h>
>  #include <stdlib.h>
>  #include <string.h>
> +#include <sys/types.h> // off_t
> +
>  #include <regex.h>
> -#include <sys/utsname.h>
>
>  #include "lkc.h"
>
> --
> 2.29.0
>


-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2020-11-02  4:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 15:51 [PATCH 0/2] kconfig: header inclusion cleanups Boris Kolpackov
2020-10-29 15:51 ` [PATCH 1/2] kconfig: make lkc.h self-sufficient #include-wise Boris Kolpackov
2020-11-02  3:40   ` Masahiro Yamada
2020-10-29 15:51 ` [PATCH 2/2] kconfig: clean up header inclusion Boris Kolpackov
2020-11-02  4:27   ` Masahiro Yamada [this message]
2020-11-02 14:32     ` Boris Kolpackov
2020-11-23  5:19       ` Masahiro Yamada
2020-11-23  9:38         ` [PATCH v2 " Boris Kolpackov
2020-11-23 12:19           ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7LNARRfK7LFrmJdMj4n77rb6pBYY=gXNLkfoSjk=pBJkg79w@mail.gmail.com' \
    --to=masahiroy@kernel.org \
    --cc=boris@codesynthesis.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.