mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Du Huanpeng <d-hp@163.com>
Cc: barebox@lists.infradead.org, Du Huanpeng <u74147@gmail.com>
Subject: Re: [PATCH] wchar_t: wchar_t should go to stddef.h
Date: Thu, 14 Apr 2016 08:40:12 +0200	[thread overview]
Message-ID: <20160414064012.GY9102@pengutronix.de> (raw)
In-Reply-To: <1460550918-15092-1-git-send-email-d-hp@163.com>

On Wed, Apr 13, 2016 at 08:35:18PM +0800, Du Huanpeng wrote:
> From: Du Huanpeng <u74147@gmail.com>
> 
> according to C99 standard, the definition of wchar_t
> should go stddef.h
> this patch also remove wchar_t local definition and
> use stddef.h instead.
> 
> Signed-off-by: Du Huanpeng <u74147@gmail.com>
> ---
>  fs/efi.c               | 3 +--
>  include/linux/stddef.h | 2 ++
>  include/wchar.h        | 3 +--
>  3 files changed, 4 insertions(+), 4 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/fs/efi.c b/fs/efi.c
> index 0f74cda..83c4682 100644
> --- a/fs/efi.c
> +++ b/fs/efi.c
> @@ -32,6 +32,7 @@
>  #include <efi.h>
>  #include <mach/efi.h>
>  #include <mach/efi-device.h>
> +#include <linux/stddef.h>
>  
>  /* Open modes */
>  #define EFI_FILE_MODE_READ      0x0000000000000001
> @@ -92,8 +93,6 @@ struct efi_file_info {
>  	s16 FileName[1];
>  };
>  
> -typedef unsigned short wchar_t;
> -
>  struct efifs_priv {
>  	struct efi_file_handle *root_dir;
>  	struct efi_file_io_interface *protocol;
> diff --git a/include/linux/stddef.h b/include/linux/stddef.h
> index e366328..680d0c7 100644
> --- a/include/linux/stddef.h
> +++ b/include/linux/stddef.h
> @@ -17,6 +17,8 @@ enum {
>  #include <linux/types.h>
>  #endif
>  
> +typedef unsigned short wchar_t;
> +
>  #undef offsetof
>  #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
>  
> diff --git a/include/wchar.h b/include/wchar.h
> index 702d8e2..adb4f37 100644
> --- a/include/wchar.h
> +++ b/include/wchar.h
> @@ -2,8 +2,7 @@
>  #define __WCHAR_H
>  
>  #include <linux/types.h>
> -
> -typedef u16 wchar_t;
> +#include <linux/stddef.h>
>  
>  wchar_t *strdup_wchar(const wchar_t *src);
>  
> -- 
> 1.9.1
> 
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2016-04-14  6:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13 12:35 Du Huanpeng
2016-04-14  6:40 ` Sascha Hauer [this message]

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=20160414064012.GY9102@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=d-hp@163.com \
    --cc=u74147@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox