FUNCTION IMPLEMENTATIONS
Listed below are functions that are either completely unimplemented or else have been
implemented differently on various platforms. Following each description will be, in
parentheses, a list of platforms that the description applies to.
The list may well be incomplete, or even wrong in some places. When in doubt, consult the
platform-specific README files in the Perl source distribution, and any other documentation
resources accompanying a given port.
Be aware, moreover, that even among Unix-ish systems there are variations.
For many functions, you can also query %Config, exported by default from the
Config module. For example, to check whether the platform has the lstat call,
check $Config{d_lstat}. See Config for a full
description of available variables.
- -X FILEHANDLE
-
- -X EXPR
-
- -X
-
-r, -w, and -x have a limited meaning only;
directories and applications are executable, and there are no uid/gid considerations. -o
is not supported. (Mac OS)
-r, -w, -x, and -o tell whether the
file is accessible, which may not reflect UIC-based file protections. (VMS)
-s returns the size of the data fork, not the total size of data fork plus
resource fork. (Mac OS).
-s by name on an open file will return the space reserved on disk, rather
than the current extent. -s on an open filehandle returns the current size.
(RISC OS)
-R, -W, -X, -O are
indistinguishable from -r, -w, -x, -o.
(Mac OS, Win32, VMS, RISC OS)
-b, -c, -k, -g, -p, -u,
-A are not implemented. (Mac OS)
-g, -k, -l, -p, -u, -A
are not particularly meaningful. (Win32, VMS, RISC OS)
-d is true if passed a device spec without an explicit directory. (VMS)
-T and -B are implemented, but might misclassify Mac text
files with foreign characters; this is the case will all platforms, but may affect Mac OS
often. (Mac OS)
-x (or -X) determine if a file ends in one of the executable
suffixes. -S is meaningless. (Win32)
-x (or -X) determine if a file has an executable file type.
(RISC OS)
- alarm SECONDS
-
- alarm
- Not implemented. (Win32)
- binmode FILEHANDLE
-
Meaningless. (Mac OS, RISC OS)
Reopens file and restores pointer; if function fails, underlying filehandle may be
closed, or pointer may be in a different position. (VMS)
The value returned by tell may be affected after the call, and the
filehandle may be flushed. (Win32)
- chmod LIST
-
Only limited meaning. Disabling/enabling write permission is mapped to
locking/unlocking the file. (Mac OS)
Only good for changing "owner" read-write access, "group", and
"other" bits are meaningless. (Win32)
Only good for changing "owner" and "other" read-write access. (RISC OS)
Access permissions are mapped onto VOS access-control list changes. (VOS)
The actual permissions set depend on the value of the CYGWIN in the SYSTEM
environment settings. (Cygwin)
- chown LIST
-
Not implemented. (Mac OS, Win32, Plan 9, RISC OS, VOS)
Does nothing, but won't fail. (Win32)
- chroot FILENAME
-
- chroot
- Not implemented. (Mac OS, Win32, VMS, Plan 9, RISC OS, VOS, VM/ESA)
- crypt PLAINTEXT,SALT
-
May not be available if library or source was not provided when building perl. (Win32)
Not implemented. (VOS)
- dbmclose HASH
- Not implemented. (VMS, Plan 9, VOS)
- dbmopen HASH,DBNAME,MODE
- Not implemented. (VMS, Plan 9, VOS)
- dump LABEL
-
Not useful. (Mac OS, RISC OS)
Not implemented. (Win32)
Invokes VMS debugger. (VMS)
- exec LIST
-
Not implemented. (Mac OS)
Implemented via Spawn. (VM/ESA)
Does not automatically flush output handles on some platforms. (SunOS, Solaris, HP-UX)
- exit EXPR
-
- exit
- Emulates UNIX exit() (which considers
exit 1 to indicate an error) by
mapping the 1 to SS$_ABORT (44). This behavior may be overridden
with the pragma use vmsish 'exit'. As with the CRTL's exit() function, exit
0 is also mapped to an exit status of SS$_NORMAL (1); this mapping
cannot be overridden. Any other argument to exit() is used directly as Perl's exit status.
(VMS)
- fcntl FILEHANDLE,FUNCTION,SCALAR
- Not implemented. (Win32, VMS)
- flock FILEHANDLE,OPERATION
-
Not implemented (Mac OS, VMS, RISC OS, VOS).
Available only on Windows NT (not on Windows 95). (Win32)
- fork
-
Not implemented. (Mac OS, AmigaOS, RISC OS, VOS, VM/ESA, VMS)
Emulated using multiple interpreters. See perlfork. (Win32)
Does not automatically flush output handles on some platforms. (SunOS, Solaris, HP-UX)
- getlogin
- Not implemented. (Mac OS, RISC OS)
- getpgrp PID
- Not implemented. (Mac OS, Win32, VMS, RISC OS, VOS)
- getppid
- Not implemented. (Mac OS, Win32, RISC OS)
- getpriority WHICH,WHO
- Not implemented. (Mac OS, Win32, VMS, RISC OS, VOS, VM/ESA)
- getpwnam NAME
-
Not implemented. (Mac OS, Win32)
Not useful. (RISC OS)
- getgrnam NAME
- Not implemented. (Mac OS, Win32, VMS, RISC OS)
- getnetbyname NAME
- Not implemented. (Mac OS, Win32, Plan 9)
- getpwuid UID
-
Not implemented. (Mac OS, Win32)
Not useful. (RISC OS)
- getgrgid GID
- Not implemented. (Mac OS, Win32, VMS, RISC OS)
- getnetbyaddr ADDR,ADDRTYPE
- Not implemented. (Mac OS, Win32, Plan 9)
- getprotobynumber NUMBER
- Not implemented. (Mac OS)
- getservbyport PORT,PROTO
- Not implemented. (Mac OS)
- getpwent
- Not implemented. (Mac OS, Win32, VM/ESA)
- getgrent
- Not implemented. (Mac OS, Win32, VMS, VM/ESA)
- gethostent
- Not implemented. (Mac OS, Win32)
- getnetent
- Not implemented. (Mac OS, Win32, Plan 9)
- getprotoent
- Not implemented. (Mac OS, Win32, Plan 9)
- getservent
- Not implemented. (Win32, Plan 9)
- sethostent STAYOPEN
- Not implemented. (Mac OS, Win32, Plan 9, RISC OS)
- setnetent STAYOPEN
- Not implemented. (Mac OS, Win32, Plan 9, RISC OS)
- setprotoent STAYOPEN
- Not implemented. (Mac OS, Win32, Plan 9, RISC OS)
- setservent STAYOPEN
- Not implemented. (Plan 9, Win32, RISC OS)
- endpwent
- Not implemented. (Mac OS, MPE/iX, VM/ESA, Win32)
- endgrent
- Not implemented. (Mac OS, MPE/iX, RISC OS, VM/ESA, VMS, Win32)
- endhostent
- Not implemented. (Mac OS, Win32)
- endnetent
- Not implemented. (Mac OS, Win32, Plan 9)
- endprotoent
- Not implemented. (Mac OS, Win32, Plan 9)
- endservent
- Not implemented. (Plan 9, Win32)
- getsockopt SOCKET,LEVEL,OPTNAME
- Not implemented. (Plan 9)
- glob EXPR
-
- glob
- This operator is implemented via the File::Glob extension on most platforms. See File::Glob for portability
information.
- ioctl FILEHANDLE,FUNCTION,SCALAR
-
Not implemented. (VMS)
Available only for socket handles, and it does what the ioctlsocket() call in the
Winsock API does. (Win32)
Available only for socket handles. (RISC OS)
- kill SIGNAL, LIST
-
kill(0, LIST) is implemented for the sake of taint checking; use with
other signals is unimplemented. (Mac OS)
Not implemented, hence not useful for taint checking. (RISC OS)
kill() doesn't have the semantics of raise(), i.e. it doesn't
send a signal to the identified process like it does on Unix platforms. Instead kill($sig,
$pid) terminates the process identified by $pid, and makes it exit immediately with
exit status $sig. As in Unix, if $sig is 0 and the specified process exists, it returns
true without actually terminating it. (Win32)
- link OLDFILE,NEWFILE
-
Not implemented. (Mac OS, MPE/iX, VMS, RISC OS)
Link count not updated because hard links are not quite that hard (They are sort of
half-way between hard and soft links). (AmigaOS)
Hard links are implemented on Win32 (Windows NT and Windows 2000) under NTFS only.
- lstat FILEHANDLE
-
- lstat EXPR
-
- lstat
-
Not implemented. (VMS, RISC OS)
Return values (especially for device and inode) may be bogus. (Win32)
- msgctl ID,CMD,ARG
-
- msgget KEY,FLAGS
-
- msgsnd ID,MSG,FLAGS
-
- msgrcv ID,VAR,SIZE,TYPE,FLAGS
- Not implemented. (Mac OS, Win32, VMS, Plan 9, RISC OS, VOS)
- open FILEHANDLE,EXPR
-
- open FILEHANDLE
-
The | variants are supported only if ToolServer is installed. (Mac OS)
open to |- and -| are unsupported. (Mac OS, Win32, RISC OS)
Opening a process does not automatically flush output handles on some platforms.
(SunOS, Solaris, HP-UX)
- pipe READHANDLE,WRITEHANDLE
- Very limited functionality. (MiNT)
- readlink EXPR
-
- readlink
- Not implemented. (Win32, VMS, RISC OS)
- select RBITS,WBITS,EBITS,TIMEOUT
-
Only implemented on sockets. (Win32, VMS)
Only reliable on sockets. (RISC OS)
Note that the select FILEHANDLE form is generally portable.
- semctl ID,SEMNUM,CMD,ARG
-
- semget KEY,NSEMS,FLAGS
-
- semop KEY,OPSTRING
- Not implemented. (Mac OS, Win32, VMS, RISC OS, VOS)
- setgrent
- Not implemented. (Mac OS, MPE/iX, VMS, Win32, RISC OS)
- setpgrp PID,PGRP
- Not implemented. (Mac OS, Win32, VMS, RISC OS, VOS)
- setpriority WHICH,WHO,PRIORITY
- Not implemented. (Mac OS, Win32, VMS, RISC OS, VOS)
- setpwent
- Not implemented. (Mac OS, MPE/iX, Win32, RISC OS)
- setsockopt
SOCKET,LEVEL,OPTNAME,OPTVAL
- Not implemented. (Plan 9)
- shmctl ID,CMD,ARG
-
- shmget KEY,SIZE,FLAGS
-
- shmread ID,VAR,POS,SIZE
-
- shmwrite ID,STRING,POS,SIZE
- Not implemented. (Mac OS, Win32, VMS, RISC OS, VOS)
- sockatmark SOCKET
- A relatively recent addition to socket functions, may not be implemented even in UNIX
platforms.
- socketpair
SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL
- Not implemented. (Win32, VMS, RISC OS, VOS, VM/ESA)
- stat FILEHANDLE
-
- stat EXPR
-
- stat
-
Platforms that do not have rdev, blksize, or blocks will return these as '', so numeric
comparison or manipulation of these fields may cause 'not numeric' warnings.
mtime and atime are the same thing, and ctime is creation time instead of inode change
time. (Mac OS).
ctime not supported on UFS (Mac OS X).
ctime is creation time instead of inode change time (Win32).
device and inode are not meaningful. (Win32)
device and inode are not necessarily reliable. (VMS)
mtime, atime and ctime all return the last modification time. Device and inode are not
necessarily reliable. (RISC OS)
dev, rdev, blksize, and blocks are not available. inode is not meaningful and will
differ between stat calls on the same file. (os2)
some versions of cygwin when doing a stat("foo") and if not finding it may
then attempt to stat("foo.exe") (Cygwin)
- symlink OLDFILE,NEWFILE
- Not implemented. (Win32, VMS, RISC OS)
- syscall LIST
- Not implemented. (Mac OS, Win32, VMS, RISC OS, VOS, VM/ESA)
- sysopen
FILEHANDLE,FILENAME,MODE,PERMS
- The traditional "0", "1", and "2" MODEs are implemented
with different numeric values on some systems. The flags exported by
Fcntl (O_RDONLY,
O_WRONLY, O_RDWR) should work everywhere though. (Mac OS, OS/390, VM/ESA)
- system LIST
-
In general, do not assume the UNIX/POSIX semantics that you can shift $?
right by eight to get the exit value, or that $? & 127 would give you the
number of the signal that terminated the program, or that $? & 128 would
test true if the program was terminated by a coredump. Instead, use the POSIX W*()
interfaces: for example, use WIFEXITED($?) and WEXITVALUE($?) to test for a normal exit
and the exit value, WIFSIGNALED($?) and WTERMSIG($?) for a signal exit and the signal.
Core dumping is not a portable concept, so there's no portable way to test for that.
Only implemented if ToolServer is installed. (Mac OS)
As an optimization, may not call the command shell specified in $ENV{PERL5SHELL}.
system(1, @args) spawns an external process and immediately returns its
process designator, without waiting for it to terminate. Return value may be used
subsequently in wait or waitpid. Failure to spawn() a subprocess
is indicated by setting $? to "255 << 8". $? is set in a way
compatible with Unix (i.e. the exitstatus of the subprocess is obtained by "$?
>> 8", as described in the documentation). (Win32)
There is no shell to process metacharacters, and the native standard is to pass a
command line terminated by "\n" "\r" or "\0" to the spawned
program. Redirection such as > foo is performed (if at all) by the run
time library of the spawned program. system list will call the Unix
emulation library's exec emulation, which attempts to provide emulation of
the stdin, stdout, stderr in force in the parent, providing the child program uses a
compatible version of the emulation library. scalar will call the native command
line direct and no such emulation of a child Unix program will exists. Mileage will
vary. (RISC OS)
Far from being POSIX compliant. Because there may be no underlying /bin/sh tries to
work around the problem by forking and execing the first token in its argument string.
Handles basic redirection ("<" or ">") on its own behalf. (MiNT)
Does not automatically flush output handles on some platforms. (SunOS, Solaris, HP-UX)
The return value is POSIX-like (shifted up by 8 bits), which only allows room for a
made-up value derived from the severity bits of the native 32-bit condition code (unless
overridden by use vmsish 'status'). For more details see perlvms/$?. (VMS)
- times
-
Only the first entry returned is nonzero. (Mac OS)
"cumulative" times will be bogus. On anything other than Windows NT or
Windows 2000, "system" time will be bogus, and "user" time is actually
the time returned by the clock() function in the C runtime library. (Win32)
Not useful. (RISC OS)
- truncate FILEHANDLE,LENGTH
-
- truncate EXPR,LENGTH
-
Not implemented. (Older versions of VMS)
Truncation to zero-length only. (VOS)
If a FILEHANDLE is supplied, it must be writable and opened in append mode (i.e., use open(FH,
'>>filename') or sysopen(FH,...,O_APPEND|O_RDWR). If a filename
is supplied, it should not be held open elsewhere. (Win32)
- umask EXPR
-
- umask
-
Returns undef where unavailable, as of version 5.005.
umask works but the correct permissions are set only when the file is
finally closed. (AmigaOS)
- utime LIST
-
Only the modification time is updated. (BeOS, Mac OS, VMS, RISC OS)
May not behave as expected. Behavior depends on the C runtime library's implementation
of utime(), and the filesystem being used. The FAT filesystem typically does not support
an "access time" field, and it may limit timestamps to a granularity of two
seconds. (Win32)
- wait
-
- waitpid PID,FLAGS
-
Not implemented. (Mac OS, VOS)
Can only be applied to process handles returned for processes spawned using system(1,
...) or pseudo processes created with fork(). (Win32)
Not useful. (RISC OS)
|
|