xref: /openbsd-src/gnu/usr.bin/perl/os2/Changes (revision b2ea75c1b17e1a9a339660e7ed45cd24946b230e)
1after 5.003_05:
2	PERLLIB_PREFIX was not active if it matches an element of @INC
3		as a whole.
4	Do not need PERL_SBRK if crtdll-revision is >= 50.
5	Use -Zsmall-conv if crtdll-revision is >= 50 (in static perl!).
6:7: warning: #warning <dirent.h> requires <sys/types.h>
7	We compile miniperl static. It cannot fork, thus there may be
8		problems with pipes (since HAS_FORK is in
9		place). Pipes are required by makemaker.
10	We compile perl___.exe A.OUT and dynamic. It should be able to
11		fork.
12	If we can fork, we my_popen by popen unless "-|". Thus we
13		write a cooky "-1" into the pid array to indicate
14		this.
15	Apparently we can fork, and we can load dynamic extensions
16		now, though probably not simultaneously.
17	*DB tests corrected for OS/2 one-user stat[2].
18	/bin/sh is intercepted and replaced by SH_PATH.
19	Note that having '\\' in the command line of one-arg `system'
20		would trigger call via shell.
21	Segfault with system {'ls'} 'blah'; corrected.
22	Documentation of OS/2-different features added to main PODs.
23	New buitins in Cwd::
24
25		Cwd::current_drive
26		Cwd::sys_chdir		- leaves drive as it is.
27		Cwd::change_drive
28		Cwd::sys_is_absolute	- has drive letter and is_rooted
29		Cwd::sys_is_rooted	- has leading [/\\] (maybe
30					  after a drive)
31		Cwd::sys_is_relative	- changes with current dir
32		Cwd::sys_cwd		- Interface to cwd from EMX.
33		Cwd::sys_abspath(name, dir)
34					- Really really odious
35					  function. Returns absolute
36					  name of file which would
37					  have 'name' if CWD were 'dir'.
38					Dir defaults to the current dir.
39		Cwd::extLibpath [type]	- Get/set current value of extended
40		Cwd::extLibpath_set	- library search path.
41			path [type]
42					The optional last argument redirects
43					   to END-path if true,
44					   default is to search BEGIN-path.
45		(Note that some of these may be moved to different
46		  libraries - eventually).
47	Executables:
48		perl - can fork, can dynalink (but not simultaneously)
49		perl_ - can fork, cannot dynalink
50		perl__ - same as perl___, but PM.
51		perl___ - cannot fork, can dynalink.
52	The build of the first one - perl - is rather convoluted, and
53	  requires a build of miniperl_.
54
55after 5.003_07:
56	custom tmpfile and tmpname which may use $TMP, $TEMP.
57	all the calls to OS/2 API wrapped so that it is safe to use
58		them under DOS (may die(), though).
59	Tested that popen works under DOS with modified PDKSH and RSX.
60	File::Copy works under DOS.
61	MakeMaker modified to work under DOS (perlmain.c.tmp and sh -c true).
62
63after 5.003_08:
64	OS2::PrfDB exports symbols as documented;
65	should work on OS/2 2.1 again.
66	uses reliable signals when spawing.
67	do not use popen() any more - no intermediate shell unless needed.
68
69after 5.003_11:
70	Functions emx_{malloc,realloc,calloc,free} are exported from DLL.
71	get_sysinfo() bugs corrected (flags were not used and wrongly defined).
72
73after 5.003_20:
74	_isterm is substituted instead of isatty, s?random instead of srand.
75	`register' disabled if -DDEBUGGING and not AOUT build: stupid SD386.
76	3-argument select() was stomping over memory.
77
78after 5.003_21:
79	Can start scripts by executing 'dir/script' and
80	'script.sh'. Form without extension will call shell only if
81	the specified file exists (will not look on path) (to prohibit
82	trying to run shell commands directly). - Needed by magic.t.
83
84after 5.003_27:
85	ALTERNATE_SHEBANG="extproc " supported, thus options on this
86	line are processed (possibly twice). -S is made legal on such
87	a line. This -S -x is not needed any more.
88	perl.dll may be used from non-EMX programs (via PERL_SYS_INIT
89	- the caller should have valid variable "env" with
90	environment). Known problems: $$ does not work - is 0, waitpid
91	returns immediately, thus Perl cannot wait for completion of
92	started programs.
93
94after 5.004_01:
95	flock emulation added (disable by setting env PERL_USE_FLOCK=0),
96		thanks to Rocco Caputo;
97	RSX bug with missing waitpid circomvented;
98	-S bug with full path with \ corrected.
99
100before 5.004_02:
101	-S switch to perl enables a search with additional extensions
102	.cmd, .btm, .bat, .pl as well.  This means that if you have
103	mycmd.pl or mycmd.bat on PATH,
104		perl -S mycmd
105	will work.  Perl will also look in the current directory first.
106	Moreover, a bug with \; in PATH being non-separator is fixed.
107
108after 5.004_03:
109	$^E tracks calls to CRT now.  (May break if Perl masks some
110	changes to errno?)
111	$0 may be edited to longer lengths (at least under OS/2).
112	OS2::REXX->loads looks in the OS/2-ish fashion too.
113
114after 5.004_04:
115	Default perl.exe was built with a shorter stack than expected.
116	Strip extensions DLLs too (unless debugging build).
117	./os2.c being RO could stop cp.
118	When starting scripts, Perl will find them on path (using the same
119	  extensions as for -S command-line switch).  If it finds magic
120	  `extproc ' or `#!' cookies, it will start the scripts directly.
121	May use `cmd /c more <' as a pager.
122	If a program could not be started, this might have been hidden.
123	End of pipe was closed twice when `open'ing a pipeline.
124
125after 5.004_53:
126	Minimal thread support added.  One needs to manually move pthread.h
127
128after 5.004_64:
129	Make DLL names different if thread-enabled.
130	Emit more informative internal DLL descriptions.
131
1325.004_72:
133	Updated OS2::Process (v0.2) included.
134
135after 5.004_73:
136	Fixed a bug with argv not NULL-terminated when starting scripts.
137	Support all the forms of starting scripts.
138	Support killing a child when receiving a signal during system()
139	(in two stage, on first send the same signal, on the next
140	send SIGKILL).
141	Add the same logic for scripts as in pdksh, including
142		stripping the path from #! line if needed,
143		calling EXECSHELL or COMSPEC for magic-less scripts;
144	Now pdksh is called only if one-arg system()/friends contains
145	metachars, or if magic-line asks for sh, or there is no magic
146	line and EXECSHELL is set to sh.
147	Shell is supplied the original command line if possible.
148
149after 5.005_02:
150	Can start PM programs from non-PM sessions by plain system()
151		and friends.  Can start DOS/Win programs.  Can start
152		fullscreen programs from non-fullscreen sessions too.
153	In fact system(P_PM,...) was broken.
154	We mangle the name of perl*.DLL, to allow coexistence of different
155		versions of Perl executables on the system.  Mangling of
156		names of extension DLL is also changed, thus running two
157		different versions of the executable with loaded
158		extensions should not lead to conflicts (since
159		extension-full-name and Perl-version mangling work in the
160		same set ot 576 possible keys, this may lead to clashes).
161	$^E was reset on the second read, and contained ".\r\n" at the end.
162
163after 5.005_53:
164	Would segfault system()ing non-existing program;
165	AOUT build was hosed;
166	warning-test for getpriority() might lock the system hard on
167		pre-fixpak22 configuration (calling getpriority() on
168		non-existing process triggers a system-wide bug).
169
170
171	PrfDB was using a bug in processing XSUBs returning U32.
172
173	Variable $OS2::emx_rev implemented (string and numberic values
174		are the same as C variables _emx_rev and _emx_vprt).
175	Variable $OS2::emx_env implemented (same as C variable _emx_env).
176	Variable $OS2::os_ver implemented (_osmajor + 0.001 * _osminor).
177
178	Improved centralized management of HAB and HMQ.  To get Perl's
179		HAB, call perl_hab_GET().  (After the initial call one
180		can use Perl_hab instead.)  To require Perl's HMQ,
181		call perl_hmq_GET(), to release it call perl_hmq_UNSET(),
182		to obtain it between these calls use Perl_hmq.
183	HMQ management is refcounted, and the program will morph
184		itself into/from PM if required.
185	If perl.h cannot be included, hab may be obtained by Perl_hab_GET().
186
187	New function OS2::Error(do_harderror,do_exception).  Returns
188		undef if it was not called yet, otherwise bit 1 is
189		set if on previous call do_harderror was enabled, bit
190		2 is set if if on previous call do_exception was enabled.
191	This function enables/disables error popups associated with
192		hardware errors (Disk not ready etc.) and software exceptions.
193
194	New function OS2::Errors2Drive(drive).  Returns undef if it was
195		not called yet, otherwise return false if Errors were
196		not requested to be written to a hard drive, or the
197		drive letter if this was requested.
198	This function may redirect error popups associated with
199		hardware errors (Disk not ready etc.) and software exceptions
200		to the file POPUPLOG.OS2 at the root directory of the
201		specified drive.  Overrides OS2::Error() specified by
202		individual programs.  Given argument undef will
203		disable redirection.  Has global effect, persists
204		after the application exits.
205
206	New function OS2::SysInfo().  Returns a hash with system information.
207		The keys of the hash are
208
209		MAX_PATH_LENGTH, MAX_TEXT_SESSIONS, MAX_PM_SESSIONS,
210		MAX_VDM_SESSIONS, BOOT_DRIVE, DYN_PRI_VARIATION,
211		MAX_WAIT, MIN_SLICE, MAX_SLICE, PAGE_SIZE,
212		VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION,
213		MS_COUNT, TIME_LOW, TIME_HIGH, TOTPHYSMEM, TOTRESMEM,
214		TOTAVAILMEM, MAXPRMEM, MAXSHMEM, TIMER_INTERVAL,
215		MAX_COMP_LENGTH, FOREGROUND_FS_SESSION,
216		FOREGROUND_PROCESS
217
218	New function OS2::BootDrive(force).  Returns a letter without colon.
219
220	New functions OS2::MorphPM(serve)/OS2::UnMorphPM(serve).  Transforms
221		the current application into a PM application and back.
222		The argument true means that a real message loop is
223		going to be performed.
224	OS2::MorphPM() returns the PM message queue handle as an integer.
225
226	New function OS2::Serve_Messages(force).  Fake on-demand
227		retrieval of outstanding PM messages.  If force is false,
228		will not dispatch messages if a real message loop is known to
229		be present.  Returns number of messages retrieved.
230	Dies with "QUITing..." if WM_QUIT message is obtained.
231
232	New function OS2::Process_Messages(force [, cnt]).  Retrieval
233		of PM messages until window creation/destruction.
234		If force is false, will not dispatch messages
235		if a real message loop is known to be present.
236		Returns change in number of windows.  If cnt is given,
237		it is incremented by the number of messages retrieved.
238	Dies with "QUITing..." if WM_QUIT message is obtained.
239
240after 5.005_54:
241 	Opening pipes from/to processes could fail if (un)appropriate
242 	combination of STDIN/STDOUT was closed.
243
244 	If the only shell-metachars of a command are ' 2>&1' at the
245 	end of a command, it is executed without calling the external shell.
246
247after 5.005_57:
248	Make UDP sockets return correct caller address (OS2 API bug);
249	Enable TCPIPV4 defines (works with Warp 3 IAK too?!);
250	Force Unix-domain sockets to start with "/socket", convert
251	  '/' to '\' in the calls;
252	Make C<system 1, $cmd> to treat $cmd as in C<system $cmd>;
253	Autopatch Configure;
254	Find name and location of g[nu]patch.exe;
255	Autocopy perl????.dll to t/ when testing;
256
257after 5.005_62:
258	Extract a lightweight DLL access module OS2::DLL from OS2::REXX
259	   which would not load REXX runtime system;
260	Allow compile with os2.h which loads os2tk.h instead of os2emx.h;
261	Put the version of EMX CRTL into -D define;
262	Use _setsyserror() to store last error of OS/2 API for $^E;
263	New macro PERL_SYS_INIT3(argvp, argcp, envp);
264	Make Dynaloader return info on the failing module after failed dl_open();
265	OS2::REXX test were done for interactive testing (were writing
266	  "ok" to stderr);
267	system() and friends return -1 on failure (was 0xFF00);
268	Put the full name of executable into $^X
269	  (alas, uppercased - but with /);
270	t/io/fs.t was failing on HPFS386;
271	Remove extra ';' from defines for MQ operations.
272
273pre 5.6.1:
274	Resolved: "Bad free()" messages (e.g., from DB_File) with -Zomf build.
275	   The reason was: when an extension DLL was linked, the order of
276	   libraries was similar to this:
277		f1.obj f2.obj libperl.lib -llibr1 -llibr2
278	   (with C RTL implicitly after this).  When libperl.lib overrides
279	   some C RTL functions, they are correctly resolved when mentioned
280	   in f1.obj and f2.obj.  However, the resolution for libr1.lib and
281	   libr2.lib is implementation-dependent.
282
283	   With -Zomf linking the symbols are resolved for libr1.lib and
284	   libr2.lib *only if* they reside in .obj-file-sections of libperl.lib
285	   which were already "picked up" for symbols in f1.obj f2.obj.
286	   However, libperl.lib is an import library for a .DLL, so *each
287	   symbol in libperl.lib sits in its own pseudo-section*!
288
289	   Corollary: only those symbol from libperl.lib which were already
290	   mentioned in f1.obj f2.obj would be used for libr1.lib and
291	   libr2.lib.  Example: if f1.obj f2.obj do not mention calloc() but
292	   libr1.lib and libr2.lib do, then .lib's will get calloc() of C RTL,
293	   not one of libperl.lib.
294
295	   Solution: create a small duplicate of libperl.lib with overriding
296	   symbols only.  Put it *after* -llibr1 -llibr2 on the link line.
297	   Map strdup() and putenv() to Perl_strdup() and Perl_putenv()
298	   inside this library.
299
300	Resolved: rmdir() and mkdir() do not accept trailing slashes.
301	   Wrappers are implemented.
302	Resolved: when loading modules, FP mask may be erroneously changed by
303	   _DLLInitTerm() (e.g., TCP32IP).
304		Solutions: a) dlopen() saves/restores the FP mask.
305			   b) When starting, reset FP mask to a sane value
306				(if the DLL was compile-time linked).
307	New functions in package OS2:
308		unsigned _control87(unsigned new,unsigned mask)	# as in EMX
309		unsigned get_control87()
310		# with default values good for handling exception mask:
311		unsigned set_control87_em(new=MCW_EM,mask=MCW_EM)
312	    Needed to guard against other situations when the FP mask is
313	    stompted upon.  Apparently, IBM used a compiler (for some period
314	    of time around '95?) which changes FP mask right and left...
315	Resolved: $^X was always uppercased (cosmetic).  Solution:
316	    use argv[0] if it differs from what the OS returns only in case.
317	Resolved: when creating PM message queues, WinCancelShutdown() was
318	    not called even if the application said that it would not serve
319	    messages in this queue.  Could result in PM refusing to shutdown.
320
321	    Solution: resolve WinCancelShutdown at run time, keep the refcount
322	    of who is going to serve the queue.
323	Resolved: Perl_Deregister_MQ() segfaulted (pid/tid not initialized).
324	Resolved: FillWinError() would not fetch the error.
325	    Solution: resolve WinGetLastError at run time, call it.
326	Resolved: OS2::REXX would ignore arguments given to a Perl function
327	    imported into the REXX compartment via REXX_eval_with().
328	Resolved: OS2::REXX would treat arguments given to a Perl function
329	    imported into the REXX compartment via _register() as ASCIIZ
330	    strings inside of binary strings.
331	Resolved: OS2::REXX did not document _register().
332	Resolved: OS2::REXX would not report the error to REXX if an error
333	    condition appeared during a call to Perl function from REXX
334	    compartment.  As a result, the return string was not initialized.
335	A complete example of a mini-application added to OS2::REXX.
336	README.os2 updated to reflect the current state of Perl.
337