SPVM-Sys
view release on metacpan or search on metacpan
* Add the utimes method to the Sys::IO class.
* Add the optional $tv_sec and $tv_usec arguments to the new method in the Sys::Time::Timeval.
* Add the optional $tv_sec and $tv_nsec arguments to the new method in the Sys::Time::Timespec.
[Incompatible Changes]
* The getgroups method in the Sys::User class is changed.
[Before]
static method getgroups : int[] ();
[After]
static method getgroups : int ($size : int, $list : int[]);
* The definition of the pipe method in the Sys is changed.
[Before]
static method pipe : void ($pipe_fds : int[]);
[After]
static method pipe : void ($read_fd_ref : int*, $write_fd_ref : int*);
* The definition of the select method in the Sys is changed.
[Before]
static method select : int ($readfds : Sys::Select::Fd_set, $writefds : Sys::Select::Fd_set, $exceptfds : Sys::Select::Fd_set, $timeout : Sys::Time::Timeval);
[After]
static method select : int ($readfds : Sys::Select::Fd_set, $writefds : Sys::Select::Fd_set, $exceptfds : Sys::Select::Fd_set, $timeout : double = 0);
0.502 2023-11-23
[New Features]
* Add the _putenv_s method to the Sys::Env class.
* Add the set_env method to the Sys class.
* Add the alarm method to the Sys class.
* The kill method in the Sys class can be used in Windows if $pid is equal to the current process id.
[Incompatible Changes]
* Remove the Sys::FileTest class.
* Remove throwing exceptions in the ualarm method in the Sys::Signal class.
* Remove the signal_go method in the Sys::Signal class.
[Bug Fix with Incompatible Changes]
* The S method in the Sys class returns 0 if the file do not exists.
0.501 2023-11-23
[Incompatible Changes]
* The return type of the following methods in the Sys become void.
chdir
chmod
mkdir
rmdir
opendir
closedir
close
unlink
rename
bind
listen
connect
shutdown
socketpair
setsockopt
truncate
flock
print
say
printf
seek
utime
chown
open
fdopen
sysopen
say
kill
pipe
0.500 2023-11-17
[New Features and Incompatible Changes]
* Rename the SIG_IO method in the Sys::Signal class is renamed to SIG_GO.
* Change the signal_io method in the Sys::Signal class is renamed to signal_go.
[Before]
static method signal_io : Sys::Signal::Handler ($signum : int, $fd : int);
[After]
static method signal_go : Sys::Signal::Handler ($signum : int);
* Add the SET_SIG_GO_WRITE_FD method to the Sys::Signal class.
[New Features]
* Add the O_BINARY method to the Sys::IO::Constant class.
* Add the O_TEXT method to the Sys::IO::Constant class.
* Add the _pipe method to the Sys::Process class.
* The pipe method in the Sys class calls the _pipe method in the Sys::Process.
0.499 2023-11-17
[New Features and Incompatible Changes]
* Add the eq method to the Sys::Signal::Handler.
0.498 2023-11-16
[New Features and Incompatible Changes]
* Add the eq method to the Sys::Signal::Handler.
* The signal method returns the old signal handler.
* Remove the SIG_DFL and SIG_DFL class variables from the Sys::Signal class and add the SIG_DFL and SIG_DFL methods.
* Remove the Sys::Signal::Handler::Ignore class.
* Remove the Sys::Signal::Handler::Default class.
* The signal method in the Sys class returns the old signal handler.
* Add the signal_io method to the Sys::Signal class.
* Add the SIG_IO method to the Sys::Signal class.
* Add the close method to the Sys class.
static method close : int ($stream : Sys::IO::FileStream);
0.497 2023-11-16
[New Features and Incompatible Changes]
* Add $len argument to the send method in the Sys class and changes argument order.
[Before]
static method sendto : int ($sockfd : int, $buf : string, $len : int, $flags : int, $addr : Sys::Socket::Sockaddr, $addrlen : int, $buf_offset : int = 0);
[After]
static method send : int ($sockfd : int, $buf : string, $flags : int, $addr : Sys::Socket::Sockaddr = undef, $len : int = -1, $buf_offset : int = 0);
0.496 2023-11-16
[New Features]
* Add $buf_offset argument to the sendto method in the Sys::Socket class.
static method sendto : int ($sockfd : int, $buf : string, $len : int, $flags : int, $addr : Sys::Socket::Sockaddr, $addrlen : int, $buf_offset : int = 0);
* Add $buf_offset argument to the send method in the Sys class.
static method sendto : int ($sockfd : int, $buf : string, $len : int, $flags : int, $addr : Sys::Socket::Sockaddr, $addrlen : int, $buf_offset : int = 0);
static method kill : int ($sig : int, $pid : int);
[Incompatible Changes]
* The Sys::Signal::Handler::Monitor class is removed.
* The Sys::Signal::Handler::Unknown class is removed.
* The following methods in the Sys::Signal class are removed.
- static method reset_monitored_signal : void ($signum : int);
- static method check_monitored_signal : int ($signum : int);
* The following methods in the Sys::Signal class are changed.
- native static method signal : Sys::Signal::Handler ($signum : int, $handler : Sys::Signal::Handler);
+ native static method signal : void ($signum : int, $handler : Sys::Signal::Handler);
$handler must be a Sys::Signal::Handler::Default object or a Sys::Signal::Handler::Ignore object. Otherwise an exception is thrown.
User signal handlers are wrong implementation for SPVM differnt from the C language.
0.490 2023-09-11
[Bug Fix]
* Fix a bug that the fcntl method in the Sys::IO class does not work well.
0.489 2023-09-11
[New Features]
* The following methods in the Sys class are added.
+ static method fcntl : int ($fd : int, $command : int, $command_arg : object of Int|Sys::IO::Flock|object = undef);
[Bug Fix]
* Fix a bug that the fcntl method in the Sys::IO class does not work well.
0.488 2023-09-11
[Prerequirement Changes]
* Require SPVM 0.989041.
0.487 2023-09-08
[New Features]
* The following methods in the Sys class are added.
+ static method truncate : int ($fd : int, $legnth : long);
+ static method sysread : int ($fd : int, $buf : mutable string, $count : int, $buf_offset : int = 0);
+ static method syswrite : int ($fd : int, $buf : string, $count : int = -1, $buf_offset : int = 0);
+ static method read : int ($stream : Sys::IO::FileStream, $buf : mutable string, $count : int, $buf_offset : int = 0);
+ static method fileno : int ($stream : Sys::IO::Stream);
+ static method eof : int ($stream : Sys::IO::Stream);
+ static method readline : mutable string ($stream : Sys::IO::FileStream);
+ static method getc : int ($stream : Sys::IO::FileStream);
+ static method flock : int ($fd : int, $operation : int);
+ static method print : int ($stream : Sys::IO::FileStream, $string : string);
+ static method printf : int ($stream, $format : string, $args : object[]);
+ static method read : int ($stream : Sys::IO::FileStream, $buf : mutable string, $count : int, $buf_offset : int = 0);
+ static method rewinddir : void ($dirp : Sys::IO::DirStream);
+ static method readdir : Sys::IO::Dirent ($dirp : Sys::IO::DirStream);
+ static method seek : int ($stream : Sys::IO::FileStream, $offset : long, $whence : int);
+ static method sysseek : long ($fd : int, $offset : long, $whence : int);
+ static method tell : long ($stream : Sys::IO::FileStream);
+ static method telldir : long ($dirp : Sys::IO::DirStream);
+ static method lstat : Sys::IO::Stat ($path : string);
+ static method utime : int ($atime : long, $mtime : long, $filename : string);
+ static method chown : int ($owner : int, $group : int, $path : string);
[Deprecation]
* The following methods in the Sys::IO class are deprecated. Use the readline method in the Sys class.
static method readline : string ($stream : Sys::IO::FileStream);
0.486 2023-09-06
[Bug Fix]
* Some bugs are fixed: The connect, getaddrinfo, and getnameinfo have not return correct return values.
[New Features]
* The Sys::Socket::Util class is added.
* The Sys::Socket::In_addr_base class is added.
* The Sys::Socket::In_addr class extends Sys::Socket::In_addr_base.
* The Sys::Socket::In6_addr class extends Sys::Socket::In_addr_base.
[Incompatible Changes]
* The following methods in the Sys::Socket class are changed.
- static method inet_pton : int ($af : int, $src : string, $dst : object of Sys::Socket::In_addr|Sys::Socket::In6_addr);
+ static method inet_pton : int ($af : int, $src : string, $dst : Sys::Socket::In_addr_base);
- static method inet_ntop : mutable string ($af : int, $src : object of Sys::Socket::In_addr|Sys::Socket::In6_addr, $dst : mutable string, $size : int);
+ static method inet_ntop : mutable string ($af : int, $src : Sys::Socket::In_addr_base, $dst : mutable string, $size : int);
0.485 2023-09-04
[Bug Fix]
* A bug fix: the sleep method in the Sys class has been wrong.
[Incompatible Changes]
* The following methods in the Sys class is changed.
- static method send : int ($sockfd : int, $buf : string, $len : int, $flags : int, $buf_offset : int = 0);
+ static method send : int ($sockfd : int, $buf : string, $flags : int, $addr : Sys::Socket::Sockaddr = undef);
- static method select : int ($nfds : int, $readfds : Sys::Select::Fd_set, $writefds : Sys::Select::Fd_set, $exceptfds : Sys::Select::Fd_set, $timeout : Sys::Time::Timeval); + static method select : int ($readfds : Sys::Select::Fd_se...
[Exception Message Changes]
* Error messages in the Sys::Time::Itimerval class are improved.
[New Features]
* The following methods are added to Sys::Socket.
static method closesocket : int ($fd : int);
0.484 2023-09-04
[New Features]
* The following methods are added to the Sys::Socket class.
static method to_family_sockaddr : Sys::Socket::Sockaddr ($addr : Sys::Socket::Sockaddr);
* The following methods are added to the Sys::Socket::Sockaddr class.
+ static method new : Sys::Socket::Sockaddr::In ();
+ method DESTROY : void ();
+ method set_sa_family : void ($family : int);
* The following methods in the Sys::Socket::Sockaddr class is implemented.
+ method sa_family : int ();
* The following methods are added to the Sys class.
* The definition of the ioctl method in the Sys::Ioctl class is changed.
[Before]
static method ioctl : int ($fd : int, $request : int, $request_arg = undef : object of Byte|Short|Int|Long|Float|Double|object);
[After]
static method ioctl : int ($fd : int, $request : int, $request_arg_ref = undef : object of byte[]|short[]|int[]|long[]|float[]|double[]|object);
* The definition of the fcntl method in the Sys::IO class is changed.
[Before]
static method fcntl : int ($fd : int, $command : int, $command_arg = undef : object of Byte|Short|Int|Long|Float|Double|Sys::IO::Flock|object);
[After]
static method fcntl : int ($fd : int, $command : int, $command_arg = undef : object of Int|Sys::IO::Flock|object);
[New Features]
* The version string can be got.
[Changes]
* The implementation logic of the ioctl method in the Sys::Ioclt class got to be the one on Linux.
0.48 2023-04-07
[New Features and Incompatible Changes]
* Added the Sys::Time::Tm class.
* Added the following methods in Sys::Time class.
static method time : long ();
static method localtime : Sys::Time::Tm ($time : long);
static method gmtime : Sys::Time::Tm ($time : long);
* Use the Sys::Time::Tm class instead of the Time class in all place.
0.47 2023-04-06
[License Change]
* The license is changed to MIT License.
[Prerequirement Change]
* SPVM 0.9701 is required.
0.46 2023-03-31
[Internal Compatible Changes]
* Use new_pointer_ojbect_by_name instead of the deprecated new_pointer_by_name Native API.
0.45 2022-06-21
[Internal Compatible Changes]
* Use SPVM::ExchangeAPI method instead of SPVM functions.
0.44 2022-03-16
[Test Fix]
* Fixed symlink tests when some time st_atime, st_mtime, st_ctime is different in target and symbolic link.
[Incompatible Changes]
* Removed the following temporary resotred methods in the Sys class.
static method getenv : string ($name : string);
static method defined : int ($macro_name : string, $value = undef : object of Int|Long|Double);
0.43 2022-03-15
[Deprecation]
* SPVM::FileTest is deprecated. Use methods in the Sys class instead.
[Exception Message Improvement]
* Improve the following exception messages.
[Before]
[System Error]unlink failed:%s. The \"%s\" directory can't be removed"
[After]
[System Error]unlink failed:%s. The \"%s\" file can't be removed"
[Test Improvement]
* Improved tests of Sys::IO::Stat.
[Incompatible Changes]
* Removed the readlink method in the Sys class and the readlinkp method in the Sys::IO class because I don't know the Windows/Unix portable way to allocate memory yet.
* Removed the unlinkp method in the SPVM::Sys::IO class. This logic is moved to the unlink method in the Sys class and fixed the return value.
* Removed the renamep method in the SPVM::Sys::IO class. This logic is moved to the rename method in the Sys class.
* Removed the symlinkp method in the SPVM::Sys::IO class. This logic is moved to the symlink method in the Sys class.
* Removed the readlinkp method in the SPVM::Sys::IO class. This logic is moved to the readlink method in the Sys class.
* Removed the chmodp method in the SPVM::Sys::IO class. This logic is moved to the chmod method in the Sys class.
* Removed the chownp method in the SPVM::Sys::IO class. This logic is moved to the chown method in the Sys class.
* Removed the utimep method in the SPVM::Sys::IO class. This logic is moved to the utime method in the Sys class.
* Removed the timesp method in the SPVM::Sys::Time class. This logic is moved to the times method in the Sys class.
* Removed the statp method in the SPVM::Sys::IO::Stat class. This logic is moved to the stat method in the Sys class.
* Removed the lstatp method in the SPVM::Sys::IO::Stat class. This logic is moved to the lstat method in the Sys class.
* Remvoed the argument of the new method in the Sys::IO::Stat class.
* Removed the is_windows method in the Sys class. This is used from the Sys::OS class.
* Removed the get_osname method in the Sys::OS class.
* Renamed the get_osname method in the Sys class to osname.
[New Features]
* Added the Sys::IO::Windows class.
* Added the symlinkp method in the Sys::IO: class.
static method unlinkp : int ($oldpath : string, $newpath : string);
static method renamep : int ($oldpath : string, $newpath : string);
static method symlinkp : int ($oldpath : string, $newpath : string);
* The l method in the Sys::FileTest supports Windows.
* Added the following methods in the Sys class.
static method A : double ($file : string);
static method C : double ($file : string);
static method M : double ($file : string);
static method O : int ($file : string);
static method R : int ($file : string);
static method S : int ($file : string);
static method W : int ($file : string);
static method X : int ($file : string);
static method b : int ($file : string);
static method c : int ($file : string);
static method d : int ($file : string);
static method e : int ($file : string);
static method f : int ($file : string);
static method g : int ($file : string);
static method k : int ($file : string);
static method l : int ($file : string);
static method o : int ($file : string);
static method p : int ($file : string);
static method r : int ($file : string);
static method s : long ($file : string);
static method u : int ($file : string);
static method w : int ($file : string);
method c : int ();
method d : int ();
method d : int ();
method e : int ();
method f : int ();
method g : int ();
method k : int ();
method l : int ();
method o : int ();
method p : int ();
method s : long ();
method u : int ();
method z : int ();
method cando : int ($mode : int, $effective : int);
method r : int ();
method w : int ();
method x : int ();
method R : int ();
method W : int ();
method X : int ();
* Added the $path option arguments is added to the new method in the Sys::Stat.
[Before}
static method new : Sys::IO::Stat ();
[After}
static method new : Sys::IO::Stat ($path = undef : string);
0.39 2022-02-14
[Compatible Intenal Changes]
* Removed unused the Sys::Util class.
[New Features]
* Added the readlinkp method in the Sys::IO class.
static method readlinkp : int ($test_dir : string);
* Added the following methods to the Sys::IO::Dirent class.
method d_ino : int ();
method d_reclen : int ();
method d_name : string ();
[Exception Message Improvement]
* The following exception messages of the methods in the Sys::IO::Stat output the file name.
[Before]
- "[System Error]lstat failed:%s"
- "[System Error]stat failed:%s
[After]
+ "[System Error]stat failed:%s. The specified file is \"%s\""
+ "[System Error]lstat failed:%s. The specified file is \"%s\""
* The following exception messages of the methods in the Sys::IO output the file name.
[Before]
- "[System Error]open failed:%s"
- "[System Error]fopen failed:%s"
- "[System Error]mkdir failed:%s"
- "[System Error]rmdir failed:%s"
- "[System Error]unlink failed:%s"
- "[System Error]rename failed:%s"
- "[System Error]realpath failed:%s"
- "[System Error]_fullpath failed:%s"
- "[System Error]chdir failed:%s"
- "[System Error]chmod failed:%s"
- "[System Error]chown failed:%s"
- "[System Error]truncate failed:%s"
- "[System Error]symlink failed:%s"
- "[System Error]readlink failed:%s"
- "[System Error]opendir failed:%s"
- "[System Error]utime failed:%s"
[After]
+ "[System Error]open failed:%s. The \"%s\" file can't be opend"
+ "[System Error]fopen failed:%s. The \"%s\" file can't be opend"
+ "[System Error]mkdir failed:%s. The \"%s\" directory can't be created"
+ "[System Error]rmdir failed:%s. The \"%s\" directory can't be removed"
+ "[System Error]unlink failed:%s. The \"%s\" directory can't be removed"name
+ "[System Error]rename failed:%s. The \"%s\" file can't be renamed to the \"%s\" file"
+ "[System Error]realpath failed:%s. The \"%s\" file can't be resolved"
+ "[System Error]_fullpath failed:%s. The \"%s\" file can't be resolved"
+ "[System Error]chdir failed:%s. The current directory can't be changed to the \"%s\" directory"
+ "[System Error]chmod failed:%s. The permission of the \"%s\" file can't be changed"
+ "[System Error]chown failed:%s. The owner/group of the \"%s\" file can't be changed"
+ "[System Error]truncate failed:%s. The \"%s\" file can't be truncated"
+ "[System Error]symlink failed:%s. The symbolic link from \"%s\" to \"%s\" can't be created"
+ "[System Error]readlink failed:%s. The reading of the symbolic link of the \"%s\" file failed"
+ "[System Error]opendir failed:%s. The \"%s\" directory can't be opened", dir
+ "[System Error]utime failed:%s. The access and modification times of the \"%s\" file can't be changed"
* Unified an exception message
[Before]
in this system
[After]
on this system
[Test Improment]
* Added the tests of the utime in the Sys::IO class.
[Internal Compatible Changes]
* Use pointer instead of deprecated pointer_t.
0.38 2022-02-09
[Bug Fix]
* Fixed the bug that the fwrite and fread method in the Sys::IO class throw an exception in a wrong condition.
0.37 2022-02-08
[Prerequirement Changes]
* SPVM 0.9691+ is needed.
0.3601 2022-02-06
[Test Bug Fix]
* Fixed the following testing bug in the Sys::FileTest class
https://github.com/yuki-kimoto/SPVM-Sys/issues/23
0.36 2022-02-03
[Bug Fix]
* Fixed the bug that many methods in the Sys::FileTest class doesn't work well.
-r
-w
-x
-o
-R
-W
-X
-O
* Fixed the bug that Sys::FileTest doesn't work well on Windows.
-r is the same as the -R
-w is the same as the -W
-x is the same as the -X
-o is the same as the -O
[Incompatible Changes]
The d method in the FileTest doesn't throw an exception when the directori doesn't exist.
The f method in the FileTest doesn't throw an exception when the directori doesn't exist.
The g method in the FileTest doesn't throw an exception when the directori doesn't exist.
The k method in the FileTest doesn't throw an exception when the directori doesn't exist.
The l method in the FileTest doesn't throw an exception when the directori doesn't exist.
The b method in the FileTest doesn't throw an exception when the directori doesn't exist.
The o method in the FileTest doesn't throw an exception when the directori doesn't exist.
The p method in the FileTest doesn't throw an exception when the directori doesn't exist.
The O method in the FileTest doesn't throw an exception when the directori doesn't exist.
0.35 2022-01-30
[Test Bug Fix]
* Fixed the testing bug that the tests on latest SPVM don't work well.
0.34 2022-01-06
[Prerequirement Changes]
* SPVM 0.9679+ is needed.
( run in 0.931 second using v1.01-cache-2.11-cpan-5511b514fd6 )