mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 21:09:22 +08:00
* winsup.h: take out protections of environ, errno, allow C use
* *.cc: put winsup.h before other headers (for __INSIDE_CYGWIN__); use cur_environ() instead of just environ * times.cc: remove import protections * glob.c: add winsup.h * localtime.c: ditto * smallprint.c: ditto * Makefile.in: don't __INSIDE_CYGWIN__ as it messes up profiling.
This commit is contained in:
parent
ad8dea13f0
commit
4c8d72ded5
@ -1,3 +1,14 @@
|
||||
2000-08-02 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* winsup.h: take out protections of environ, errno, allow C use
|
||||
* *.cc: put winsup.h before other headers (for __INSIDE_CYGWIN__);
|
||||
use cur_environ() instead of just environ
|
||||
* times.cc: remove import protections
|
||||
* glob.c: add winsup.h
|
||||
* localtime.c: ditto
|
||||
* smallprint.c: ditto
|
||||
* Makefile.in: don't __INSIDE_CYGWIN__ as it messes up profiling.
|
||||
|
||||
Wed Aug 2 11:22:53 2000 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
* include/sys/strace.h: Fix strace definition.
|
||||
|
@ -71,8 +71,6 @@ include $(srcdir)/../Makefile.common
|
||||
|
||||
INSTALL_DATA:=$(SHELL) $(updir1)/install-sh -c
|
||||
|
||||
COMPILE_CC+=-D__INSIDE_CYGWIN__
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Setup the testing framework, if you have one
|
||||
|
@ -8,9 +8,9 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include "winsup.h"
|
||||
#include "glob.h"
|
||||
#include "exceptions.h"
|
||||
#include "dll_init.h"
|
||||
|
@ -8,11 +8,11 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
|
||||
#define _COMPILING_NEWLIB
|
||||
#include "dirent.h"
|
||||
|
@ -8,10 +8,10 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "winsup.h"
|
||||
#include <ctype.h>
|
||||
#include "dlfcn.h"
|
||||
#include "dll_init.h"
|
||||
|
@ -6,8 +6,8 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "winsup.h"
|
||||
#include <stdlib.h>
|
||||
#include "exceptions.h"
|
||||
#include "dll_init.h"
|
||||
|
||||
|
@ -10,6 +10,8 @@ details. */
|
||||
|
||||
#define __INSIDE_CYGWIN_NET__
|
||||
|
||||
#define Win32_Winsock
|
||||
#include "winsup.h"
|
||||
#include <errno.h>
|
||||
#include <sys/socket.h>
|
||||
#include <stdlib.h>
|
||||
@ -17,8 +19,6 @@ details. */
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#define Win32_Winsock
|
||||
#include "winsup.h"
|
||||
#include <winsock.h>
|
||||
|
||||
hinfo dtable;
|
||||
|
@ -7,9 +7,9 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include "winsup.h"
|
||||
#include <stddef.h>
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
@ -83,7 +83,7 @@ getwinenv (const char *env, const char *in_posix)
|
||||
{
|
||||
win_env *we = conv_envvars + i;
|
||||
const char *val;
|
||||
if (!environ || !(val = in_posix ?: getenv(we->name)))
|
||||
if (!cur_environ () || !(val = in_posix ?: getenv(we->name)))
|
||||
debug_printf ("can't set native for %s since no environ yet",
|
||||
we->name);
|
||||
else if (!envcache || !we->posix || strcmp (val, we->posix))
|
||||
@ -146,11 +146,11 @@ my_findenv (const char *name, int *offset)
|
||||
len++;
|
||||
}
|
||||
|
||||
for (p = environ; *p; ++p)
|
||||
for (p = cur_environ (); *p; ++p)
|
||||
if (!strncmp (*p, name, len))
|
||||
if (*(c = *p + len) == '=')
|
||||
{
|
||||
*offset = p - environ;
|
||||
*offset = p - cur_environ ();
|
||||
return (char *) (++c);
|
||||
}
|
||||
return NULL;
|
||||
@ -199,13 +199,13 @@ _addenv (const char *name, const char *value, int overwrite)
|
||||
char **env;
|
||||
|
||||
/* Search for the end of the environment. */
|
||||
for (env = environ; *env; env++)
|
||||
for (env = cur_environ (); *env; env++)
|
||||
continue;
|
||||
|
||||
offset = env - environ; /* Number of elements currently in environ. */
|
||||
offset = env - cur_environ (); /* Number of elements currently in environ. */
|
||||
|
||||
/* Allocate space for additional element plus terminating NULL. */
|
||||
__cygwin_environ = (char **) realloc (environ, (sizeof (char *) *
|
||||
__cygwin_environ = (char **) realloc (cur_environ (), (sizeof (char *) *
|
||||
(offset + 2)));
|
||||
if (!__cygwin_environ)
|
||||
return -1; /* Oops. No more memory. */
|
||||
@ -216,7 +216,7 @@ _addenv (const char *name, const char *value, int overwrite)
|
||||
|
||||
char *envhere;
|
||||
if (!issetenv)
|
||||
envhere = environ[offset] = (char *) name; /* Not setenv. Just
|
||||
envhere = cur_environ ()[offset] = (char *) name; /* Not setenv. Just
|
||||
overwrite existing. */
|
||||
else
|
||||
{ /* setenv */
|
||||
@ -226,7 +226,7 @@ _addenv (const char *name, const char *value, int overwrite)
|
||||
|
||||
int namelen = p - name; /* Length of name. */
|
||||
/* Allocate enough space for name + '=' + value + '\0' */
|
||||
envhere = environ[offset] = (char *) malloc (namelen + valuelen + 2);
|
||||
envhere = cur_environ ()[offset] = (char *) malloc (namelen + valuelen + 2);
|
||||
if (!envhere)
|
||||
return -1; /* Oops. No more memory. */
|
||||
|
||||
@ -308,7 +308,7 @@ unsetenv (const char *name)
|
||||
|
||||
while (my_findenv (name, &offset)) /* if set multiple times */
|
||||
/* Move up the rest of the array */
|
||||
for (e = environ + offset; ; e++)
|
||||
for (e = cur_environ () + offset; ; e++)
|
||||
if (!(*e = *(e + 1)))
|
||||
break;
|
||||
}
|
||||
|
@ -8,9 +8,9 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#define _REENT_ONLY
|
||||
#include <stdio.h>
|
||||
#include "winsup.h"
|
||||
#include <errno.h>
|
||||
|
||||
/* Table to map Windows error codes to Errno values. */
|
||||
|
@ -8,11 +8,11 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#define Win32_Winsock
|
||||
#include "winsup.h"
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define Win32_Winsock
|
||||
#include "winsup.h"
|
||||
#include "exceptions.h"
|
||||
#include <imagehlp.h>
|
||||
|
||||
|
@ -8,11 +8,11 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <process.h>
|
||||
#include "winsup.h"
|
||||
|
||||
/* This is called _execve and not execve because the real execve is defined
|
||||
in libc/posix/execve.c. It calls us. */
|
||||
@ -44,7 +44,7 @@ execl (const char *path, const char *arg0, ...)
|
||||
while (argv[i++] != NULL);
|
||||
va_end (args);
|
||||
MALLOC_CHECK;
|
||||
return _execve (path, (char * const *) argv, environ);
|
||||
return _execve (path, (char * const *) argv, cur_environ ());
|
||||
}
|
||||
|
||||
extern "C"
|
||||
@ -52,7 +52,7 @@ int
|
||||
execv (const char *path, char * const *argv)
|
||||
{
|
||||
MALLOC_CHECK;
|
||||
return _execve (path, (char * const *) argv, environ);
|
||||
return _execve (path, (char * const *) argv, cur_environ ());
|
||||
}
|
||||
|
||||
/* the same as a standard exec() calls family, but with NT security support */
|
||||
@ -85,7 +85,7 @@ sexecl (HANDLE hToken, const char *path, const char *arg0, ...)
|
||||
va_end (args);
|
||||
|
||||
MALLOC_CHECK;
|
||||
return sexecve (hToken, path, (char * const *) argv, environ);
|
||||
return sexecve (hToken, path, (char * const *) argv, cur_environ ());
|
||||
}
|
||||
|
||||
extern "C"
|
||||
@ -131,7 +131,7 @@ sexeclp (HANDLE hToken, const char *path, const char *arg0, ...)
|
||||
va_end (args);
|
||||
|
||||
MALLOC_CHECK;
|
||||
return sexecvpe (hToken, path, (const char * const *) argv, environ);
|
||||
return sexecvpe (hToken, path, (const char * const *) argv, cur_environ ());
|
||||
}
|
||||
|
||||
extern "C"
|
||||
@ -163,7 +163,7 @@ int
|
||||
sexecv (HANDLE hToken, const char *path, const char * const *argv)
|
||||
{
|
||||
MALLOC_CHECK;
|
||||
return sexecve (hToken, path, argv, environ);
|
||||
return sexecve (hToken, path, argv, cur_environ ());
|
||||
}
|
||||
|
||||
extern "C"
|
||||
@ -171,7 +171,7 @@ int
|
||||
sexecp (HANDLE hToken, const char *path, const char * const *argv)
|
||||
{
|
||||
MALLOC_CHECK;
|
||||
return sexecvpe (hToken, path, argv, environ);
|
||||
return sexecvpe (hToken, path, argv, cur_environ ());
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -8,11 +8,11 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <fcntl.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include "winsup.h"
|
||||
|
||||
extern "C"
|
||||
int
|
||||
|
@ -8,11 +8,11 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <sys/fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include "winsup.h"
|
||||
|
||||
static NO_COPY const int CHUNK_SIZE = 1024; /* Used for crlf conversions */
|
||||
|
||||
|
@ -12,13 +12,13 @@ details. */
|
||||
Should the constructor call tcinit() explicitly rather than having
|
||||
it sprinkled throughout here? */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <sys/termios.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include "winsup.h"
|
||||
#include <wingdi.h>
|
||||
#include <winuser.h>
|
||||
#include <ctype.h>
|
||||
|
@ -9,11 +9,11 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <sys/termios.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include "winsup.h"
|
||||
|
||||
/**********************************************************************/
|
||||
/* fhandler_dev_floppy */
|
||||
|
@ -10,9 +10,9 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include "winsup.h"
|
||||
|
||||
#define RANDOM 8
|
||||
#define URANDOM 9
|
||||
|
@ -8,11 +8,11 @@
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <sys/termios.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include "winsup.h"
|
||||
|
||||
#include <cygwin/rdevio.h>
|
||||
#include <sys/mtio.h>
|
||||
|
@ -8,11 +8,11 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include "winsup.h"
|
||||
|
||||
/**********************************************************************/
|
||||
/* fhandler_serial */
|
||||
|
@ -9,11 +9,11 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <sys/termios.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include "winsup.h"
|
||||
|
||||
#include <sys/mtio.h>
|
||||
|
||||
|
@ -8,11 +8,11 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
#include <ctype.h>
|
||||
|
||||
/* Common functions shared by tty/console */
|
||||
|
@ -8,12 +8,12 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
|
||||
|
@ -11,8 +11,8 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
#include <errno.h>
|
||||
#include <wingdi.h>
|
||||
#include <winuser.h>
|
||||
|
||||
|
@ -10,8 +10,8 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
#include <errno.h>
|
||||
|
||||
fhandler_dev_zero::fhandler_dev_zero (const char *name)
|
||||
: fhandler_base (FH_ZERO, name)
|
||||
|
@ -8,13 +8,13 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
#include "dll_init.h"
|
||||
|
||||
DWORD NO_COPY chunksize = 0;
|
||||
|
@ -67,6 +67,8 @@
|
||||
/* #include "namespace.h" */
|
||||
/* end CYGNUS LOCAL */
|
||||
|
||||
#include "winsup.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
@ -11,10 +11,10 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <grp.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "winsup.h"
|
||||
|
||||
/* Read /etc/group only once for better performance. This is done
|
||||
on the first call that needs information from it. */
|
||||
|
@ -8,8 +8,8 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
#include <errno.h>
|
||||
|
||||
#define brksize ((char *) user_data->heaptop - (char *) user_data->heapbase)
|
||||
#define brk (user_data->heapptr)
|
||||
|
@ -8,8 +8,8 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "winsup.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
extern HMODULE cygwin_hmodule;
|
||||
|
||||
|
@ -11,9 +11,9 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <sys/ioctl.h>
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
|
||||
extern "C"
|
||||
int
|
||||
|
@ -5,6 +5,7 @@
|
||||
/* Temporarily merged private.h and tzfile.h for ease of management - DJ */
|
||||
|
||||
/* CYGNUS LOCAL */
|
||||
#include "winsup.h"
|
||||
#define lint
|
||||
#include <windows.h>
|
||||
|
||||
|
@ -8,12 +8,12 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/mman.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "winsup.h"
|
||||
|
||||
/*
|
||||
* Simple class used to keep a record of all current
|
||||
|
@ -12,14 +12,13 @@ details. */
|
||||
|
||||
#define __INSIDE_CYGWIN_NET__
|
||||
|
||||
#define Win32_Winsock
|
||||
#include "winsup.h"
|
||||
#include <errno.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#define Win32_Winsock
|
||||
#include "winsup.h"
|
||||
#include <netdb.h>
|
||||
#include <fcntl.h>
|
||||
#include "autoload.h"
|
||||
|
@ -8,11 +8,11 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <stdlib.h>
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
|
||||
/* Read /etc/passwd only once for better performance. This is done
|
||||
on the first call that needs information from it. */
|
||||
|
@ -71,6 +71,7 @@ details. */
|
||||
c: means c:\.
|
||||
*/
|
||||
|
||||
#include "winsup.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/mount.h>
|
||||
@ -78,7 +79,6 @@ details. */
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
#include <ctype.h>
|
||||
#include <winioctl.h>
|
||||
|
||||
|
@ -8,11 +8,11 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include "winsup.h"
|
||||
|
||||
static char NO_COPY pinfo_dummy[sizeof(pinfo)] = {0};
|
||||
|
||||
|
@ -8,10 +8,10 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <unistd.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
|
||||
static int
|
||||
make_pipe (int fildes[2], unsigned int psize, int mode)
|
||||
|
@ -8,8 +8,8 @@
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include <sys/poll.h>
|
||||
#include "winsup.h"
|
||||
#include <sys/poll.h>
|
||||
|
||||
extern "C"
|
||||
int
|
||||
|
@ -12,8 +12,8 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
#include <errno.h>
|
||||
|
||||
/* add timeval values */
|
||||
static void
|
||||
|
@ -10,10 +10,10 @@
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <dirent.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
|
||||
extern "C"
|
||||
int
|
||||
|
@ -11,6 +11,7 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
#include <unistd.h>
|
||||
@ -20,7 +21,6 @@ details. */
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/acl.h>
|
||||
#include "winsup.h"
|
||||
#include <ctype.h>
|
||||
|
||||
extern BOOL allow_ntea;
|
||||
|
@ -20,17 +20,17 @@ details. */
|
||||
#define __INSIDE_CYGWIN_NET__
|
||||
#define Win32_Winsock
|
||||
|
||||
#include "winsup.h"
|
||||
#include <errno.h>
|
||||
#include <sys/socket.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <wingdi.h>
|
||||
#include <winuser.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include "winsup.h"
|
||||
#include <wingdi.h>
|
||||
#include <winuser.h>
|
||||
#include <winsock.h>
|
||||
#include "select.h"
|
||||
|
||||
|
@ -8,12 +8,12 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
#include "winsup.h"
|
||||
|
||||
#define SHAREDVER (unsigned)(cygwin_version.api_major << 16 | \
|
||||
cygwin_version.api_minor)
|
||||
|
@ -11,8 +11,8 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
#include <errno.h>
|
||||
|
||||
extern "C"
|
||||
_sig_func_ptr
|
||||
|
@ -10,12 +10,12 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <sys/wait.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include "winsup.h"
|
||||
|
||||
extern BOOL allow_ntsec;
|
||||
|
||||
|
@ -8,6 +8,7 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -8,6 +8,7 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
@ -15,7 +16,6 @@ details. */
|
||||
#include <sys/wait.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include "winsup.h"
|
||||
#include <wingdi.h>
|
||||
#include <winuser.h>
|
||||
#include <ctype.h>
|
||||
@ -921,7 +921,7 @@ spawnl (int mode, const char *path, const char *arg0, ...)
|
||||
|
||||
va_end (args);
|
||||
|
||||
return _spawnve (NULL, mode, path, (char * const *) argv, environ);
|
||||
return _spawnve (NULL, mode, path, (char * const *) argv, cur_environ ());
|
||||
}
|
||||
|
||||
extern "C"
|
||||
@ -966,7 +966,7 @@ spawnlp (int mode, const char *path, const char *arg0, ...)
|
||||
|
||||
va_end (args);
|
||||
|
||||
return spawnvpe (mode, path, (char * const *) argv, environ);
|
||||
return spawnvpe (mode, path, (char * const *) argv, cur_environ ());
|
||||
}
|
||||
|
||||
extern "C"
|
||||
@ -996,7 +996,7 @@ extern "C"
|
||||
int
|
||||
spawnv (int mode, const char *path, const char * const *argv)
|
||||
{
|
||||
return _spawnve (NULL, mode, path, argv, environ);
|
||||
return _spawnve (NULL, mode, path, argv, cur_environ ());
|
||||
}
|
||||
|
||||
extern "C"
|
||||
@ -1011,7 +1011,7 @@ extern "C"
|
||||
int
|
||||
spawnvp (int mode, const char *path, const char * const *argv)
|
||||
{
|
||||
return spawnvpe (mode, path, argv, environ);
|
||||
return spawnvpe (mode, path, argv, cur_environ ());
|
||||
}
|
||||
|
||||
extern "C"
|
||||
|
@ -8,9 +8,9 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include "winsup.h"
|
||||
#include <wingdi.h>
|
||||
#include <winuser.h>
|
||||
|
||||
|
@ -14,12 +14,12 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <sys/wait.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include "winsup.h"
|
||||
|
||||
muto NO_COPY muto_start;
|
||||
|
||||
|
@ -8,6 +8,7 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <sys/stat.h>
|
||||
#include <sys/vfs.h> /* needed for statfs */
|
||||
#include <fcntl.h>
|
||||
@ -20,7 +21,6 @@ details. */
|
||||
#include <sys/uio.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include "winsup.h"
|
||||
#include <unistd.h>
|
||||
#include <winnls.h>
|
||||
#include <lmcons.h> /* for UNLEN */
|
||||
|
@ -8,11 +8,11 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#include <limits.h>
|
||||
#include "winsup.h"
|
||||
|
||||
/* sysconf: POSIX 4.8.1.1 */
|
||||
/* Allows a portable app to determine quantities of resources or
|
||||
|
@ -8,12 +8,12 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
#include "winsup.h"
|
||||
|
||||
/* FIXME: These should probably be in the registry. */
|
||||
/* FIXME: The Win95 path should be whatever slash is */
|
||||
|
@ -11,8 +11,8 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
#include <errno.h>
|
||||
|
||||
/* tcsendbreak: POSIX 7.2.2.1 */
|
||||
extern "C"
|
||||
|
@ -15,8 +15,8 @@ details. */
|
||||
#endif
|
||||
|
||||
#ifdef _MT_SAFE
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -8,10 +8,7 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
/* Hide definitions from the library since they contain the
|
||||
"dllimport" attribute. */
|
||||
#define _timezone dummy_timezone
|
||||
#define _daylight dummy_daylight
|
||||
#include "winsup.h"
|
||||
#include <time.h>
|
||||
#include <sys/times.h>
|
||||
#include <sys/timeb.h>
|
||||
@ -19,12 +16,7 @@ details. */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
|
||||
#undef _timezone
|
||||
#undef _daylight
|
||||
extern time_t _timezone;
|
||||
extern int _daylight;
|
||||
|
||||
#define FACTOR (0x19db1ded53ea710LL)
|
||||
#define NSPERSEC 10000000LL
|
||||
|
@ -8,10 +8,10 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <utmp.h>
|
||||
#include "winsup.h"
|
||||
#include <wingdi.h>
|
||||
#include <winuser.h>
|
||||
|
||||
|
@ -8,8 +8,8 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include <pwd.h>
|
||||
#include "winsup.h"
|
||||
#include <pwd.h>
|
||||
#include <unistd.h>
|
||||
#include <winnls.h>
|
||||
#include <utmp.h>
|
||||
|
@ -10,9 +10,9 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <stdio.h>
|
||||
#include <sys/utsname.h>
|
||||
#include "winsup.h"
|
||||
|
||||
/* uname: POSIX 4.4.1.1 */
|
||||
extern "C" int
|
||||
|
@ -8,10 +8,10 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <sys/wait.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include "winsup.h"
|
||||
|
||||
/* This is called _wait and not wait because the real wait is defined
|
||||
in libc/syscalls/syswait.c. It calls us. */
|
||||
|
@ -10,11 +10,11 @@ This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <sys/time.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include "winsup.h"
|
||||
#include <wingdi.h>
|
||||
#include <winuser.h>
|
||||
|
||||
|
@ -14,6 +14,8 @@ details. */
|
||||
|
||||
#define __INSIDE_CYGWIN__
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#define alloca(x) __builtin_alloca (x)
|
||||
#define strlen __builtin_strlen
|
||||
#define strcpy __builtin_strcpy
|
||||
@ -502,7 +504,6 @@ void __stdcall update_envptrs ();
|
||||
char * __stdcall winenv (const char * const *, int);
|
||||
extern char **__cygwin_environ, ***main_environ;
|
||||
extern "C" char __stdcall **cur_environ ();
|
||||
#define environ (cur_environ ())
|
||||
|
||||
/* The title on program start. */
|
||||
extern char *old_title;
|
||||
@ -516,8 +517,7 @@ void seterrno (const char *, int line);
|
||||
|
||||
#define __seterrno() seterrno (__FILE__, __LINE__)
|
||||
#define __seterrno_from_win_error(val) seterrno_from_win_error (__FILE__, __LINE__, val)
|
||||
#undef errno
|
||||
#define errno dont_use_this_since_were_in_a_shared library
|
||||
|
||||
#define set_errno(val) (_impure_ptr->_errno = (val))
|
||||
#define get_errno() (_impure_ptr->_errno)
|
||||
extern "C" void __stdcall set_sig_errno (int e);
|
||||
@ -535,3 +535,5 @@ class save_errno
|
||||
|
||||
extern const char *__sp_fn;
|
||||
extern int __sp_ln;
|
||||
|
||||
#endif /* defined __cplusplus */
|
||||
|
Loading…
x
Reference in New Issue
Block a user