pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Successfully bootstrapped pkgsrc-2025Q4 on Solaris 9/sparc with patches
John Carr <jcarr%poethecat.com@localhost> writes:
> patch-awk.h
> --- awk.h.orig
> +++ awk.h
> @@ -38,6 +38,17 @@ typedef unsigned char uschar;
>
> #define xfree(a) { free((void *)(intptr_t)(a)); (a) = NULL; }
> /*
> + * Solaris 9 and earlier declare but don't implement these C99 functions
> + */
> +#if defined(__sun) && !defined(HAVE_ISINF)
> +#define isinf(x) (!isnan(x) && isnan((x) - (x)))
> +#endif
> +#if defined(__sun) && !defined(HAVE_SIGNBIT)
> +#define signbit(x) ((x) < 0.0 || ((x) == 0.0 && 1.0/(x) < 0.0))
> +#endif
> +
> +/* * We sometimes cheat writing read-only pointers to NUL-terminate them
> * and then put back the original value
> */
Generally our sources are ASCII and this looks to have funky
spaces. Either that or your MUA is hallucinating them. Not sure what's
going on here.
If autoconf is checking for ISINF and SIGNBIT, then perhaps the
workaround should just be conditioned on that, vs __sun. I'm unclear on
if __sun means "solaris" or if it is true e.g. on NetBSD on sparc.
Also, if checking for __sun and tryign to be narrow then perhaps also
check for solaris <= 9. I guess I mean either go narrow or don't
guard it and this looks like in the midle.
> For archivers/libarchive:
>
> --- archive_platform.h.orig Fri Feb 6 16:45:59 2026
> +++ archive_platform.h Fri Feb 6 16:46:36 2026
> @@ -210,4 +210,22 @@
> #define __LA_FALLTHROUGH
> #endif
>
> +/*
> + * Solaris 9 and earlier declare strtoimax/strtoumax in headers
> + * but don't actually implement them in libc. Use strtoll/strtoull
> + * which are equivalent on these platforms.
> + */
> +#if defined(__sun) && !defined(HAVE_STRTOIMAX)
> +#include <stdlib.h> /* for strtoll/strtoull */
> +static inline intmax_t
> +strtoimax(const char *nptr, char **endptr, int base)
> +{
> + return strtoll(nptr, endptr, base);
> +}
> +static inline uintmax_t
> +strtoumax(const char *nptr, char **endptr, int base)
> +{
> + return strtoull(nptr, endptr, base);
> +}
> +#endif
> #endif /* !ARCHIVE_PLATFORM_H_INCLUDED */
I feel like comments are too verbose; we don't annotate headers with
inclusion reasons. The real issue is likely namespace pollution from
this, but probably that's ok. Same comment as before about why limting
to sun. Could be just !define(HAVE_STRTOIMAX) and a quick
/* Solaris 9 declares strtoimax but does not define it. */
> --- archive_read_support_filter_bzip2.c.orig Fri Feb 6 16:48:32 2026
> +++ archive_read_support_filter_bzip2.c Fri Feb 6 16:49:26 2026
> @@ -39,6 +39,7 @@
> #include <unistd.h>
> #endif
> #ifdef HAVE_BZLIB_H
> +#include <stdio.h> /* Required before bzlib.h on Solaris */
> #include <bzlib.h>
> #endif
This is problematic. It's adding a define for all systems, and doing
it in many places. I wonder if we can:
enhance the configure check so that solaris bzlib.h is rejected as not
good enough
have a shadow bzlib.h that then includes the real one - probably not
Home |
Main Index |
Thread Index |
Old Index