Whitespace cleanup.

* configure.in: Eliminate subdir stuff.
* configure: Regenerate.
* include/getopt.h (option): Make name field 'const'.
This commit is contained in:
Christopher Faylor 2000-10-28 05:41:44 +00:00
parent ce475802f8
commit 75a57bf04a
45 changed files with 196 additions and 301 deletions

View File

@ -1,3 +1,9 @@
Sat Oct 28 01:39:53 2000 Christopher Faylor <cgf@cygnus.com>
* configure.in: Eliminate subdir stuff.
* configure: Regenerate.
* include/getopt.h (option): Make name field 'const'.
Fri Oct 27 20:51:00 2000 Corinna Vinschen <corinna@vinschen.de> Fri Oct 27 20:51:00 2000 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc: New file keeping all autoload stuff. * autoload.cc: New file keeping all autoload stuff.
@ -239,13 +245,13 @@ Wed Oct 18 20:50:27 2000 Christopher Faylor <cgf@cygnus.com>
2000-10-18 DJ Delorie <dj@redhat.com> 2000-10-18 DJ Delorie <dj@redhat.com>
* dcrt0.cc (dll_crt0_1): init cygcwd before forkee branch * dcrt0.cc (dll_crt0_1): init cygcwd before forkee branch
* environ.cc (conv_start_chars): Cache a table of "first * environ.cc (conv_start_chars): Cache a table of "first
characters" for environment variables needing conversion. characters" for environment variables needing conversion.
(getwinenv): Use it. (getwinenv): Use it.
(environ_init): Create it, also check first chars for TERM and (environ_init): Create it, also check first chars for TERM and
CYGWIN. CYGWIN.
* path.cc: Use lookup table for case insensitive comparisons. * path.cc: Use lookup table for case insensitive comparisons.
Wed Oct 18 00:48:49 2000 Christopher Faylor <cgf@cygnus.com> Wed Oct 18 00:48:49 2000 Christopher Faylor <cgf@cygnus.com>

View File

@ -46,7 +46,7 @@ static int dllname ## _init ()
* *
* So, immediately following the the call to one of the above routines * So, immediately following the the call to one of the above routines
* we have: * we have:
* foojmp (4 bytes) Pointer to a word containing the routine used * foojmp (4 bytes) Pointer to a word containing the routine used
* to eventually invoke the function. Initially * to eventually invoke the function. Initially
* points to an init function which loads the * points to an init function which loads the
* DLL, gets the process's load address, * DLL, gets the process's load address,

View File

