update Changes, patchlevel etc.
[p5sagit/p5-mst-13.2.git] / ext / POSIX / POSIX.pod
index 2bb8743..08300e4 100644 (file)
@@ -155,7 +155,7 @@ This is identical to Perl's builtin C<chown()> function.
 
 =item clearerr
 
-Use method C<FileHandle::clearerr()> instead.
+Use method C<IO::Handle::clearerr()> instead.
 
 =item clock
 
@@ -277,7 +277,7 @@ This is identical to Perl's builtin C<abs()> function.
 
 =item fclose
 
-Use method C<FileHandle::close()> instead.
+Use method C<IO::Handle::close()> instead.
 
 =item fcntl
 
@@ -285,35 +285,35 @@ This is identical to Perl's builtin C<fcntl()> function.
 
 =item fdopen
 
-Use method C<FileHandle::new_from_fd()> instead.
+Use method C<IO::Handle::new_from_fd()> instead.
 
 =item feof
 
-Use method C<FileHandle::eof()> instead.
+Use method C<IO::Handle::eof()> instead.
 
 =item ferror
 
-Use method C<FileHandle::error()> instead.
+Use method C<IO::Handle::error()> instead.
 
 =item fflush
 
-Use method C<FileHandle::flush()> instead.
+Use method C<IO::Handle::flush()> instead.
 
 =item fgetc
 
-Use method C<FileHandle::getc()> instead.
+Use method C<IO::Handle::getc()> instead.
 
 =item fgetpos
 
-Use method C<FileHandle::getpos()> instead.
+Use method C<IO::Seekable::getpos()> instead.
 
 =item fgets
 
-Use method C<FileHandle::gets()> instead.
+Use method C<IO::Handle::gets()> instead.
 
 =item fileno
 
-Use method C<FileHandle::fileno()> instead.
+Use method C<IO::Handle::fileno()> instead.
 
 =item floor
 
@@ -325,7 +325,7 @@ This is identical to the C function C<fmod()>.
 
 =item fopen
 
-Use method C<FileHandle::open()> instead.
+Use method C<IO::File::open()> instead.
 
 =item fork
 
@@ -380,11 +380,11 @@ fscanf() is C-specific--use <> and regular expressions instead.
 
 =item fseek
 
-Use method C<FileHandle::seek()> instead.
+Use method C<IO::Seekable::seek()> instead.
 
 =item fsetpos
 
-Use method C<FileHandle::setpos()> instead.
+Use method C<IO::Seekable::setpos()> instead.
 
 =item fstat
 
@@ -397,7 +397,7 @@ Perl's builtin C<stat> function.
 
 =item ftell
 
-Use method C<FileHandle::tell()> instead.
+Use method C<IO::Seekable::tell()> instead.
 
 =item fwrite
 
@@ -606,7 +606,7 @@ longjmp() is C-specific: use die instead.
 
 =item lseek
 
-Move the read/write file pointer.  This uses file descriptors such as
+Move the file's read/write position.  This uses file descriptors such as
 those obtained by calling C<POSIX::open>.
 
        $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
@@ -847,31 +847,35 @@ setjmp() is C-specific: use eval {} instead.
 
 =item setlocale
 
-Modifies and queries program's locale.
+Modifies and queries program's locale.  The following examples assume
+
+       use POSIX qw(setlocale LC_ALL LC_CTYPE);
+
+has been issued.
 
 The following will set the traditional UNIX system locale behavior
 (the second argument C<"C">).
 
-       $loc = POSIX::setlocale( &POSIX::LC_ALL, "C" );
+       $loc = setlocale( LC_ALL, "C" );
 
-The following will query (the missing second argument) the current
-LC_CTYPE category.
+The following will query the current LC_CTYPE category.  (No second
+argument means 'query'.)
 
-       $loc = POSIX::setlocale( &POSIX::LC_CTYPE);
+       $loc = setlocale( LC_CTYPE );
 
 The following will set the LC_CTYPE behaviour according to the locale
 environment variables (the second argument C<"">).
 Please see your systems L<setlocale(3)> documentation for the locale
 environment variables' meaning or consult L<perllocale>.
 
-       $loc = POSIX::setlocale( &POSIX::LC_CTYPE, "");
+       $loc = setlocale( LC_CTYPE, "" );
 
 The following will set the LC_COLLATE behaviour to Argentinian
 Spanish. B<NOTE>: The naming and availability of locales depends on
 your operating system. Please consult L<perllocale> for how to find
 out which locales are available in your system.
 
-       $loc = POSIX::setlocale( &POSIX::LC_ALL, "es_AR.ISO8859-1" );
+       $loc = setlocale( LC_ALL, "es_AR.ISO8859-1" );
 
 =item setpgid
 
@@ -1009,13 +1013,19 @@ Convert date and time information to string.  Returns the string.
 
 Synopsis:
 
-       strftime(fmt, sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = 0)
+       strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
 
 The month (C<mon>), weekday (C<wday>), and yearday (C<yday>) begin at zero.
 I.e. January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1.  The
-year (C<year>) is given in years since 1900.  I.e. The year 1995 is 95; the
+year (C<year>) is given in years since 1900.  I.e., the year 1995 is 95; the
 year 2001 is 101.  Consult your system's C<strftime()> manpage for details
 about these and the other arguments.
