All of lore.kernel.org
 help / color / mirror / Atom feed
From: <Mikko.Rapeli@bmw.de>
To: <raj.khem@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 02/12] hostap-utils: Use C99 stddefs in defining local typedefs
Date: Tue, 15 Sep 2015 06:33:40 +0000	[thread overview]
Message-ID: <20150915062937.GN9460@loska> (raw)
In-Reply-To: <2e8b33d5ff6928987dde0b059cd7403fc32a2e0b.1442248108.git.raj.khem@gmail.com>

On Mon, Sep 14, 2015 at 04:31:17PM +0000, Khem Raj wrote:
> The code is creating more abstract types which is nice however it should
> be using standard defines from stdint.h and not random defines to base
> its own type system

These types are not random. They are standard Linux kernel types used by headers
exported to userspace and their definitions come from <linux/types.h>.
These headers should not depend on libc headers like stdint.h.

Also, this file is actually a convenience copy of <linux/wireless.h> which should
be used directly instead.

-Mikko

> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  ...-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch | 36 ++++++++++++++++++++++
>  meta/recipes-bsp/hostap/hostap-utils.inc           |  4 ++-
>  2 files changed, 39 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
> 
> diff --git a/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch b/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
> new file mode 100644
> index 0000000..b44dca3
> --- /dev/null
> +++ b/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
> @@ -0,0 +1,36 @@
> +From 742fb110d9841a04b3ced256b0bf80ff304dcaff Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Mon, 31 Aug 2015 05:45:08 +0000
> +Subject: [PATCH] Define _u32/__s32/__u16/__s16/__u8 in terms of c99 types
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> +Upstream-Status: Pending
> +
> + wireless_copy.h | 10 +++++-----
> + 1 file changed, 5 insertions(+), 5 deletions(-)
> +
> +diff --git a/wireless_copy.h b/wireless_copy.h
> +index 8208258..1171a35 100644
> +--- a/wireless_copy.h
> ++++ b/wireless_copy.h
> +@@ -86,11 +86,11 @@
> + #else
> + #include <sys/types.h>
> + #include <net/if.h>
> +-typedef __uint32_t __u32;
> +-typedef __int32_t __s32;
> +-typedef __uint16_t __u16;
> +-typedef __int16_t __s16;
> +-typedef __uint8_t __u8;
> ++typedef u_int32_t __u32;
> ++typedef int32_t __s32;
> ++typedef u_int16_t __u16;
> ++typedef int16_t __s16;
> ++typedef u_int8_t __u8;
> + #ifndef __user
> + #define __user
> + #endif /* __user */
> +-- 
> +2.5.1
> +
> diff --git a/meta/recipes-bsp/hostap/hostap-utils.inc b/meta/recipes-bsp/hostap/hostap-utils.inc
> index 89d977a..140321d 100644
> --- a/meta/recipes-bsp/hostap/hostap-utils.inc
> +++ b/meta/recipes-bsp/hostap/hostap-utils.inc
> @@ -10,7 +10,9 @@ SECTION = "kernel/userland"
>  PR = "r4"
>  
>  SRC_URI = "http://hostap.epitest.fi/releases/hostap-utils-${PV}.tar.gz \
> -	   file://hostap-fw-load.patch"
> +           file://hostap-fw-load.patch \
> +           file://0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch \
> +"
>  S = "${WORKDIR}/hostap-utils-${PV}"
>  
>  BINARIES = "hostap_crypt_conf hostap_diag hostap_fw_load hostap_io_debug \
> -- 
> 2.5.2
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

  reply	other threads:[~2015-09-15  6:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-14 16:31 [PATCH 00/12] Fixes with clang Khem Raj
2015-09-14 16:31 ` [PATCH 01/12] xz: Correctly specify GPL-3.0 with autoconf exception Khem Raj
2015-09-14 16:31 ` [PATCH 02/12] hostap-utils: Use C99 stddefs in defining local typedefs Khem Raj
2015-09-15  6:33   ` Mikko.Rapeli [this message]
2015-09-15 15:13     ` Khem Raj
2015-09-16  6:01       ` Mikko.Rapeli
2015-09-14 16:31 ` [PATCH 03/12] xorg-driver: Fix logical && with bitwise and operation Khem Raj
2015-09-14 16:31 ` [PATCH 04/12] qt4: Fix kmap2qmap build with clang Khem Raj
2015-09-14 16:31 ` [PATCH 05/12] gummiboot: Fix build warnings seen with gcc5 Khem Raj
2015-09-14 16:31 ` [PATCH 06/12] gnu-efi, syslinux: Support gcc < 4.7 Khem Raj
2015-09-14 16:31 ` [PATCH 07/12] syslinux: Dont bypass gcc driver for dependency generation options Khem Raj
2015-09-14 16:31 ` [PATCH 08/12] opkg: Include stdio.h for FILE definition Khem Raj
2015-09-14 16:31 ` [PATCH 09/12] quota: Replace using -I= with STAGING_INCDIR Khem Raj
2015-09-14 16:31 ` [PATCH 10/12] connman: Fix build with musl Khem Raj
2015-09-14 16:31 ` [PATCH 11/12] waffle: upgrade waffle_1.5.1.bb -> waffle_1.5.2.bb Khem Raj
2015-09-18 20:21   ` Burton, Ross
2015-09-18 21:04     ` Khem Raj
2015-09-14 16:31 ` [PATCH 12/12] sysstat: Include needed headers explicitly Khem Raj

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=20150915062937.GN9460@loska \
    --to=mikko.rapeli@bmw.de \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@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 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.