[sparc64] fix lang/haslink build

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[sparc64] fix lang/haslink build

Kurt Mosiejczuk-9
hashlink has been dying for a bit, probably to do with the 1.11 update.

Errors were complaining about no definition of char16_t. Based on what I
saw used for fixes for clang without c++, I changed it to use uint16_t
for the uchar typedef. This fixes the build on sparc64 and doesn't break
it on amd64.

ok?

(cc maintainer)

--Kurt

Index: patches/patch-src_hl_h
===================================================================
RCS file: /cvs/ports/lang/hashlink/patches/patch-src_hl_h,v
retrieving revision 1.3
diff -u -p -r1.3 patch-src_hl_h
--- patches/patch-src_hl_h 11 Apr 2020 09:59:20 -0000 1.3
+++ patches/patch-src_hl_h 27 Jul 2020 05:36:25 -0000
@@ -3,10 +3,12 @@ $OpenBSD: patch-src_hl_h,v 1.3 2020/04/1
 add OpenBSD to ifdef
 don't typedef char{16,32}_t in clang with C++
 
+Use uint16_t for uchar otherwise. char16_t doesn't exist
+
 Index: src/hl.h
 --- src/hl.h.orig
 +++ src/hl.h
-@@ -234,11 +234,13 @@ typedef uint16_t uchar;
+@@ -234,15 +234,17 @@ typedef uint16_t uchar;
  # define USTR(str) u##str
  #else
  # include <stdarg.h>
@@ -20,4 +22,9 @@ Index: src/hl.h
 +#endif
  #else
  # include <uchar.h>
+ #endif
+-typedef char16_t uchar;
++typedef uint16_t uchar;
+ # undef USTR
+ # define USTR(str) u##str
  #endif

Reply | Threaded
Open this post in threaded view
|

Re: [sparc64] fix lang/haslink build

Thomas Frohwein-2
On Mon, Jul 27, 2020 at 01:38:22AM -0400, Kurt Mosiejczuk wrote:
> hashlink has been dying for a bit, probably to do with the 1.11 update.
>
> Errors were complaining about no definition of char16_t. Based on what I
> saw used for fixes for clang without c++, I changed it to use uint16_t
> for the uchar typedef. This fixes the build on sparc64 and doesn't break
> it on amd64.
>
> ok?

ok thfr@
tested on amd64 without issues.

IMO should bump REVISION

Your bulk from July 28 suggests you've been doing the build with this
patch already.

>
> (cc maintainer)
>
> --Kurt
>
> Index: patches/patch-src_hl_h
> ===================================================================
> RCS file: /cvs/ports/lang/hashlink/patches/patch-src_hl_h,v
> retrieving revision 1.3
> diff -u -p -r1.3 patch-src_hl_h
> --- patches/patch-src_hl_h 11 Apr 2020 09:59:20 -0000 1.3
> +++ patches/patch-src_hl_h 27 Jul 2020 05:36:25 -0000
> @@ -3,10 +3,12 @@ $OpenBSD: patch-src_hl_h,v 1.3 2020/04/1
>  add OpenBSD to ifdef
>  don't typedef char{16,32}_t in clang with C++
>  
> +Use uint16_t for uchar otherwise. char16_t doesn't exist
> +
>  Index: src/hl.h
>  --- src/hl.h.orig
>  +++ src/hl.h
> -@@ -234,11 +234,13 @@ typedef uint16_t uchar;
> +@@ -234,15 +234,17 @@ typedef uint16_t uchar;
>   # define USTR(str) u##str
>   #else
>   # include <stdarg.h>
> @@ -20,4 +22,9 @@ Index: src/hl.h
>  +#endif
>   #else
>   # include <uchar.h>
> + #endif
> +-typedef char16_t uchar;
> ++typedef uint16_t uchar;
> + # undef USTR
> + # define USTR(str) u##str
>   #endif

Reply | Threaded
Open this post in threaded view
|

Re: [sparc64] fix lang/haslink build

Kurt Mosiejczuk-9
On Fri, Jul 31, 2020 at 04:37:04PM -0600, Thomas Frohwein wrote:
> On Mon, Jul 27, 2020 at 01:38:22AM -0400, Kurt Mosiejczuk wrote:
> > hashlink has been dying for a bit, probably to do with the 1.11 update.

> > Errors were complaining about no definition of char16_t. Based on what I
> > saw used for fixes for clang without c++, I changed it to use uint16_t
> > for the uchar typedef. This fixes the build on sparc64 and doesn't break
> > it on amd64.

> > ok?

> ok thfr@
> tested on amd64 without issues.

> IMO should bump REVISION

Sure.

> Your bulk from July 28 suggests you've been doing the build with this
> patch already.

Yes. I try it out in the build before asking to commit it.

--Kurt