@ -11,7 +11,7 @@ details. */
#ifdef __i386__ #ifdef __i386__
#if 1 #if 1
asm(" .globl _setjmp \n" asm(" .globl _setjmp \n"
"_setjmp: \n" "_setjmp: \n"
" pushl %ebp \n" " pushl %ebp \n"
" movl %esp,%ebp \n" " movl %esp,%ebp \n"

View File

@ -1631,10 +1631,8 @@ EOF
fi fi
subdirs="utils doc"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:1638: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo "configure:1636: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -1671,20 +1669,20 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1675 "configure" #line 1673 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <string.h> #include <string.h>
void foo(char *s, int c, size_t n) void foo(char *s, int c, size_t n)
{ {
__builtin_memset(s, c, n); __builtin_memset(s, c, n);
} }
int main() { int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
use_builtin_memset=yes use_builtin_memset=yes
else else
@ -1716,13 +1714,13 @@ PTH_ALLOW=''
if test "${enable_threadsafe+set}" = set; then if test "${enable_threadsafe+set}" = set; then
enableval="$enable_threadsafe" enableval="$enable_threadsafe"
case "${enableval}" in case "${enableval}" in
yes) yes)
;; ;;
runtime) runtime)
mt_safe_val=2 mt_safe_val=2
MT_SAFE=yes MT_SAFE=yes
;; ;;
no) no)
mt_safe_val=0 mt_safe_val=0
MT_SAFE=no MT_SAFE=no
PTH_ALLOW=';' PTH_ALLOW=';'
@ -1736,7 +1734,7 @@ fi
if test "${enable_extra_threadsafe_checking+set}" = set; then if test "${enable_extra_threadsafe_checking+set}" = set; then
enableval="$enable_extra_threadsafe_checking" enableval="$enable_extra_threadsafe_checking"
case "${enableval}" in case "${enableval}" in
yes) yes)
mt_safe_val=1 mt_safe_val=1
MT_SAFE=yes MT_SAFE=yes
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
@ -1744,7 +1742,7 @@ yes)
EOF EOF
;; ;;
no) no)
;; ;;
esac esac
@ -1794,7 +1792,7 @@ fi
echo $ac_n "checking if newlib is part of the build tree""... $ac_c" 1>&6 echo $ac_n "checking if newlib is part of the build tree""... $ac_c" 1>&6
echo "configure:1798: checking if newlib is part of the build tree" >&5 echo "configure:1796: checking if newlib is part of the build tree" >&5
EXE_LDFLAGS= EXE_LDFLAGS=
if test -d ../newlib if test -d ../newlib
@ -1809,9 +1807,9 @@ fi
if test x"$EXE_LDFLAGS" = x if test x"$EXE_LDFLAGS" = x
then then
echo $ac_n "checking if installed newlib needed""... $ac_c" 1>&6 echo $ac_n "checking if installed newlib needed""... $ac_c" 1>&6
echo "configure:1813: checking if installed newlib needed" >&5 echo "configure:1811: checking if installed newlib needed" >&5
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1815 "configure" #line 1813 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
@ -1819,7 +1817,7 @@ int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
@ -1839,8 +1837,8 @@ case "$target_cpu" in
DEF_DLL_ENTRY="dll_entry@12" DEF_DLL_ENTRY="dll_entry@12"
ALLOCA="_alloca" ALLOCA="_alloca"
CONFIG_DIR="i386" ;; CONFIG_DIR="i386" ;;
powerpc*) DLL_ENTRY="dll_entry" powerpc*) DLL_ENTRY="dll_entry"
DEF_DLL_ENTRY="dll_entry" DEF_DLL_ENTRY="dll_entry"
ALLOCA=" __allocate_stack" ALLOCA=" __allocate_stack"
CONFIG_DIR="ppc" ;; CONFIG_DIR="ppc" ;;
*) { echo "configure: error: Invalid target processor \"$target_cpu\"" 1>&2; exit 1; } ;; *) { echo "configure: error: Invalid target processor \"$target_cpu\"" 1>&2; exit 1; } ;;
@ -2012,7 +2010,6 @@ s%@DLLTOOL@%$DLLTOOL%g
s%@WINDRES@%$WINDRES%g s%@WINDRES@%$WINDRES%g
s%@CPP@%$CPP%g s%@CPP@%$CPP%g
s%@ALLOCA@%$ALLOCA%g s%@ALLOCA@%$ALLOCA%g
s%@subdirs@%$subdirs%g
s%@SET_MAKE@%$SET_MAKE%g s%@SET_MAKE@%$SET_MAKE%g
s%@MT_SAFE@%$MT_SAFE%g s%@MT_SAFE@%$MT_SAFE%g
s%@PTH_ALLOW@%$PTH_ALLOW%g s%@PTH_ALLOW@%$PTH_ALLOW%g
@ -2239,101 +2236,4 @@ chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
if test "$no_recursion" != yes; then
# Remove --cache-file and --srcdir arguments so they do not pile up.
ac_sub_configure_args=
ac_prev=
for ac_arg in $ac_configure_args; do
if test -n "$ac_prev"; then
ac_prev=
continue
fi
case "$ac_arg" in
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
;;
*) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
esac
done
for ac_config_dir in utils doc; do
# Do not complain, so a configure script can configure whichever
# parts of a large source tree are present.
if test ! -d $srcdir/$ac_config_dir; then
continue
fi
echo configuring in $ac_config_dir
case "$srcdir" in
.) ;;
*)
if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
else
{ echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
fi
;;
esac
ac_popdir=`pwd`
cd $ac_config_dir
# A "../" for each directory in /$ac_config_dir.
ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
case "$srcdir" in
.) # No --srcdir option. We are building in place.
ac_sub_srcdir=$srcdir ;;
/*) # Absolute path.
ac_sub_srcdir=$srcdir/$ac_config_dir ;;
*) # Relative path.
ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
esac
# Check for guested configure; otherwise get Cygnus style configure.
if test -f $ac_sub_srcdir/configure; then
ac_sub_configure=$ac_sub_srcdir/configure
elif test -f $ac_sub_srcdir/configure.in; then
ac_sub_configure=$ac_configure
else
echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
ac_sub_configure=
fi
# The recursion is here.
if test -n "$ac_sub_configure"; then
# Make the cache file name correct relative to the subdirectory.
case "$cache_file" in
/*) ac_sub_cache_file=$cache_file ;;
*) # Relative path.
ac_sub_cache_file="$ac_dots$cache_file" ;;
esac
case "$ac_given_INSTALL" in
[/$]*) INSTALL="$ac_given_INSTALL" ;;
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
esac
echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
# The eval makes quoting arguments work.
if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
then :
else
{ echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
fi
fi
cd $ac_popdir
done
fi

View File

@ -88,7 +88,6 @@ AC_CHECK_TOOL(WINDRES, windres, windres)
dnl C_SUBST(WINDRES) dnl C_SUBST(WINDRES)
AC_ALLOCA AC_ALLOCA
AC_CONFIG_SUBDIRS(utils doc)
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
dnl check whether gcc supports __builtin_memset. dnl check whether gcc supports __builtin_memset.
@ -97,9 +96,9 @@ AC_LANG_SAVE
AC_LANG_CPLUSPLUS AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#include <string.h> #include <string.h>
void foo(char *s, int c, size_t n) void foo(char *s, int c, size_t n)
{ {
__builtin_memset(s, c, n); __builtin_memset(s, c, n);
} }
], [ ], ], [ ],
use_builtin_memset=yes, use_builtin_memset=no) use_builtin_memset=yes, use_builtin_memset=no)
@ -116,14 +115,14 @@ PTH_ALLOW=''
AC_ARG_ENABLE(threadsafe, AC_ARG_ENABLE(threadsafe,
[ --enable-threadsafe=[runtime] Build a cygwin DLL which is thread safe], [ --enable-threadsafe=[runtime] Build a cygwin DLL which is thread safe],
[case "${enableval}" in [case "${enableval}" in
yes) yes)
dnl default. dnl default.
;; ;;
runtime) runtime)
mt_safe_val=2 mt_safe_val=2
MT_SAFE=yes MT_SAFE=yes
;; ;;
no) no)
mt_safe_val=0 mt_safe_val=0
MT_SAFE=no MT_SAFE=no
PTH_ALLOW=';' PTH_ALLOW=';'
@ -134,12 +133,12 @@ esac
AC_ARG_ENABLE(extra-threadsafe-checking, AC_ARG_ENABLE(extra-threadsafe-checking,
[ --enable-extra-threadsafe-checking Build a cygwin DLL which is thread safe with extra consistency checking], [ --enable-extra-threadsafe-checking Build a cygwin DLL which is thread safe with extra consistency checking],
[case "${enableval}" in [case "${enableval}" in
yes) yes)
mt_safe_val=1 mt_safe_val=1
MT_SAFE=yes MT_SAFE=yes
AC_DEFINE(_CYG_THREAD_FAILSAFE) AC_DEFINE(_CYG_THREAD_FAILSAFE)
;; ;;
no) no)
dnl Don't do anything here to avoid overriding --enable-threadsafe. dnl Don't do anything here to avoid overriding --enable-threadsafe.
;; ;;
esac esac
@ -188,8 +187,8 @@ dnl fi
dnl dnl
dnl If newlib is part of build tree, always set EXE_LDFLAGS to point to dnl If newlib is part of build tree, always set EXE_LDFLAGS to point to
dnl it; this is important in cases where the installed newlib is perhaps dnl it; this is important in cases where the installed newlib is perhaps
dnl not compatible. Check and warn for installed newlib only if it's not dnl not compatible. Check and warn for installed newlib only if it's not
dnl part of the build tree. dnl part of the build tree.
dnl dnl
AC_MSG_CHECKING([if newlib is part of the build tree]) AC_MSG_CHECKING([if newlib is part of the build tree])
@ -220,10 +219,10 @@ AC_SUBST(EXE_LDFLAGS)
case "$target_cpu" in case "$target_cpu" in
i386|i486|i586|i686) DLL_ENTRY="_dll_entry@12" i386|i486|i586|i686) DLL_ENTRY="_dll_entry@12"
DEF_DLL_ENTRY="dll_entry@12" DEF_DLL_ENTRY="dll_entry@12"
ALLOCA="_alloca" ALLOCA="_alloca"
CONFIG_DIR="i386" ;; CONFIG_DIR="i386" ;;
powerpc*) DLL_ENTRY="dll_entry" powerpc*) DLL_ENTRY="dll_entry"
DEF_DLL_ENTRY="dll_entry" DEF_DLL_ENTRY="dll_entry"
ALLOCA=" __allocate_stack" ALLOCA=" __allocate_stack"
CONFIG_DIR="ppc" ;; CONFIG_DIR="ppc" ;;
*) AC_MSG_ERROR(Invalid target processor \"$target_cpu\") ;; *) AC_MSG_ERROR(Invalid target processor \"$target_cpu\") ;;

View File

@ -270,7 +270,7 @@ dll_list::load_after_fork (HANDLE parent, dll *first)
int try2 = 0; int try2 = 0;
dll d; dll d;
void *next = first; void *next = first;
while (next) while (next)
{ {
DWORD nb; DWORD nb;
@ -363,7 +363,7 @@ dll_dllcrt0 (HMODULE h, per_process *p)
all of cygwin's internal structures may have been set up. */ all of cygwin's internal structures may have been set up. */
if (!d || (cygwin_finished_initializing && !d->init ())) if (!d || (cygwin_finished_initializing && !d->init ()))
return -1; return -1;
return (DWORD) d; return (DWORD) d;
} }

View File

@ -188,7 +188,7 @@ envsize (const char * const *in_envp, int debug_print)
{ {
const char * const *envp; const char * const *envp;
for (envp = in_envp; *envp; envp++) for (envp = in_envp; *envp; envp++)
if (debug_print) if (debug_print)
debug_printf ("%s", *envp); debug_printf ("%s", *envp);
return (1 + envp - in_envp) * sizeof (const char *); return (1 + envp - in_envp) * sizeof (const char *);
} }

View File

