* configure.in: Eliminate subdir stuff.
* configure: Regenerate.
* include/getopt.h (option): Make name field 'const'.
+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>
* autoload.cc: New file keeping all autoload stuff.
2000-10-18 DJ Delorie <dj@redhat.com>
* dcrt0.cc (dll_crt0_1): init cygcwd before forkee branch
-
+
* environ.cc (conv_start_chars): Cache a table of "first
characters" for environment variables needing conversion.
(getwinenv): Use it.
(environ_init): Create it, also check first chars for TERM and
CYGWIN.
-
+
* path.cc: Use lookup table for case insensitive comparisons.
Wed Oct 18 00:48:49 2000 Christopher Faylor <cgf@cygnus.com>
*
* So, immediately following the the call to one of the above routines
* 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
* points to an init function which loads the
* DLL, gets the process's load address,
#ifdef __i386__
#if 1
-asm(" .globl _setjmp \n"
+asm(" .globl _setjmp \n"
"_setjmp: \n"
" pushl %ebp \n"
" movl %esp,%ebp \n"
fi
-subdirs="utils doc"
-
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_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
-#line 1675 "configure"
+#line 1673 "configure"
#include "confdefs.h"
#include <string.h>
-void foo(char *s, int c, size_t n)
-{
- __builtin_memset(s, c, n);
+void foo(char *s, int c, size_t n)
+{
+ __builtin_memset(s, c, n);
}
int main() {
; return 0; }
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*
use_builtin_memset=yes
else
if test "${enable_threadsafe+set}" = set; then
enableval="$enable_threadsafe"
case "${enableval}" in
-yes)
+yes)
;;
-runtime)
+runtime)
mt_safe_val=2
MT_SAFE=yes
;;
-no)
+no)
mt_safe_val=0
MT_SAFE=no
PTH_ALLOW=';'
if test "${enable_extra_threadsafe_checking+set}" = set; then
enableval="$enable_extra_threadsafe_checking"
case "${enableval}" in
-yes)
+yes)
mt_safe_val=1
MT_SAFE=yes
cat >> confdefs.h <<\EOF
EOF
;;
-no)
+no)
;;
esac
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=
if test -d ../newlib
if test x"$EXE_LDFLAGS" = x
then
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
-#line 1815 "configure"
+#line 1813 "configure"
#include "confdefs.h"
int main() {
; return 0; }
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*
echo "$ac_t""no" 1>&6
DEF_DLL_ENTRY="dll_entry@12"
ALLOCA="_alloca"
CONFIG_DIR="i386" ;;
- powerpc*) DLL_ENTRY="dll_entry"
- DEF_DLL_ENTRY="dll_entry"
+ powerpc*) DLL_ENTRY="dll_entry"
+ DEF_DLL_ENTRY="dll_entry"
ALLOCA=" __allocate_stack"
CONFIG_DIR="ppc" ;;
*) { echo "configure: error: Invalid target processor \"$target_cpu\"" 1>&2; exit 1; } ;;
s%@WINDRES@%$WINDRES%g
s%@CPP@%$CPP%g
s%@ALLOCA@%$ALLOCA%g
-s%@subdirs@%$subdirs%g
s%@SET_MAKE@%$SET_MAKE%g
s%@MT_SAFE@%$MT_SAFE%g
s%@PTH_ALLOW@%$PTH_ALLOW%g
rm -fr confdefs* $ac_clean_files
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
-
dnl C_SUBST(WINDRES)
AC_ALLOCA
-AC_CONFIG_SUBDIRS(utils doc)
AC_PROG_MAKE_SET
dnl check whether gcc supports __builtin_memset.
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
#include <string.h>
-void foo(char *s, int c, size_t n)
-{
- __builtin_memset(s, c, n);
+void foo(char *s, int c, size_t n)
+{
+ __builtin_memset(s, c, n);
}
], [ ],
use_builtin_memset=yes, use_builtin_memset=no)
AC_ARG_ENABLE(threadsafe,
[ --enable-threadsafe=[runtime] Build a cygwin DLL which is thread safe],
[case "${enableval}" in
-yes)
+yes)
dnl default.
;;
-runtime)
+runtime)
mt_safe_val=2
MT_SAFE=yes
;;
-no)
+no)
mt_safe_val=0
MT_SAFE=no
PTH_ALLOW=';'
AC_ARG_ENABLE(extra-threadsafe-checking,
[ --enable-extra-threadsafe-checking Build a cygwin DLL which is thread safe with extra consistency checking],
[case "${enableval}" in
-yes)
+yes)
mt_safe_val=1
MT_SAFE=yes
AC_DEFINE(_CYG_THREAD_FAILSAFE)
;;
-no)
+no)
dnl Don't do anything here to avoid overriding --enable-threadsafe.
;;
esac
dnl
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 not compatible. Check and warn for installed newlib only if it's not
-dnl part of the build tree.
+dnl not compatible. Check and warn for installed newlib only if it's not
+dnl part of the build tree.
dnl
AC_MSG_CHECKING([if newlib is part of the build tree])
case "$target_cpu" in
i386|i486|i586|i686) DLL_ENTRY="_dll_entry@12"
DEF_DLL_ENTRY="dll_entry@12"
- ALLOCA="_alloca"
+ ALLOCA="_alloca"
CONFIG_DIR="i386" ;;
- powerpc*) DLL_ENTRY="dll_entry"
- DEF_DLL_ENTRY="dll_entry"
+ powerpc*) DLL_ENTRY="dll_entry"
+ DEF_DLL_ENTRY="dll_entry"
ALLOCA=" __allocate_stack"
CONFIG_DIR="ppc" ;;
*) AC_MSG_ERROR(Invalid target processor \"$target_cpu\") ;;
int try2 = 0;
dll d;
- void *next = first;
+ void *next = first;
while (next)
{
DWORD nb;
all of cygwin's internal structures may have been set up. */
if (!d || (cygwin_finished_initializing && !d->init ()))
return -1;
-
+
return (DWORD) d;
}
{
const char * const *envp;
for (envp = in_envp; *envp; envp++)
- if (debug_print)
+ if (debug_print)
debug_printf ("%s", *envp);
return (1 + envp - in_envp) * sizeof (const char *);
}
void dump ();
} ;
-
+
class fhandler_dev_clipboard: public fhandler_base
{
public:
HGLOBAL hglb;
LPSTR lpstr;
int ret;
-
+
if (!clipboard_eof)
{
OpenClipboard(0);
case SEEK_SET:
pos = offset;
break;
-
+
case SEEK_CUR:
pos += offset;
break;
pos = mem_size;
pos += offset;
break;
-
+
default:
set_errno (EINVAL);
return (off_t) -1;
phys.QuadPart = (ULONGLONG) off;
if ((ret = NtMapViewOfSection (h,
- INVALID_HANDLE_VALUE,
+ INVALID_HANDLE_VALUE,
&base,
0L,
dlen,
set_cb (sizeof *this);
set_need_fork_fixup ();
prot_info_ptr = (LPWSAPROTOCOL_INFOA) cmalloc (HEAP_BUF,
- sizeof (WSAPROTOCOL_INFOA));
+ sizeof (WSAPROTOCOL_INFOA));
}
fhandler_socket::~fhandler_socket ()
* GLOB_TILDE:
* expand ~user/foo to the /home/dir/of/user/foo
* GLOB_BRACE:
- * expand {1,2}{a,b} to 1a 1b 2a 2b
+ * expand {1,2}{a,b} to 1a 1b 2a 2b
* gl_matchc:
* Number of matches in the current invocation of glob.
*/
bufend = bufnext + MAXPATHLEN;
if (flags & GLOB_QUOTE) {
/* Protect the quoted characters. */
- while (bufnext < bufend && (c = *patnext++) != EOS)
+ while (bufnext < bufend && (c = *patnext++) != EOS)
if (c == QUOTE) {
if ((c = *patnext++) == EOS) {
c = QUOTE;
else
*bufnext++ = c;
}
- else
- while (bufnext < bufend && (c = *patnext++) != EOS)
+ else
+ while (bufnext < bufend && (c = *patnext++) != EOS)
*bufnext++ = c;
*bufnext = EOS;
for (pm = pe++; *pe != RBRACKET && *pe != EOS; pe++)
continue;
if (*pe == EOS) {
- /*
+ /*
* We could not find a matching RBRACKET.
* Ignore and just look for RBRACE
*/
for (pl = pm++; *pm != RBRACKET && *pm != EOS; pm++)
continue;
if (*pm == EOS) {
- /*
+ /*
* We could not find a matching RBRACKET.
* Ignore and just look for RBRACE
*/
/* Append the current string */
for (lm = ls; (pl < pm); *lm++ = *pl++)
continue;
- /*
+ /*
* Append the rest of the pattern after the
* closing brace
*/
return pattern;
/* 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++)
continue;
*h = 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
*/
if ((h = getenv("HOME")) == NULL) {
/* Copy the home directory */
for (b = patbuf; *h; *b++ = *h++)
continue;
-
+
/* Append the rest of the pattern */
while ((*b++ = *p++) != EOS)
continue;
return patbuf;
}
-
+
/*
* The main glob() routine: compiles the pattern (optionally processing
break;
case STAR:
pglob->gl_flags |= GLOB_MAGCHAR;
- /* collapse adjacent stars to one,
+ /* collapse adjacent stars to one,
* to avoid exponential behavior
*/
if (bufnext == patbuf || bufnext[-1] != M_ALL)
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
* and the pattern did not contain any magic characters
* GLOB_NOMAGIC is there just for compatibility with csh.
*/
- if (pglob->gl_pathc == oldpathc &&
- ((pglob->gl_flags & GLOB_NOCHECK) ||
+ if (pglob->gl_pathc == oldpathc &&
+ ((pglob->gl_flags & GLOB_NOCHECK) ||
((pglob->gl_flags & GLOB_NOMAGIC) &&
!(pglob->gl_flags & GLOB_MAGCHAR))))
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,
pglob->gl_pathc - oldpathc, sizeof(char *), compare);
return(0);
*pathend = EOS;
if (g_lstat(pathbuf, &sb, pglob))
return(0);
-
+
if (((pglob->gl_flags & GLOB_MARK) &&
pathend[-1] != SEP) && (S_ISDIR(sb.st_mode)
|| (S_ISLNK(sb.st_mode) &&
*pathend = EOS;
errno = 0;
-
+
if ((dirp = g_opendir(pathbuf, pglob)) == NULL) {
/* TODO: don't call for ENOENT or ENOTDIR? */
if (pglob->gl_errfunc) {
/* Initial DOT must be matched literally. */
if (dp->d_name[0] == DOT && *pattern != DOT)
continue;
- for (sc = (u_char *) dp->d_name, dc = pathend;
+ for (sc = (u_char *) dp->d_name, dc = pathend;
(*dc++ = *sc++) != EOS;)
continue;
if (!match(pathend, pattern, restpattern)) {
const Char *p;
newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs);
- pathv = pglob->gl_pathv ?
+ pathv = pglob->gl_pathv ?
realloc((char *)pglob->gl_pathv, newsize) :
malloc(newsize);
if (pathv == NULL)
case M_ALL:
if (pat == patend)
return(1);
- do
+ do
if (match(name, pat, patend))
return(1);
while (*name++ != EOS);
}
#ifdef DEBUG
-static void
+static void
qprintf(str, s)
const char *str;
register Char *s;
#define TELOPT_STATUS 5 /* give status */
#define TELOPT_TM 6 /* timing mark */
#define TELOPT_RCTE 7 /* remote controlled transmission and echo */
-#define TELOPT_NAOL 8 /* negotiate about output line width */
-#define TELOPT_NAOP 9 /* negotiate about output page size */
+#define TELOPT_NAOL 8 /* negotiate about output line width */
+#define TELOPT_NAOP 9 /* negotiate about output page size */
#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */
#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */
#define TELOPT_ENCRYPT 38 /* Encryption option */
#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */
#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)
#ifdef TELOPTS
#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
#define SO_DONTLINGER (u_int)(~SO_LINGER)
-/*
- * Additional options.
- */
-#define SO_SNDBUF 0x1001 /* send buffer size */
-#define SO_RCVBUF 0x1002 /* receive buffer size */
-#define SO_SNDLOWAT 0x1003 /* send low-water mark */
-#define SO_RCVLOWAT 0x1004 /* receive low-water mark */
-#define SO_SNDTIMEO 0x1005 /* send timeout */
-#define SO_RCVTIMEO 0x1006 /* receive timeout */
-#define SO_ERROR 0x1007 /* get error status and clear */
-#define SO_TYPE 0x1008 /* get socket type */
+/*
+ * Additional options.
+ */
+#define SO_SNDBUF 0x1001 /* send buffer size */
+#define SO_RCVBUF 0x1002 /* receive buffer size */
+#define SO_SNDLOWAT 0x1003 /* send low-water mark */
+#define SO_RCVLOWAT 0x1004 /* receive low-water mark */
+#define SO_SNDTIMEO 0x1005 /* send timeout */
+#define SO_RCVTIMEO 0x1006 /* receive timeout */
+#define SO_ERROR 0x1007 /* get error status and clear */
+#define SO_TYPE 0x1008 /* get socket type */
#endif /* _ASM_SOCKET_H */
#ifdef __cplusplus
#define CDECL_BEGIN extern "C" {
-#define CDECL_END }
+#define CDECL_END }
#else
#define CDECL_BEGIN
#define CDECL_END
int WINAPI Entry (HINSTANCE h, DWORD reason, void *ptr); \
typedef int (*mainfunc) (int, char **, char **); \
extern int cygwin_attach_dll (HMODULE, mainfunc); \
- extern void cygwin_detach_dll (DWORD); \
+ extern void cygwin_detach_dll (DWORD); \
CDECL_END \
\
static HINSTANCE storedHandle; \
storedHandle = h; \
storedReason = reason; \
storedPtr = ptr; \
- dll_index = cygwin_attach_dll (h, &__dllMain); \
+ dll_index = cygwin_attach_dll (h, &__dllMain); \
if (dll_index == (DWORD) -1) \
ret = 0; \
} \
ret = Entry (h, reason, ptr); \
if (ret) \
{ \
- cygwin_detach_dll (dll_index); \
+ cygwin_detach_dll (dll_index); \
dll_index = (DWORD) -1; \
} \
} \
break; \
- \
+ \
case DLL_THREAD_ATTACH: \
{ \
ret = Entry (h, reason, ptr); \
* remainder may be interface specific.
*/
-struct ifreq
+struct ifreq
{
#define IFNAMSIZ 16
union
/* 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_interface; /* local IP address of interface */
#define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000)
/* Defines for Multicast INADDR */
-#define INADDR_UNSPEC_GROUP 0xe0000000 /* 224.0.0.0 */
-#define INADDR_ALLHOSTS_GROUP 0xe0000001 /* 224.0.0.1 */
+#define INADDR_UNSPEC_GROUP 0xe0000000 /* 224.0.0.0 */
+#define INADDR_ALLHOSTS_GROUP 0xe0000001 /* 224.0.0.1 */
#define INADDR_MAX_LOCAL_GROUP 0xe00000ff /* 224.0.0.255 */
/* <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.. */
#ifdef __KERNEL__
* IPv6 definitions as we start to include them. This is just
* a beginning dont get excited 8)
*/
-
+
struct in6_addr
{
unsigned char s6_addr[16];
-/*
- * cygwin/mtio.h header file for Cygwin.
- *
- * Original written by H. Bergman for Linux.
- * Changed for Cygwin by C. Vinschen.
- */
+/* cygwin/mtio.h header file for Cygwin.
+
+ by C. Vinschen. */
#ifndef _CYGWIN_MTIO_H
#define _CYGWIN_MTIO_H
/* Magnetic Tape operations [Not all operations supported by all drivers]: */
#define MTRESET 0 /* +reset drive in case of problems */
#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 MTFSR 3 /* forward space record */
/* structure for MTIOCGET - mag tape get status command */
struct mtget {
- long mt_type; /* type of magtape device
+ long mt_type; /* type of magtape device
* Cygwin: MT_ISUNKNOWN */
long mt_resid; /* residual count: (not sure)
* number of bytes ignored, or
/* structure for MTIOCPOS - mag tape get position command */
struct mtpos {
- long mt_blkno; /* current block number */
+ long mt_blkno; /* current block number */
};
#define GMT_SM(x) ((x) & 0x10000000) /* DDS setmark */
#define GMT_EOD(x) ((x) & 0x08000000) /* DDS EOD */
#define GMT_WR_PROT(x) ((x) & 0x04000000)
-/* #define GMT_ ? ((x) & 0x02000000) */
+/* #define GMT_ ? ((x) & 0x02000000) */
#define GMT_ONLINE(x) ((x) & 0x01000000)
#define GMT_D_6250(x) ((x) & 0x00800000)
#define GMT_D_1600(x) ((x) & 0x00400000)
#define GMT_D_800(x) ((x) & 0x00200000)
-#define GMT_PADDING(x) ((x) & 0x00100000) /* data padding */
-#define GMT_HW_ECC(x) ((x) & 0x00080000) /* HW error correction */
+#define GMT_PADDING(x) ((x) & 0x00100000) /* data padding */
+#define GMT_HW_ECC(x) ((x) & 0x00080000) /* HW error correction */
#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 */
/* 16 generic status bits unused */
#include <sys/types.h>
struct linger {
- unsigned short l_onoff; /* Linger active */
+ unsigned short l_onoff; /* Linger active */
unsigned short l_linger; /* How long to linger for */
};
-struct msghdr
+struct msghdr
{
void * msg_name; /* Socket name */
int msg_namelen; /* Length of name */
struct iovec * msg_iov; /* Data blocks */
- int msg_iovlen; /* Number of blocks */
- void * msg_accrights; /* Per protocol magic (eg BSD file descriptor passing) */
+ int msg_iovlen; /* Number of blocks */
+ void * msg_accrights; /* Per protocol magic (eg BSD file descriptor passing) */
int msg_accrightslen; /* Length of rights list */
};
#define IP_TTL 7
#define IP_TOS 8
#define IP_DONTFRAGMENT 9
-
+
/* IPX options */
#define IPX_TYPE 1
#endif
struct option {
- char * name;
+ const char *name;
int has_arg;
- int * flag;
+ int *flag;
int val;
};
#ifdef __cplusplus
extern "C" {
-#endif
+#endif
/*
* Structures returned by network data base library. All addresses are
char *s_proto; /* protocol to use */
};
-struct protoent
+struct protoent
{
char *p_name; /* official protocol name */
char **p_aliases; /* alias list */
#ifdef __cplusplus
};
-#endif
+#endif
#endif /* !_NETDB_H_ */
typedef HRESULT (STDAPICALLTYPE RAPIEXT)(
DWORD cbInput, // [IN]
BYTE *pInput, // [IN]
- DWORD *pcbOutput, // [OUT]
+ DWORD *pcbOutput, // [OUT]
BYTE **ppOutput, // [OUT]
IRAPIStream *pIRAPIStream // [IN]
);
STDAPI CeRapiUninit();
STDAPI_(BOOL) CeWriteFile(HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED);
-STDAPI_(HANDLE) CeCreateFile(LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE);
-STDAPI_(BOOL) CeCreateDirectory(LPCWSTR, LPSECURITY_ATTRIBUTES);
+STDAPI_(HANDLE) CeCreateFile(LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE);
+STDAPI_(BOOL) CeCreateDirectory(LPCWSTR, LPSECURITY_ATTRIBUTES);
STDAPI_(DWORD) CeGetLastError(void);
-STDAPI_(BOOL) CeGetFileTime(HANDLE, LPFILETIME, LPFILETIME, LPFILETIME);
-STDAPI_(BOOL) CeCloseHandle(HANDLE);
+STDAPI_(BOOL) CeGetFileTime(HANDLE, LPFILETIME, LPFILETIME, LPFILETIME);
+STDAPI_(BOOL) CeCloseHandle(HANDLE);
#endif /* _RAPI_H */
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 (C) DJ Delorie
* Any existing copyright or authorship information in any given source
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
the recipient is given sufficient information to obtain a copy of djgpp
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
-distributed under the terms of the GPL.
+distributed under the terms of the GPL.
* objects and libraries linked into an application may be distributed
-without sources.
+without sources.
-----
-/*
- * sys/mtio.h header file for Cygwin.
- *
- */
+/* sys/mtio.h header file for Cygwin. */
#ifndef _SYS_MTIO_H
#define _SYS_MTIO_H
-/*
- * sys/procfs.h header file for Cygwin.
- *
- */
+/* sys/procfs.h header file for Cygwin. */
#ifndef _SYS_PROCFS_H
#define _SYS_PROCFS_H
#define RUSAGE_CHILDREN -1 /* terminated child processes */
struct rusage {
- struct timeval ru_utime; /* user time used */
+ struct timeval ru_utime; /* user time used */
struct timeval ru_stime; /* system time used */
long ru_maxrss;
long ru_ixrss; /* XXX: 0 */
int getsockname (int, struct sockaddr *__addr, int *);
int listen (int, int __n);
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);
int send (int, const void *__buff, int __len, unsigned int __flags);
int sendto (int, const void *, int, unsigned int, const struct sockaddr *, int);
#define _SYS_LOG_H
#include <sys/cdefs.h>
-#define LOG_EMERG 0
-#define LOG_ALERT 1
-#define LOG_CRIT 2
-#define LOG_ERR 3
-#define LOG_WARNING 4
-#define LOG_NOTICE 5
-#define LOG_INFO 6
-#define LOG_DEBUG 7
+#define LOG_EMERG 0
+#define LOG_ALERT 1
+#define LOG_CRIT 2
+#define LOG_ERR 3
+#define LOG_WARNING 4
+#define LOG_NOTICE 5
+#define LOG_INFO 6
+#define LOG_DEBUG 7
+
+#define LOG_PRIMASK 0x07
-#define LOG_PRIMASK 0x07
-
#define LOG_PRI(p) ((p) & LOG_PRIMASK)
#define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))
-#define LOG_KERN (0<<3)
-#define LOG_USER (1<<3)
-#define LOG_MAIL (2<<3)
-#define LOG_DAEMON (3<<3)
-#define LOG_AUTH (4<<3)
-#define LOG_SYSLOG (5<<3)
-#define LOG_LPR (6<<3)
-#define LOG_NEWS (7<<3)
-#define LOG_UUCP (8<<3)
-#define LOG_CRON (9<<3)
-#define LOG_AUTHPRIV (10<<3)
+#define LOG_KERN (0<<3)
+#define LOG_USER (1<<3)
+#define LOG_MAIL (2<<3)
+#define LOG_DAEMON (3<<3)
+#define LOG_AUTH (4<<3)
+#define LOG_SYSLOG (5<<3)
+#define LOG_LPR (6<<3)
+#define LOG_NEWS (7<<3)
+#define LOG_UUCP (8<<3)
+#define LOG_CRON (9<<3)
+#define LOG_AUTHPRIV (10<<3)
#define LOG_FTP (11<<3)
/* Codes through 15 are reserved for system use */
#define LOG_LOCAL7 (23<<3)
#define LOG_NFACILITIES 24
-#define LOG_FACMASK 0x03f8
+#define LOG_FACMASK 0x03f8
#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
-#define LOG_MASK(pri) (1 << (pri))
-#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1)
+#define LOG_MASK(pri) (1 << (pri))
+#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1)
/*
* Option flags for openlog.
#define TCIOFF 2
#define TCION 3
-#define TCGETA 5
-#define TCSETA 6
-#define TCSETAW 7
-#define TCSETAF 8
+#define TCGETA 5
+#define TCSETA 6
+#define TCSETAW 7
+#define TCSETAF 8
#define TCIFLUSH 0
#define TCOFLUSH 1
#define VDISCARD 1
#define VEOL 2
-#define VEOL2 3
+#define VEOL2 3
#define VEOF 4
#define VERASE 5
#define VINTR 6
#define VKILL 7
-#define VLNEXT 8
+#define VLNEXT 8
#define VMIN 9
#define VQUIT 10
-#define VREPRINT 11
+#define VREPRINT 11
#define VSTART 12
#define VSTOP 13
#define VSUSP 14
-#define VSWTC 15
+#define VSWTC 15
#define VTIME 16
-#define VWERASE 17
+#define VWERASE 17
-#define NCCS 18
+#define NCCS 18
typedef unsigned char cc_t;
typedef unsigned int tcflag_t;
#define DAYSPERLYEAR 366
#define isleap(y) (((y) % 4) == 0 && ((y) % 100) != 0 || ((y) % 400) == 0)
-#endif
-
+#endif
_impure_ptr = u->impure_ptr; /* Use field initialized in newer DLLs. */
else
u->impure_ptr_ptr = &_impure_ptr; /* Older DLLs need this. */
-
+
u->forkee = 0; /* This should only be set in dcrt0.cc
when the process is actually forked */
u->main = f;
memset (u, 0, sizeof (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 */
}
int optind = 1; /* index into parent argv vector */
int optopt; /* character checked for validity */
int optreset; /* reset getopt */
-char *optarg; /* argument associated with option */
+char *optarg; /* argument associated with option */
static char * __progname (char *);
int getopt_internal (int, char * const *, const char *);
actual_result[pass] = '\0';
return(strcmp(actual_result, expected_result));
-
+
}
#if 0
#define TZ_MAGIC "TZif"
struct tzhead {
- char tzh_magic[4]; /* TZ_MAGIC */
+ char tzh_magic[4]; /* TZ_MAGIC */
char tzh_reserved[16]; /* reserved for future use */
char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */
char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */
/* undocumented in wsock32.dll */
extern "C" unsigned int WINAPI inet_network (const char *);
-extern "C" unsigned int
+extern "C" unsigned int
cygwin_inet_network (const char *cp)
{
unsigned int res = inet_network (cp);
}
#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. */
static DWORD CALLBACK
*
* profiling goes into the SAMPLES buffer of size SIZE (which is treated
* as an array of u_shorts of size size/2)
- *
+ *
* 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
* each bin to two addresses, A scale of 32768 maps each bin to 4 addresses,
return 0;
}
-/* Equivalent to unix profil()
- Every SLEEPTIME interval, the user's program counter (PC) is examined:
- offset is subtracted and the result is multiplied by scale.
+/* Equivalent to unix profil()
+ Every SLEEPTIME interval, the user's program counter (PC) is examined:
+ offset is subtracted and the result is multiplied by scale.
The word pointed to by this address is incremented. Buf is unused. */
int
}
/* 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);
/* Hook the tails of the branches to the closing node. */
* On entry, the char at regparse[-1] is going to go
* into the string, no matter what it is. (It could be
* following a \ if we are entered from the '\' case.)
- *
+ *
* Basic idea is to pick up a good char in ch and
* examine the next char. If it's *+? then we twiddle.
* If it's \ then we frozzle. If it's other magic char
goto done; /* and we are done */
case '?': case '+': case '*':
- if (!regprev) /* If just ch in str, */
+ if (!regprev) /* If just ch in str, */
goto magic; /* use it */
/* End mult-char string one early */
regparse = regprev; /* Back up parse */
default:
/* Backup point is \, scan * point is after it. */
regprev = regparse;
- regparse++;
+ regparse++;
continue; /* NOT break; */
}
}
}
break;
case ANYOF:
- if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) == NULL)
+ if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) == NULL)
return(0);
reginput++;
break;
case ANYBUT:
- if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) != NULL)
+ if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) != NULL)
return(0);
reginput++;
break;
next = regnext(s);
if (next == NULL) /* Next ptr. */
printf("(0)");
- else
+ else
printf("(%d)", (s-r->program)+(next-s));
s += 3;
if (op == ANYOF || op == ANYBUT || op == EXACTLY) {
no = *src++ - '0';
else
no = -1;
- if (no < 0) { /* Ordinary character. */
- if (c == '\\' && (*src == '\\' || *src == '&'))
- c = *src++;
- *dst++ = c;
- } else if (prog->startp[no] != NULL && prog->endp[no] != NULL) {
+ if (no < 0) { /* Ordinary character. */
+ if (c == '\\' && (*src == '\\' || *src == '&'))
+ c = *src++;
+ *dst++ = c;
+ } else if (prog->startp[no] != NULL && prog->endp[no] != NULL) {
len = prog->endp[no] - prog->startp[no];
(void) strncpy(dst, prog->startp[no], len);
dst += len;
other_allow |= FILE_GENERIC_EXECUTE;
if (! (attribute & S_ISVTX))
other_allow |= FILE_DELETE_CHILD;
-
+
/* Construct deny attributes for owner and group. */
DWORD owner_deny = 0;
if (is_grp_member (uid, gid))
myself->getsig (sig).sa_handler = func;
myself->getsig (sig).sa_mask = 0;
set_sigcatchers (prev, func);
-
+
syscall_printf ("%p = signal (%d, %p)", prev, sig, func);
return prev;
}
#include <signal.h>
-#define EXIT_SIGNAL 0x010000
+#define EXIT_SIGNAL 0x010000
#define EXIT_REPARENTING 0x020000
#define EXIT_NOCLOSEALL 0x040000
/* Replace argv[0] with the full path to the script if this is the
first time through the loop. */
newargv.replace0_maybe (prog_arg);
-
+
/* pointers:
* pgm interpreter name
* arg1 optional string
SYSTEM_BASIC_INFORMATION sbi;
if ((ret = NtQuerySystemInformation (SystemBasicInformation,
(PVOID) &sbi,
- sizeof sbi, NULL))
+ sizeof sbi, NULL))
!= STATUS_SUCCESS)
{
__seterrno_from_win_error (RtlNtStatusToDosError (ret));
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",
- 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_utime = __to_clock_t (&user_time, 0);
timeval_to_filetime (&myself->rusage_children.ru_stime, &kernel_time);
DWORD siz;
char tu[1024];
int ret = 0;
-
+
/* Try to get the SID either from already impersonated token
or from current process first. To differ that two cases is
important, because you can't rely on the user information