* winlean.h: New file.
* automode.c: Use "winlean.h". * binmode.c: Ditto. * gmon.c: Ditto. * textmode.c: Ditto. * textreadmode.c: Ditto. * winsup.h: Ditto. * lib/cygwin_attach_dll.c: Ditto. * lib/dll_main.cc: Ditto. * profile.c: Ditto. * crt0.c: Ditto. Cleanup ancient cruft. Add dummy calls to cygwin_premain*. * include/sys/cygwin.h: Remove old stuff. Move premain declarations nearer to other cygwin-specific function declarations. * globals.cc: Add comment.
This commit is contained in:
parent
552bc28f46
commit
92117cb21f
|
@ -1,3 +1,21 @@
|
||||||
|
2010-08-29 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
|
* winlean.h: New file.
|
||||||
|
* automode.c: Use "winlean.h".
|
||||||
|
* binmode.c: Ditto.
|
||||||
|
* gmon.c: Ditto.
|
||||||
|
* textmode.c: Ditto.
|
||||||
|
* textreadmode.c: Ditto.
|
||||||
|
* winsup.h: Ditto.
|
||||||
|
* lib/cygwin_attach_dll.c: Ditto.
|
||||||
|
* lib/dll_main.cc: Ditto.
|
||||||
|
* profile.c: Ditto.
|
||||||
|
* crt0.c: Ditto. Cleanup ancient cruft. Add dummy calls to
|
||||||
|
cygwin_premain*.
|
||||||
|
* include/sys/cygwin.h: Remove old stuff. Move premain declarations
|
||||||
|
nearer to other cygwin-specific function declarations.
|
||||||
|
* globals.cc: Add comment.
|
||||||
|
|
||||||
2010-08-28 Corinna Vinschen <corinna@vinschen.de>
|
2010-08-28 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* autoload.cc (LoadDLLprime): Change dllname storage to string16.
|
* autoload.cc (LoadDLLprime): Change dllname storage to string16.
|
||||||
|
|
|
@ -8,7 +8,7 @@ This software is a copyrighted work licensed under the terms of the
|
||||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
#include <windows.h>
|
#include "winlean.h"
|
||||||
#include <sys/fcntl.h>
|
#include <sys/fcntl.h>
|
||||||
#include <sys/cygwin.h>
|
#include <sys/cygwin.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* binmode.c
|
/* binmode.c
|
||||||
|
|
||||||
Copyright 2000 Red Hat, Inc.
|
Copyright 2000, 2010 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ This software is a copyrighted work licensed under the terms of the
|
||||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
#include <windows.h>
|
#include "winlean.h"
|
||||||
#include <sys/fcntl.h>
|
#include <sys/fcntl.h>
|
||||||
#include <sys/cygwin.h>
|
#include <sys/cygwin.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* crt0.c.
|
/* crt0.c
|
||||||
|
|
||||||
Copyright 2001, 2005 Red Hat, Inc.
|
Copyright 2001, 2005, 2010 Red Hat, Inc.
|
||||||
|
|
||||||
This software is a copyrighted work licensed under the terms of the
|
This software is a copyrighted work licensed under the terms of the
|
||||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
|
@ -9,15 +9,14 @@ details. */
|
||||||
/* In the following ifdef'd i386 code, the FPU precision is set to 80 bits
|
/* In the following ifdef'd i386 code, the FPU precision is set to 80 bits
|
||||||
and all FPU exceptions are masked. The former is needed to make long
|
and all FPU exceptions are masked. The former is needed to make long
|
||||||
doubles work correctly. The latter causes the FPU to generate NaNs and
|
doubles work correctly. The latter causes the FPU to generate NaNs and
|
||||||
Infinities instead of signals for certain operations.
|
Infinities instead of signals for certain operations. */
|
||||||
*/
|
|
||||||
|
|
||||||
|
#include "winlean.h"
|
||||||
|
#include <sys/cygwin.h>
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
#define FPU_RESERVED 0xF0C0
|
#define FPU_RESERVED 0xF0C0
|
||||||
#define FPU_DEFAULT 0x033f
|
#define FPU_DEFAULT 0x033f
|
||||||
|
|
||||||
/* For debugging on *#!$@ windbg. bp for breakpoint. */
|
|
||||||
int __cygwin_crt0_bp = 0;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int main (int argc, char **argv);
|
extern int main (int argc, char **argv);
|
||||||
|
@ -30,9 +29,6 @@ mainCRTStartup ()
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
(void)__builtin_return_address(1);
|
(void)__builtin_return_address(1);
|
||||||
asm volatile ("andl $-16,%%esp" ::: "%esp");
|
asm volatile ("andl $-16,%%esp" ::: "%esp");
|
||||||
if (__cygwin_crt0_bp)
|
|
||||||
asm volatile ("int3");
|
|
||||||
|
|
||||||
{
|
{
|
||||||
volatile unsigned short cw;
|
volatile unsigned short cw;
|
||||||
|
|
||||||
|
@ -49,7 +45,14 @@ mainCRTStartup ()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cygwin_crt0 (main);
|
cygwin_crt0 (main);
|
||||||
|
|
||||||
|
/* These are never actually called. They are just here to force the inclusion
|
||||||
|
of things like -lbinmode. */
|
||||||
|
|
||||||
|
cygwin_premain0 (0, NULL, NULL);
|
||||||
|
cygwin_premain1 (0, NULL, NULL);
|
||||||
|
cygwin_premain2 (0, NULL, NULL);
|
||||||
|
cygwin_premain3 (0, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WinMainCRTStartup(void) __attribute__ ((alias("mainCRTStartup")));
|
void WinMainCRTStartup(void) __attribute__ ((alias("mainCRTStartup")));
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,11 @@ SYSTEM_INFO system_info;
|
||||||
/* Set in init.cc. Used to check if Cygwin DLL is dynamically loaded. */
|
/* Set in init.cc. Used to check if Cygwin DLL is dynamically loaded. */
|
||||||
int NO_COPY dynamically_loaded;
|
int NO_COPY dynamically_loaded;
|
||||||
|
|
||||||
|
/* Some CYGWIN environment variable variables. */
|
||||||
bool display_title;
|
bool display_title;
|
||||||
bool strip_title_path;
|
bool strip_title_path;
|
||||||
bool allow_glob = true;
|
bool allow_glob = true;
|
||||||
|
|
||||||
bool NO_COPY in_forkee;
|
bool NO_COPY in_forkee;
|
||||||
|
|
||||||
int __argc_safe;
|
int __argc_safe;
|
||||||
|
|
|
@ -35,13 +35,14 @@
|
||||||
static char rcsid[] = "$OpenBSD: gmon.c,v 1.8 1997/07/23 21:11:27 kstailey Exp $";
|
static char rcsid[] = "$OpenBSD: gmon.c,v 1.8 1997/07/23 21:11:27 kstailey Exp $";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "winlean.h"
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <gmon.h>
|
#include <gmon.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <profil.h>
|
#include <profil.h>
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
/* XXX needed? */
|
/* XXX needed? */
|
||||||
//extern char *minbrk __asm ("minbrk");
|
//extern char *minbrk __asm ("minbrk");
|
||||||
|
|
|
@ -21,21 +21,6 @@ extern "C" {
|
||||||
|
|
||||||
#define _CYGWIN_SIGNAL_STRING "cYgSiGw00f"
|
#define _CYGWIN_SIGNAL_STRING "cYgSiGw00f"
|
||||||
|
|
||||||
#if 0 /* ENTIRELY DEPRECATED INTERFACES. */
|
|
||||||
extern pid_t cygwin32_winpid_to_pid (int);
|
|
||||||
extern void cygwin32_win32_to_posix_path_list (const char *, char *);
|
|
||||||
extern int cygwin32_win32_to_posix_path_list_buf_size (const char *);
|
|
||||||
extern void cygwin32_posix_to_win32_path_list (const char *, char *);
|
|
||||||
extern int cygwin32_posix_to_win32_path_list_buf_size (const char *);
|
|
||||||
extern int cygwin32_conv_to_win32_path (const char *, char *);
|
|
||||||
extern int cygwin32_conv_to_full_win32_path (const char *, char *);
|
|
||||||
extern void cygwin32_conv_to_posix_path (const char *, char *);
|
|
||||||
extern void cygwin32_conv_to_full_posix_path (const char *, char *);
|
|
||||||
extern int cygwin32_posix_path_list_p (const char *);
|
|
||||||
extern void cygwin32_split_path (const char *, char *, char *);
|
|
||||||
extern int cygwin32_attach_handle_to_fd (char *, int, HANDLE, mode_t, DWORD);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* DEPRECATED INTERFACES. These are restricted to MAX_PATH length.
|
/* DEPRECATED INTERFACES. These are restricted to MAX_PATH length.
|
||||||
Don't use in modern applications. */
|
Don't use in modern applications. */
|
||||||
extern int cygwin_win32_to_posix_path_list (const char *, char *)
|
extern int cygwin_win32_to_posix_path_list (const char *, char *)
|
||||||
|
@ -273,11 +258,6 @@ struct per_process
|
||||||
};
|
};
|
||||||
#define per_process_overwrite ((unsigned) &(((struct per_process *) NULL)->threadinterface))
|
#define per_process_overwrite ((unsigned) &(((struct per_process *) NULL)->threadinterface))
|
||||||
|
|
||||||
extern void cygwin_premain0 (int argc, char **argv, struct per_process *);
|
|
||||||
extern void cygwin_premain1 (int argc, char **argv, struct per_process *);
|
|
||||||
extern void cygwin_premain2 (int argc, char **argv, struct per_process *);
|
|
||||||
extern void cygwin_premain3 (int argc, char **argv, struct per_process *);
|
|
||||||
|
|
||||||
#ifdef _PATH_PASSWD
|
#ifdef _PATH_PASSWD
|
||||||
extern HANDLE cygwin_logon_user (const struct passwd *, const char *);
|
extern HANDLE cygwin_logon_user (const struct passwd *, const char *);
|
||||||
#endif
|
#endif
|
||||||
|
@ -286,6 +266,11 @@ extern void cygwin_set_impersonation_token (const HANDLE);
|
||||||
/* included if <windows.h> is included */
|
/* included if <windows.h> is included */
|
||||||
extern int cygwin_attach_handle_to_fd (char *, int, HANDLE, mode_t, DWORD);
|
extern int cygwin_attach_handle_to_fd (char *, int, HANDLE, mode_t, DWORD);
|
||||||
|
|
||||||
|
extern void cygwin_premain0 (int, char **, struct per_process *);
|
||||||
|
extern void cygwin_premain1 (int, char **, struct per_process *);
|
||||||
|
extern void cygwin_premain2 (int, char **, struct per_process *);
|
||||||
|
extern void cygwin_premain3 (int, char **, struct per_process *);
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
#undef __INSIDE_CYGWIN__
|
#undef __INSIDE_CYGWIN__
|
||||||
#include <windows.h>
|
#include "winlean.h"
|
||||||
#include <time.h> /* Needed since call to sys/time.h via sys/cygwin.h
|
#include <time.h> /* Needed since call to sys/time.h via sys/cygwin.h
|
||||||
complains otherwise */
|
complains otherwise */
|
||||||
#include <sys/cygwin.h>
|
#include <sys/cygwin.h>
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
/* dll_main.cc: Provide the DllMain stub that the user can override.
|
/* dll_main.cc: Provide the DllMain stub that the user can override.
|
||||||
|
|
||||||
Copyright 1998, 2000, 2001, 2009 Red Hat, Inc.
|
Copyright 1998, 2000, 2001, 2009, 2010 Red Hat, Inc.
|
||||||
|
|
||||||
This software is a copyrighted work licensed under the terms of the
|
This software is a copyrighted work licensed under the terms of the
|
||||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#include "winlean.h"
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason,
|
BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason,
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
#include <windows.h>
|
#include "winlean.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* binmode.c
|
/* binmode.c
|
||||||
|
|
||||||
Copyright 2000 Red Hat, Inc.
|
Copyright 2000, 2010 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ This software is a copyrighted work licensed under the terms of the
|
||||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
#include <windows.h>
|
#include "winlean.h"
|
||||||
#include <sys/fcntl.h>
|
#include <sys/fcntl.h>
|
||||||
#include <sys/cygwin.h>
|
#include <sys/cygwin.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* textreadmode.c
|
/* textreadmode.c
|
||||||
|
|
||||||
Copyright 2004 Red Hat, Inc.
|
Copyright 2004, 2010 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ This software is a copyrighted work licensed under the terms of the
|
||||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
#include <windows.h>
|
#include "winlean.h"
|
||||||
#include <sys/fcntl.h>
|
#include <sys/fcntl.h>
|
||||||
#include <sys/cygwin.h>
|
#include <sys/cygwin.h>
|
||||||
|
|
||||||
|
|
|
@ -81,24 +81,7 @@ extern const char case_folded_upper[];
|
||||||
#define cfree newlib_cfree_dont_use
|
#define cfree newlib_cfree_dont_use
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN 1
|
#include "winlean.h"
|
||||||
#define _WINGDI_H
|
|
||||||
#define _WINUSER_H
|
|
||||||
#define _WINNLS_H
|
|
||||||
#define _WINVER_H
|
|
||||||
#define _WINNETWK_H
|
|
||||||
#define _WINSVC_H
|
|
||||||
#include <windows.h>
|
|
||||||
#include <wincrypt.h>
|
|
||||||
#include <lmcons.h>
|
|
||||||
#include <ntdef.h>
|
|
||||||
#undef _WINGDI_H
|
|
||||||
#undef _WINUSER_H
|
|
||||||
#undef _WINNLS_H
|
|
||||||
#undef _WINVER_H
|
|
||||||
#undef _WINNETWK_H
|
|
||||||
#undef _WINSVC_H
|
|
||||||
|
|
||||||
#include "wincap.h"
|
#include "wincap.h"
|
||||||
|
|
||||||
/* The one function we use from winuser.h most of the time */
|
/* The one function we use from winuser.h most of the time */
|
||||||
|
|
Loading…
Reference in New Issue