0.21 2022-10-28
[Bug Fix]
* Fixed the following bug "undefined symbol: clock_gettime".
http://www.cpantesters.org/cpan/report/bd054802-55bd-11ed-9ef0-b2246e8775ea
* Fixed the following bug "F_OK is not defined on this system".
http://www.cpantesters.org/cpan/report/ca95477e-55bd-11ed-b10d-6ad02691c3e1
[OS Support Drop]
* SPVM::Sys only supports FreeBSD 10+ because the following tests couldn't be fixed.
http://www.cpantesters.org/cpan/report/b26888fa-55bd-11ed-9ef0-b2246e8775ea
* SPVM::Sys doens't supports Solaris.
SPVM::Sys only supports Solaris because the following tests couldn't be fixed by us.
http://www.cpantesters.org/cpan/report/4632b772-5587-11ed-aba6-9a79f339625c
0.20 2022-10-27
[Test Fix]
* Fixed the testing bug that the test of the getpeername method in the Sys::Socket failed in a different port.
* Fixed the testing bug that the test of the status of the waitpid method was checked wrongly.
0.19 2022-10-26
[Test Fix]
* Fixed the bug of the testing function search_available_port.
0.18 2022-10-25
[Test Improvement]
* Added the tests of the test server.
0.17 2022-10-24
[Test Improvement]
* Simplify t/Ioctl.t
* Added the tests of the test server.
0.16 2022-10-24
[Prerequirement Change]
* Need SPVM 0.9657+.
[Bug Fix]
* Fixed the bug that FreeBSD can't find WNOHANG symbol adding sys/types.h header.
* Fixed the bug that FreeBSD that major version is less than 13 doesn't support clock_nanosleep.
* Fixed the bug that OpenBSD doesn't support struct ip_mreq_source.
[Test Improvement]
* Added the stack trace in the TestUtil::Socket module.
0.15 2022-10-21
[Bug Fix]
* Fixed the bug that FreeBSD can't compile SPVM::Sys for the following error.
error: unknown type name 'u_char'
http://www.cpantesters.org/cpan/report/535be3d8-5046-11ed-9e69-69166e8775ea
[Test Fix]
* Fixed the test bug that the test of the realpath method failed.
Failed test at t/Sys_IO.t line 95.
http://www.cpantesters.org/cpan/report/dd28d0f2-5060-11ed-aba6-9a79f339625c
0.14 2022-10-20
[Test Improvement]
* Added the TestUtil::Scope::Guard class for socket tests and use it.
* Add the TestUtil::Socket module for the tests of socket.
[Test Fix]
* Fixed the logic of searching an available port in Sys_Socket.t, Sys_Poll.t, Sys_Select.t and Sys_Ioctl.t
0.13 2022-10-19
[New Features]
* Added the set method to the Sys::Select::Fd_set class.
[Bug Fix]
* Fixed the bugs that the following methods are not implemented.
static method FD_ZERO : void ($set : Sys::Select::Fd_set);
static method FD_SET : void ($fd : int, $set : Sys::Select::Fd_set);
static method FD_CLR : void ($fd : int, $set : Sys::Select::Fd_set);
static method FD_ISSET : int ($fd : int, $set : Sys::Select::Fd_set);
[Test Improvement]
* Improved the tests of the Sys::Select class.
0.12 2022-10-18
[Bug Fix]
* Try to fix the bug on FreeBSD error: invalid application of 'sizeof' to an incomplete type 'struct sockaddr_in'
* Try to fix the bug on FreeBSD error: invalid application of 'sizeof' to an incomplete type 'struct sockaddr_in6'
[Test Improvement]
* Added testing outputs of the realpath method in the Sys::IO.
0.11 2022-10-18
[New Features]
* Added the following methods to Sys class.
static method defined : int ($macro_name : string, $value = undef : object of Int|Long|Double)
static method get_osname : string ()
* Added the following method to the Sys::IO class.
static method access_raw : int ($pathname : string, $mode : int)
static method faccessat_raw : int ($dirfd : int, $pathname : string, $mode : int, $flags : int)
static method faccessat : int ($dirfd : int, $pathname : string, $mode : int, $flags : int)
static method eaccess_emulate_raw : int ($pathname : string, $mode : int)
static method eaccess_emulate : int ($pathname : string, $mode : int)
static method stat_raw : int ($path : string, $stat : Sys::IO::Stat);
static method lstat_raw : int ($path : string, $stat : Sys::IO::Stat);
static method FD_ZERO : void ($set : Sys::IO::Fd_set);
static method FD_SET : void ($fd : int, $set : Sys::IO::Fd_set);
static method FD_CLR : void ($fd : int, $set : Sys::IO::Fd_set);
static method FD_ISSET : int ($fd : int, $set : Sys::IO::Fd_set);
static method select : int ($nfds : int, $readfds : Sys::IO::Fd_set, $writefds : Sys::IO::Fd_set, $exceptfds : Sys::IO::Fd_set, $timeout : Sys::Time::Timeval);
* Added the following methods to Sys::FileTest class.
static method r : int ($file : string);
static method w : int ($file : string);
static method x : int ($file : string);
* Added the following methods to Sys::IO::Constant class.
static method FD_SETSIZE : int ()
* Added the Sys::Select::Fd_set class.
* Added the Sys::Select class.
* Added the Sys::Select::Constant class.
* Added the Sys::Poll class.
* Added the Sys::Poll::Constant class.
* Added the Sys::Ioctl class.
* Added the Sys::Ioctl::Constant class.
[Changes]
* The close method in the Sys::Socket is re-implemented as a native method.
[Incompativle Changes]
* Removed the is_D_WIN32 method in the Sys class. Please use Sys->defined("_WIN32") instead.
* The access method in the Sys::IO gets to raise an exception. Use the access_raw method instead if the original behavior is needed.
* Moved the poll method from the Sys::IO class to Sys::Poll.
* Rename the Sys::IO::PollfdArray class to the Sys::Poll::PollfdArray class.
* Moved the poll constant functions(POLL*) from the Sys::IO::Constant to the Sys::Poll::Constant class.
* Removed the closesocket method in the Sys::Socket class.
* Moved the FIONBIO method from Sys::Socket::Constant to Sys::Ioctl::Constant.
* Removed the ioctl method and the ioctlsocket method in the Sys::Socket class. Use the ioctl method in the Sys::Ioctl instead.
* Removed the ioctl method in the Sys::IO class. Use the ioctl method in the Sys::Ioctl instead.
0.10 2022-10-14
[New Features]
* Added the Sys::Time::Timeval class.
* Added the Sys::Time::Timezone class.
* Added the following methods to the Sys::Process class.
static method usleep : int ($usec : int)
static method ualarm : long ($usecs : long, $interval : long)
* Added the following methods to the Sys::Time class.
static method gettimeofday ($tv : Sys::Time::Timeval, $tz : Sys::Time::Timezone)
static method clock : long ()
static method clock_gettime : int ($clk_id : int, $tp : Sys::Time::Timespec)
static method clock_getres : int ($clk_id : int, $res : Sys::Time::Timespec)
static method getitimer : int ($which : int, $curr_value : Sys::Time::Itimerval);
static method setitimer : int ($which : int, $new_value : Sys::Time::Itimerval, $old_value : Sys::Time::Itimerval);
static method clock_nanosleep : int ($clockid : int, $flags : int, $request : Sys::Time::Timespec, $remain : Sys::Time::Timespec)
static method nanosleep : int ($rqtp : Sys::Time::Timespec, $rmtp : Sys::Time::Timespec)
* Added the Sys::Time::Timespec class.
* Added the Sys::Time::Itimerval class.
* Added the following methods to the Sys::IO::Stat class
method st_mtim_tv_nsec : long ()
method st_atim_tv_nsec : long ()
method st_ctim_tv_nsec : long ()
* Added the Sys::Time::Constant class.
[Bug Fix]
* Fixed the bug that the internally integral type is wrong. 32bit is fixed to64bit.
SPVM::Sys::IO::Utimbuf->set_actime
Sys::IO::Utimbuf->set_modtime
Sys::Process->usleep
Sys::Process->ualarm
Sys::Time::Timespec->set_tv_sec
Sys::Time::Timespec->set_tv_nsec
Sys::Time::Timeval->set_tv_sec
Sys::Time::Timeval->set_tv_usec
[Incompativle Changes]
* The times method is moved from SYS::Process to Sys::Time.
* The Sys::Process::Tms is renamed to Sys::Time::Tms.
[Document Improvement]
* Added the doc of the Sys::Time::Tms.
0.09 2022-10-07
[New Features]
* Add the clone method to the Sys::Socket::Sockaddr class.
method clone : Sys::Socket::Sockaddr ()
* Add the clone method to the Sys::Socket::Sockaddr::In class.
method clone : Sys::Socket::Sockaddr::In ()
* Add the clone method to the Sys::Socket::Sockaddr::In6 class.
method clone : Sys::Socket::Sockaddr::In6 ()
* Add the clone method to the Sys::Socket::Sockaddr::Un class.
method clone : Sys::Socket::Sockaddr::Un ()
* Add the clone method to the Sys::Socket::Sockaddr::Storage class.
method clone : Sys::Socket::Sockaddr::Storage ()
* Sys::Socket::Sockaddr has Cloneable interface.
* Added the accessor methods to the Sys::Socket::Addrinfo class.
method ai_flags : int ();
method set_ai_flags : void ($ai_flags : int);
method ai_family : int ();
method set_ai_family : void ($ai_family : int);
method ai_socktype : int ();
method set_ai_socktype : void ($ai_socktype : int);
method ai_protocol : int ();
method set_ai_protocol : void ($ai_protocol : int);
method copy_ai_addr : Sys::Socket::Sockaddr ();
method copy_ai_canonname : string ();
* Added the Sys::Socket::AddrinfoLinkedList class.
* Add the following methods to the Sys::Socket::Constant class.
static method NI_MAXHOST : int ();
static method NI_MAXSERV : int ();
[Bug Fix With Incompatible Changes]
* Fixed the bug that the set_sin6_flowinfo method in the Sys::Socket::Sockaddr::In6 class didn't have the argument.
[Before]
method set_sin6_flowinfo : void ()
[After]
method set_sin6_flowinfo : void ($flowinfo : int)
* Fixed the bug that the set_sin6_scope_id in the Sys::Socket::Sockaddr::In6 class didn't have the argument.
[Before]
method set_sin6_scope_id : void ()
[After]
method set_sin6_scope_id : void ($scope_id : int)
[Prerequirement Changes]
* Need SPVM 0.9654+.
[Incompativle Changes]
* The definition of the getaddrinfo_raw and getaddrinfo methods in the Sys::Socket
[Before]
static method getaddrinfo_raw : int ($node : string, $service : string,
$hints : Sys::Socket::Addrinfo,
$res : Sys::Socket::Addrinfo[]);
static method getaddrinfo : int ($node : string, $service : string,
$hints : Sys::Socket::Addrinfo,
$res : Sys::Socket::Addrinfo[]);
[After]
static method getaddrinfo_raw : int ($node : string, $service : string,
$hints : Sys::Socket::Addrinfo,
$res : Sys::Socket::AddrinfoLinkedList[]);
static method getaddrinfo : int ($node : string, $service : string,
$hints : Sys::Socket::Addrinfo,
$res : Sys::Socket::AddrinfoLinkedList[]);
* Removed the POLLNORM method in the Sys::IO::Constant.
static method POLLNORM : int ();
[Bug Fix]
* Fixed the bug that the poll constant values in the Sys::IO::Constant was not used.
* Fixed the but that the return value of the WSAPoll method in the Sys::Socket class was wrong.
[Document Fix]
* Add the doc of the poll constant methods of Sys::IO::Constant.
=head2 POLLERR
static method POLLERR : int ();
Get the constant value of C<POLLERR>. If the system doesn't define this constant, an exception will be thrown. The error code is set to the class id of the L<Error::NotSupported|SPVM::Error::NotSupported> class.
=head2 POLLHUP
static method POLLHUP : int ();
Get the constant value of C<POLLHUP>. If the system doesn't define this constant, an exception will be thrown. The error code is set to the class id of the L<Error::NotSupported|SPVM::Error::NotSupported> class.
=head2 POLLIN
static method POLLIN : int ();
Get the constant value of C<POLLIN>. If the system doesn't define this constant, an exception will be thrown. The error code is set to the class id of the L<Error::NotSupported|SPVM::Error::NotSupported> class.
=head2 POLLNVAL
static method POLLNVAL : int ();
Get the constant value of C<POLLNVAL>. If the system doesn't define this constant, an exception will be thrown. The error code is set to the class id of the L<Error::NotSupported|SPVM::Error::NotSupported> class.
=head2 POLLOUT
static method POLLOUT : int ();
Get the constant value of C<POLLOUT>. If the system doesn't define this constant, an exception will be thrown. The error code is set to the class id of the L<Error::NotSupported|SPVM::Error::NotSupported> class.
=head2 POLLPRI
static method POLLPRI : int ();
Get the constant value of C<POLLPRI>. If the system doesn't define this constant, an exception will be thrown. The error code is set to the class id of the L<Error::NotSupported|SPVM::Error::NotSupported> class.
=head2 POLLRDBAND
static method POLLRDBAND : int ();
Get the constant value of C<POLLRDBAND>. If the system doesn't define this constant, an exception will be thrown. The error code is set to the class id of the L<Error::NotSupported|SPVM::Error::NotSupported> class.
=head2 POLLRDNORM
static method POLLRDNORM : int ();
Get the constant value of C<POLLRDNORM>. If the system doesn't define this constant, an exception will be thrown. The error code is set to the class id of the L<Error::NotSupported|SPVM::Error::NotSupported> class.
=head2 POLLWRBAND
static method POLLWRBAND : int ();
Get the constant value of C<POLLWRBAND>. If the system doesn't define this constant, an exception will be thrown. The error code is set to the class id of the L<Error::NotSupported|SPVM::Error::NotSupported> class.
=head2 POLLWRNORM
static method POLLWRNORM : int ();
Get the constant value of C<POLLWRNORM>. If the system doesn't define this constant, an exception will be thrown. The error code is set to the class id of the L<Error::NotSupported|SPVM::Error::NotSupported> class.
* Fixed the document bug that Sys::IO::PollfdArray was called Sys::Poll::PollfdArray.
0.08 2022-10-04
[New Features]
* Add the FIONBIO method to the Sys::Socket::Constant class.
static method FIONBIO : int ();
[Warning Fix]
* Fixed the some warnings on Mac.
[Bug Fix]
* Fixed the bug that the SOMAXCONN method in the Sys::Socket::Constant class couldn't be called.
* Fixed the bug that the getsockopt_int method in the Sys::Socket class doesn't work well.
[Changes]
* Change the return type of the inet_ntop method in the Sys::Socket class.
[Before]
static method inet_ntop : string ($af : int, $src : object of Sys::Socket::In_addr|Sys::Socket::In6_addr, $dst : mutable string, $size : int);
[After]
static method inet_ntop : mutable string ($af : int, $src : object of Sys::Socket::In_addr|Sys::Socket::In6_addr, $dst : mutable string, $size : int);
[Testing Bug Fix]
* Fixed the testing bug of the getpriority method in the Sys::Process class.
[Incompatible Changes]
* Removed the ioctl_int method in the Sys::Socket class.
* Renamed the following method in the Sys::Socket::Sockaddr::In class.
[Before]
method sin_addr : Sys::Socket::In_addr ()
[After]
method copy_sin_addr : Sys::Socket::In_addr ()
* Renamed the following method in the Sys::Socket::Sockaddr::In6 class.
[Before]
method sin6_addr : Sys::Socket::In6_addr ();
[After]
method copy_sin6_addr : Sys::Socket::In6_addr ()
0.07 2022-09-29
[Changes]
* The inet_aton method in the Sys::Socket class is emulated using inet_pton on Windows.
[Ineffective Changes]
* Sys::Socket::Constant->SHUT_RD always return 0.
* Sys::Socket::Constant->SHUT_WR always return 1.
* Sys::Socket::Constant->SHUT_RDWR always return 2.
[New Features]
* Added the sizeof method in the Sys::Socket::Sockaddr.
method sizeof : int ()
* Added the size method in the Sys::Socket::Sockaddr::Interface.
method sizeof : int ()
* Added the size method in the Sys::Socket::Sockaddr::In.
method sizeof : int ()
* Added the size method in the Sys::Socket::Sockaddr::In6.
method sizeof : int ()
* Added the size method in the Sys::Socket::Sockaddr::Un.
method sizeof : int ()
* Added the size method in the Sys::Socket::Sockaddr::Strage.
method sizeof : int ()
* Added the s_addr and set_s_addr methods to the Sys::In_addr class.
method s_addr : int ();
method set_s_addr : void ($s_addr : int);
* Added the s6_addr and set_s6_addr methods to the Sys::In6_addr class.
method s6_addr : string ();
method set_s6_addr : void ($address : string);
* Add Sys::Socket::Error::InetInvalidNetworkAddress.
[Test Improvement]
* Added the test of the exit method in the Sys::Process class on Windows.
* Added the test of the execv method in the Sys::Process class on Windows.
[Bug Fix With Incompative Changes]
* Fixed the bug that the definitions of the sin_family and set_sin_family method in the Sys::Socket::Sockaddr::In were wrong.
[Before]
method sin_family : int ()
method set_sin_family : void ()
[After]
method sin_family : byte ()
method set_sin_family : void ($family : byte)
* Fixed the bug that the definitions of the sin6_family and set_sin6_family method in the Sys::Socket::Sockaddr::In6 were wrong.
[Before]
method sin6_family : int ()
method set_sin6_family : void ()
[After]
method sin6_family : byte ()
method set_sin6_family : void ($family : byte)
* Fixed the bug that the definitions of the sun_family and set_sun_family method in the Sys::Socket::Sockaddr::Un were wrong.
[Before]
method sun_family : int ()
method set_sun_family : void ()
[After]
method sun_family : byte ()
method set_sun_family : void ($family : byte)
* Fixed the bug that the definitions of the ss_family and set_ss_family method in the Sys::Socket::Sockaddr::Storage were wrong.
[Before]
method ss_family : int ()
method set_ss_family : void ()
[After]
method ss_family : byte ()
method set_ss_family : void ($family : byte)
* Fixed the bug that the definitions of the sa_family method in the Sys::Socket::Sockaddr and its child classes and the interface were wrong.
[Before]
method sa_family : int ()
[After]
method sa_family : byte ()
[Bug Fix]
* Fixed the bug that the socket_strerror method in the Sys::Socket class didn't work well.
[Test Fix]
* Fixed the test of the times method in the Sys::Process class.
[Document Improvement]
* Add the doc of the Sys::Socket::Sockaddr class.
* Add the doc of the Sys::Socket::Sockaddr::Interface class.
[Incompative Changes]
* The inet_ntop method in Sys::Socket throw an exception if the address family is not AF_INET and AF_INET6.
* The inet_pton method in Sys::Socket throw an exception if the address family is not AF_INET and AF_INET6.
* The inet_ntop and inet_pton method in Sys::Socket throw an exception with Sys::Socket::Error::InetInvalidNetworkAddress
if the address is an invalid network address.
* The inet_ntoa method in Sys::Socket throw an exception if inet_ntoa failed.
* The set_sin6_addr method in Sys::Socket::Sockaddr::In6 throw an exception if the address is not defined.
* The set_sin_addr method in Sys::Socket::Sockaddr::In throw an exception if the address is not defined.
[Internall Uneffective Changes]
* Rename the has_interface in the class Sys::Socket::Sockaddr::Interface to has_interfaces.
* Rename the has_interface in the class Sys::Socket::Sockaddr to has_interfaces.
0.06 2022-09-27
[Test Fix]
* Fix the test of the setpriority method in the Sys::Process class.
* Fix the test of the times method in the Sys::Process class.
[New Features]
* Add the getaddrinfo_raw to the Sys::Socket class. This is the same as original the getaddrinfo method.
* Add the getnameinfo_raw to the Sys::Socket class. This is the same as original the getnameinfo method.
* Add the following methods to the Sys::Socket class.
static method socket_errno : int ();
static method socket_strerror : string ($errno : int, $length : int);
[Prerequirement Changes]
* SPVM::Sys needs SPVM 0.9653+.
[Incompatible Changes]
* The getaddrinfo method in the Sys::Socket class gets to throw an exception.
* The getnameinfo method in the Sys::Socket class gets to throw an exception.
* Rename the follwing methods in the Sys::Socket class.
[Before]
static method ioctl_int_portable : int ($fd : int, $request : int, $request_arg_ref : int*);
static method poll_portable : int ($fds : Sys::IO::PollfdArray, $nfds : int, $timeout : int);
static method close_portable : int ($fd : int);
[After]
static method ioctl_int : int ($fd : int, $request : int, $request_arg_ref : int*);
static method poll : int ($fds : Sys::IO::PollfdArray, $nfds : int, $timeout : int);
static method close : int ($fd : int);
0.05 2022-09-26
[Document Fix To Fix Typo]
* Remove native attribute from the definitions of the methods.
[Test Improvement]
* Add many tests.
[Bug Fix]
* Fix the bug that the execv method in the Sys::Process doesn't work well.
[Incompatible Changes]
* The name and definition of the setpgrp method in the Sys::Process.
[Before]
static method setpgrp : int ();
[After]
static method setpgid : int ($pid : int, $pgid : int);
* The name and definition of the getpgrp method in the Sys::Process.
[Before]
static method getpgrp : int ();
[After]
static method getpgid : int ($pid : int);
0.04 2022-09-16
[Test Improvement]
* Add many tests.
[Bug Fix]
* Fix the bug that the l method in the Sys::FileTest class doesn't work well.
[Prerequirement Changes]
* Need SPVM::Errno 0.06+.
0.03 2022-09-15
[New Features]
* Add the getcwd method to the Sys::IO class.
static method getcwd : mutable string ($buf : mutable string, $size : int);
static method realpath : mutable string ($path : string, $resolved_path : mutable string);
static method _getdcwd : mutable string ($drive : int, $buffer : mutable string, $maxlen : int);
* Add the following methods to the Sys class.
static method getenv : string ($name : string);
static method setenv : int ($name : string, $value : string, $overwrite : int);
static method unsetenv : int ($name : string);
[Incompatible Changes]
* Change the definition of the following method in the Sys::IO class.
[Before]
static method fwrite : int ($buffer : mutable string, $size : int, $data_length : int, $stream : Sys::IO::FileStream);
[After]
static method fwrite : int ($ptr : string, $size : int, $nmemb : int, $stream : Sys::IO::FileStream);
* Change the definition of the following method in the Sys::IO class.
[Before]
static method truncate : long ($path : string, $offset : long);
[After]
static method truncate : int ($path : string, $length : long);
[Bug Fix]
* Fix the bug that lseek return value is wrong.
* Fix the bug that truncate return value is wrong.
* Fix the bug that the length argument of the truncate method in the Sys::IO class is int, not long.
[Test Improvement]
* Add many tests.
[Test Fix]
* Fix Github Action Windows 2019 test by adding ".gitattribute"
# All files are binary files. CRLF is always CRLF. LF is always LF.
* -text
* Fix reference count tests.
[Document Improvement]
* Add the link to this repository.
0.02 2022-09-14
[Document Improvement]
* Add Sys::FileTest doc.
[Incompatible Changes]
* Remove Sys::IO->freopen.
* Simplify the implementation of the methods for file test in Sys::FileTest
If the file doesn't exists, an exception will be thrown except for e.
[Changes]
* Use access function for Sys::FileTest->e.
[Bug Fix]
* Fix the bug that ouble free or corruption (!prev) occur in Sys::IO->stat in Linux/Ubuntu 32bit.
0.01 2022-09-13
* First experimental release