* libc/include/sys/unistd.h: Removed definition of MAXNAMLEN.
* libc/include/dirent.h: Added definition of MAXNAMLEN if
not defined by sys/dirent.h.
* libc/posix/execvp.c: Added include of dirent.h to get
MAXNAMLEN value which used to be in unistd.h.
* Makefile.in: Regenerate.
* libc/include/_ansi.h (_EXFUN): Define specially for __CYGWIN__.
(_EXPARM): New macro for defining a function parameter.
* libc/include/stdlib.h: Use _EXPARM.
* libc/stdlib/mallocr.c: Don't build cfree for Cygwin.
* libc/include/string.h: Don't include <sys/types.h>,
as it causes really bad namespace pollution. Don't declare
swab(), it is properly declared in unistd.h.
* libc/stdlib/mprec.c (ulp, b2d, d2b): changed a few expressions
like x << y-z to the equivalent x << (y-z).
(d2b): changed if statements with assignment to perform the
assignment prior to the if check.
* libc/reent/reent.c: included stdlib.h for "_free_r" prototype.
* libc/unix/getpass.c (getpass): moved "echo" assignment out of if.
* libc/unix/ttyname.c: included string.h for "strcpy" prototype.
* libc/unix/getcwd.c (ISDOT): added parentheses to clarify && and ||
precedence.
* libc/include/sys/unistd.h: added "vfork" prototype (for popen.c).
Added "_execve" prototype (for execl.c, execle.c, execv.c, and
execve.c).
* libc/posix/popen.c (popen): added parentheses to clarify && and ||
precedence.
* libm/math/e_cosh.c (__ieee754_cosh): changed parentheses to
clarify && and || precendence (and to remove pascalism).
* libm/math/e_sinh.c (__ieee754_sinh): Ditto.
* libm/math/s_infconst.c: added another pair of braces to all
initializers for __infinity (need three: for __infinity[1] array,
for union __dmath, and for i[2]).
* libc/include/sys/reent.h (_rand_next): Added __extension__
qualifier as long long type is not strict ANSI.
* libc/stdlib/rand.c (rand): Added __extension__ qualifier
to long long constant.
* libc/include/sys/reent.h (_rand_next): Changed to
unsigned long long and moved to end of _reent struct in _new union.
(_REENT_INIT): Changed to move _rand_next initialization.
* libc/stdlib/rand.c (rand): Changed to use unsigned long long
linear congruential algorithm that is used by DJGPP.
(__sread): always read in binary mode
(__swrite): always write in binary mode
* libc/include/stdio.h: no getc/putc macros for cygwin; causes
compatibility issues with different dll versions
* libc/stdio/fopen.c: use __stextmode
* libc/stdio/fdopen.c: ditto
* libc/stdio/freopen.c: ditto
* libc/stdio/findfp.c: set up __SCLE for std{in,out,err}
* libc/stdio/local.h: declare __stextmode
* libc/include/stdio.h (FILE): define __SCLE for "convert line
endings" for Cygwin.
(__sgetc): convert line endings if needed
(__sputc): ditto
* libc/stdio/fdopen.c (_fdopen_r): Remember if we opened in text mode
* libc/stdio/fopen.c (_fopen_r): ditto
* libc/stdio/freopen.c (freopen): ditto
* libc/stdio/fread.c (fread): perform CRLF conversions if __SCLE
* libc/stdio/fvwrite.c (__sfvwrite): ditto
fchmod, fchown, lchown.
* winsup/cygwin/syscalls.cc (chown_worker): Use previous
uid/gid if new uid/gid is -1.
New static function with chown functionality.
(chown): Call chown_worker with SYMLINK_FOLLOW.
(fchown): New function. Call chown_worker with SYMLINK_FOLLOW.
(lchown): New function. Call chown_worker with SYMLINK_IGNORE.
* cygwin.din: Add symbols for fchown, lchown.
* path.cc (symlink): Call `set_file_attribute()' and
`SetFileAttributeA()' instead of `chmod()' to set
uid/gid correct.
* libc/include/string.h: Changed last argument back to ssize_t
to make it compatible with XPG4 definition which is
defined in <unistd.h>. There is a conflict in the SVID 3
and XPG4 definitions and newlib will settle with XPG4.
* libc/string/swab.c: Ditto.