Subject: | [PATCH] FreeBSD support |
The attached two patches make it possible to compile and test the module on FreeBSD systems (tested on a FreeBSD 9.2 system).
1. RETVAL is not available in a void xs function (1003.xs:1046: error: 'RETVAL' undeclared).
2. Somehow the build order does not work with FreeBSD's make at all (using gmake works). I changed Makefile.PL to have explicit dependencies. Also the dummy system.c seems to cause problems. With the patch building works with FreeBSD's make and with GNU make.
Regards,
Slaven
Subject: | 0001-no-RETVAL-for-void-xs-function.patch |
From c19bc30357552be90de6f101cf92d25afa478bde Mon Sep 17 00:00:00 2001
From: Slaven Rezic <slaven@rezic.de>
Date: Sat, 30 Nov 2013 17:39:15 +0100
Subject: [PATCH 1/2] no RETVAL for void xs function
---
1003.xs | 1 -
1 file changed, 1 deletion(-)
diff --git a/1003.xs b/1003.xs
index c3a3ac9..75ccf52 100644
--- a/1003.xs
+++ b/1003.xs
@@ -1043,7 +1043,6 @@ _own_ex(function, fd, pid, type)
}
#else
errno = ENOSYS;
- RETVAL = &PL_sv_undef;
#endif
SV *
--
1.8.3.4
Subject: | 0002-change-system.c-dependency.patch |
From 139f19978ef47cb04d81731cfab56c5b5db8b68a Mon Sep 17 00:00:00 2001
From: Slaven Rezic <slaven@rezic.de>
Date: Sat, 30 Nov 2013 17:59:44 +0100
Subject: [PATCH 2/2] change system.c dependency
---
Makefile.PL | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/Makefile.PL b/Makefile.PL
index b5cbfab..331c1cf 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,9 +1,5 @@
use ExtUtils::MakeMaker;
-# The system.c file must sometimes exist to avoid errors in 'make', eventhough
-# the real file will get generated as first thing when make runs.
-open TOUCH, '>', 'system.c' and close TOUCH;
-
WriteMakefile
( NAME => 'POSIX::1003'
, VERSION_FROM => 'lib/POSIX/1003/Module.pm'
@@ -25,7 +21,9 @@ WriteMakefile
#### distribution.
sub MY::postamble { <<'__POSTAMBLE' }
-config:: system.c
+1003.c: system.c
+
+system.c: lists.PL
$(NOECHO) $(ECHO) "*** autodetect available symbols"
$(FULLPERL) lists.PL
--
1.8.3.4