summaryrefslogtreecommitdiff
path: root/cygwin32
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1997-04-03 10:03:25 +1200
committerChip Salzenberg <chip@atlantic.net>1997-04-03 10:03:25 +1200
commit5aabfad66ac77650f584e2f07af91645e19fe296 (patch)
treeac96571984ba780e9ae7736cfe85dd17f6cfd865 /cygwin32
parent4a6725af9146bd7faaa10aa5429ff009d393fd6d (diff)
downloadperl-5aabfad66ac77650f584e2f07af91645e19fe296.tar.gz
[inseparable changes from match from perl-5.003_97 to perl-5.003_97a]
CORE PORTABILITY Subject: Add support for Cygwin32 (GNU-Win32) -- very low impact Date: Thu, 3 Apr 1997 09:21:17 +0100 From: John Cerney <j-cerney1@ti.com> Files: MANIFEST README.cygwin32 cygwin32/cw32imp.h cygwin32/gcc2 cygwin32/ld2 cygwin32/perlgcc cygwin32/perlld ext/DynaLoader/dl_cygwin32.xs hints/cygwin32.sh perl.h pp_sys.c Msg-ID: 199704030821.JAA08762@pluto.tiuk.ti.com (applied based on p5p patch as commit 2a079e0090406b1b2e50643540f149206c9e9de8) Subject: Win32 update (six patches) From: Gurusamy Sarathy <gsar@engin.umich.edu> Files: MANIFEST README.win32 dosish.h t/io/fs.t t/io/tell.t t/lib/io_tell.t t/op/magic.t t/op/mkdir.t t/op/runlevel.t t/op/stat.t t/op/taint.t win32/Makefile win32/VC-2.0/pod.mak win32/makedef.pl win32/pod.mak win32/win32.c win32/win32.h win32/win32io.c win32/win32io.h win32/win32iop.h LIBRARY AND EXTENSIONS Subject: Math::Trig, based on (and from an author of) Math::Complex From: Chip Salzenberg <chip@perl.com> Files: MANIFEST lib/Math/Complex.pm lib/Math/Trig.pm pod/perldelta.pod t/lib/complex.t t/lib/trig.t OTHER CORE CHANGES Subject: Fix const-sub-related panic on C<sub foo { my $x; 0 } foo> From: Chip Salzenberg <chip@perl.com> Files: op.c Subject: Fix warning for useless C<1..2> From: Chip Salzenberg <chip@perl.com> Files: op.c Subject: Minor cleanups Date: Thu, 03 Apr 1997 19:56:57 -0500 From: Gurusamy Sarathy <gsar@engin.umich.edu> Files: mg.c mg.h perl.c Msg-ID: 199704040056.TAA22253@aatma.engin.umich.edu (applied based on p5p patch as commit 609794497049cf42bdd2396c04cbb7728e10374d) Subject: Eliminate unreliable warning with %SIG and strict refs From: Chip Salzenberg <chip@perl.com> Files: mg.c Subject: Fix impossible test in vivification From: Chip Salzenberg <chip@perl.com> Files: mg.c
Diffstat (limited to 'cygwin32')
-rw-r--r--cygwin32/cw32imp.h356
-rw-r--r--cygwin32/gcc212
-rw-r--r--cygwin32/ld29
-rw-r--r--cygwin32/perlgcc77
-rw-r--r--cygwin32/perlld192
5 files changed, 646 insertions, 0 deletions
diff --git a/cygwin32/cw32imp.h b/cygwin32/cw32imp.h
new file mode 100644
index 0000000000..1fb11d3e03
--- /dev/null
+++ b/cygwin32/cw32imp.h
@@ -0,0 +1,356 @@
+/* include file for building of extension libs using GNU-Win32 toolkit,
+ which is based on the Cygnus Cygwin32 API. This file is included by
+ the extension dlls when they are built. Global vars defined in perl
+ exe are referenced by the extension module dll by using __imp_varName,
+ where varName is the name of the global variable in perl.exe.
+ GNU-Win32 has no equivalent to MSVC's __declspec(dllimport) keyword to
+ define a imported global, so we have to use this approach to access
+ globals exported by perl.exe.
+ -jc 4/1/97
+*/
+
+#define impure_setupptr (*__imp_impure_setupptr)
+#define Perl_reall_srchlen (*__imp_Perl_reall_srchlen)
+#define Perl_yychar (*__imp_Perl_yychar)
+#define Perl_yycheck (*__imp_Perl_yycheck)
+#define Perl_yydebug (*__imp_Perl_yydebug)
+#define Perl_yydefred (*__imp_Perl_yydefred)
+#define Perl_yydgoto (*__imp_Perl_yydgoto)
+#define Perl_yyerrflag (*__imp_Perl_yyerrflag)
+#define Perl_yygindex (*__imp_Perl_yygindex)
+#define Perl_yylen (*__imp_Perl_yylen)
+#define Perl_yylhs (*__imp_Perl_yylhs)
+#define Perl_yylval (*__imp_Perl_yylval)
+#define Perl_yynerrs (*__imp_Perl_yynerrs)
+#define Perl_yyrindex (*__imp_Perl_yyrindex)
+#define Perl_yysindex (*__imp_Perl_yysindex)
+#define Perl_yytable (*__imp_Perl_yytable)
+#define Perl_yyval (*__imp_Perl_yyval)
+#define Perl_regarglen (*__imp_Perl_regarglen)
+#define Perl_regdummy (*__imp_Perl_regdummy)
+#define Perl_regkind (*__imp_Perl_regkind)
+#define Perl_simple (*__imp_Perl_simple)
+#define Perl_varies (*__imp_Perl_varies)
+#define Perl_watchaddr (*__imp_Perl_watchaddr)
+#define Perl_watchok (*__imp_Perl_watchok)
+#define Argv (*__imp_Argv)
+#define Cmd (*__imp_Cmd)
+#define DBgv (*__imp_DBgv)
+#define DBline (*__imp_DBline)
+#define DBsignal (*__imp_DBsignal)
+#define DBsingle (*__imp_DBsingle)
+#define DBsub (*__imp_DBsub)
+#define DBtrace (*__imp_DBtrace)
+#define Error (*__imp_Error)
+#define Perl_AMG_names (*__imp_Perl_AMG_names)
+#define Perl_No (*__imp_Perl_No)
+#define Perl_Sv (*__imp_Perl_Sv)
+#define Perl_Xpv (*__imp_Perl_Xpv)
+#define Perl_Yes (*__imp_Perl_Yes)
+#define Perl_amagic_generation (*__imp_Perl_amagic_generation)
+#define Perl_an (*__imp_Perl_an)
+#define Perl_buf (*__imp_Perl_buf)
+#define Perl_bufend (*__imp_Perl_bufend)
+#define Perl_bufptr (*__imp_Perl_bufptr)
+#define Perl_check (*__imp_Perl_check)
+#define Perl_collation_ix (*__imp_Perl_collation_ix)
+#define Perl_collation_name (*__imp_Perl_collation_name)
+#define Perl_collation_standard (*__imp_Perl_collation_standard)
+#define Perl_collxfrm_base (*__imp_Perl_collxfrm_base)
+#define Perl_collxfrm_mult (*__imp_Perl_collxfrm_mult)
+#define Perl_compcv (*__imp_Perl_compcv)
+#define Perl_compiling (*__imp_Perl_compiling)
+#define Perl_comppad (*__imp_Perl_comppad)
+#define Perl_comppad_name (*__imp_Perl_comppad_name)
+#define Perl_comppad_name_fill (*__imp_Perl_comppad_name_fill)
+#define Perl_cop_seqmax (*__imp_Perl_cop_seqmax)
+#define Perl_curcop (*__imp_Perl_curcop)
+#define Perl_curcopdb (*__imp_Perl_curcopdb)
+#define Perl_curinterp (*__imp_Perl_curinterp)
+#define Perl_curpad (*__imp_Perl_curpad)
+#define Perl_dc (*__imp_Perl_dc)
+#define Perl_di (*__imp_Perl_di)
+#define Perl_ds (*__imp_Perl_ds)
+#define Perl_egid (*__imp_Perl_egid)
+#define Perl_envgv (*__imp_Perl_envgv)
+#define Perl_error_count (*__imp_Perl_error_count)
+#define Perl_euid (*__imp_Perl_euid)
+#define Perl_evalseq (*__imp_Perl_evalseq)
+#define Perl_expect (*__imp_Perl_expect)
+#define Perl_fold_locale (*__imp_Perl_fold_locale)
+#define Perl_gid (*__imp_Perl_gid)
+#define Perl_he_root (*__imp_Perl_he_root)
+#define Perl_hexdigit (*__imp_Perl_hexdigit)
+#define Perl_hints (*__imp_Perl_hints)
+#define Perl_in_my (*__imp_Perl_in_my)
+#define Perl_last_lop (*__imp_Perl_last_lop)
+#define Perl_last_lop_op (*__imp_Perl_last_lop_op)
+#define Perl_last_uni (*__imp_Perl_last_uni)
+#define Perl_lex_brackets (*__imp_Perl_lex_brackets)
+#define Perl_lex_brackstack (*__imp_Perl_lex_brackstack)
+#define Perl_lex_casemods (*__imp_Perl_lex_casemods)
+#define Perl_lex_casestack (*__imp_Perl_lex_casestack)
+#define Perl_lex_defer (*__imp_Perl_lex_defer)
+#define Perl_lex_dojoin (*__imp_Perl_lex_dojoin)
+#define Perl_lex_expect (*__imp_Perl_lex_expect)
+#define Perl_lex_fakebrack (*__imp_Perl_lex_fakebrack)
+#define Perl_lex_formbrack (*__imp_Perl_lex_formbrack)
+#define Perl_lex_inpat (*__imp_Perl_lex_inpat)
+#define Perl_lex_inwhat (*__imp_Perl_lex_inwhat)
+#define Perl_lex_op (*__imp_Perl_lex_op)
+#define Perl_lex_repl (*__imp_Perl_lex_repl)
+#define Perl_lex_starts (*__imp_Perl_lex_starts)
+#define Perl_lex_state (*__imp_Perl_lex_state)
+#define Perl_lex_stuff (*__imp_Perl_lex_stuff)
+#define Perl_linestr (*__imp_Perl_linestr)
+#define Perl_markstack (*__imp_Perl_markstack)
+#define Perl_markstack_max (*__imp_Perl_markstack_max)
+#define Perl_markstack_ptr (*__imp_Perl_markstack_ptr)
+#define Perl_max_intro_pending (*__imp_Perl_max_intro_pending)
+#define Perl_maxo (*__imp_Perl_maxo)
+#define Perl_min_intro_pending (*__imp_Perl_min_intro_pending)
+#define Perl_multi_close (*__imp_Perl_multi_close)
+#define Perl_multi_end (*__imp_Perl_multi_end)
+#define Perl_multi_open (*__imp_Perl_multi_open)
+#define Perl_multi_start (*__imp_Perl_multi_start)
+#define Perl_na (*__imp_Perl_na)
+#define Perl_nexttoke (*__imp_Perl_nexttoke)
+#define Perl_nexttype (*__imp_Perl_nexttype)
+#define Perl_nextval (*__imp_Perl_nextval)
+#define Perl_nomemok (*__imp_Perl_nomemok)
+#define Perl_numeric_local (*__imp_Perl_numeric_local)
+#define Perl_numeric_name (*__imp_Perl_numeric_name)
+#define Perl_numeric_standard (*__imp_Perl_numeric_standard)
+#define Perl_oldbufptr (*__imp_Perl_oldbufptr)
+#define Perl_oldoldbufptr (*__imp_Perl_oldoldbufptr)
+#define Perl_op (*__imp_Perl_op)
+#define Perl_op_desc (*__imp_Perl_op_desc)
+#define Perl_op_name (*__imp_Perl_op_name)
+#define Perl_op_seqmax (*__imp_Perl_op_seqmax)
+#define Perl_opargs (*__imp_Perl_opargs)
+#define Perl_origalen (*__imp_Perl_origalen)
+#define Perl_origenviron (*__imp_Perl_origenviron)
+#define Perl_osname (*__imp_Perl_osname)
+#define Perl_padix (*__imp_Perl_padix)
+#define Perl_patleave (*__imp_Perl_patleave)
+#define Perl_pidstatus (*__imp_Perl_pidstatus)
+#define Perl_ppaddr (*__imp_Perl_ppaddr)
+#define Perl_profiledata (*__imp_Perl_profiledata)
+#define Perl_psig_name (*__imp_Perl_psig_name)
+#define Perl_psig_ptr (*__imp_Perl_psig_ptr)
+#define Perl_regbol (*__imp_Perl_regbol)
+#define Perl_regcode (*__imp_Perl_regcode)
+#define Perl_regendp (*__imp_Perl_regendp)
+#define Perl_regeol (*__imp_Perl_regeol)
+#define Perl_reginput (*__imp_Perl_reginput)
+#define Perl_reglastparen (*__imp_Perl_reglastparen)
+#define Perl_regnaughty (*__imp_Perl_regnaughty)
+#define Perl_regnpar (*__imp_Perl_regnpar)
+#define Perl_regparse (*__imp_Perl_regparse)
+#define Perl_regprecomp (*__imp_Perl_regprecomp)
+#define Perl_regprev (*__imp_Perl_regprev)
+#define Perl_regsawback (*__imp_Perl_regsawback)
+#define Perl_regsize (*__imp_Perl_regsize)
+#define Perl_regstartp (*__imp_Perl_regstartp)
+#define Perl_regtill (*__imp_Perl_regtill)
+#define Perl_regxend (*__imp_Perl_regxend)
+#define Perl_retstack (*__imp_Perl_retstack)
+#define Perl_retstack_ix (*__imp_Perl_retstack_ix)
+#define Perl_retstack_max (*__imp_Perl_retstack_max)
+#define Perl_rsfp (*__imp_Perl_rsfp)
+#define Perl_rsfp_filters (*__imp_Perl_rsfp_filters)
+#define Perl_savestack (*__imp_Perl_savestack)
+#define Perl_savestack_ix (*__imp_Perl_savestack_ix)
+#define Perl_savestack_max (*__imp_Perl_savestack_max)
+#define Perl_scopestack (*__imp_Perl_scopestack)
+#define Perl_scopestack_ix (*__imp_Perl_scopestack_ix)
+#define Perl_scopestack_max (*__imp_Perl_scopestack_max)
+#define Perl_scrgv (*__imp_Perl_scrgv)
+#define Perl_sh_path (*__imp_Perl_sh_path)
+#define Perl_sig_name (*__imp_Perl_sig_name)
+#define Perl_sig_num (*__imp_Perl_sig_num)
+#define Perl_siggv (*__imp_Perl_siggv)
+#define Perl_stack_base (*__imp_Perl_stack_base)
+#define Perl_stack_max (*__imp_Perl_stack_max)
+#define Perl_stack_sp (*__imp_Perl_stack_sp)
+#define Perl_statbuf (*__imp_Perl_statbuf)
+#define Perl_sub_generation (*__imp_Perl_sub_generation)
+#define Perl_subline (*__imp_Perl_subline)
+#define Perl_subname (*__imp_Perl_subname)
+#define Perl_sv_no (*__imp_Perl_sv_no)
+#define Perl_sv_undef (*__imp_Perl_sv_undef)
+#define Perl_sv_yes (*__imp_Perl_sv_yes)
+#define Perl_tainting (*__imp_Perl_tainting)
+#define Perl_thisexpr (*__imp_Perl_thisexpr)
+#define Perl_timesbuf (*__imp_Perl_timesbuf)
+#define Perl_tokenbuf (*__imp_Perl_tokenbuf)
+#define Perl_uid (*__imp_Perl_uid)
+#define Perl_vert (*__imp_Perl_vert)
+#define Perl_vtbl_amagic (*__imp_Perl_vtbl_amagic)
+#define Perl_vtbl_amagicelem (*__imp_Perl_vtbl_amagicelem)
+#define Perl_vtbl_arylen (*__imp_Perl_vtbl_arylen)
+#define Perl_vtbl_bm (*__imp_Perl_vtbl_bm)
+#define Perl_vtbl_collxfrm (*__imp_Perl_vtbl_collxfrm)
+#define Perl_vtbl_dbline (*__imp_Perl_vtbl_dbline)
+#define Perl_vtbl_env (*__imp_Perl_vtbl_env)
+#define Perl_vtbl_envelem (*__imp_Perl_vtbl_envelem)
+#define Perl_vtbl_fm (*__imp_Perl_vtbl_fm)
+#define Perl_vtbl_glob (*__imp_Perl_vtbl_glob)
+#define Perl_vtbl_isa (*__imp_Perl_vtbl_isa)
+#define Perl_vtbl_isaelem (*__imp_Perl_vtbl_isaelem)
+#define Perl_vtbl_itervar (*__imp_Perl_vtbl_itervar)
+#define Perl_vtbl_mglob (*__imp_Perl_vtbl_mglob)
+#define Perl_vtbl_nkeys (*__imp_Perl_vtbl_nkeys)
+#define Perl_vtbl_pack (*__imp_Perl_vtbl_pack)
+#define Perl_vtbl_packelem (*__imp_Perl_vtbl_packelem)
+#define Perl_vtbl_pos (*__imp_Perl_vtbl_pos)
+#define Perl_vtbl_sig (*__imp_Perl_vtbl_sig)
+#define Perl_vtbl_sigelem (*__imp_Perl_vtbl_sigelem)
+#define Perl_vtbl_substr (*__imp_Perl_vtbl_substr)
+#define Perl_vtbl_sv (*__imp_Perl_vtbl_sv)
+#define Perl_vtbl_taint (*__imp_Perl_vtbl_taint)
+#define Perl_vtbl_uvar (*__imp_Perl_vtbl_uvar)
+#define Perl_vtbl_vec (*__imp_Perl_vtbl_vec)
+#define Perl_xiv_arenaroot (*__imp_Perl_xiv_arenaroot)
+#define Perl_xiv_root (*__imp_Perl_xiv_root)
+#define Perl_xnv_root (*__imp_Perl_xnv_root)
+#define Perl_xpv_root (*__imp_Perl_xpv_root)
+#define Perl_xrv_root (*__imp_Perl_xrv_root)
+#define ampergv (*__imp_ampergv)
+#define argvgv (*__imp_argvgv)
+#define argvoutgv (*__imp_argvoutgv)
+#define basetime (*__imp_basetime)
+#define beginav (*__imp_beginav)
+#define bodytarget (*__imp_bodytarget)
+#define cddir (*__imp_cddir)
+#define chopset (*__imp_chopset)
+#define comppad_name_floor (*__imp_comppad_name_floor)
+#define copline (*__imp_copline)
+#define curpm (*__imp_curpm)
+#define curstack (*__imp_curstack)
+#define curstash (*__imp_curstash)
+#define curstname (*__imp_curstname)
+#define cxstack (*__imp_cxstack)
+#define cxstack_ix (*__imp_cxstack_ix)
+#define cxstack_max (*__imp_cxstack_max)
+#define dbargs (*__imp_dbargs)
+#define debdelim (*__imp_debdelim)
+#define debname (*__imp_debname)
+#define debstash (*__imp_debstash)
+#define debug (*__imp_debug)
+#define defgv (*__imp_defgv)
+#define defoutgv (*__imp_defoutgv)
+#define defstash (*__imp_defstash)
+#define delaymagic (*__imp_delaymagic)
+#define diehook (*__imp_diehook)
+#define dirty (*__imp_dirty)
+#define dlevel (*__imp_dlevel)
+#define dlmax (*__imp_dlmax)
+#define do_undump (*__imp_do_undump)
+#define doextract (*__imp_doextract)
+#define doswitches (*__imp_doswitches)
+#define dowarn (*__imp_dowarn)
+#define dumplvl (*__imp_dumplvl)
+#define e_fp (*__imp_e_fp)
+#define e_tmpname (*__imp_e_tmpname)
+#define endav (*__imp_endav)
+#define errgv (*__imp_errgv)
+#define eval_root (*__imp_eval_root)
+#define eval_start (*__imp_eval_start)
+#define fdpid (*__imp_fdpid)
+#define filemode (*__imp_filemode)
+#define firstgv (*__imp_firstgv)
+#define forkprocess (*__imp_forkprocess)
+#define formfeed (*__imp_formfeed)
+#define formtarget (*__imp_formtarget)
+#define gensym (*__imp_gensym)
+#define in_eval (*__imp_in_eval)
+#define incgv (*__imp_incgv)
+#define inplace (*__imp_inplace)
+#define last_in_gv (*__imp_last_in_gv)
+#define lastfd (*__imp_lastfd)
+#define lastscream (*__imp_lastscream)
+#define lastsize (*__imp_lastsize)
+#define lastspbase (*__imp_lastspbase)
+#define laststatval (*__imp_laststatval)
+#define laststype (*__imp_laststype)
+#define leftgv (*__imp_leftgv)
+#define lineary (*__imp_lineary)
+#define localizing (*__imp_localizing)
+#define localpatches (*__imp_localpatches)
+#define main_cv (*__imp_main_cv)
+#define main_root (*__imp_main_root)
+#define main_start (*__imp_main_start)
+#define mainstack (*__imp_mainstack)
+#define maxscream (*__imp_maxscream)
+#define maxsysfd (*__imp_maxsysfd)
+#define minus_F (*__imp_minus_F)
+#define minus_a (*__imp_minus_a)
+#define minus_c (*__imp_minus_c)
+#define minus_l (*__imp_minus_l)
+#define minus_n (*__imp_minus_n)
+#define minus_p (*__imp_minus_p)
+#define multiline (*__imp_multiline)
+#define mystack_base (*__imp_mystack_base)
+#define mystack_max (*__imp_mystack_max)
+#define mystack_sp (*__imp_mystack_sp)
+#define mystrk (*__imp_mystrk)
+#define nice_chunk (*__imp_nice_chunk)
+#define nice_chunk_size (*__imp_nice_chunk_size)
+#define nrs (*__imp_nrs)
+#define ofmt (*__imp_ofmt)
+#define ofs (*__imp_ofs)
+#define ofslen (*__imp_ofslen)
+#define oldlastpm (*__imp_oldlastpm)
+#define oldname (*__imp_oldname)
+#define op_mask (*__imp_op_mask)
+#define origargc (*__imp_origargc)
+#define origargv (*__imp_origargv)
+#define origfilename (*__imp_origfilename)
+#define ors (*__imp_ors)
+#define orslen (*__imp_orslen)
+#define pad_reset_pending (*__imp_pad_reset_pending)
+#define padix_floor (*__imp_padix_floor)
+#define parsehook (*__imp_parsehook)
+#define patchlevel (*__imp_patchlevel)
+#define perl_destruct_level (*__imp_perl_destruct_level)
+#define perldb (*__imp_perldb)
+#define preambleav (*__imp_preambleav)
+#define preambled (*__imp_preambled)
+#define preprocess (*__imp_preprocess)
+#define regflags (*__imp_regflags)
+#define restartop (*__imp_restartop)
+#define rightgv (*__imp_rightgv)
+#define rs (*__imp_rs)
+#define runlevel (*__imp_runlevel)
+#define sawampersand (*__imp_sawampersand)
+#define sawstudy (*__imp_sawstudy)
+#define sawvec (*__imp_sawvec)
+#define screamfirst (*__imp_screamfirst)
+#define screamnext (*__imp_screamnext)
+#define secondgv (*__imp_secondgv)
+#define signalstack (*__imp_signalstack)
+#define sortcop (*__imp_sortcop)
+#define sortstack (*__imp_sortstack)
+#define sortstash (*__imp_sortstash)
+#define splitstr (*__imp_splitstr)
+#define statcache (*__imp_statcache)
+#define statgv (*__imp_statgv)
+#define statname (*__imp_statname)
+#define statusvalue (*__imp_statusvalue)
+#define stdingv (*__imp_stdingv)
+#define strchop (*__imp_strchop)
+#define strtab (*__imp_strtab)
+#define sv_arenaroot (*__imp_sv_arenaroot)
+#define sv_count (*__imp_sv_count)
+#define sv_objcount (*__imp_sv_objcount)
+#define sv_root (*__imp_sv_root)
+#define tainted (*__imp_tainted)
+#define tmps_floor (*__imp_tmps_floor)
+#define tmps_ix (*__imp_tmps_ix)
+#define tmps_max (*__imp_tmps_max)
+#define tmps_stack (*__imp_tmps_stack)
+#define top_env (*__imp_top_env)
+#define toptarget (*__imp_toptarget)
+#define unsafe (*__imp_unsafe)
+#define warnhook (*__imp_warnhook)
diff --git a/cygwin32/gcc2 b/cygwin32/gcc2
new file mode 100644
index 0000000000..3da705cdbf
--- /dev/null
+++ b/cygwin32/gcc2
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# gcc wrapper for building dynamic lib version of perl
+# if -buildperl found on command line, then all args passed to
+# perlgcc, else pass all args to gcc.
+# jc 3/24/97
+#
+
+case "$*" in
+*-buildperl*) miniperl perlgcc "$@" ;;
+*) gcc "$@" ;;
+esac
diff --git a/cygwin32/ld2 b/cygwin32/ld2
new file mode 100644
index 0000000000..9aec8798fe
--- /dev/null
+++ b/cygwin32/ld2
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+# ld wrapper for building dynamic lib version of perl;
+# passes all args to ld.
+#
+
+PERLPATH=/perl5.004
+
+$PERLPATH/perl $PERLPATH/perlld "$@"
diff --git a/cygwin32/perlgcc b/cygwin32/perlgcc
new file mode 100644
index 0000000000..97d7d1a8a5
--- /dev/null
+++ b/cygwin32/perlgcc
@@ -0,0 +1,77 @@
+#
+
+# Perl script be a wrapper around the gnu gcc. the exportable perl.exe
+# is built, special processing is done.
+# This script is caled by the gcc2 shell script when the flag
+# -buildperl is passed to gcc2
+
+print "perlgcc: building exportable perl...\n";
+
+# get all libs:
+my @libobs;
+my @obs;
+my @libFlags;
+my $libstring;
+foreach (@ARGV){
+ if( /\.[a]$/){
+ push @libobs,$_;
+ }
+ elsif(/^\-l/){
+ push @libFlags,$_;
+ }
+ if( /\.[o]$/){
+ push @obs,$_;
+ }
+}
+$libstring = join(" ",@libobs);
+$obsString = join(" ",@obs);
+$libflagString = join(" ",@libFlags);
+
+# make exports file
+my $command = "echo EXPORTS > perl.def";
+print "$command\n";
+system($command);
+
+$command ="nm $libstring | grep '^........ [TCD] _'| grep -v _impure_ptr | sed 's/[^_]*_//' >> perl.def";
+print "$command\n";
+system($command);
+
+# Build the perl.a lib to link to:
+$command ="dlltool --as=as --dllname perl.exe --def perl.def --output-lib perl.a";
+print "$command\n";
+system($command);
+
+# change name of export lib to libperlexp so that is can be understood by ld2/perlld
+$command ="mv perl.a libperlexp.a";
+print "$command\n";
+system($command);
+
+# get the full path name of a few libs:
+my $crt0 = `gcc -print-file-name=crt0.o`;
+chomp $crt0;
+my $libdir = `gcc -print-file-name=libcygwin.a`;
+chomp $libdir;
+$libdir =~ s/libcygwin\.a//g;
+
+# Link exe:
+$command = "ld --base-file perl.base -o perl.exe $crt0 $obsString $libstring -L$libdir $libflagString";
+print "$command\n";
+system($command);
+
+$command = "dlltool --as=as --dllname perl.exe --def perl.def --base-file perl.base --output-exp perl.exp";
+print "$command\n";
+system($command);
+
+$command = "ld --base-file perl.base perl.exp -o perl.exe $crt0 $obsString $libstring -L$libdir $libflagString";
+print "$command\n";
+system($command);
+
+$command = "dlltool --as=as --dllname perl.exe --def perl.def --base-file perl.base --output-exp perl.exp";
+print "$command\n";
+system($command);
+
+$command = "ld perl.exp -o perl.exe $crt0 $obsString $libstring -L$libdir $libflagString";
+print "$command\n";
+system($command);
+
+print "perlgcc: Completed\n";
diff --git a/cygwin32/perlld b/cygwin32/perlld
new file mode 100644
index 0000000000..1622f2ffaf
--- /dev/null
+++ b/cygwin32/perlld
@@ -0,0 +1,192 @@
+#
+# Perl script be a wrapper around the gnu ld. When a dll is specified to
+# to be built, special processing is done, else the standard ld is called.
+#
+# Modified 3/14/97 to include the impure_ptr setup routine in init.cc
+# Modified to make dll in current directory then copy to another dir if
+# a path name specified on the command name with the -o parm.
+#
+
+my $args = join(" ",@ARGV); # get args
+my $arg;
+
+my @objs;
+my @flags;
+my $libname;
+my $init = "init";
+my $fixup = "fixup";
+
+my $path;
+
+
+sub writefixup;
+sub writeInit;
+
+if( $args=~/\-o (.+?)\.dll/i){
+ $libname = $1;
+ # print "libname = <$libname>\n";
+ # Check for path:
+ if( $libname =~ /($\.+?\/)(\w+$)/){
+ $path = $1;
+ $libname = $2;
+ # print "<$path> <$libname>\n";
+ }
+
+ foreach $arg(@ARGV){
+ if( $arg=~/\.[oa]$/){
+ push @objs,$arg;
+ next;
+ }
+ if( $arg =~/\-o/ or $arg =~ /.+?\.dll/i ){
+ next;
+ }
+ push @flags,$arg;
+ }
+
+ writefixup();
+ writeInit();
+ $command = "gcc -c $fixup.c\n";
+ print $command;
+ system($command);
+ $command = "gcc -c $init.cc\n";
+ print $command;
+ system($command);
+
+ $command = "echo EXPORTS > $libname.def\n";
+ print $command;
+ system($command);
+ $command = "nm ".join(" ",@objs)." $init.o $fixup.o | grep '^........ [TCD] _' | sed 's/[^_]*_//' >> $libname.def\n";
+ print $command;
+ system($command);
+
+ $command = "ld --base-file $libname.base --dll -o $libname.dll ".join(" ",@objs)." $init.o $fixup.o ";
+ $command .= join(" ",@flags)." -e _dll_entry\@12 \n";
+ print $command;
+ system($command);
+
+ $command = "dlltool --as=as --dllname $libname.dll --def $libname.def --base-file $libname.base --output-exp $libname.exp\n";
+ print $command;
+ system($command);
+
+ $command = "ld --base-file $libname.base $libname.exp --dll -o $libname.dll ".join(" ",@objs)." $init.o $fixup.o ";
+ $command .= join(" ",@flags)." -e _dll_entry\@12 \n";
+ print $command;
+ system($command);
+
+ $command = "dlltool --as=as --dllname $libname.dll --def $libname.def --base-file $libname.base --output-exp $libname.exp\n";
+ print $command;
+ system($command);
+
+ $command = "ld $libname.exp --dll -o $libname.dll ".join(" ",@objs)." $init.o $fixup.o ";
+ $command .= join(" ",@flags)." -e _dll_entry\@12 \n";
+ print $command;
+ system($command);
+
+ print "Build the import lib\n";
+ $command = "dlltool --as=as --dllname $libname.dll --def $libname.def --output-lib $libname.a\n";
+ print $command;
+ system($command);
+
+ # if there was originally a path, copy the dll and a to that location:
+ if($path && $path ne "./" && $path."\n" ne "`pwd`"){
+ $command = "mv $libname.dll $path".$libname.".dll\n";
+ print $command;
+ system($command);
+ $command = "mv $libname.a $path".$libname.".a\n";
+ print $command;
+ system($command);
+
+ }
+
+}
+else{ # no special processing, just call ld
+ $command = "ld $args\n";
+ print $command;
+ system($command);
+}
+
+#---------------------------------------------------------------------------
+sub writeInit{
+
+open(OUTFILE,">$init.cc") or die("Can't open $init.cc\n");
+
+print OUTFILE <<'EOF';
+/* init.cc for WIN32.
+
+ Copyright 1996 Cygnus Solutions
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+// Added impure_ptr initialization routine. This is needed for any DLL that needs
+// to output to the main (calling) executable's stdout, stderr, etc. This routine
+// needs to be called from the executable using the DLL before any other DLL
+// routines are called. jc 3/14/97
+
+#include <windows.h>
+
+extern "C"
+{
+ int WINAPI dll_entry (HANDLE h, DWORD reason, void *ptr);
+ void impure_setup(struct _reent *_impure_ptrMain);
+};
+
+struct _reent *_impure_ptr; // this will be the Dlls local copy of impure ptr
+
+int WINAPI dll_entry (HANDLE ,
+ DWORD reason,
+ void *)
+{
+ switch (reason)
+ {
+ case DLL_PROCESS_ATTACH:
+ break;
+ case DLL_PROCESS_DETACH:
+ break;
+ case DLL_THREAD_ATTACH:
+ break;
+ case DLL_THREAD_DETACH:
+ break;
+ }
+ return 1;
+}
+
+
+//********************************************
+// Function to set our local (in this dll) copy of impure_ptr to the
+// main's (calling executable's) impure_ptr
+void impure_setup(struct _reent *_impure_ptrMain){
+
+ _impure_ptr = _impure_ptrMain;
+
+}
+EOF
+
+close OUTFILE;
+
+}
+
+#---------------------------------------------------------------------------
+sub writefixup{
+
+open(OUTFILE,">$fixup.c") or die("Can't open $fixup.c\n");
+
+print OUTFILE <<'EOF';
+/* This is needed to terminate the list of inport stuff */
+/* Copied from winsup/dcrt0.cc in the cygwin32 source distribution. */
+ asm(".section .idata$3\n" ".long 0,0,0,0, 0,0,0,0");
+
+EOF
+close OUTFILE;
+}