开发者

Problem with the POSIX module

After moving my mod_perl site from Linux hosting to FreeBSD, I have this error in the logfile:

Your vendor has no开发者_如何转开发t defined POSIX macro SIGRTMIN, used at ../../lib/POSIX.pm (autosplit into ../../lib/auto/POSIX/SigRt/_init.al) line 993\n

The script just imports POSIX and utilizes some functions (ceil, etc)

How can I solve this issue ?


Try importing only few (or none) routines from the module:

use POSIX ();
my $n = POSIX::ceil(1.1);

This used to work for me in the same circumstances, I don't know why :)


FreeBSD is mostly POSIX-compliant. For example, it doesn't define SIGRTMIN and SIGRTMAX in its signal.h. We are warned against this in POSIX's documentation:

Furthermore, some evil vendors will claim 1003.1 compliance, but in fact are not so: they will not pass the PCTS (POSIX Compliance Test Suites). For example, one vendor may not define EDEADLK, or the semantics of the errno values set by open(2) might not be quite right. Perl does not attempt to verify POSIX compliance. That means you can currently successfully say "use POSIX", and then later in your program you find that your vendor has been lax and there's no usable ICANON macro after all. This could be construed to be a bug.

eugene y's solution might work as it will prevent auto exporting into your namespace, but be sure to prefix any calls to ceil and so on with POSIX::.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