summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/Makefile.in9
-rw-r--r--winsup/cygwin/include/sys/cygwin.h5
-rw-r--r--winsup/cygwin/libccrt0.cc5
-rw-r--r--winsup/cygwin/winsup.h4
5 files changed, 20 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 7dd6ad1b4..5d16b3899 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+Wed Jun 21 14:32:42 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * Makefile.in: Add *.def to clean operation.
+
Wed Jun 21 13:18:23 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Add *.exe to clean operation.
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index 29ee216ed..cda144480 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -106,7 +106,8 @@ GMON_START:=gcrt0.o
# data which apps can get to, which is a pain in the dll, so we
# include them directly into the library.
-LIBCOS:=libccrt0.o libcmain.o getopt.o dll_entry.o dll_main.o
+LIBCOS:=libccrt0.o libcmain.o getopt.o dll_entry.o dll_main.o \
+ premain0.o premain1.o premain2.o premain3.o
# Build all source files in the config directory
@@ -143,9 +144,7 @@ install_host=@install_host@
all: new-$(DLL_NAME) $(all_host) all_target
-install: $(install_host) install_target
-
-all_target: $(LIBGMON_A) $(LIB_NAME)
+all_target: $(LIBGMON_A) $(LIB_NAME) binmode.o
all_host: cygrun.exe
@@ -167,7 +166,7 @@ install: all $(install_host) $(install_target)
install_host:
clean:
- -rm -f *.o *.dll *.a *.exp junk *.base version.cc regexp/*.o winver_stamp *.exe
+ -rm -f *.o *.dll *.a *.exp junk *.base *.def version.cc regexp/*.o winver_stamp *.exe
maintainer-clean realclean: clean
@echo "This command is intended for maintainers to use;"
diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h
index 6354f0f88..e72202b29 100644
--- a/winsup/cygwin/include/sys/cygwin.h
+++ b/winsup/cygwin/include/sys/cygwin.h
@@ -34,6 +34,11 @@ extern void cygwin_split_path (const char *, char *, char *);
extern HANDLE cygwin_logon_user (const struct passwd *, const char *);
extern void cygwin_set_impersonation_token (const HANDLE);
+extern void cygwin_premain0 (int argc, char **argv);
+extern void cygwin_premain1 (int argc, char **argv);
+extern void cygwin_premain2 (int argc, char **argv);
+extern void cygwin_premain3 (int argc, char **argv);
+
#ifdef _GNU_H_WINDOWS32_BASE
/* included if <windows.h> is included */
extern int cygwin32_attach_handle_to_fd (char *, int, HANDLE, int, int);
diff --git a/winsup/cygwin/libccrt0.cc b/winsup/cygwin/libccrt0.cc
index 6f7d534b8..f7762459a 100644
--- a/winsup/cygwin/libccrt0.cc
+++ b/winsup/cygwin/libccrt0.cc
@@ -11,6 +11,7 @@ details. */
#undef MALLOC_DEBUG
#include "winsup.h"
+#include "sys/cygwin.h"
#include <reent.h>
#include <stdlib.h>
@@ -54,6 +55,10 @@ cygwin_crt0_common (MainFunc f)
this_proc.envptr = &environ;
this_proc.impure_ptr_ptr = &_impure_ptr;
this_proc.main = f;
+ this_proc.premain[0] = cygwin_premain0;
+ this_proc.premain[1] = cygwin_premain1;
+ this_proc.premain[2] = cygwin_premain2;
+ this_proc.premain[3] = cygwin_premain3;
this_proc.fmode_ptr = &_fmode;
this_proc.initial_sp = (char *) &onstack;
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
index f9569f2aa..29eca9dcc 100644
--- a/winsup/cygwin/winsup.h
+++ b/winsup/cygwin/winsup.h
@@ -143,7 +143,7 @@ class per_process
void *(*calloc)(size_t, size_t);
/* For future expansion of values set by the app. */
- void *public_reserved[4];
+ void (*premain[4]) (int, char **);
/* The rest are *internal* to cygwin.dll.
Those that are here because we want the child to inherit the value from
@@ -164,7 +164,7 @@ class per_process
void *heapptr; /* current index into heap */
void *heaptop; /* current top of heap */
- HANDLE reserved1; /* unused */
+ HANDLE unused1; /* unused */
/* Non-zero means the task was forked. The value is the pid.
Inherited from parent. */