/libffi.h
/libjit.j
/tests/*/*.mem
+/config.cache
+*~
+*.swp
--- /dev/null
+extern int stat(char *path, struct stat *buf);
+function psi\stat(string $path, array &$buf = NULL) : int {
+ let path = strval($path);
+ let buf = calloc(1, struct stat);
+ return to_int(stat);
+ set $buf = to_array(*buf,
+ to_int(st_dev),
+ to_int(st_ino),
+ to_int(st_mode),
+ to_int(st_nlink),
+ to_int(st_uid),
+ to_int(st_gid),
+ to_int(st_rdev),
+ to_int(st_size),
+ to_array(st_atim,
+ to_int(tv_sec),
+ to_int(tv_nsec)
+ ),
+ to_array(st_atimespec,
+ to_int(tv_sec),
+ to_int(tv_nsec)
+ ),
+ to_array(st_mtim,
+ to_int(tv_sec),
+ to_int(tv_nsec)
+ ),
+ to_array(st_mtimespec,
+ to_int(tv_sec),
+ to_int(tv_nsec)
+ ),
+ to_array(st_ctim,
+ to_int(tv_sec),
+ to_int(tv_nsec)
+ ),
+ to_array(st_ctimespec,
+ to_int(tv_sec),
+ to_int(tv_nsec)
+ ),
+ to_array(st_birthtimespec,
+ to_int(tv_sec),
+ to_int(tv_nsec)
+ ),
+ to_int(st_blksize),
+ to_int(st_blocks),
+ to_int(st_flags),
+ to_int(st_gen)
+ );
+}
--- /dev/null
+
+extern void free(void *ptr);
--- /dev/null
+extern time_t time(time_t *t);
+function psi\time() : int {
+ let t = NULL;
+ return to_int(time);
+}
+
+extern int gettimeofday(struct timeval *tv, struct timezone *tz);
+function psi\gettimeofday(array &$tv = NULL, array &$tz = NULL) : int {
+ let tv = calloc(1, struct timeval);
+ let tz = calloc(1, struct timezone);
+ return to_int(gettimeofday);
+ set $tv = to_array(*tv,
+ to_int(tv_sec),
+ to_int(tv_usec));
+ set $tz = to_array(*tz,
+ to_int(tz_minuteswest),
+ to_int(tz_dsttime));
+}
+
+extern char *asctime(struct tm *tm);
+function psi\asctime(array $tm = NULL) : string {
+ let tm = arrval($tm);
+ return to_string(asctime);
+}
+
+extern char *asctime_r(struct tm *tm, char *buf);
+function psi\asctime_r(array $tm = NULL) : string {
+ let tm = arrval($tm);
+ let buf = calloc(32, char);
+ return to_string(asctime_r);
+}
+
+extern struct tm *gmtime(time_t *tp);
+function psi\gmtime(int $ts) : array {
+ let tp = &intval($ts);
+ return to_array(*gmtime,
+ to_int(tm_sec),
+ to_int(tm_min),
+ to_int(tm_hour),
+ to_int(tm_mday),
+ to_int(tm_mon),
+ to_int(tm_year),
+ to_int(tm_wday),
+ to_int(tm_yday),
+ to_int(tm_isdst)
+ );
+}
+
+extern struct tm *gmtime_r(time_t *tp, struct tm *buf);
+function psi\gmtime_r(int $ts) : array {
+ let tp = &intval($ts);
+ let buf = calloc(1, struct tm);
+ return to_array(*gmtime_r,
+ to_int(tm_sec),
+ to_int(tm_min),
+ to_int(tm_hour),
+ to_int(tm_mday),
+ to_int(tm_mon),
+ to_int(tm_year),
+ to_int(tm_wday),
+ to_int(tm_yday),
+ to_int(tm_isdst)
+ );
+}
+
+extern int nanosleep(struct timespec *rqtp, struct timespec *rmtp);
+function psi\nanosleep(array $rq = NULL, array &$rm = NULL) : int {
+ let rqtp = arrval($rq);
+ let rmtp = calloc(1, struct timespec);
+ return to_int(nanosleep);
+ set $rm = to_array(*rmtp,
+ to_int(tv_sec),
+ to_int(tv_nsec)
+ );
+}
+
+extern clock_t times(struct tms *buf);
+function psi\times(array &$tms = NULL) : int {
+ let buf = calloc(1, struct tms);
+ return to_int(times);
+ set $tms = to_array(*buf,
+ to_int(tms_utime),
+ to_int(tms_stime),
+ to_int(tms_cutime),
+ to_int(tms_cstime)
+ );
+}
--- /dev/null
+extern int uname(struct utsname *u);
+function psi\uname(array &$u = NULL) : int {
+ let u = calloc(1, struct utsname);
+ return to_int(uname);
+ set $u = to_array(*u,
+ to_string(sysname),
+ to_string(nodename),
+ to_string(release),
+ to_string(version),
+ to_string(machine),
+ to_string(domainname));
+}
\ No newline at end of file
+++ /dev/null
-extern int stat(char *path, struct stat *buf);
-function psi\stat(string $path, array &$buf = NULL) : int {
- let path = strval($path);
- let buf = calloc(1, struct stat);
- return to_int(stat);
- set $buf = to_array(*buf,
- to_int(st_dev),
- to_int(st_ino),
- to_int(st_mode),
- to_int(st_nlink),
- to_int(st_uid),
- to_int(st_gid),
- to_int(st_rdev),
- to_int(st_size),
- to_array(st_atim,
- to_int(tv_sec),
- to_int(tv_nsec)
- ),
- to_array(st_atimespec,
- to_int(tv_sec),
- to_int(tv_nsec)
- ),
- to_array(st_mtim,
- to_int(tv_sec),
- to_int(tv_nsec)
- ),
- to_array(st_mtimespec,
- to_int(tv_sec),
- to_int(tv_nsec)
- ),
- to_array(st_ctim,
- to_int(tv_sec),
- to_int(tv_nsec)
- ),
- to_array(st_ctimespec,
- to_int(tv_sec),
- to_int(tv_nsec)
- ),
- to_array(st_birthtimespec,
- to_int(tv_sec),
- to_int(tv_nsec)
- ),
- to_int(st_blksize),
- to_int(st_blocks),
- to_int(st_flags),
- to_int(st_gen)
- );
-}
+++ /dev/null
-
-extern void free(void *ptr);
+++ /dev/null
-extern time_t time(time_t *t);
-function psi\time() : int {
- let t = NULL;
- return to_int(time);
-}
-
-extern int gettimeofday(struct timeval *tv, struct timezone *tz);
-function psi\gettimeofday(array &$tv = NULL, array &$tz = NULL) : int {
- let tv = calloc(1, struct timeval);
- let tz = calloc(1, struct timezone);
- return to_int(gettimeofday);
- set $tv = to_array(*tv,
- to_int(tv_sec),
- to_int(tv_usec));
- set $tz = to_array(*tz,
- to_int(tz_minuteswest),
- to_int(tz_dsttime));
-}
-
-extern char *asctime(struct tm *tm);
-function psi\asctime(array $tm = NULL) : string {
- let tm = arrval($tm);
- return to_string(asctime);
-}
-
-extern char *asctime_r(struct tm *tm, char *buf);
-function psi\asctime_r(array $tm = NULL) : string {
- let tm = arrval($tm);
- let buf = calloc(32, char);
- return to_string(asctime_r);
-}
-
-extern struct tm *gmtime(time_t *tp);
-function psi\gmtime(int $ts) : array {
- let tp = &intval($ts);
- return to_array(*gmtime,
- to_int(tm_sec),
- to_int(tm_min),
- to_int(tm_hour),
- to_int(tm_mday),
- to_int(tm_mon),
- to_int(tm_year),
- to_int(tm_wday),
- to_int(tm_yday),
- to_int(tm_isdst)
- );
-}
-
-extern struct tm *gmtime_r(time_t *tp, struct tm *buf);
-function psi\gmtime_r(int $ts) : array {
- let tp = &intval($ts);
- let buf = calloc(1, struct tm);
- return to_array(*gmtime_r,
- to_int(tm_sec),
- to_int(tm_min),
- to_int(tm_hour),
- to_int(tm_mday),
- to_int(tm_mon),
- to_int(tm_year),
- to_int(tm_wday),
- to_int(tm_yday),
- to_int(tm_isdst)
- );
-}
-
-extern int nanosleep(struct timespec *rqtp, struct timespec *rmtp);
-function psi\nanosleep(array $rq = NULL, array &$rm = NULL) : int {
- let rqtp = arrval($rq);
- let rmtp = calloc(1, struct timespec);
- return to_int(nanosleep);
- set $rm = to_array(*rmtp,
- to_int(tv_sec),
- to_int(tv_nsec)
- );
-}
-
-extern clock_t times(struct tms *buf);
-function psi\times(array &$tms = NULL) : int {
- let buf = calloc(1, struct tms);
- return to_int(times);
- set $tms = to_array(*buf,
- to_int(tms_utime),
- to_int(tms_stime),
- to_int(tms_cutime),
- to_int(tms_cstime)
- );
-}
+++ /dev/null
-extern int uname(struct utsname *u);
-function psi\uname(array &$u = NULL) : int {
- let u = calloc(1, struct utsname);
- return to_int(uname);
- set $u = to_array(*u,
- to_string(sysname),
- to_string(nodename),
- to_string(release),
- to_string(version),
- to_string(machine),
- to_string(domainname));
-}
\ No newline at end of file
PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("psi.engine", "ffi", PHP_INI_SYSTEM, OnUpdateString, engine, zend_psi_globals, psi_globals)
- STD_PHP_INI_ENTRY("psi.directory", "psis", PHP_INI_SYSTEM, OnUpdateString, directory, zend_psi_globals, psi_globals)
+ STD_PHP_INI_ENTRY("psi.directory", "psi.d", PHP_INI_SYSTEM, OnUpdateString, directory, zend_psi_globals, psi_globals)
PHP_INI_END();
void psi_error(int type, const char *msg, ...)
--TEST--
libidn
--INI--
-psi.directory={PWD}/../../psis:{PWD}
+psi.directory={PWD}/../../psi.d:{PWD}
--SKIPIF--
<?php
extension_loaded("psi") or die("skip - need ext/psi");
--TEST--
libidn
--INI--
-psi.directory={PWD}/../../psis:{PWD}
+psi.directory={PWD}/../../psi.d:{PWD}
--SKIPIF--
<?php
extension_loaded("psi") or die("skip - need ext/psi");
--TEST--
libidn
--INI--
-psi.directory={PWD}/../../psis:{PWD}
+psi.directory={PWD}/../../psi.d:{PWD}
--SKIPIF--
<?php
extension_loaded("psi") or die("skip - need ext/psi");
--TEST--
libidn
--INI--
-psi.directory={PWD}/../../psis:{PWD}
+psi.directory={PWD}/../../psi.d:{PWD}
--SKIPIF--
<?php
extension_loaded("psi") or die("skip - need ext/psi");
--TEST--
stat
--INI--
-psi.directory={PWD}/../../psis:{PWD}
+psi.directory={PWD}/../../psi.d:{PWD}
--SKIPIF--
<?php
extension_loaded("psi") or die("skip - need ext/psi");
--TEST--
gettimeofday
--INI--
-psi.directory = {PWD}/../../psis:{PWD}
+psi.directory = {PWD}/../../psi.d:{PWD}
--SKIPIF--
<?php
extension_loaded("psi") or die("skip - need ext/psi");
--ENV--
TZ=UTC
--INI--
-psi.directory = {PWD}/../../psis:{PWD}
+psi.directory = {PWD}/../../psi.d:{PWD}
--FILE--
===TEST===
<?php
--ENV--
TZ=UTC
--INI--
-psi.directory = {PWD}/../../psis:{PWD}
+psi.directory = {PWD}/../../psi.d:{PWD}
--FILE--
===TEST===
<?php
--TEST--
times
--INI--
-psi.directory={PWD}/../../psis:{PWD}
+psi.directory={PWD}/../../psi.d:{PWD}
--SKIPIF--
<?php
extension_loaded("psi") or die("skip - need ext/psi");
--TEST--
uname
--INI--
-psi.directory={PWD}/../../psis:{PWD}
+psi.directory={PWD}/../../psi.d:{PWD}
--SKIPIF--
<?php
extension_loaded("psi") or die("skip - need ext/psi");