@ -806,7 +806,7 @@ public:
void dump (); void dump ();
} ; } ;
class fhandler_dev_clipboard: public fhandler_base class fhandler_dev_clipboard: public fhandler_base
{ {
public: public:

View File

@ -48,7 +48,7 @@ fhandler_dev_clipboard::read (void *ptr, size_t len)
HGLOBAL hglb; HGLOBAL hglb;
LPSTR lpstr; LPSTR lpstr;
int ret; int ret;
if (!clipboard_eof) if (!clipboard_eof)
{ {
OpenClipboard(0); OpenClipboard(0);

View File

@ -236,7 +236,7 @@ fhandler_dev_mem::lseek (off_t offset, int whence)
case SEEK_SET: case SEEK_SET:
pos = offset; pos = offset;
break; break;
case SEEK_CUR: case SEEK_CUR:
pos += offset; pos += offset;
break; break;
@ -245,7 +245,7 @@ fhandler_dev_mem::lseek (off_t offset, int whence)
pos = mem_size; pos = mem_size;
pos += offset; pos += offset;
break; break;
default: default:
set_errno (EINVAL); set_errno (EINVAL);
return (off_t) -1; return (off_t) -1;
@ -314,7 +314,7 @@ fhandler_dev_mem::mmap (caddr_t *addr, size_t len, DWORD access,
phys.QuadPart = (ULONGLONG) off; phys.QuadPart = (ULONGLONG) off;
if ((ret = NtMapViewOfSection (h, if ((ret = NtMapViewOfSection (h,
INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE,
&base, &base,
0L, 0L,
dlen, dlen,

View File

@ -35,7 +35,7 @@ fhandler_socket::fhandler_socket (const char *name) :
set_cb (sizeof *this); set_cb (sizeof *this);
set_need_fork_fixup (); set_need_fork_fixup ();
prot_info_ptr = (LPWSAPROTOCOL_INFOA) cmalloc (HEAP_BUF, prot_info_ptr = (LPWSAPROTOCOL_INFOA) cmalloc (HEAP_BUF,
sizeof (WSAPROTOCOL_INFOA)); sizeof (WSAPROTOCOL_INFOA));
} }
fhandler_socket::~fhandler_socket () fhandler_socket::~fhandler_socket ()

View File

@ -58,7 +58,7 @@
* GLOB_TILDE: * GLOB_TILDE:
* expand ~user/foo to the /home/dir/of/user/foo * expand ~user/foo to the /home/dir/of/user/foo
* GLOB_BRACE: * GLOB_BRACE:
* expand {1,2}{a,b} to 1a 1b 2a 2b * expand {1,2}{a,b} to 1a 1b 2a 2b
* gl_matchc: * gl_matchc:
* Number of matches in the current invocation of glob. * Number of matches in the current invocation of glob.
*/ */
@ -199,7 +199,7 @@ glob(pattern, flags, errfunc, pglob)
bufend = bufnext + MAXPATHLEN; bufend = bufnext + MAXPATHLEN;
if (flags & GLOB_QUOTE) { if (flags & GLOB_QUOTE) {
/* Protect the quoted characters. */ /* Protect the quoted characters. */
while (bufnext < bufend && (c = *patnext++) != EOS) while (bufnext < bufend && (c = *patnext++) != EOS)
if (c == QUOTE) { if (c == QUOTE) {
if ((c = *patnext++) == EOS) { if ((c = *patnext++) == EOS) {
c = QUOTE; c = QUOTE;
@ -210,8 +210,8 @@ glob(pattern, flags, errfunc, pglob)
else else
*bufnext++ = c; *bufnext++ = c;
} }
else else
while (bufnext < bufend && (c = *patnext++) != EOS) while (bufnext < bufend && (c = *patnext++) != EOS)
*bufnext++ = c; *bufnext++ = c;
*bufnext = EOS; *bufnext = EOS;
@ -272,7 +272,7 @@ static int globexp2(ptr, pattern, pglob, rv)
for (pm = pe++; *pe != RBRACKET && *pe != EOS; pe++) for (pm = pe++; *pe != RBRACKET && *pe != EOS; pe++)
continue; continue;
if (*pe == EOS) { if (*pe == EOS) {
/* /*
* We could not find a matching RBRACKET. * We could not find a matching RBRACKET.
* Ignore and just look for RBRACE * Ignore and just look for RBRACE
*/ */
@ -300,7 +300,7 @@ static int globexp2(ptr, pattern, pglob, rv)
for (pl = pm++; *pm != RBRACKET && *pm != EOS; pm++) for (pl = pm++; *pm != RBRACKET && *pm != EOS; pm++)
continue; continue;
if (*pm == EOS) { if (*pm == EOS) {
/* /*
* We could not find a matching RBRACKET. * We could not find a matching RBRACKET.
* Ignore and just look for RBRACE * Ignore and just look for RBRACE
*/ */
@ -325,7 +325,7 @@ static int globexp2(ptr, pattern, pglob, rv)
/* Append the current string */ /* Append the current string */
for (lm = ls; (pl < pm); *lm++ = *pl++) for (lm = ls; (pl < pm); *lm++ = *pl++)
continue; continue;
/* /*
* Append the rest of the pattern after the * Append the rest of the pattern after the
* closing brace * closing brace
*/ */
@ -370,15 +370,15 @@ globtilde(pattern, patbuf, pglob)
return pattern; return pattern;
/* Copy up to the end of the string or / */ /* Copy up to the end of the string or / */
for (p = pattern + 1, h = (char *) patbuf; *p && *p != SLASH; for (p = pattern + 1, h = (char *) patbuf; *p && *p != SLASH;
*h++ = *p++) *h++ = *p++)
continue; continue;
*h = EOS; *h = EOS;
if (((char *) patbuf)[0] == EOS) { if (((char *) patbuf)[0] == EOS) {
/* /*
* handle a plain ~ or ~/ by expanding $HOME * handle a plain ~ or ~/ by expanding $HOME
* first and then trying the password file * first and then trying the password file
*/ */
if ((h = getenv("HOME")) == NULL) { if ((h = getenv("HOME")) == NULL) {
@ -401,14 +401,14 @@ globtilde(pattern, patbuf, pglob)
/* Copy the home directory */ /* Copy the home directory */
for (b = patbuf; *h; *b++ = *h++) for (b = patbuf; *h; *b++ = *h++)
continue; continue;
/* Append the rest of the pattern */ /* Append the rest of the pattern */
while ((*b++ = *p++) != EOS) while ((*b++ = *p++) != EOS)
continue; continue;
return patbuf; return patbuf;
} }
/* /*
* The main glob() routine: compiles the pattern (optionally processing * The main glob() routine: compiles the pattern (optionally processing
@ -466,7 +466,7 @@ glob0(pattern, pglob)
break; break;
case STAR: case STAR:
pglob->gl_flags |= GLOB_MAGCHAR; pglob->gl_flags |= GLOB_MAGCHAR;
/* collapse adjacent stars to one, /* collapse adjacent stars to one,
* to avoid exponential behavior * to avoid exponential behavior
*/ */
if (bufnext == patbuf || bufnext[-1] != M_ALL) if (bufnext == patbuf || bufnext[-1] != M_ALL)
@ -486,17 +486,17 @@ glob0(pattern, pglob)
return(err); return(err);
/* /*
* If there was no match we are going to append the pattern * If there was no match we are going to append the pattern
* if GLOB_NOCHECK was specified or if GLOB_NOMAGIC was specified * if GLOB_NOCHECK was specified or if GLOB_NOMAGIC was specified
* and the pattern did not contain any magic characters * and the pattern did not contain any magic characters
* GLOB_NOMAGIC is there just for compatibility with csh. * GLOB_NOMAGIC is there just for compatibility with csh.
*/ */
if (pglob->gl_pathc == oldpathc && if (pglob->gl_pathc == oldpathc &&
((pglob->gl_flags & GLOB_NOCHECK) || ((pglob->gl_flags & GLOB_NOCHECK) ||
((pglob->gl_flags & GLOB_NOMAGIC) && ((pglob->gl_flags & GLOB_NOMAGIC) &&
!(pglob->gl_flags & GLOB_MAGCHAR)))) !(pglob->gl_flags & GLOB_MAGCHAR))))
return(globextend(pattern, pglob)); return(globextend(pattern, pglob));
else if (!(pglob->gl_flags & GLOB_NOSORT)) else if (!(pglob->gl_flags & GLOB_NOSORT))
qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc, qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc,
pglob->gl_pathc - oldpathc, sizeof(char *), compare); pglob->gl_pathc - oldpathc, sizeof(char *), compare);
return(0); return(0);
@ -545,7 +545,7 @@ glob2(pathbuf, pathend, pattern, pglob)
*pathend = EOS; *pathend = EOS;
if (g_lstat(pathbuf, &sb, pglob)) if (g_lstat(pathbuf, &sb, pglob))
return(0); return(0);
if (((pglob->gl_flags & GLOB_MARK) && if (((pglob->gl_flags & GLOB_MARK) &&
pathend[-1] != SEP) && (S_ISDIR(sb.st_mode) pathend[-1] != SEP) && (S_ISDIR(sb.st_mode)
|| (S_ISLNK(sb.st_mode) && || (S_ISLNK(sb.st_mode) &&
@ -598,7 +598,7 @@ glob3(pathbuf, pathend, pattern, restpattern, pglob)
*pathend = EOS; *pathend = EOS;
errno = 0; errno = 0;
if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { if ((dirp = g_opendir(pathbuf, pglob)) == NULL) {
/* TODO: don't call for ENOENT or ENOTDIR? */ /* TODO: don't call for ENOENT or ENOTDIR? */
if (pglob->gl_errfunc) { if (pglob->gl_errfunc) {
@ -624,7 +624,7 @@ glob3(pathbuf, pathend, pattern, restpattern, pglob)
/* Initial DOT must be matched literally. */ /* Initial DOT must be matched literally. */
if (dp->d_name[0] == DOT && *pattern != DOT) if (dp->d_name[0] == DOT && *pattern != DOT)
continue; continue;
for (sc = (u_char *) dp->d_name, dc = pathend; for (sc = (u_char *) dp->d_name, dc = pathend;
(*dc++ = *sc++) != EOS;) (*dc++ = *sc++) != EOS;)
continue; continue;
if (!match(pathend, pattern, restpattern)) { if (!match(pathend, pattern, restpattern)) {
@ -670,7 +670,7 @@ globextend(path, pglob)
const Char *p; const Char *p;
newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs); newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs);
pathv = pglob->gl_pathv ? pathv = pglob->gl_pathv ?
realloc((char *)pglob->gl_pathv, newsize) : realloc((char *)pglob->gl_pathv, newsize) :
malloc(newsize); malloc(newsize);
if (pathv == NULL) if (pathv == NULL)
@ -712,7 +712,7 @@ match(name, pat, patend)
case M_ALL: case M_ALL:
if (pat == patend) if (pat == patend)
return(1); return(1);
do do
if (match(name, pat, patend)) if (match(name, pat, patend))
return(1); return(1);
while (*name++ != EOS); while (*name++ != EOS);
@ -851,7 +851,7 @@ g_Ctoc(str, buf)
} }
#ifdef DEBUG #ifdef DEBUG
static void static void
qprintf(str, s) qprintf(str, s)
const char *str; const char *str;
register Char *s; register Char *s;

View File

@ -87,8 +87,8 @@ extern char *telcmds[];
#define TELOPT_STATUS 5 /* give status */ #define TELOPT_STATUS 5 /* give status */
#define TELOPT_TM 6 /* timing mark */ #define TELOPT_TM 6 /* timing mark */
#define TELOPT_RCTE 7 /* remote controlled transmission and echo */ #define TELOPT_RCTE 7 /* remote controlled transmission and echo */
#define TELOPT_NAOL 8 /* negotiate about output line width */ #define TELOPT_NAOL 8 /* negotiate about output line width */
#define TELOPT_NAOP 9 /* negotiate about output page size */ #define TELOPT_NAOP 9 /* negotiate about output page size */
#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */ #define TELOPT_NAOCRD 10 /* negotiate about CR disposition */
#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */ #define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */ #define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */
@ -120,7 +120,7 @@ extern char *telcmds[];
#define TELOPT_ENCRYPT 38 /* Encryption option */ #define TELOPT_ENCRYPT 38 /* Encryption option */
#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */ #define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */
#define TELOPT_EXOPL 255 /* extended-options-list */ #define TELOPT_EXOPL 255 /* extended-options-list */
#define TELOPT_ENVIRON TELOPT_OLD_ENVIRON #define TELOPT_ENVIRON TELOPT_OLD_ENVIRON
#define NTELOPTS (1+TELOPT_NEW_ENVIRON) #define NTELOPTS (1+TELOPT_NEW_ENVIRON)
#ifdef TELOPTS #ifdef TELOPTS

View File

@ -42,17 +42,17 @@
#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ #define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
#define SO_DONTLINGER (u_int)(~SO_LINGER) #define SO_DONTLINGER (u_int)(~SO_LINGER)
/* /*
* Additional options. * Additional options.
*/ */
#define SO_SNDBUF 0x1001 /* send buffer size */ #define SO_SNDBUF 0x1001 /* send buffer size */
#define SO_RCVBUF 0x1002 /* receive buffer size */ #define SO_RCVBUF 0x1002 /* receive buffer size */
#define SO_SNDLOWAT 0x1003 /* send low-water mark */ #define SO_SNDLOWAT 0x1003 /* send low-water mark */
#define SO_RCVLOWAT 0x1004 /* receive low-water mark */ #define SO_RCVLOWAT 0x1004 /* receive low-water mark */
#define SO_SNDTIMEO 0x1005 /* send timeout */ #define SO_SNDTIMEO 0x1005 /* send timeout */
#define SO_RCVTIMEO 0x1006 /* receive timeout */ #define SO_RCVTIMEO 0x1006 /* receive timeout */
#define SO_ERROR 0x1007 /* get error status and clear */ #define SO_ERROR 0x1007 /* get error status and clear */
#define SO_TYPE 0x1008 /* get socket type */ #define SO_TYPE 0x1008 /* get socket type */
#endif /* _ASM_SOCKET_H */ #endif /* _ASM_SOCKET_H */

View File

@ -15,7 +15,7 @@ details. */
#ifdef __cplusplus #ifdef __cplusplus
#define CDECL_BEGIN extern "C" { #define CDECL_BEGIN extern "C" {
#define CDECL_END } #define CDECL_END }
#else #else
#define CDECL_BEGIN #define CDECL_BEGIN
#define CDECL_END #define CDECL_END
@ -27,7 +27,7 @@ CDECL_BEGIN \
int WINAPI Entry (HINSTANCE h, DWORD reason, void *ptr); \ int WINAPI Entry (HINSTANCE h, DWORD reason, void *ptr); \
typedef int (*mainfunc) (int, char **, char **); \ typedef int (*mainfunc) (int, char **, char **); \
extern int cygwin_attach_dll (HMODULE, mainfunc); \ extern int cygwin_attach_dll (HMODULE, mainfunc); \
extern void cygwin_detach_dll (DWORD); \ extern void cygwin_detach_dll (DWORD); \
CDECL_END \ CDECL_END \
\ \
static HINSTANCE storedHandle; \ static HINSTANCE storedHandle; \
@ -53,7 +53,7 @@ int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \
storedHandle = h; \ storedHandle = h; \
storedReason = reason; \ storedReason = reason; \
storedPtr = ptr; \ storedPtr = ptr; \
dll_index = cygwin_attach_dll (h, &__dllMain); \ dll_index = cygwin_attach_dll (h, &__dllMain); \
if (dll_index == (DWORD) -1) \ if (dll_index == (DWORD) -1) \
ret = 0; \ ret = 0; \
} \ } \
@ -64,12 +64,12 @@ int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \
ret = Entry (h, reason, ptr); \ ret = Entry (h, reason, ptr); \
if (ret) \ if (ret) \
{ \ { \
cygwin_detach_dll (dll_index); \ cygwin_detach_dll (dll_index); \
dll_index = (DWORD) -1; \ dll_index = (DWORD) -1; \
} \ } \
} \ } \
break; \ break; \
\ \
case DLL_THREAD_ATTACH: \ case DLL_THREAD_ATTACH: \
{ \ { \
ret = Entry (h, reason, ptr); \ ret = Entry (h, reason, ptr); \

View File

@ -24,7 +24,7 @@ extern "C" {
* remainder may be interface specific. * remainder may be interface specific.
*/ */
struct ifreq struct ifreq
{ {
#define IFNAMSIZ 16 #define IFNAMSIZ 16
union union

View File

@ -84,7 +84,7 @@ struct in_addr {
/* Request struct for multicast socket ops */ /* Request struct for multicast socket ops */
struct ip_mreq struct ip_mreq
{ {
struct in_addr imr_multiaddr; /* IP multicast address of group */ struct in_addr imr_multiaddr; /* IP multicast address of group */
struct in_addr imr_interface; /* local IP address of interface */ struct in_addr imr_interface; /* local IP address of interface */
@ -151,13 +151,13 @@ struct sockaddr_in {
#define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000) #define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000)
/* Defines for Multicast INADDR */ /* Defines for Multicast INADDR */
#define INADDR_UNSPEC_GROUP 0xe0000000 /* 224.0.0.0 */ #define INADDR_UNSPEC_GROUP 0xe0000000 /* 224.0.0.0 */
#define INADDR_ALLHOSTS_GROUP 0xe0000001 /* 224.0.0.1 */ #define INADDR_ALLHOSTS_GROUP 0xe0000001 /* 224.0.0.1 */
#define INADDR_MAX_LOCAL_GROUP 0xe00000ff /* 224.0.0.255 */ #define INADDR_MAX_LOCAL_GROUP 0xe00000ff /* 224.0.0.255 */
/* <asm/byteorder.h> contains the htonl type stuff.. */ /* <asm/byteorder.h> contains the htonl type stuff.. */
#include <asm/byteorder.h> #include <asm/byteorder.h>
/* Some random defines to make it easier in the kernel.. */ /* Some random defines to make it easier in the kernel.. */
#ifdef __KERNEL__ #ifdef __KERNEL__
@ -171,7 +171,7 @@ struct sockaddr_in {
* IPv6 definitions as we start to include them. This is just * IPv6 definitions as we start to include them. This is just
* a beginning dont get excited 8) * a beginning dont get excited 8)
*/ */
struct in6_addr struct in6_addr
{ {
unsigned char s6_addr[16]; unsigned char s6_addr[16];

View File

@ -1,9 +1,6 @@
/* /* cygwin/mtio.h header file for Cygwin.
* cygwin/mtio.h header file for Cygwin.
* by C. Vinschen. */
* Original written by H. Bergman for Linux.
* Changed for Cygwin by C. Vinschen.
*/
#ifndef _CYGWIN_MTIO_H #ifndef _CYGWIN_MTIO_H
#define _CYGWIN_MTIO_H #define _CYGWIN_MTIO_H
@ -24,7 +21,7 @@ struct mtop {
/* Magnetic Tape operations [Not all operations supported by all drivers]: */ /* Magnetic Tape operations [Not all operations supported by all drivers]: */
#define MTRESET 0 /* +reset drive in case of problems */ #define MTRESET 0 /* +reset drive in case of problems */
#define MTFSF 1 /* forward space over FileMark, #define MTFSF 1 /* forward space over FileMark,
* position at first record of next file * position at first record of next file
*/ */
#define MTBSF 2 /* backward space FileMark (position before FM) */ #define MTBSF 2 /* backward space FileMark (position before FM) */
#define MTFSR 3 /* forward space record */ #define MTFSR 3 /* forward space record */
@ -67,7 +64,7 @@ struct mtop {
/* structure for MTIOCGET - mag tape get status command */ /* structure for MTIOCGET - mag tape get status command */
struct mtget { struct mtget {
long mt_type; /* type of magtape device long mt_type; /* type of magtape device
* Cygwin: MT_ISUNKNOWN */ * Cygwin: MT_ISUNKNOWN */
long mt_resid; /* residual count: (not sure) long mt_resid; /* residual count: (not sure)
* number of bytes ignored, or * number of bytes ignored, or
@ -95,7 +92,7 @@ struct mtget {
/* structure for MTIOCPOS - mag tape get position command */ /* structure for MTIOCPOS - mag tape get position command */
struct mtpos { struct mtpos {
long mt_blkno; /* current block number */ long mt_blkno; /* current block number */
}; };
@ -116,15 +113,15 @@ struct mtpos {
#define GMT_SM(x) ((x) & 0x10000000) /* DDS setmark */ #define GMT_SM(x) ((x) & 0x10000000) /* DDS setmark */
#define GMT_EOD(x) ((x) & 0x08000000) /* DDS EOD */ #define GMT_EOD(x) ((x) & 0x08000000) /* DDS EOD */
#define GMT_WR_PROT(x) ((x) & 0x04000000) #define GMT_WR_PROT(x) ((x) & 0x04000000)
/* #define GMT_ ? ((x) & 0x02000000) */ /* #define GMT_ ? ((x) & 0x02000000) */
#define GMT_ONLINE(x) ((x) & 0x01000000) #define GMT_ONLINE(x) ((x) & 0x01000000)
#define GMT_D_6250(x) ((x) & 0x00800000) #define GMT_D_6250(x) ((x) & 0x00800000)
#define GMT_D_1600(x) ((x) & 0x00400000) #define GMT_D_1600(x) ((x) & 0x00400000)
#define GMT_D_800(x) ((x) & 0x00200000) #define GMT_D_800(x) ((x) & 0x00200000)
#define GMT_PADDING(x) ((x) & 0x00100000) /* data padding */ #define GMT_PADDING(x) ((x) & 0x00100000) /* data padding */
#define GMT_HW_ECC(x) ((x) & 0x00080000) /* HW error correction */ #define GMT_HW_ECC(x) ((x) & 0x00080000) /* HW error correction */
#define GMT_DR_OPEN(x) ((x) & 0x00040000) /* door open (no tape) */ #define GMT_DR_OPEN(x) ((x) & 0x00040000) /* door open (no tape) */
#define GMT_HW_COMP(x) ((x) & 0x00020000) /* HW compression */ #define GMT_HW_COMP(x) ((x) & 0x00020000) /* HW compression */
#define GMT_IM_REP_EN(x) ((x) & 0x00010000) /* immediate report mode */ #define GMT_IM_REP_EN(x) ((x) & 0x00010000) /* immediate report mode */
/* 16 generic status bits unused */ /* 16 generic status bits unused */

View File

@ -16,17 +16,17 @@ struct sockaddr {
#include <sys/types.h> #include <sys/types.h>
struct linger { struct linger {
unsigned short l_onoff; /* Linger active */ unsigned short l_onoff; /* Linger active */
unsigned short l_linger; /* How long to linger for */ unsigned short l_linger; /* How long to linger for */
}; };
struct msghdr struct msghdr
{ {
void * msg_name; /* Socket name */ void * msg_name; /* Socket name */
int msg_namelen; /* Length of name */ int msg_namelen; /* Length of name */
struct iovec * msg_iov; /* Data blocks */ struct iovec * msg_iov; /* Data blocks */
int msg_iovlen; /* Number of blocks */ int msg_iovlen; /* Number of blocks */
void * msg_accrights; /* Per protocol magic (eg BSD file descriptor passing) */ void * msg_accrights; /* Per protocol magic (eg BSD file descriptor passing) */
int msg_accrightslen; /* Length of rights list */ int msg_accrightslen; /* Length of rights list */
}; };
@ -129,7 +129,7 @@ struct msghdr
#define IP_TTL 7 #define IP_TTL 7
#define IP_TOS 8 #define IP_TOS 8
#define IP_DONTFRAGMENT 9 #define IP_DONTFRAGMENT 9
/* IPX options */ /* IPX options */
#define IPX_TYPE 1 #define IPX_TYPE 1

View File

@ -39,9 +39,9 @@ extern "C" {
#endif #endif
struct option { struct option {
char * name; const char *name;
int has_arg; int has_arg;
int * flag; int *flag;
int val; int val;
}; };

View File

@ -61,7 +61,7 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* /*
* Structures returned by network data base library. All addresses are * Structures returned by network data base library. All addresses are
@ -98,7 +98,7 @@ struct servent {
char *s_proto; /* protocol to use */ char *s_proto; /* protocol to use */
}; };
struct protoent struct protoent
{ {
char *p_name; /* official protocol name */ char *p_name; /* official protocol name */
char **p_aliases; /* alias list */ char **p_aliases; /* alias list */
@ -162,7 +162,7 @@ void setrpcent (int);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#endif /* !_NETDB_H_ */ #endif /* !_NETDB_H_ */

View File

@ -36,7 +36,7 @@ struct IRAPIStreamVtbl
typedef HRESULT (STDAPICALLTYPE RAPIEXT)( typedef HRESULT (STDAPICALLTYPE RAPIEXT)(
DWORD cbInput, // [IN] DWORD cbInput, // [IN]
BYTE *pInput, // [IN] BYTE *pInput, // [IN]
DWORD *pcbOutput, // [OUT] DWORD *pcbOutput, // [OUT]
BYTE **ppOutput, // [OUT] BYTE **ppOutput, // [OUT]
IRAPIStream *pIRAPIStream // [IN] IRAPIStream *pIRAPIStream // [IN]
); );
@ -55,10 +55,10 @@ STDAPI_(BOOL) CeCreateProcess(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES, LPSECURIT
STDAPI CeRapiUninit(); STDAPI CeRapiUninit();
STDAPI_(BOOL) CeWriteFile(HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED); STDAPI_(BOOL) CeWriteFile(HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED);
STDAPI_(HANDLE) CeCreateFile(LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE); STDAPI_(HANDLE) CeCreateFile(LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE);
STDAPI_(BOOL) CeCreateDirectory(LPCWSTR, LPSECURITY_ATTRIBUTES); STDAPI_(BOOL) CeCreateDirectory(LPCWSTR, LPSECURITY_ATTRIBUTES);
STDAPI_(DWORD) CeGetLastError(void); STDAPI_(DWORD) CeGetLastError(void);
STDAPI_(BOOL) CeGetFileTime(HANDLE, LPFILETIME, LPFILETIME, LPFILETIME); STDAPI_(BOOL) CeGetFileTime(HANDLE, LPFILETIME, LPFILETIME, LPFILETIME);
STDAPI_(BOOL) CeCloseHandle(HANDLE); STDAPI_(BOOL) CeCloseHandle(HANDLE);
#endif /* _RAPI_H */ #endif /* _RAPI_H */

View File

@ -1,5 +1,5 @@
This is the file "copying.dj". It does not apply to any sources This is the file "copying.dj". It does not apply to any sources
copyrighted by UCB Berkeley or the Free Software Foundation. copyrighted by UCB Berkeley or the Free Software Foundation.
Copyright Information for sources and executables that are marked Copyright Information for sources and executables that are marked
Copyright (C) DJ Delorie Copyright (C) DJ Delorie
@ -14,18 +14,18 @@ GNU General Public Licence, with the following exceptions:
* Any existing copyright or authorship information in any given source * Any existing copyright or authorship information in any given source
file must remain intact. If you modify a source file, a notice to that file must remain intact. If you modify a source file, a notice to that
effect must be added to the authorship information in the source file. effect must be added to the authorship information in the source file.
* binaries provided in djgpp may be distributed without sources ONLY if * binaries provided in djgpp may be distributed without sources ONLY if
the recipient is given sufficient information to obtain a copy of djgpp the recipient is given sufficient information to obtain a copy of djgpp
themselves. This primarily applies to go32.exe, emu387, stub.exe, and themselves. This primarily applies to go32.exe, emu387, stub.exe, and
the graphics drivers. the graphics drivers.
* modified versions of the binaries provided in djgpp must be * modified versions of the binaries provided in djgpp must be
distributed under the terms of the GPL. distributed under the terms of the GPL.
* objects and libraries linked into an application may be distributed * objects and libraries linked into an application may be distributed
without sources. without sources.
----- -----

View File

@ -1,7 +1,4 @@
/* /* sys/mtio.h header file for Cygwin. */
* sys/mtio.h header file for Cygwin.
*
*/
#ifndef _SYS_MTIO_H #ifndef _SYS_MTIO_H
#define _SYS_MTIO_H #define _SYS_MTIO_H

View File

@ -1,7 +1,4 @@
/* /* sys/procfs.h header file for Cygwin. */
* sys/procfs.h header file for Cygwin.
*
*/
#ifndef _SYS_PROCFS_H #ifndef _SYS_PROCFS_H
#define _SYS_PROCFS_H #define _SYS_PROCFS_H

View File

@ -11,7 +11,7 @@ extern "C" {
#define RUSAGE_CHILDREN -1 /* terminated child processes */ #define RUSAGE_CHILDREN -1 /* terminated child processes */
struct rusage { struct rusage {
struct timeval ru_utime; /* user time used */ struct timeval ru_utime; /* user time used */
struct timeval ru_stime; /* system time used */ struct timeval ru_stime; /* system time used */
long ru_maxrss; long ru_maxrss;
long ru_ixrss; /* XXX: 0 */ long ru_ixrss; /* XXX: 0 */

View File

@ -18,7 +18,7 @@ extern "C"
int getsockname (int, struct sockaddr *__addr, int *); int getsockname (int, struct sockaddr *__addr, int *);
int listen (int, int __n); int listen (int, int __n);
int recv (int, void *__buff, int __len, unsigned int __flags); int recv (int, void *__buff, int __len, unsigned int __flags);
int recvfrom (int, char *__buff, int __len, int __flags, int recvfrom (int, char *__buff, int __len, int __flags,
struct sockaddr *__from, int *__fromlen); struct sockaddr *__from, int *__fromlen);
int send (int, const void *__buff, int __len, unsigned int __flags); int send (int, const void *__buff, int __len, unsigned int __flags);
int sendto (int, const void *, int, unsigned int, const struct sockaddr *, int); int sendto (int, const void *, int, unsigned int, const struct sockaddr *, int);

View File

@ -2,31 +2,31 @@
#define _SYS_LOG_H #define _SYS_LOG_H
#include <sys/cdefs.h> #include <sys/cdefs.h>
#define LOG_EMERG 0 #define LOG_EMERG 0
#define LOG_ALERT 1 #define LOG_ALERT 1
#define LOG_CRIT 2 #define LOG_CRIT 2
#define LOG_ERR 3 #define LOG_ERR 3
#define LOG_WARNING 4 #define LOG_WARNING 4
#define LOG_NOTICE 5 #define LOG_NOTICE 5
#define LOG_INFO 6 #define LOG_INFO 6
#define LOG_DEBUG 7 #define LOG_DEBUG 7
#define LOG_PRIMASK 0x07
#define LOG_PRIMASK 0x07
#define LOG_PRI(p) ((p) & LOG_PRIMASK) #define LOG_PRI(p) ((p) & LOG_PRIMASK)
#define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri)) #define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))
#define LOG_KERN (0<<3) #define LOG_KERN (0<<3)
#define LOG_USER (1<<3) #define LOG_USER (1<<3)
#define LOG_MAIL (2<<3) #define LOG_MAIL (2<<3)
#define LOG_DAEMON (3<<3) #define LOG_DAEMON (3<<3)
#define LOG_AUTH (4<<3) #define LOG_AUTH (4<<3)
#define LOG_SYSLOG (5<<3) #define LOG_SYSLOG (5<<3)
#define LOG_LPR (6<<3) #define LOG_LPR (6<<3)
#define LOG_NEWS (7<<3) #define LOG_NEWS (7<<3)
#define LOG_UUCP (8<<3) #define LOG_UUCP (8<<3)
#define LOG_CRON (9<<3) #define LOG_CRON (9<<3)
#define LOG_AUTHPRIV (10<<3) #define LOG_AUTHPRIV (10<<3)
#define LOG_FTP (11<<3) #define LOG_FTP (11<<3)
/* Codes through 15 are reserved for system use */ /* Codes through 15 are reserved for system use */
@ -40,11 +40,11 @@
#define LOG_LOCAL7 (23<<3) #define LOG_LOCAL7 (23<<3)
#define LOG_NFACILITIES 24 #define LOG_NFACILITIES 24
#define LOG_FACMASK 0x03f8 #define LOG_FACMASK 0x03f8
#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3) #define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
#define LOG_MASK(pri) (1 << (pri)) #define LOG_MASK(pri) (1 << (pri))
#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) #define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1)
/* /*
* Option flags for openlog. * Option flags for openlog.

View File

@ -8,10 +8,10 @@
#define TCIOFF 2 #define TCIOFF 2
#define TCION 3 #define TCION 3
#define TCGETA 5 #define TCGETA 5
#define TCSETA 6 #define TCSETA 6
#define TCSETAW 7 #define TCSETAW 7
#define TCSETAF 8 #define TCSETAF 8
#define TCIFLUSH 0 #define TCIFLUSH 0
#define TCOFLUSH 1 #define TCOFLUSH 1
@ -167,23 +167,23 @@
#define VDISCARD 1 #define VDISCARD 1
#define VEOL 2 #define VEOL 2
#define VEOL2 3 #define VEOL2 3
#define VEOF 4 #define VEOF 4
#define VERASE 5 #define VERASE 5
#define VINTR 6 #define VINTR 6
#define VKILL 7 #define VKILL 7
#define VLNEXT 8 #define VLNEXT 8
#define VMIN 9 #define VMIN 9
#define VQUIT 10 #define VQUIT 10
#define VREPRINT 11 #define VREPRINT 11
#define VSTART 12 #define VSTART 12
#define VSTOP 13 #define VSTOP 13
#define VSUSP 14 #define VSUSP 14
#define VSWTC 15 #define VSWTC 15
#define VTIME 16 #define VTIME 16
#define VWERASE 17 #define VWERASE 17
#define NCCS 18 #define NCCS 18
typedef unsigned char cc_t; typedef unsigned char cc_t;
typedef unsigned int tcflag_t; typedef unsigned int tcflag_t;

View File

@ -6,5 +6,4 @@
#define DAYSPERLYEAR 366 #define DAYSPERLYEAR 366
#define isleap(y) (((y) % 4) == 0 && ((y) % 100) != 0 || ((y) % 400) == 0) #define isleap(y) (((y) % 4) == 0 && ((y) % 100) != 0 || ((y) % 400) == 0)
#endif #endif

View File

@ -65,7 +65,7 @@ _cygwin_crt0_common (MainFunc f, per_process *u)
_impure_ptr = u->impure_ptr; /* Use field initialized in newer DLLs. */ _impure_ptr = u->impure_ptr; /* Use field initialized in newer DLLs. */
else else
u->impure_ptr_ptr = &_impure_ptr; /* Older DLLs need this. */ u->impure_ptr_ptr = &_impure_ptr; /* Older DLLs need this. */
u->forkee = 0; /* This should only be set in dcrt0.cc u->forkee = 0; /* This should only be set in dcrt0.cc
when the process is actually forked */ when the process is actually forked */
u->main = f; u->main = f;

View File

@ -30,5 +30,5 @@ cygwin_crt0 (MainFunc f)
memset (u, 0, sizeof (u)); memset (u, 0, sizeof (u));
(void) _cygwin_crt0_common (f, u); (void) _cygwin_crt0_common (f, u);
} }
dll_crt0__FP11per_process (u); /* Jump into the dll, never to return */ dll_crt0__FP11per_process (u); /* Jump into the dll, never to return */
} }

View File

@ -40,7 +40,7 @@ int opterr = 1; /* if error message should be printed */
int optind = 1; /* index into parent argv vector */ int optind = 1; /* index into parent argv vector */
int optopt; /* character checked for validity */ int optopt; /* character checked for validity */
int optreset; /* reset getopt */ int optreset; /* reset getopt */
char *optarg; /* argument associated with option */ char *optarg; /* argument associated with option */
static char * __progname (char *); static char * __progname (char *);
int getopt_internal (int, char * const *, const char *); int getopt_internal (int, char * const *, const char *);
@ -268,7 +268,7 @@ int test_getopt_long(args, expected_result)
actual_result[pass] = '\0'; actual_result[pass] = '\0';
return(strcmp(actual_result, expected_result)); return(strcmp(actual_result, expected_result));
} }
#if 0 #if 0

View File

@ -346,7 +346,7 @@ static char tzfilehid[] = "@(#)tzfile.h 7.14";
#define TZ_MAGIC "TZif" #define TZ_MAGIC "TZif"
struct tzhead { struct tzhead {
char tzh_magic[4]; /* TZ_MAGIC */ char tzh_magic[4]; /* TZ_MAGIC */
char tzh_reserved[16]; /* reserved for future use */ char tzh_reserved[16]; /* reserved for future use */
char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */ char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */
char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */

View File

@ -125,7 +125,7 @@ cygwin_inet_addr (const char *cp)
/* undocumented in wsock32.dll */ /* undocumented in wsock32.dll */
extern "C" unsigned int WINAPI inet_network (const char *); extern "C" unsigned int WINAPI inet_network (const char *);
extern "C" unsigned int extern "C" unsigned int
cygwin_inet_network (const char *cp) cygwin_inet_network (const char *cp)
{ {
unsigned int res = inet_network (cp); unsigned int res = inet_network (cp);

View File

@ -53,7 +53,7 @@ print_prof (struct profinfo *p)
} }
#endif #endif
/* Everytime we wake up use the main thread pc to hash into the cell in the /* Everytime we wake up use the main thread pc to hash into the cell in the
profile buffer ARG. */ profile buffer ARG. */
static DWORD CALLBACK static DWORD CALLBACK
@ -125,7 +125,7 @@ profile_on (struct profinfo *p)
* *
* profiling goes into the SAMPLES buffer of size SIZE (which is treated * profiling goes into the SAMPLES buffer of size SIZE (which is treated
* as an array of u_shorts of size size/2) * as an array of u_shorts of size size/2)
* *
* each bin represents a range of pc addresses from OFFSET. The number * each bin represents a range of pc addresses from OFFSET. The number
* of pc addresses in a bin depends on SCALE. (A scale of 65536 maps * of pc addresses in a bin depends on SCALE. (A scale of 65536 maps
* each bin to two addresses, A scale of 32768 maps each bin to 4 addresses, * each bin to two addresses, A scale of 32768 maps each bin to 4 addresses,
@ -160,9 +160,9 @@ profile_ctl (struct profinfo * p, char *samples, size_t size,
return 0; return 0;
} }
/* Equivalent to unix profil() /* Equivalent to unix profil()
Every SLEEPTIME interval, the user's program counter (PC) is examined: Every SLEEPTIME interval, the user's program counter (PC) is examined:
offset is subtracted and the result is multiplied by scale. offset is subtracted and the result is multiplied by scale.
The word pointed to by this address is incremented. Buf is unused. */ The word pointed to by this address is incremented. Buf is unused. */
int int

View File

@ -340,7 +340,7 @@ int *flagp;
} }
/* Make a closing node, and hook it on the end. */ /* Make a closing node, and hook it on the end. */
ender = regnode((paren) ? CLOSE+parno : END); ender = regnode((paren) ? CLOSE+parno : END);
regtail(ret, ender); regtail(ret, ender);
/* Hook the tails of the branches to the closing node. */ /* Hook the tails of the branches to the closing node. */
@ -572,7 +572,7 @@ int *flagp;
* On entry, the char at regparse[-1] is going to go * On entry, the char at regparse[-1] is going to go
* into the string, no matter what it is. (It could be * into the string, no matter what it is. (It could be
* following a \ if we are entered from the '\' case.) * following a \ if we are entered from the '\' case.)
* *
* Basic idea is to pick up a good char in ch and * Basic idea is to pick up a good char in ch and
* examine the next char. If it's *+? then we twiddle. * examine the next char. If it's *+? then we twiddle.
* If it's \ then we frozzle. If it's other magic char * If it's \ then we frozzle. If it's other magic char
@ -610,7 +610,7 @@ int *flagp;
goto done; /* and we are done */ goto done; /* and we are done */
case '?': case '+': case '*': case '?': case '+': case '*':
if (!regprev) /* If just ch in str, */ if (!regprev) /* If just ch in str, */
goto magic; /* use it */ goto magic; /* use it */
/* End mult-char string one early */ /* End mult-char string one early */
regparse = regprev; /* Back up parse */ regparse = regprev; /* Back up parse */
@ -627,7 +627,7 @@ int *flagp;
default: default:
/* Backup point is \, scan * point is after it. */ /* Backup point is \, scan * point is after it. */
regprev = regparse; regprev = regparse;
regparse++; regparse++;
continue; /* NOT break; */ continue; /* NOT break; */
} }
} }
@ -949,12 +949,12 @@ char *prog;
} }
break; break;
case ANYOF: case ANYOF:
if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) == NULL) if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) == NULL)
return(0); return(0);
reginput++; reginput++;
break; break;
case ANYBUT: case ANYBUT:
if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) != NULL) if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) != NULL)
return(0); return(0);
reginput++; reginput++;
break; break;
@ -1175,7 +1175,7 @@ regexp *r;
next = regnext(s); next = regnext(s);
if (next == NULL) /* Next ptr. */ if (next == NULL) /* Next ptr. */
printf("(0)"); printf("(0)");
else else
printf("(%d)", (s-r->program)+(next-s)); printf("(%d)", (s-r->program)+(next-s));
s += 3; s += 3;
if (op == ANYOF || op == ANYBUT || op == EXACTLY) { if (op == ANYOF || op == ANYBUT || op == EXACTLY) {

View File

@ -69,11 +69,11 @@ char *dest;
no = *src++ - '0'; no = *src++ - '0';
else else
no = -1; no = -1;
if (no < 0) { /* Ordinary character. */ if (no < 0) { /* Ordinary character. */
if (c == '\\' && (*src == '\\' || *src == '&')) if (c == '\\' && (*src == '\\' || *src == '&'))
c = *src++; c = *src++;
*dst++ = c; *dst++ = c;
} else if (prog->startp[no] != NULL && prog->endp[no] != NULL) { } else if (prog->startp[no] != NULL && prog->endp[no] != NULL) {
len = prog->endp[no] - prog->startp[no]; len = prog->endp[no] - prog->startp[no];
(void) strncpy(dst, prog->startp[no], len); (void) strncpy(dst, prog->startp[no], len);
dst += len; dst += len;

View File

@ -970,7 +970,7 @@ alloc_sd (uid_t uid, gid_t gid, const char *logsrv, int attribute,
other_allow |= FILE_GENERIC_EXECUTE; other_allow |= FILE_GENERIC_EXECUTE;
if (! (attribute & S_ISVTX)) if (! (attribute & S_ISVTX))
other_allow |= FILE_DELETE_CHILD; other_allow |= FILE_DELETE_CHILD;
/* Construct deny attributes for owner and group. */ /* Construct deny attributes for owner and group. */
DWORD owner_deny = 0; DWORD owner_deny = 0;
if (is_grp_member (uid, gid)) if (is_grp_member (uid, gid))

View File

@ -57,7 +57,7 @@ signal (int sig, _sig_func_ptr func)
myself->getsig (sig).sa_handler = func; myself->getsig (sig).sa_handler = func;
myself->getsig (sig).sa_mask = 0; myself->getsig (sig).sa_mask = 0;
set_sigcatchers (prev, func); set_sigcatchers (prev, func);
syscall_printf ("%p = signal (%d, %p)", prev, sig, func); syscall_printf ("%p = signal (%d, %p)", prev, sig, func);
return prev; return prev;
} }

View File

@ -10,7 +10,7 @@ details. */
#include <signal.h> #include <signal.h>
#define EXIT_SIGNAL 0x010000 #define EXIT_SIGNAL 0x010000
#define EXIT_REPARENTING 0x020000 #define EXIT_REPARENTING 0x020000
#define EXIT_NOCLOSEALL 0x040000 #define EXIT_NOCLOSEALL 0x040000

View File

@ -450,7 +450,7 @@ spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv,
/* Replace argv[0] with the full path to the script if this is the /* Replace argv[0] with the full path to the script if this is the
first time through the loop. */ first time through the loop. */
newargv.replace0_maybe (prog_arg); newargv.replace0_maybe (prog_arg);
/* pointers: /* pointers:
* pgm interpreter name * pgm interpreter name
* arg1 optional string * arg1 optional string

View File

@ -71,7 +71,7 @@ sysconf (int in)
SYSTEM_BASIC_INFORMATION sbi; SYSTEM_BASIC_INFORMATION sbi;
if ((ret = NtQuerySystemInformation (SystemBasicInformation, if ((ret = NtQuerySystemInformation (SystemBasicInformation,
(PVOID) &sbi, (PVOID) &sbi,
sizeof sbi, NULL)) sizeof sbi, NULL))
!= STATUS_SUCCESS) != STATUS_SUCCESS)
{ {
__seterrno_from_win_error (RtlNtStatusToDosError (ret)); __seterrno_from_win_error (RtlNtStatusToDosError (ret));

View File

@ -62,7 +62,7 @@ times (struct tms * buf)
syscall_printf ("ticks %d, CLOCKS_PER_SEC %d", ticks, CLOCKS_PER_SEC); syscall_printf ("ticks %d, CLOCKS_PER_SEC %d", ticks, CLOCKS_PER_SEC);
syscall_printf ("user_time %d, kernel_time %d, creation_time %d, exit_time %d", syscall_printf ("user_time %d, kernel_time %d, creation_time %d, exit_time %d",
user_time, kernel_time, creation_time, exit_time); user_time, kernel_time, creation_time, exit_time);
buf->tms_stime = __to_clock_t (&kernel_time, 0); buf->tms_stime = __to_clock_t (&kernel_time, 0);
buf->tms_utime = __to_clock_t (&user_time, 0); buf->tms_utime = __to_clock_t (&user_time, 0);
timeval_to_filetime (&myself->rusage_children.ru_stime, &kernel_time); timeval_to_filetime (&myself->rusage_children.ru_stime, &kernel_time);

View File

@ -105,7 +105,7 @@ internal_getlogin (_pinfo *pi)
DWORD siz; DWORD siz;
char tu[1024]; char tu[1024];
int ret = 0; int ret = 0;
/* Try to get the SID either from already impersonated token /* Try to get the SID either from already impersonated token
or from current process first. To differ that two cases is or from current process first. To differ that two cases is
important, because you can't rely on the user information important, because you can't rely on the user information