All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 5/9] x86: fixes types for NetBSD & OpenBSD
Date: Thu,  9 Jul 2020 01:41:47 +0200	[thread overview]
Message-ID: <20200708234151.57845-6-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20200708234151.57845-1-luc.vanoostenryck@gmail.com>

On NetBSD & OpenBSD, some types are not defined like on Linux.

Fix this.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 target-x86.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/target-x86.c b/target-x86.c
index 01117bb6ecc8..62323aecc52b 100644
--- a/target-x86.c
+++ b/target-x86.c
@@ -29,6 +29,8 @@ static void init_x86_common(const struct target *target)
 		wint_ctype = &int_ctype;
 		break;
 	case OS_OPENBSD:
+		size_t_ctype = &ulong_ctype;
+		ssize_t_ctype = &long_ctype;
 		wchar_ctype = &int_ctype;
 		wint_ctype = &int_ctype;
 		break;
@@ -72,6 +74,15 @@ static void init_x86_64(const struct target *target)
 		break;
 	case OS_FREEBSD:
 		break;
+	case OS_NETBSD:
+		wint_ctype = &int_ctype;
+		break;
+	case OS_OPENBSD:
+		int64_ctype = &llong_ctype;
+		uint64_ctype = &ullong_ctype;
+		intmax_ctype = &llong_ctype;
+		uintmax_ctype = &ullong_ctype;
+		break;
 	}
 }
 
-- 
2.27.0


  parent reply	other threads:[~2020-07-08 23:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08 23:41 [PATCH 0/9] OS-specific small fixes & cleanup Luc Van Oostenryck
2020-07-08 23:41 ` [PATCH 1/9] x86: reorg the target file Luc Van Oostenryck
2020-07-08 23:41 ` [PATCH 2/9] arch: add an option to specify the OS: --os=$OS Luc Van Oostenryck
2020-07-08 23:41 ` [PATCH 3/9] predefine: add __linux__ & __linux Luc Van Oostenryck
2020-07-08 23:41 ` [PATCH 4/9] predefine: no __unix__ for Darwin Luc Van Oostenryck
2020-07-08 23:41 ` Luc Van Oostenryck [this message]
2020-07-08 23:41 ` [PATCH 6/9] sparc: char are unsigned on Solaris Luc Van Oostenryck
2020-07-08 23:41 ` [PATCH 7/9] arch: add predefines for OS identification Luc Van Oostenryck
2020-07-08 23:41 ` [PATCH 8/9] cygwin: add the predefines '__cdecl', Luc Van Oostenryck
2020-07-08 23:41 ` [PATCH 9/9] cgcc: remove now unneeded options & defines Luc Van Oostenryck

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=20200708234151.57845-6-luc.vanoostenryck@gmail.com \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.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.