+If you want your code to be portable, your format (C<fmt>) argument
+should use only the conversion specifiers defined by the ANSI C
+standard.  These are C<aAbBcdHIjmMpSUwWxXyYZ%>.
+The given arguments are made consistent
+as though by calling C<mktime()> before calling your system's
+C<strftime()> function, except that the C<isdst> value is not affected.
 
 The string for Tuesday, December 12, 1995.
 
@@ -1204,7 +1214,7 @@ seconds.
 
 =item tmpfile
 
-Use method C<FileHandle::new_tmpfile()> instead.
+Use method C<IO::File::new_tmpfile()> instead.
 
 =item tmpnam
 
@@ -1247,7 +1257,7 @@ Get name of current operating system.
 
 =item ungetc
 
-Use method C<FileHandle::ungetc()> instead.
+Use method C<IO::Handle::ungetc()> instead.
 
 =item unlink
 
@@ -1314,9 +1324,10 @@ Creates a new C<POSIX::SigAction> object which corresponds to the C
 C<struct sigaction>.  This object will be destroyed automatically when it is
 no longer needed.  The first parameter is the fully-qualified name of a sub
 which is a signal-handler.  The second parameter is a C<POSIX::SigSet>
-object.  The third parameter contains the C<sa_flags>.
+object, it defaults to the empty set.  The third parameter contains the
+C<sa_flags>, it defaults to 0.
 
-       $sigset = POSIX::SigSet->new;
+       $sigset = POSIX::SigSet->new(SIGINT, SIGQUIT);
        $sigaction = POSIX::SigAction->new( 'main::handler', $sigset, &POSIX::SA_NOCLDSTOP );
 
 This C<POSIX::SigAction> object should be used with the C<POSIX::sigaction()>
@@ -1391,7 +1402,9 @@ Tests the SigSet object to see if it contains a specific signal.
 =item new
 
 Create a new Termios object.  This object will be destroyed automatically
-when it is no longer needed.
+when it is no longer needed.  A Termios object corresponds to the termios
+C struct.  new() mallocs a new one, getattr() fills it from a file descriptor,
+and setattr() sets a file descriptor's parameters to match Termios' contents.
 
        $termios = POSIX::Termios->new;
 
@@ -1473,13 +1486,13 @@ array so an index must be specified.
 
 Set the c_cflag field of a termios object.
 
-       $termios->setcflag( &POSIX::CLOCAL );
+       $termios->setcflag( $c_cflag | &POSIX::CLOCAL );
 
 =item setiflag
 
 Set the c_iflag field of a termios object.
 
-       $termios->setiflag( &POSIX::BRKINT );
+       $termios->setiflag( $c_iflag | &POSIX::BRKINT );
 
 =item setispeed
 
@@ -1493,13 +1506,13 @@ Returns C<undef> on failure.
 
 Set the c_lflag field of a termios object.
 
-       $termios->setlflag( &POSIX::ECHO );
+       $termios->setlflag( $c_lflag | &POSIX::ECHO );
 
 =item setoflag
 
 Set the c_oflag field of a termios object.
 
-       $termios->setoflag( &POSIX::OPOST );
+       $termios->setoflag( $c_oflag | &POSIX::OPOST );
 
 =item setospeed
 
@@ -1575,7 +1588,16 @@ _SC_ARG_MAX _SC_CHILD_MAX _SC_CLK_TCK _SC_JOB_CONTROL _SC_NGROUPS_MAX _SC_OPEN_M
 
 =item Constants
 
-E2BIG EACCES EAGAIN EBADF EBUSY ECHILD EDEADLK EDOM EEXIST EFAULT EFBIG EINTR EINVAL EIO EISDIR EMFILE EMLINK ENAMETOOLONG ENFILE ENODEV ENOENT ENOEXEC ENOLCK ENOMEM ENOSPC ENOSYS ENOTDIR ENOTEMPTY ENOTTY ENXIO EPERM EPIPE ERANGE EROFS ESPIPE ESRCH EXDEV
+E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY EBADF
+EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ
+EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH EINPROGRESS EINTR
+EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK EMSGSIZE ENAMETOOLONG
+ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS ENODEV ENOENT ENOEXEC
+ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK ENOTCONN ENOTDIR
+ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM EPFNOSUPPORT EPIPE
+EPROCLIM EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE ERESTART EROFS
+ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT ETOOMANYREFS
+ETXTBSY EUSERS EWOULDBLOCK EXDEV
 
 =back
 
@@ -1635,7 +1657,11 @@ HUGE_VAL
 
 =item Constants
 
-SA_NOCLDSTOP SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU SIGUSR1 SIGUSR2 SIG_BLOCK SIG_DFL SIG_ERR SIG_IGN SIG_SETMASK SIG_UNBLOCK
+SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK SA_RESETHAND SA_RESTART
+SA_SIGINFO SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT
+SIGKILL SIGPIPE SIGQUIT SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU
+SIGUSR1 SIGUSR2 SIG_BLOCK SIG_DFL SIG_ERR SIG_IGN SIG_SETMASK
+SIG_UNBLOCK
 
 =back