Warn that this may be buggy on 32-bit
authorDebian R Packages Maintainers <r-pkg-team@alioth-lists.debian.net>
Mon, 28 Apr 2025 18:16:30 +0000 (19:16 +0100)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Mon, 28 Apr 2025 18:16:30 +0000 (19:16 +0100)
(onLoad not onAttach as some packages use this via requireNamespace)

Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Bug-Debian: https://bugs.debian.org/1104160
Forwarded: not-needed

Gbp-Pq: Name warn-on-32bit.patch

R/zzz.R

diff --git a/R/zzz.R b/R/zzz.R
index a06930add440f70c28a4407f128ba45e72b4c670..c82a2c2a70ca87e2b48d0e4f04e4f950b777a908 100644 (file)
--- a/R/zzz.R
+++ b/R/zzz.R
@@ -1,6 +1,8 @@
 
 # nocov start
 .onLoad <- function(...) {
+  if (.Machine$sizeof.pointer < 8)
+    packageStartupMessage("Warning: using s2 on a 32 bit system, which may not work correctly: https://bugs.debian.org/1104160")
   # call c++ init
   cpp_s2_init()