From 15910bf2b59d737b19d2a9d70e00156c47cbe179 Mon Sep 17 00:00:00 2001 From: rbowler Date: Fri, 3 Oct 2003 16:24:00 +0200 Subject: [PATCH] version 3.00 What's new in release 3.00 Release date: 2 October 2003 * Dynamically loaded module support for devices, instructions, and operator console panels (Jan Jaeger, David "Fish" Trout, Ivan Warren) * Shared and remote DASD support (Greg Smith) * z990 (ALS4) instruction support (Roger Bowler, Jan Jaeger, Bernard van der Helm) * HFP Multiply-Add/Subtract Facility (Roger Bowler) * Long Displacement Facility (Roger Bowler) * Simplified network adapter specifications (David "Fish" Trout, Jim Pierson) * New device emulations: 2703, 3410, 3490, 9347 (Ivan Warren) * ECPS:VM support (Ivan Warren) * Reworked process priority handling (Mark Gaubatz) * Greatly improved interval timer resolution (Mark Gaubatz) * Internal consistency checking improvvements (Greg Smith) * Corrected 3270 session disconnect processing (Ivan Warren) * Instruction disassembler in control panel (Jan Jaeger) * Tape read backward fixes (Jay Jaeger) * Fix for double memory consumption bug on Windows (Mark D., David "Fish" Trout) * OMA tape processing fixes (Ivan Warren) * Message logging restructuring (Jan Jaeger, David "Fish" Trout) * S/370 I/O race condition fixes (Victor Shkamerda, Greg Smith) * Manual pages for some commands (Jim Morrison) --- CHANGES | 258 +- Makefile.am | 677 +- Makefile.in | 1478 ++- README.COMMADPT | 149 + README.CVS | 130 + README.ECPSVM | 170 + README.HDL | 634 + README.NETWORKING | 326 +- README.OSX | 162 +- README.TAPE | 189 + RELEASE.NOTES | 107 + aclocal.m4 | 6453 +++++++++ autoconf/config.guess | 433 +- autoconf/config.sub | 293 +- autoconf/ltmain.sh | 6321 +++++++++ autoconf/mkinstalldirs | 73 +- bootstrap.c | 15 + cache.c | 555 + cache.h | 360 + cardpch.c | 35 +- cardrdr.c | 95 +- cckddasd.c | 3015 +++-- cckddiag.c | 674 + cckdfix.c | 107 + cckdutil.c | 84 +- cgibin.c | 54 +- channel.c | 1268 +- ckddasd.c | 640 +- cmpsc.c | 202 +- codepage.c | 168 +- codepage.h | 19 +- commadpt.c | 2459 ++++ commadpt.h | 113 + config.c | 1480 ++- config.h.in | 188 +- configure | 27597 ++++++++++++++++++++++++++++++++------- configure.ac | 371 +- console.c | 285 +- control.c | 283 +- cpu.c | 687 +- cpuint.h | 375 +- crypto.c | 120 + crypto.h | 14 + ctc_ctci.c | 104 +- ctc_lcs.c | 229 +- ctcadpt.c | 217 +- ctcadpt.h | 10 +- dasdcat.c | 14 +- dasdcopy.c | 68 +- dasdinit.c | 76 +- dasdisup.c | 58 +- dasdload.c | 52 +- dasdls.c | 2 + dasdpdsu.c | 2 + dasdseq.c | 1188 ++ dasdtab.c | 56 +- dasdutil.c | 325 +- dat.h | 290 +- decimal.c | 173 + devtype.c | 63 - devtype.h | 22 +- diagmssf.c | 2 +- diagnose.c | 103 +- dyngui.c | 1014 ++ dyngui.rc | 59 + dynguib.h | 6 + dynguip.h | 21 + dynguiv.h | 32 + dyninst.c | 434 + ecpsvm.c | 2969 +++++ ecpsvm.h | 377 + esa390.h | 1775 +-- esame.c | 1845 ++- external.c | 170 +- fbadasd.c | 603 +- feat370.h | 1 + feat390.h | 6 +- feat900.h | 11 +- featall.h | 27 +- featchk.h | 47 +- feature.h | 168 +- float.c | 712 +- fthreads.c | 378 +- fthreads.h | 52 +- general1.c | 161 +- general2.c | 23 +- hdl.c | 859 ++ hdl.h | 244 + hdlmain.c | 220 + hdteq.c | 99 + herc_getopt.h | 63 + hercifc.c | 11 + hercifc.h | 17 +- hercnls.h | 24 +- hercules.cnf | 159 +- hercules.h | 809 +- hetget.c | 3 + hetinit.c | 42 +- hetlib.c | 312 +- hetlib.h | 2 + hetmap.c | 7 +- hetupd.c | 15 +- hsccmd.c | 814 +- hscmisc.c | 143 +- hscutl.c | 493 + hscutl.h | 85 + hscutl2.c | 234 + hsys.c | 11 + html/Makefile.am | 9 +- html/Makefile.in | 55 +- html/hercconf.html | 629 +- html/hercfaq.html | 1008 +- html/hercinst.html | 319 +- html/hercload.html | 12 +- html/hercmsca.html | 431 + html/hercmscf.html | 208 +- html/hercmscp.html | 38 +- html/hercmsct.html | 6 +- html/hercmsda.html | 6 +- html/hercmsdc.html | 6 +- html/hercmsdg.html | 201 + html/hercmsdi.html | 6 +- html/hercmsdl.html | 6 +- html/hercmsds.html | 6 +- html/hercmsdt.html | 6 +- html/hercmsdu.html | 4 +- html/hercmsg.html | 18 +- html/hercmshe.html | 6 +- html/hercmshg.html | 6 +- html/hercmshm.html | 6 +- html/hercmsht.html | 6 +- html/hercmshu.html | 6 +- html/hercmsif.html | 6 +- html/hercmsin.html | 30 +- html/hercmslc.html | 6 +- html/hercmslg.html | 134 + html/hercmspn.html | 6 +- html/hercmspr.html | 6 +- html/hercmspu.html | 6 +- html/hercmsrd.html | 6 +- html/hercmssd.html | 4 +- html/hercmsta.html | 6 +- html/hercmstc.html | 6 +- html/hercmste.html | 15 +- html/hercmstm.html | 6 +- html/hercmsts.html | 6 +- html/hercmstt.html | 68 + html/hercmstu.html | 6 +- html/hercnew.html | 29 +- html/hercrdr.html | 6 +- html/hercrnot.html | 113 + html/herctcp.html | 13 +- html/hercules.html | 4 +- html/index.html | 41 +- httpmisc.h | 8 + httpserv.c | 109 +- ieee.c | 288 +- if_tun.h | 92 - impl.c | 279 +- inline.h | 2 +- intl/loadmsgcat.c | 2 + io.c | 20 +- ipl.c | 89 +- linklist.h | 3 +- logger.c | 373 + logger.h | 71 + logmsg.c | 187 + ltdl.c | 4487 +++++++ ltdl.h | 366 + m4/Makefile.in | 49 +- machchk.c | 17 +- machdep.h | 155 +- man/Makefile.am | 5 + man/Makefile.in | 339 + man/cckd.4 | 113 + man/cckddiag.1 | 86 + man/dasdseq.1 | 141 + memrchr.c | 30 + memrchr.h | 25 + opcode.c | 688 +- opcode.h | 636 +- panel.c | 1477 +-- plo.c | 76 +- po/ChangeLog | 10 + po/POTFILES.in | 59 +- po/de.gmo | Bin 871 -> 894 bytes po/de.po | 8321 ++++++++---- po/hercules.pot | 6048 ++++++--- po/nl.gmo | Bin 464 -> 1221 bytes po/nl.po | 7734 +++++++---- printer.c | 71 +- qdio.c | 108 + service.c | 922 +- service.h | 452 + shared.c | 2967 +++++ shared.h | 501 + sie.c | 9 +- sllib.c | 254 +- sllib.h | 1 + sockdev.c | 609 + sockdev.h | 5 + tapecopy.c | 58 +- tapedev.c | 3586 +++-- tapedev.h | 199 + tapemap.c | 14 +- tapesplt.c | 16 +- timer.c | 61 +- tt32api.h | 103 +- tuntap.c | 44 +- util/Makefile.am | 2 +- util/Makefile.in | 55 +- util/awswrite.jcl | 379 + version.c | 37 +- version.h | 3 + vm.c | 100 +- vstore.h | 51 +- w32chan.c | 72 +- w32chan.h | 6 +- w32ctca.c | 36 +- w32ctca.h | 2 - 220 files changed, 100466 insertions(+), 23896 deletions(-) create mode 100644 README.COMMADPT create mode 100644 README.CVS create mode 100644 README.ECPSVM create mode 100644 README.HDL create mode 100644 README.TAPE create mode 100644 RELEASE.NOTES create mode 100644 autoconf/ltmain.sh create mode 100644 bootstrap.c create mode 100644 cache.c create mode 100644 cache.h create mode 100644 cckddiag.c create mode 100644 cckdfix.c create mode 100644 commadpt.c create mode 100644 commadpt.h create mode 100644 crypto.c create mode 100644 crypto.h create mode 100644 dasdseq.c delete mode 100644 devtype.c create mode 100644 dyngui.c create mode 100644 dyngui.rc create mode 100644 dynguib.h create mode 100644 dynguip.h create mode 100644 dynguiv.h create mode 100644 dyninst.c create mode 100644 ecpsvm.c create mode 100644 ecpsvm.h create mode 100644 hdl.c create mode 100644 hdl.h create mode 100644 hdlmain.c create mode 100644 hdteq.c create mode 100644 herc_getopt.h create mode 100644 hscutl.c create mode 100644 hscutl.h create mode 100644 hscutl2.c create mode 100644 hsys.c create mode 100644 html/hercmsca.html create mode 100644 html/hercmsdg.html create mode 100644 html/hercmslg.html create mode 100644 html/hercmstt.html create mode 100644 html/hercrnot.html delete mode 100644 if_tun.h create mode 100644 logger.c create mode 100644 logger.h create mode 100644 logmsg.c create mode 100644 ltdl.c create mode 100644 ltdl.h create mode 100644 man/Makefile.am create mode 100644 man/Makefile.in create mode 100644 man/cckd.4 create mode 100644 man/cckddiag.1 create mode 100644 man/dasdseq.1 create mode 100644 memrchr.c create mode 100644 memrchr.h create mode 100644 po/ChangeLog create mode 100644 qdio.c create mode 100644 service.h create mode 100644 shared.c create mode 100644 shared.h create mode 100644 sockdev.c create mode 100644 sockdev.h create mode 100644 tapedev.h create mode 100644 util/awswrite.jcl diff --git a/CHANGES b/CHANGES index c7fbf3b..cfe0d82 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,259 @@ +#### Don't forget to change the version number in configure.ac! #### + +02 Oct 2003 Issue warning message when restoring non-IEBCOPY xmit file + using dasdload - Greg Smith +01 Oct 2003 Fix segmentation fault using NPTL threads and no console + device is specified - Greg Smith +29 Sep 2003 Backout STUPID (dangerous) 16 Aug 2003 het changes now that + configure.ac detects the bug that was causing it - Fish + (I can't believe I did that; I must have been tired) +27 Sep 2003 Correct Makefile.am Transient variable names to not end + with automake primaries - Ivan Warren +25 Sep 2003 PowerOff diagnose for 4361 & 937X processors - Tomas Masek by Fish +25 Sep 2003 Fix DASDCOPY bug copying too much to uncompressed FBA o/p - Fish +25 Sep 2003 Fix dasdtab entry for 3310 FBA device type - Fish +25 Sep 2003 Initial power-on reset for mainstor & expanded storage - Fish +25 Sep 2003 Resolve & verify HTTPROOT in config.c before startup - Fish +25 Sep 2003 Fix bug in fbadasd_init_handler causing DASDCOPY crash - Fish +21 Sep 2003 Complete overhaul to the build process (merge of libtool_exp) + version set to 2.17.c0 + - A Lot of People (commit by Ivan Warren) +21 Sep 2003 Added test for cygwin gcc alloca bug to configure.ac to fix + issue of http server (and possibly other things) crashing - Fish +20 Sep 2003 Add disassemble command (u [r|v|p|h] addr range) - Jan Jaeger +16 Sep 2003 Tape read backward fixes contributed by Jay Jaeger - Fish +16 Sep 2003 Repair DEVPRIO handling - Mark L. Gaubatz +28 Aug 2003 Check mmap return value when allocating main storg - Ivan Warren +24 Aug 2003 fix for Asynch I/O Status stacking race condition - Ivan Warren +24 Aug 2003 Add modpath configuration statement - Jan Jaeger +22 Aug 2003 Remove setpriority from execute_ccw_chain and instead + move it directly into the device thread itself - Fish +22 Aug 2003 Add support for strlcpy/strlcat and use in httpserv.c + (please use where possible instead of strncpy/strncat) - Fish +22 Aug 2003 Define default priorities for WIN32 / non-WIN32 - Fish +20 Aug 2003 Correct interval timer references and resolution - Mark L. Gaubatz +19 Aug 2003 Make devlist command immune from DEVBLK chain sequence - Fish +19 Aug 2003 Windows "double memory consumption" fix contributed by + Mark D. (golden_dog98 [golden_dog98@yahoo.com]) - Fish +19 Aug 2003 Committed Jim Pierson's "-g -O2" optimization flags fix - Fish +19 Aug 2003 Fix dasdtab to provide correct model numbers for + sense ID on 3340-1 (35M) and 3340-2 (70M) - Ivan Warren +19 Aug 2003 Removed W32 only symbol from linux build in ctcadpt - Ivan Warren +19 Aug 2003 Fixed nested lock issue in LCS freezing on Linux - Ivan Warren +19 Aug 2003 Fixed herc crash when "attach" CTCI with no parm - Jim Pierson +19 Aug 2003 Allow Write Record 0 after Write Home Address on CKDs + problem initially reported by Jay Jaeger(cube1us) - Ivan Warren +18 Aug 2003 Re-instated fast dev lookup as a cache facility + Thanks Fish for the suggestions - Ivan Warren +17 Aug 2003 Added HERCPRIO, DEVPRIO and TODPRIO - Mark L. Gaubatz +17 Aug 2003 Disabled Fast devnum & subchan lookup because of + some incompatibilities / reported by yvangamache - Ivan Warren +16 Aug 2003 fix tt32stats command when OPTION_DYNAMIC_LOAD - Fish +16 Aug 2003 fix CTCI segfault caused by bug in build_config when + OPTION_CONFIG_SYMBOLS specified - Fish +16 Aug 2003 fix 'make install-strip' issue with dyn devices identified + by yvangamache [yvangamache@hotmail.com] -- Fish +16 Aug 2003 copytape (hetupd.c), main (hetmap.c), het_read, het_write + (hetlib.c): define global static I/O buffers to work around + pre gcc 3.2 bug #8750 identified on "04 Jan 2003" - Fish + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8750 +15 Aug 2003 Compress ESAME psw in semi graphic panel - Jan Jaeger +14 Aug 2003 Updated dasdutil.c for HDL compatibility - Ivan Warren +14 Aug 2003 Added D/T 3422,3430 to hdteq & tapedev(hdt3420) - Ivan Warren +14 Aug 2003 Cosmetics : Correct HHCTE006A Prompt - Ivan Warren +14 Aug 2003 Fast Devnum & Subchannel lookup algorithm - Ivan Warren +11 Aug 2003 Dequeued IOINT struct off of sysblk.iointq during + TIO/TSCH to prevent incorrect PCI/Final irpt reordering. + OS360/MVT Now IPLs correctly. + All changed marked with "ISW20030812" - Ivan Warren +08 Aug 2003 2.17.b2: fixed incorrectly typed thread functions - Fish + all thread functions s/b "void *thread(void *arg)", not + void thread(void *arg) or void *thread() or anything else +08 Aug 2003 Increased 2311 Alt Cyl count from 2 to 3 - Ivan Warren +07 Aug 2003 Codepage extensions (iconv) - Jan Jaeger +05 Aug 2003 Dynamic loadable device support - Jan Jaeger +01 Aug 2003 Created RELEASE.NOTES member - Fish +01 Aug 2003 Added Hercules VERSION to dyngui - Fish +01 Aug 2003 Various OMA tape processing fixes - Ivan Warren +29 Jul 2003 Fix shared device open to not set `connecting' bit on + until after parameter verification - Greg Smith +26 Jul 2003 Minor change to codepage conversion logic - Jan Jaeger +21 Jul 2003 CVD fix by Viktor Shkamerda - Jan Jaeger +20 Jul 2003 Defer tuntap32 dll load to device alloc - Jan Jaeger +19 Jul 2003 THDER,THDR instructions - Roger Bowler +18 Jul 2003 NLS translation updates - Jan Jaeger +18 Jul 2003 Fix bug in config.c causing segfault on lcs devices - Fish +18 Jul 2003 Fix race conditions in console detach/close - Jan Jaeger +17 Jul 2003 Allow address:port on CNSLPORT statement - Jan Jaeger +17 Jul 2003 make console threads high priority, remove trylock - Fish +17 Jul 2003 logger_init: 1) consistent stdxxx dup'ing, + 2) make logger_thread high priority - Fish +17 Jul 2003 Bugfix: destroy LOCK & COND in cache_destroy - Fish +16 Jul 2003 Allow specifying a native block device as an FBA + * Linux only, <2Gb Only - Ivan Warren +15 Jul 2003 Fix s/370 testio race condition - Greg Smith as reported + by Victor Shkamerda +14 Jul 2003 Fixes for compiler weirdness - Greg Smith +12 Jul 2003 Optimize HDL_FINDNXT call - Jan Jaeger +12 Jul 2003 Correct archmode check in cmpsc and featchk - Jan Jaeger +12 Jul 2003 Restructure service and facility features - Jan Jaeger +11 Jul 2003 Fix bogus HHCCT048E error message - Fish +11 Jul 2003 Fix "console: select: Bad file number" -- 2nd try - Fish +10 Jul 2003 fix tape label issue in hetinit.c & slib.c - Fish +10 Jul 2003 HFP Multiply-Add/Subtract Facility - Roger Bowler +09 Jul 2003 UC Only in status for CTL NO-OP on tape devices - Ivan Warren +09 Jul 2003 added check to configure.ac to ensure dynamic load support + available if external-gui support requested on win32 - Fish +07 Jul 2003 configure.ac now correctly sets USE_DLLTOOL to false if + OPTION_DYNAMIC_LOAD not possible (so dyninst/dyngui don't + get built), and OPTION_DYNAMIC_LOAD and HDL_USE_LIBTOOL + are now both handled automatically in configure.ac - Fish +07 Jul 2003 ECPS:VM config Statement and EVM panel command retired. + both replaced with ECPSVM - Ivan Warren +07 Jul 2003 #undef OPTION_DYNAMIC_LOAD in featall.h if neither dlopen + nor libtool is available - Fish +06 Jul 2003 LXR,LZER,LZDR,LZXR instructions - Roger Bowler +04 Jul 2003 Allow NUMCPU=0 - Jan Jaeger +03 Jul 2003 Long Displacement Facility - Roger Bowler +30 Jun 2003 Display all messages on shutdown - Jan Jaeger +30 Jun 2003 Removed incorrect locks in console attach/detach - Jan Jaeger +29 Jun 2003 Added shutdown logic - Jan Jaeger +28 Jun 2003 Fix "console: select: Bad file number" - Fish +28 Jun 2003 Updated hercinst.html with panel command info - Fish +28 Jun 2003 Loadable crypto support (US export regulations) - Jan Jaeger +27 Jun 2003 Allow unload reject in hdl final processing - Jan Jaeger +27 Jun 2003 Support dynamic loadable cgi routines - Jan Jaeger +27 Jun 2003 Panel.c + hsccmd.c: clear/reset screen before exiting - Fish +27 Jun 2003 Panel.c: 1) removed all external-gui logic, 2) long + messages now wrap to the next screen line - Fish +27 Jun 2003 Fixed some "integer constant is too large for "long" type" + warnings - Fish +27 Jun 2003 Added addt'l instructions/info to autogen.sh - Fish +27 Jun 2003 Added README.HDL to EXTRA_DIST in makefile.am - Fish +27 Jun 2003 Updated makefile.am to add Windows resource definitions + to dyngui.dll - Fish +27 Jun 2003 Framework for ALS4 features - Roger Bowler +26 Jun 2003 Check for physical shared object when loading dll - Jan Jaeger +26 Jun 2003 Fix Win32 hdl case-sensitivity bug - Fish +26 Jun 2003 TT32 CTCI fixes: 1) fix ACCESS_VIOLATION caused by NULL ptr + being returned by 'tt32_get_default_iface', 2) 'tt32stats_cmd' + temporarily fixed by fixing bug in 'CTCI_Init' and adding temp + workaround code to 'display_tt32_stats' function to work around + bug in TunTap32.dll, 3) add some code to try and resolve bogus + "HHCCT048E" message being issued at close/shutdown. +25 Jun 2003 shared device version/release checking - Greg Smith +25 Jun 2003 micro performance update in branch on condition - Bernard van der Helm +25 Jun 2003 Fix unlikely but serious fthreads bug in wait_condition - Fish +25 Jun 2003 Move external gui logic from panel_display to dyngui.c, and + modify build process (makefile.am) to automatically build + new dyngui.dll (and dyninst.dll too) - Fish +25 Jun 2003 Add dyninst qualifier to dynamic instr. symbol names - Jan Jaeger +23 Jun 2003 Fix interrupt queue problem in haltio - Fish (by Greg Smith) +17 Jun 2003 dyninst now supports dynamic instruction update - Jan Jaeger +15 Jun 2003 Add dynamic module preloading - Jan Jaeger +15 Jun 2003 Add version and dependency checks to dynamic loader - Jan Jaeger +11 Jun 2003 More message numbers - Greg Smith +05 Jun 2003 Dynamic loader support - Jan Jaeger +05 Jun 2003 Preliminary substitution capabilities in config file. + Substitution format is $(varname). + Current vars are cuu,ccuu,CUU,CCUU - Ivan Warren +04 Jun 2003 Device number specification extension. Device numbers are now + CUU or CUU-CUU or CUU.count or CUU,CUU or a combination + of the above - Ivan Warren +01 Jun 2003 Updated hercconf.html page to include ECPS:VM, + 2703, 3410, 3490, 9347 D/T and explanation for + 2703 parameters - Ivan Warren +29 May 2003 Correction to diagnose 0 to use real address - Jan Jaeger +28 May 2003 Use unix sockets for localhost shared devices - Greg Smith +26 May 2003 Yet another round for channel.c locking - Greg Smith +26 May 2003 Fixes and performance enhancements for shared devices - Greg Smith +23 May 2003 Locate Block logic fix - Ivan Warren, Suggested by *Anonymous* +23 May 2003 Provide command response in DIAG 8 resp buffer - Ivan Warren +22 May 2003 Add CPUVERID config statement to set version code - Jan Jaeger +22 May 2003 Add DIAG8CMD config statement to enable diag 8 commands - Jan Jaeger +21 May 2003 Fix spec exception in LPSW on incorrect amode settings - Jan Jaeger +19 May 2003 Close all FDs before forking hercifc - Ivan Warren +18 May 2003 Fix incorrect amask in LPSW in 64 bit mode - Jan Jaeger +15 May 2003 Fixed cygwin regparm bug check bug in configure.ac: + __attribute__ ((regparm(3))) in wrong place - Fish +15 May 2003 Created "destroy_lock" and "destroy_condition" macros; + added support destroying locks/conds to fthreads - Fish +15 May 2003 Fixed impl.c so FishHang doesn't crash - Fish +14 May 2003 Update in cmpsc.c store_ch - Scott Blackledge/Bernard van der Helm +09 May 2003 Update dasdtab.c 3380 entries - Jesper by Greg Smith +05 May 2003 Write zeroes at end of file to increase its size if ftruncate + doesn't work - Greg Smith, suggested by Andy Kane +05 May 2003 Meaningful error messages for invalid or unsupported parms + to dasdinit - Greg Smith, suggested by John Summerfield +05 May 2003 Meaningful error messages for unconfigured compression - Greg Smith, + suggestions by John McKown & Davud Booher +05 May 2003 Allow arbitrary number cckd cylinders - Greg Smith, suggested by + Romain Capron +05 May 2003 Remove cckd zlib dependencies - Greg Smith, suggested by John Summerfield +28 Apr 2003 Changed 3270 Disconnect/Reconnect status presentation + logic (should allow terminal disc/recon on MVS) - Ivan Warren +24 Apr 2003 Set PGID/Sense PGID/Assign/Unassign Corr to Tape Devices + (fixes device Boxing when varied on twice) - Ivan Warren +23 Apr 2003 Shared devices fixes - Greg Smith +19 Apr 2003 Shared devices - Greg Smith +18 Apr 2003 270X Poll CCW Implementation - Ivan Warren +16 Apr 2003 Rework channel.c serialization - Greg Smith +16 Apr 2003 memrchr.[ch] added for Cygwin - Volker Bandke +15 Apr 2003 LCTL VM Assist - Ivan Warren +10 Apr 2003 DISP0/DISP1/DISP2 CP Assists - Ivan Warren +05 Apr 2003 Virtual Timer Assist - Ivan Warren +04 Apr 2003 Return IntReq on Card Read unsolicited Sense when + the card reader is empty - Ivan Warren +03 Apr 2003 ECPS:VM SSM Correction, panel command rework (evm) + and conditional debug messages - Ivan Warren +02 Apr 2003 Reordered int/dev locks in channel handler + to avoid race conditions in certain situations - Ivan Warren +29 Mar 2003 Addl VM Assist support : SVC + SSM VM Assists + new evmstat panel command + No Timer Assist (do #CP SET ASSIST ON NOTMR) - Ivan Warren +27 Mar 2003 Initial minimal CPASSIST ECPS:VM/370 support - Ivan Warren +26 Mar 2003 Fix cckd locking problems, esp. during sf- and sfc - Greg Smith +26 Mar 2003 CKD now uses the same shared cache as cckd - Greg Smith +26 Mar 2003 Divorced cache management code from cckd code - Greg Smith +21 Mar 2003 BSC/2703 Line emulation - Ivan Warren +20 Mar 2003 Rework system logger functions - Jan Jaeger +19 Mar 2003 Tape : Present DE on IntReq for non-data motion CCWs + Added deonirq=0|1 for 3410/3420 tapes in relation with MVS 3.8j + issues - Ivan Warren +14 Mar 2003 Increased tbuf in het_write due specs compress2 - Bernard van der Helm +13 Mar 2003 Tape support update - see README.TAPE - Ivan Warren +13 Mar 2003 Call build_config even if NO_SIGABEND_HANDLER is defined - Ivan Warren +13 Mar 2003 Define extgui in dasdseq for Windows build - Ivan Warren +13 Mar 2003 AEA invalidation reduction - Greg Smith +13 Mar 2003 Gabor performance patch - optimize AEA invalidation - Greg Smith +13 Mar 2003 detab dasdseq.c - Jim Morrison +13 Mar 2003 New dasdseq.c and man/dasdseq.1 - Jim Morrison +10 Mar 2003 New man/cckddiag.1 manpage - Jim Morrison +10 Mar 2003 New man/Makefile.am (manpage support) - Jim Morrison +10 Mar 2003 New man/cckd.4 manpage - Jim Morrison +08 Mar 2003 Remove panel/socketdevice dependency - Jan Jaeger +08 Mar 2003 Increased tape max blk sz to 64K-1 in hercules for + DFDSS support - Ivan Warren +08 Mar 2003 Increased max block size to 64k-1 for tapecopy - Ivan Warren +08 Mar 2003 Set Byte 1 Bit 3 on IntReq for D/T 3505 to prevent + Reader tasks from dying and filling ERDS + set + sense size to 4 - Ivan Warren +08 Mar 2003 correct decomptrk() no-compression cckddiag - Jim Morrison +07 Mar 2003 correct cckddiag build for Win - Jim Morrison +06 Mar 2003 Add cckddiag to build - Jim Morrison +06 Mar 2003 Relax numl1tab check - Greg Smith +03 Mar 2003 New cckddiag command; CCKD diagnostic tool - Jim Morrison +03 Mar 2003 Relax CCKD track validation algorithm - Ivan Warren +02 Mar 2003 Set ref and change bits on store status - Jan Jaeger +01 Mar 2003 IA32 assemler reduction - Greg Smith +01 Mar 2003 Remove dead code - Greg Smith +01 Mar 2003 Fix to cckdload - somitcw (by Greg) +01 Mar 2003 More SMP fixes - Greg Smith +01 Mar 2003 Fix configuration parser error - Ivan Warren +27 Feb 2003 3390 jumbo (-27) definition - Adam Thornton (by Greg) +26 Feb 2003 Add util/cvslvlck cvs level check by Jim Morrison +26 Feb 2003 Add Signal Adapter instruction - Jan Jaeger +20 Feb 2003 FBA devtype update + script command support - Ivan Warren (by Greg) 08 Feb 2003 Fix dasdload message verbosity test (was backwards) - Jay Maynard 08 Feb 2003 Fix eof/intrq mode saving in card reader initialization, add * @@ -45,7 +301,7 @@ 27 Dec 2002 Added comprehensive details to README.CVS document - Fish 27 Dec 2002 Fix bug ctc logic to accept MAC addr in lieu of IP addr - Fish 27 Dec 2002 Fix warning about IFC_IOCtl in tuntap.c - Fish -27 Dec 2002 obtain_lock not needed to signal_condition in ctc logic - Fish +27 Dec 2002 obtain_lock not needed to signal_condition in ctc logic - Fish 27 Dec 2002 Use sched_yield (not usleep) if can't enqueue ctc frame - Fish 27 Dec 2002 Rewrote ParseMAC function to fix subtle bug - Fish 27 Dec 2002 Fixed tt32stats command to work with new LCS CTC logic - Fish diff --git a/Makefile.am b/Makefile.am index dfcffe8..b803df2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,140 +1,603 @@ +## Process this file with automake to produce Makefile.in # # Makefile for Hercules S/370, ESA/390 and z/Architecture emulator # -AUTOMAKE_OPTIONS=foreign 1.5 -ACLOCAL_AMFLAGS = -I m4 +AUTOMAKE_OPTIONS = foreign 1.5 +ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = intl m4 po util html +# (gettextize/libtoolize adds intl & m4 subdirectories) + +lns=@LN_S@ + +SUBDIRS = intl m4 \ + po util html man + +LDADD = @LTLIBINTL@ @LTLIBICONV@ @LIBS@ if BUILD_HERCIFC -HERCIFC=hercifc + HERCIFC = hercifc else -HERCIFC= + HERCIFC= endif -LDADD = @LIBINTL@ -bin_PROGRAMS = hercules $(HERCIFC) \ - dasdinit dasdisup dasdload dasdls dasdcat dasdpdsu \ - tapecopy tapemap tapesplt \ - cckdcdsk cckdcomp cckdswap \ - cckd2ckd ckd2cckd fba2cfba cfba2fba dasdcopy \ - hetget hetinit hetmap hetupd \ - dmap2hrc -EXTRA_PROGRAMS=hercifc -fthreads_sources=fthreads.c -fishhang_sources=fishhang.c -fishio_sources=w32chan.c -EXTRA_hercules_SOURCES=$(fthreads_sources) $(fishhang_sources) $(fishio_sources) +fthreads_SRC = fthreads.c +fishio_SRC = w32chan.c +fishhang_SRC = fishhang.c +memrchr_SRC = memrchr.c if BUILD_FTHREADS -FTHREADS=$(fthreads_sources) + FTHREADS = $(fthreads_SRC) + FISHIO = $(fishio_SRC) + LIBFTHREADS = libfthreads.la + FHOSTINFO = hostinfo.c + HOSTINFO = if BUILD_FISHHANG -FISHHANG=$(fishhang_sources) + FISHHANG = $(fishhang_SRC) +else + FISHHANG = +endif +else + FTHREADS = + FISHHANG = + FISHIO = + LIBFTHREADS = + FHOSTINFO = + HOSTINFO = hostinfo.c +endif + +if USE_BUILTIN_MEMRCHR + MEMRCHR = memrchr.c +else + MEMRCHR = +endif + +# We need to still include the source for the dynamic modules +# in with the distribution regardless of whether or not the dyanmic +# modules themselves are to be built so if dynamic load not possible, +# then we need to include the source on the EXTRA_hercules_SOURCES +# statement so even though they won't/don't actually get built, they +# still nonetheless get included into distribution tarball. This is +# *similar* to (bit not identical to) the way the fthreads sources +# are handled. With the fthreads sources though, they can at least always +# be built (even though they may not always generate any actual code +# whenever they do) whereas the dynamic module source CANNOT (MUST not) +# even be *attempted* to be "built" if support for building dynamic modules +# doesn't even exist on the system doing the building. + +dynamic_SRC = dyngui.c \ + dyninst.c \ + hdteq.c + +extra_dynamic_SRC = dynguib.h \ + dynguip.h \ + dynguiv.h \ + dyngui.rc + +dyndev_SRC = commadpt.c \ + console.c \ + cardpch.c \ + cardrdr.c \ + sockdev.c \ + printer.c \ + tapedev.c \ + hetlib.c \ + ctc_lcs.c \ + ctc_ctci.c \ + ctcadpt.c \ + w32ctca.c \ + tuntap.c + + +# -module : create a dlopen'able module +# -no-undefined : required on all platform that do not allow shared modules +# to have undefined symbols +# $(LDADD) : Misc Linker flags set by autoconf +# -export-dynamic : so dlsym works (to be verified - not sure it is necessary) +# -avoid-version : needed.. Otherwise libtool gives crazy names to Windows +# DLLs +# + +if BUILD_SHARED + XSTATIC = +else + XSTATIC = -static +endif + +if OPTION_DYNAMIC_LOAD + DYNSRC = + LTDL = ltdl.c + + DYNMOD_LD_FLAGS = -module \ + -no-undefined \ + $(XSTATIC) \ + -export-dynamic \ + -avoid-version + +# DYNMOD_LD_ADD = libherc.la \ +# libhercs.la \ +# libhercu.la \ +# $(LDADD) \ +# $(LIBFTHREADS) + + DYNMOD_LD_ADD = libherc.la \ + libhercs.la \ + $(LDADD) + + LIB_LD_FLAGS = -export-dynamic \ + $(XSTATIC) \ + -no-undefined \ + -avoid-version +else + DYNSRC = $(dyndev_SRC) + LTDL = + DYNMOD_LD_FLAGS = + DYNMOD_LD_ADD = + LIB_LD_FLAGS = $(XSTATIC) \ + -no-undefined \ + -avoid-version +endif + +# +# List of Libtool shared libraries & loadable modules +# + + HERCLIBS = $(LIBFTHREADS) \ + libhercu.la \ + libherct.la \ + libhercd.la + + HERCLIBS2 = libhercs.la \ + libherc.la + + HERCMODS = dyngui.la \ + dyninst.la \ + hdteq.la \ + hdt1403.la \ + hdt2703.la \ + hdt3088.la \ + hdt3270.la \ + hdt3420.la \ + hdt3505.la \ + hdt3525.la + +if OPTION_DYNAMIC_LOAD + modexec_LTLIBRARIES = $(HERCMODS) +endif + + noinst_LTLIBRARIES = $(HERCLIBS) + lib_LTLIBRARIES = $(HERCLIBS2) + +# The following causes the dyanmic modules to not even get built +# unless support for building dynamic modules exists on the build system + +bin_PROGRAMS = hercules \ + dasdinit dasdisup dasdload dasdls dasdcat dasdpdsu dasdseq \ + tapecopy tapemap tapesplt \ + cckdcdsk cckdcomp cckddiag cckdswap \ + dasdcopy \ + hetget hetinit hetmap hetupd \ + dmap2hrc \ + $(HERCIFC) + +EXTRA_PROGRAMS = hercifc + +if OPTION_DYNAMIC_LOAD + +# +# For each module: +# +# ModuleName_la_SOURCES = +# ModuleName_la_LDFLAGS = $(DYNMOD_LD_FLAGS) (see above) +# ModuleName_la_LIBADD = libherc.la (the Core Hercules Shared Library) +# ModuleName_la_DEPENDENCIES = libherc.la (may not be necessary) +# + dyngui_la_SOURCES = dyngui.c + dyngui_la_LDFLAGS = $(DYNMOD_LD_FLAGS) + dyngui_la_LIBADD = $(DYNMOD_LD_ADD) + + dyninst_la_SOURCES = dyninst.c + dyninst_la_LDFLAGS = $(DYNMOD_LD_FLAGS) + dyninst_la_LIBADD = $(DYNMOD_LD_ADD) + + hdteq_la_SOURCES = hdteq.c + hdteq_la_LDFLAGS = $(DYNMOD_LD_FLAGS) + hdteq_la_LIBADD = $(DYNMOD_LD_ADD) + + hdt1403_la_SOURCES = printer.c + hdt1403_la_LDFLAGS = $(DYNMOD_LD_FLAGS) + hdt1403_la_LIBADD = $(DYNMOD_LD_ADD) + + hdt2703_la_SOURCES = commadpt.c + hdt2703_la_LDFLAGS = $(DYNMOD_LD_FLAGS) + hdt2703_la_LIBADD = $(DYNMOD_LD_ADD) + + hdt3088_la_SOURCES = ctc_lcs.c ctc_ctci.c ctcadpt.c w32ctca.c tuntap.c + hdt3088_la_LDFLAGS = $(DYNMOD_LD_FLAGS) + hdt3088_la_LIBADD = $(DYNMOD_LD_ADD) + + hdt3270_la_SOURCES = console.c + hdt3270_la_LDFLAGS = $(DYNMOD_LD_FLAGS) + hdt3270_la_LIBADD = $(DYNMOD_LD_ADD) + + hdt3420_la_SOURCES = tapedev.c + hdt3420_la_LDFLAGS = $(DYNMOD_LD_FLAGS) + hdt3420_la_LIBADD = $(DYNMOD_LD_ADD) libherct.la + + hdt3505_la_SOURCES = cardrdr.c sockdev.c + hdt3505_la_LDFLAGS = $(DYNMOD_LD_FLAGS) + hdt3505_la_LIBADD = $(DYNMOD_LD_ADD) + + hdt3525_la_SOURCES = cardpch.c + hdt3525_la_LDFLAGS = $(DYNMOD_LD_FLAGS) + hdt3525_la_LIBADD = $(DYNMOD_LD_ADD) + +endif + +if BUILD_FTHREADS + libfthreads_la_SOURCES = $(FTHREADS) \ + $(FISHHANG) \ + $(FHOSTINFO) + + libfthreads_la_LDFLAGS = $(LIB_LD_FLAGS) + + libfthreads_la_LIBADD = $(LDADD) + +endif + +# +# Common data areas (shared) library +# + + libhercs_la_SOURCES = hsys.c + + libhercs_la_LDFLAGS = $(LIB_LD_FLAGS) + + libhercs_la_LIBADD = $(LDADD) + +# +# Tape utility subroutines (shared) library +# + + libherct_la_SOURCES = sllib.c \ + hetlib.c + + libherct_la_LDFLAGS = $(LIB_LD_FLAGS) + + libherct_la_LIBADD = $(LDADD) + +# +# DASD utility subroutines (shared) library +# + + libhercd_la_SOURCES = ckddasd.c \ + fbadasd.c \ + cckddasd.c \ + cckdutil.c \ + dasdtab.c \ + cache.c \ + dasdutil.c \ + shared.c + + libhercd_la_LDFLAGS = $(LIB_LD_FLAGS) + + libhercd_la_LIBADD = $(LDADD) + +# +## Pure Utility functions +# + libhercu_la_SOURCES = version.c \ + hscutl.c \ + hscutl2.c \ + codepage.c \ + logger.c \ + logmsg.c \ + hdl.c \ + $(HOSTINFO) \ + $(MEMRCHR) \ + parser.c \ + $(LTDL) + + libhercu_la_LDFLAGS = $(LIB_LD_FLAGS) + + libhercu_la_LIBADD = $(LDADD) + +# +# Core Hercules (shared) library +# + + libherc_la_SOURCES = impl.c \ + config.c \ + panel.c \ + ipl.c \ + assist.c \ + dat.c \ + stack.c \ + cpu.c \ + vstore.c \ + general1.c \ + general2.c \ + plo.c \ + control.c \ + crypto.c \ + io.c \ + decimal.c \ + service.c \ + opcode.c \ + diagnose.c \ + diagmssf.c \ + vm.c \ + channel.c \ + external.c \ + float.c \ + trace.c \ + machchk.c \ + vector.c \ + xstore.c \ + cmpsc.c \ + sie.c \ + qdio.c \ + timer.c \ + esame.c \ + ieee.c \ + machdep.h \ + httpserv.c \ + cgibin.c \ + hsccmd.c \ + hscmisc.c \ + $(FISHIO) \ + $(DYNSRC) \ + ecpsvm.c + + EXTRA_libherc_la_SOURCES = $(fthreads_SRC) \ + $(fishhang_SRC) \ + $(fishio_SRC) \ + $(memrchr_SRC) \ + $(dynamic_SRC) \ + $(extra_SRC) \ + $(dyndev_SRC) \ + ltdl.c + + libherc_la_LDFLAGS = $(LIB_LD_FLAGS) + + libherc_la_LIBADD = libhercs.la \ + libhercu.la \ + libherct.la \ + libhercd.la \ + $(LIBFTHREADS) \ + $(LDADD) + +# +# THIS is the hercules executable. +# hdlmain.c is requires so that dlopen(self) retrieves +# the 'main' hdl symbols +# + +if OPTION_DYNAMIC_LOAD + +if BUILD_SHARED + HLDFLAGS = -dlopen self + HDEPS = + else -FISHHANG= + HLDFLAGS = -dlopen self \ + -dlopen dyngui.la \ + -dlopen dyninst.la \ + -dlopen hdteq.la \ + -dlopen hdt1403.la \ + -dlopen hdt3420.la \ + -dlopen hdt2703.la \ + -dlopen hdt3088.la \ + -dlopen hdt3270.la \ + -dlopen hdt3505.la \ + -dlopen hdt3525.la + + HDEPS = dyngui.la \ + dyninst.la \ + hdteq.la \ + hdt1403.la \ + hdt2703.la \ + hdt3088.la \ + hdt3270.la \ + hdt3505.la \ + libherc.la \ + libherct.la \ + libhercd.la \ + hdt3525.la endif -FISHIO=$(fishio_sources) + else -FTHREADS= -FISHHANG= -FISHIO= + HLDFLAGS = + HDEPS = + endif + hercules_SOURCES = bootstrap.c \ + hdlmain.c -hercules_SOURCES = hostinfo.c w32ctca.c \ - impl.c config.c panel.c version.c \ - ipl.c assist.c dat.c \ - stack.c cpu.c vstore.c \ - general1.c general2.c plo.c \ - control.c io.c \ - decimal.c service.c opcode.c \ - diagnose.c diagmssf.c vm.c \ - channel.c ckddasd.c fbadasd.c \ - tapedev.c cardrdr.c cardpch.c \ - printer.c console.c external.c \ - float.c ctcadpt.c trace.c \ - machchk.c vector.c xstore.c \ - cmpsc.c sie.c timer.c \ - esame.c cckddasd.c cckdutil.c dasdtab.c \ - parser.c hetlib.c ieee.c \ - machdep.h $(FTHREADS) $(FISHHANG) $(FISHIO) \ - httpserv.c cgibin.c devtype.c codepage.c \ - ctc_ctci.c ctc_lcs.c tuntap.c hsccmd.c hscmisc.c + hercules_LDADD = libherc.la libhercs.la $(LDADD) -hercifc_SOURCES = hercifc.c hostinfo.c version.c + hercules_LDFLAGS = $(HLDFLAGS) + + hercules_DEPENDENCIES = libherc.la libhercs.la $(HDEPS) + +# +# side binaries +# -dasdinit_SOURCES = dasdinit.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +tools_LD_FLAGS = +tools_ADDLIBS = $(HERCLIBS2) $(LDADD) -dasdisup_SOURCES = dasdisup.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +if BUILD_HERCIFC +hercifc_SOURCES = hercifc.c +hercifc_LDADD = $(LDADD) +hercifc_LDFLAGS = $(tools_LD_FLAGS) +endif -dasdload_SOURCES = dasdload.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +dasdinit_SOURCES = dasdinit.c +dasdinit_LDADD = $(tools_ADDLIBS) +dasdinit_LDFLAGS = $(tools_LD_FLAGS) -dasdls_SOURCES = dasdls.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +dasdisup_SOURCES = dasdisup.c +dasdisup_LDADD = $(tools_ADDLIBS) +dasdisup_LDFLAGS = $(tools_LD_FLAGS) -dasdcat_SOURCES = dasdcat.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +dasdload_SOURCES = dasdload.c +dasdload_LDADD = $(tools_ADDLIBS) +dasdload_LDFLAGS = $(tools_LD_FLAGS) -dasdpdsu_SOURCES = dasdpdsu.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +dasdls_SOURCES = dasdls.c +dasdls_LDADD = $(tools_ADDLIBS) +dasdls_LDFLAGS = $(tools_LD_FLAGS) -tapecopy_SOURCES = tapecopy.c codepage.c hostinfo.c version.c +dasdcat_SOURCES = dasdcat.c +dasdcat_LDADD = $(tools_ADDLIBS) +dasdcat_LDFLAGS = $(tools_LD_FLAGS) -tapemap_SOURCES = tapemap.c codepage.c hostinfo.c version.c +dasdpdsu_SOURCES = dasdpdsu.c +dasdpdsu_LDADD = $(tools_ADDLIBS) +dasdpdsu_LDFLAGS = $(tools_LD_FLAGS) -tapesplt_SOURCES = tapesplt.c codepage.c hostinfo.c version.c +dasdseq_SOURCES = dasdseq.c +dasdseq_LDADD = $(tools_ADDLIBS) +dasdseq_LDFLAGS = $(tools_LD_FLAGS) -cckdcdsk_SOURCES = cckdcdsk.c cckdutil.c dasdtab.c hostinfo.c version.c +tapecopy_SOURCES = tapecopy.c +tapecopy_LDADD = $(tools_ADDLIBS) +tapecopy_LDFLAGS = $(tools_LD_FLAGS) -cckdcomp_SOURCES = cckdcomp.c cckdutil.c dasdtab.c hostinfo.c version.c +tapemap_SOURCES = tapemap.c +tapemap_LDADD = $(tools_ADDLIBS) +tapemap_LDFLAGS = $(tools_LD_FLAGS) -ckd2cckd_SOURCES = dasdcopy.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +tapesplt_SOURCES = tapesplt.c +tapesplt_LDADD = $(tools_ADDLIBS) +tapesplt_LDFLAGS = $(tools_LD_FLAGS) -fba2cfba_SOURCES = dasdcopy.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +cckdcdsk_SOURCES = cckdcdsk.c +cckdcdsk_LDADD = $(tools_ADDLIBS) +cckdcdsk_LDFLAGS = $(tools_LD_FLAGS) -cfba2fba_SOURCES = dasdcopy.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +cckdcomp_SOURCES = cckdcomp.c +cckdcomp_LDADD = $(tools_ADDLIBS) +cckdcomp_LDFLAGS = $(tools_LD_FLAGS) -cckd2ckd_SOURCES = dasdcopy.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +cckddiag_SOURCES = cckddiag.c +cckddiag_LDADD = $(tools_ADDLIBS) +cckddiag_LDFLAGS = $(tools_LD_FLAGS) -dasdcopy_SOURCES = dasdcopy.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +dasdcopy_SOURCES = dasdcopy.c +dasdcopy_LDADD = $(tools_ADDLIBS) +dasdcopy_LDFLAGS = $(tools_LD_FLAGS) -cckdswap_SOURCES = cckdswap.c cckdutil.c dasdtab.c hostinfo.c version.c +cckdswap_SOURCES = cckdswap.c +cckdswap_LDADD = $(tools_ADDLIBS) +cckdswap_LDFLAGS = $(tools_LD_FLAGS) -hetget_SOURCES = hetget.c hetlib.c sllib.c hostinfo.c version.c +hetget_SOURCES = hetget.c +hetget_LDADD = $(tools_ADDLIBS) +hetget_LDFLAGS = $(tools_LD_FLAGS) -hetinit_SOURCES = hetinit.c hetlib.c sllib.c hostinfo.c version.c +hetinit_SOURCES = hetinit.c +hetinit_LDADD = $(tools_ADDLIBS) +hetinit_LDFLAGS = $(tools_LD_FLAGS) -hetmap_SOURCES = hetmap.c hetlib.c sllib.c hostinfo.c version.c +hetmap_SOURCES = hetmap.c +hetmap_LDADD = $(tools_ADDLIBS) +hetmap_LDFLAGS = $(tools_LD_FLAGS) -hetupd_SOURCES = hetupd.c hetlib.c sllib.c hostinfo.c version.c +hetupd_SOURCES = hetupd.c +hetupd_LDADD = $(tools_ADDLIBS) +hetupd_LDFLAGS = $(tools_LD_FLAGS) -dmap2hrc_SOURCES = dmap2hrc.c hostinfo.c version.c +dmap2hrc_SOURCES = dmap2hrc.c +dmap2hrc_LDADD = $(tools_ADDLIBS) +dmap2hrc_LDFLAGS = $(tools_LD_FLAGS) -EXTRA_DIST = autoconf/config.rpath hercules.cnf CHANGES README.NETWORKING \ - README.OSX +# +# files that are not 'built' per-se +# -noinst_HEADERS = fishhang.h \ - hostinfo.h cpuint.h feat370.h feat390.h feat900.h featall.h featchk.h \ - feature.h esa390.h opcode.h hercules.h inline.h dat.h vstore.h \ - hbyteswp.h dasdblks.h hetlib.h version.h parser.h dasdtab.h \ - sllib.h htypes.h fthreads.h w32chan.h w32ctca.h tt32api.h linklist.h \ - if_tun.h ieee-w32.h httpmisc.h devtype.h codepage.h hercnls.h \ - ctcadpt.h hercifc.h tuntap.h +EXTRA_DIST = \ + hercules.cnf \ + cckdfix.c \ + README.COMMADPT \ + README.CVS \ + README.ECPSVM \ + README.HDL \ + README.NETWORKING \ + README.OSX \ + README.TAPE \ + CHANGES \ + RELEASE.NOTES -cckd: cckd2ckd$(EXEEXT) cckdcdsk$(EXEEXT) \ - ckd2cckd$(EXEEXT) cckdcomp$(EXEEXT) \ - cckdswap$(EXEEXT) fba2cfba$(EXEEXT) \ - cfba2fba$(EXEEXT) dasdcopy$(EXEEXT) +# +# Source Header files. No 'build' for those +# +noinst_HEADERS = fishhang.h \ + hostinfo.h \ + cpuint.h \ + feat370.h \ + feat390.h \ + feat900.h \ + featall.h \ + featchk.h \ + feature.h \ + esa390.h \ + opcode.h \ + hercules.h \ + inline.h \ + dat.h \ + vstore.h \ + hbyteswp.h \ + dasdblks.h \ + hetlib.h \ + version.h \ + parser.h \ + dasdtab.h \ + sllib.h \ + htypes.h \ + fthreads.h \ + w32chan.h \ + w32ctca.h \ + tt32api.h \ + linklist.h \ + ieee-w32.h \ + httpmisc.h \ + devtype.h \ + codepage.h \ + hercnls.h \ + ctcadpt.h \ + hercifc.h \ + tuntap.h \ + tapedev.h \ + logger.h \ + commadpt.h \ + cache.h \ + ecpsvm.h \ + memrchr.h \ + shared.h \ + hscutl.h \ + hdl.h \ + crypto.h \ + sockdev.h \ + ltdl.h \ + herc_getopt.h \ + service.h \ + $(extra_dynamic_SRC) + +######################################################### +# B U I L D R U L E S . . . +######################################################### + + +cckd: cckd2ckd$(EXEEXT) \ + cckdcdsk$(EXEEXT) \ + cckddiag$(EXEEXT) \ + cckdcomp$(EXEEXT) \ + cckdswap$(EXEEXT) \ + dasdcopy$(EXEEXT) tar: dist @@ -142,9 +605,37 @@ install-exec-local: if SETUID_HERCIFC chown root $(DESTDIR)$(bindir)/hercifc chmod 0751 $(DESTDIR)$(bindir)/hercifc - chmod +s $(DESTDIR)$(bindir)/hercifc - rm hercifc + chmod +s $(DESTDIR)$(bindir)/hercifc + rm hercifc +endif + +install-exec-hook: + rm -f $(DESTDIR)$(libdir)/libherc*.a + rm -f $(DESTDIR)$(modexecdir)/dyn*.a + rm -f $(DESTDIR)$(modexecdir)/hdt*.a +if BUILD_SHARED +else + rm -f $(DESTDIR)$(libdir)/libherc* endif +# +# NOTE : symbolic links point to FINAL destination (not to staged install) +# + rm -f $(DESTDIR)$(bindir)/fba2cfba$(EXEEXT) + (cd $(DESTDIR)$(bindir); @LN_S@ ./dasdcopy$(EXEEXT) fba2cfba$(EXEEXT)) + rm -f $(DESTDIR)$(bindir)/ckd2cckd$(EXEEXT) + (cd $(DESTDIR)$(bindir); @LN_S@ ./dasdcopy$(EXEEXT) ckd2cckd$(EXEEXT)) + rm -f $(DESTDIR)$(bindir)/cfba2fba$(EXEEXT) + (cd $(DESTDIR)$(bindir); @LN_S@ ./dasdcopy$(EXEEXT) cfba2fba$(EXEEXT)) + rm -f $(DESTDIR)$(bindir)/cckd2ckd$(EXEEXT) + (cd $(DESTDIR)$(bindir); @LN_S@ ./dasdcopy$(EXEEXT) cckd2ckd$(EXEEXT)) + +uninstall-local: + +uninstall-hook: + rm -f $(DESTDIR)$(bindir)/fba2cfba$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/ckd2cckd$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/cfba2fba$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/cckd2ckd$(EXEEXT) %.s: %.c $(COMPILE) -S $< diff --git a/Makefile.in b/Makefile.in index e2d1b85..d824294 100644 --- a/Makefile.in +++ b/Makefile.in @@ -69,16 +69,27 @@ EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ PATH_SEPARATOR = @PATH_SEPARATOR@ AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +EGREP = @EGREP@ +F77 = @F77@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ HAVE_LIB = @HAVE_LIB@ +INCLTDL = @INCLTDL@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ @@ -86,16 +97,23 @@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LIB = @LIB@ +LIBADD_DL = @LIBADD_DL@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ +LIBLTDL = @LIBLTDL@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LN_S = @LN_S@ LTLIB = @LTLIB@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ MAINT = @MAINT@ MKINSTALLDIRS = @MKINSTALLDIRS@ +OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POSUB = @POSUB@ RANLIB = @RANLIB@ +RC = @RC@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ @@ -103,379 +121,778 @@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ +modexecdir = @modexecdir@ AUTOMAKE_OPTIONS = foreign 1.5 ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = intl m4 po util html -@BUILD_HERCIFC_TRUE@HERCIFC = hercifc -@BUILD_HERCIFC_FALSE@HERCIFC = -LDADD = @LIBINTL@ +# (gettextize/libtoolize adds intl & m4 subdirectories) +lns = @LN_S@ -bin_PROGRAMS = hercules $(HERCIFC) \ - dasdinit dasdisup dasdload dasdls dasdcat dasdpdsu \ - tapecopy tapemap tapesplt \ - cckdcdsk cckdcomp cckdswap \ - cckd2ckd ckd2cckd fba2cfba cfba2fba dasdcopy \ - hetget hetinit hetmap hetupd \ - dmap2hrc +SUBDIRS = intl m4 \ + po util html man -EXTRA_PROGRAMS = hercifc -fthreads_sources = fthreads.c -fishhang_sources = fishhang.c -fishio_sources = w32chan.c +LDADD = @LTLIBINTL@ @LTLIBICONV@ @LIBS@ + +@BUILD_HERCIFC_TRUE@HERCIFC = hercifc +@BUILD_HERCIFC_FALSE@HERCIFC = -EXTRA_hercules_SOURCES = $(fthreads_sources) $(fishhang_sources) $(fishio_sources) +fthreads_SRC = fthreads.c +fishio_SRC = w32chan.c +fishhang_SRC = fishhang.c +memrchr_SRC = memrchr.c -@BUILD_FTHREADS_TRUE@FTHREADS = $(fthreads_sources) +@BUILD_FTHREADS_TRUE@FTHREADS = $(fthreads_SRC) @BUILD_FTHREADS_FALSE@FTHREADS = +@BUILD_FTHREADS_TRUE@FISHIO = $(fishio_SRC) +@BUILD_FTHREADS_FALSE@FISHIO = +@BUILD_FTHREADS_TRUE@LIBFTHREADS = libfthreads.la +@BUILD_FTHREADS_FALSE@LIBFTHREADS = +@BUILD_FTHREADS_TRUE@FHOSTINFO = hostinfo.c +@BUILD_FTHREADS_FALSE@FHOSTINFO = +@BUILD_FTHREADS_TRUE@HOSTINFO = +@BUILD_FTHREADS_FALSE@HOSTINFO = hostinfo.c @BUILD_FISHHANG_FALSE@@BUILD_FTHREADS_TRUE@FISHHANG = -@BUILD_FISHHANG_TRUE@@BUILD_FTHREADS_TRUE@FISHHANG = $(fishhang_sources) +@BUILD_FISHHANG_TRUE@@BUILD_FTHREADS_TRUE@FISHHANG = $(fishhang_SRC) @BUILD_FTHREADS_FALSE@FISHHANG = -@BUILD_FTHREADS_TRUE@FISHIO = $(fishio_sources) -@BUILD_FTHREADS_FALSE@FISHIO = -hercules_SOURCES = hostinfo.c w32ctca.c \ - impl.c config.c panel.c version.c \ - ipl.c assist.c dat.c \ - stack.c cpu.c vstore.c \ - general1.c general2.c plo.c \ - control.c io.c \ - decimal.c service.c opcode.c \ - diagnose.c diagmssf.c vm.c \ - channel.c ckddasd.c fbadasd.c \ - tapedev.c cardrdr.c cardpch.c \ - printer.c console.c external.c \ - float.c ctcadpt.c trace.c \ - machchk.c vector.c xstore.c \ - cmpsc.c sie.c timer.c \ - esame.c cckddasd.c cckdutil.c dasdtab.c \ - parser.c hetlib.c ieee.c \ - machdep.h $(FTHREADS) $(FISHHANG) $(FISHIO) \ - httpserv.c cgibin.c devtype.c codepage.c \ - ctc_ctci.c ctc_lcs.c tuntap.c hsccmd.c hscmisc.c +@USE_BUILTIN_MEMRCHR_TRUE@MEMRCHR = memrchr.c +@USE_BUILTIN_MEMRCHR_FALSE@MEMRCHR = + + +# We need to still include the source for the dynamic modules +# in with the distribution regardless of whether or not the dyanmic +# modules themselves are to be built so if dynamic load not possible, +# then we need to include the source on the EXTRA_hercules_SOURCES +# statement so even though they won't/don't actually get built, they +# still nonetheless get included into distribution tarball. This is +# *similar* to (bit not identical to) the way the fthreads sources +# are handled. With the fthreads sources though, they can at least always +# be built (even though they may not always generate any actual code +# whenever they do) whereas the dynamic module source CANNOT (MUST not) +# even be *attempted* to be "built" if support for building dynamic modules +# doesn't even exist on the system doing the building. +dynamic_SRC = dyngui.c \ + dyninst.c \ + hdteq.c + + +extra_dynamic_SRC = dynguib.h \ + dynguip.h \ + dynguiv.h \ + dyngui.rc + + +dyndev_SRC = commadpt.c \ + console.c \ + cardpch.c \ + cardrdr.c \ + sockdev.c \ + printer.c \ + tapedev.c \ + hetlib.c \ + ctc_lcs.c \ + ctc_ctci.c \ + ctcadpt.c \ + w32ctca.c \ + tuntap.c + + + +# -module : create a dlopen'able module +# -no-undefined : required on all platform that do not allow shared modules +# to have undefined symbols +# $(LDADD) : Misc Linker flags set by autoconf +# -export-dynamic : so dlsym works (to be verified - not sure it is necessary) +# -avoid-version : needed.. Otherwise libtool gives crazy names to Windows +# DLLs +# +@BUILD_SHARED_TRUE@XSTATIC = +@BUILD_SHARED_FALSE@XSTATIC = -static + +@OPTION_DYNAMIC_LOAD_TRUE@DYNSRC = +@OPTION_DYNAMIC_LOAD_FALSE@DYNSRC = $(dyndev_SRC) +@OPTION_DYNAMIC_LOAD_TRUE@LTDL = ltdl.c +@OPTION_DYNAMIC_LOAD_FALSE@LTDL = +@OPTION_DYNAMIC_LOAD_TRUE@DYNMOD_LD_FLAGS = -module \ +@OPTION_DYNAMIC_LOAD_TRUE@ -no-undefined \ +@OPTION_DYNAMIC_LOAD_TRUE@ $(XSTATIC) \ +@OPTION_DYNAMIC_LOAD_TRUE@ -export-dynamic \ +@OPTION_DYNAMIC_LOAD_TRUE@ -avoid-version -hercifc_SOURCES = hercifc.c hostinfo.c version.c +@OPTION_DYNAMIC_LOAD_FALSE@DYNMOD_LD_FLAGS = -dasdinit_SOURCES = dasdinit.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +# DYNMOD_LD_ADD = libherc.la \ +# libhercs.la \ +# libhercu.la \ +# $(LDADD) \ +# $(LIBFTHREADS) +@OPTION_DYNAMIC_LOAD_TRUE@DYNMOD_LD_ADD = libherc.la \ +@OPTION_DYNAMIC_LOAD_TRUE@ libhercs.la \ +@OPTION_DYNAMIC_LOAD_TRUE@ $(LDADD) -dasdisup_SOURCES = dasdisup.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +@OPTION_DYNAMIC_LOAD_FALSE@DYNMOD_LD_ADD = +@OPTION_DYNAMIC_LOAD_TRUE@LIB_LD_FLAGS = -export-dynamic \ +@OPTION_DYNAMIC_LOAD_TRUE@ $(XSTATIC) \ +@OPTION_DYNAMIC_LOAD_TRUE@ -no-undefined \ +@OPTION_DYNAMIC_LOAD_TRUE@ -avoid-version -dasdload_SOURCES = dasdload.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +@OPTION_DYNAMIC_LOAD_FALSE@LIB_LD_FLAGS = $(XSTATIC) \ +@OPTION_DYNAMIC_LOAD_FALSE@ -no-undefined \ +@OPTION_DYNAMIC_LOAD_FALSE@ -avoid-version -dasdls_SOURCES = dasdls.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +# +# List of Libtool shared libraries & loadable modules +# +HERCLIBS = $(LIBFTHREADS) \ + libhercu.la \ + libherct.la \ + libhercd.la -dasdcat_SOURCES = dasdcat.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +HERCLIBS2 = libhercs.la \ + libherc.la -dasdpdsu_SOURCES = dasdpdsu.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +HERCMODS = dyngui.la \ + dyninst.la \ + hdteq.la \ + hdt1403.la \ + hdt2703.la \ + hdt3088.la \ + hdt3270.la \ + hdt3420.la \ + hdt3505.la \ + hdt3525.la -tapecopy_SOURCES = tapecopy.c codepage.c hostinfo.c version.c -tapemap_SOURCES = tapemap.c codepage.c hostinfo.c version.c +@OPTION_DYNAMIC_LOAD_TRUE@modexec_LTLIBRARIES = $(HERCMODS) -tapesplt_SOURCES = tapesplt.c codepage.c hostinfo.c version.c +noinst_LTLIBRARIES = $(HERCLIBS) +lib_LTLIBRARIES = $(HERCLIBS2) -cckdcdsk_SOURCES = cckdcdsk.c cckdutil.c dasdtab.c hostinfo.c version.c -cckdcomp_SOURCES = cckdcomp.c cckdutil.c dasdtab.c hostinfo.c version.c +# The following causes the dyanmic modules to not even get built +# unless support for building dynamic modules exists on the build system +bin_PROGRAMS = hercules \ + dasdinit dasdisup dasdload dasdls dasdcat dasdpdsu dasdseq \ + tapecopy tapemap tapesplt \ + cckdcdsk cckdcomp cckddiag cckdswap \ + dasdcopy \ + hetget hetinit hetmap hetupd \ + dmap2hrc \ + $(HERCIFC) -ckd2cckd_SOURCES = dasdcopy.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +EXTRA_PROGRAMS = hercifc -fba2cfba_SOURCES = dasdcopy.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +# +# For each module: +# +# ModuleName_la_SOURCES = +# ModuleName_la_LDFLAGS = $(DYNMOD_LD_FLAGS) (see above) +# ModuleName_la_LIBADD = libherc.la (the Core Hercules Shared Library) +# ModuleName_la_DEPENDENCIES = libherc.la (may not be necessary) +# +@OPTION_DYNAMIC_LOAD_TRUE@dyngui_la_SOURCES = dyngui.c +@OPTION_DYNAMIC_LOAD_TRUE@dyngui_la_LDFLAGS = $(DYNMOD_LD_FLAGS) +@OPTION_DYNAMIC_LOAD_TRUE@dyngui_la_LIBADD = $(DYNMOD_LD_ADD) +@OPTION_DYNAMIC_LOAD_TRUE@dyninst_la_SOURCES = dyninst.c +@OPTION_DYNAMIC_LOAD_TRUE@dyninst_la_LDFLAGS = $(DYNMOD_LD_FLAGS) +@OPTION_DYNAMIC_LOAD_TRUE@dyninst_la_LIBADD = $(DYNMOD_LD_ADD) -cfba2fba_SOURCES = dasdcopy.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +@OPTION_DYNAMIC_LOAD_TRUE@hdteq_la_SOURCES = hdteq.c +@OPTION_DYNAMIC_LOAD_TRUE@hdteq_la_LDFLAGS = $(DYNMOD_LD_FLAGS) +@OPTION_DYNAMIC_LOAD_TRUE@hdteq_la_LIBADD = $(DYNMOD_LD_ADD) + +@OPTION_DYNAMIC_LOAD_TRUE@hdt1403_la_SOURCES = printer.c +@OPTION_DYNAMIC_LOAD_TRUE@hdt1403_la_LDFLAGS = $(DYNMOD_LD_FLAGS) +@OPTION_DYNAMIC_LOAD_TRUE@hdt1403_la_LIBADD = $(DYNMOD_LD_ADD) + +@OPTION_DYNAMIC_LOAD_TRUE@hdt2703_la_SOURCES = commadpt.c +@OPTION_DYNAMIC_LOAD_TRUE@hdt2703_la_LDFLAGS = $(DYNMOD_LD_FLAGS) +@OPTION_DYNAMIC_LOAD_TRUE@hdt2703_la_LIBADD = $(DYNMOD_LD_ADD) + +@OPTION_DYNAMIC_LOAD_TRUE@hdt3088_la_SOURCES = ctc_lcs.c ctc_ctci.c ctcadpt.c w32ctca.c tuntap.c +@OPTION_DYNAMIC_LOAD_TRUE@hdt3088_la_LDFLAGS = $(DYNMOD_LD_FLAGS) +@OPTION_DYNAMIC_LOAD_TRUE@hdt3088_la_LIBADD = $(DYNMOD_LD_ADD) + +@OPTION_DYNAMIC_LOAD_TRUE@hdt3270_la_SOURCES = console.c +@OPTION_DYNAMIC_LOAD_TRUE@hdt3270_la_LDFLAGS = $(DYNMOD_LD_FLAGS) +@OPTION_DYNAMIC_LOAD_TRUE@hdt3270_la_LIBADD = $(DYNMOD_LD_ADD) + +@OPTION_DYNAMIC_LOAD_TRUE@hdt3420_la_SOURCES = tapedev.c +@OPTION_DYNAMIC_LOAD_TRUE@hdt3420_la_LDFLAGS = $(DYNMOD_LD_FLAGS) +@OPTION_DYNAMIC_LOAD_TRUE@hdt3420_la_LIBADD = $(DYNMOD_LD_ADD) libherct.la + +@OPTION_DYNAMIC_LOAD_TRUE@hdt3505_la_SOURCES = cardrdr.c sockdev.c +@OPTION_DYNAMIC_LOAD_TRUE@hdt3505_la_LDFLAGS = $(DYNMOD_LD_FLAGS) +@OPTION_DYNAMIC_LOAD_TRUE@hdt3505_la_LIBADD = $(DYNMOD_LD_ADD) + +@OPTION_DYNAMIC_LOAD_TRUE@hdt3525_la_SOURCES = cardpch.c +@OPTION_DYNAMIC_LOAD_TRUE@hdt3525_la_LDFLAGS = $(DYNMOD_LD_FLAGS) +@OPTION_DYNAMIC_LOAD_TRUE@hdt3525_la_LIBADD = $(DYNMOD_LD_ADD) + +@BUILD_FTHREADS_TRUE@libfthreads_la_SOURCES = $(FTHREADS) \ +@BUILD_FTHREADS_TRUE@ $(FISHHANG) \ +@BUILD_FTHREADS_TRUE@ $(FHOSTINFO) + + +@BUILD_FTHREADS_TRUE@libfthreads_la_LDFLAGS = $(LIB_LD_FLAGS) + +@BUILD_FTHREADS_TRUE@libfthreads_la_LIBADD = $(LDADD) + + +# +# Common data areas (shared) library +# +libhercs_la_SOURCES = hsys.c +libhercs_la_LDFLAGS = $(LIB_LD_FLAGS) -cckd2ckd_SOURCES = dasdcopy.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +libhercs_la_LIBADD = $(LDADD) -dasdcopy_SOURCES = dasdcopy.c dasdutil.c codepage.c hostinfo.c version.c \ - ckddasd.c cckddasd.c cckdutil.c dasdtab.c fbadasd.c $(FTHREADS) $(FISHHANG) +# +# Tape utility subroutines (shared) library +# +libherct_la_SOURCES = sllib.c \ + hetlib.c + + +libherct_la_LDFLAGS = $(LIB_LD_FLAGS) + +libherct_la_LIBADD = $(LDADD) + + +# +# DASD utility subroutines (shared) library +# +libhercd_la_SOURCES = ckddasd.c \ + fbadasd.c \ + cckddasd.c \ + cckdutil.c \ + dasdtab.c \ + cache.c \ + dasdutil.c \ + shared.c + + +libhercd_la_LDFLAGS = $(LIB_LD_FLAGS) + +libhercd_la_LIBADD = $(LDADD) + +# +# +libhercu_la_SOURCES = version.c \ + hscutl.c \ + hscutl2.c \ + codepage.c \ + logger.c \ + logmsg.c \ + hdl.c \ + $(HOSTINFO) \ + $(MEMRCHR) \ + parser.c \ + $(LTDL) + + +libhercu_la_LDFLAGS = $(LIB_LD_FLAGS) + +libhercu_la_LIBADD = $(LDADD) + + +# +# Core Hercules (shared) library +# +libherc_la_SOURCES = impl.c \ + config.c \ + panel.c \ + ipl.c \ + assist.c \ + dat.c \ + stack.c \ + cpu.c \ + vstore.c \ + general1.c \ + general2.c \ + plo.c \ + control.c \ + crypto.c \ + io.c \ + decimal.c \ + service.c \ + opcode.c \ + diagnose.c \ + diagmssf.c \ + vm.c \ + channel.c \ + external.c \ + float.c \ + trace.c \ + machchk.c \ + vector.c \ + xstore.c \ + cmpsc.c \ + sie.c \ + qdio.c \ + timer.c \ + esame.c \ + ieee.c \ + machdep.h \ + httpserv.c \ + cgibin.c \ + hsccmd.c \ + hscmisc.c \ + $(FISHIO) \ + $(DYNSRC) \ + ecpsvm.c + + +EXTRA_libherc_la_SOURCES = $(fthreads_SRC) \ + $(fishhang_SRC) \ + $(fishio_SRC) \ + $(memrchr_SRC) \ + $(dynamic_SRC) \ + $(extra_SRC) \ + $(dyndev_SRC) \ + ltdl.c + + +libherc_la_LDFLAGS = $(LIB_LD_FLAGS) + +libherc_la_LIBADD = libhercs.la \ + libhercu.la \ + libherct.la \ + libhercd.la \ + $(LIBFTHREADS) \ + $(LDADD) + + + +# +# THIS is the hercules executable. +# hdlmain.c is requires so that dlopen(self) retrieves +# the 'main' hdl symbols +# +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@HLDFLAGS = -dlopen self \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ -dlopen dyngui.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ -dlopen dyninst.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ -dlopen hdteq.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ -dlopen hdt1403.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ -dlopen hdt3420.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ -dlopen hdt2703.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ -dlopen hdt3088.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ -dlopen hdt3270.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ -dlopen hdt3505.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ -dlopen hdt3525.la + +@BUILD_SHARED_TRUE@@OPTION_DYNAMIC_LOAD_TRUE@HLDFLAGS = -dlopen self +@OPTION_DYNAMIC_LOAD_FALSE@HLDFLAGS = + +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@HDEPS = dyngui.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ dyninst.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ hdteq.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ hdt1403.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ hdt2703.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ hdt3088.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ hdt3270.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ hdt3505.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ libherc.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ libherct.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ libhercd.la \ +@BUILD_SHARED_FALSE@@OPTION_DYNAMIC_LOAD_TRUE@ hdt3525.la + +@BUILD_SHARED_TRUE@@OPTION_DYNAMIC_LOAD_TRUE@HDEPS = +@OPTION_DYNAMIC_LOAD_FALSE@HDEPS = + +hercules_SOURCES = bootstrap.c \ + hdlmain.c + + +hercules_LDADD = libherc.la libhercs.la $(LDADD) + +hercules_LDFLAGS = $(HLDFLAGS) + +hercules_DEPENDENCIES = libherc.la libhercs.la $(HDEPS) + + +# +# side binaries +# +tools_LD_FLAGS = +tools_ADDLIBS = $(HERCLIBS2) $(LDADD) +@BUILD_HERCIFC_TRUE@hercifc_SOURCES = hercifc.c +@BUILD_HERCIFC_TRUE@hercifc_LDADD = $(LDADD) +@BUILD_HERCIFC_TRUE@hercifc_LDFLAGS = $(tools_LD_FLAGS) -cckdswap_SOURCES = cckdswap.c cckdutil.c dasdtab.c hostinfo.c version.c +dasdinit_SOURCES = dasdinit.c +dasdinit_LDADD = $(tools_ADDLIBS) +dasdinit_LDFLAGS = $(tools_LD_FLAGS) -hetget_SOURCES = hetget.c hetlib.c sllib.c hostinfo.c version.c +dasdisup_SOURCES = dasdisup.c +dasdisup_LDADD = $(tools_ADDLIBS) +dasdisup_LDFLAGS = $(tools_LD_FLAGS) -hetinit_SOURCES = hetinit.c hetlib.c sllib.c hostinfo.c version.c +dasdload_SOURCES = dasdload.c +dasdload_LDADD = $(tools_ADDLIBS) +dasdload_LDFLAGS = $(tools_LD_FLAGS) -hetmap_SOURCES = hetmap.c hetlib.c sllib.c hostinfo.c version.c +dasdls_SOURCES = dasdls.c +dasdls_LDADD = $(tools_ADDLIBS) +dasdls_LDFLAGS = $(tools_LD_FLAGS) -hetupd_SOURCES = hetupd.c hetlib.c sllib.c hostinfo.c version.c +dasdcat_SOURCES = dasdcat.c +dasdcat_LDADD = $(tools_ADDLIBS) +dasdcat_LDFLAGS = $(tools_LD_FLAGS) -dmap2hrc_SOURCES = dmap2hrc.c hostinfo.c version.c +dasdpdsu_SOURCES = dasdpdsu.c +dasdpdsu_LDADD = $(tools_ADDLIBS) +dasdpdsu_LDFLAGS = $(tools_LD_FLAGS) -EXTRA_DIST = autoconf/config.rpath hercules.cnf CHANGES README.NETWORKING \ - README.OSX +dasdseq_SOURCES = dasdseq.c +dasdseq_LDADD = $(tools_ADDLIBS) +dasdseq_LDFLAGS = $(tools_LD_FLAGS) +tapecopy_SOURCES = tapecopy.c +tapecopy_LDADD = $(tools_ADDLIBS) +tapecopy_LDFLAGS = $(tools_LD_FLAGS) +tapemap_SOURCES = tapemap.c +tapemap_LDADD = $(tools_ADDLIBS) +tapemap_LDFLAGS = $(tools_LD_FLAGS) + +tapesplt_SOURCES = tapesplt.c +tapesplt_LDADD = $(tools_ADDLIBS) +tapesplt_LDFLAGS = $(tools_LD_FLAGS) + +cckdcdsk_SOURCES = cckdcdsk.c +cckdcdsk_LDADD = $(tools_ADDLIBS) +cckdcdsk_LDFLAGS = $(tools_LD_FLAGS) + +cckdcomp_SOURCES = cckdcomp.c +cckdcomp_LDADD = $(tools_ADDLIBS) +cckdcomp_LDFLAGS = $(tools_LD_FLAGS) + +cckddiag_SOURCES = cckddiag.c +cckddiag_LDADD = $(tools_ADDLIBS) +cckddiag_LDFLAGS = $(tools_LD_FLAGS) + +dasdcopy_SOURCES = dasdcopy.c +dasdcopy_LDADD = $(tools_ADDLIBS) +dasdcopy_LDFLAGS = $(tools_LD_FLAGS) + +cckdswap_SOURCES = cckdswap.c +cckdswap_LDADD = $(tools_ADDLIBS) +cckdswap_LDFLAGS = $(tools_LD_FLAGS) + +hetget_SOURCES = hetget.c +hetget_LDADD = $(tools_ADDLIBS) +hetget_LDFLAGS = $(tools_LD_FLAGS) + +hetinit_SOURCES = hetinit.c +hetinit_LDADD = $(tools_ADDLIBS) +hetinit_LDFLAGS = $(tools_LD_FLAGS) + +hetmap_SOURCES = hetmap.c +hetmap_LDADD = $(tools_ADDLIBS) +hetmap_LDFLAGS = $(tools_LD_FLAGS) + +hetupd_SOURCES = hetupd.c +hetupd_LDADD = $(tools_ADDLIBS) +hetupd_LDFLAGS = $(tools_LD_FLAGS) + +dmap2hrc_SOURCES = dmap2hrc.c +dmap2hrc_LDADD = $(tools_ADDLIBS) +dmap2hrc_LDFLAGS = $(tools_LD_FLAGS) + + +# +# files that are not 'built' per-se +# +EXTRA_DIST = \ + hercules.cnf \ + cckdfix.c \ + README.COMMADPT \ + README.CVS \ + README.ECPSVM \ + README.HDL \ + README.NETWORKING \ + README.OSX \ + README.TAPE \ + CHANGES \ + RELEASE.NOTES + + +# +# Source Header files. No 'build' for those +# noinst_HEADERS = fishhang.h \ - hostinfo.h cpuint.h feat370.h feat390.h feat900.h featall.h featchk.h \ - feature.h esa390.h opcode.h hercules.h inline.h dat.h vstore.h \ - hbyteswp.h dasdblks.h hetlib.h version.h parser.h dasdtab.h \ - sllib.h htypes.h fthreads.h w32chan.h w32ctca.h tt32api.h linklist.h \ - if_tun.h ieee-w32.h httpmisc.h devtype.h codepage.h hercnls.h \ - ctcadpt.h hercifc.h tuntap.h + hostinfo.h \ + cpuint.h \ + feat370.h \ + feat390.h \ + feat900.h \ + featall.h \ + featchk.h \ + feature.h \ + esa390.h \ + opcode.h \ + hercules.h \ + inline.h \ + dat.h \ + vstore.h \ + hbyteswp.h \ + dasdblks.h \ + hetlib.h \ + version.h \ + parser.h \ + dasdtab.h \ + sllib.h \ + htypes.h \ + fthreads.h \ + w32chan.h \ + w32ctca.h \ + tt32api.h \ + linklist.h \ + ieee-w32.h \ + httpmisc.h \ + devtype.h \ + codepage.h \ + hercnls.h \ + ctcadpt.h \ + hercifc.h \ + tuntap.h \ + tapedev.h \ + logger.h \ + commadpt.h \ + cache.h \ + ecpsvm.h \ + memrchr.h \ + shared.h \ + hscutl.h \ + hdl.h \ + crypto.h \ + sockdev.h \ + ltdl.h \ + herc_getopt.h \ + service.h \ + $(extra_dynamic_SRC) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/autoconf/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = intl/Makefile +LTLIBRARIES = $(lib_LTLIBRARIES) $(modexec_LTLIBRARIES) \ + $(noinst_LTLIBRARIES) + +@OPTION_DYNAMIC_LOAD_TRUE@dyngui_la_DEPENDENCIES = libherc.la \ +@OPTION_DYNAMIC_LOAD_TRUE@ libhercs.la +@OPTION_DYNAMIC_LOAD_FALSE@dyngui_la_DEPENDENCIES = +@OPTION_DYNAMIC_LOAD_TRUE@am_dyngui_la_OBJECTS = dyngui.lo +dyngui_la_OBJECTS = $(am_dyngui_la_OBJECTS) +@OPTION_DYNAMIC_LOAD_TRUE@dyninst_la_DEPENDENCIES = libherc.la \ +@OPTION_DYNAMIC_LOAD_TRUE@ libhercs.la +@OPTION_DYNAMIC_LOAD_FALSE@dyninst_la_DEPENDENCIES = +@OPTION_DYNAMIC_LOAD_TRUE@am_dyninst_la_OBJECTS = dyninst.lo +dyninst_la_OBJECTS = $(am_dyninst_la_OBJECTS) +@OPTION_DYNAMIC_LOAD_TRUE@hdt1403_la_DEPENDENCIES = libherc.la \ +@OPTION_DYNAMIC_LOAD_TRUE@ libhercs.la +@OPTION_DYNAMIC_LOAD_FALSE@hdt1403_la_DEPENDENCIES = +@OPTION_DYNAMIC_LOAD_TRUE@am_hdt1403_la_OBJECTS = printer.lo +hdt1403_la_OBJECTS = $(am_hdt1403_la_OBJECTS) +@OPTION_DYNAMIC_LOAD_TRUE@hdt2703_la_DEPENDENCIES = libherc.la \ +@OPTION_DYNAMIC_LOAD_TRUE@ libhercs.la +@OPTION_DYNAMIC_LOAD_FALSE@hdt2703_la_DEPENDENCIES = +@OPTION_DYNAMIC_LOAD_TRUE@am_hdt2703_la_OBJECTS = commadpt.lo +hdt2703_la_OBJECTS = $(am_hdt2703_la_OBJECTS) +@OPTION_DYNAMIC_LOAD_TRUE@hdt3088_la_DEPENDENCIES = libherc.la \ +@OPTION_DYNAMIC_LOAD_TRUE@ libhercs.la +@OPTION_DYNAMIC_LOAD_FALSE@hdt3088_la_DEPENDENCIES = +@OPTION_DYNAMIC_LOAD_TRUE@am_hdt3088_la_OBJECTS = ctc_lcs.lo ctc_ctci.lo \ +@OPTION_DYNAMIC_LOAD_TRUE@ ctcadpt.lo w32ctca.lo tuntap.lo +hdt3088_la_OBJECTS = $(am_hdt3088_la_OBJECTS) +@OPTION_DYNAMIC_LOAD_TRUE@hdt3270_la_DEPENDENCIES = libherc.la \ +@OPTION_DYNAMIC_LOAD_TRUE@ libhercs.la +@OPTION_DYNAMIC_LOAD_FALSE@hdt3270_la_DEPENDENCIES = +@OPTION_DYNAMIC_LOAD_TRUE@am_hdt3270_la_OBJECTS = console.lo +hdt3270_la_OBJECTS = $(am_hdt3270_la_OBJECTS) +@OPTION_DYNAMIC_LOAD_TRUE@hdt3420_la_DEPENDENCIES = libherc.la \ +@OPTION_DYNAMIC_LOAD_TRUE@ libhercs.la libherct.la +@OPTION_DYNAMIC_LOAD_FALSE@hdt3420_la_DEPENDENCIES = +@OPTION_DYNAMIC_LOAD_TRUE@am_hdt3420_la_OBJECTS = tapedev.lo +hdt3420_la_OBJECTS = $(am_hdt3420_la_OBJECTS) +@OPTION_DYNAMIC_LOAD_TRUE@hdt3505_la_DEPENDENCIES = libherc.la \ +@OPTION_DYNAMIC_LOAD_TRUE@ libhercs.la +@OPTION_DYNAMIC_LOAD_FALSE@hdt3505_la_DEPENDENCIES = +@OPTION_DYNAMIC_LOAD_TRUE@am_hdt3505_la_OBJECTS = cardrdr.lo sockdev.lo +hdt3505_la_OBJECTS = $(am_hdt3505_la_OBJECTS) +@OPTION_DYNAMIC_LOAD_TRUE@hdt3525_la_DEPENDENCIES = libherc.la \ +@OPTION_DYNAMIC_LOAD_TRUE@ libhercs.la +@OPTION_DYNAMIC_LOAD_FALSE@hdt3525_la_DEPENDENCIES = +@OPTION_DYNAMIC_LOAD_TRUE@am_hdt3525_la_OBJECTS = cardpch.lo +hdt3525_la_OBJECTS = $(am_hdt3525_la_OBJECTS) +@OPTION_DYNAMIC_LOAD_TRUE@hdteq_la_DEPENDENCIES = libherc.la libhercs.la +@OPTION_DYNAMIC_LOAD_FALSE@hdteq_la_DEPENDENCIES = +@OPTION_DYNAMIC_LOAD_TRUE@am_hdteq_la_OBJECTS = hdteq.lo +hdteq_la_OBJECTS = $(am_hdteq_la_OBJECTS) +@BUILD_FTHREADS_TRUE@libfthreads_la_DEPENDENCIES = +@BUILD_FTHREADS_FALSE@libfthreads_la_DEPENDENCIES = +am__objects_2 = fthreads.lo +@BUILD_FTHREADS_TRUE@am__objects_1 = $(am__objects_2) +@BUILD_FTHREADS_FALSE@am__objects_1 = +@BUILD_FISHHANG_FALSE@@BUILD_FTHREADS_TRUE@am__objects_3 = +am__objects_4 = fishhang.lo +@BUILD_FISHHANG_TRUE@@BUILD_FTHREADS_TRUE@am__objects_3 = \ +@BUILD_FISHHANG_TRUE@@BUILD_FTHREADS_TRUE@ $(am__objects_4) +@BUILD_FTHREADS_FALSE@am__objects_3 = +@BUILD_FTHREADS_TRUE@am__objects_5 = hostinfo.lo +@BUILD_FTHREADS_FALSE@am__objects_5 = +@BUILD_FTHREADS_TRUE@am_libfthreads_la_OBJECTS = $(am__objects_1) \ +@BUILD_FTHREADS_TRUE@ $(am__objects_3) $(am__objects_5) +libfthreads_la_OBJECTS = $(am_libfthreads_la_OBJECTS) +@BUILD_FTHREADS_TRUE@libherc_la_DEPENDENCIES = libhercs.la libhercu.la \ +@BUILD_FTHREADS_TRUE@ libherct.la libhercd.la libfthreads.la +@BUILD_FTHREADS_FALSE@libherc_la_DEPENDENCIES = libhercs.la libhercu.la \ +@BUILD_FTHREADS_FALSE@ libherct.la libhercd.la +am__objects_7 = w32chan.lo +@BUILD_FTHREADS_TRUE@am__objects_6 = $(am__objects_7) +@BUILD_FTHREADS_FALSE@am__objects_6 = +@OPTION_DYNAMIC_LOAD_TRUE@am__objects_8 = +am__objects_9 = commadpt.lo console.lo cardpch.lo cardrdr.lo sockdev.lo \ + printer.lo tapedev.lo hetlib.lo ctc_lcs.lo ctc_ctci.lo \ + ctcadpt.lo w32ctca.lo tuntap.lo +@OPTION_DYNAMIC_LOAD_FALSE@am__objects_8 = $(am__objects_9) +am_libherc_la_OBJECTS = impl.lo config.lo panel.lo ipl.lo assist.lo \ + dat.lo stack.lo cpu.lo vstore.lo general1.lo general2.lo plo.lo \ + control.lo crypto.lo io.lo decimal.lo service.lo opcode.lo \ + diagnose.lo diagmssf.lo vm.lo channel.lo external.lo float.lo \ + trace.lo machchk.lo vector.lo xstore.lo cmpsc.lo sie.lo qdio.lo \ + timer.lo esame.lo ieee.lo httpserv.lo cgibin.lo hsccmd.lo \ + hscmisc.lo $(am__objects_6) $(am__objects_8) ecpsvm.lo +libherc_la_OBJECTS = $(am_libherc_la_OBJECTS) +libhercd_la_DEPENDENCIES = +am_libhercd_la_OBJECTS = ckddasd.lo fbadasd.lo cckddasd.lo cckdutil.lo \ + dasdtab.lo cache.lo dasdutil.lo shared.lo +libhercd_la_OBJECTS = $(am_libhercd_la_OBJECTS) +libhercs_la_DEPENDENCIES = +am_libhercs_la_OBJECTS = hsys.lo +libhercs_la_OBJECTS = $(am_libhercs_la_OBJECTS) +libherct_la_DEPENDENCIES = +am_libherct_la_OBJECTS = sllib.lo hetlib.lo +libherct_la_OBJECTS = $(am_libherct_la_OBJECTS) +libhercu_la_DEPENDENCIES = +@BUILD_FTHREADS_TRUE@am__objects_13 = +@BUILD_FTHREADS_FALSE@am__objects_13 = hostinfo.lo +@USE_BUILTIN_MEMRCHR_TRUE@am__objects_14 = memrchr.lo +@USE_BUILTIN_MEMRCHR_FALSE@am__objects_14 = +@OPTION_DYNAMIC_LOAD_TRUE@am__objects_15 = ltdl.lo +@OPTION_DYNAMIC_LOAD_FALSE@am__objects_15 = +am_libhercu_la_OBJECTS = version.lo hscutl.lo hscutl2.lo codepage.lo \ + logger.lo logmsg.lo hdl.lo $(am__objects_13) $(am__objects_14) \ + parser.lo $(am__objects_15) +libhercu_la_OBJECTS = $(am_libhercu_la_OBJECTS) EXTRA_PROGRAMS = hercifc$(EXEEXT) -@BUILD_HERCIFC_TRUE@bin_PROGRAMS = hercules$(EXEEXT) hercifc$(EXEEXT) \ -@BUILD_HERCIFC_TRUE@ dasdinit$(EXEEXT) dasdisup$(EXEEXT) \ -@BUILD_HERCIFC_TRUE@ dasdload$(EXEEXT) dasdls$(EXEEXT) \ -@BUILD_HERCIFC_TRUE@ dasdcat$(EXEEXT) dasdpdsu$(EXEEXT) \ +@BUILD_HERCIFC_TRUE@bin_PROGRAMS = hercules$(EXEEXT) dasdinit$(EXEEXT) \ +@BUILD_HERCIFC_TRUE@ dasdisup$(EXEEXT) dasdload$(EXEEXT) \ +@BUILD_HERCIFC_TRUE@ dasdls$(EXEEXT) dasdcat$(EXEEXT) \ +@BUILD_HERCIFC_TRUE@ dasdpdsu$(EXEEXT) dasdseq$(EXEEXT) \ @BUILD_HERCIFC_TRUE@ tapecopy$(EXEEXT) tapemap$(EXEEXT) \ @BUILD_HERCIFC_TRUE@ tapesplt$(EXEEXT) cckdcdsk$(EXEEXT) \ -@BUILD_HERCIFC_TRUE@ cckdcomp$(EXEEXT) cckdswap$(EXEEXT) \ -@BUILD_HERCIFC_TRUE@ cckd2ckd$(EXEEXT) ckd2cckd$(EXEEXT) \ -@BUILD_HERCIFC_TRUE@ fba2cfba$(EXEEXT) cfba2fba$(EXEEXT) \ -@BUILD_HERCIFC_TRUE@ dasdcopy$(EXEEXT) hetget$(EXEEXT) \ -@BUILD_HERCIFC_TRUE@ hetinit$(EXEEXT) hetmap$(EXEEXT) \ -@BUILD_HERCIFC_TRUE@ hetupd$(EXEEXT) dmap2hrc$(EXEEXT) +@BUILD_HERCIFC_TRUE@ cckdcomp$(EXEEXT) cckddiag$(EXEEXT) \ +@BUILD_HERCIFC_TRUE@ cckdswap$(EXEEXT) dasdcopy$(EXEEXT) \ +@BUILD_HERCIFC_TRUE@ hetget$(EXEEXT) hetinit$(EXEEXT) \ +@BUILD_HERCIFC_TRUE@ hetmap$(EXEEXT) hetupd$(EXEEXT) \ +@BUILD_HERCIFC_TRUE@ dmap2hrc$(EXEEXT) hercifc$(EXEEXT) @BUILD_HERCIFC_FALSE@bin_PROGRAMS = hercules$(EXEEXT) dasdinit$(EXEEXT) \ @BUILD_HERCIFC_FALSE@ dasdisup$(EXEEXT) dasdload$(EXEEXT) \ @BUILD_HERCIFC_FALSE@ dasdls$(EXEEXT) dasdcat$(EXEEXT) \ -@BUILD_HERCIFC_FALSE@ dasdpdsu$(EXEEXT) tapecopy$(EXEEXT) \ -@BUILD_HERCIFC_FALSE@ tapemap$(EXEEXT) tapesplt$(EXEEXT) \ -@BUILD_HERCIFC_FALSE@ cckdcdsk$(EXEEXT) cckdcomp$(EXEEXT) \ -@BUILD_HERCIFC_FALSE@ cckdswap$(EXEEXT) cckd2ckd$(EXEEXT) \ -@BUILD_HERCIFC_FALSE@ ckd2cckd$(EXEEXT) fba2cfba$(EXEEXT) \ -@BUILD_HERCIFC_FALSE@ cfba2fba$(EXEEXT) dasdcopy$(EXEEXT) \ +@BUILD_HERCIFC_FALSE@ dasdpdsu$(EXEEXT) dasdseq$(EXEEXT) \ +@BUILD_HERCIFC_FALSE@ tapecopy$(EXEEXT) tapemap$(EXEEXT) \ +@BUILD_HERCIFC_FALSE@ tapesplt$(EXEEXT) cckdcdsk$(EXEEXT) \ +@BUILD_HERCIFC_FALSE@ cckdcomp$(EXEEXT) cckddiag$(EXEEXT) \ +@BUILD_HERCIFC_FALSE@ cckdswap$(EXEEXT) dasdcopy$(EXEEXT) \ @BUILD_HERCIFC_FALSE@ hetget$(EXEEXT) hetinit$(EXEEXT) \ @BUILD_HERCIFC_FALSE@ hetmap$(EXEEXT) hetupd$(EXEEXT) \ @BUILD_HERCIFC_FALSE@ dmap2hrc$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) -am__objects_2 = fthreads.$(OBJEXT) -@BUILD_FTHREADS_TRUE@am__objects_1 = $(am__objects_2) -@BUILD_FTHREADS_FALSE@am__objects_1 = -@BUILD_FISHHANG_FALSE@@BUILD_FTHREADS_TRUE@am__objects_3 = -am__objects_4 = fishhang.$(OBJEXT) -@BUILD_FISHHANG_TRUE@@BUILD_FTHREADS_TRUE@am__objects_3 = \ -@BUILD_FISHHANG_TRUE@@BUILD_FTHREADS_TRUE@ $(am__objects_4) -@BUILD_FTHREADS_FALSE@am__objects_3 = -am_cckd2ckd_OBJECTS = dasdcopy.$(OBJEXT) dasdutil.$(OBJEXT) \ - codepage.$(OBJEXT) hostinfo.$(OBJEXT) version.$(OBJEXT) \ - ckddasd.$(OBJEXT) cckddasd.$(OBJEXT) cckdutil.$(OBJEXT) \ - dasdtab.$(OBJEXT) fbadasd.$(OBJEXT) $(am__objects_1) \ - $(am__objects_3) -cckd2ckd_OBJECTS = $(am_cckd2ckd_OBJECTS) -cckd2ckd_LDADD = $(LDADD) -cckd2ckd_DEPENDENCIES = -cckd2ckd_LDFLAGS = -am_cckdcdsk_OBJECTS = cckdcdsk.$(OBJEXT) cckdutil.$(OBJEXT) \ - dasdtab.$(OBJEXT) hostinfo.$(OBJEXT) version.$(OBJEXT) +am_cckdcdsk_OBJECTS = cckdcdsk.$(OBJEXT) cckdcdsk_OBJECTS = $(am_cckdcdsk_OBJECTS) -cckdcdsk_LDADD = $(LDADD) -cckdcdsk_DEPENDENCIES = -cckdcdsk_LDFLAGS = -am_cckdcomp_OBJECTS = cckdcomp.$(OBJEXT) cckdutil.$(OBJEXT) \ - dasdtab.$(OBJEXT) hostinfo.$(OBJEXT) version.$(OBJEXT) +cckdcdsk_DEPENDENCIES = libhercs.la libherc.la +am_cckdcomp_OBJECTS = cckdcomp.$(OBJEXT) cckdcomp_OBJECTS = $(am_cckdcomp_OBJECTS) -cckdcomp_LDADD = $(LDADD) -cckdcomp_DEPENDENCIES = -cckdcomp_LDFLAGS = -am_cckdswap_OBJECTS = cckdswap.$(OBJEXT) cckdutil.$(OBJEXT) \ - dasdtab.$(OBJEXT) hostinfo.$(OBJEXT) version.$(OBJEXT) +cckdcomp_DEPENDENCIES = libhercs.la libherc.la +am_cckddiag_OBJECTS = cckddiag.$(OBJEXT) +cckddiag_OBJECTS = $(am_cckddiag_OBJECTS) +cckddiag_DEPENDENCIES = libhercs.la libherc.la +am_cckdswap_OBJECTS = cckdswap.$(OBJEXT) cckdswap_OBJECTS = $(am_cckdswap_OBJECTS) -cckdswap_LDADD = $(LDADD) -cckdswap_DEPENDENCIES = -cckdswap_LDFLAGS = -am_cfba2fba_OBJECTS = dasdcopy.$(OBJEXT) dasdutil.$(OBJEXT) \ - codepage.$(OBJEXT) hostinfo.$(OBJEXT) version.$(OBJEXT) \ - ckddasd.$(OBJEXT) cckddasd.$(OBJEXT) cckdutil.$(OBJEXT) \ - dasdtab.$(OBJEXT) fbadasd.$(OBJEXT) $(am__objects_1) \ - $(am__objects_3) -cfba2fba_OBJECTS = $(am_cfba2fba_OBJECTS) -cfba2fba_LDADD = $(LDADD) -cfba2fba_DEPENDENCIES = -cfba2fba_LDFLAGS = -am_ckd2cckd_OBJECTS = dasdcopy.$(OBJEXT) dasdutil.$(OBJEXT) \ - codepage.$(OBJEXT) hostinfo.$(OBJEXT) version.$(OBJEXT) \ - ckddasd.$(OBJEXT) cckddasd.$(OBJEXT) cckdutil.$(OBJEXT) \ - dasdtab.$(OBJEXT) fbadasd.$(OBJEXT) $(am__objects_1) \ - $(am__objects_3) -ckd2cckd_OBJECTS = $(am_ckd2cckd_OBJECTS) -ckd2cckd_LDADD = $(LDADD) -ckd2cckd_DEPENDENCIES = -ckd2cckd_LDFLAGS = -am_dasdcat_OBJECTS = dasdcat.$(OBJEXT) dasdutil.$(OBJEXT) \ - codepage.$(OBJEXT) hostinfo.$(OBJEXT) version.$(OBJEXT) \ - ckddasd.$(OBJEXT) cckddasd.$(OBJEXT) cckdutil.$(OBJEXT) \ - dasdtab.$(OBJEXT) fbadasd.$(OBJEXT) $(am__objects_1) \ - $(am__objects_3) +cckdswap_DEPENDENCIES = libhercs.la libherc.la +am_dasdcat_OBJECTS = dasdcat.$(OBJEXT) dasdcat_OBJECTS = $(am_dasdcat_OBJECTS) -dasdcat_LDADD = $(LDADD) -dasdcat_DEPENDENCIES = -dasdcat_LDFLAGS = -am_dasdcopy_OBJECTS = dasdcopy.$(OBJEXT) dasdutil.$(OBJEXT) \ - codepage.$(OBJEXT) hostinfo.$(OBJEXT) version.$(OBJEXT) \ - ckddasd.$(OBJEXT) cckddasd.$(OBJEXT) cckdutil.$(OBJEXT) \ - dasdtab.$(OBJEXT) fbadasd.$(OBJEXT) $(am__objects_1) \ - $(am__objects_3) +dasdcat_DEPENDENCIES = libhercs.la libherc.la +am_dasdcopy_OBJECTS = dasdcopy.$(OBJEXT) dasdcopy_OBJECTS = $(am_dasdcopy_OBJECTS) -dasdcopy_LDADD = $(LDADD) -dasdcopy_DEPENDENCIES = -dasdcopy_LDFLAGS = -am_dasdinit_OBJECTS = dasdinit.$(OBJEXT) dasdutil.$(OBJEXT) \ - codepage.$(OBJEXT) hostinfo.$(OBJEXT) version.$(OBJEXT) \ - ckddasd.$(OBJEXT) cckddasd.$(OBJEXT) cckdutil.$(OBJEXT) \ - dasdtab.$(OBJEXT) fbadasd.$(OBJEXT) $(am__objects_1) \ - $(am__objects_3) +dasdcopy_DEPENDENCIES = libhercs.la libherc.la +am_dasdinit_OBJECTS = dasdinit.$(OBJEXT) dasdinit_OBJECTS = $(am_dasdinit_OBJECTS) -dasdinit_LDADD = $(LDADD) -dasdinit_DEPENDENCIES = -dasdinit_LDFLAGS = -am_dasdisup_OBJECTS = dasdisup.$(OBJEXT) dasdutil.$(OBJEXT) \ - codepage.$(OBJEXT) hostinfo.$(OBJEXT) version.$(OBJEXT) \ - ckddasd.$(OBJEXT) cckddasd.$(OBJEXT) cckdutil.$(OBJEXT) \ - dasdtab.$(OBJEXT) fbadasd.$(OBJEXT) $(am__objects_1) \ - $(am__objects_3) +dasdinit_DEPENDENCIES = libhercs.la libherc.la +am_dasdisup_OBJECTS = dasdisup.$(OBJEXT) dasdisup_OBJECTS = $(am_dasdisup_OBJECTS) -dasdisup_LDADD = $(LDADD) -dasdisup_DEPENDENCIES = -dasdisup_LDFLAGS = -am_dasdload_OBJECTS = dasdload.$(OBJEXT) dasdutil.$(OBJEXT) \ - codepage.$(OBJEXT) hostinfo.$(OBJEXT) version.$(OBJEXT) \ - ckddasd.$(OBJEXT) cckddasd.$(OBJEXT) cckdutil.$(OBJEXT) \ - dasdtab.$(OBJEXT) fbadasd.$(OBJEXT) $(am__objects_1) \ - $(am__objects_3) +dasdisup_DEPENDENCIES = libhercs.la libherc.la +am_dasdload_OBJECTS = dasdload.$(OBJEXT) dasdload_OBJECTS = $(am_dasdload_OBJECTS) -dasdload_LDADD = $(LDADD) -dasdload_DEPENDENCIES = -dasdload_LDFLAGS = -am_dasdls_OBJECTS = dasdls.$(OBJEXT) dasdutil.$(OBJEXT) \ - codepage.$(OBJEXT) hostinfo.$(OBJEXT) version.$(OBJEXT) \ - ckddasd.$(OBJEXT) cckddasd.$(OBJEXT) cckdutil.$(OBJEXT) \ - dasdtab.$(OBJEXT) fbadasd.$(OBJEXT) $(am__objects_1) \ - $(am__objects_3) +dasdload_DEPENDENCIES = libhercs.la libherc.la +am_dasdls_OBJECTS = dasdls.$(OBJEXT) dasdls_OBJECTS = $(am_dasdls_OBJECTS) -dasdls_LDADD = $(LDADD) -dasdls_DEPENDENCIES = -dasdls_LDFLAGS = -am_dasdpdsu_OBJECTS = dasdpdsu.$(OBJEXT) dasdutil.$(OBJEXT) \ - codepage.$(OBJEXT) hostinfo.$(OBJEXT) version.$(OBJEXT) \ - ckddasd.$(OBJEXT) cckddasd.$(OBJEXT) cckdutil.$(OBJEXT) \ - dasdtab.$(OBJEXT) fbadasd.$(OBJEXT) $(am__objects_1) \ - $(am__objects_3) +dasdls_DEPENDENCIES = libhercs.la libherc.la +am_dasdpdsu_OBJECTS = dasdpdsu.$(OBJEXT) dasdpdsu_OBJECTS = $(am_dasdpdsu_OBJECTS) -dasdpdsu_LDADD = $(LDADD) -dasdpdsu_DEPENDENCIES = -dasdpdsu_LDFLAGS = -am_dmap2hrc_OBJECTS = dmap2hrc.$(OBJEXT) hostinfo.$(OBJEXT) \ - version.$(OBJEXT) +dasdpdsu_DEPENDENCIES = libhercs.la libherc.la +am_dasdseq_OBJECTS = dasdseq.$(OBJEXT) +dasdseq_OBJECTS = $(am_dasdseq_OBJECTS) +dasdseq_DEPENDENCIES = libhercs.la libherc.la +am_dmap2hrc_OBJECTS = dmap2hrc.$(OBJEXT) dmap2hrc_OBJECTS = $(am_dmap2hrc_OBJECTS) -dmap2hrc_LDADD = $(LDADD) -dmap2hrc_DEPENDENCIES = -dmap2hrc_LDFLAGS = -am_fba2cfba_OBJECTS = dasdcopy.$(OBJEXT) dasdutil.$(OBJEXT) \ - codepage.$(OBJEXT) hostinfo.$(OBJEXT) version.$(OBJEXT) \ - ckddasd.$(OBJEXT) cckddasd.$(OBJEXT) cckdutil.$(OBJEXT) \ - dasdtab.$(OBJEXT) fbadasd.$(OBJEXT) $(am__objects_1) \ - $(am__objects_3) -fba2cfba_OBJECTS = $(am_fba2cfba_OBJECTS) -fba2cfba_LDADD = $(LDADD) -fba2cfba_DEPENDENCIES = -fba2cfba_LDFLAGS = -am_hercifc_OBJECTS = hercifc.$(OBJEXT) hostinfo.$(OBJEXT) \ - version.$(OBJEXT) +dmap2hrc_DEPENDENCIES = libhercs.la libherc.la +@BUILD_HERCIFC_TRUE@am_hercifc_OBJECTS = hercifc.$(OBJEXT) hercifc_OBJECTS = $(am_hercifc_OBJECTS) -hercifc_LDADD = $(LDADD) -hercifc_DEPENDENCIES = -hercifc_LDFLAGS = -am__objects_6 = w32chan.$(OBJEXT) -@BUILD_FTHREADS_TRUE@am__objects_5 = $(am__objects_6) -@BUILD_FTHREADS_FALSE@am__objects_5 = -am_hercules_OBJECTS = hostinfo.$(OBJEXT) w32ctca.$(OBJEXT) \ - impl.$(OBJEXT) config.$(OBJEXT) panel.$(OBJEXT) \ - version.$(OBJEXT) ipl.$(OBJEXT) assist.$(OBJEXT) dat.$(OBJEXT) \ - stack.$(OBJEXT) cpu.$(OBJEXT) vstore.$(OBJEXT) \ - general1.$(OBJEXT) general2.$(OBJEXT) plo.$(OBJEXT) \ - control.$(OBJEXT) io.$(OBJEXT) decimal.$(OBJEXT) \ - service.$(OBJEXT) opcode.$(OBJEXT) diagnose.$(OBJEXT) \ - diagmssf.$(OBJEXT) vm.$(OBJEXT) channel.$(OBJEXT) \ - ckddasd.$(OBJEXT) fbadasd.$(OBJEXT) tapedev.$(OBJEXT) \ - cardrdr.$(OBJEXT) cardpch.$(OBJEXT) printer.$(OBJEXT) \ - console.$(OBJEXT) external.$(OBJEXT) float.$(OBJEXT) \ - ctcadpt.$(OBJEXT) trace.$(OBJEXT) machchk.$(OBJEXT) \ - vector.$(OBJEXT) xstore.$(OBJEXT) cmpsc.$(OBJEXT) sie.$(OBJEXT) \ - timer.$(OBJEXT) esame.$(OBJEXT) cckddasd.$(OBJEXT) \ - cckdutil.$(OBJEXT) dasdtab.$(OBJEXT) parser.$(OBJEXT) \ - hetlib.$(OBJEXT) ieee.$(OBJEXT) $(am__objects_1) \ - $(am__objects_3) $(am__objects_5) httpserv.$(OBJEXT) \ - cgibin.$(OBJEXT) devtype.$(OBJEXT) codepage.$(OBJEXT) \ - ctc_ctci.$(OBJEXT) ctc_lcs.$(OBJEXT) tuntap.$(OBJEXT) \ - hsccmd.$(OBJEXT) hscmisc.$(OBJEXT) +@BUILD_HERCIFC_TRUE@hercifc_DEPENDENCIES = +@BUILD_HERCIFC_FALSE@hercifc_DEPENDENCIES = +am_hercules_OBJECTS = bootstrap.$(OBJEXT) hdlmain.$(OBJEXT) hercules_OBJECTS = $(am_hercules_OBJECTS) -hercules_LDADD = $(LDADD) -hercules_DEPENDENCIES = -hercules_LDFLAGS = -am_hetget_OBJECTS = hetget.$(OBJEXT) hetlib.$(OBJEXT) sllib.$(OBJEXT) \ - hostinfo.$(OBJEXT) version.$(OBJEXT) +am_hetget_OBJECTS = hetget.$(OBJEXT) hetget_OBJECTS = $(am_hetget_OBJECTS) -hetget_LDADD = $(LDADD) -hetget_DEPENDENCIES = -hetget_LDFLAGS = -am_hetinit_OBJECTS = hetinit.$(OBJEXT) hetlib.$(OBJEXT) sllib.$(OBJEXT) \ - hostinfo.$(OBJEXT) version.$(OBJEXT) +hetget_DEPENDENCIES = libhercs.la libherc.la +am_hetinit_OBJECTS = hetinit.$(OBJEXT) hetinit_OBJECTS = $(am_hetinit_OBJECTS) -hetinit_LDADD = $(LDADD) -hetinit_DEPENDENCIES = -hetinit_LDFLAGS = -am_hetmap_OBJECTS = hetmap.$(OBJEXT) hetlib.$(OBJEXT) sllib.$(OBJEXT) \ - hostinfo.$(OBJEXT) version.$(OBJEXT) +hetinit_DEPENDENCIES = libhercs.la libherc.la +am_hetmap_OBJECTS = hetmap.$(OBJEXT) hetmap_OBJECTS = $(am_hetmap_OBJECTS) -hetmap_LDADD = $(LDADD) -hetmap_DEPENDENCIES = -hetmap_LDFLAGS = -am_hetupd_OBJECTS = hetupd.$(OBJEXT) hetlib.$(OBJEXT) sllib.$(OBJEXT) \ - hostinfo.$(OBJEXT) version.$(OBJEXT) +hetmap_DEPENDENCIES = libhercs.la libherc.la +am_hetupd_OBJECTS = hetupd.$(OBJEXT) hetupd_OBJECTS = $(am_hetupd_OBJECTS) -hetupd_LDADD = $(LDADD) -hetupd_DEPENDENCIES = -hetupd_LDFLAGS = -am_tapecopy_OBJECTS = tapecopy.$(OBJEXT) codepage.$(OBJEXT) \ - hostinfo.$(OBJEXT) version.$(OBJEXT) +hetupd_DEPENDENCIES = libhercs.la libherc.la +am_tapecopy_OBJECTS = tapecopy.$(OBJEXT) tapecopy_OBJECTS = $(am_tapecopy_OBJECTS) -tapecopy_LDADD = $(LDADD) -tapecopy_DEPENDENCIES = -tapecopy_LDFLAGS = -am_tapemap_OBJECTS = tapemap.$(OBJEXT) codepage.$(OBJEXT) \ - hostinfo.$(OBJEXT) version.$(OBJEXT) +tapecopy_DEPENDENCIES = libhercs.la libherc.la +am_tapemap_OBJECTS = tapemap.$(OBJEXT) tapemap_OBJECTS = $(am_tapemap_OBJECTS) -tapemap_LDADD = $(LDADD) -tapemap_DEPENDENCIES = -tapemap_LDFLAGS = -am_tapesplt_OBJECTS = tapesplt.$(OBJEXT) codepage.$(OBJEXT) \ - hostinfo.$(OBJEXT) version.$(OBJEXT) +tapemap_DEPENDENCIES = libhercs.la libherc.la +am_tapesplt_OBJECTS = tapesplt.$(OBJEXT) tapesplt_OBJECTS = $(am_tapesplt_OBJECTS) -tapesplt_LDADD = $(LDADD) -tapesplt_DEPENDENCIES = -tapesplt_LDFLAGS = +tapesplt_DEPENDENCIES = libhercs.la libherc.la DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I. @@ -484,59 +901,79 @@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/assist.Po ./$(DEPDIR)/cardpch.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/cardrdr.Po ./$(DEPDIR)/cckdcdsk.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/cckdcomp.Po ./$(DEPDIR)/cckddasd.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/cckdswap.Po ./$(DEPDIR)/cckdutil.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/cgibin.Po ./$(DEPDIR)/channel.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/ckddasd.Po ./$(DEPDIR)/cmpsc.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/codepage.Po ./$(DEPDIR)/config.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/console.Po ./$(DEPDIR)/control.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/cpu.Po ./$(DEPDIR)/ctc_ctci.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/ctc_lcs.Po ./$(DEPDIR)/ctcadpt.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/dasdcat.Po ./$(DEPDIR)/dasdcopy.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/dasdinit.Po ./$(DEPDIR)/dasdisup.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/dasdload.Po ./$(DEPDIR)/dasdls.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/dasdpdsu.Po ./$(DEPDIR)/dasdtab.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/dasdutil.Po ./$(DEPDIR)/dat.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/decimal.Po ./$(DEPDIR)/devtype.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/diagmssf.Po ./$(DEPDIR)/diagnose.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/dmap2hrc.Po ./$(DEPDIR)/esame.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/external.Po ./$(DEPDIR)/fbadasd.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/fishhang.Po ./$(DEPDIR)/float.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/fthreads.Po ./$(DEPDIR)/general1.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/general2.Po ./$(DEPDIR)/hercifc.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/hetget.Po ./$(DEPDIR)/hetinit.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/hetlib.Po ./$(DEPDIR)/hetmap.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/hetupd.Po ./$(DEPDIR)/hostinfo.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/hsccmd.Po ./$(DEPDIR)/hscmisc.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/httpserv.Po ./$(DEPDIR)/ieee.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/impl.Po ./$(DEPDIR)/io.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/ipl.Po ./$(DEPDIR)/machchk.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/opcode.Po ./$(DEPDIR)/panel.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/parser.Po ./$(DEPDIR)/plo.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/printer.Po ./$(DEPDIR)/service.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/sie.Po ./$(DEPDIR)/sllib.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/stack.Po ./$(DEPDIR)/tapecopy.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/tapedev.Po ./$(DEPDIR)/tapemap.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/tapesplt.Po ./$(DEPDIR)/timer.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/trace.Po ./$(DEPDIR)/tuntap.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/vector.Po ./$(DEPDIR)/version.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/vm.Po ./$(DEPDIR)/vstore.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/w32chan.Po ./$(DEPDIR)/w32ctca.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/xstore.Po +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/assist.Plo ./$(DEPDIR)/bootstrap.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/cache.Plo ./$(DEPDIR)/cardpch.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/cardrdr.Plo ./$(DEPDIR)/cckdcdsk.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/cckdcomp.Po ./$(DEPDIR)/cckddasd.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/cckddiag.Po ./$(DEPDIR)/cckdswap.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/cckdutil.Plo ./$(DEPDIR)/cgibin.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/channel.Plo ./$(DEPDIR)/ckddasd.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/cmpsc.Plo ./$(DEPDIR)/codepage.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/commadpt.Plo ./$(DEPDIR)/config.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/console.Plo ./$(DEPDIR)/control.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/cpu.Plo ./$(DEPDIR)/crypto.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/ctc_ctci.Plo ./$(DEPDIR)/ctc_lcs.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/ctcadpt.Plo ./$(DEPDIR)/dasdcat.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/dasdcopy.Po ./$(DEPDIR)/dasdinit.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/dasdisup.Po ./$(DEPDIR)/dasdload.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/dasdls.Po ./$(DEPDIR)/dasdpdsu.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/dasdseq.Po ./$(DEPDIR)/dasdtab.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/dasdutil.Plo ./$(DEPDIR)/dat.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/decimal.Plo ./$(DEPDIR)/diagmssf.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/diagnose.Plo ./$(DEPDIR)/dmap2hrc.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/dyngui.Plo ./$(DEPDIR)/dyninst.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/ecpsvm.Plo ./$(DEPDIR)/esame.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/external.Plo ./$(DEPDIR)/fbadasd.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/fishhang.Plo ./$(DEPDIR)/float.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/fthreads.Plo ./$(DEPDIR)/general1.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/general2.Plo ./$(DEPDIR)/hdl.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/hdlmain.Po ./$(DEPDIR)/hdteq.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/hercifc.Po ./$(DEPDIR)/hetget.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/hetinit.Po ./$(DEPDIR)/hetlib.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/hetmap.Po ./$(DEPDIR)/hetupd.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/hostinfo.Plo ./$(DEPDIR)/hsccmd.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/hscmisc.Plo ./$(DEPDIR)/hscutl.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/hscutl2.Plo ./$(DEPDIR)/hsys.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/httpserv.Plo ./$(DEPDIR)/ieee.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/impl.Plo ./$(DEPDIR)/io.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/ipl.Plo ./$(DEPDIR)/logger.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/logmsg.Plo ./$(DEPDIR)/ltdl.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/machchk.Plo ./$(DEPDIR)/memrchr.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/opcode.Plo ./$(DEPDIR)/panel.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/parser.Plo ./$(DEPDIR)/plo.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/printer.Plo ./$(DEPDIR)/qdio.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/service.Plo ./$(DEPDIR)/shared.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/sie.Plo ./$(DEPDIR)/sllib.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/sockdev.Plo ./$(DEPDIR)/stack.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/tapecopy.Po ./$(DEPDIR)/tapedev.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/tapemap.Po ./$(DEPDIR)/tapesplt.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/timer.Plo ./$(DEPDIR)/trace.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/tuntap.Plo ./$(DEPDIR)/vector.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/version.Plo ./$(DEPDIR)/vm.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/vstore.Plo ./$(DEPDIR)/w32chan.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/w32ctca.Plo ./$(DEPDIR)/xstore.Plo COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ CFLAGS = @CFLAGS@ -DIST_SOURCES = $(cckd2ckd_SOURCES) $(cckdcdsk_SOURCES) \ - $(cckdcomp_SOURCES) $(cckdswap_SOURCES) $(cfba2fba_SOURCES) \ - $(ckd2cckd_SOURCES) $(dasdcat_SOURCES) $(dasdcopy_SOURCES) \ - $(dasdinit_SOURCES) $(dasdisup_SOURCES) $(dasdload_SOURCES) \ - $(dasdls_SOURCES) $(dasdpdsu_SOURCES) $(dmap2hrc_SOURCES) \ - $(fba2cfba_SOURCES) $(hercifc_SOURCES) $(hercules_SOURCES) \ - $(EXTRA_hercules_SOURCES) $(hetget_SOURCES) $(hetinit_SOURCES) \ +DIST_SOURCES = $(dyngui_la_SOURCES) $(dyninst_la_SOURCES) \ + $(hdt1403_la_SOURCES) $(hdt2703_la_SOURCES) \ + $(hdt3088_la_SOURCES) $(hdt3270_la_SOURCES) \ + $(hdt3420_la_SOURCES) $(hdt3505_la_SOURCES) \ + $(hdt3525_la_SOURCES) $(hdteq_la_SOURCES) \ + $(libfthreads_la_SOURCES) $(libherc_la_SOURCES) \ + $(EXTRA_libherc_la_SOURCES) $(libhercd_la_SOURCES) \ + $(libhercs_la_SOURCES) $(libherct_la_SOURCES) \ + $(libhercu_la_SOURCES) $(cckdcdsk_SOURCES) $(cckdcomp_SOURCES) \ + $(cckddiag_SOURCES) $(cckdswap_SOURCES) $(dasdcat_SOURCES) \ + $(dasdcopy_SOURCES) $(dasdinit_SOURCES) $(dasdisup_SOURCES) \ + $(dasdload_SOURCES) $(dasdls_SOURCES) $(dasdpdsu_SOURCES) \ + $(dasdseq_SOURCES) $(dmap2hrc_SOURCES) $(hercifc_SOURCES) \ + $(hercules_SOURCES) $(hetget_SOURCES) $(hetinit_SOURCES) \ $(hetmap_SOURCES) $(hetupd_SOURCES) $(tapecopy_SOURCES) \ $(tapemap_SOURCES) $(tapesplt_SOURCES) HEADERS = $(noinst_HEADERS) @@ -549,16 +986,16 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \ DIST_COMMON = $(noinst_HEADERS) ABOUT-NLS INSTALL Makefile.am \ Makefile.in aclocal.m4 autoconf/README autoconf/config.guess \ autoconf/config.rpath autoconf/config.sub autoconf/depcomp \ - autoconf/install-sh autoconf/missing autoconf/mkinstalldirs \ - config.h.in configure configure.ac + autoconf/install-sh autoconf/ltmain.sh autoconf/missing \ + autoconf/mkinstalldirs config.h.in configure configure.ac DIST_SUBDIRS = $(SUBDIRS) -SOURCES = $(cckd2ckd_SOURCES) $(cckdcdsk_SOURCES) $(cckdcomp_SOURCES) $(cckdswap_SOURCES) $(cfba2fba_SOURCES) $(ckd2cckd_SOURCES) $(dasdcat_SOURCES) $(dasdcopy_SOURCES) $(dasdinit_SOURCES) $(dasdisup_SOURCES) $(dasdload_SOURCES) $(dasdls_SOURCES) $(dasdpdsu_SOURCES) $(dmap2hrc_SOURCES) $(fba2cfba_SOURCES) $(hercifc_SOURCES) $(hercules_SOURCES) $(EXTRA_hercules_SOURCES) $(hetget_SOURCES) $(hetinit_SOURCES) $(hetmap_SOURCES) $(hetupd_SOURCES) $(tapecopy_SOURCES) $(tapemap_SOURCES) $(tapesplt_SOURCES) +SOURCES = $(dyngui_la_SOURCES) $(dyninst_la_SOURCES) $(hdt1403_la_SOURCES) $(hdt2703_la_SOURCES) $(hdt3088_la_SOURCES) $(hdt3270_la_SOURCES) $(hdt3420_la_SOURCES) $(hdt3505_la_SOURCES) $(hdt3525_la_SOURCES) $(hdteq_la_SOURCES) $(libfthreads_la_SOURCES) $(libherc_la_SOURCES) $(EXTRA_libherc_la_SOURCES) $(libhercd_la_SOURCES) $(libhercs_la_SOURCES) $(libherct_la_SOURCES) $(libhercu_la_SOURCES) $(cckdcdsk_SOURCES) $(cckdcomp_SOURCES) $(cckddiag_SOURCES) $(cckdswap_SOURCES) $(dasdcat_SOURCES) $(dasdcopy_SOURCES) $(dasdinit_SOURCES) $(dasdisup_SOURCES) $(dasdload_SOURCES) $(dasdls_SOURCES) $(dasdpdsu_SOURCES) $(dasdseq_SOURCES) $(dmap2hrc_SOURCES) $(hercifc_SOURCES) $(hercules_SOURCES) $(hetget_SOURCES) $(hetinit_SOURCES) $(hetmap_SOURCES) $(hetupd_SOURCES) $(tapecopy_SOURCES) $(tapemap_SOURCES) $(tapesplt_SOURCES) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -.SUFFIXES: .c .o .obj +.SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile @@ -591,6 +1028,85 @@ distclean-hdr: -rm -f config.h intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ +libLTLIBRARIES_INSTALL = $(INSTALL) +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(libdir) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \ + $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \ + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) +modexecLTLIBRARIES_INSTALL = $(INSTALL) +install-modexecLTLIBRARIES: $(modexec_LTLIBRARIES) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(modexecdir) + @list='$(modexec_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(LIBTOOL) --mode=install $(modexecLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(modexecdir)/$$f"; \ + $(LIBTOOL) --mode=install $(modexecLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(modexecdir)/$$f; \ + else :; fi; \ + done + +uninstall-modexecLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(modexec_LTLIBRARIES)'; for p in $$list; do \ + p="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(modexecdir)/$$p"; \ + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(modexecdir)/$$p; \ + done + +clean-modexecLTLIBRARIES: + -test -z "$(modexec_LTLIBRARIES)" || rm -f $(modexec_LTLIBRARIES) + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) +dyngui.la: $(dyngui_la_OBJECTS) $(dyngui_la_DEPENDENCIES) + $(LINK) -rpath $(modexecdir) $(dyngui_la_LDFLAGS) $(dyngui_la_OBJECTS) $(dyngui_la_LIBADD) $(LIBS) +dyninst.la: $(dyninst_la_OBJECTS) $(dyninst_la_DEPENDENCIES) + $(LINK) -rpath $(modexecdir) $(dyninst_la_LDFLAGS) $(dyninst_la_OBJECTS) $(dyninst_la_LIBADD) $(LIBS) +hdt1403.la: $(hdt1403_la_OBJECTS) $(hdt1403_la_DEPENDENCIES) + $(LINK) -rpath $(modexecdir) $(hdt1403_la_LDFLAGS) $(hdt1403_la_OBJECTS) $(hdt1403_la_LIBADD) $(LIBS) +hdt2703.la: $(hdt2703_la_OBJECTS) $(hdt2703_la_DEPENDENCIES) + $(LINK) -rpath $(modexecdir) $(hdt2703_la_LDFLAGS) $(hdt2703_la_OBJECTS) $(hdt2703_la_LIBADD) $(LIBS) +hdt3088.la: $(hdt3088_la_OBJECTS) $(hdt3088_la_DEPENDENCIES) + $(LINK) -rpath $(modexecdir) $(hdt3088_la_LDFLAGS) $(hdt3088_la_OBJECTS) $(hdt3088_la_LIBADD) $(LIBS) +hdt3270.la: $(hdt3270_la_OBJECTS) $(hdt3270_la_DEPENDENCIES) + $(LINK) -rpath $(modexecdir) $(hdt3270_la_LDFLAGS) $(hdt3270_la_OBJECTS) $(hdt3270_la_LIBADD) $(LIBS) +hdt3420.la: $(hdt3420_la_OBJECTS) $(hdt3420_la_DEPENDENCIES) + $(LINK) -rpath $(modexecdir) $(hdt3420_la_LDFLAGS) $(hdt3420_la_OBJECTS) $(hdt3420_la_LIBADD) $(LIBS) +hdt3505.la: $(hdt3505_la_OBJECTS) $(hdt3505_la_DEPENDENCIES) + $(LINK) -rpath $(modexecdir) $(hdt3505_la_LDFLAGS) $(hdt3505_la_OBJECTS) $(hdt3505_la_LIBADD) $(LIBS) +hdt3525.la: $(hdt3525_la_OBJECTS) $(hdt3525_la_DEPENDENCIES) + $(LINK) -rpath $(modexecdir) $(hdt3525_la_LDFLAGS) $(hdt3525_la_OBJECTS) $(hdt3525_la_LIBADD) $(LIBS) +hdteq.la: $(hdteq_la_OBJECTS) $(hdteq_la_DEPENDENCIES) + $(LINK) -rpath $(modexecdir) $(hdteq_la_LDFLAGS) $(hdteq_la_OBJECTS) $(hdteq_la_LIBADD) $(LIBS) +libfthreads.la: $(libfthreads_la_OBJECTS) $(libfthreads_la_DEPENDENCIES) + $(LINK) $(libfthreads_la_LDFLAGS) $(libfthreads_la_OBJECTS) $(libfthreads_la_LIBADD) $(LIBS) +libherc.la: $(libherc_la_OBJECTS) $(libherc_la_DEPENDENCIES) + $(LINK) -rpath $(libdir) $(libherc_la_LDFLAGS) $(libherc_la_OBJECTS) $(libherc_la_LIBADD) $(LIBS) +libhercd.la: $(libhercd_la_OBJECTS) $(libhercd_la_DEPENDENCIES) + $(LINK) $(libhercd_la_LDFLAGS) $(libhercd_la_OBJECTS) $(libhercd_la_LIBADD) $(LIBS) +libhercs.la: $(libhercs_la_OBJECTS) $(libhercs_la_DEPENDENCIES) + $(LINK) -rpath $(libdir) $(libhercs_la_LDFLAGS) $(libhercs_la_OBJECTS) $(libhercs_la_LIBADD) $(LIBS) +libherct.la: $(libherct_la_OBJECTS) $(libherct_la_DEPENDENCIES) + $(LINK) $(libherct_la_LDFLAGS) $(libherct_la_OBJECTS) $(libherct_la_LIBADD) $(LIBS) +libhercu.la: $(libhercu_la_OBJECTS) $(libhercu_la_DEPENDENCIES) + $(LINK) $(libhercu_la_LDFLAGS) $(libhercu_la_OBJECTS) $(libhercu_la_LIBADD) $(LIBS) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @@ -598,11 +1114,12 @@ install-binPROGRAMS: $(bin_PROGRAMS) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ + || test -f $$p1 \ ; then \ p1=`echo "$$p1" | sed -e 's,^.*/,,'`; \ f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \ else :; fi; \ done @@ -617,24 +1134,18 @@ uninstall-binPROGRAMS: clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) -cckd2ckd$(EXEEXT): $(cckd2ckd_OBJECTS) $(cckd2ckd_DEPENDENCIES) - @rm -f cckd2ckd$(EXEEXT) - $(LINK) $(cckd2ckd_LDFLAGS) $(cckd2ckd_OBJECTS) $(cckd2ckd_LDADD) $(LIBS) cckdcdsk$(EXEEXT): $(cckdcdsk_OBJECTS) $(cckdcdsk_DEPENDENCIES) @rm -f cckdcdsk$(EXEEXT) $(LINK) $(cckdcdsk_LDFLAGS) $(cckdcdsk_OBJECTS) $(cckdcdsk_LDADD) $(LIBS) cckdcomp$(EXEEXT): $(cckdcomp_OBJECTS) $(cckdcomp_DEPENDENCIES) @rm -f cckdcomp$(EXEEXT) $(LINK) $(cckdcomp_LDFLAGS) $(cckdcomp_OBJECTS) $(cckdcomp_LDADD) $(LIBS) +cckddiag$(EXEEXT): $(cckddiag_OBJECTS) $(cckddiag_DEPENDENCIES) + @rm -f cckddiag$(EXEEXT) + $(LINK) $(cckddiag_LDFLAGS) $(cckddiag_OBJECTS) $(cckddiag_LDADD) $(LIBS) cckdswap$(EXEEXT): $(cckdswap_OBJECTS) $(cckdswap_DEPENDENCIES) @rm -f cckdswap$(EXEEXT) $(LINK) $(cckdswap_LDFLAGS) $(cckdswap_OBJECTS) $(cckdswap_LDADD) $(LIBS) -cfba2fba$(EXEEXT): $(cfba2fba_OBJECTS) $(cfba2fba_DEPENDENCIES) - @rm -f cfba2fba$(EXEEXT) - $(LINK) $(cfba2fba_LDFLAGS) $(cfba2fba_OBJECTS) $(cfba2fba_LDADD) $(LIBS) -ckd2cckd$(EXEEXT): $(ckd2cckd_OBJECTS) $(ckd2cckd_DEPENDENCIES) - @rm -f ckd2cckd$(EXEEXT) - $(LINK) $(ckd2cckd_LDFLAGS) $(ckd2cckd_OBJECTS) $(ckd2cckd_LDADD) $(LIBS) dasdcat$(EXEEXT): $(dasdcat_OBJECTS) $(dasdcat_DEPENDENCIES) @rm -f dasdcat$(EXEEXT) $(LINK) $(dasdcat_LDFLAGS) $(dasdcat_OBJECTS) $(dasdcat_LDADD) $(LIBS) @@ -656,12 +1167,12 @@ dasdls$(EXEEXT): $(dasdls_OBJECTS) $(dasdls_DEPENDENCIES) dasdpdsu$(EXEEXT): $(dasdpdsu_OBJECTS) $(dasdpdsu_DEPENDENCIES) @rm -f dasdpdsu$(EXEEXT) $(LINK) $(dasdpdsu_LDFLAGS) $(dasdpdsu_OBJECTS) $(dasdpdsu_LDADD) $(LIBS) +dasdseq$(EXEEXT): $(dasdseq_OBJECTS) $(dasdseq_DEPENDENCIES) + @rm -f dasdseq$(EXEEXT) + $(LINK) $(dasdseq_LDFLAGS) $(dasdseq_OBJECTS) $(dasdseq_LDADD) $(LIBS) dmap2hrc$(EXEEXT): $(dmap2hrc_OBJECTS) $(dmap2hrc_DEPENDENCIES) @rm -f dmap2hrc$(EXEEXT) $(LINK) $(dmap2hrc_LDFLAGS) $(dmap2hrc_OBJECTS) $(dmap2hrc_LDADD) $(LIBS) -fba2cfba$(EXEEXT): $(fba2cfba_OBJECTS) $(fba2cfba_DEPENDENCIES) - @rm -f fba2cfba$(EXEEXT) - $(LINK) $(fba2cfba_LDFLAGS) $(fba2cfba_OBJECTS) $(fba2cfba_LDADD) $(LIBS) hercifc$(EXEEXT): $(hercifc_OBJECTS) $(hercifc_DEPENDENCIES) @rm -f hercifc$(EXEEXT) $(LINK) $(hercifc_LDFLAGS) $(hercifc_OBJECTS) $(hercifc_LDADD) $(LIBS) @@ -696,26 +1207,31 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assist.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cardpch.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cardrdr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bootstrap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cardpch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cardrdr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cckdcdsk.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cckdcomp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cckddasd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cckddasd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cckddiag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cckdswap.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cckdutil.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgibin.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/channel.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ckddasd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmpsc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/codepage.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/console.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctc_ctci.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctc_lcs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctcadpt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cckdutil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgibin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/channel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ckddasd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmpsc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/codepage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commadpt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/console.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypto.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctc_ctci.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctc_lcs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctcadpt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dasdcat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dasdcopy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dasdinit.Po@am__quote@ @@ -723,60 +1239,76 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dasdload.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dasdls.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dasdpdsu.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dasdtab.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dasdutil.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decimal.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devtype.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diagmssf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diagnose.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dasdseq.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dasdtab.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dasdutil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dat.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decimal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diagmssf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diagnose.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmap2hrc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esame.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/external.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbadasd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fishhang.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fthreads.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/general1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/general2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dyngui.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dyninst.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecpsvm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esame.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/external.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbadasd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fishhang.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fthreads.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/general1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/general2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdlmain.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdteq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hercifc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hetget.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hetinit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hetlib.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hetlib.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hetmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hetupd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostinfo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsccmd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hscmisc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpserv.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ieee.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/impl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/machchk.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opcode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panel.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/service.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sie.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sllib.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostinfo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsccmd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hscmisc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hscutl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hscutl2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsys.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpserv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ieee.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/impl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logger.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logmsg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltdl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/machchk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memrchr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opcode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qdio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/service.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shared.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sie.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sllib.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockdev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tapecopy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tapedev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tapedev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tapemap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tapesplt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trace.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tuntap.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vm.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vstore.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/w32chan.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/w32ctca.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstore.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trace.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tuntap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vstore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/w32chan.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/w32ctca.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstore.Plo@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) @@ -792,7 +1324,22 @@ distclean-depend: @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(COMPILE) -c `cygpath -w $<` + +.c.lo: +@AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< CCDEPMODE = @CCDEPMODE@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd @@ -995,10 +1542,12 @@ distcleancheck: distclean exit 1; } >&2 check-am: all-am check: check-recursive -all-am: Makefile $(PROGRAMS) $(HEADERS) config.h +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) config.h +install-binPROGRAMS: install-libLTLIBRARIES + installdirs: installdirs-recursive installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(bindir) + $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(modexecdir) $(DESTDIR)$(bindir) install: install-recursive install-exec: install-exec-recursive @@ -1026,12 +1575,15 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool clean-modexecLTLIBRARIES clean-noinstLTLIBRARIES \ + mostlyclean-am distclean: distclean-recursive -rm -f config.status config.cache config.log distclean-am: clean-am distclean-compile distclean-depend \ - distclean-generic distclean-hdr distclean-tags + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags dvi: dvi-recursive @@ -1043,7 +1595,10 @@ info-am: install-data-am: -install-exec-am: install-binPROGRAMS install-exec-local +install-exec-am: install-binPROGRAMS install-exec-local \ + install-libLTLIBRARIES install-modexecLTLIBRARIES + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-info: install-info-recursive @@ -1057,43 +1612,84 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive -mostlyclean-am: mostlyclean-compile mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool -uninstall-am: uninstall-binPROGRAMS uninstall-info-am +uninstall-am: uninstall-binPROGRAMS uninstall-info-am \ + uninstall-libLTLIBRARIES uninstall-local \ + uninstall-modexecLTLIBRARIES + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \ - clean-binPROGRAMS clean-generic clean-recursive dist dist-all \ - dist-gzip distcheck distclean distclean-compile \ - distclean-depend distclean-generic distclean-hdr \ - distclean-recursive distclean-tags distcleancheck distdir dvi \ - dvi-am dvi-recursive info info-am info-recursive install \ - install-am install-binPROGRAMS install-data install-data-am \ + clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool clean-modexecLTLIBRARIES clean-noinstLTLIBRARIES \ + clean-recursive dist dist-all dist-gzip distcheck distclean \ + distclean-compile distclean-depend distclean-generic \ + distclean-hdr distclean-libtool distclean-recursive \ + distclean-tags distcleancheck distdir dvi dvi-am dvi-recursive \ + info info-am info-recursive install install-am \ + install-binPROGRAMS install-data install-data-am \ install-data-recursive install-exec install-exec-am \ install-exec-local install-exec-recursive install-info \ - install-info-am install-info-recursive install-man \ - install-recursive install-strip installcheck installcheck-am \ - installdirs installdirs-am installdirs-recursive \ - maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-recursive tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am \ - uninstall-info-recursive uninstall-recursive - - -cckd: cckd2ckd$(EXEEXT) cckdcdsk$(EXEEXT) \ - ckd2cckd$(EXEEXT) cckdcomp$(EXEEXT) \ - cckdswap$(EXEEXT) fba2cfba$(EXEEXT) \ - cfba2fba$(EXEEXT) dasdcopy$(EXEEXT) + install-info-am install-info-recursive install-libLTLIBRARIES \ + install-man install-modexecLTLIBRARIES install-recursive \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am installdirs-recursive maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + mostlyclean-recursive tags tags-recursive uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-info-am \ + uninstall-info-recursive uninstall-libLTLIBRARIES \ + uninstall-local uninstall-modexecLTLIBRARIES \ + uninstall-recursive + + +######################################################### +# B U I L D R U L E S . . . +######################################################### + +cckd: cckd2ckd$(EXEEXT) \ + cckdcdsk$(EXEEXT) \ + cckddiag$(EXEEXT) \ + cckdcomp$(EXEEXT) \ + cckdswap$(EXEEXT) \ + dasdcopy$(EXEEXT) tar: dist install-exec-local: @SETUID_HERCIFC_TRUE@ chown root $(DESTDIR)$(bindir)/hercifc @SETUID_HERCIFC_TRUE@ chmod 0751 $(DESTDIR)$(bindir)/hercifc -@SETUID_HERCIFC_TRUE@ chmod +s $(DESTDIR)$(bindir)/hercifc -@SETUID_HERCIFC_TRUE@ rm hercifc +@SETUID_HERCIFC_TRUE@ chmod +s $(DESTDIR)$(bindir)/hercifc +@SETUID_HERCIFC_TRUE@ rm hercifc + +install-exec-hook: + rm -f $(DESTDIR)$(libdir)/libherc*.a + rm -f $(DESTDIR)$(modexecdir)/dyn*.a + rm -f $(DESTDIR)$(modexecdir)/hdt*.a +@BUILD_SHARED_FALSE@ rm -f $(DESTDIR)$(libdir)/libherc* +# +# NOTE : symbolic links point to FINAL destination (not to staged install) +# + rm -f $(DESTDIR)$(bindir)/fba2cfba$(EXEEXT) + (cd $(DESTDIR)$(bindir); @LN_S@ ./dasdcopy$(EXEEXT) fba2cfba$(EXEEXT)) + rm -f $(DESTDIR)$(bindir)/ckd2cckd$(EXEEXT) + (cd $(DESTDIR)$(bindir); @LN_S@ ./dasdcopy$(EXEEXT) ckd2cckd$(EXEEXT)) + rm -f $(DESTDIR)$(bindir)/cfba2fba$(EXEEXT) + (cd $(DESTDIR)$(bindir); @LN_S@ ./dasdcopy$(EXEEXT) cfba2fba$(EXEEXT)) + rm -f $(DESTDIR)$(bindir)/cckd2ckd$(EXEEXT) + (cd $(DESTDIR)$(bindir); @LN_S@ ./dasdcopy$(EXEEXT) cckd2ckd$(EXEEXT)) + +uninstall-local: + +uninstall-hook: + rm -f $(DESTDIR)$(bindir)/fba2cfba$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/ckd2cckd$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/cfba2fba$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/cckd2ckd$(EXEEXT) %.s: %.c $(COMPILE) -S $< diff --git a/README.COMMADPT b/README.COMMADPT new file mode 100644 index 0000000..9d03f3c --- /dev/null +++ b/README.COMMADPT @@ -0,0 +1,149 @@ +Preliminary 2703 BSC Support + +Only allows Point to Point connection. + + +Hercules device statement : + +CCUU 2703 lport=port lhost=host rhost=host rport=port dial=IN|OUT|INOUT|NO + [pto=nnn|0|-1] [rto=nnn|0|-1] [eto=nnn|0|-1] + +lport : the local TCP port number or service name on which the line will listen + for incoming TCP calls + This parameter is irrelevant and is ignored for DIAL=OUT + for DIAL=IN|INOUT|NO, this parameter is mandatory + +cwlhost : The local interface IP address on which to listen. + if not specified, all interfaces will be used. + ex: + lhost=127.0.0.1 : Only accept calls from local host + lhost=192.168.0.1 : Only accept calls from hosts + that can be routed through the interface + that has an IP address of 192.168.0.1 + If there is no 192.168.0.1 local IP address, + this will fail. + This parameter is irrelevant and is ignored for DIAL=OUT + for DIAL=IN|INOUT|NO, this parameter is mandatory + + +rhost : the remote host ip address or name + This parameter is irrelevant and is ignored for DIAL=IN + for DIAL=OUT|INOUT|NO, this parameter is mandatory + +rport : the remote port number or service name + This parameter is irrelevant and is ignored for DIAL=IN + for DIAL=OUT|INOUT|NO, this parameter is mandatory + +rto, pto, eto : Read, Poll and Enable Timeout values in miliseconds. + specifying 0 means No Timeout (infinite wait). -1 Means immediate + timeout. + + The read timeout is how long the handler will wait for an ending + character after the last character was received or the I/O initiated. + The read timeout default is 3000 Miliseconds (3 Seconds) + + The poll timeout is how long the handler will wait for a polled + station to respond to a poll request. + The poll timeout default is 3000 Miliseconds (3 Seconds) + + The enable timeout is how long the handler will wait for the TCP + connection to be established. + The enable timeout default is 10000 Miliseconds (10 Seconds), except + if DIAL=NO is also specified, in which case the enable timeout defaults + to 0. + + Note : the ETO parameter is ignored if DIAL=NO is not specified. + for a dialed line, there is no enable timeout. If the eto + parameter is specified and DIAL is not "NO", then a warning message + is issued and the parameter is ignored. + + +dial=IN|OUT|INOUT|NO + Indicate call direction (if any). + This parameter also modifies the behaviour of certain CCWS + as well as TCP incoming call handling : + + ENABLE : + DIAL=IN|DIAL=INOUT + Wait forever for an incoming call + + DIAL=NO + Completes immediatelly if a call + is already present + Otherwise, attemps connecting to the + remote end + if the call fails, ENABLE exits with + Int Req status + DIAL=OUT + Enable is not a valid CCW for a DIALOUT + only line + DIAL : + DIAL=IN|DIAL=NO + DIAL is not a valid CCW for a DIAL IN + or non-switched line + DIAL=OUT|DIAL=INOUT + The outgoing call is attempted + + Incomming TCP call : + In any case, if a call is already present, the + call is rejected. + + DIAL=NO : + The call is accepted, even if no CCW is + currently executing + + DIAL=OUT : + The call is rejected + + DIAL=IN|DIAL=INOUT + The call is accepted if the line is currently + executing an ENABLE ccw. + + +The communication protocol : + + The communication protocol is basic. Every character written + by the guest program with a WRITE CCW is transfered to the + remote end, untranslated and untouched (except for Transparent + BSC rules which deem that DLE characters are doubled when the + program has previously written a DLE/STX sequence). + + +Dial data format + + Dial data is originally as follows : + x x x x 0 0 0 0 : Dial # 0 + ......... + x x x x 1 0 0 1 : Dial # 9 + x x x x 1 1 0 0 : EON + x x x x 1 1 0 1 : SEP + + In order to perform an outgoing call, + the data must follow these specifications : + + N[N[N]]SEPN[N[N]]SEPN[N[N]]SEPN[N[N]]]SEPN[..[N]][EON] + + Where N is any dialing number from 0 to 9 and SEP + is the separator. + + The 4 first group of digits represet the IP address. + The last group represent a TCP port number. + + For example (* is the SEP character representation) : + + 192*168*0*1*8888 : will issue a TCP connection to + 192.168.0.1 port 8888 + + The EON is optional. If it is present, it must be the + last character of the dial data. + +Bugs, Caveats + + The Address Prepare is not implemented + The POLL CCW Has not been tested + Group DIAL IN is not implemented + DIAL CCW Not tested + There is 1 thread per line, when there should be 1 thread for ALL lines. + MAXDEVT may have to be adjusted under WINDOWS to accomodate for a large number of lines + (because some I/O may take an undefinite amount of time). + There is no 'REAL' Bsc line support yet. diff --git a/README.CVS b/README.CVS new file mode 100644 index 0000000..3ab1c51 --- /dev/null +++ b/README.CVS @@ -0,0 +1,130 @@ + + B u i l d i n g H e r c u l e s + +If you're simply trying to figure out how to build Hercules from the +distributed source files (i.e. NOT from the CVS sources), then skip +to the "Building Hercules" section further below. + + +BUILD PREPARATION +----------------- + +In order to build Hercules from the CVS sources, you must have installed: + + + Package Version (or greater!) + ---------------------------------- + autoconf 2.50 (or greater!) + automake 1.5 (or greater!) + flex 2.5 (or greater!) + gawk 3.0 (or greater!) + gcc 2.95 (or greater!) + gettext 0.11 (or greater!) + grep 2.5 (or greater!) + libiconv 1.8 (or greater!) + libintl 0.10 (or greater!) + m4 0.0 (or greater!) + make 3.79 (or greater!) + perl 5.6 (or greater!) + sed 3.02 (or greater!) + + +All of these tools can be found at www.gnu.org in source code form, and +are also widely available in packaged form (RPM, DEB, Solaris packages, +etc.). + +Once you have these tools installed, simply enter the command: + + sh ./autogen.sh + +This will, among other things, create you a shell script called "configure". +The resulting configure script (created by the above 'autogen' command) is +then what you use to build Hercules with. (It will probably create a bunch +of other directories and files too, but we're mostly concerned about the +configure script). + +Note: even though the CVS sources already come with a configure script, it +may or may not be current/correct, so you should always run autogen at least +one time after checking out the current source from CVS. Once you've run +autogen once though, then you shouldn't need to ever run it again (unless +another developer changes something, but they should let you know if they +do). + + + +BUILDING HERCULES +----------------- + +Now that a 'configure' script has been built for us, let's use it! :) + +(Note: if you're simply trying to build Hercules from the distributed +source files (i.e. NOT from the CVS sources), then just use the 'configure' +script that should have been included with the source distribution tarball.) + +Before you trying using the configure script, you may wish to review +the information in the INSTALL file. It contains generic installation +instructions for how to build/install most any package. The instructions +there pertain just as much to Hercules as they do to any other package. + +Since the information there is pretty detailed however, rather than try +to slog your way through it all, you may wish to first review the below +summarized version first. + +Briefly, the way you build Herc is to first "configure" the building +process and then invoke your pre-configured building process. The build +process basically consists of a 'make' command which processes a 'makefile'. +The makfile however needs to be customized for your system. That's what +the "configure" script does. It contructs a customized makefile and that +is what is meant by "configuring your building process". + + +Here's the entire build process step-by-step: + + + To build Herc, first switch to the directory where the source files + are and then configure the build process by entering the following + command: + + ./configure + + (Note: you may or may not wish to enter additional parameters + to the configure command. See further below) + + Then simply invoke your pre-configured build process by entering + the following command: + + make + + That's it! The 'make' command should build Hercules for you. After + it's been built, you may or may not wish to "install" it. + + To "install" Hercules into the default package installation + directory after building it, enter the following command: + + make install + + That will copy the just built binaries to their proper place. + + To uninstall Hercules once it's been installed, simply enter the + command: + + make uninstall + + and the previously copied files will be removed (deleted). + + +Note: you may or may not wish to add some additional parameters to +the above mentioned "configure" command. One of the more common ones +for those who are building Herc under Cygwin is "--enable-fthreads". +Enter "./configure --help" for more information regarding the various +parameters that Hercules's customized "configure" script supports +for building Hercules. + + +-- +Matt Zimmerman +08 Oct, 2001 + +updated in detail by: +"Fish" (David B. Trout) +30 Jul, 2002 diff --git a/README.ECPSVM b/README.ECPSVM new file mode 100644 index 0000000..6327704 --- /dev/null +++ b/README.ECPSVM @@ -0,0 +1,170 @@ +ECPS:VM : Extended Control Program Support : VM/370 + - AND - +Extended VM Assists - Partial Privop Simulation And Virtual Interval Timer + +************ CHANGE LOG **************** +07/07/03 : Changed description for configuration and commands + ECPS:VM changed to ECPSVM (config) + ecpsvm changed to ecpsvm (command) + + - PARTIAL IMPLEMENTATION DOCUMENTATION - + +************************* + +Affected operating systems : + +VM/370 Release 6 (PTFs required - PLC 029 works fine) + +up to + +VM/SP 6 (with or without HPO option) + +--- VM/XA SF, VM/XA SP, VM/ESA and z/VM do NOT use these Assists, + but rely on the SIE instruction to perform some of these functions. + +A VM/SP Guest (or VM/370 Guest with 4K Storage key updates) running under +[z/]VM[/[XA|ESA]] can theorically use the VM and CP Assists. This implementation +is not finalized yet (see BUGS section) + +************************ + +How to enable VM Assists : + +In the HERCULES.CNF file, in the configuration section : + +ECPSVM YES|NO|LEVEL n (where n is the requested level.) + +If "YES" is specified, the most appropriate level is returned (Level 20) + +n Doesn't affect the operations of the assist but what level is reported to + the program. + + - CAUTION - Use the 'n' form is not recommended, and is only provided + for engineering use. + +********** + +New panel command : 'ecpsvm' + +Subcommands : + +ecpsvm stats : Shows ECPS:VM Call/Hit statistics +ecpsvm enable/disable feature : Enable/Disable named feature +ecpsvm help : (guess) +ecpsvm debug [feature|ALL|CPASSIST|VMASSIST] : Turn on debugging messages for a specific feature +ecpsvm nodebug [feature|ALL|CPASSIST|VMASSIST] : Turn off... +ecpsvm level [nn] : Force ECPS:VM to report a certain support level + (or display the current support level) + +NOTE : ecpsvm disable does NOT entirelly disables CP ASSISTS. If it did (i.e. generate a program interrupt whenever a E6xx instruction is invoked) VM would abend immediatelly. Rather, ommit the ECPSVM statement in the configuration file. + +To determine the feature names, type "ecpsvm enable ALL". + All the enabled features will be listed. + +the ecpsvm command is NOT case sensitive + +********** + +Determining if the assist is used by VM : + +Use the 2 following CLASS A commands : + +CP QUERY CPASSIST +CP QUERY SASSIST + +Both queries should return 'ON'. + +Also use the following CLASS G Command : + +CP QUERY SET + +2nd line should indicate : + +ASSIST ON SVC TMR + +*********** + +Technical information + +the CP Assists provides The VM SCP with various microcoded instructions to shorten the supervisor pathlength. All microcoded instructions are priviledged instructions and have an opcode of E6xx. They are native representation of what the SCP would do in a similar case. For all cases where the assist is not able to resolve a situation, the E6XX instructions resolve to a no-op, thus leaving the responsability of the task to the original CP Code. + +The VM Assists alters the behaviour of certain priviledged instructions when executed in problem state (controled by the Problem State bit in the PSW) either by completely simulating the instruction (when feasable), Branching directly to the CP support module for that instruction (therefore bypassing Program interruption processing and instruction decoding), or generating a Program interruption otherwise. + +The VM Virtual Interval Timer assist allows updating of a Virtual Machine virtual interval timer directly by the microcode. + +Both CP And VM Assists are controled by real Control Register 6 which control availability, and behaviour of the assists. + +************ + +Troubleshooting + +In the event that a certain CP or VM Assist disrupts normal operations, it is possible to selectivelly disable each discrete component. The best method is to disable ALL VM and CP Assists (Except STEVL and SSM if done prior to IPL) and to enable each feature until the problem occurs. If it is unknown whether the problem lies in the VM or CP Assist, it is also possible to enable/disable the entire group of assists. + +See the EVM ENA|DISA Commands. + +EVM STA allows to see how often each assist is invoked. The hit and hit ration makes it possible to determine how effective the assists are. + +A Low hit ratio may be normal in some situations (for example, the LPSW Hit ration will be very low when running VM under VM, because most PSW switches cannot be resolved by the assist) + +A Low invocation count simply shows that in THAT particular situation, the related assist is not used often (For example, there are very few LCTLs when running CMS). + +Some assists are just invoked once at IPL (STEVL). This is normal behaviour. + +************ + +Implemented Assists : + +CP ASSISTS : +FREEX, FRETX (CP Free Storage management) +DISP0, DISP1, DISP2 (CP Dispatching) +PGLOCK, PGULOCK (Real frame locking/unlocking) +TRANBRNG, TRANLOCK (Virtual frame addressing/locking) +SCNRU, SCNVU (Real/Virtual Device control block scan) +STEVL (Store ECPS:VM support level) + +VM ASSISTS : +Virtual Interval Timer +LPSW Simulation +SSM Simulation +SVC Simulation +LCTL Simulation + +Non-Implemented assists : + +CP ASSISTS : +FREE/FRET : (Original (up to level 19) + CP Storage Management - replaced by FREEX/FRETX) +CCWGN, DFCCW, DNCCW, UXCCW : CCW/CSW Translation assists (Soon) +LCSPG : Locate Changed Shared Page (Soon) +VIPT, VIST : Virtual Translation Page/Segment Invalidation (Soon) +LINK/RETURN (SVC 8/SVC 12) (Soon) +Prefered Machine Assists (Insufficient information) +.. Maybe others ... + +VM ASSISTS : +V=R Shadow Table Bypass assists (Including LRA instruction) + (note : The V=R Shadow Table Bypass assist is a feature which requires the guest program + to be aware of the feature (Page 0 Relocation)) +SIO (In progress - Partial sim) +DIAG (In progress - Partial sim) +IUCV (In Progress - Partial sim - VM/SP4 or later only) +STxSM (Almost never invoked - ECMODE Only) +ISK/SSK/ISKE/SSKE/IVSK (Extended Key Ops assist) +VM Assists for MVS +.. Maybe others ... + +***************** +BUGS & Caveats : + +ECPS:VM Has not been tested in a AP/MP System. +My belief is that they WILL NOT WORK. +ECPS:VM Should be disabled if the system is MP or AP generated + +For the time being, ECPS:VM Should be disabled on the host system when running VM/SP Under [z/]VM/[XA/ESA] +because ECPS:VM Under SIE is still not finalized + +***************** + +Have Fun, + +--Ivan diff --git a/README.HDL b/README.HDL new file mode 100644 index 0000000..a8763e7 --- /dev/null +++ b/README.HDL @@ -0,0 +1,634 @@ +/* + Hercules Dynamic Loader + + The dynamic loader is intended to supply a loading and linking + mechanism, whereby routines, commands, instructions and functions + can be dynamically added to hercules, without the need to rebuild + or even restart hercules. + + The loader can be controlled by the following hercules commands: + + ldmod - Load modules named in module list + rmmod - Unload modules named in list + lsmod - List all modules and entry points + lsdep - List all dependencies + + The ldmod statement may also appear in the hercules + configuration file. + + configuration statement: + modpath - Specifies where modules are loaded from + + + The loader has 2 basic functions module load and module unload. + + Module load: + + int hdl_load(char *name, int flags); + + Where name is the module name, this name may include the + path. If no path is given then the module is loaded from + the default library search order. Note that this is + different from the standard search order. + + flags may be one of the following: + + HDL_LOAD_DEFAULT or 0 - Default load + HDL_LOAD_MAIN - Reserved for hercules use + HDL_LOAD_NOUNLOAD - Module cannot be unloaded + HDL_LOAD_FORCE - Override dependency check + HDL_LOAD_NOMSG - Do not issue any error messages + + This function returns a zero value when the load is successful. + + + Module unload: + + int hdl_dele(char *name); + + Where name is the name of the module that is to be unloaded. + + This function returns a zero value when the unload is successful. + + + Resolving Symbols: + + void * HDL_FINDSYM(char *symbolname); + + This function will return the entry point of symbolname or + zero when the symbol cannot be resolved. + + void * HDL_FINDNXT(current_entry point); + + This function will return the previous entry point. + That is, the entry point which was current before the entry point + as identified by current_entry point was registered. + + This function is intended to allow a module to call the original + routine. An example of this is given in the panel_command entry + as listed below. + + + There are some special considerations for systems that do not support + the concept of back-linking. Back-linking is the operating system + support of dynamically resolving unresolved external references in + a dynamic module, with the main module, or other loaded modules. + Cygwin does not support back-linking and Cygwin specials are listed + in this example with #if defined(WIN32). + + + Some additional notes: + + Unload will remove all references to a specific module, but currently + it will not actually remove the loaded module from memory. This is + because there is no safe way (yet) to synchronize unloading of code + and, besides, it may still be in use. This should however pose no + practical limitations. + + When a module lists a new dependency, that dependency will be regis- + tered. Unloading the module does not remove the dependency, this is + to be consistent with the previous note about unloading. + + + + Diagnose F14 - dll interface + + Purpose: + + Allow external routines to be called from OS running under hercules + external routines must reside in hercules dll's + + + Instruction: + + Format: + + 83 r1 r3 d2(b2) + + r1: register containing real address of external routine name to be + called this routine name is defined as CL32, and is subject to + EBCDIC to ASCII translation under control of hercules codepages. + This parameter must be 32 byte aligned. + + r3: register containing user parameter. + + d2(b2): 0xF14 + + + External routine: + + void xxxx_diagf14_routine_name(int r1, int r3, REGS *regs); + + xxxx_diagf14_ prefix to routine_name + xxxx being either s370, s390 or z900 depending on architecture mode. + + The instruction is subject to machine malfunction checking. + The external routine may be interrupted when an extended wait or loop + occurs. + + +*/ + +#include "hercules.h" +#include "devtype.h" +#include "opcode.h" + + +/* Local definitions */ + + +static void *gui_cpu_state(REGS *regs) +{ + void *(*prev_cpu_state)(REGS *); + + /* CPU status update processing */ + + /* Call higher level routine if one exists */ + if((prev_cpu_state = HDL_FINDNXT(gui_cpu_state))) + return prev_cpu_state(regs); + + return NULL; +} + + +void *ProcessCommand (char *command) +{ +void * (*prev_panel_command)(char *); + + if (strncasecmp(command,"ourcmd",6) == 0) + { + logmsg ("This is our command\n"); + } + else + /* Call higher level command handler */ + if((prev_panel_command = HDL_FINDNXT(ProcessCommand))) + return prev_panel_command(command); + + return NULL; +} + + +/* + The dependency section is - for all intents and purposes - called + before the module is loaded. Its function is to check that there + are no incompatibilities between this module and the version of + hercules that we are running. Dependencies are identified by + name, this name is given on the HDL_DEPENDENCY statement. + + Each dependency then has a version code, and a size code, where + the version code is a character string, and the size code an + integer value. If the version or size codes do not match with + those in the hercules main module, the module cannot be loaded. + The version is usually a character string that identifies the + version of the component, and the size is to be the size of + the component in the case of structures or unions. + + Version and size should be coded as following: + + #define HDL_VERS_SOMETHING "1.0" + #define HDL_SIZE_SOMETHING sizeof(SOMETHING) + + where SOMETHING can be a structure or other component. + + the associated dependency statement: + + HDL_DEPENDENCY(SOMETHING); + + When a dependency is given that has not yet been registered, + it will be registered, such that it can be checked in subsequent + module loads. + + The dependency section is mandatory. + +*/ + +HDL_DEPENDENCY_SECTION; +{ + /* Define version dependencies that this module requires */ + HDL_DEPENDENCY ( HERCULES ); + HDL_DEPENDENCY ( SYSBLK ); + HDL_DEPENDENCY ( REGS ); + HDL_DEPENDENCY ( DEVBLK ); +} +END_DEPENDENCY_SECTION; + + +/* + The registration exports labels and their associated entry points + to hercules, such that the symbols and associated entry points may + be known to hercules and any other module that may have been loaded. + The registration section is called once during module load. + + If we have registered a function that is also called from this DLL, + then it must also be listed in the resolver section. This to ensure + that the symbol is properly resolved when other modules are loaded. + + The registration section is optional. + +*/ + + +HDL_REGISTER_SECTION; +{ + /* These are the entry points we export to Hercules + All functions and labels used this dll must be static + and non exportable, this to ensure that no foreign + names are included by the system loader on systems + that provide back-link support (mostly *nix systems) + */ + + HDL_REGISTER ( daemon_task, external_gui_interface ); + HDL_REGISTER ( debug_cpu_state, gui_cpu_state ); + HDL_REGISTER ( panel_command, ProcessCommand ); +} +END_REGISTER_SECTION; + + +/* + The resolver section imports the entry points of symbols that + have been previously registered. + + When a symbol is requested that has not been previously registered + then the resolve function will search the loaded modules for + that symbol, and register it implicitly. This latter function + is mainly provided to support systems that do not have back-link + support (most notably Cygwin). + + Entry points that are resolved should be indirect pointers, for + example the panel_command routine is defined as: + + void *(*panel_command)(char *) + + The resolver may be called multiple times, the first time it is + called is during module load, immediately after the registration + section is called. It is subsequently called when other modules + are loaded or unloaded. + + When a symbol cannot be resolved it will be set to NULL. + + The resolver section is optional. + +*/ + + +HDL_RESOLVER_SECTION; +{ + /* These are Hercules's entry points that we need access to + these may be updated by other loadable modules, so we need + to resolve them here. + */ + + HDL_RESOLVE ( panel_command ); + HDL_RESOLVE ( debug_cpu_state ); + + HDL_RESOLVE_PTRVAR ( my_sysblk_ptr, sysblk ); +} +END_RESOLVER_SECTION; + + +/* + The device section is to register device drivers with hercules. + It associates device types with device handlers + + If a device handler is not registered for a specific device type + then and a loadable mode with the name of "hdtxxxx" (where xxxx + is the device type) exists then that module is loaded + + Search order: + 1) The most recently registered (ie loaded) device of the + requested device type. + 2) Device driver in external loadable module, where the + module name is hdtxxxx (where xxxx is the device type + ie module name hdtlcs for device type LCS or hdt2703 + for device type 2703) + 3) If the device is listed in the alias table (hdteq.c) + then external module hdtyyyy will be loaded, where + yyyy is the base name as listed in hdteq.c. + The device name is always mapped to lower case when searching + for loadable modules. + + The device section is optional +*/ + +HDL_DEVICE_SECTION; +{ + HDL_DEVICE(1052,constty_device_hndinfo); + HDL_DEVICE(3215,constty_device_hndinfo); +} +END_DEVICE_SECTION; + + +/* + The final section is called once, when the module is unloaded + or when hercules terminates. + + A dll can reject being unloaded by returning a non-zero value + in the final section. + + The final section is intended to be used to perform cleanup or + indicate cleanup action to be taken. It may set a shutdown + flag that is used within this dll that all local functions + must now terminate. + + The final section is optional +*/ + +HDL_FINAL_SECTION; +{ + +} +END_FINAL_SECTION; + + + + +Below is Fish's sample code... + + +/* Define version dependencies that this module requires... +** +** The following are the various Hercules structures whose layout your +** module depends on. The layout of the following structures (size and +** version) MUST match the layout that was used to build Hercules with. +** If the size/version of any of the following structures changes (and +** a new version of Hercules is built using the new layout), then YOUR +** module must also be built with the new layout as well. The layout of +** the structures as they were when your module is built MUST MATCH the +** layout as it was when the version of Hercules you're using was built. +** Further note that the below HDL_DEPENDENCY_SECTION is actually just +** a function that the hdl logic calls, and thus allows you to insert +** directly into the below section any specialized 'C' code you need. +*/ +HDL_DEPENDENCY_SECTION; +{ + HDL_DEPENDENCY(HERCULES); + HDL_DEPENDENCY(REGS); + HDL_DEPENDENCY(DEVBLK); + HDL_DEPENDENCY(SYSBLK); + HDL_DEPENDENCY(WEBBLK); +} +END_DEPENDENCY_SECTION; + + +/* Register re-bindable entry point with resident version, or UNRESOLVED +** +** The following section defines the entry points within Hercules that +** your module is overriding (replacing). Your module's functions will +** be called by Hercules instead of the normal Hercules function (if any). +** The functions defined below thus provide additional/new functionality +** above/beyond the functionality normally provided by Hercules. Be aware +** however that it is entirely possible for other dlls to subsequently +** override the same functions that you've overridden such that they end +** up being called before your override does and your override may thus +** not get called at all (depending on how their override is written). +** Note that the "entry-point name" does not need to correspond to any +** existing variable or function (i.e. the entry-point name is just that: +** a name, and nothing more. There does not need to be a variable defined +** anywhere in your module with that name). Further note that the below +** HDL_REGISTER_SECTION is actually just a function that the hdl logic +** calls, thus allowing you to insert directly into the below section +** any specialized 'C' code that you may need. +*/ +HDL_REGISTER_SECTION; +{ + /* register this as the address of + entry-point name, this var or func + */ + HDL_REGISTER( panel_command, my_panel_command ); + HDL_REGISTER( panel_display, my_panel_display ); + HDL_REGISTER( some_exitpoint, UNRESOLVED ); +} +END_REGISTER_SECTION; + + +/* Resolve re-bindable entry point on module load or unload... +** +** The following entries "resolve" entry points that your module +** needs. These entries define the names of registered entry points +** that you need "imported" into your dll so that you may call them +** directly yourself. The HDL_RESOLVE_PTRVAR macro is used to auto- +** matically set one of your own pointer variables to the registered +** entry point's currently registered value (usually an address of +** a function or variable). Note that the HDL_RESOLVER_SECTION is +** actually just a function that the hdl logic calls, thus allowing +** you to insert directly into the below section any specialized 'C' +** code that you may need. +*/ +HDL_RESOLVER_SECTION; +{ + /* Herc's registered + entry points that + you need to call + directly yourself + */ + HDL_RESOLVE( config_command ); + HDL_RESOLVE( some_exitpoint ); + HDL_RESOLVE( debug_cpu_state ); + HDL_RESOLVE( debug_program_interrupt ); + HDL_RESOLVE( debug_diagnose ); + + /* The following illustrates how to use HDL_RESOLVE_PTRVAR + macro to retrieve the address of one of Herc's registered + entry points. + + Your pointer- Herc's registered + variable name entry-point name + */ + HDL_RESOLVE_PTRVAR( my_sysblk_ptr, sysblk ); +} +END_RESOLVER_SECTION; + + +/* The following section defines what should be done just before +** your module is unloaded. It is nothing more than a function that +** is called by hdl logic just before your module is unloaded, and +** nothing more. Thus you can place any 'C' code here that you want. +*/ +HDL_FINAL_SECTION; +{ + my_cleanup(); +} +END_FINAL_SECTION; + + + + +/* DYNDIAG.C (c) Copyright Jan Jaeger, 2003 */ +/* Hercules Dynamic Loader */ + +/* Sample diagf14 dll routine */ + +/* */ +/* Assembler to call routine: */ +/* */ +/* LRA R1,=CL32'test' */ +/* LRA R2,=X'01020304' USERPARM */ +/* DC X'83120F14' DIAG R1,R2,X'F14' */ +/* */ + + +#include "hercules.h" + +#include "opcode.h" + +#include "inline.h" + + +void ARCH_DEP(diagf14_test) (int r1, int r3, REGS *regs) +{ +U32 r3loc; + + logmsg("diagf14: r3 = %8.8X\n",regs->GR_L(r3)); + r3loc = ARCH_DEP(vfetch4) (regs->GR_L(r3), USE_REAL_ADDR, regs); + logmsg("diagf14: *r3 = %8.8X\n",r3loc); +} + + + +#if !defined(_GEN_ARCH) + +#if defined(_ARCHMODE2) + #define _GEN_ARCH _ARCHMODE2 + #include "dyndiag.c" +#endif + +#if defined(_ARCHMODE3) + #undef _GEN_ARCH + #define _GEN_ARCH _ARCHMODE3 + #include "dyndiag.c" +#endif + + +HDL_DEPENDENCY_SECTION; +{ + HDL_DEPENDENCY (HERCULES); + HDL_DEPENDENCY (REGS); + HDL_DEPENDENCY (DEVBLK); + HDL_DEPENDENCY (SYSBLK); + +} END_DEPENDENCY_SECTION; + + +HDL_REGISTER_SECTION; +{ + + HDL_REGISTER(s370_diagf14_test,s370_diagf14_test); + HDL_REGISTER(s390_diagf14_test,s390_diagf14_test); + HDL_REGISTER(z900_diagf14_test,z900_diagf14_test); + +} END_REGISTER_SECTION; + + +HDL_RESOLVER_SECTION; +{ + +} END_RESOLVER_SECTION; + +HDL_FINAL_SECTION; +{ + +} END_FINAL_SECTION; + + +#endif /*!defined(_GEN_ARCH)*/ + +/* END DYNDIAG.C */ + + + +/* DYNCGI.C (c)Copyright Jan Jaeger, 2002-2003 */ +/* HTTP cgi-bin routines */ + +/* This file contains cgi routines that may be executed on the */ +/* server (ie under control of a hercules thread) */ +/* */ +/* */ +/* Dynamically loaded cgi routines must be registered under the */ +/* pathname that they are accessed with (ie /cgi-bin/test) */ +/* All cgi pathnames must start with /cgi-bin/ */ +/* */ +/* */ +/* The cgi-bin routines may call the following HTTP service routines */ +/* */ +/* char *cgi_variable(WEBBLK *webblk, char *name); */ +/* This call returns a pointer to the cgi variable requested */ +/* or a NULL pointer if the variable is not found */ +/* */ +/* char *cgi_cookie(WEBBLK *webblk, char *name); */ +/* This call returns a pointer to the cookie requested */ +/* or a NULL pointer if the cookie is not found */ +/* */ +/* char *cgi_username(WEBBLK *webblk); */ +/* Returns the username for which the user has been authenticated */ +/* or NULL if not authenticated (refer to auth/noauth parameter */ +/* on the HTTPPORT configuration statement) */ +/* */ +/* char *cgi_baseurl(WEBBLK *webblk); */ +/* Returns the url as requested by the user */ +/* */ +/* */ +/* void html_header(WEBBLK *webblk); */ +/* Sets up the standard html header, and includes the */ +/* html/header.htmlpart file. */ +/* */ +/* void html_footer(WEBBLK *webblk); */ +/* Sets up the standard html footer, and includes the */ +/* html/footer.htmlpart file. */ +/* */ +/* int html_include(WEBBLK *webblk, char *filename); */ +/* Includes an html file */ +/* */ +/* */ +/* Jan Jaeger - 28/03/2002 */ + + +#include "hercules.h" +#include "devtype.h" +#include "opcode.h" +#include "httpmisc.h" + +#if defined(OPTION_HTTP_SERVER) + + + +void cgibin_test(WEBBLK *webblk) +{ + html_header(webblk); + + fprintf(webblk->hsock, "

Sample cgi routine

\n"); + + html_footer(webblk); +} + + +HDL_DEPENDENCY_SECTION; +{ + HDL_DEPENDENCY(HERCULES); +// HDL_DEPENDENCY(REGS); +// HDL_DEPENDENCY(DEVBLK); +// HDL_DEPENDENCY(SYSBLK); + HDL_DEPENDENCY(WEBBLK); +} +END_DEPENDENCY_SECTION; + + +HDL_REGISTER_SECTION; +{ + HDL_REGISTER( /cgi-bin/test, cgibin_test ); +} +END_REGISTER_SECTION; + + +HDL_RESOLVER_SECTION; +{ +} +END_RESOLVER_SECTION; + + +HDL_FINAL_SECTION; +{ +} +END_FINAL_SECTION; + + +#endif /*defined(OPTION_HTTP_SERVER)*/ diff --git a/README.NETWORKING b/README.NETWORKING index 7cb98d2..4650012 100644 --- a/README.NETWORKING +++ b/README.NETWORKING @@ -1,261 +1,265 @@ ----------------------------------------------------------------- - Hercules Networking + Hercules Networking ----------------------------------------------------------------- - *** Please read herctcp.html as Roger explains how *** - *** to set up TCP/IP networking with Hercules. *** + *** Please read herctcp.html as Roger explains how *** + *** to set up TCP/IP networking with Hercules. *** -All of the communications emulation implemented within Hercules -use a CTCA (Channel to Channel Adapter) type device. Depending on -the "flavor", the CTCA device will provide either a -point-to-point or a virtual network adapter interface to the -driving system's TCP/IP stack or in the case of CTCT, a "true" -CTCA connection to another instance of Hercules via a TCP/IP +All of the communications emulation implemented within Hercules +use a CTCA (Channel to Channel Adapter) type device. Depending on +the "flavor", the CTCA device will provide either a +point-to-point or a virtual network adapter interface to the +driving system's TCP/IP stack or in the case of CTCT, a "true" +CTCA connection to another instance of Hercules via a TCP/IP connection. -All current emulations, with the exception of VMNET and CTCT use +All current emulations, with the exception of VMNET and CTCT use the Universal TUN/TAP driver on *nix and TunTap32 (WinPCap) on -the Windows platforms which creates a network interface on the -driving system which allow Hercules to present frames to, and -receive frames from the TCP/IP stack. This network interface is -configured on *nix platforms by the hercifc program which is -invoked by Hercules after the TUN/TAP device is opened. The -hercifc program runs as root. Please read herctcp.html for more -information on the security implications of the hercifc program. +the Windows platforms which creates a network interface on the +driving system which allow Hercules to present frames to, and +receive frames from the TCP/IP stack. This network interface is +configured on *nix platforms by the hercifc program which is +invoked by Hercules after the TUN/TAP device is opened. The +hercifc program runs as root. Please read herctcp.html for more +information on the security implications of the hercifc program. Now for the gory details: - *** Important informatiom about changes to the *** - *** Hercules configuration files - PLEASE READ *** + *** Important information about changes to the *** + *** Hercules configuration files - PLEASE READ *** -The format of the Hercules configuration file statements for all -of the networking emulations have changed from the previous -releases of Hercules. The older format will still be accepted -to maintain compatability, however it is the recommendation +The format of the Hercules configuration file statements for all +of the networking emulations have changed from the previous +releases of Hercules. The older format will still be accepted +to maintain compatibility, however it is the recommendation of the maintainer that the new format be used. Also note that -there is no destinction between the CTCI and CTCI-W32 modes any -more, in fact CTCI-W32 does not exist in this release (other -than to maintain compatability with previous configuration files). +there is no distinction between the CTCI and CTCI-W32 modes any +more, in fact CTCI-W32 does not exist in this release (other +than to maintain compatibility with previous configuration files). -In previous releases of Hercules, all of the TCP/IP emulations -required two addresses to be defined in the Hercules configuration -file. One address is the read subchannel and the other for write. +In previous releases of Hercules, all of the TCP/IP emulations +required two addresses to be defined in the Hercules configuration +file. One address is the read subchannel and the other for write. WITH THIS RELEASE OF HERCULES, ONLY THE FIRST ADDRESS SHOULD BE -SPECIFIED IN THE CONFIGURATION FILE. Hercules will auomatically +SPECIFIED IN THE CONFIGURATION FILE. Hercules will automatically create the second address. Care must be taken to not define the -second address or a configuration error will occur. +second address or a configuration error will occur. The previous statement does NOT apply to VMNET or CTCT. Current emulation modes are: - CTCT - CTCA Emulation via TCP connection - CTCI - Point-to-point connection to the host IP stack. - LCS - LAN Channel Station (3172/OSA) - VMNET - Point-to-point link via SLIP/VMNET + CTCT - CTCA Emulation via TCP connection + CTCI - Point-to-point connection to the host IP stack. + LCS - LAN Channel Station (3172/OSA) + VMNET - Point-to-point link via SLIP/VMNET ----------------------------------------------------------------- CTCT - Channel to Channel Emulation via TCP connection ----------------------------------------------------------------- -This emulation mode provides protocol-independent communication -with another instance of this driver via a TCP connection. +This emulation mode provides protocol-independent communication +with another instance of this driver via a TCP connection. -This mode appears to the operating system running in the Hercules +This mode appears to the operating system running in the Hercules machine as an IBM 3088 Channel to Channel Adapter and can operate -in either Basic or Exteneded mode. +in either Basic or Extended mode. The configuration statement for CTCT is as follows: - 3088 CTCT + 3088 CTCT -where: +where: - is the address of the CTCT device. + is the address of the CTCT device. - is the TCP/IP port on the local system. + is the TCP/IP port on the local system. - is the IP address on the remote. + is the IP address on the remote. - is the TCP/IP port on the remote system. + is the TCP/IP port on the remote system. ----------------------------------------------------------------- CTCI - Channel to Channel link to Linux TCP/IP stack ----------------------------------------------------------------- -This is a point-to-point link to the driving system's TCP/IP -stack. From the point of view of the operating system running -in the Hercules machine it appears to be a CTC link to a machine -running TCP/IP for MVS or VM. +This is a point-to-point link to the driving system's TCP/IP +stack. From the point of view of the operating system running +in the Hercules machine it appears to be a CTC link to a machine +running TCP/IP for MVS or VM. -CTCI uses the Universal TUN/TAP driver on *nix and Politecnico -di Torino's WinPCap packet driver(*) on Windowd. In addition, -Windows requires the TunTap32 and FishPack DLLs. +CTCI uses the Universal TUN/TAP driver on *nix and Politecnico +di Torino's WinPCap packet driver as well as Fish's TunTap32 +and FishPack DLLs on Windows[1]. The configuration statement for CTCI is as follows: - 3088 CTCI [options] + 3088 CTCI [options] + +where: + + is the first address of the CTCI device. + Since CTCI uses paired addressing, this *must* be + an even number. -where: + is the IP address of the Hercules (guest OS) side. - is the first address of the CTCI device. - Since CTCI uses paired addressing, this *must* be - an even number. + is the IP address on the driving system. - is the IP address of the Hercules (guest OS) side. + [options] can be any of the following: - is the IP address on the driving system. + -n or --dev - [options] can be any of the following: + where is: - -n or --dev + [*nix] the name of the TUN/TAP special character + device, normally /dev/net/tun. - where is: + [Windows] is either the IP or MAC address of the + driving systems network card. TunTap32 will + automatically select the first network card it + finds if this option is omitted, this may not be + desirable for some users. - [*nix] the name of the TUN/TAP special character - device, normally /dev/net/tun. + -t or --mtu - [Windows] is either the IP or MAC address of the - driving systems network card. TunTap32 will - automatically select the first network card it - finds if this option is omitted, this may not be - desirable for some users. + [*nix only] where is the maximum transmission + unit size, normally 1500 - -t or --mtu + -s or --netmask - where is the maximum transmission unit size, - normally 1500 + [*nix only] where is the netmask to + be configured on the link. Note: Since this is a + point-to-point link netmask is meaningless from + the perspective of the actual network device. - -m or --netmask + -m or --mac - where is the netmask to be configured on - the link. Note: Since this is a point-to-point link - netmask is meaningless from the perspective of the - actual network device. + [Windows only] where is the optional + hardware address of the interface in the format of + either xx:xx:xx:xx:xx:xx or xx-xx-xx-xx-xx-xx. - -k or --kbuff + -k or --kbuff - where is the size of the WinPCap kernel - buffer size, normally 1024. This option is only - effective on Windows platforms. + [Windows only] where is the size of the + WinPCap kernel buffer size, normally 1024. - -i or --ibuff + -i or --ibuff - where is the size of the WinPCap I/O - buffer size, normally 64. This option is only - effective on Windows platforms. + [Windows only] where is the size of the + WinPCap I/O buffer size, normally 64. - -d or --debug + -d or --debug - this will turn on the internal debugging routines. - Warning: This will produce a tremendous amount of - output to the Hercules console. It is suggested that - you only enable this at the request of the maintainers. + this will turn on the internal debugging routines. + Warning: This will produce a tremendous amount of + output to the Hercules console. It is suggested that + you only enable this at the request of the maintainers. ----------------------------------------------------------------- LCS - LAN Channel Station ----------------------------------------------------------------- -This emulation mode appears to the operating system running in -the Hercules machine as an IBM 8232 LCS device, an IBM 2216 -router, a 3172 running ICP (Interconnect Communications Program), +This emulation mode appears to the operating system running in +the Hercules machine as an IBM 8232 LCS device, an IBM 2216 +router, a 3172 running ICP (Interconnect Communications Program), the LCS3172 driver of a P/390, or an IBM Open Systems Adapter. -Rather than a point-to-point link, this emulation creates a +Rather than a point-to-point link, this emulation creates a virtual ethernet adapter through which the guest operating system running in the Hercules machine can communicate. As such, this -mode is not limited to TCP/IP traffic, but in fact will handle +mode is not limited to TCP/IP traffic, but in fact will handle any ethernet frame. -The configuration statement for CTCI is as follows: +The configuration statement for LCS is as follows: - LCS [options] [] + LCS [options] [] -where: +where: - is the first address of the LCS device. - Since LCS uses paired addressing, this *must* be - an even number. + is the first address of the LCS device. + Since LCS uses paired addressing, this *must* be + an even number. - [] is an optional IP address of the Hercules - (guest OS) side. Note: This is only used to - establish a point-to-point routing table entry - on driving system. If you use the --oat option, - do not specify an address here. + [] is an optional IP address of the Hercules + (guest OS) side. Note: This is only used to + establish a point-to-point routing table entry + on driving system. If you use the --oat option, + do not specify an address here. There are no required parameters for the LCS emulation, however there are several options that can be specified on the config statement: - -n or --dev + -n or --dev - where is: + where is: - [*nix] the name of the TUN/TAP special character device, - normally /dev/net/tun. + [*nix] the name of the TUN/TAP special character device, + normally /dev/net/tun. - [Windows] is either the IP or MAC address of the driving - systems network card. TunTap32 will automatically select - the first network card it finds if this option is - omitted, this may not be desirable for some users. + [Windows] is either the IP or MAC address of the driving + systems network card. TunTap32 will automatically select + the first network card it finds if this option is + omitted, this may not be desirable for some users. - -o or --oat + -o or --oat - where specifies the filename of the Address - Translation file. If this option is specified, the optional - and --mac entries are ignored in preference to - statements in the OAT. (See below for the format of the OAT) + where specifies the filename of the Address + Translation file. If this option is specified, the optional + and --mac entries are ignored in preference to + statements in the OAT. (See below for the format of the OAT) - -m or --mac + -m or --mac - where is the optional hardware address of - the interface in the format: xx:xx:xx:xx:xx:xx + where is the optional hardware address of + the interface in the format: xx:xx:xx:xx:xx:xx - -d or --debug + -d or --debug - this will turn on the internal debugging routines. - Warning: This will produce a tremendous amount of - output to the Hercules console. It is suggested that - you only enable this at the request of the maintainers. + this will turn on the internal debugging routines. + Warning: This will produce a tremendous amount of + output to the Hercules console. It is suggested that + you only enable this at the request of the maintainers. If no Address Translation file is specified, the emulation module will create the following: - An ethernet adapter (port 0) for TCP/IP traffic only. - Two device addresses will be defined (devnum and devnum + 1). + An ethernet adapter (port 0) for TCP/IP traffic only. + Two device addresses will be defined (devnum and devnum + 1). The syntax for the Address Translation file is as follows: ********************************************************* -* Dev Mode Port Entry specific information * +* Dev Mode Port Entry specific information * ********************************************************* - 0400 IP 00 PRI 172.021.003.032 - 0402 IP 00 SEC 172.021.003.033 - 0404 IP 00 NO 172.021.003.038 - 0406 IP 01 NO 172.021.002.016 - 040E SNA 00 + 0400 IP 00 PRI 172.021.003.032 + 0402 IP 00 SEC 172.021.003.033 + 0404 IP 00 NO 172.021.003.038 + 0406 IP 01 NO 172.021.002.016 + 040E SNA 00 - HWADD 00 02:00:FE:DF:00:42 - HWADD 01 02:00:FE:DF:00:43 - ROUTE 00 172.021.003.032 255.255.255.224 + HWADD 00 02:00:FE:DF:00:42 + HWADD 01 02:00:FE:DF:00:43 + ROUTE 00 172.021.003.032 255.255.255.224 where: - Dev is the base device address - Mode is the operation mode - IP or SNA - Port is the virtual (relative) adapter number. + Dev is the base device address + Mode is the operation mode - IP or SNA + Port is the virtual (relative) adapter number. For IP modes, the entry specific information is as follows: - PRI|SEC|NO specifies where a packet with an unkwown IP - address is forwarded to. PRI is the primary - default entry, SEC specifies the entry to use - when the primary is not available, and NO - specifies that this is not a default entry. + PRI|SEC|NO specifies where a packet with an unknown IP + address is forwarded to. PRI is the primary + default entry, SEC specifies the entry to use + when the primary is not available, and NO + specifies that this is not a default entry. - nnn.nnn.nnn.nnn specifies the home IP address + nnn.nnn.nnn.nnn specifies the home IP address When the operation mode is IP, specify only the even (read) address. The odd (write) address will be create automatically. @@ -269,10 +273,10 @@ Use the HWADD to specify a hardware (MAC) address for a virtual adapter. The first parameter after HWADD specifies with relative adapter for which the address is applied. -The ROUTE statement is included for convenience. This allows the -hercifc program to create a network route for this specified -virtual adapter. Please note that it is not necessary to include -point-to-point routes for each IP address in the table. This is +The ROUTE statement is included for convenience. This allows the +hercifc program to create a network route for this specified +virtual adapter. Please note that it is not necessary to include +point-to-point routes for each IP address in the table. This is done automatically by the emulation module. Up to 4 virtual (relative) adapters 00-03 are currently supported. @@ -281,18 +285,20 @@ Up to 4 virtual (relative) adapters 00-03 are currently supported. SLIP/VMNET - Channel to Channel link to TCP/IP via SLIP/VMNET ----------------------------------------------------------------- -If the emulation mode is not specified on the configuration -statement, it is assumed to be a point-to-point link to the -driving system's TCP/IP stack using Willem Konynenberg's VMNET -package. This provides the same function as the CTCI mode of -operation, except that it uses a virtual SLIP interface instead +If the emulation mode is not specified on the configuration +statement, it is assumed to be a point-to-point link to the +driving system's TCP/IP stack using Willem Konynenberg's VMNET +package. This provides the same function as the CTCI mode of +operation, except that it uses a virtual SLIP interface instead of the TUN/TAP driver. Refer to http://www.kiyoinc.com/herc3088.html for more details. -(*) The TunTap32.dll and FishPack.dll are included as part of the -Windows distribution of Hercules, but the required WinPCap packet -driver must be installed separately. The WinPCap packet driver -can be obtained from: http://netgroup-serv.polito.it/winpcap/ +------------------------------- +[1] The TunTap32.dll and FishPack.dll are part of Fish's CTCI-W32 +http://home.sprintmail.com/~dtrout/Hercules/ctci-w32-index.html +package, but the required WinPCap packet driver must be installed +separately from http://netgroup-serv.polito.it/winpcap/ See Fish's +web page for details. diff --git a/README.OSX b/README.OSX index f3e64cc..da0f3a7 100644 --- a/README.OSX +++ b/README.OSX @@ -1,7 +1,7 @@ Jay, You don't need to install gettext on Mac OS X. You can -make the changes below (see notes on autogen.sh for +make the changes below (see notes on autogen.sh for building files on your system first) and just invoke configure on Mac OSX with the --with-included-gettext option. @@ -22,21 +22,21 @@ $ ./configure Here are the changes included in PatchOSX-2_17-current: autogen.sh - 1. Added --copy option on gettextize. + 1. Added --copy option on gettextize. This is necessary because it allows a user to - build hercules without having installed the + build hercules without having installed the gettext package. All they would have to do is invoke configure with --with-internal-gettext option. - + You should run autogen.sh on your system. Then, after it completes, you should put the m4 and intl directories into CVS so that they are saved as part of the package. Someone can then just co hercules and run configure. voila. - 2. Added -I m4 on the second autolocal call. + 2. Added -I m4 on the second autolocal call. I'm not really sure why the second autolocal is necessary, but I left it in. In any case @@ -45,133 +45,133 @@ autogen.sh config.h.in - 1. Added symbol for HAVE_FREXPL. + 1. Added symbol for HAVE_FREXPL. - Mac OS X does not support long double data types. - I took the same approack as for fmodl(). + Mac OS X does not support long double data types. + I took the same approack as for fmodl(). From /Developer/Documentation/DeveloperTools/\ - MachORuntime/2rt_powerpc_abi/index.html: + MachORuntime/2rt_powerpc_abi/index.html: - "The long double extended-precision type is 16 - bytes on classic Mac OS, but GCC for PowerPC - currently treats it as 8 bytes, equivalent to a - double. A future revision of the compiler may - extend long double to 128 bytes. For this reason, - it is not currently recommended that you use long - double on Mac OS X." + "The long double extended-precision type is 16 + bytes on classic Mac OS, but GCC for PowerPC + currently treats it as 8 bytes, equivalent to a + double. A future revision of the compiler may + extend long double to 128 bytes. For this reason, + it is not currently recommended that you use long + double on Mac OS X." - 2. Added symbol for HAVE_STRSIGNAL. + 2. Added symbol for HAVE_STRSIGNAL. - Apple messed up here. So I put a check in for - strsignal(). + Apple messed up here. So I put a check in for + strsignal(). - 3. Added symbol for _BSD_SOCKLEN_T_. + 3. Added symbol for _BSD_SOCKLEN_T_. - Hercules actually uses data type socklen_t, - which is found in the Apple headers, but it - is only defined when _BSD_SOCKLEN_T_ is - also defined with a type. + Hercules actually uses data type socklen_t, + which is found in the Apple headers, but it + is only defined when _BSD_SOCKLEN_T_ is + also defined with a type. - This symbol will only be defined for OSX. + This symbol will only be defined for OSX. - 4. Added symbol for _INTL_REDIRECT_MACROS. + 4. Added symbol for _INTL_REDIRECT_MACROS. - This time gettext is messed up. To be honest, - I don't know how gettext could install on *any* - system without this macro unless you manually - remove the #define _INTL_REDIRECT_MACROS from - intl/intl-compat.c, or build everything with - _INTL_REDIRECT_MACROS defined. Of course, the - version of gettext I used was downloaded from - gnu.org as gettext-0.11.5.tar.gz, and it's - possible that another version doesn't have this - problem. In any case, on Mac OSX it is required - if you get the latest gettext, or if you use the - included gettext. + This time gettext is messed up. To be honest, + I don't know how gettext could install on *any* + system without this macro unless you manually + remove the #define _INTL_REDIRECT_MACROS from + intl/intl-compat.c, or build everything with + _INTL_REDIRECT_MACROS defined. Of course, the + version of gettext I used was downloaded from + gnu.org as gettext-0.11.5.tar.gz, and it's + possible that another version doesn't have this + problem. In any case, on Mac OSX it is required + if you get the latest gettext, or if you use the + included gettext. - This symbol will only be defined for OSX. + This symbol will only be defined for OSX. configure.ac - 1. Moved AM_GNU_GETTEXT macro further down. + 1. Moved AM_GNU_GETTEXT macro further down. - Necessary because the darwin checks need to - set CPPFLAGS=-traditional-cpp so that the - AM_GNU_GETTEXT works correctly. + Necessary because the darwin checks need to + set CPPFLAGS=-traditional-cpp so that the + AM_GNU_GETTEXT works correctly. - 2. Added AC_CANONICAL_HOST at top. + 2. Added AC_CANONICAL_HOST at top. - Necessary because AM_GNU_GETTEXT used to - ensure $host_os and $host_vendor were - defined. But with AM_GNU_GETTEXT moved, - we need AC_CANONICAL_HOST to do this. + Necessary because AM_GNU_GETTEXT used to + ensure $host_os and $host_vendor were + defined. But with AM_GNU_GETTEXT moved, + we need AC_CANONICAL_HOST to do this. - 3. Added case statement for "darwin*". + 3. Added case statement for "darwin*". - If vendor is 'apple' then we set the - CPPFLAGS to -traditional-cpp and define - the other macros necessary for OS X. + If vendor is 'apple' then we set the + CPPFLAGS to -traditional-cpp and define + the other macros necessary for OS X. - 4. Added 'frexpl' to AC_CHECK_FUNCS. + 4. Added 'frexpl' to AC_CHECK_FUNCS. - 5. Added 'strsignal' to AC_CHECK_FUNCS. + 5. Added 'strsignal' to AC_CHECK_FUNCS. - 6. Added templages for macros added earlier. + 6. Added templages for macros added earlier. ctc_ctci.c - 1. Bypassed this module, as it's not supported - yet on OS X. Since this is a temporary - condition, I used _APPLE_ conditional. + 1. Bypassed this module, as it's not supported + yet on OS X. Since this is a temporary + condition, I used _APPLE_ conditional. ctc_lcs.c - 1. Bypassed this module, as it's not supported - yet on OS X. + 1. Bypassed this module, as it's not supported + yet on OS X. ctcadpt.c - 1. Bypassed this module, as it's not supported - yet on OS X. + 1. Bypassed this module, as it's not supported + yet on OS X. devtype.c - 1. Bypassed all communication devices. + 1. Bypassed all communication devices. hercules.h - 1. Relocated because of header - prequisite conditions. Hopefully, this - doesn't cause a problem on other systems. + 1. Relocated because of header + prequisite conditions. Hopefully, this + doesn't cause a problem on other systems. - 2. Added dummy scsi tape data. The scsi tape - is not yet supported on OS X. Used _APPLE_ - conditional. + 2. Added dummy scsi tape data. The scsi tape + is not yet supported on OS X. Used _APPLE_ + conditional. ieee.c - 1. Defined frexpl() based on HAVE_FREXPL. + 1. Defined frexpl() based on HAVE_FREXPL. machchk.c - 1. Defined strsignal() based on HAVE_STRSIGNAL. - - There may be a better place to put this, - but rather than creating a prototype for it - it seemed easier to put inline. However, - the multi-pass compile required it be buried - inside one of the pass conditionals. + 1. Defined strsignal() based on HAVE_STRSIGNAL. + + There may be a better place to put this, + but rather than creating a prototype for it + it seemed easier to put inline. However, + the multi-pass compile required it be buried + inside one of the pass conditionals. tapecopy.c - 1. Bypassed all code based on _APPLE_ since - scsi tape is not yet suupported on OS X. + 1. Bypassed all code based on _APPLE_ since + scsi tape is not yet suupported on OS X. tapedev.c - 1. Bypassed all scsi tape code. + 1. Bypassed all scsi tape code. tuntap.c - 1. Bypassed entire module. Not yet supported. + 1. Bypassed entire module. Not yet supported. diff --git a/README.TAPE b/README.TAPE new file mode 100644 index 0000000..d627e83 --- /dev/null +++ b/README.TAPE @@ -0,0 +1,189 @@ +------------------------------------------------------------------------------- +* Hercules Tape Support Enhancements SPE/Fixes * +* V1.0 - By Ivan S. Warren * +------------------------------------------------------------------------------- + +0 - Version History + * 08 Mar 2003 : ISW : Initial Release + +I - Supported Device Type emulations : + +Device Types supported as of yet : +3410/3411, 3420, 3480, 3490, 9347 +Upcoming Device type support : +3422, 3424, 3490E, 3590, 3430, 8809 + +II - Basic ACF support + +The ACF (Automatic Cartridge Feeder) is a feature on Cartridge type tape +drives (3480, 3490, etc..) that automatically loads a new tape when a tape +is removed from the drive. There is no real control over this device by the +host, as it just keeps on feeding tapes one after the other. +Although the ACF feature is unique to cartridge type systems, the emulation +accepts to use the same technique for emulated 1/2 inch tapes reel drives +as well. + +ACF is supported as follows : + +hercules.cnf syntax : +CUU DEVT @filename +devinit syntax : +devinit CUU @filename + +the 'filename' (without the prefixing @) contains a list of files that will +be loaded one after the other. The filenames contained in the file list cannot +describe another ACF file nor an SCSI tape handle (/dev/stX). However, the +files may be standard AWS, HET or OMA files. + +To manually reset the ACF to the top of the stack, the devinit can be used +to 'reload' the ACF feature. + +If the filename in the ACF description file contains a '*', any option(s) that +follow(s) the '*' (is)are applied to each file, followed by the option(s) +specified on the devinit or hercules.cnf entry, followed by the option(s) +specified on each individual entry. + +Example : + +hercules.cnf: +180 3420 @newstack compress=1 + +newstack: +# Sample file +* maxsizeM=16 eotmargin=131072 +tape01.aws compress=0 +tape02.het maxsizeM=32 eotmargin=65536 +tape03.het maxsize=0 + +This is equivalent to issuing (one at the start and one after each tape unload +event) + +180 3420 tape01.aws maxsizeM=16 eotmargin=131072 compress=1 compress=0 +devinit 180 tape02.het maxsizeM=16 eotmargin=131072 compress=1 maxsizeM=32 eotmargin=65536 +devinit 180 tape03.het maxsizeM=16 eotmargin=131072 compress=1 maxsize=0 + +Options are processed in the order in which they appear. +Any conflicting parameter overrides the previous one. +For example, on the 1st entry, the resuling "compress" will be 0. + +Care must be taken that '*' line entries are all proecessed at once. +For example : + +* compress=0 +tape01.aws +* compress=1 +tape02.aws + +is EQUIVALENT to + +* compress=0 compress=1 +tape01.aws +tape02.aws + +NOTE : This may change in the future though, so ACF description files should not rely on this feature. + +III - Multivolume support - End of tape indication, Tape file size limitation + +Numerous requests have been made in order to support multi-volume tape +handling, as well as limiting the file size generated by any individual +tape file. + +Because multivolume support is not necesserally VOL1-HDR1/EOV/EOF based, +a certain number of new features have to be implemented in order to let +the guest program manage the multivolume on it's own. +(ex: VM/DDR, DOS Tape Spooled output, etc..) + +Multivolume support resides in the capacity of a drive to indicate to the +controling program that it is about to reach the end of the physical tape +and that measures have to be taken to close the current volume and +request a new media. + +3 new options are introduced : +maxsize[K|M]=nnnn : + The resulting file size is limited to the amount specified. maxsize + specifies bytes, maxsizeK specifies a multiple of 10$24 bytes and + maxsizeM specifies a multiple of 1024*1024 bytes. specifying a size + of 0 indicates that there is no limit on the size of the file. + + the default is 0 (unlimited file size) + +strictsize=0|1 : + Upon reaching the tape file size limit, depending on strictsize, + the tape file will or will not be truncated to enforce the maxsize + limit. The limit is only enforced during a write type operation + (that is : if the file already exists and the program only reads + the file, then the file will NOT be truncated, regardless of the + strictsize setting). + This affects any write that starts BELOW the limit, but that would + extend BEYOND the limit. + This parameter only affects compress HET files. On AWS tapes, the + limit is always enforced, but the file is not truncated (i.e. the + write does not occur, because 1) AWS tapes are never truncated, 2) + the effects of the write are known in advance (no compression)). + Regardless of strictsize, any write operation (Write, Write TM) + will return a Unit Check with Equip Check to the program if the file + size exceeds the predefined limit. If strictsize is 0, the write will + actually have been performed on the tape file. If strictsize is 1, + the file will be truncated on the preceeding tape block boundary. + If an attempt is made to write beyond the maxsize li + + Care must be taken that regardless of the 'strictsize' setting, + the tape may become unusable for the guest program should such an + event occur (absence of a Tape Mark for example). + + This option has no effect if maxsize is 0 + This option only affects HET file tapes + The default is 0 (do not truncate) + +eotmargin=nnnn : + This option specifies, in bytes, the threshold before reaching maxsize + during which an indication will be returned to the program to indicate + that an EOT marker has been reached for a write type operation. + The indication of reaching near-capacity is indicated to the program + by presenting Unit Exception in the CSW on a Write type operation, + along with Channel End and Device End. + For certain device types, sense information may also indicate this + information independently of a write operation. + The purpose of this option is to allow the program to determine that + it is time to change to ask for a new tape. For example : + + maxsizeM=2 eotmargin=131072 + all writes up to 2Mb - 128Kb will occur normally + All writes between 2Mb-128Kb and 2Mb will receive Unit Exception + All writes beyond 2Mb will receive Unit Check + + This option has no effect if maxsize is 0 + The default is 131072 (128Kb) + +Caveats : + +If the emulated tape file resides on a disk media that reaches full capacity +before the tape image exceeds it's size limit, the tape emulation will not +detect that situation and will simulate reaching physical end of tape BEFORE +reaching the EOT marker. +This behaviour may be changed at a later time. + +IV - Various other changes / Corrections + +IV.1 : Device End Suppression for Tape motion CCWs on a non-ready tape drive + +IV.2 : Control Unit End is presented on Rewind Unload status + +IV.3 : Sense Pending status support + When certain conditions arise during an I/O operation, A sense is + built and Unit Check is presented to the program. + The program is then responsible for retrieving the sense information. + However, if the sense is not the result of a previously occuring + Unit Check, a new sense is built to reflect the current device status. + Also, this management is a necessary step in order to eventually + implement multipath operations (Contengency Allegiance status). + +IV.4 : readonly=0|1 : + force an emulated tape device read only. + (1/2 Inch tape ring or 38k Cartridge Protect tab) + (support for this feature is incomplete) + + +--Ivan + +8 Mar 2003 diff --git a/RELEASE.NOTES b/RELEASE.NOTES new file mode 100644 index 0000000..abc2e96 --- /dev/null +++ b/RELEASE.NOTES @@ -0,0 +1,107 @@ + + Version 2.18 RELEASE NOTES + + +- Reminder that CTCI device handling was changed starting with version 2.17 + as follows: + + - The CTCI-W32 protocol is deprecated. You should use the CTCI protocol + instead. + + - You MUST NOT define both even/odd CTCI device pairs in your configuration + file. You should ONLY define the first even numbered device. Hercules will + automatically define the odd numbered device for you. If you define the + odd numbered device by mistake, an open error will occur on that device. + This is by design. See the README.NETWORKING document for further details. + + +- Hercules Dynamic Loader support: starting with version 2.18, Hercules now + contains support for the dynamic loading of certain modules upon startup on + some platforms (e.g. Linux and Windows for example). As a result of this new + feature, "Hercules" itself now no longer consists of just the 'hercules.exe' + module by itself, but rather consists of BOTH the 'hercules.exe' program AS + WELL AS whatever dynamic modules (DLLs) that accompany it. + + As a result if this change, whenever you install a new version of Hercules, + you must ensure that you ALSO install the accompanying new versions of the + new dynamic modules as well. Attempting to use a version of Hercules with a + dynamic module that was not specifically built for that version will cause + loading of that dynamic module to fail. + + You CANNOT mix versions of hercules with differing versions of dynamically + loaded modules. + + Ensure that your library path LD_LIBRARY_PATH set correctly such that it + includes the directory of your hercules executables. Especially, message + HHCCF042E will indicate that system is unable to locate necessary loadable + modules. + + +- ECPS:VM: Do not use ECPS:VM (See README.ECPSVM) in an AP or MP environment + in VM/370. If AP=YES or MP=YES is coded in DMKSYS and the AP/MP control + file is used to build the CP nucleus and NUMCPU is set to more than 1 in + the hercules.cnf file, any of LOK001, LOK003 or other abends will occur. + This occurs because the hercules ECPS:VM CP Assist implementation is not + MP safe, and particularily, attemps VM dispatching without holding necessary + AP or MP locks. + + +- Due to the change in Hercules' "mainstor" memory allocation technique to + address a "double memory consumption" bug in Cygwin's malloc implementation, + some Windows Hercules users may experience an "out of memory" error whenever + Hercules is started with a large MAINSIZE configuration file value: + + "HHCCF031S Cannot obtain nnnMB main storage" + + This error will most likely occur (if it does at all) for those users who + have manually adjusted their Cygwin "heap_chunk_in_mb" Windows registry + setting value (in order to allow them to specify a large MAINSIZE value + when running Hercules). If this problem does occur (i.e. if you DO happen + to experience the above mentioned "HHCCF031S Cannot obtain main storage" + error with this new release of Hercules), then either REDUCE your "heap_ + chunk_in_mb" value (yes, that's correct: REDUCE it; i.e. change it to a + SMALLER value) or else remove it altogether (so as to let it default). + + Detailed explanation: + + History/background: Cygwin has a built-in limit to the amount of memory + that may be allocated in one chunk. If you try 'malloc'ing more than this + limit, you will receive an "out of memory" error. Since many Hercules users + specify large MAINSIZE values in their configuration file, they sometimes + experience this problem. + + The suggested workaround to this "problem" was to add a "heap_chunk_in_mb" + registry value to Cygwin's registry settings with a large enough value such + that Cygwin would then be able to satisfy Hercules' 'malloc' request for + such a large MAINSIZE value. + + This worked fine until sometime around version 1.3.15 of Cygwin, at which + time they began using a different 'malloc' technique that unfortunately + causes TWICE as much Windows virtual memory to be allocated for any large + memory allocation (the technical reasons of which are explained in comments + in source member config.c where mainsize is being allocated). + + In order to address this double memory allocation issue in Cygwin's malloc + implementation, Hercules was changed to use mmap to allocate its mainstor + rather than malloc (which, unlike malloc, does NOT inadvertently allocate + twice as Windows virtual storage than was requested), which did indeed re- + solve the "double memory allocation" problem. + + Unfortunately however, because Cygwin's malloc and mmap logic each consume + completely different portions of Windows' virtual memory, the more memory + that is reserved for malloc usage (via using a larger "heap_chunk_in_mb" + value), the LESS becomes available for mmap usage! + + Thus, while increasing your "heap_chunk_in_mb" registry value USED to HELP + [to allow you to allocate larger amounts of mainstor (MAINSIZE)], it NOW + causes the complete OPPOSITE effect: it ends up PREVENTING you from being + able to 'mmap' as much storage as you'd like to have! + + Conclusion: + + Therefore, if you are currently using the "heap_chunk_in_mb" registry value + setting to allow you to allocate large MAINSIZE values, then starting with + version 2.18 of Hercules you need to DESCREASE your "heap_chunk_in_mb" value + (or remove it altogether and let it default) in order to leave enough memory + remaining for Hercules (Cygwin actually) to be able to satisfy its 'mmap' + request for your desired MAINSIZE amount. diff --git a/aclocal.m4 b/aclocal.m4 index e28aa00..bf7c5b8 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -865,6 +865,6459 @@ AC_DEFUN([AM_MAINTAINER_MODE], ] ) +# HC_PROG_CC +# -------------------------------------------------------------------- +# AC_PROG_CC (actually _AC_PROC_CC_G) takes it upon itself to +# put "-g -O2" in CFLAGS. While this may be good for most packages +# using autoconf, we have our own "optimize" function that this +# interferes with. +# +# Notes: AC_BEFORE will emit a warning of AC_PROG_CC was expanded +# prior to this macro, just in case something gets put in +# configure.ac before us. +# AC_REQUIRE will expand AC_PROG_CC for us. +# +AC_DEFUN([HC_PROG_CC], +[ AC_BEFORE([HC_PROG_CC],[AC_PROG_CC]) + AC_REQUIRE([AC_PROG_CC]) + # Restore the saved CFLAGS from autoconf invocation + CFLAGS=$ac_env_CFLAGS_value +]) +AC_DEFUN([HC_LD_DISALLOWDUPS], +[ + AC_REQUIRE([AC_PROG_LIBTOOL]) + AC_REQUIRE([AC_PROG_LD_GNU]) + if test "x$lt_cv_prog_gnu_ld" = "xyes"; then + LDFLAGS="$LDFLAGS -Wl,--warn-common" + fi +]) + +AC_DEFUN([HC_LD_DUPSHAREGETOPT], +[ + ac_use_dup_sharegetopt=auto + AC_ARG_ENABLE(getoptwrapper, + AC_HELP_STRING([--enable-getoptwrapper], + [force use of the getopt wrapper kludge]), + [case "${enableval}" in + yes) + ac_use_dup_sharegetopt=yes + ;; + no) + ac_use_dup_sharegetopt=no + ;; + auto) + ac_use_dup_sharegetopt=auto + ;; + *) + ac_use_dup_sharegetopt=auto + ;; + esac], + [ + ac_use_dup_sharegetopt=auto + ]) + _HC_LD_DUPSHAREGETOPT($ac_use_dup_sharegetopt) +] +) +AC_DEFUN([_HC_LD_DUPSHAREGETOPT], +[ + rm -f libconftest* + rm -f .libs/libconftest* + AC_REQUIRE([AC_PROG_LIBTOOL]) + AC_MSG_CHECKING([whether use of a getopt wrapper is necessary]) + if test "x$1" = "xauto"; then + if test $(./libtool --features | fgrep "enable shared libraries" | wc -l) -eq 1;then + cat > conftest1.c << DUPGETOPT1 + extern char *optarg; + extern int optind; + extern int test2(); + int test1() + { + int i; + char *c; + i=optind; + c=optarg; + getopt(0,0,0); + test2(); + return 0; + } +DUPGETOPT1 + cat > conftest2.c << DUPGETOPT2 + extern char *optarg; + extern int optind; + int test2() + { + int i; + char *c; + i=optind; + c=optarg; + getopt(0,0,0); + return 0; + } +DUPGETOPT2 + ./libtool --mode=compile ${CC-cc} conftest1.c -c -o conftest1.lo > /dev/null 2>&1 + ./libtool --mode=link ${CC-cc} -shared -rpath /lib -no-undefined conftest1.lo -o libconftest1.la > /dev/null 2>&1 + ./libtool --mode=compile ${CC-cc} conftest2.c -c -o conftest2.lo > /dev/null 2>&1 + ./libtool --mode=link ${CC-cc} -shared -rpath /lib -no-undefined conftest2.lo libconftest1.la -o libconftest2.la > /tmp/a 2>&1 + if test $? = 0; then + ac_cv_dup_getopt=no + ac_cv_dup_getoptmsg=no + else + ac_cv_dup_getopt=yes + ac_cv_dup_getoptmsg=yes + fi + else + ac_cv_dup_getopt=no + ac_cv_dup_getoptmsg=no + fi + rm -f *conftest* + rm -f .libs/*conftest* + else + ac_cv_dup_getopt="$1" + ac_cv_dup_getoptmsg="$1 (forced)" + fi + AC_MSG_RESULT($ac_cv_dup_getoptmsg) + if test "x$ac_cv_dup_getopt" = "xyes";then + AC_DEFINE([NEED_GETOPT_WRAPPER]) + fi +]) + +AC_DEFUN([HC_HAVE_OPTERR], +[ + AC_CACHE_CHECK([whether to use optreset], + [ac_cv_need_optreset], + [AC_TRY_LINK([], +[extern int optreset; +optreset=1; +getopt(0,0,0); +], + ac_cv_need_optreset=yes, + ac_cv_need_optreset=no) + ] + ) + if test "x$ac_cv_need_optreset" = "xyes"; then + AC_DEFINE([NEED_GETOPT_OPTRESET]) + fi +] +) + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + +# serial 47 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e s/^X//' +[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] + +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except M$VC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + ;; + *) + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_AC_SYS_COMPILER + + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null && + echo_test_string="`eval $cmd`" && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + $2=yes + fi + fi + $rm conftest* +]) + +if test x"[$]$2" = xyes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + else + $2=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + testring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \ + = "XX$testring") >/dev/null 2>&1 && + new_result=`expr "X$testring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + testring=$testring$testring + done + testring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# -------------------- +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ------------------------------------------------------------------ +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +}] +EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_unknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + # According to Tom Tromey, Ian Lance Taylor reported there are C compilers + # that will create temporary files in the current directory regardless of + # the output directory. Thus, making CWD read-only will cause this test + # to fail, enabling locking or at least warning the user not to do parallel + # builds. + chmod -w . + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s out/conftest.err; then + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" +# +# +# The following section is a PATCH to overcome the +# stripped import library issues under cygwin + case $host_os in + cygwin*) + striplib= + AC_MSG_RESULT([no]) + ;; + *) + AC_MSG_RESULT([yes]) + ;; + esac +# +# +# AC_MSG_RESULT([yes]) +# +# + +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_MSG_CHECKING([dynamic linker characteristics]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && test "X$CXX" != "Xno"; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 dll's +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +#- set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognise shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="ifelse([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +])# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognise a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case "$host_cpu" in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + irix5* | nonstopux*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" + ;; + *) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" + ;; + esac + lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux*) + case $host_cpu in + alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh*) + lt_cv_deplibs_check_method=pass_all ;; + *) + # glibc up to 2.1.1 does not perform some relocations on ARM + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; + esac + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' + else + lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' + fi + ;; + +osf3* | osf4* | osf5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' + lt_cv_file_magic_test_file=/shlib/libc.so + lt_cv_deplibs_check_method=pass_all + ;; + +sco3.2v5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=/lib/libc.so + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/${ac_tool_prefix}nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + esac + fi + done + IFS="$lt_save_ifs" + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +AC_DEFUN([AC_CHECK_LIBM], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +])# AC_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL +# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If +# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will +# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and +# top_srcdir appropriately in the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that LIBLTDL +# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If +# DIRECTORY is not provided and an installed libltdl is not found, it is +# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' +# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single +# quotes!). If your package is not flat and you're not using automake, +# define top_builddir and top_srcdir appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# -------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + +_LT_AC_SYS_COMPILER + +# +# Check for any special shared library compilation flags. +# +_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= +if test "$GCC" = no; then + case $host_os in + sco3.2v5*) + _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' + ;; + esac +fi +if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then + AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) + if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then : + else + AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) + _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no + fi +fi + + +# +# Check to make sure the static flag actually works. +# +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) + + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF($1) + +# Report which librarie types wil actually be built +AC_MSG_CHECKING([if libtool supports shared libraries]) +AC_MSG_RESULT([$can_build_shared]) + +AC_MSG_CHECKING([whether to build shared libraries]) +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case "$host_os" in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + darwin* | rhapsody*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case "$host_os" in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; +esac +AC_MSG_RESULT([$enable_shared]) + +AC_MSG_CHECKING([whether to build static libraries]) +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +AC_MSG_RESULT([$enable_static]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cc + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +_LT_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds it's shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + darwin* | rhapsody*) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case "$host_os" in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + dgux*) + case $cc_basename in + ec++) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | kfreebsd*-gnu) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + case "$host_cpu" in + hppa*64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + ;; + *) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case "$host_cpu" in + hppa*64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC) + case "$host_cpu" in + hppa*64*|ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case "$host_cpu" in + ia64*|hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + irix5* | irix6*) + case $cc_basename in + CC) + # SGI C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc) + # Intel C++ + with_gnu_ld=yes + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + cxx) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + osf3*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sco*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) +# ------------------------ +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# 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. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext='$shrext' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" + +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + test -f Makefile && make "$ltmain" +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Transform the above into a raw symbol and a C symbol. +symxfrm='\1 \2\3 \3' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris* | sysv5*) + symcode='[[BDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGISTW]]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + cxx) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx) + # Digital/Compaq C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + sco*) + case $cc_basename in + CC) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + *) + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + unixware*) + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux*) + case $CC in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + sco3.2v5*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds it's shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi4*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + if test "$GXX" = yes ; then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case "$host_os" in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*|ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case "$host_cpu" in + hppa*64*|ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + *) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + sco3.2v5*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4.2uw2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv5*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && break + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +SED=$lt_cv_path_SED +]) +AC_MSG_RESULT([$SED]) +]) + + +# serial 6 AC_LIB_LTDL + +# AC_WITH_LTDL +# ------------ +# Clients of libltdl can use this macro to allow the installer to +# choose between a shipped copy of the ltdl sources or a preinstalled +# version of the library. +AC_DEFUN([AC_WITH_LTDL], +[AC_REQUIRE([AC_LIB_LTDL]) +AC_SUBST([LIBLTDL]) +AC_SUBST([INCLTDL]) + +# Unless the user asks us to check, assume no installed ltdl exists. +use_installed_libltdl=no + +AC_ARG_WITH([included_ltdl], + [ --with-included-ltdl use the GNU ltdl sources included here]) + +if test "x$with_included_ltdl" != xyes; then + # We are not being forced to use the included libltdl sources, so + # decide whether there is a useful installed version we can use. + AC_CHECK_HEADER([ltdl.h], + [AC_CHECK_LIB([ltdl], [lt_dlcaller_register], + [with_included_ltdl=no], + [with_included_ltdl=yes]) + ]) +fi + +if test "x$enable_ltdl_install" != xyes; then + # If the user did not specify an installable libltdl, then default + # to a convenience lib. + AC_LIBLTDL_CONVENIENCE +fi + +if test "x$with_included_ltdl" = xno; then + # If the included ltdl is not to be used. then Use the + # preinstalled libltdl we found. + AC_DEFINE([HAVE_LTDL], 1, + [Define this if a modern libltdl is already installed]) + LIBLTDL=-lltdl +fi + +# Report our decision... +AC_MSG_CHECKING([whether to use included libltdl]) +AC_MSG_RESULT([$with_included_ltdl]) + +AC_CONFIG_SUBDIRS([libltdl]) +])# AC_WITH_LTDL + + +# AC_LIB_LTDL +# ----------- +# Perform all the checks necessary for compilation of the ltdl objects +# -- including compiler checks and header checks. +AC_DEFUN([AC_LIB_LTDL], +[AC_PREREQ(2.50) +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_C_CONST]) +AC_REQUIRE([AC_HEADER_STDC]) +AC_REQUIRE([AC_HEADER_DIRENT]) +AC_REQUIRE([_LT_AC_CHECK_DLFCN]) +AC_REQUIRE([AC_LTDL_ENABLE_INSTALL]) +AC_REQUIRE([AC_LTDL_SHLIBEXT]) +AC_REQUIRE([AC_LTDL_SHLIBPATH]) +AC_REQUIRE([AC_LTDL_SYSSEARCHPATH]) +AC_REQUIRE([AC_LTDL_OBJDIR]) +AC_REQUIRE([AC_LTDL_DLPREOPEN]) +AC_REQUIRE([AC_LTDL_DLLIB]) +AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) +AC_REQUIRE([AC_LTDL_DLSYM_USCORE]) +AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS]) +AC_REQUIRE([AC_LTDL_FUNC_ARGZ]) + +AC_CHECK_HEADERS([assert.h ctype.h errno.h malloc.h memory.h stdlib.h \ + stdio.h unistd.h]) +AC_CHECK_HEADERS([dl.h sys/dl.h dld.h mach-o/dyld.h]) +AC_CHECK_HEADERS([string.h strings.h], [break]) + +AC_CHECK_FUNCS([strchr index], [break]) +AC_CHECK_FUNCS([strrchr rindex], [break]) +AC_CHECK_FUNCS([memcpy bcopy], [break]) +AC_CHECK_FUNCS([memmove strcmp]) +AC_CHECK_FUNCS([closedir opendir readdir]) +])# AC_LIB_LTDL + + +# AC_LTDL_ENABLE_INSTALL +# ---------------------- +AC_DEFUN([AC_LTDL_ENABLE_INSTALL], +[AC_ARG_ENABLE([ltdl-install], + [AC_HELP_STRING([--enable-ltdl-install], [install libltdl])]) + +AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) +AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) +])])# AC_LTDL_ENABLE_INSTALL + + +# AC_LTDL_SYS_DLOPEN_DEPLIBS +# -------------------------- +AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_CACHE_CHECK([whether deplibs are loaded by dlopen], + [libltdl_cv_sys_dlopen_deplibs], + [# PORTME does your system automatically load deplibs for dlopen? + # or its logical equivalent (e.g. shl_load for HP-UX < 11) + # For now, we just catch OSes we know something about -- in the + # future, we'll try test this programmatically. + libltdl_cv_sys_dlopen_deplibs=unknown + case "$host_os" in + aix3*|aix4.1.*|aix4.2.*) + # Unknown whether this is true for these versions of AIX, but + # we want this `case' here to explicitly catch those versions. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + aix[[45]]*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + darwin*) + # Assuming the user has installed a libdl from somewhere, this is true + # If you are looking for one http://www.opendarwin.org/projects/dlcompat + libltdl_cv_sys_dlopen_deplibs=yes + ;; + kfreebsd*-gnu) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + gnu*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + hpux10*|hpux11*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + irix[[12345]]*|irix6.[[01]]*) + # Catch all versions of IRIX before 6.2, and indicate that we don't + # know how it worked for any of those versions. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + irix*) + # The case above catches anything before 6.2, and it's known that + # at 6.2 and later dlopen does load deplibs. + libltdl_cv_sys_dlopen_deplibs=yes + ;; + linux*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + netbsd*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + openbsd*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + osf[[1234]]*) + # dlopen did load deplibs (at least at 4.x), but until the 5.x series, + # it did *not* use an RPATH in a shared library to find objects the + # library depends on, so we explictly say `no'. + libltdl_cv_sys_dlopen_deplibs=no + ;; + osf5.0|osf5.0a|osf5.1) + # dlopen *does* load deplibs and with the right loader patch applied + # it even uses RPATH in a shared library to search for shared objects + # that the library depends on, but there's no easy way to know if that + # patch is installed. Since this is the case, all we can really + # say is unknown -- it depends on the patch being installed. If + # it is, this changes to `yes'. Without it, it would be `no'. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + osf*) + # the two cases above should catch all versions of osf <= 5.1. Read + # the comments above for what we know about them. + # At > 5.1, deplibs are loaded *and* any RPATH in a shared library + # is used to find them so we can finally say `yes'. + libltdl_cv_sys_dlopen_deplibs=yes + ;; + solaris*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + esac + ]) +if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then + AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], + [Define if the OS needs help to load dependent libraries for dlopen().]) +fi +])# AC_LTDL_SYS_DLOPEN_DEPLIBS + + +# AC_LTDL_SHLIBEXT +# ---------------- +AC_DEFUN([AC_LTDL_SHLIBEXT], +[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) +AC_CACHE_CHECK([which extension is used for loadable modules], + [libltdl_cv_shlibext], +[ +module=yes +eval libltdl_cv_shlibext=$shrext + ]) +if test -n "$libltdl_cv_shlibext"; then + AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext", + [Define to the extension used for shared libraries, say, ".so".]) +fi +])# AC_LTDL_SHLIBEXT + + +# AC_LTDL_SHLIBPATH +# ----------------- +AC_DEFUN([AC_LTDL_SHLIBPATH], +[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) +AC_CACHE_CHECK([which variable specifies run-time library path], + [libltdl_cv_shlibpath_var], [libltdl_cv_shlibpath_var="$shlibpath_var"]) +if test -n "$libltdl_cv_shlibpath_var"; then + AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var", + [Define to the name of the environment variable that determines the dynamic library search path.]) +fi +])# AC_LTDL_SHLIBPATH + + +# AC_LTDL_SYSSEARCHPATH +# --------------------- +AC_DEFUN([AC_LTDL_SYSSEARCHPATH], +[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) +AC_CACHE_CHECK([for the default library search path], + [libltdl_cv_sys_search_path], + [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"]) +if test -n "$libltdl_cv_sys_search_path"; then + sys_search_path= + for dir in $libltdl_cv_sys_search_path; do + if test -z "$sys_search_path"; then + sys_search_path="$dir" + else + sys_search_path="$sys_search_path$PATH_SEPARATOR$dir" + fi + done + AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path", + [Define to the system default library search path.]) +fi +])# AC_LTDL_SYSSEARCHPATH + + +# AC_LTDL_OBJDIR +# -------------- +AC_DEFUN([AC_LTDL_OBJDIR], +[AC_CACHE_CHECK([for objdir], + [libltdl_cv_objdir], + [libltdl_cv_objdir="$objdir" + if test -n "$objdir"; then + : + else + rm -f .libs 2>/dev/null + mkdir .libs 2>/dev/null + if test -d .libs; then + libltdl_cv_objdir=.libs + else + # MS-DOS does not allow filenames that begin with a dot. + libltdl_cv_objdir=_libs + fi + rmdir .libs 2>/dev/null + fi + ]) +AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# AC_LTDL_OBJDIR + + +# AC_LTDL_DLPREOPEN +# ----------------- +AC_DEFUN([AC_LTDL_DLPREOPEN], +[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) +AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], + [libltdl_cv_preloaded_symbols], + [if test -n "$lt_cv_sys_global_symbol_pipe"; then + libltdl_cv_preloaded_symbols=yes + else + libltdl_cv_preloaded_symbols=no + fi + ]) +if test x"$libltdl_cv_preloaded_symbols" = xyes; then + AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1, + [Define if libtool can extract symbol lists from object files.]) +fi +])# AC_LTDL_DLPREOPEN + + +# AC_LTDL_DLLIB +# ------------- +AC_DEFUN([AC_LTDL_DLLIB], +[LIBADD_DL= +AC_SUBST(LIBADD_DL) +AC_LANG_PUSH([C]) + +AC_CHECK_FUNC([shl_load], + [AC_DEFINE([HAVE_SHL_LOAD], [1], + [Define if you have the shl_load function.])], + [AC_CHECK_LIB([dld], [shl_load], + [AC_DEFINE([HAVE_SHL_LOAD], [1], + [Define if you have the shl_load function.]) + LIBADD_DL="$LIBADD_DL -ldld"], + [AC_CHECK_LIB([dl], [dlopen], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) + LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"], + [AC_TRY_LINK([#if HAVE_DLFCN_H +# include +#endif + ], + [dlopen(0, 0);], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"], + [AC_CHECK_LIB([svld], [dlopen], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) + LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes"], + [AC_CHECK_LIB([dld], [dld_link], + [AC_DEFINE([HAVE_DLD], [1], + [Define if you have the GNU dld library.]) + LIBADD_DL="$LIBADD_DL -ldld"], + [AC_CHECK_FUNC([_dyld_func_lookup], + [AC_DEFINE([HAVE_DYLD], [1], + [Define if you have the _dyld_func_lookup function.])]) + ]) + ]) + ]) + ]) + ]) +]) + +if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes +then + lt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBADD_DL" + AC_CHECK_FUNCS([dlerror]) + LIBS="$lt_save_LIBS" +fi +AC_LANG_POP +])# AC_LTDL_DLLIB + + +# AC_LTDL_SYMBOL_USCORE +# --------------------- +# does the compiler prefix global symbols with an underscore? +AC_DEFUN([AC_LTDL_SYMBOL_USCORE], +[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) +AC_CACHE_CHECK([for _ prefix in compiled symbols], + [ac_cv_sys_symbol_underscore], + [ac_cv_sys_symbol_underscore=no + cat > conftest.$ac_ext < $ac_nlist) && test -s "$ac_nlist"; then + # See whether the symbols have a leading underscore. + if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then + ac_cv_sys_symbol_underscore=yes + else + if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then + : + else + echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC + fi + fi + else + echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC + fi + else + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.c >&AC_FD_CC + fi + rm -rf conftest* + ]) +])# AC_LTDL_SYMBOL_USCORE + + +# AC_LTDL_DLSYM_USCORE +# -------------------- +AC_DEFUN([AC_LTDL_DLSYM_USCORE], +[AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) +if test x"$ac_cv_sys_symbol_underscore" = xyes; then + if test x"$libltdl_cv_func_dlopen" = xyes || + test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then + AC_CACHE_CHECK([whether we have to add an underscore for dlsym], + [libltdl_cv_need_uscore], + [libltdl_cv_need_uscore=unknown + save_LIBS="$LIBS" + LIBS="$LIBS $LIBADD_DL" + _LT_AC_TRY_DLOPEN_SELF( + [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes], + [], [libltdl_cv_need_uscore=cross]) + LIBS="$save_LIBS" + ]) + fi +fi + +if test x"$libltdl_cv_need_uscore" = xyes; then + AC_DEFINE(NEED_USCORE, 1, + [Define if dlsym() requires a leading underscore in symbol names.]) +fi +])# AC_LTDL_DLSYM_USCORE + +# AC_LTDL_FUNC_ARGZ +# ----------------- +AC_DEFUN([AC_LTDL_FUNC_ARGZ], +[AC_CHECK_HEADERS([argz.h]) + +AC_CHECK_TYPES([error_t], + [], + [AC_DEFINE([error_t], [int], + [Define to a type to use for `error_t' if it is not otherwise available.])], + [#if HAVE_ARGZ_H +# include +#endif]) + +AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify]) +])# AC_LTDL_FUNC_ARGZ + # gettext.m4 serial 17 (gettext-0.11.5) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU diff --git a/autoconf/config.guess b/autoconf/config.guess index 297e5c3..0e30d56 100644 --- a/autoconf/config.guess +++ b/autoconf/config.guess @@ -1,9 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2001-10-05' +timestamp='2003-07-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ timestamp='2001-10-05' # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner . +# Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # @@ -88,30 +88,42 @@ if test $# != 0; then exit 1 fi +trap 'exit 1' 1 2 15 -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. -# CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. -set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int dummy(){}" > $dummy.c ; - for c in cc gcc c89 ; do - ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; - if test $? = 0 ; then +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; - rm -f $dummy.c $dummy.o $dummy.rel ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac' +esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -135,23 +147,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. - # Determine the machine/vendor (is the vendor relevant). - case "${UNAME_MACHINE}" in - amiga) machine=m68k-unknown ;; - arm32) machine=arm-unknown ;; - atari*) machine=m68k-atari ;; - sun3*) machine=m68k-sun ;; - mac68k) machine=m68k-apple ;; - macppc) machine=powerpc-apple ;; - hp3[0-9][05]) machine=m68k-hp ;; - ibmrt|romp-ibm) machine=romp-ibm ;; - sparc*) machine=`uname -p`-unknown ;; - *) machine=${UNAME_MACHINE}-unknown ;; + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. - case "${UNAME_MACHINE}" in - i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null @@ -168,7 +180,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ;; esac # The OS release - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. @@ -217,65 +240,52 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - cat <$dummy.s - .data -\$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - - .text - .globl main - .align 4 - .ent main -main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `./$dummy` in - 0-0) - UNAME_MACHINE="alpha" - ;; - 1-0) - UNAME_MACHINE="alphaev5" - ;; - 1-1) - UNAME_MACHINE="alphaev56" - ;; - 1-101) - UNAME_MACHINE="alphapca56" - ;; - 2-303) - UNAME_MACHINE="alphaev6" - ;; - 2-307) - UNAME_MACHINE="alphaev67" - ;; - 2-1307) - UNAME_MACHINE="alphaev68" - ;; - esac - fi - rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms + exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -291,6 +301,9 @@ EOF *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; @@ -311,6 +324,13 @@ EOF NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; @@ -339,7 +359,7 @@ EOF echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) @@ -417,15 +437,20 @@ EOF exit (-1); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy \ - && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; @@ -498,8 +523,7 @@ EOF exit(0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 @@ -508,7 +532,7 @@ EOF fi exit 0 ;; *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else @@ -597,11 +621,21 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi - rm -f $dummy.c $dummy + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) @@ -635,8 +669,7 @@ EOF exit (0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) @@ -682,9 +715,6 @@ EOF C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; @@ -697,18 +727,15 @@ EOF CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY*T3D:*:*:*) - echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` @@ -724,8 +751,22 @@ EOF *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; - *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + # GNU/FreeBSD systems have a "k" prefix to indicate we are using + # FreeBSD's kernel, but not the complete OS. + case ${LIBC} in gnu) kernel_only='k' ;; esac + echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -736,11 +777,17 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? - echo i386-pc-interix + echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin @@ -760,17 +807,52 @@ EOF arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit 0 ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux + echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) - case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in - big) echo mips-unknown-linux-gnu && exit 0 ;; - little) echo mipsel-unknown-linux-gnu && exit 0 ;; - esac + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu @@ -806,6 +888,9 @@ EOF s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; @@ -819,7 +904,8 @@ EOF # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. - ld_supported_targets=`cd /; ld --help 2>&1 \ + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// @@ -831,7 +917,7 @@ EOF ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; @@ -843,32 +929,28 @@ EOF esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build - cat >$dummy.c < -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-pc-linux-gnu\n", argv[1]); -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-pc-linux-gnuaout\n", argv[1]); -#endif - return 0; -} + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) @@ -885,6 +967,23 @@ EOF # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -906,22 +1005,19 @@ EOF UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -945,9 +1041,15 @@ EOF # "miniframe" echo m68010-convergent-sysv exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -964,9 +1066,6 @@ EOF mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; @@ -1038,6 +1137,9 @@ EOF SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; @@ -1045,18 +1147,24 @@ EOF echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) - echo `uname -p`-apple-darwin${UNAME_RELEASE} + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo `uname -p`-${UNAME_MACHINE}-nto-qnx + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; - NSR-[KW]:NONSTOP_KERNEL:*:*) + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) @@ -1079,11 +1187,6 @@ EOF fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; @@ -1102,11 +1205,8 @@ EOF *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; esac @@ -1228,8 +1328,7 @@ main () } EOF -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 -rm -f $dummy.c $dummy +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. diff --git a/autoconf/config.sub b/autoconf/config.sub index 791bcde..c8a01be 100644 --- a/autoconf/config.sub +++ b/autoconf/config.sub @@ -1,9 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2001-10-05' +timestamp='2003-07-04' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -118,7 +118,7 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) + nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -227,32 +227,44 @@ case $basic_machine in 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ - | d10v | d30v | dsp16xx \ - | fr30 \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ + | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ - | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el | mips64vr4300 \ - | mips64vr4300el | mips64vr5000 | mips64vr5000el \ - | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ - | mipsisa32 \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | msp430 \ | ns16k | ns32k \ - | openrisc \ + | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | s390 | s390x \ - | sh | sh[34] | sh[34]eb | shbe | shle \ - | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ - | stormy16 | strongarm \ - | tahoe | thumb | tic80 | tron \ - | v850 \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ | we32k \ - | x86 | xscale \ + | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; @@ -279,39 +291,55 @@ case $basic_machine in 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alphapca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armv*-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c54x-* \ - | clipper-* | cray2-* | cydra-* \ - | d10v-* | d30v-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | fx80-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ | m32r-* \ - | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ - | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ - | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ - | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | msp430-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | s390-* | s390x-* \ - | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \ - | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ - | v850-* | vax-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ | ymp-* \ | z8k-*) ;; @@ -345,6 +373,9 @@ case $basic_machine in basic_machine=a29k-none os=-bsd ;; + amd64) + basic_machine=x86_64-pc + ;; amdahl) basic_machine=580-amdahl os=-sysv @@ -376,6 +407,10 @@ case $basic_machine in basic_machine=ns32k-sequent os=-dynix ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -396,16 +431,8 @@ case $basic_machine in basic_machine=c38-convex os=-bsd ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [cjt]90) - basic_machine=${basic_machine}-cray + cray | j90) + basic_machine=j90-cray os=-unicos ;; crds | unos) @@ -420,6 +447,14 @@ case $basic_machine in decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola @@ -600,14 +635,6 @@ case $basic_machine in basic_machine=m68k-atari os=-mint ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; @@ -622,6 +649,10 @@ case $basic_machine in basic_machine=m68k-rom68k os=-coff ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; msdos) basic_machine=i386-pc os=-msdos @@ -694,6 +725,10 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -701,6 +736,10 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose @@ -723,49 +762,55 @@ case $basic_machine in pbb) basic_machine=m68k-tti ;; - pc532 | pc532-*) + pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; - pentiumpro | p6 | 6x86 | athlon) + pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; - pentiumii | pentium2) + pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; + pentium4) + basic_machine=i786-pc + ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumii-* | pentium2-*) + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown - ;; + ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown - ;; + ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown - ;; + ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown - ;; + ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; @@ -786,10 +831,26 @@ case $basic_machine in rtpc | rtpc-*) basic_machine=romp-ibm ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; sa29200) basic_machine=a29k-amd os=-udi ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; sequent) basic_machine=i386-sequent ;; @@ -797,6 +858,9 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sh64) + basic_machine=sh64-unknown + ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks @@ -864,19 +928,35 @@ case $basic_machine in os=-dynix ;; t3e) - basic_machine=t3e-cray + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; tower | tower-32) basic_machine=m68k-ncr ;; @@ -901,8 +981,8 @@ case $basic_machine in os=-vms ;; vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -923,17 +1003,13 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; - windows32) - basic_machine=i386-pc - os=-windows32-msvcrt + xps | xps100) + basic_machine=xps100-honeywell ;; - xmp) - basic_machine=xmp-cray + ymp) + basic_machine=ymp-cray os=-unicos ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim @@ -954,13 +1030,6 @@ case $basic_machine in op60c) basic_machine=hppa1.1-oki ;; - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; romp) basic_machine=romp-ibm ;; @@ -980,13 +1049,16 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh3eb | sh4eb) + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; + sh64) + basic_machine=sh64-unknown + ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; - cydra) + cydra) basic_machine=cydra-cydrome ;; orion) @@ -1001,10 +1073,6 @@ case $basic_machine in pmac | pmac-mpw) basic_machine=powerpc-apple ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; @@ -1060,17 +1128,19 @@ case $os in | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos*) + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1082,8 +1152,10 @@ case $os in ;; esac ;; + -nto-qnx*) + ;; -nto*) - os=-nto-qnx + os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ @@ -1122,14 +1194,20 @@ case $os in -acis*) os=-aos ;; + -atheos*) + os=-atheos + ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; + -nova*) + os=-rtmk-nova + ;; -ns2 ) - os=-nextstep2 + os=-nextstep2 ;; -nsk*) os=-nsk @@ -1168,8 +1246,14 @@ case $os in -xenix) os=-xenix ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos ;; -none) ;; @@ -1202,10 +1286,14 @@ case $basic_machine in arm*-semi) os=-aout ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; - pdp11-*) + pdp11-*) os=-none ;; *-dec | vax-*) @@ -1232,6 +1320,9 @@ case $basic_machine in mips*-*) os=-elf ;; + or32-*) + os=-coff + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; @@ -1295,19 +1386,19 @@ case $basic_machine in *-next) os=-nextstep3 ;; - *-gould) + *-gould) os=-sysv ;; - *-highlevel) + *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; - *-sgi) + *-sgi) os=-irix ;; - *-siemens) + *-siemens) os=-sysv4 ;; *-masscomp) @@ -1379,7 +1470,7 @@ case $basic_machine in -ptx*) vendor=sequent ;; - -vxsim* | -vxworks*) + -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) diff --git a/autoconf/ltmain.sh b/autoconf/ltmain.sh new file mode 100644 index 0000000..02f0937 --- /dev/null +++ b/autoconf/ltmain.sh @@ -0,0 +1,6321 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 +# Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# 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. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" + +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +win32_libid () { + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | \ + sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` + if test "X$win32_nmres" = "Ximport" ; then + win32_libid_type="x86 archive import" + else + win32_libid_type="x86 archive static" + fi + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $echo $win32_libid_type +} + +# End of Shell function definitions +##################################### + +# Parse our command line options once, thoroughly. +while test "$#" -gt 0 +do + arg="$1" + shift + + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + execute_dlfiles) + execute_dlfiles="$execute_dlfiles $arg" + ;; + tag) + tagname="$arg" + + # Check whether tagname contains only valid characters + case $tagname in + *[!-_A-Za-z0-9,/]*) + $echo "$progname: invalid tag name: $tagname" 1>&2 + exit 1 + ;; + esac + + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; + + --version) + $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" + $echo + $echo "Copyright (C) 2003 Free Software Foundation, Inc." + $echo "This is free software; see the source for copying conditions. There is NO" + $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + exit 0 + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 + # Now print the configurations for the tags. + for tagname in $taglist; do + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0" + done + exit 0 + ;; + + --debug) + $echo "$progname: enabling shell trace mode" + set -x + ;; + + --dry-run | -n) + run=: + ;; + + --features) + $echo "host: $host" + if test "$build_libtool_libs" = yes; then + $echo "enable shared libraries" + else + $echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + $echo "enable static libraries" + else + $echo "disable static libraries" + fi + exit 0 + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --preserve-dup-deps) duplicate_deps="yes" ;; + + --quiet | --silent) + show=: + ;; + + --tag) prevopt="--tag" prev=tag ;; + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 +fi + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_output= + arg_mode=normal + libobj= + + for arg + do + case "$arg_mode" in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit 1 + fi + arg_mode=target + continue + ;; + + -static) + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + base_compile="$base_compile $lastarg" + continue + ;; + + * ) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" + done # for arg + + case $arg_mode in + arg) + $echo "$modename: you must specify an argument for -Xcompile" + exit 1 + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit 1 + ;; + *) + # Get the name of the library object. + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.f90) xform=f90 ;; + *.for) xform=for ;; + *.java) xform=java ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case $libobj in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit 1 + ;; + esac + + # Infer tagged configuration to use if any are available and + # if one wasn't chosen via the "--tag" command line option. + # Only attempt this if the compiler in the base compile + # command doesn't match the default compiler. + if test -n "$available_tags" && test -z "$tagname"; then + case $base_compile in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" + case "$base_compile " in + "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit 1 +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi + + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + $run $rm $removelist + trap "$run $rm $removelist; exit 1" 1 2 15 + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit 1" 1 2 15 + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $run ln "$0" "$lockfile" 2>/dev/null; do + $show "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $echo "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit 1 + fi + $echo $srcfile > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit 1 + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit 1 + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + else + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + fi + build_libtool_libs=no + build_old_libs=yes + prefer_static_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + base_compile="$base_compile $arg" + shift + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit 1 + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat $save_arg` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit 1 + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit 1 + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit 1 + fi + arg=$save_arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit 1 + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit 1 + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + exit 1 + fi + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-pw32* | *-*-beos*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-mingw* | *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs -framework System" + continue + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # gcc -m* arguments should be passed to the linker via $compiler_flags + # in order to pass architecture information to the linker + # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo + # but this is not reliable with gcc because gcc may use -mfoo to + # select a different linker, different libraries, etc, while + # -Wl,-mfoo simply passes -mfoo to the linker. + -m*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + if test "$with_gcc" = "yes" ; then + compiler_flags="$compiler_flags $arg" + fi + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + # The PATH hackery in wrapper scripts is required on Windows + # in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit 1 + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -static) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit 1 + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit 1 + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Infer tagged configuration to use if any are available and + # if one wasn't chosen via the "--tag" command line option. + # Only attempt this if the compiler in the base link + # command doesn't match the default compiler. + if test -n "$available_tags" && test -z "$tagname"; then + case $base_compile in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" + case $base_compile in + "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) + # The compiler in $compile_command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit 1 +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + status=$? + if test "$status" -ne 0 && test ! -d "$output_objdir"; then + exit $status + fi + fi + + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplcations in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + esac + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if test "X$duplicate_deps" = "Xyes" ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit 1 + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + for pass in $passes; do + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + for deplib in $libs; do + lib= + found=no + case $deplib in + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + continue + fi + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + for search_ext in .la $shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + if test "$deplibs_check_method" != pass_all; then + $echo + $echo "*** Warning: Trying to link with static lib archive $deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because the file extensions .$libext of this argument makes me believe" + $echo "*** that it is just a static archive that I should not used here." + else + $echo + $echo "*** Warning: Linking the shared library $output against the" + $echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + if test "$found" = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib'" 1>&2 + exit 1 + fi + + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit 1 + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + + # Read the .la file + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit 1 + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit 1 + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit 1 + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit 1 + fi + if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi # $installed = yes + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit 1 + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var"; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $dir" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + if test -n "$library_names" && + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library + + # Warn about portability, can't link against -module's on some systems (darwin) + if test "$shouldnotlink" = yes && test "$pass" = link ; then + $echo + if test "$linkmode" = prog; then + $echo "*** Warning: Linking the executable $output against the loadable module" + else + $echo "*** Warning: Linking the shared library $output against the loadable module" + fi + $echo "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + realname="$2" + shift; shift + libname=`eval \\$echo \"$libname_spec\"` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`$echo $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + eval cmds=\"$extract_expsyms_cmds\" + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + eval cmds=\"$old_archive_from_expsyms_cmds\" + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5* ) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a module then we can not link against it, someone + # is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then + $echo "** Warning, lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $echo + $echo "** And there doesn't seem to be a static archive available" + $echo "** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case "$libdir" in + [\\/]*) + add_dir="-L$inst_prefix_dir$libdir $add_dir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit 1 + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && \ + test "$hardcode_minus_L" != yes && \ + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case "$libdir" in + [\\/]*) + add_dir="-L$inst_prefix_dir$libdir $add_dir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $echo + $echo "*** Warning: This system can not link to static lib archive $lib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $echo "*** But as you try to build a module library, libtool will still create " + $echo "*** a static module, that should work as long as the dlopening application" + $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + convenience="$convenience $dir/$old_library" + old_convenience="$old_convenience $dir/$old_library" + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit 1 + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, but need to link against shared + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$path/$depdepl" ; then + depdepl="$path/$depdepl" + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + path="" + fi + ;; + *) + path="-L$path" + ;; + esac + + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$deplibs $depdepl" ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$deplibs $path" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval shared_ext=\"$shrext\" + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval shared_ext=\"$shrext\" + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit 1 + else + $echo + $echo "*** Warning: Linking the shared library $output against the non-libtool" + $echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$2" + number_minor="$3" + number_revision="$4" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor - 1` + age="$number_minor" + revision="$number_minor" + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; + *) + $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + case $revision in + 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; + *) + $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + case $age in + 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; + *) + $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + irix | nonstopux) + major=`expr $current - $age + 1` + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=.`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + major=`expr $current - $age` + versuffix="-$major" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$echo "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + removelist="$removelist $p" + ;; + *) ;; + esac + done + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + for path in $notinst_path; do + lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` + deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` + dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` + done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $rm conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null \ + | grep " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for file magic test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a file magic. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name="`expr $a_deplib : '-l\(.*\)'`" + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval \\$echo \"$libname_spec\"` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval $echo \"$potent_lib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a regex pattern. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` + done + fi + if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ + | grep . >/dev/null; then + $echo + if test "X$deplibs_check_method" = "Xnone"; then + $echo "*** Warning: inter-library dependencies are not supported in this platform." + else + $echo "*** Warning: inter-library dependencies are not known to be supported." + fi + $echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $echo + $echo "*** Warning: libtool could not satisfy all declared inter-library" + $echo "*** dependencies of module $libname. Therefore, libtool will create" + $echo "*** a static module, that should work as long as the dlopening" + $echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $echo "*** The inter-library dependencies that have been dropped here will be" + $echo "*** automatically added whenever a program is linked with this library" + $echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $echo + $echo "*** Since this library must not contain undefined symbols," + $echo "*** because either the platform does not support them or" + $echo "*** it was explicitly requested with -no-undefined," + $echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + eval cmds=\"$export_symbols_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "using reloadable object file for export list..." + skipped_export=: + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex"; then + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + status=$? + if test "$status" -ne 0 && test ! -d "$gentop"; then + exit $status + fi + generated="$generated $gentop" + + for xlib in $convenience; do + # Extract the objects. + case $xlib in + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; + *) xabs=`pwd`"/$xlib" ;; + esac + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` + xdir="$gentop/$xlib" + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "$mkdir $xdir" + $run $mkdir "$xdir" + status=$? + if test "$status" -ne 0 && test ! -d "$xdir"; then + exit $status + fi + # We will extract separately just the conflicting names and we will no + # longer touch any unique names. It is faster to leave these extract + # automatically by $AR in one run. + $show "(cd $xdir && $AR x $xabs)" + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 + $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 + $AR t "$xabs" | sort | uniq -cd | while read -r count name + do + i=1 + while test "$i" -le "$count" + do + # Put our $i before any first dot (extension) + # Never overwrite any file + name_to="$name" + while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" + do + name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` + done + $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" + $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? + i=`expr $i + 1` + done + done + fi + + libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval cmds=\"$module_expsym_cmds\" + else + eval cmds=\"$module_cmds\" + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval cmds=\"$archive_expsym_cmds\" + else + eval cmds=\"$archive_cmds\" + fi + fi + + if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + delfiles= + last_robj= + k=1 + output=$output_objdir/$save_output-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*"` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$objlist $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" + fi + last_robj=$output_objdir/$save_output-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$save_output-${k}.$objext + objlist=$obj + len=1 + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + + if ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadale object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" + done + + $echo "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval cmds=\"$archive_expsym_cmds\" + else + eval cmds=\"$archive_cmds\" + fi + + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + exit 0 + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit 1 + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${obj}x" + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + status=$? + if test "$status" -ne 0 && test ! -d "$gentop"; then + exit $status + fi + generated="$generated $gentop" + + for xlib in $convenience; do + # Extract the objects. + case $xlib in + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; + *) xabs=`pwd`"/$xlib" ;; + esac + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` + xdir="$gentop/$xlib" + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "$mkdir $xdir" + $run $mkdir "$xdir" + status=$? + if test "$status" -ne 0 && test ! -d "$xdir"; then + exit $status + fi + # We will extract separately just the conflicting names and we will no + # longer touch any unique names. It is faster to leave these extract + # automatically by $AR in one run. + $show "(cd $xdir && $AR x $xabs)" + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 + $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 + $AR t "$xabs" | sort | uniq -cd | while read -r count name + do + i=1 + while test "$i" -le "$count" + do + # Put our $i before any first dot (extension) + # Never overwrite any file + name_to="$name" + while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" + do + name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` + done + $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" + $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? + i=`expr $i + 1` + done + done + fi + + reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + eval cmds=\"$reload_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit 0 + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $run eval "echo timestamp > $libobj" || exit $? + exit 0 + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + eval cmds=\"$reload_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit 0 + ;; + + prog) + case $host in + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + esac + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$output.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + else + $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' + $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` + $run eval '$echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $mv "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if grep -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + grep -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' + else + $echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{\ +" + + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit 1 + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit 0 + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi + + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $0 --fallback-echo"; then + case $0 in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; + *) qecho="$SHELL `pwd`/$0 --fallback-echo";; + esac + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + cwrappersource=`$echo ${objdir}/lt-${output}.c` + cwrapper=`$echo ${output}.exe` + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15 + + cat > $cwrappersource <> $cwrappersource<<"EOF" +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef DIR_SEPARATOR +#define DIR_SEPARATOR '/' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +#define HAVE_DOS_BASED_FILE_SYSTEM +#ifndef DIR_SEPARATOR_2 +#define DIR_SEPARATOR_2 '\\' +#endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +const char *program_name = NULL; + +void * xmalloc (size_t num); +char * xstrdup (const char *string); +char * basename (const char *name); +char * fnqualify(const char *path); +char * strendzap(char *str, const char *pat); +void lt_fatal (const char *message, ...); + +int +main (int argc, char *argv[]) +{ + char **newargz; + int i; + + program_name = (char *) xstrdup ((char *) basename (argv[0])); + newargz = XMALLOC(char *, argc+2); +EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = fnqualify(argv[0]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; +EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" +} + +void * +xmalloc (size_t num) +{ + void * p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL +; +} + +char * +basename (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha (name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return (char *) base; +} + +char * +fnqualify(const char *path) +{ + size_t size; + char *p; + char tmp[LT_PATHMAX + 1]; + + assert(path != NULL); + + /* Is it qualified already? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha (path[0]) && path[1] == ':') + return xstrdup (path); +#endif + if (IS_DIR_SEPARATOR (path[0])) + return xstrdup (path); + + /* prepend the current directory */ + /* doesn't handle '~' */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ + p = XMALLOC(char, size); + sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); + return p; +} + +char * +strendzap(char *str, const char *pat) +{ + size_t len, patlen; + + assert(str != NULL); + assert(pat != NULL); + + len = strlen(str); + patlen = strlen(pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp(str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char * mode, + const char * message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} +EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit 1" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variable: + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $echo >> $output "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" + + $echo >> $output "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $echo \"\$relink_command_output\" >&2 + $rm \"\$progdir/\$file\" + exit 1 + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + $echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $echo >> $output "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \$progdir\\\\\$program \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + exec \$progdir/\$program \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + exit 1 + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + $echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" + chmod +x $output + fi + exit 0 + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + status=$? + if test "$status" -ne 0 && test ! -d "$gentop"; then + exit $status + fi + generated="$generated $gentop" + + # Add in members from convenience archives. + for xlib in $addlibs; do + # Extract the objects. + case $xlib in + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; + *) xabs=`pwd`"/$xlib" ;; + esac + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` + xdir="$gentop/$xlib" + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "$mkdir $xdir" + $run $mkdir "$xdir" + status=$? + if test "$status" -ne 0 && test ! -d "$xdir"; then + exit $status + fi + # We will extract separately just the conflicting names and we will no + # longer touch any unique names. It is faster to leave these extract + # automatically by $AR in one run. + $show "(cd $xdir && $AR x $xabs)" + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 + $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 + $AR t "$xabs" | sort | uniq -cd | while read -r count name + do + i=1 + while test "$i" -le "$count" + do + # Put our $i before any first dot (extension) + # Never overwrite any file + name_to="$name" + while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" + do + name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` + done + $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" + $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? + i=`expr $i + 1` + done + done + fi + + oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` + done + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + eval cmds=\"$old_archive_from_new_cmds\" + else + eval cmds=\"$old_archive_cmds\" + + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # the command line is too long to link in one step, link in parts + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + # GNU ar 2.10+ was changed to match POSIX; thus no paths are + # encoded into archives. This makes 'ar r' malfunction in + # this piecewise linking case whenever conflicting object + # names appear in distinct ar calls; check, warn and compensate. + if (for obj in $save_oldobjs + do + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 + $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 + AR_FLAGS=cq + fi + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*"` && + test "$len" -le "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~$old_archive_cmds\" + fi + fi + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + # Only create the output if not a dry run. + if test -z "$run"; then + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit 1 + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit 1 + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit 1 + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $rm $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $echo >> $output "\ +relink_command=\"$relink_command\"" + fi + done + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + ;; + esac + exit 0 + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg="$nonopt" + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest="$arg" + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) prev="-f" ;; + -g) prev="-g" ;; + -m) prev="-m" ;; + -o) prev="-o" ;; + -s) + stripme=" -s" + continue + ;; + -*) ;; + + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest="$arg" + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit 1 + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit 1 + fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + exit 1 + fi + fi + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run eval "$striplib $destdir/$realname" || exit $? + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + eval cmds=\"$postinstall_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit 0 + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # To insure that "foo" is sourced, and not "foo.exe", + # finese the cygwin/MSYS system by explicitly sourcing "foo." + # which disallows the automatic-append-.exe behavior. + case $build in + *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; + *) wrapperdot=${wrapper} ;; + esac + # If there is no directory component, then add one. + case $file in + */* | *\\*) . ${wrapperdot} ;; + *) . ./${wrapperdot} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit 1 + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # To insure that "foo" is sourced, and not "foo.exe", + # finese the cygwin/MSYS system by explicitly sourcing "foo." + # which disallows the automatic-append-.exe behavior. + case $build in + *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; + *) wrapperdot=${wrapper} ;; + esac + # If there is no directory component, then add one. + case $file in + */* | *\\*) . ${wrapperdot} ;; + *) . ./${wrapperdot} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir="/tmp" + test -n "$TMPDIR" && tmpdir="$TMPDIR" + tmpdir="$tmpdir/libtool-$$" + if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : + else + $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 + continue + fi + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyways + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + ;; + esac + ;; + esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + if test -n "$stripme" && test -n "$striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + eval cmds=\"$old_postinstall_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $0 --finish$current_libdirs' + else + exit 0 + fi + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + eval cmds=\"$finish_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit 0 + + $echo "----------------------------------------------------------------------" + $echo "Libraries have been installed in:" + for libdir in $libdirs; do + $echo " $libdir" + done + $echo + $echo "If you ever happen to want to link against installed libraries" + $echo "in a given directory, LIBDIR, you must either use libtool, and" + $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + $echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + $echo " during execution" + fi + if test -n "$runpath_var"; then + $echo " - add LIBDIR to the \`$runpath_var' environment variable" + $echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $echo " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $echo " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $echo + $echo "See any operating system documentation about shared libraries for" + $echo "more information, such as the ld(1) and ld.so(8) manual pages." + $echo "----------------------------------------------------------------------" + exit 0 + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit 1 + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit 1 + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + if test "${save_LC_ALL+set}" = set; then + LC_ALL="$save_LC_ALL"; export LC_ALL + fi + if test "${save_LANG+set}" = set; then + LANG="$save_LANG"; export LANG + fi + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi + $echo "$cmd$args" + exit 0 + fi + ;; + + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + rm="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) rm="$rm $arg"; rmforce=yes ;; + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if (test -L "$file") >/dev/null 2>&1 \ + || (test -h "$file") >/dev/null 2>&1 \ + || test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + + if test "$mode" = uninstall; then + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + eval cmds=\"$postuninstall_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + eval cmds=\"$old_postuninstall_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. + fi + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" \ + && test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit 1 +fi + +# We need to display help for each of the modes. +case $mode in +"") $echo \ +"Usage: $modename [OPTION]... [MODE-ARG]... + +Provide generalized library-building support services. + + --config show all configuration variables + --debug enable verbose shell tracing +-n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + --version print version information + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE. + +Report bugs to ." + exit 0 + ;; + +clean) + $echo \ +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + +compile) + $echo \ +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + +execute) + $echo \ +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + +finish) + $echo \ +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + +install) + $echo \ +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -static do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + +uninstall) + $echo \ +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit 0 + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/autoconf/mkinstalldirs b/autoconf/mkinstalldirs index 31e7c00..a1d0521 100644 --- a/autoconf/mkinstalldirs +++ b/autoconf/mkinstalldirs @@ -4,9 +4,55 @@ # Created: 1993-05-16 # Public domain -# $Id: mkinstalldirs,v 1.2 2002/08/26 13:51:12 jmaynard Exp $ +# $Id: mkinstalldirs,v 1.24 2003/08/24 23:03:45 fish Exp $ errstatus=0 +dirmode="" + +usage="\ +Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." + +# process command line arguments +while test $# -gt 0 ; do + case "${1}" in + -h | --help | --h* ) # -h for help + echo "${usage}" 1>&2; exit 0 ;; + -m ) # -m PERM arg + shift + test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } + dirmode="${1}" + shift ;; + -- ) shift; break ;; # stop option processing + -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option + * ) break ;; # first non-opt arg + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in +0) exit 0 ;; +esac + +case $dirmode in +'') + if mkdir -p -- . 2>/dev/null; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + fi ;; +*) + if mkdir -m "$dirmode" -p -- . 2>/dev/null; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + fi ;; +esac for file do @@ -22,13 +68,24 @@ do esac if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" - mkdir "$pathcomp" || lasterr=$? + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi fi pathcomp="$pathcomp/" @@ -37,4 +94,8 @@ done exit $errstatus +# Local Variables: +# mode: shell-script +# sh-indentation: 3 +# End: # mkinstalldirs ends here diff --git a/bootstrap.c b/bootstrap.c new file mode 100644 index 0000000..816b8ac --- /dev/null +++ b/bootstrap.c @@ -0,0 +1,15 @@ +#include "hercules.h" + +/* Hercules boostrap dummy code */ +#if defined(HDL_USE_LIBTOOL) +#include "ltdl.h" +#endif + +extern int impl(int ac,char **av); +int main(int ac,char *av[]) +{ +#if defined(HDL_USE_LIBTOOL) + LTDL_SET_PRELOADED_SYMBOLS(); +#endif + exit(impl(ac,av)); +} diff --git a/cache.c b/cache.c new file mode 100644 index 0000000..1345f99 --- /dev/null +++ b/cache.c @@ -0,0 +1,555 @@ +/* CACHE.C (c)Copyright Greg Smith, 2002-2003 */ +/* Dynamic cache manager for multi-threaded applications */ + +//FIXME ?? Dynamic resizing is disabled + +#define _HERCULES_CACHE_C +#include "hercules.h" + +static CACHEBLK cacheblk[CACHE_MAX_INDEX]; + +/*-------------------------------------------------------------------*/ +/* Public functions */ +/*-------------------------------------------------------------------*/ +int cache_nbr (int ix) +{ + if (cache_check_ix(ix)) return -1; + return cacheblk[ix].nbr; +} + +int cache_busy (int ix) +{ + if (cache_check_ix(ix)) return -1; + return cacheblk[ix].busy; +} + +int cache_empty (int ix) +{ + if (cache_check_ix(ix)) return -1; + return cacheblk[ix].empty; +} + +int cache_waiters (int ix) +{ + if (cache_check_ix(ix)) return -1; + return cacheblk[ix].waiters; +} + +long long cache_size (int ix) +{ + if (cache_check_ix(ix)) return -1; + return cacheblk[ix].size; +} + +long long cache_hits (int ix) +{ + if (cache_check_ix(ix)) return -1; + return cacheblk[ix].hits; +} + +long long cache_misses (int ix) +{ + if (cache_check_ix(ix)) return -1; + return cacheblk[ix].misses; +} + +int cache_busy_percent (int ix) +{ + if (cache_check_ix(ix)) return -1; + return (cacheblk[ix].busy * 100) / cacheblk[ix].nbr; +} + +int cache_empty_percent (int ix) +{ + if (cache_check_ix(ix)) return -1; + return (cacheblk[ix].empty * 100) / cacheblk[ix].nbr; +} + +int cache_hit_percent (int ix) +{ + long long total; + if (cache_check_ix(ix)) return -1; + total = cacheblk[ix].hits + cacheblk[ix].misses; + if (total == 0) return -1; + return (cacheblk[ix].hits * 100) / total; +} + +int cache_lookup (int ix, U64 key, int *o) +{ + int i,p; + if (o) *o = -1; + if (cache_check_ix(ix)) return -1; + /* `p' is the preferred index */ + p = key % cacheblk[ix].nbr; + if (cacheblk[ix].cache[p].key == key) { + i = p; + cacheblk[ix].fasthits++; + } + else { + if (cache_isbusy(ix, p) || cacheblk[ix].age - cacheblk[ix].cache[p].age < 20) + p = -2; + for (i = 0; i < cacheblk[ix].nbr; i++) { + if (cacheblk[ix].cache[i].key == key) break; + if (o && !cache_isbusy(ix, i) + && (*o < 0 || i == p || cacheblk[ix].cache[i].age < cacheblk[ix].cache[*o].age)) + if (*o != p) *o = i; + } + } + if (i >= cacheblk[ix].nbr) { + i = -1; + cacheblk[ix].misses++; + } + else + cacheblk[ix].hits++; + + if (i < 0 && o && *o < 0) cache_adjust(ix,1); + else cache_adjust(ix, 0); + return i; +} + +int cache_scan (int ix, CACHE_SCAN_RTN rtn, void *data) +{ +int i; /* Cache index */ +int rc; /* Return code */ +int answer = -1; /* Answer from routine */ + + if (cache_check_ix(ix)) return -1; + for (i = 0; i < cacheblk[ix].nbr; i++) { + rc = (rtn)(&answer, ix, i, data); + if (rc != 0) break; + } + return answer; +} + +int cache_lock(int ix) +{ + if (cache_check_cache(ix)) return -1; + obtain_lock(&cacheblk[ix].lock); + return 0; +} + +int cache_unlock(int ix) +{ + if (cache_check_ix(ix)) return -1; + release_lock(&cacheblk[ix].lock); + if (cacheblk[ix].empty == cacheblk[ix].nbr) + cache_destroy(ix); + return 0; +} + +int cache_wait(int ix) +{ + struct timeval now; + struct timespec tm; + + if (cache_check_ix(ix)) return -1; + if (cacheblk[ix].busy < cacheblk[ix].nbr) + return 0; + if (cache_adjust(ix, 1)) + return 0; + gettimeofday (&now, NULL); + tm.tv_sec = now.tv_sec; + tm.tv_nsec = (now.tv_usec + CACHE_WAITTIME) * 1000; + tm.tv_sec += tm.tv_nsec / 1000000000; + tm.tv_nsec = tm.tv_nsec % 1000000000; + cacheblk[ix].waiters++; cacheblk[ix].waits++; +#if 0 + timed_wait_condition(&cacheblk[ix].waitcond, &cacheblk[ix].lock, &tm); +#else + wait_condition(&cacheblk[ix].waitcond, &cacheblk[ix].lock); +#endif + cacheblk[ix].waiters--; + return 0; +} + +U64 cache_getkey(int ix, int i) +{ + if (cache_check(ix,i)) return (U64)-1; + return cacheblk[ix].cache[i].key; +} + +U64 cache_setkey(int ix, int i, U64 key) +{ + U64 oldkey; + int empty; + + if (cache_check(ix,i)) return (U64)-1; + empty = cache_isempty(ix, i); + oldkey = cacheblk[ix].cache[i].key; + cacheblk[ix].cache[i].key = key; + if (empty && !cache_isempty(ix, i)) + cacheblk[ix].empty--; + else if (!empty && cache_isempty(ix, i)) + cacheblk[ix].empty++; + return oldkey; +} + +U32 cache_getflag(int ix, int i) +{ + if (cache_check(ix,i)) return (U32)-1; + return cacheblk[ix].cache[i].flag; +} + +U32 cache_setflag(int ix, int i, U32 andbits, U32 orbits) +{ + U32 oldflags; + int empty; + int busy; + + if (cache_check(ix,i)) return (U32)-1; + + empty = cache_isempty(ix, i); + busy = cache_isbusy(ix, i); + oldflags = cacheblk[ix].cache[i].flag; + + cacheblk[ix].cache[i].flag &= andbits; + cacheblk[ix].cache[i].flag |= orbits; + + if (!cache_isbusy(ix, i) && cacheblk[ix].waiters > 0) + signal_condition(&cacheblk[ix].waitcond); + if (busy && !cache_isbusy(ix, i)) + cacheblk[ix].busy--; + else if (!busy && cache_isbusy(ix, i)) + cacheblk[ix].busy++; + if (empty && !cache_isempty(ix, i)) + cacheblk[ix].empty--; + else if (!empty && cache_isempty(ix, i)) + cacheblk[ix].empty++; + return oldflags; +} + +U64 cache_getage(int ix, int i) +{ + if (cache_check(ix,i)) return (U64)-1; + return cacheblk[ix].cache[i].age; +} + +U64 cache_setage(int ix, int i) +{ + U64 oldage; + int empty; + + if (cache_check(ix,i)) return (U64)-1; + empty = cache_isempty(ix, i); + oldage = cacheblk[ix].cache[i].age; + cacheblk[ix].cache[i].age = ++cacheblk[ix].age; + if (empty) cacheblk[ix].empty--; + return oldage; +} + +void *cache_getbuf(int ix, int i, int len) +{ + if (cache_check(ix,i)) return NULL; + if (len > 0 + && cacheblk[ix].cache[i].buf != NULL + && cacheblk[ix].cache[i].len < len) { + cacheblk[ix].size -= cacheblk[ix].cache[i].len; + free (cacheblk[ix].cache[i].buf); + cacheblk[ix].cache[i].buf = NULL; + cacheblk[ix].cache[i].len = 0; + } + if (cacheblk[ix].cache[i].buf == NULL && len > 0) + cache_allocbuf (ix, i, len); + return cacheblk[ix].cache[i].buf; +} + +void *cache_setbuf(int ix, int i, void *buf, int len) +{ + void *oldbuf; + if (cache_check(ix,i)) return NULL; + oldbuf = cacheblk[ix].cache[i].buf; + cacheblk[ix].size -= cacheblk[ix].cache[i].len; + cacheblk[ix].cache[i].buf = buf; + cacheblk[ix].cache[i].len = len; + cacheblk[ix].size += len; + return oldbuf; +} + +int cache_getlen(int ix, int i) +{ + if (cache_check(ix,i)) return -1; + return cacheblk[ix].cache[i].len; +} + +int cache_getval(int ix, int i) +{ + if (cache_check(ix,i)) return -1; + return cacheblk[ix].cache[i].value; +} + +int cache_setval(int ix, int i, int val) +{ + int rc; + if (cache_check(ix,i)) return -1; + rc = cacheblk[ix].cache[i].value; + cacheblk[ix].cache[i].value = val; + return rc; +} + +int cache_release(int ix, int i, int flag) +{ + void *buf; + int len; + int empty; + int busy; + + if (cache_check(ix,i)) return -1; + + empty = cache_isempty(ix, i); + busy = cache_isbusy(ix, i); + + buf = cacheblk[ix].cache[i].buf; + len = cacheblk[ix].cache[i].len; + + memset (&cacheblk[ix].cache[i], 0, sizeof(CACHE)); + + if ((flag & CACHE_FREEBUF) && buf != NULL) { + free (buf); + cacheblk[ix].size -= len; + buf = NULL; + len = 0; + } + + cacheblk[ix].cache[i].buf = buf; + cacheblk[ix].cache[i].len = len; + + if (cacheblk[ix].waiters > 0) + signal_condition(&cacheblk[ix].waitcond); + + if (!empty) cacheblk[ix].empty++; + if (busy) cacheblk[ix].busy--; + + return 0; +} + +int cache_cmd(int argc, char *argv[], char *cmdline) +{ + int ix, i; + + UNREFERENCED(cmdline); + UNREFERENCED(argc); + UNREFERENCED(argv); + + for (ix = 0; ix < CACHE_MAX_INDEX; ix++) { + if (cacheblk[ix].magic != CACHE_MAGIC) { + logmsg ("cache[%d] ....... not created\n", ix); + continue; + } + logmsg ("\n" + "cache............ %10d\n" + "nbr ............. %10d\n" + "busy ............ %10d\n" + "busy%% ........... %10d\n" + "empty ........... %10d\n" + "waiters ......... %10d\n" + "waits ........... %10d\n" + "buf size ........ %10lld\n" + "hits ............ %10lld\n" + "fast hits ....... %10lld\n" + "misses .......... %10lld\n" + "hit%% ............ %10d\n" + "age ............. %10lld\n" + "last adjusted ... %s" + "last wait ....... %s" + "adjustments ..... %10d\n", + ix, cacheblk[ix].nbr, cacheblk[ix].busy, cache_busy_percent(ix), + cacheblk[ix].empty, cacheblk[ix].waiters, cacheblk[ix].waits, + cacheblk[ix].size, cacheblk[ix].hits, cacheblk[ix].fasthits, + cacheblk[ix].misses, cache_hit_percent(ix), cacheblk[ix].age, + ctime(&cacheblk[ix].atime), ctime(&cacheblk[ix].wtime), + cacheblk[ix].adjusts); + if (argc > 1) + for (i = 0; i < cacheblk[ix].nbr; i++) + logmsg ("[%4d] %16.16llx %8.8x %10p %6d %10lld\n", + i, cacheblk[ix].cache[i].key, cacheblk[ix].cache[i].flag, + cacheblk[ix].cache[i].buf, cacheblk[ix].cache[i].len, + cacheblk[ix].cache[i].age); + } + return 0; +} + +/*-------------------------------------------------------------------*/ +/* Private functions */ +/*-------------------------------------------------------------------*/ +static int cache_create (int ix) +{ + cache_destroy (ix); + cacheblk[ix].magic = CACHE_MAGIC; + cacheblk[ix].nbr = CACHE_DEFAULT_NBR; + cacheblk[ix].empty = cacheblk[ix].nbr; + initialize_lock (&cacheblk[ix].lock); + initialize_condition (&cacheblk[ix].waitcond); + cacheblk[ix].cache = calloc (cacheblk[ix].nbr, sizeof(CACHE)); + if (cacheblk[ix].cache == NULL) { + logmsg (_("HHCCHxxxE calloc failed cache[%d] size %d: %s\n"), + ix, cacheblk[ix].nbr * sizeof(CACHE), strerror(errno)); + return -1; + } + return 0; +} + +static int cache_destroy (int ix) +{ + int i; + if (cacheblk[ix].magic == CACHE_MAGIC) { + destroy_lock (&cacheblk[ix].lock); + destroy_condition (&cacheblk[ix].waitcond); + if (cacheblk[ix].cache) { + for (i = 0; i < cacheblk[ix].nbr; i++) + cache_release(ix, i, CACHE_FREEBUF); + free (cacheblk[ix].cache); + } + } + memset(&cacheblk[ix], 0, sizeof(CACHEBLK)); + return 0; +} + +static int cache_check_ix(int ix) +{ + if (ix < 0 || ix >= CACHE_MAX_INDEX) return -1; + return 0; +} + +static int cache_check_cache(int ix) +{ + if (cache_check_ix(ix) + || (cacheblk[ix].magic != CACHE_MAGIC && cache_create(ix))) + return -1; + return 0; +} + +static int cache_check(int ix, int i) +{ + if (cache_check_ix(ix) || i < 0 || i >= cacheblk[ix].nbr) + return -1; + return 0; +} + +static int cache_isbusy(int ix, int i) +{ + return ((cacheblk[ix].cache[i].flag & CACHE_BUSY) != 0); +} + +static int cache_isempty(int ix, int i) +{ + return (cacheblk[ix].cache[i].key == 0 + && cacheblk[ix].cache[i].flag == 0 + && cacheblk[ix].cache[i].age == 0); +} + +static int cache_adjust(int ix, int n) +{ +#if 0 + time_t now; + int busypct, hitpct, nbr, empty, sz; + + now = time(NULL); + busypct = cache_busy_percent(ix); + hitpct = cache_hit_percent(ix); + nbr = cacheblk[ix].nbr; + empty = cache_empty(ix); + sz = cacheblk[ix].size; + + if (n == 0) { + /* Normal adjustments */ + if (now - cacheblk[ix].atime < CACHE_ADJUST_INTERVAL) return 0; + cacheblk[ix].atime = now; + + /* Increase cache if a lot of busy entries */ + if (((nbr <= CACHE_ADJUST_NUMBER || sz < CACHE_ADJUST_SIZE) && busypct >= CACHE_ADJUST_BUSY1) + || busypct > CACHE_ADJUST_BUSY2) + return cache_resize(ix, CACHE_ADJUST_RESIZE); + + /* Decrease cache if too many empty entries */ + if (nbr > CACHE_ADJUST_NUMBER && empty >= CACHE_ADJUST_EMPTY) + return cache_resize(ix, -CACHE_ADJUST_RESIZE); + + /* Increase cache if hit percentage is too low */ + if (hitpct > 0) { + if ((nbr <= CACHE_ADJUST_NUMBER && hitpct < CACHE_ADJUST_HIT1) + || hitpct < CACHE_ADJUST_HIT2) + return cache_resize(ix, CACHE_ADJUST_RESIZE); + } + + /* Decrease cache if hit percentage is ok and not many busy */ + if (hitpct >= CACHE_ADJUST_HIT3 && busypct <= CACHE_ADJUST_BUSY3 + && cacheblk[ix].size >= CACHE_ADJUST_SIZE) + return cache_resize(ix, -CACHE_ADJUST_RESIZE); + } else { + /* All cache entries are busy */ + if (nbr <= CACHE_ADJUST_NUMBER) + return cache_resize(ix, CACHE_ADJUST_RESIZE); + + /* Increase cache if previous wait within this interval */ + if (now - cacheblk[ix].wtime <= CACHE_ADJUST_WAITTIME) { + return cache_resize(ix, CACHE_ADJUST_RESIZE); + } + cacheblk[ix].wtime = now; + } +#else + UNREFERENCED(ix); + UNREFERENCED(n); +#endif + return 0; +} + +static int cache_resize (int ix, int n) +{ + CACHE *cache; + int i; + + if (n == 0) return 0; + else if (n > 0) { + /* Increase cache size */ + cache = realloc (cacheblk[ix].cache, (cacheblk[ix].nbr + n) * sizeof(CACHE)); + if (cache == NULL) { + logmsg (_("HHCCHxxxW realloc increase failed cache[%d] size %d: %s\n"), + ix, (cacheblk[ix].nbr + n) * sizeof(CACHE), strerror(errno)); + return 0; + } + cacheblk[ix].cache = cache; + for (i = cacheblk[ix].nbr; i < cacheblk[ix].nbr +n; i++) + memset(&cacheblk[ix].cache[i], 0, sizeof(CACHE)); + cacheblk[ix].nbr += n; + cacheblk[ix].empty += n; + cacheblk[ix].adjusts++; + } else if (n < 0) { + /* Decrease cache size */ + for (i = cacheblk[ix].nbr - 1; i >= cacheblk[ix].nbr + n; i--) + if (cache_isbusy(ix, i)) break; + else cache_release(ix, i, CACHE_FREEBUF); + n = cacheblk[ix].nbr - i + 1; + if (n == 0) return 0; + cache = realloc (cacheblk[ix].cache, (cacheblk[ix].nbr - n) * sizeof(CACHE)); + if (cache == NULL) { + logmsg (_("HHCCHxxxW realloc decrease failed cache[%d] size %d: %s\n"), + ix, (cacheblk[ix].nbr - n) * sizeof(CACHE), strerror(errno)); + return 0; + } + cacheblk[ix].cache = cache; + cacheblk[ix].nbr -= n; + cacheblk[ix].empty -= n; + cacheblk[ix].adjusts++; + } + return 1; +} + +static void cache_allocbuf(int ix, int i, int len) +{ + cacheblk[ix].cache[i].buf = calloc (len, 1); + if (cacheblk[ix].cache[i].buf == NULL) { + logmsg (_("HHCCHxxxW buf calloc failed cache[%d] size %d: %s\n"), + ix, len, strerror(errno)); + logmsg (_("HHCCHxxxW releasing inactive buffer space\n")); + for (i = 0; i < cacheblk[ix].nbr; i++) + if (!cache_isbusy(ix, i)) cache_release(ix, i, CACHE_FREEBUF); + cacheblk[ix].cache[i].buf = calloc (len, 1); + if (cacheblk[ix].cache[i].buf == NULL) { + logmsg (_("HHCCHxxxE Unable to calloc buf cache[%d] size %d: %s\n"), + ix, len, strerror(errno)); + return; + } + } + cacheblk[ix].cache[i].len = len; + cacheblk[ix].size += len; +} diff --git a/cache.h b/cache.h new file mode 100644 index 0000000..ce92531 --- /dev/null +++ b/cache.h @@ -0,0 +1,360 @@ +/* CACHE.H (c)Copyright Greg Smith, 2002-2003 */ +/* Buffer Cache Manager */ + +/*------------------------------------------------------------------- + Description: + Manages multiple caches in a multi-threaded environment. A cache + is dynamically created and destroyed. It's size or number of + entries is also dynamically determined. A cache entry contains + an identifying `key', `flags' which indicate whether an entry is + busy or not, and a `buf' which is a pointer to the cached object. + + Cache entry: + The structure of a cache entry is: + U64 key; + U32 flag; + int len; + void *buf; + int value; + U64 age; + The first 8 bits of the flag indicates if the entry is `busy' or + not. If any of the first 8 bits are non-zero then the entry is + considered `busy' and will not be stolen or otherwise reused. + + APIs: + + General query functions: + int cache_nbr(int ix); [0] + Number of entries + + int cache_busy(int ix); + Number of busy entries + + int cache_empty(int ix); + Number of empty entries [1] + + int cache_waiters(int ix); + Number of waiters for a non-busy cache entry + + long long cache_size(int ix); + Size of all allocated objects + + long long cache_hits(int ix); + Number of successful lookups + + long long cache_misses(int ix); + Number of unsuccessful lookups + + int cache_busy_percent(int ix); + Percentage (0 .. 100) of entries that are busy + + int cache_empty_percent(int ix); + Percentage of entries that are empty [1] + + int cache_hit_percent(int ix); + Percentage of successful lookups to total lookups + + Notes [0] `ix' identifies the cache. This is an integer + and is reserved in `cache.h' + [1] An empty entry contains a zero key value. + A valid key should not be all zeroes + (0x0000000000000000) or all ones + (0xffffffffffffffff). All ones is used to + indicate an error circumstance. + + Entry specific functions: + U64 cache_getkey(int ix, int i); [0] + Return key for the specified cache entry + + U64 cache_setkey(int ix, int i, U64 key); + Set the key for the specified cache entry; + the old key is returned + + U32 cache_getflag(int ix, int i); + Return the flag for the specified cache entry + + U32 cache_setflag(int ix, int i, U32 andbits, U32 orbits); + Set the flag for the specified cache entry; first + the `andbits' value is `and'ed against the entry then + the `orbits' value is `or'ed against the entry. The + old flag is returned. + + U64 cache_getage(int ix, int i); [1] + Return age for the specified cache entry + + U64 cache_setage(int ix, int i); + Set age for the specified cache entry + + void *cache_getbuf(int ix, int i, int len); + Return address of the object buf for the cache entry. + If `len' is non-zero, then if the current object + is null or `len' is greater than the current object + length then the old object is freed and a new + object is obtained. + + void *cache_setbuf(int ix, int i, void *buf, int len); + The old object address and length is replaced. + The address of the old object is returned and + can be freed using `free()'. + + int cache_getlen(int ix, int i); + Return the length of the current object + + Notes [0] `i' is the index of the entry in cache `ix' + [1] `age' is a sequentially incremented value and + does not correspond to date or time + + Locking functions: + int cache_lock(int ix); + Obtain the lock for cache `ix'. If the cache does + not exist then it will be created. Generally, the + lock should be obtained when referencing cache + entries and must be held when a cache entry status + may change from `busy' to `not busy' or vice versa. + Likewise, the lock must be held when a cache entry + changes from `empty' to `not empty' or vice versa. + + int cache_unlock(int ix); + Release the cache lock + + Search functions: + int cache_lookup(int ix, U64 key, int *o); + Search cache `ix' for entry matching `key'. + If a non-NULL pointer `o' is provided, then the + oldest or preferred cache entry index is returned + that is available to be stolen. + + int cache_scan (int ix, int (rtn)(), void *data); + Scan a cache routine entry by entry calling routine + `rtn'. Parameters passed to the routine are + `(int *answer, int ix, int i, void *data)' where + `ix' is the cache index, `i' is the cache entry + index and `data' is the value passed to cache_scan. + `*answer' is initialized to -1 and can be set by + the scan subroutine. This will be the value returned + by cache_scan. If the routine returns a non-zero + value then the scan is terminated. + + Other functions: + int cache_wait(int ix); + Wait for a non-busy cache entry to become available. + Typically called after `cache_lookup' was + unsuccessful and `*o' is -1. + + int cache_release(int ix, int i, int flag); + Release the cache entry. If flag is CACHE_FREEBUF + then the object buffer is also freed. + + int cache_cmd(int argc, char *argv[], char *cmdline); + Interface with the cache command processor. This + interface is subject to change. + + -------------------------------------------------------------------*/ + +#ifndef _HERCULES_CACHE_H +#define _HERCULES_CACHE_H 1 + +#include "hercules.h" + +/*-------------------------------------------------------------------*/ +/* Reserve cache indexes here */ +/*-------------------------------------------------------------------*/ +#define CACHE_MAX_INDEX 8 /* Max number caches [0..7] */ + +#define CACHE_DEVBUF 0 /* Device Buffer cache */ +#define CACHE_L2 1 /* L2 cache */ +#define CACHE_2 2 /* (available) */ +#define CACHE_3 3 /* (available) */ +#define CACHE_4 4 /* (available) */ +#define CACHE_5 5 /* (available) */ +#define CACHE_6 6 /* (available) */ +#define CACHE_7 7 /* (available) */ + +#ifdef _HERCULES_CACHE_C +/*-------------------------------------------------------------------*/ +/* Cache entry */ +/*-------------------------------------------------------------------*/ +typedef struct _CACHE { /* Cache entry */ + U64 key; /* Key */ + U32 flag; /* Flags */ + int len; /* Buffer length */ + void *buf; /* Buffer address */ + int value; /* Arbitrary value */ + U64 age; /* Age */ + } CACHE; + +/*-------------------------------------------------------------------*/ +/* Cache header */ +/*-------------------------------------------------------------------*/ +typedef struct _CACHEBLK { /* Cache header */ + int magic; /* Magic number */ + int nbr; /* Number entries */ + int busy; /* Number busy entries */ + int empty; /* Number empty entries */ + int waiters; /* Number waiters */ + int waits; /* Number times waited */ + long long size; /* Allocated buffer size */ + long long hits; /* Number lookup hits */ + long long fasthits; /* Number fast lookup hits */ + long long misses; /* Number lookup misses */ + U64 age; /* Age counter */ + LOCK lock; /* Lock */ + COND waitcond; /* Wait for available entry */ + CACHE *cache; /* Cache table address */ + time_t atime; /* Time last adjustment */ + time_t wtime; /* Time last wait */ + int adjusts; /* Number of adjustments */ + } CACHEBLK; +#endif + +/*-------------------------------------------------------------------*/ +/* Flag definitions */ +/*-------------------------------------------------------------------*/ +#define CACHE_BUSY 0xFF000000 /* Busy bits */ +#define CACHE_TYPE 0x000000FF /* Type bits */ + +#define CACHE_FREEBUF 1 /* Free buf on release */ + +#ifdef _HERCULES_CACHE_C +#define CACHE_MAGIC 0x01CACE10 /* Magic number */ +#define CACHE_DEFAULT_NBR 229 /* Initial entries (prime) */ + +#define CACHE_WAITTIME 1000 /* Wait time for entry(usec) */ + +#define CACHE_ADJUST_INTERVAL 15 /* Adjustment interval (sec) */ +#define CACHE_ADJUST_NUMBER 128 /* Uninhibited nbr entries */ +#define CACHE_ADJUST_BUSY1 70 /* Increase when this busy 1 */ +#define CACHE_ADJUST_BUSY2 80 /* Increase when this busy 2 */ +#define CACHE_ADJUST_RESIZE 8 /* Nbr entries adjusted */ +#define CACHE_ADJUST_EMPTY 16 /* Decrease this many empty */ +#define CACHE_ADJUST_HIT1 60 /* Increase hit% this low 1 */ +#define CACHE_ADJUST_HIT2 50 /* Increase hit% this low 2 */ +#define CACHE_ADJUST_BUSY3 20 /* Decrease not this busy */ +#define CACHE_ADJUST_HIT3 90 /* and hit% this high */ +#define CACHE_ADJUST_SIZE (8*1024*1024)/* and size this high */ +#define CACHE_ADJUST_WAITTIME 10 /* Increase last wait (sec) */ +#endif + +/*-------------------------------------------------------------------*/ +/* Functions */ +/*-------------------------------------------------------------------*/ +int cache_nbr(int ix); +int cache_busy(int ix); +int cache_empty(int ix); +int cache_waiters(int ix); +long long cache_size(int ix); +long long cache_hits(int ix); +long long cache_misses(int ix); +int cache_busy_percent(int ix); +int cache_empty_percent(int ix); +int cache_hit_percent(int ix); +int cache_lookup(int ix, U64 key, int *o); +typedef int CACHE_SCAN_RTN (int *answer, int ix, int i, void *data); +int cache_scan (int ix, CACHE_SCAN_RTN rtn, void *data); +int cache_lock(int ix); +int cache_unlock(int ix); +int cache_wait(int ix); +U64 cache_getkey(int ix, int i); +U64 cache_setkey(int ix, int i, U64 key); +U32 cache_getflag(int ix, int i); +U32 cache_setflag(int ix, int i, U32 andbits, U32 orbits); +U64 cache_getage(int ix, int i); +U64 cache_setage(int ix, int i); +void *cache_getbuf(int ix, int i, int len); +void *cache_setbuf(int ix, int i, void *buf, int len); +int cache_getlen(int ix, int i); +int cache_getval(int ix, int i); +int cache_setval(int ix, int i, int val); +int cache_release(int ix, int i, int flag); +int cache_cmd(int argc, char *argv[], char *cmdline); + +#ifdef _HERCULES_CACHE_C +static int cache_create (int ix); +static int cache_destroy (int ix); +static int cache_check_ix(int ix); +static int cache_check_cache(int ix); +static int cache_check(int ix, int i); +static int cache_isbusy(int ix, int i); +static int cache_isempty(int ix, int i); +static int cache_adjust(int ix, int n); +static int cache_resize (int ix, int n); +static void cache_allocbuf(int ix, int i, int len); +#endif + +/*-------------------------------------------------------------------*/ +/* Specific cache definitions (until a better place is found) */ +/*-------------------------------------------------------------------*/ + +/*-------------------------------------------------------------------*/ +/* Device buffer definitions */ +/*-------------------------------------------------------------------*/ +#define CCKD_CACHE_ACTIVE 0x80000000 /* Active entry */ +#define CCKD_CACHE_READING 0x40000000 /* Entry being read */ +#define CCKD_CACHE_WRITING 0x20000000 /* Entry being written */ +#define CCKD_CACHE_IOBUSY (CCKD_CACHE_READING|CCKD_CACHE_WRITING) +#define CCKD_CACHE_IOWAIT 0x10000000 /* Waiters for i/o */ +#define CCKD_CACHE_UPDATED 0x08000000 /* Buffer has been updated */ +#define CCKD_CACHE_WRITE 0x04000000 /* Entry pending write */ +#define CCKD_CACHE_USED 0x00800000 /* Entry has been used */ + +#define CKD_CACHE_ACTIVE 0x80000000 /* Active entry */ +#define FBA_CACHE_ACTIVE 0x80000000 /* Active entry */ +#define SHRD_CACHE_ACTIVE 0x80000000 /* Active entry */ + +#define DEVBUF_TYPE_SHARED 0x00000080 /* Shared entry type */ +#define DEVBUF_TYPE_COMP 0x00000040 /* CCKD/CFBA entry type */ +#define DEVBUF_TYPE_CKD 0x00000002 /* CKD entry type */ +#define DEVBUF_TYPE_FBA 0x00000001 /* FBA entry type */ + +#define DEVBUF_TYPE_CCKD (DEVBUF_TYPE_COMP|DEVBUF_TYPE_CKD) +#define DEVBUF_TYPE_CFBA (DEVBUF_TYPE_COMP|DEVBUF_TYPE_FBA) +#define DEVBUF_TYPE_SCKD (DEVBUF_TYPE_SHARED|DEVBUF_TYPE_CKD) +#define DEVBUF_TYPE_SFBA (DEVBUF_TYPE_SHARED|DEVBUF_TYPE_FBA) + +#define CCKD_CACHE_GETKEY(_ix, _devnum, _trk) \ +do { \ + (_devnum) = (U16)((cache_getkey(CACHE_DEVBUF,(_ix)) >> 32) & 0xFFFF); \ + (_trk) = (U32)(cache_getkey(CACHE_DEVBUF,(_ix)) & 0xFFFFFFFF); \ +} while (0) +#define CCKD_CACHE_SETKEY(_devnum, _trk) \ + ((U64)(((U64)(_devnum) << 32) | (U64)(_trk))) + +#define CKD_CACHE_GETKEY(_ix, _devnum, _trk) \ +{ \ + (_devnum) = (U16)((cache_getkey(CACHE_DEVBUF,(_ix)) >> 32) & 0xFFFF); \ + (_trk) = (U32)(cache_getkey(CACHE_DEVBUF,(_ix)) & 0xFFFFFFFF); \ +} +#define CKD_CACHE_SETKEY(_devnum, _trk) \ + ((U64)(((U64)(_devnum) << 32) | (U64)(_trk))) + +#define FBA_CACHE_GETKEY(_ix, _devnum, _blkgrp) \ +{ \ + (_devnum) = (U16)((cache_getkey(CACHE_DEVBUF,(_ix)) >> 32) & 0xFFFF); \ + (_blkgrp) = (U32)(cache_getkey(CACHE_DEVBUF,(_ix)) & 0xFFFFFFFF); \ +} +#define FBA_CACHE_SETKEY(_devnum, _blkgrp) \ + ((U64)(((U64)(_devnum) << 32) | (U64)(_blkgrp))) + +#define SHRD_CACHE_GETKEY(_ix, _devnum, _trk) \ +{ \ + (_devnum) = (U16)((cache_getkey(CACHE_DEVBUF,(_ix)) >> 32) & 0xFFFF); \ + (_trk) = (U32)(cache_getkey(CACHE_DEVBUF,(_ix)) & 0xFFFFFFFF); \ +} +#define SHRD_CACHE_SETKEY(_devnum, _trk) \ + ((U64)(((U64)(_devnum) << 32) | (U64)(_trk))) + +/*-------------------------------------------------------------------*/ +/* L2 definitions */ +/*-------------------------------------------------------------------*/ +#define L2_CACHE_ACTIVE 0x80000000 /* Active entry */ + +#define L2_CACHE_GETKEY(_ix, _sfx, _devnum, _trk) \ +do { \ + (_sfx) = (U16)((cache_getkey(CACHE_L2,(_ix)) >> 48) & 0xFFFF); \ + (_devnum) = (U16)((cache_getkey(CACHE_L2,(_ix)) >> 32) & 0xFFFF); \ + (_trk) = (U32)(cache_getkey(CACHE_L2,(_ix)) & 0xFFFFFFFF); \ +} while (0) +#define L2_CACHE_SETKEY(_sfx, _devnum, _trk) \ + ((U64)(((U64)(_sfx) << 48) | ((U64)(_devnum) << 32) | (U64)(_trk))) + +#endif /* _HERCULES_CACHE_H */ diff --git a/cardpch.c b/cardpch.c index 018eb72..ed50b55 100644 --- a/cardpch.c +++ b/cardpch.c @@ -65,6 +65,9 @@ int i; /* Array subscript */ dev->cardpos = 0; dev->cardrem = CARD_LENGTH; + if(!sscanf(dev->typname,"%hx",&(dev->devtype))) + dev->devtype = 0x3525; + /* Process the driver arguments */ for (i = 1; i < argc; i++) { @@ -297,10 +300,40 @@ BYTE c; /* Output character */ } /* end function cardpch_execute_ccw */ +#if defined(OPTION_DYNAMIC_LOAD) +static +#endif DEVHND cardpch_device_hndinfo = { &cardpch_init_handler, &cardpch_execute_ccw, &cardpch_close_device, &cardpch_query_device, - NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + +/* Libtool static name colision resolution */ +/* note : lt_dlopen will look for symbol & modulename_LTX_symbol */ +#if !defined(HDL_BUILD_SHARED) && defined(HDL_USE_LIBTOOL) +#define hdl_ddev hdt3525_LTX_hdl_ddev +#define hdl_depc hdt3525_LTX_hdl_depc +#define hdl_reso hdt3525_LTX_hdl_reso +#define hdl_init hdt3525_LTX_hdl_init +#define hdl_fini hdt3525_LTX_hdl_fini +#endif + + +#if defined(OPTION_DYNAMIC_LOAD) +HDL_DEPENDENCY_SECTION; +{ + HDL_DEPENDENCY(HERCULES); + HDL_DEPENDENCY(DEVBLK); +} +END_DEPENDENCY_SECTION; + + +HDL_DEVICE_SECTION; +{ + HDL_DEVICE(3525, cardpch_device_hndinfo ); +} +END_DEVICE_SECTION; +#endif diff --git a/cardrdr.c b/cardrdr.c index 8c03f52..b507f6c 100644 --- a/cardrdr.c +++ b/cardrdr.c @@ -10,6 +10,23 @@ #include "devtype.h" +#include "sockdev.h" + + +#if defined(OPTION_DYNAMIC_LOAD) && defined(WIN32) && !defined(HDL_USE_LIBTOOL) + SYSBLK *psysblk; + #define sysblk (*psysblk) +#endif + + +/*-------------------------------------------------------------------*/ +/* ISW 2003/03/07 */ +/* 3505 Byte 1 Sense Codes */ +/*-------------------------------------------------------------------*/ +#define SENSE1_RDR_PERM 0x80 /* Permanent Err key depressed */ +#define SENSE1_RDR_AUTORETRY 0x40 /* Don't know */ +#define SENSE1_RDR_MOTIONMF 0x20 /* Motion Malfunction */ +#define SENSE1_RDR_RAIC 0x10 /* Retry After Intreq Cleared */ /*-------------------------------------------------------------------*/ /* Internal macro definitions */ /*-------------------------------------------------------------------*/ @@ -47,6 +64,9 @@ int fc; /* File counter */ dev->cardrem = 0; dev->autopad = 0; + if(!sscanf(dev->typname,"%hx",&(dev->devtype))) + dev->devtype = 0x2501; + fc = 0; if (dev->more_files) free (dev->more_files); @@ -263,7 +283,9 @@ int fc; /* File counter */ /* Set number of sense bytes */ - dev->numsense = 1; + /* ISW 20030307 : Empirical knowledge : DOS/VS R34 Erep */ + /* indicates 4 bytes in 3505 sense */ + dev->numsense = 4; /* Initialize the device identifier bytes */ @@ -390,7 +412,13 @@ BYTE buf[160]; /* Auto-detection buffer */ if (dev->fd == -1) { + if(dev->rdreof) + { + *unitstat=CSW_CE|CSW_DE|CSW_UX; + return -1; + } dev->sense[0] = SENSE_IR; + dev->sense[1] = SENSE1_RDR_RAIC; /* Retry when IntReq Cleared */ *unitstat = CSW_CE | CSW_DE | CSW_UC; return -1; } @@ -445,7 +473,13 @@ BYTE buf[160]; /* Auto-detection buffer */ /* Intervention required if device has no file name */ if (dev->filename[0] == '\0') { + if(dev->rdreof) + { + *unitstat=CSW_CE|CSW_DE|CSW_UX; + return -1; + } dev->sense[0] = SENSE_IR; + dev->sense[1] = SENSE1_RDR_RAIC; /* Retry when IntReq Cleared */ *unitstat = CSW_CE | CSW_DE | CSW_UC; return -1; } @@ -559,6 +593,7 @@ int rc; /* Return code */ else { dev->sense[0] = SENSE_IR; + dev->sense[1] = SENSE1_RDR_RAIC; /* Retry when IntReq Cleared */ *unitstat = CSW_CE | CSW_DE | CSW_UC; } @@ -628,6 +663,7 @@ BYTE c; /* Input character */ else { dev->sense[0] = SENSE_IR; + dev->sense[1] = SENSE1_RDR_RAIC; /* Retry when IntReq Cleared */ *unitstat = CSW_CE | CSW_DE | CSW_UC; } @@ -784,6 +820,18 @@ int num; /* Number of bytes to move */ *residual = count - num; if (count < dev->numsense) *more = 1; + /* If sense is clear AND filename = "" OR sockdev and fd=-1 */ + /* Put an IR sense - so that an unsolicited sense can see the intreq */ + if(dev->sense[0]==0) + { + if(dev->filename[0]==0x00 || + (dev->bs && dev->fd==-1)) + { + dev->sense[0] = SENSE_IR; + dev->sense[1] = SENSE1_RDR_RAIC; /* Retry when IntReq Cleared */ + } + } + /* Copy device sense bytes to channel I/O buffer */ memcpy (iobuf, dev->sense, num); @@ -823,10 +871,53 @@ int num; /* Number of bytes to move */ } /* end function cardrdr_execute_ccw */ +#if defined(OPTION_DYNAMIC_LOAD) +static +#endif DEVHND cardrdr_device_hndinfo = { &cardrdr_init_handler, &cardrdr_execute_ccw, &cardrdr_close_device, &cardrdr_query_device, - NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + +/* Libtool static name colision resolution */ +/* note : lt_dlopen will look for symbol & modulename_LTX_symbol */ +#if !defined(HDL_BUILD_SHARED) && defined(HDL_USE_LIBTOOL) +#define hdl_ddev hdt3505_LTX_hdl_ddev +#define hdl_depc hdt3505_LTX_hdl_depc +#define hdl_reso hdt3505_LTX_hdl_reso +#define hdl_init hdt3505_LTX_hdl_init +#define hdl_fini hdt3505_LTX_hdl_fini +#endif + + +#if defined(OPTION_DYNAMIC_LOAD) +HDL_DEPENDENCY_SECTION; +{ + HDL_DEPENDENCY(HERCULES); + HDL_DEPENDENCY(DEVBLK); + HDL_DEPENDENCY(SYSBLK); +} +END_DEPENDENCY_SECTION; + + +#if defined(WIN32) && !defined(HDL_USE_LIBTOOL) +#undef sysblk +HDL_RESOLVER_SECTION; +{ + HDL_RESOLVE_PTRVAR( psysblk, sysblk ); +} +END_RESOLVER_SECTION; +#endif + + +HDL_DEVICE_SECTION; +{ + HDL_DEVICE(1442, cardrdr_device_hndinfo ); + HDL_DEVICE(2501, cardrdr_device_hndinfo ); + HDL_DEVICE(3505, cardrdr_device_hndinfo ); +} +END_DEVICE_SECTION; +#endif diff --git a/cckddasd.c b/cckddasd.c index f40426b..7aedf4c 100644 --- a/cckddasd.c +++ b/cckddasd.c @@ -8,84 +8,108 @@ #include "hercules.h" #include "devtype.h" +#include "opcode.h" #define cckdtrc(format, a...) \ do { \ if (dev && (dev->ccwtrace||dev->ccwstep)) \ - fprintf((dev)->msgpipew, "%4.4X:" format, dev->devnum, a); \ - if (cckdblk.itracen > 0) \ - {int n; \ - if (cckdblk.itracex >= 128 * cckdblk.itracen) \ - { \ - n = 0; \ - cckdblk.itracex = 128; \ - } \ - else \ - { \ - n = cckdblk.itracex; \ - cckdblk.itracex += 128; \ - } \ - sprintf(&cckdblk.itrace[n], "%4.4X:" format, dev ? dev->devnum : 0, a); \ + logmsg("%4.4X:" format, dev->devnum, a); \ + if (cckdblk.itrace) { \ + struct timeval tv; \ + CCKD_TRACE *p; \ + p = cckdblk.itracep++; \ + if (p >= cckdblk.itracex) { \ + p = cckdblk.itrace; \ + cckdblk.itracep = p + 1; \ + } \ + gettimeofday(&tv, NULL); \ + if (p) sprintf ((char *)p, "%6.6ld" "." "%6.6ld %4.4X:" format, \ + tv.tv_sec, tv.tv_usec, dev ? dev->devnum : 0, a); \ } \ } while (0) - /*-------------------------------------------------------------------*/ /* Internal functions */ /*-------------------------------------------------------------------*/ -int cckddasd_init (int, BYTE **); -int cckddasd_term (); -int cckddasd_init_handler (DEVBLK *, int, BYTE **); -int cckddasd_close_device (DEVBLK *); -void cckddasd_start (DEVBLK *); -void cckddasd_end (DEVBLK *); -int cckd_read_track (DEVBLK *, int, int, BYTE *); -int cckd_update_track (DEVBLK *, BYTE *, int, BYTE *); -int cckd_used (DEVBLK *); -int cfba_read_block (DEVBLK *, BYTE *, int, BYTE *); -int cfba_write_block (DEVBLK *, BYTE *, int, BYTE *); -int cfba_used (DEVBLK *); -CCKD_CACHE *cckd_read_trk (DEVBLK *, int, int, BYTE *); -void cckd_readahead (DEVBLK *, int); -void cckd_ra (); -void cckd_flush_cache(DEVBLK *); -void cckd_purge_cache(DEVBLK *); +int cckddasd_init(int argc, BYTE *argv[]); +int cckddasd_term(); +int cckddasd_init_handler( DEVBLK *dev, int argc, BYTE *argv[] ); +int cckddasd_close_device(DEVBLK *dev); +void cckddasd_start(DEVBLK *dev); +void cckddasd_end(DEVBLK *dev); +int cckd_read_track(DEVBLK *dev, int trk, BYTE *unitstat); +int cckd_update_track(DEVBLK *dev, int trk, int off, + BYTE *buf, int len, BYTE *unitstat); +int cckd_used(DEVBLK *dev); +int cfba_read_block(DEVBLK *dev, int blkgrp, BYTE *unitstat); +int cfba_write_block(DEVBLK *dev, int blkgrp, int off, + BYTE *buf, int wrlen, BYTE *unitstat); +int cfba_used(DEVBLK *dev); +int cckd_read_trk(DEVBLK *dev, int trk, int ra, BYTE *unitstat); +void cckd_readahead(DEVBLK *dev, int trk); +int cckd_readahead_scan(int *answer, int ix, int i, void *data); +void cckd_ra(); +void cckd_flush_cache(DEVBLK *dev); +int cckd_flush_cache_scan(int *answer, int ix, int i, void *data); +void cckd_flush_cache_all(); +void cckd_purge_cache(DEVBLK *dev); +int cckd_purge_cache_scan(int *answer, int ix, int i, void *data); void cckd_writer(); -off_t cckd_get_space (DEVBLK *, unsigned int); -void cckd_rel_space (DEVBLK *, off_t, int); -void cckd_rel_free_atend (DEVBLK *, unsigned int, int, int); -void cckd_flush_space(DEVBLK *); -int cckd_read_chdr (DEVBLK *); -int cckd_write_chdr (DEVBLK *); -int cckd_read_l1 (DEVBLK *); -int cckd_write_l1 (DEVBLK *); -int cckd_write_l1ent (DEVBLK *, int); -int cckd_read_init (DEVBLK *); -int cckd_read_fsp (DEVBLK *); -int cckd_write_fsp (DEVBLK *); -int cckd_read_l2 (DEVBLK *, int, int); -void cckd_purge_l2 (DEVBLK *); -int cckd_write_l2 (DEVBLK *); -int cckd_read_l2ent (DEVBLK *, CCKD_L2ENT *, int); -int cckd_write_l2ent (DEVBLK *, CCKD_L2ENT *, int); -int cckd_read_trkimg (DEVBLK *, BYTE *, int, BYTE *); -int cckd_write_trkimg (DEVBLK *, BYTE *, int, int); -int cckd_harden (DEVBLK *); -void cckd_truncate (DEVBLK *, int); -int cckd_trklen (DEVBLK *, BYTE *); -int cckd_null_trk (DEVBLK *, BYTE *, int, int); -int cckd_cchh (DEVBLK *, BYTE *, int); -int cckd_validate (DEVBLK *, BYTE *, int, int); -int cckd_sf_name (DEVBLK *, int, char *); -int cckd_sf_init (DEVBLK *); -int cckd_sf_new (DEVBLK *); -void cckd_sf_add (DEVBLK *); -void cckd_sf_remove (DEVBLK *, int); -void cckd_sf_newname (DEVBLK *, BYTE *); -void cckd_sf_stats (DEVBLK *); -void cckd_sf_comp (DEVBLK *); -void cckd_gcol (); -int cckd_gc_percolate (DEVBLK *, unsigned int); +int cckd_writer_scan(int *o, int ix, int i, void *data); +off_t cckd_get_space(DEVBLK *dev, unsigned int len); +void cckd_rel_space(DEVBLK *dev, off_t pos, int len); +void cckd_rel_free_atend(DEVBLK *dev, unsigned int pos, int len, int i); +void cckd_flush_space(DEVBLK *dev); +int cckd_read_chdr(DEVBLK *dev); +int cckd_write_chdr(DEVBLK *dev); +int cckd_read_l1(DEVBLK *dev); +int cckd_write_l1(DEVBLK *dev); +int cckd_write_l1ent(DEVBLK *dev, int l1x); +int cckd_read_init(DEVBLK *dev); +int cckd_read_fsp(DEVBLK *dev); +int cckd_write_fsp(DEVBLK *dev); +int cckd_read_l2(DEVBLK *dev, int sfx, int l1x); +void cckd_purge_l2(DEVBLK *dev); +int cckd_purge_l2_scan(int *answer, int ix, int i, void *data); +int cckd_steal_l2(); +int cckd_steal_l2_scan(int *answer, int ix, int i, void *data); +int cckd_write_l2(DEVBLK *dev); +int cckd_read_l2ent(DEVBLK *dev, CCKD_L2ENT *l2, int trk); +int cckd_write_l2ent(DEVBLK *dev, CCKD_L2ENT *l2, int trk); +int cckd_read_trkimg(DEVBLK *dev, BYTE *buf, int trk, BYTE *unitstat); +int cckd_write_trkimg(DEVBLK *dev, BYTE *buf, int len, int trk); +int cckd_harden(DEVBLK *dev); +int cckd_trklen(DEVBLK *dev, BYTE *buf); +void cckd_truncate(DEVBLK *dev, int now); +int cckd_null_trk(DEVBLK *dev, BYTE *buf, int trk, int sz0); +int cckd_cchh(DEVBLK *dev, BYTE *buf, int trk); +int cckd_validate(DEVBLK *dev, BYTE *buf, int trk, int len); +int cckd_sf_name(DEVBLK *dev, int sfx, char *sfn); +int cckd_sf_init(DEVBLK *dev); +int cckd_sf_new(DEVBLK *dev); +void cckd_sf_add(DEVBLK *dev); +void cckd_sf_remove(DEVBLK *dev, int merge); +void cckd_sf_newname(DEVBLK *dev, BYTE *sfn); +void cckd_sf_comp(DEVBLK *dev); +void cckd_sf_stats(DEVBLK *dev); +int cckd_disable_syncio(DEVBLK *dev); +void cckd_lock_devchain(int flag); +void cckd_unlock_devchain(); +void cckd_gcol(); +int cckd_gc_percolate(DEVBLK *dev, unsigned int size); +DEVBLK *cckd_find_device_by_devnum (U16 devnum); +BYTE *cckd_uncompress(DEVBLK *dev, BYTE *from, int len, int maxlen, int trk); +int cckd_uncompress_zlib(DEVBLK *dev, BYTE *to, BYTE *from, int len, int maxlen); +int cckd_uncompress_bzip2(DEVBLK *dev, BYTE *to, BYTE *from, int len, int maxlen); +int cckd_compress(DEVBLK *dev, BYTE **to, BYTE *from, int len, int comp, int parm); +int cckd_compress_none(DEVBLK *dev, BYTE **to, BYTE *from, int len, int parm); +int cckd_compress_zlib(DEVBLK *dev, BYTE **to, BYTE *from, int len, int parm); +int cckd_compress_bzip2(DEVBLK *dev, BYTE **to, BYTE *from, int len, int parm); +void cckd_command_help(); +void cckd_command_opts(); +void cckd_command_stats(); +void cckd_command_debug(); +int cckd_command(BYTE *op, int cmd); void cckd_print_itrace(); /*-------------------------------------------------------------------*/ @@ -146,30 +170,34 @@ int i; /* Index */ /* Initialize locks and conditions */ memcpy (&cckdblk.id, "CCKDBLK ", sizeof(cckdblk.id)); - initialize_lock (&cckdblk.l2cachelock); - initialize_lock (&cckdblk.cachelock); initialize_lock (&cckdblk.gclock); initialize_lock (&cckdblk.ralock); - initialize_condition (&cckdblk.cachecond); + initialize_lock (&cckdblk.wrlock); + initialize_lock (&cckdblk.devlock); initialize_condition (&cckdblk.gccond); - initialize_condition (&cckdblk.termcond); initialize_condition (&cckdblk.racond); - initialize_condition (&cckdblk.writercond); - initialize_condition (&cckdblk.writecond); + initialize_condition (&cckdblk.wrcond); + initialize_condition (&cckdblk.devcond); + initialize_condition (&cckdblk.termcond); /* Initialize some variables */ - cckdblk.msgpipew = stderr; - cckdblk.writerprio = 16; + cckdblk.wrprio = 16; cckdblk.ranbr = CCKD_DEFAULT_RA_SIZE; cckdblk.ramax = CCKD_DEFAULT_RA; - cckdblk.writermax = CCKD_DEFAULT_WRITER; - cckdblk.gcolmax = CCKD_DEFAULT_GCOL; - cckdblk.cachenbr = CCKD_DEFAULT_CACHE; - cckdblk.l2cachenbr = CCKD_DEFAULT_L2CACHE; - cckdblk.gcolwait = CCKD_DEFAULT_GCOLWAIT; - cckdblk.gcolparm = CCKD_DEFAULT_GCOLPARM; + cckdblk.wrmax = CCKD_DEFAULT_WRITER; + cckdblk.gcmax = CCKD_DEFAULT_GCOL; + cckdblk.gcwait = CCKD_DEFAULT_GCOLWAIT; + cckdblk.gcparm = CCKD_DEFAULT_GCOLPARM; cckdblk.readaheads = CCKD_DEFAULT_READAHEADS; cckdblk.freepend = CCKD_DEFAULT_FREEPEND; +#ifdef HAVE_LIBZ + cckdblk.comps |= CCKD_COMPRESS_ZLIB; +#endif +#ifdef CCKD_BZIP2 + cckdblk.comps |= CCKD_COMPRESS_BZIP2; +#endif + cckdblk.comp = -1; + cckdblk.compparm = -1; /* Initialize the readahead queue */ cckdblk.ra1st = cckdblk.ralast = -1; @@ -181,7 +209,6 @@ int i; /* Index */ } /* end function cckddasd_init */ - /*-------------------------------------------------------------------*/ /* CCKD dasd global termination */ /*-------------------------------------------------------------------*/ @@ -199,28 +226,23 @@ int cckddasd_term () /* Terminate the garbage collection threads */ obtain_lock (&cckdblk.gclock); - cckdblk.gcolmax = 0; - if (cckdblk.gcols) + cckdblk.gcmax = 0; + if (cckdblk.gcs) { broadcast_condition (&cckdblk.gccond); wait_condition (&cckdblk.termcond, &cckdblk.gclock); } release_lock (&cckdblk.gclock); - /* write any updated track images and wait for writers to stop */ - obtain_lock (&cckdblk.cachelock); - cckd_flush_cache (NULL); - cckdblk.writermax = 0; - if (cckdblk.writepending || cckdblk.writers) + /* Terminate the writer threads */ + obtain_lock (&cckdblk.wrlock); + cckdblk.wrmax = 0; + if (cckdblk.wrs) { - broadcast_condition (&cckdblk.writercond); - wait_condition (&cckdblk.termcond, &cckdblk.cachelock); + broadcast_condition (&cckdblk.wrcond); + wait_condition (&cckdblk.termcond, &cckdblk.wrlock); } - release_lock (&cckdblk.cachelock); - - /* free the cache */ - cckd_purge_cache (NULL); - cckd_purge_l2 (NULL); + release_lock (&cckdblk.wrlock); memset(&cckdblk, 0, sizeof(CCKDBLK)); @@ -228,7 +250,6 @@ int cckddasd_term () } /* end function cckddasd_term */ - /*-------------------------------------------------------------------*/ /* CKD dasd initialization */ /*-------------------------------------------------------------------*/ @@ -246,8 +267,8 @@ int fdflags; /* File flags */ dev->cckd_ext = cckd = malloc(sizeof(CCKDDASD_EXT)); if (cckd == NULL) { - devmsg ("%4.4X:cckddasd: malloc failed for cckd extension: %s\n", - dev->devnum, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD100E malloc failed for cckd extension: %s\n"), + strerror(errno)); return -1; } memset(cckd, 0, sizeof(CCKDDASD_EXT)); @@ -256,61 +277,49 @@ int fdflags; /* File flags */ /* Initialize the global cckd block if necessary */ if (memcmp (&cckdblk.id, "CCKDBLK ", sizeof(cckdblk.id))) cckddasd_init (0, NULL); - if (dev->msgpipew != cckdblk.msgpipew) - cckdblk.msgpipew = dev->msgpipew; /* Initialize locks and conditions */ + initialize_lock (&cckd->iolock); initialize_lock (&cckd->filelock); - initialize_condition (&cckd->readcond); - initialize_condition (&cckd->writecond); + initialize_condition (&cckd->iocond); /* Initialize some variables */ obtain_lock (&cckd->filelock); - cckd->l1x = cckd->sfx = -1; + cckd->l1x = cckd->sfx = dev->cache = cckd->free1st = -1; cckd->fd[0] = dev->fd; fdflags = fcntl (dev->fd, F_GETFL); cckd->open[0] = (fdflags & O_RDWR) ? CCKD_OPEN_RW : CCKD_OPEN_RO; /* call the chkdsk function */ - rc = cckd_chkdsk (cckd->fd[0], dev->msgpipew, 0); + rc = cckd_chkdsk (cckd->fd[0], stdout, 0); if (rc < 0) return -1; /* Perform initial read */ rc = cckd_read_init (dev); if (rc < 0) return -1; + if (cckd->fbadasd) dev->ckdtrksz = CFBA_BLOCK_SIZE; /* open the shadow files */ rc = cckd_sf_init (dev); if (rc < 0) - { devmsg ("%4.4X:cckddasd: error initializing shadow files\n", - dev->devnum); + { logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD101E error initializing shadow files\n")); return -1; } - /* Update the routines */ + /* Update the device handler routines */ if (cckd->ckddasd) - { dev->hnd = &cckddasd_device_hndinfo; - dev->ckdrdtrk = &cckd_read_track; - dev->ckdupdtrk = &cckd_update_track; - dev->ckdused = &cckd_used; - } else - { dev->hnd = &cfbadasd_device_hndinfo; - dev->fbardblk = &cfba_read_block; - dev->fbawrblk = &cfba_write_block; - dev->fbaused = &cfba_used; - } release_lock (&cckd->filelock); /* Insert the device into the cckd device queue */ - obtain_lock (&cckdblk.gclock); + cckd_lock_devchain(1); for (cckd = NULL, dev2 = cckdblk.dev1st; dev2; dev2 = cckd->devnext) cckd = dev2->cckd_ext; if (cckd) cckd->devnext = dev; else cckdblk.dev1st = dev; - release_lock (&cckdblk.gclock); + cckd_unlock_devchain(); cckdblk.batch = dev->batch; if (cckdblk.batch) @@ -322,7 +331,6 @@ int fdflags; /* File flags */ return 0; } /* end function cckddasd_init_handler */ - /*-------------------------------------------------------------------*/ /* Close a Compressed CKD Device */ /*-------------------------------------------------------------------*/ @@ -333,8 +341,34 @@ int i; /* Index */ cckd = dev->cckd_ext; + /* Wait for readaheads to finish */ + obtain_lock(&cckdblk.ralock); + cckd->stopping = 1; + while (cckd->ras) + { + release_lock(&cckdblk.ralock); + usleep(1); + obtain_lock(&cckdblk.ralock); + } + release_lock(&cckdblk.ralock); + + /* Flush the cache and wait for the writes to complete */ + obtain_lock (&cckd->iolock); + cckd->stopping = 1; + cckd_flush_cache (dev); + while (cckd->wrpending || cckd->ioactive) + { + cckd->iowaiters++; + wait_condition (&cckd->iocond, &cckd->iolock); + cckd->iowaiters--; + cckd_flush_cache (dev); + } + cckd_purge_cache (dev); cckd_purge_l2 (dev); + dev->bufcur = dev->cache = -1; + release_lock (&cckd->iolock); + /* Remove the device from the cckd queue */ - obtain_lock (&cckdblk.gclock); + cckd_lock_devchain(1); if (dev == cckdblk.dev1st) cckdblk.dev1st = cckd->devnext; else { @@ -346,23 +380,7 @@ int i; /* Index */ } cckd2->devnext = cckd->devnext; } - release_lock (&cckdblk.gclock); - - /* Flush the cache and wait for the writes to complete */ - obtain_lock (&cckdblk.cachelock); - cckd_flush_cache (dev); - while (cckdblk.writepending || cckd->ioactive) - { - cckdblk.writewaiting++; - wait_condition (&cckdblk.writecond, &cckdblk.cachelock); - cckdblk.writewaiting--; - cckd_flush_cache (dev); - } - - /* Purge the device entries from the cache */ - cckd_purge_cache (dev); cckd_purge_l2 (dev); - cckd->stopping = 1; - release_lock (&cckdblk.cachelock); + cckd_unlock_devchain(); /* harden the file */ obtain_lock (&cckd->filelock); @@ -397,51 +415,70 @@ int i; /* Index */ return 0; } /* end function cckddasd_close_device */ - /*-------------------------------------------------------------------*/ /* Compressed ckd start/resume channel program */ /*-------------------------------------------------------------------*/ void cckddasd_start (DEVBLK *dev) { CCKDDASD_EXT *cckd; /* -> cckd extension */ +U16 devnum = 0; /* Last active device number */ +int trk = 0; /* Last active track */ cckd = dev->cckd_ext; - if (!cckd || cckd->stopping) - { - dev->dasdcur = -1; - return; - } - obtain_lock (&cckdblk.cachelock); - cckd->ioactive = 1; + cckdtrc ("cckddasd: start i/o bufcur %d cache[%d]\n", + dev->bufcur, dev->cache); + + /* Reset buffer offsets */ + dev->bufoff = 0; + dev->bufoffhi = cckd->ckddasd ? dev->ckdtrksz : CFBA_BLOCK_SIZE; - /* If previous active cache entry has been stolen or is busy - then set it to null and return. This forces `cckd_read_trk' - to be called. */ - if (!cckd->active || dev != cckd->active->dev - || dev->dasdcur != cckd->active->trk || cckd->merging - || (cckd->active->flags & (CCKD_CACHE_READING | CCKD_CACHE_WRITING))) + /* Check for merge - synchronous i/o should be disabled */ + obtain_lock(&cckd->iolock); + if (cckd->merging) { - dev->dasdcur = -1; - cckd->active = NULL; - release_lock (&cckdblk.cachelock); - return; + cckdtrc("cckddasd: start i/o waiting for merge%s\n",""); + while (cckd->merging) + { + cckd->iowaiters++; + wait_condition (&cckd->iocond, &cckd->iolock); + cckd->iowaiters--; + } + dev->bufcur = dev->cache = -1; } + cckd->ioactive = 1; + + cache_lock(CACHE_DEVBUF); - /* Make the previous cache entry active again */ - cckd->active->flags |= CCKD_CACHE_ACTIVE; + if (dev->cache >= 0) + CCKD_CACHE_GETKEY(dev->cache, devnum, trk); - /* If the entry is pending write then change it to `updated' */ - if (cckd->active->flags & CCKD_CACHE_WRITE) + /* Check if previous active entry is still valid and not busy */ + if (dev->cache >= 0 && dev->devnum == devnum && dev->bufcur == trk + && !(cache_getflag(CACHE_DEVBUF, dev->cache) & CCKD_CACHE_IOBUSY)) { - cckd->active->flags &= ~CCKD_CACHE_WRITE; - cckd->active->flags |= CCKD_CACHE_UPDATED; - cckdblk.writepending--; + /* Make the entry active again */ + cache_setflag (CACHE_DEVBUF, dev->cache, ~0, CCKD_CACHE_ACTIVE); + + /* If the entry is pending write then change it to `updated' */ + if (cache_getflag(CACHE_DEVBUF, dev->cache) & CCKD_CACHE_WRITE) + { + cache_setflag (CACHE_DEVBUF, dev->cache, ~CCKD_CACHE_WRITE, CCKD_CACHE_UPDATED); + cckd->wrpending--; + if (cckd->iowaiters && !cckd->wrpending) + broadcast_condition (&cckd->iocond); + } } + else + dev->bufcur = dev->cache = -1; - release_lock (&cckdblk.cachelock); -} /* end function cckddasd_start */ + cache_unlock (CACHE_DEVBUF); + release_lock (&cckd->iolock); + + return; + +} /* end function cckddasd_start */ /*-------------------------------------------------------------------*/ /* Compressed ckd end/suspend channel program */ @@ -451,89 +488,155 @@ void cckddasd_end (DEVBLK *dev) CCKDDASD_EXT *cckd; /* -> cckd extension */ cckd = dev->cckd_ext; - obtain_lock (&cckdblk.cachelock); - if (cckd) + + /* Update length if previous image was updated */ + if (dev->bufupd && dev->bufcur >= 0 && dev->cache >= 0) { - if (cckd->active) - { - cckd->active->flags &= ~CCKD_CACHE_ACTIVE; - if (!(cckd->active->flags & CCKD_CACHE_BUSY) && cckdblk.cachewaiting) - signal_condition (&cckdblk.cachecond); - else if ((cckd->active->flags & CCKD_CACHE_BUSY) == CCKD_CACHE_UPDATED - && !cckdblk.writers) - cckd_flush_cache (dev); - } - if (cckd->ioactive) - { - cckd->ioactive = 0; - if (cckdblk.writewaiting) - broadcast_condition (&cckdblk.writecond); - } + dev->buflen = cckd_trklen (dev, dev->buf); + cache_setval (CACHE_DEVBUF, dev->cache, dev->buflen); } - release_lock (&cckdblk.cachelock); -} /* end function cckddasd_end */ + dev->bufupd = 0; + + cckdtrc ("cckddasd: end i/o bufcur %d cache[%d] waiters %d\n", + dev->bufcur, dev->cache, cckd->iowaiters); + + obtain_lock (&cckd->iolock); + + cckd->ioactive = 0; + + /* Make the current entry inactive */ + if (dev->cache >= 0) + { + cache_lock (CACHE_DEVBUF); + cache_setflag (CACHE_DEVBUF, dev->cache, ~CCKD_CACHE_ACTIVE, 0); + cache_unlock (CACHE_DEVBUF); + } + + /* Cause writers to start after first update */ + if (cckd->updated && (cckdblk.wrs == 0 || cckd->iowaiters != 0)) + cckd_flush_cache (dev); + else if (cckd->iowaiters) + broadcast_condition (&cckd->iocond); + + release_lock (&cckd->iolock); + +} /* end function cckddasd_end */ /*-------------------------------------------------------------------*/ /* Compressed ckd read track image */ /*-------------------------------------------------------------------*/ -int cckd_read_track (DEVBLK *dev, int cyl, int head, BYTE *unitstat) +int cckd_read_track (DEVBLK *dev, int trk, BYTE *unitstat) { CCKDDASD_EXT *cckd; /* -> cckd extension */ -int trk; /* New track */ -CCKD_CACHE *active; /* New active cache entry */ -int act; /* Syncio indicator */ +int rc; /* Return code */ +int len; /* Compressed length */ +BYTE *newbuf; /* Uncompressed buffer */ +int cache; /* New active cache entry */ +int syncio; /* Syncio indicator */ cckd = dev->cckd_ext; - /* Turn off the synchronous I/O bit if trk overflow or trk 0 */ - act = dev->syncio_active; - if (dev->ckdtrkof || (cyl == 0 && head == 0)) - dev->syncio_active = 0; - - /* Calculate the track number */ - trk = cyl * dev->ckdheads + head; - - /* Command reject if seek position is outside volume */ - if (cyl >= dev->ckdcyls || head >= dev->ckdheads || cckd->stopping) + /* Update length if previous image was updated */ + if (dev->bufupd && dev->bufcur >= 0 && dev->cache >= 0) { - ckd_build_sense (dev, SENSE_CR, 0, 0, FORMAT_0, MESSAGE_4); - if (unitstat) *unitstat = CSW_CE | CSW_DE | CSW_UC; - return -1; + dev->buflen = cckd_trklen (dev, dev->buf); + cache_setval (CACHE_DEVBUF, dev->cache, dev->buflen); } + /* Turn off the synchronous I/O bit if trk overflow or trk 0 */ + syncio = dev->syncio_active; + if (dev->ckdtrkof || trk == 0) + dev->syncio_active = 0; + /* Reset buffer offsets */ dev->bufoff = 0; dev->bufoffhi = dev->ckdtrksz; - /* Return if reading the same track image and not trk 0 */ - if (trk == dev->dasdcur && dev->buf && cckd->active) return 0; + /* Check if reading the same track image */ + if (trk == dev->bufcur && dev->cache >= 0) + { + /* Track image may be compressed */ + if ((dev->buf[0] & CCKD_COMPRESS_MASK) != 0 + && (dev->buf[0] & dev->comps) == 0) + { + /* Return if synchronous i/o */ + if (dev->syncio_active) + { + cckdtrc ("cckddasd: read trk %d syncio compressed\n", trk); + cckdblk.stats_synciomisses++; + dev->syncio_retry = 1; + return -1; + } + len = cache_getval(CACHE_DEVBUF, dev->cache); + newbuf = cckd_uncompress (dev, dev->buf, len, dev->ckdtrksz, trk); + if (newbuf == NULL) { + ckd_build_sense (dev, SENSE_EC, 0, 0, FORMAT_1, MESSAGE_0); + *unitstat = CSW_CE | CSW_DE | CSW_UC; + dev->bufcur = dev->cache = -1; + dev->syncio_active = syncio; + return -1; + } + cache_setbuf (CACHE_DEVBUF, dev->cache, newbuf, dev->ckdtrksz); + free (dev->buf); + dev->buf = newbuf; + dev->buflen = cckd_trklen (dev, newbuf); + cache_setval (CACHE_DEVBUF, dev->cache, dev->buflen); + dev->bufsize = cache_getlen (CACHE_DEVBUF, dev->cache); + dev->bufupd = 0; + cckdtrc ("cckddasd: read trk %d uncompressed len %d\n", + trk, dev->buflen); + } + + dev->comp = dev->buf[0] & CCKD_COMPRESS_MASK; + if (dev->comp != 0) dev->compoff = CKDDASD_TRKHDR_SIZE; + + return 0; + } cckdtrc ("cckddasd: read trk %d (%s)\n", trk, dev->syncio_active ? "synchronous" : "asynchronous"); /* read the new track */ + dev->bufupd = 0; *unitstat = 0; - active = cckd_read_trk (dev, trk, 0, unitstat); - if (active == NULL && dev->syncio_active && dev->syncio_retry) + cache = cckd_read_trk (dev, trk, 0, unitstat); + if (cache < 0) + { + dev->bufcur = dev->cache = -1; return -1; - dev->syncio_active = act; - cckd->active = active; - dev->dasdcur = trk; - dev->buf = active->buf; + } - if (*unitstat != 0) return -1; + dev->cache = cache; + dev->buf = cache_getbuf (CACHE_DEVBUF, dev->cache, 0); + dev->bufcur = trk; + dev->bufoff = 0; + dev->bufoffhi = dev->ckdtrksz; + dev->buflen = cache_getval (CACHE_DEVBUF, dev->cache); + dev->bufsize = cache_getlen (CACHE_DEVBUF, dev->cache); - return 0; -} /* end function cckd_read_track */ + dev->comp = dev->buf[0] & CCKD_COMPRESS_MASK; + if (dev->comp != 0) dev->compoff = CKDDASD_TRKHDR_SIZE; + + /* If the image is compressed then call ourself recursively + to cause the image to get uncompressed */ + if (dev->comp != 0 && (dev->comp & dev->comps) == 0) + rc = cckd_read_track (dev, trk, unitstat); + else + rc = 0; + dev->syncio_active = syncio; + return rc; +} /* end function cckd_read_track */ /*-------------------------------------------------------------------*/ /* Compressed ckd update track image */ /*-------------------------------------------------------------------*/ -int cckd_update_track (DEVBLK *dev, BYTE *buf, int len, BYTE *unitstat) +int cckd_update_track (DEVBLK *dev, int trk, int off, + BYTE *buf, int len, BYTE *unitstat) { CCKDDASD_EXT *cckd; /* -> cckd extension */ +int rc; /* Return code */ cckd = dev->cckd_ext; @@ -546,29 +649,54 @@ CCKDDASD_EXT *cckd; /* -> cckd extension */ { ckd_build_sense (dev, SENSE_EC, SENSE1_WRI, 0,FORMAT_1, MESSAGE_0); *unitstat = CSW_CE | CSW_DE | CSW_UC; + dev->bufcur = dev->cache = -1; return -1; } + /* If the track is not current or compressed then read it. + `dev->comps' is set to zero forcing the read routine to + uncompress the image. */ + if (trk != dev->bufcur || (dev->buf[0] & CCKD_COMPRESS_MASK) != 0) + { + dev->comps = 0; + rc = (dev->hnd->read) (dev, trk, unitstat); + if (rc < 0) + { + dev->bufcur = dev->cache = -1; + return -1; + } + } + /* Invalid track format if going past buffer end */ - if (dev->bufoff + len > dev->ckdtrksz) + if (off + len > dev->ckdtrksz) { ckd_build_sense (dev, 0, SENSE1_ITF, 0, 0, 0); *unitstat = CSW_CE | CSW_DE | CSW_UC; + dev->bufcur = dev->cache = -1; return -1; } /* Copy the data into the buffer */ - if (buf) memcpy (&dev->buf[dev->bufoff], buf, len); + if (buf && len > 0) memcpy (dev->buf + off, buf, len); + + cckdtrc ("cckddasd: updt trk %d offset %d length %d\n", + trk, off, len); /* Update the cache entry */ - cckd->active->flags |= CCKD_CACHE_UPDATED | CCKD_CACHE_USED; + cache_setflag (CACHE_DEVBUF, dev->cache, ~0, CCKD_CACHE_UPDATED | CCKD_CACHE_USED); cckd->updated = 1; + /* Notify the shared server of the update */ + if (!dev->bufupd) + { + dev->bufupd = 1; + shared_update_notify (dev, trk); + } + return len; } /* end function cckd_update_track */ - /*-------------------------------------------------------------------*/ /* Return used cylinders */ /*-------------------------------------------------------------------*/ @@ -602,193 +730,150 @@ CCKD_L2ENT l2; /* Copied level 2 entry */ return (l1x * 256 + l2x + dev->ckdheads) / dev->ckdheads; } - /*-------------------------------------------------------------------*/ /* Compressed fba read block(s) */ /*-------------------------------------------------------------------*/ -int cfba_read_block (DEVBLK *dev, BYTE *buf, int rdlen, BYTE *unitstat) +int cfba_read_block (DEVBLK *dev, int blkgrp, BYTE *unitstat) { CCKDDASD_EXT *cckd; /* -> cckd extension */ -int ix; /* New block group index */ -int off; /* Offset into block group */ -CCKD_CACHE *active; /* New active cache entry */ -int syncio; /* Saved `syncio_active' bit */ -int bufoff; /* Offset into caller's buf */ -int copylen; /* Length to copy */ -int len; /* Length left to copy */ +int rc; /* Return code */ +int cache; /* New active cache entry */ +BYTE *cbuf; /* -> cache buffer */ +BYTE *newbuf; /* Uncompressed buffer */ +int len; /* Compressed length */ +int maxlen; /* Size for cache entry */ cckd = dev->cckd_ext; - len = rdlen; - /* Command reject if seek position is outside volume */ - if ((dev->fbarba + len - 1) / dev->fbablksiz >= dev->fbanumblk - || cckd->stopping) - { - ckd_build_sense (dev, SENSE_CR, 0, 0, FORMAT_0, MESSAGE_4); - if (unitstat) *unitstat = CSW_CE | CSW_DE | CSW_UC; - return -1; - } - - /* Calculate the block index and offset */ - ix = dev->fbarba / CFBA_BLOCK_SIZE; - off = dev->fbarba % CFBA_BLOCK_SIZE + CKDDASD_TRKHDR_SIZE; + if (dev->cache >= 0) + cbuf = cache_getbuf (CACHE_DEVBUF, dev->cache, 0); + else + cbuf = NULL; + maxlen = CFBA_BLOCK_SIZE + CKDDASD_TRKHDR_SIZE; - /* Read the block group if it's not currently active */ - if (!cckd->active || ix != dev->dasdcur) + /* Return if reading the same track image */ + if (blkgrp == dev->bufcur && dev->cache >= 0) { - *unitstat = 0; - active = cckd_read_trk (dev, ix, 0, unitstat); - if (active == NULL) + /* Block group image may be compressed */ + if ((cbuf[0] & CCKD_COMPRESS_MASK) != 0 + && (cbuf[0] & dev->comps) == 0) { - if (cckd->active) - cckd->active->flags &= ~CCKD_CACHE_ACTIVE; - cckd->active = NULL; - dev->dasdcur = -1; - return -1; + /* Return if synchronous i/o */ + if (dev->syncio_active) + { + cckdtrc ("cckddasd: read blkgrp %d syncio compressed\n", + blkgrp); + cckdblk.stats_synciomisses++; + dev->syncio_retry = 1; + return -1; + } + len = cache_getval(CACHE_DEVBUF, dev->cache); + newbuf = cckd_uncompress (dev, cbuf, len, maxlen, blkgrp); + if (newbuf == NULL) { + dev->sense[0] = SENSE_EC; + *unitstat = CSW_CE | CSW_DE | CSW_UC; + dev->bufcur = dev->cache = -1; + return -1; + } + cache_setbuf (CACHE_DEVBUF, dev->cache, newbuf, maxlen); + free (cbuf); + cbuf = newbuf; + dev->buf = newbuf + CKDDASD_TRKHDR_SIZE; + dev->buflen = CFBA_BLOCK_SIZE; + cache_setval (CACHE_DEVBUF, dev->cache, dev->buflen); + dev->bufsize = cache_getlen (CACHE_DEVBUF, dev->cache); + dev->bufupd = 0; + cckdtrc ("cckddasd: read bkgrp %d uncompressed len %d\n", + blkgrp, dev->buflen); } - cckd->active = active; - dev->dasdcur = ix; - if (*unitstat) return -1; - } - - /* Mask synchronous i/o. We don't support interrupting - the channel command in mid-stream if more than one - block is being read and spans a block group that may - have to be read. */ - syncio = dev->syncio_active; - dev->syncio_active = 0; - /* Copy the blocks to the caller's buffer */ - for (bufoff = 0; len; len -= copylen, bufoff += copylen) - { - /* Calculate the length we can copy */ - if (CFBA_BLOCK_SIZE + CKDDASD_TRKHDR_SIZE - off >= len) - copylen = len; - else - copylen = CFBA_BLOCK_SIZE + CKDDASD_TRKHDR_SIZE - off; - - /* Copy from the cache buffer to the caller's buffer */ - memcpy (&buf[bufoff], &cckd->active->buf[off], copylen); - off += copylen; + dev->comp = cbuf[0] & CCKD_COMPRESS_MASK; - /* Read the next block group if necessary */ - if (copylen < len) - { - ix++; - *unitstat = 0; - active = cckd_read_trk (dev, ix, 0, unitstat); - cckd->active = active; - dev->dasdcur = ix; - if (*unitstat) return -1; - off = CKDDASD_TRKHDR_SIZE; - } + return 0; } - /* Restore the synchronous i/o flag */ - dev->syncio_active = syncio; + cckdtrc ("cckddasd: read blkgrp %d (%s)\n", blkgrp, + dev->syncio_active ? "synchronous" : "asynchronous"); - /* Update the current fba rba */ - dev->fbarba += rdlen; + /* Read the new blkgrp */ + dev->bufupd = 0; + *unitstat = 0; + cache = cckd_read_trk (dev, blkgrp, 0, unitstat); + if (cache < 0) + { + dev->bufcur = dev->cache = -1; + return -1; + } + dev->cache = cache; + cbuf = cache_getbuf (CACHE_DEVBUF, dev->cache, 0); + dev->buf = cbuf + CKDDASD_TRKHDR_SIZE; + dev->bufcur = blkgrp; + dev->bufoff = 0; + dev->bufoffhi = CFBA_BLOCK_SIZE; + dev->buflen = cache_getval (CACHE_DEVBUF, dev->cache); + dev->bufsize = cache_getlen (CACHE_DEVBUF, dev->cache); + dev->comp = cbuf[0] & CCKD_COMPRESS_MASK; + + /* If the image is compressed then call ourself recursively + to cause the image to get uncompressed. This is because + `bufcur' will match blkgrp and `comps' won't match `comp' */ + if (dev->comp != 0 && (dev->comp & dev->comps) == 0) + rc = cfba_read_block (dev, blkgrp, unitstat); + else + rc = 0; - return rdlen; + return rc; } /* end function cfba_read_block */ - /*-------------------------------------------------------------------*/ /* Compressed fba write block(s) */ /*-------------------------------------------------------------------*/ -int cfba_write_block (DEVBLK *dev, BYTE *buf, int wrlen, BYTE *unitstat) +int cfba_write_block (DEVBLK *dev, int blkgrp, int off, + BYTE *buf, int len, BYTE *unitstat) { CCKDDASD_EXT *cckd; /* -> cckd extension */ -int ix; /* New block group index */ -int off; /* Offset into block group */ -CCKD_CACHE *active; /* New active cache entry */ -int syncio; /* Saved `syncio_active' bit */ -int bufoff; /* Offset into caller's buf */ -int copylen; /* Length to copy */ -int len; /* Length left to copy */ +int rc; /* Return code */ +BYTE *cbuf; /* -> cache buffer */ cckd = dev->cckd_ext; - len = wrlen; - /* Command reject if seek position is outside volume */ - if ((dev->fbarba + len - 1) / dev->fbablksiz >= dev->fbanumblk) - { - ckd_build_sense (dev, SENSE_CR, 0, 0, FORMAT_0, MESSAGE_4); - if (unitstat) *unitstat = CSW_CE | CSW_DE | CSW_UC; - return -1; - } - - /* Calculate the block index and offset */ - ix = dev->fbarba / CFBA_BLOCK_SIZE; - off = dev->fbarba % CFBA_BLOCK_SIZE + CKDDASD_TRKHDR_SIZE; + if (dev->cache >= 0) + cbuf = cache_getbuf (CACHE_DEVBUF, dev->cache, 0); + else + cbuf = NULL; - /* Read the block group if it's not currently active */ - if (!cckd->active || ix != dev->dasdcur) + /* Read the block group if it's not current or compressed. + `dev->comps' is set to zero forcing the read routine to + uncompress the image. */ + if (blkgrp != dev->bufcur || (cbuf[0] & CCKD_COMPRESS_MASK) != 0) { - *unitstat = 0; - active = cckd_read_trk (dev, ix, 0, unitstat); - if (active == NULL) + dev->comps = 0; + rc = (dev->hnd->read) (dev, blkgrp, unitstat); + if (rc < 0) { - if (cckd->active) - cckd->active->flags &= ~CCKD_CACHE_ACTIVE; - cckd->active = NULL; - dev->dasdcur = -1; + dev->bufcur = dev->cache = -1; return -1; } - cckd->active = active; - dev->dasdcur = ix; - if (*unitstat) return -1; } - /* Mask synchronous i/o. We don't support interrupting - the channel command in mid-stream if more than one - block is being written and spans a block group that may - have to be read. */ - syncio = dev->syncio_active; - dev->syncio_active = 0; - - /* Copy the blocks from the caller's buffer */ - for (bufoff = 0; len; len -= copylen, bufoff += copylen) - { - /* Calculate the length we can copy */ - if (CFBA_BLOCK_SIZE + CKDDASD_TRKHDR_SIZE - off >= len) - copylen = len; - else - copylen = CFBA_BLOCK_SIZE + CKDDASD_TRKHDR_SIZE - off; - - /* Copy to the cache buffer from the caller's buffer */ - memcpy (&cckd->active->buf[off], &buf[bufoff], copylen); - off += copylen; + /* Copy the data into the buffer */ + if (buf) memcpy (dev->buf + off, buf, len); - /* Update the cache entry flags */ - cckd->active->flags |= CCKD_CACHE_UPDATED | CCKD_CACHE_USED; + /* Update the cache entry */ + cache_setflag (CACHE_DEVBUF, dev->cache, ~0, CCKD_CACHE_UPDATED|CCKD_CACHE_USED); + cckd->updated = 1; - /* Read the next block group if necessary */ - if (copylen < len) - { - ix++; - *unitstat = 0; - active = cckd_read_trk (dev, ix, 0, unitstat); - if (*unitstat) return -1; - cckd->active = active; - dev->dasdcur = ix; - off = CKDDASD_TRKHDR_SIZE; - } + /* Notify the shared server of the update */ + if (!dev->bufupd) + { + dev->bufupd = 1; + shared_update_notify (dev, blkgrp); } - /* Restore the synchronous i/o flag */ - dev->syncio_active = syncio; - - /* Update the current fba rba */ - dev->fbarba += wrlen; - - cckd->updated = 1; + return len; - return wrlen; } /* end function cfba_write_block */ - /*-------------------------------------------------------------------*/ /* Return used blocks */ /*-------------------------------------------------------------------*/ @@ -822,8 +907,6 @@ CCKD_L2ENT l2; /* Copied level 2 entry */ return (l1x * 256 + l2x + CFBA_BLOCK_NUM) / CFBA_BLOCK_NUM; } - - /*-------------------------------------------------------------------*/ /* Read a track image */ /* */ @@ -831,416 +914,264 @@ CCKD_L2ENT l2; /* Copied level 2 entry */ /* by readahead threads (0 < `ra' <= cckdblk.ramax). */ /* */ /*-------------------------------------------------------------------*/ -CCKD_CACHE *cckd_read_trk(DEVBLK *dev, int trk, int ra, BYTE *unitstat) +int cckd_read_trk(DEVBLK *dev, int trk, int ra, BYTE *unitstat) { -int rc, urc=0, vrc=0; /* Return code */ -int i; /* Index variable */ -int fnd; /* Cache index for hit */ -int lru; /* Least-Recently-Used cache - index */ CCKDDASD_EXT *cckd; /* -> cckd extension */ -unsigned long len,len2; /* Lengths */ -BYTE *buf, buf2[65536]; /* Buffers */ +int fnd; /* Cache index for hit */ +int lru; /* Oldest unused cache index */ +int len; /* Length of track image */ +int maxlen; /* Length for buffer */ +int curtrk = -1; /* Current track (at entry) */ +U16 devnum; /* Device number */ +U32 oldtrk; /* Stolen track number */ +U32 flag; /* Cache flag */ +BYTE *buf; /* Read buffer */ cckd = dev->cckd_ext; cckdtrc ("cckddasd: %d rdtrk %d\n", ra, trk); - obtain_lock (&cckdblk.cachelock); + maxlen = cckd->ckddasd ? dev->ckdtrksz + : CFBA_BLOCK_SIZE + CKDDASD_TRKHDR_SIZE; - /* Check for merge in progress */ - if (cckd->merging) + if (!ra) obtain_lock (&cckd->iolock); + + cache_lock (CACHE_DEVBUF); + + /* Inactivate the old entry */ + if (!ra) { - /* Return if readahead */ - if (ra > 0) - { release_lock (&cckdblk.cachelock); - return NULL; - } - /* If asynchronous i/o then wait while merging. - Note that synchronous i/o will be redriven - below since the cache has been purged and a - cache miss will therefore occur */ - while (dev->syncio_active == 0 && cckd->merging) - { - cckdblk.writewaiting++; - wait_condition (&cckdblk.writecond, &cckdblk.cachelock); - cckdblk.writewaiting--; - } + curtrk = dev->bufcur; + if (dev->cache >= 0) + cache_setflag(CACHE_DEVBUF, dev->cache, ~CCKD_CACHE_ACTIVE, 0); + dev->bufcur = dev->cache = -1; } cckd_read_trk_retry: /* scan the cache array for the track */ - for (fnd = lru = -1, i = 0; i < cckdblk.cachenbr; i++) - { - if (dev == cckdblk.cache[i].dev && trk == cckdblk.cache[i].trk) - { fnd = i; - break; - } - /* find the oldest entry that isn't busy */ - if (!(cckdblk.cache[i].flags & CCKD_CACHE_BUSY) - && (lru == - 1 || cckdblk.cache[i].age < cckdblk.cache[lru].age)) - lru = i; - } + fnd = cache_lookup (CACHE_DEVBUF, CCKD_CACHE_SETKEY(dev->devnum, trk), &lru); /* check for cache hit */ if (fnd >= 0) { if (ra) /* readahead doesn't care about a cache hit */ - { release_lock (&cckdblk.cachelock); - return &cckdblk.cache[fnd]; + { cache_unlock (CACHE_DEVBUF); + return fnd; } - /* If synchronous I/O and we need to wait for a read or - write to complete then return with syncio_retry bit on */ + /* If synchronous I/O and I/O is active then return + with syncio_retry bit on */ if (dev->syncio_active) { - if(cckdblk.cache[fnd].flags & (CCKD_CACHE_READING | CCKD_CACHE_WRITING)) + if (cache_getflag(CACHE_DEVBUF, fnd) & CCKD_CACHE_IOBUSY) { - cckdtrc ("cckddasd: %d rdtrk[%d] %d syncio %s\n", - ra, fnd, trk, - cckdblk.cache[fnd].flags & CCKD_CACHE_READING ? + cckdtrc ("cckddasd: %d rdtrk[%d] %d syncio %s\n", ra, fnd, trk, + cache_getflag(CACHE_DEVBUF, fnd) & CCKD_CACHE_READING ? "reading" : "writing"); cckdblk.stats_synciomisses++; dev->syncio_retry = 1; - release_lock (&cckdblk.cachelock); - return NULL; + cache_unlock (CACHE_DEVBUF); + release_lock (&cckd->iolock); + return -1; } else cckdblk.stats_syncios++; } - /* Inactivate the old entry */ - if (cckd->active && cckd->active != &cckdblk.cache[fnd]) + /* Mark the new entry active */ + cache_setflag(CACHE_DEVBUF, fnd, ~0, CCKD_CACHE_ACTIVE | CCKD_CACHE_USED); + cache_setage(CACHE_DEVBUF, fnd); + + /* If the entry is pending write then change it to `updated' */ + if (cache_getflag(CACHE_DEVBUF, fnd) & CCKD_CACHE_WRITE) { - cckd->active->flags &= ~CCKD_CACHE_ACTIVE; - if (!(cckd->active->flags & CCKD_CACHE_BUSY) && cckdblk.cachewaiting) - signal_condition (&cckdblk.cachecond); + cache_setflag(CACHE_DEVBUF, fnd, ~CCKD_CACHE_WRITE, CCKD_CACHE_UPDATED); + cckd->wrpending--; + if (cckd->iowaiters && !cckd->wrpending) + broadcast_condition (&cckd->iocond); } - cckd->active = NULL; - /* Mark the new entry active */ - cckdtrc ("cckddasd: %d rdtrk[%d] %d cache hit %lld -> %lld\n", - ra, fnd, trk, cckdblk.cache[fnd].age, cckdblk.cacheage+1); - cckdblk.cache[fnd].flags |= CCKD_CACHE_ACTIVE | CCKD_CACHE_USED; - cckdblk.cache[fnd].age = ++cckdblk.cacheage; - cckdblk.stats_switches++; cckd->switches++; + cache_unlock (CACHE_DEVBUF); + + cckdtrc ("cckddasd: %d rdtrk[%d] %d cache hit\n", ra, fnd, trk); + + cckdblk.stats_switches++; cckd->switches++; cckdblk.stats_cachehits++; cckd->cachehits++; - /* if read is in progress then wait for it to finish */ - if (cckdblk.cache[fnd].flags & CCKD_CACHE_READING) + /* if read/write is in progress then wait for it to finish */ + while (cache_getflag(CACHE_DEVBUF, fnd) & CCKD_CACHE_IOBUSY) { - cckdblk.stats_readwaits++; - cckdtrc ("cckddasd: %d rdtrk[%d] %d waiting for read\n", - ra, fnd, trk); - cckdblk.cache[fnd].flags |= CCKD_CACHE_READWAIT; - wait_condition (&cckd->readcond, &cckdblk.cachelock); - cckdblk.cache[fnd].flags &= ~CCKD_CACHE_READWAIT; - cckdtrc ("cckddasd: %d rdtrk[%d] %d read wait complete\n", + cckdblk.stats_iowaits++; + cckdtrc ("cckddasd: %d rdtrk[%d] %d waiting for %s\n", ra, fnd, trk, + cache_getflag(CACHE_DEVBUF, fnd) & CCKD_CACHE_READING ? + "read" : "write"); + cache_setflag (CACHE_DEVBUF, fnd, ~0, CCKD_CACHE_IOWAIT); + cckd->iowaiters++; + wait_condition (&cckd->iocond, &cckd->iolock); + cckd->iowaiters--; + cache_setflag (CACHE_DEVBUF, fnd, ~CCKD_CACHE_IOWAIT, 0); + cckdtrc ("cckddasd: %d rdtrk[%d] %d io wait complete\n", ra, fnd, trk); } - /* if write is in progress then wait for it to finish */ - if (cckdblk.cache[fnd].flags & CCKD_CACHE_WRITING) - { - cckdblk.stats_writewaits++; - cckdtrc ("cckddasd: %d rdtrk[%d] %d waiting for write\n", - ra, fnd, trk); - cckdblk.cache[fnd].flags |= CCKD_CACHE_WRITEWAIT; - wait_condition (&cckd->writecond, &cckdblk.cachelock); - cckdblk.cache[fnd].flags &= ~CCKD_CACHE_WRITEWAIT; - cckdtrc ("cckddasd: %d rdtrk[%d] %d write wait complete\n", - ra, fnd, trk); - } + release_lock (&cckd->iolock); - /* If the entry is pending write then change it to `updated' */ - if (cckdblk.cache[fnd].flags & CCKD_CACHE_WRITE) - { - cckdblk.cache[fnd].flags &= ~CCKD_CACHE_WRITE; - cckdblk.cache[fnd].flags |= CCKD_CACHE_UPDATED; - cckdblk.writepending--; - } - - /* Check for readahead */ - if (trk == dev->dasdcur + 1 && dev->dasdcur > 0) + /* Asynchrously schedule readaheads */ + if (curtrk > 0 && trk > curtrk && trk <= curtrk + 2) cckd_readahead (dev, trk); - release_lock (&cckdblk.cachelock); - return &cckdblk.cache[fnd]; - } /* cache hit */ + return fnd; - cckdtrc ("cckddasd: %d rdtrk[%d] %d cache miss %lld -> %lld\n", - ra, lru, trk, lru >= 0 ? (long long)cckdblk.cache[lru].age : -1, - lru >=0 ? (long long)cckdblk.cacheage+1 : -1); + } /* cache hit */ - /* If not readahead and synchronous I/O then return with - the `syio_retry' bit set */ + /* If not readahead and synchronous I/O then retry */ if (!ra && dev->syncio_active) { - cckdtrc ("cckddasd: %d rdtrk[%d] %d syncio cache miss\n", - ra, lru, trk); + cache_unlock(CACHE_DEVBUF); + release_lock (&cckd->iolock); + cckdtrc ("cckddasd: %d rdtrk[%d] %d syncio cache miss\n", ra, lru, trk); cckdblk.stats_synciomisses++; dev->syncio_retry = 1; - release_lock (&cckdblk.cachelock); - return NULL; + return -1; } - /* If no cache entry was stolen, then schedule all updated entries - to be written, and wait for a cache entry unless readahead */ - if (lru < 0) + cckdtrc ("cckddasd: %d rdtrk[%d] %d cache miss\n", ra, lru, trk); + + /* If no cache entry was stolen, then flush all outstanding writes. + This requires us to release our locks. cache_wait should be + called with only the cache_lock held. Fortunately, cache waits + occur very rarely. */ + if (lru < 0) /* No available entry to be stolen */ { cckdtrc ("cckddasd: %d rdtrk[%d] %d no available cache entry\n", - ra, lru, trk); - cckd_flush_cache (NULL); - if (ra) + ra, lru, trk); + cache_unlock (CACHE_DEVBUF); + if (!ra) release_lock (&cckd->iolock); + cckd_flush_cache_all(); + cache_lock (CACHE_DEVBUF); + cckdblk.stats_cachewaits++; + cache_wait (CACHE_DEVBUF); + if (!ra) { - release_lock (&cckdblk.cachelock); - return NULL; + cache_unlock (CACHE_DEVBUF); + obtain_lock (&cckd->iolock); + cache_lock (CACHE_DEVBUF); } - cckdblk.stats_cachewaits++; - cckdblk.cachewaiting++; - wait_condition (&cckdblk.cachecond, &cckdblk.cachelock); - cckdblk.cachewaiting--; goto cckd_read_trk_retry; } - /* get buffer if there isn't one */ - if (cckdblk.cache[lru].buf == NULL) - { - cckdblk.cache[lru].buf = malloc (65536); - cckdtrc ("cckddasd: %d rdtrk[%d] %d get buf %p\n", - ra, lru, trk, cckdblk.cache[lru].buf); - if (!cckdblk.cache[lru].buf) - { - devmsg ("%4.4X cckddasd: %d rdtrk[%d] %d malloc failed: %s\n", - dev->devnum, ra, lru, trk, strerror(errno)); - cckdblk.cache[lru].flags |= CCKD_CACHE_INVALID; - goto cckd_read_trk_retry; - } - } - else if (cckdblk.cache[lru].dev != NULL) + CCKD_CACHE_GETKEY(lru, devnum, oldtrk); + if (devnum != 0) { cckdtrc ("cckddasd: %d rdtrk[%d] %d dropping %4.4X:%d from cache\n", - ra, lru, trk, cckdblk.cache[lru].dev->devnum, cckdblk.cache[lru].trk); - if (!(cckdblk.cache[lru].flags & CCKD_CACHE_USED)) + ra, lru, trk, devnum, oldtrk); + if (!(cache_getflag(CACHE_DEVBUF, lru) & CCKD_CACHE_USED)) { cckdblk.stats_readaheadmisses++; cckd->misses++; } } - /* Mark the entry active if not readahead */ - if (ra == 0) + /* Initialize the entry */ + cache_setkey(CACHE_DEVBUF, lru, CCKD_CACHE_SETKEY(dev->devnum, trk)); + cache_setflag(CACHE_DEVBUF, lru, 0, CCKD_CACHE_READING); + cache_setage(CACHE_DEVBUF, lru); + cache_setval(CACHE_DEVBUF, lru, 0); + if (!ra) { cckdblk.stats_switches++; cckd->switches++; cckdblk.stats_cachemisses++; - if (cckd->active) cckd->active->flags &= ~CCKD_CACHE_ACTIVE; - cckdblk.cache[lru].flags = CCKD_CACHE_ACTIVE | CCKD_CACHE_USED; + cache_setflag(CACHE_DEVBUF, lru, ~0, CCKD_CACHE_ACTIVE|CCKD_CACHE_USED); } - else cckdblk.cache[lru].flags = 0; + cache_setflag(CACHE_DEVBUF, lru, ~CACHE_TYPE, + cckd->ckddasd ? DEVBUF_TYPE_CCKD : DEVBUF_TYPE_CFBA); + buf = cache_getbuf(CACHE_DEVBUF, lru, maxlen); - buf = cckdblk.cache[lru].buf; - cckdblk.cache[lru].dev = dev; - cckdblk.cache[lru].trk = trk; - cckdblk.cache[lru].flags |= CCKD_CACHE_READING; - cckdblk.cache[lru].age = ++cckdblk.cacheage; + cckdtrc ("cckddasd: %d rdtrk[%d] %d buf %p len %d\n", + ra, lru, trk, buf, cache_getlen(CACHE_DEVBUF, lru)); - /* asynchrously schedule readaheads */ - if (!ra && dev->dasdcur > 0 - && trk >= dev->dasdcur + 1 && trk <= dev->dasdcur + 2) - cckd_readahead (dev, trk); + cache_unlock (CACHE_DEVBUF); - release_lock (&cckdblk.cachelock); + if (!ra) release_lock (&cckd->iolock); - /* Clear the buffers if batch mode */ - if (dev->batch) - { - memset(buf, 0, 65536); - memset(&buf2, 0,65536); - } + /* Asynchronously schedule readaheads */ + if (!ra && curtrk > 0 && trk > curtrk && trk <= curtrk + 2) + cckd_readahead (dev, trk); + + /* Clear the buffer if batch mode */ + if (dev->batch) memset(buf, 0, maxlen); - /* read the track image */ + /* Read the track image */ obtain_lock (&cckd->filelock); - len2 = cckd_read_trkimg (dev, (BYTE *)&buf2, trk, unitstat); + len = cckd_read_trkimg (dev, buf, trk, unitstat); release_lock (&cckd->filelock); - cckdtrc ("cckddasd: %d rdtrk[%d] %d read len %ld\n", - ra, lru, trk, len2); - - /* uncompress the track image */ - switch (buf2[0] & CCKD_COMPRESS_MASK) { - - case CCKD_COMPRESS_NONE: - memcpy (buf, &buf2, len2); len = len2; - urc = 0; - cckdtrc ("cckddasd: %d rdtrk[%d] %d not compressed\n", - ra, lru, trk); - break; - -#ifdef CCKD_COMPRESS_ZLIB - case CCKD_COMPRESS_ZLIB: - /* Uncompress the track image using zlib */ - memcpy (buf, &buf2, CKDDASD_TRKHDR_SIZE); - len = dev->ckdtrksz - CKDDASD_TRKHDR_SIZE; - rc = uncompress(&buf[CKDDASD_TRKHDR_SIZE], - &len, &buf2[CKDDASD_TRKHDR_SIZE], - len2 - CKDDASD_TRKHDR_SIZE); - len += CKDDASD_TRKHDR_SIZE; - cckdtrc ("cckddasd: %d rdtrk[%d] %d uncompressed len %ld code %d\n", - ra, lru, trk, len, rc); - urc = (rc != Z_OK); - break; -#endif - -#ifdef CCKD_COMPRESS_BZIP2 - case CCKD_COMPRESS_BZIP2: - /* Decompress the track image using bzip2 */ - memcpy (buf, &buf2, CKDDASD_TRKHDR_SIZE); - len = dev->ckdtrksz - CKDDASD_TRKHDR_SIZE; - rc = BZ2_bzBuffToBuffDecompress ( - &buf[CKDDASD_TRKHDR_SIZE], - (unsigned int *)&len, - &buf2[CKDDASD_TRKHDR_SIZE], - len2 - CKDDASD_TRKHDR_SIZE, 0, 0); - len += CKDDASD_TRKHDR_SIZE; - cckdtrc ("cckddasd: %d rdtrk[%d] %d decompressed len %ld code %d\n", - ra, lru, trk, len, rc); - urc = (rc != BZ_OK); - break; -#endif - - default: - urc = 1; - break; } /* switch (compression type) */ - - if (urc == 0) vrc = cckd_validate (dev, buf, trk, len); - cckdtrc ("cckddasd: %d rdtrk[%d] %d urc=%d vrc=%d\n", - ra, lru, trk, urc, vrc); - - /* If an uncompress or validation error occurred then the - compression algorithm may be wrong and the image recoverable */ - for (i = 0; i <= CCKD_COMPRESS_MAX && (urc || vrc); i++) - { - if (i == (buf2[0] & CCKD_COMPRESS_MASK)) continue; - switch (i) { - case CCKD_COMPRESS_NONE: - memcpy (buf, &buf2, len2); - len = len2; - urc = 0; - break; - -#ifdef CCKD_COMPRESS_ZLIB - case CCKD_COMPRESS_ZLIB: - memcpy (buf, &buf2, CKDDASD_TRKHDR_SIZE); - len = dev->ckdtrksz - CKDDASD_TRKHDR_SIZE; - rc = uncompress(&buf[CKDDASD_TRKHDR_SIZE], - &len, &buf2[CKDDASD_TRKHDR_SIZE], - len2 - CKDDASD_TRKHDR_SIZE); - len += CKDDASD_TRKHDR_SIZE; - urc = (rc != Z_OK); - break; -#endif - -#ifdef CCKD_COMPRESS_BZIP2 - case CCKD_COMPRESS_BZIP2: - memcpy (buf, &buf2, CKDDASD_TRKHDR_SIZE); - len = dev->ckdtrksz - CKDDASD_TRKHDR_SIZE; - rc = BZ2_bzBuffToBuffDecompress ( - &buf[CKDDASD_TRKHDR_SIZE], - (unsigned int *)&len, - &buf2[CKDDASD_TRKHDR_SIZE], - len2 - CKDDASD_TRKHDR_SIZE, 0, 0); - len += CKDDASD_TRKHDR_SIZE; - urc = (rc != BZ_OK); - break; -#endif - } /* switch (compression type) */ - if (urc == 0) vrc = cckd_validate (dev, buf, trk, len); - if (urc == 0 && vrc == 0) - { - devmsg ("%4.4X cckddasd: rdtrk %d recovered, comp %d !! " - "%2.2x%2.2x%2.2x%2.2x%2.2x\n", - dev->devnum, trk, i, buf[0], buf[1], buf[2], buf[3], buf[4]); -// cckd_print_itrace (); - } - } - buf[0] = 0; + cache_setval (CACHE_DEVBUF, lru, len); - /* Check for image error */ - if (urc || vrc) - { - devmsg ("%4.4X cckddasd: rdtrk %d not valid !! %2.2x%2.2x%2.2x%2.2x%2.2x\n", - dev->devnum, trk, buf[0], buf[1], buf[2], buf[3], buf[4]); - cckd_print_itrace (); - len = cckd_null_trk (dev, buf, trk, 0); - if (unitstat) - { - ckd_build_sense (dev, SENSE_EC, 0, 0, FORMAT_1, MESSAGE_0); - *unitstat = CSW_CE | CSW_DE | CSW_UC; - } - } - - obtain_lock (&cckdblk.cachelock); + obtain_lock (&cckd->iolock); - cckdblk.cache[lru].flags &= ~CCKD_CACHE_READING; + /* Turn off the READING bit */ + cache_lock (CACHE_DEVBUF); + flag = cache_setflag(CACHE_DEVBUF, lru, ~CCKD_CACHE_READING, 0); + cache_unlock (CACHE_DEVBUF); - /* wakeup other thread waiting for this read */ - if (cckdblk.cache[lru].flags & CCKD_CACHE_READWAIT) + /* Wakeup other thread waiting for this read */ + if (cckd->iowaiters && (flag & CCKD_CACHE_IOWAIT)) { cckdtrc ("cckddasd: %d rdtrk[%d] %d signalling read complete\n", ra, lru, trk); - signal_condition (&cckd->readcond); + broadcast_condition (&cckd->iocond); } + release_lock (&cckd->iolock); + if (ra) { cckdblk.stats_readaheads++; cckd->readaheads++; - - /* wakeup cache entry waiters if readahead */ - if (cckdblk.cachewaiting) - { - cckdtrc ("cckddasd: %d rdtrk[%d] %d signalling cache entry available\n", - ra, lru, trk); - signal_condition (&cckdblk.cachecond); - } } - cckdtrc ("cckddasd: %d rdtrk[%d] %d complete\n", - ra, lru, trk); + cckdtrc ("cckddasd: %d rdtrk[%d] %d complete\n", ra, lru, trk); - release_lock (&cckdblk.cachelock); + if (cache_busy_percent(CACHE_DEVBUF) > 80) cckd_flush_cache_all(); - return &cckdblk.cache[lru]; + return lru; } /* end function cckd_read_trk */ - /*-------------------------------------------------------------------*/ /* Schedule asynchronous readaheads */ /*-------------------------------------------------------------------*/ void cckd_readahead (DEVBLK *dev, int trk) { CCKDDASD_EXT *cckd; /* -> cckd extension */ -int ra[CCKD_MAX_RA_SIZE]; /* Thread create switches */ int i, r; /* Indexes */ TID tid; /* Readahead thread id */ cckd = dev->cckd_ext; - if (cckdblk.ramax < 1 || cckdblk.readaheads < 1 - || cckdblk.cachewaiting) + if (cckdblk.ramax < 1 || cckdblk.readaheads < 1) return; - /* Initialize */ - memset (ra, 0, sizeof (ra)); + obtain_lock (&cckdblk.ralock); + + /* Scan the cache to see if the tracks are already there */ + memset(cckd->ralkup, 0, sizeof(cckd->ralkup)); + cckd->ratrk = trk; + cache_lock(CACHE_DEVBUF); + cache_scan(CACHE_DEVBUF, cckd_readahead_scan, dev); + cache_unlock(CACHE_DEVBUF); - /* make sure readahead tracks aren't already cached */ - for (i = 0; i < cckdblk.cachenbr; i++) - if (cckdblk.cache[i].trk > trk - && cckdblk.cache[i].trk <= trk + cckdblk.readaheads) - ra[cckdblk.cache[i].trk - (trk+1)] = 1; + /* Scan the queue to see if the tracks are already there */ + for (r = cckdblk.ra1st; r >= 0; r = cckdblk.ra[r].next) + if (cckdblk.ra[r].dev == dev) + { + i = cckdblk.ra[r].trk - trk; + if (i > 0 && i <= cckdblk.readaheads) + cckd->ralkup[i-1] = 1; + } /* Queue the tracks to the readahead queue */ - obtain_lock (&cckdblk.ralock); - for (i = 0; i < cckdblk.readaheads && cckdblk.rafree >= 0; i++) + for (i = 1; i <= cckdblk.readaheads && cckdblk.rafree >= 0; i++) { - if (ra[i] || trk + 1 + i >= dev->ckdtrks) continue; + if (cckd->ralkup[i-1]) continue; + if (trk + i >= dev->ckdtrks) break; r = cckdblk.rafree; cckdblk.rafree = cckdblk.ra[r].next; if (cckdblk.ralast < 0) @@ -1255,7 +1186,7 @@ TID tid; /* Readahead thread id */ cckdblk.ra[r].next = -1; cckdblk.ralast = r; } - cckdblk.ra[r].trk = trk + 1 + i; + cckdblk.ra[r].trk = trk + i; cckdblk.ra[r].dev = dev; } @@ -1267,15 +1198,38 @@ TID tid; /* Readahead thread id */ else if (cckdblk.ras < cckdblk.ramax) create_thread (&tid, NULL, cckd_ra, NULL); } + release_lock (&cckdblk.ralock); + } /* end function cckd_readahead */ +int cckd_readahead_scan (int *answer, int ix, int i, void *data) +{ +CCKDDASD_EXT *cckd; /* -> cckd extension */ +U16 devnum; /* Cached device number */ +U32 trk; /* Cached track */ +DEVBLK *dev = data; /* -> device block */ +int k; /* Index */ + + UNREFERENCED(answer); + UNREFERENCED(ix); + cckd = dev->cckd_ext; + CCKD_CACHE_GETKEY(i, devnum, trk); + if (devnum == dev->devnum) + { + k = (int)trk - cckd->ratrk; + if (k > 0 && k <= cckdblk.readaheads) + cckd->ralkup[k-1] = 1; + } + return 0; +} /*-------------------------------------------------------------------*/ /* Asynchronous readahead thread */ /*-------------------------------------------------------------------*/ void cckd_ra () { +CCKDDASD_EXT *cckd; /* -> cckd extension */ DEVBLK *dev; /* Readahead devblk */ int trk; /* Readahead track */ int ra; /* Readahead index */ @@ -1294,7 +1248,7 @@ TID tid; /* Readahead thread id */ } if (!cckdblk.batch) - cckdmsg ("cckddasd: readahead thread %d started: tid="TIDPAT", pid=%d\n", + logmsg (_("HHCCD001I Readahead thread %d started: tid="TIDPAT", pid=%d\n"), ra, thread_id(), getpid()); while (ra <= cckdblk.ramax) @@ -1309,10 +1263,12 @@ TID tid; /* Readahead thread id */ /* Possibly shutting down if no writes pending */ if (cckdblk.ra1st < 0) continue; - /* Requeue the 1st entry to the readahead free queue */ r = cckdblk.ra1st; trk = cckdblk.ra[r].trk; dev = cckdblk.ra[r].dev; + cckd = dev->cckd_ext; + + /* Requeue the 1st entry to the readahead free queue */ cckdblk.ra1st = cckdblk.ra[r].next; if (cckdblk.ra[r].next > -1) cckdblk.ra[cckdblk.ra[r].next].prev = -1; @@ -1328,16 +1284,21 @@ TID tid; /* Readahead thread id */ else if (cckdblk.ras < cckdblk.ramax) create_thread (&tid, NULL, cckd_ra, dev); } + + if (!cckd || cckd->stopping || cckd->merging) continue; + + cckd->ras++; release_lock (&cckdblk.ralock); /* Read the readahead track */ cckd_read_trk (dev, trk, ra, NULL); obtain_lock (&cckdblk.ralock); + cckd->ras--; } if (!cckdblk.batch) - cckdmsg ("cckddasd: readahead thread %d stopping: tid="TIDPAT", pid=%d\n", + logmsg (_("HHCCD011I Readahead thread %d stopping: tid="TIDPAT", pid=%d\n"), ra, thread_id(), getpid()); --cckdblk.ras; if (!cckdblk.ras) signal_condition(&cckdblk.termcond); @@ -1345,86 +1306,100 @@ TID tid; /* Readahead thread id */ } /* end thread cckd_ra_thread */ - /*-------------------------------------------------------------------*/ -/* Flush updated cache entries */ +/* Flush updated cache entries for a device */ +/* */ +/* Caller holds the cckd->iolock */ +/* cckdblk.wrlock then cache_lock is obtained and released */ /*-------------------------------------------------------------------*/ void cckd_flush_cache(DEVBLK *dev) { -int i; /* Index */ +int rc; /* Return code */ TID tid; /* Writer thread id */ -U32 busy; /* Cache entry busy bits */ -CCKDDASD_EXT *cckd; /* -> cckd extension */ /* Scan cache for updated cache entries */ - for (i = 0; i < cckdblk.cachenbr; i++) - { - busy = cckdblk.cache[i].flags & CCKD_CACHE_BUSY; - - /* If the cache entry is active and updated but no - i/o is active then flush the entry */ - if (busy == (CCKD_CACHE_UPDATED | CCKD_CACHE_ACTIVE) - && (dev == NULL || dev == cckdblk.cache[i].dev)) - { - cckd = cckdblk.cache[i].dev->cckd_ext; - if (!cckd->ioactive) - { - busy &= ~CCKD_CACHE_ACTIVE; - cckdblk.cache[i].flags &= ~CCKD_CACHE_ACTIVE; - cckd->active = NULL; - cckdblk.cache[i].dev->dasdcur = -1; - cckdtrc ("cckddasd: flush cache[%d] trk %d made inactive\n", - i, cckdblk.cache[i].trk); - } - } - - /* Flush the entry if updated but not otherwise busy */ - if (busy == CCKD_CACHE_UPDATED - && (dev == NULL || dev == cckdblk.cache[i].dev)) - { - cckdblk.cache[i].flags &= ~CCKD_CACHE_UPDATED; - cckdblk.cache[i].flags |= CCKD_CACHE_WRITE; - cckdblk.writepending++; - cckdtrc ("cckddasd: flush cache[%d] trk %d flushed\n", - i, cckdblk.cache[i].trk); - } - } + obtain_lock (&cckdblk.wrlock); + cache_lock (CACHE_DEVBUF); + rc = cache_scan (CACHE_DEVBUF, cckd_flush_cache_scan, dev); + cache_unlock (CACHE_DEVBUF); /* Schedule the writer if any writes are pending */ - if (cckdblk.writepending) + if (cckdblk.wrpending) { - if (cckdblk.writerswaiting) - signal_condition (&cckdblk.writercond); - else if (cckdblk.writers < cckdblk.writermax) + if (cckdblk.wrwaiting) + signal_condition (&cckdblk.wrcond); + else if (cckdblk.wrs < cckdblk.wrmax) create_thread (&tid, NULL, cckd_writer, NULL); } + release_lock (&cckdblk.wrlock); } +int cckd_flush_cache_scan (int *answer, int ix, int i, void *data) +{ +CCKDDASD_EXT *cckd; /* -> cckd extension */ +U16 devnum; /* Cached device number */ +U32 trk; /* Cached track */ +DEVBLK *dev = data; /* -> device block */ + UNREFERENCED(answer); + cckd = dev->cckd_ext; + CCKD_CACHE_GETKEY(i, devnum, trk); + if ((cache_getflag(ix,i) & CACHE_BUSY) == CCKD_CACHE_UPDATED + && dev->devnum == devnum) + { + cache_setflag (ix, i, ~CCKD_CACHE_UPDATED, CCKD_CACHE_WRITE); + ++cckd->wrpending; + ++cckdblk.wrpending; + cckdtrc ("cckddasd: flush cache[%d] %4.4X trk %d\n", + i, devnum, trk); + } + return 0; +} +void cckd_flush_cache_all() +{ +CCKDDASD_EXT *cckd; /* -> cckd extension */ +DEVBLK *dev; /* -> device block */ + + cckd_lock_devchain(0); + for (dev = cckdblk.dev1st; dev; dev = cckd->devnext) + { + cckd = dev->cckd_ext; + obtain_lock (&cckd->iolock); + if (!cckd->merging && !cckd->stopping) + cckd_flush_cache(dev); + release_lock (&cckd->iolock); + } + cckd_unlock_devchain(); +} /*-------------------------------------------------------------------*/ /* Purge cache entries for a device */ +/* */ +/* Caller holds the iolock */ +/* cache_lock is obtained and released */ /*-------------------------------------------------------------------*/ void cckd_purge_cache(DEVBLK *dev) { -int i; /* Index */ - /* Purge cache entries */ - for (i = 0; i < cckdblk.cachenbr; i++) - if (dev == NULL || dev == cckdblk.cache[i].dev) - { - cckdblk.cache[i].dev = NULL; - cckdblk.cache[i].trk = -1; - cckdblk.cache[i].age = cckdblk.cache[i].flags = 0; - if (dev == NULL && cckdblk.cache[i].buf) - { - free (cckdblk.cache[i].buf); - cckdblk.cache[i].buf = NULL; - } - if (dev) cckdtrc ("cckddasd: purge cache[%d]\n", i); - } + /* Scan cache and purge entries */ + cache_lock (CACHE_DEVBUF); + cache_scan (CACHE_DEVBUF, cckd_purge_cache_scan, dev); + cache_unlock (CACHE_DEVBUF); +} +int cckd_purge_cache_scan (int *answer, int ix, int i, void *data) +{ +U16 devnum; /* Cached device number */ +U32 trk; /* Cached track */ +DEVBLK *dev = data; /* -> device block */ - /* Signal any cache waiters */ - if (cckdblk.cachewaiting) signal_condition (&cckdblk.cachecond); + UNREFERENCED(answer); + CCKD_CACHE_GETKEY(i, devnum, trk); + if (dev->devnum == devnum) + { + cache_release (ix, i, 0); + cckdtrc ("cckddasd: purge cache[%d] %4.4X trk %d purged\n", + i, devnum, trk); + } + return 0; } /*-------------------------------------------------------------------*/ @@ -1435,185 +1410,107 @@ void cckd_writer() DEVBLK *dev; /* Device block */ CCKDDASD_EXT *cckd; /* -> cckd extension */ int writer; /* Writer identifier */ -int i, o; /* Indexes */ +int o; /* Cache entry found */ +U16 devnum; /* Device number */ BYTE *buf; /* Buffer */ -#if defined(CCKD_COMPRESS_ZLIB) || defined(CCKD_COMPRESS_BZIP2) -BYTE buf2[65536]; /* Compress buffer */ -unsigned long len2; /* Buffer 2 length */ -#endif BYTE *bufp; /* Buffer to be written */ -unsigned long len, bufl; /* Buffer lengths */ +int len, bufl; /* Buffer lengths */ int trk; /* Track number */ -BYTE compress; /* Compression algorithm */ +int comp; /* Compression algorithm */ int parm; /* Compression parameter */ TID tid; /* Writer thead id */ -int rc; /* Return code */ -BYTE stressed; /* Trk written under stress */ -BYTE *comp[] = {"none", "zlib", "bzip2"}; - - cckd = dev->cckd_ext; +U32 flag; /* Cache flag */ +char *compress[] = {"none", "zlib", "bzip2"}; +BYTE buf2[65536]; /* Compress buffer */ #ifndef WIN32 /* Set writer priority just below cpu priority to mimimize the compression effect */ - if(cckdblk.writerprio >= 0) - setpriority (PRIO_PROCESS, 0, cckdblk.writerprio); + if(cckdblk.wrprio >= 0) + setpriority (PRIO_PROCESS, 0, cckdblk.wrprio); #endif - obtain_lock (&cckdblk.cachelock); - writer = ++cckdblk.writers; + obtain_lock (&cckdblk.wrlock); + writer = ++cckdblk.wrs; /* Return without messages if too many already started */ - if (writer > cckdblk.writermax - && !(cckdblk.writermax == 0 && cckdblk.writepending)) + if (writer > cckdblk.wrmax && cckdblk.wrpending == 0) { - --cckdblk.writers; - release_lock (&cckdblk.cachelock); + --cckdblk.wrs; + release_lock (&cckdblk.wrlock); return; } if (!cckdblk.batch) - cckdmsg ("cckddasd: writer thread %d started: tid="TIDPAT", pid=%d\n", + logmsg (_("HHCCD002I Writer thread %d started: tid="TIDPAT", pid=%d\n"), writer, thread_id(), getpid()); - while (writer <= cckdblk.writermax || cckdblk.writepending) + while (writer <= cckdblk.wrmax || cckdblk.wrpending) { /* Wait for work */ - if (!cckdblk.writepending) + if (cckdblk.wrpending == 0) { - /* Wake up threads waiting for writes to finish */ - if (cckdblk.writewaiting - && cckdblk.writerswaiting + 1 >= cckdblk.writers) - broadcast_condition (&cckdblk.writecond); - - /* Wait for new work */ - cckdblk.writerswaiting++; - wait_condition (&cckdblk.writercond, &cckdblk.cachelock); - cckdblk.writerswaiting--; + cckdblk.wrwaiting++; + wait_condition (&cckdblk.wrcond, &cckdblk.wrlock); + cckdblk.wrwaiting--; } - /* Scan the cache for the oldest pending entry */ - for (o = -1, i = 0; i < cckdblk.cachenbr; i++) - if ((cckdblk.cache[i].flags & CCKD_CACHE_WRITE) - && (o == -1 || cckdblk.cache[i].age < cckdblk.cache[o].age)) - o = i; + /* Scan the cache for the oldest pending write */ + cache_lock (CACHE_DEVBUF); + o = cache_scan (CACHE_DEVBUF, cckd_writer_scan, NULL); /* Possibly shutting down if no writes pending */ if (o < 0) { - cckdblk.writepending = 0; + cache_unlock (CACHE_DEVBUF); + cckdblk.wrpending = 0; continue; } - - cckdblk.writepending--; - cckdblk.cache[o].flags &= ~CCKD_CACHE_WRITE; - cckdblk.cache[o].flags |= CCKD_CACHE_WRITING; + cache_setflag (CACHE_DEVBUF, o, ~CCKD_CACHE_WRITE, CCKD_CACHE_WRITING); + cache_unlock (CACHE_DEVBUF); /* Schedule the other writers if any writes are still pending */ - if (cckdblk.writepending) + cckdblk.wrpending--; + if (cckdblk.wrpending) { - if (cckdblk.writerswaiting) - signal_condition (&cckdblk.writercond); - else if (cckdblk.writers < cckdblk.writermax) + if (cckdblk.wrwaiting) + signal_condition (&cckdblk.wrcond); + else if (cckdblk.wrs < cckdblk.wrmax) create_thread (&tid, NULL, cckd_writer, NULL); } + release_lock (&cckdblk.wrlock); - release_lock (&cckdblk.cachelock); - - /* Compress the track image */ - buf = cckdblk.cache[o].buf; - dev = cckdblk.cache[o].dev; + /* Prepare to compress */ + CCKD_CACHE_GETKEY(o, devnum, trk); + dev = cckd_find_device_by_devnum (devnum); cckd = dev->cckd_ext; + buf = cache_getbuf(CACHE_DEVBUF, o, 0); len = cckd_trklen (dev, buf); - trk = cckdblk.cache[o].trk; - compress = (len < CCKD_COMPRESS_MIN ? - CCKD_COMPRESS_NONE : cckd->cdevhdr[cckd->sfn].compress); - parm = cckd->cdevhdr[cckd->sfn].compress_parm; + comp = len < CCKD_COMPRESS_MIN ? CCKD_COMPRESS_NONE + : cckdblk.comp < 0 ? cckd->cdevhdr[cckd->sfn].compress + : cckdblk.comp; + parm = cckdblk.compparm < 0 + ? cckd->cdevhdr[cckd->sfn].compress_parm + : cckdblk.compparm; /* Stress adjustments */ - if (((cckdblk.cache[o].flags & CCKD_CACHE_WRITEWAIT) - || cckdblk.cachewaiting - || cckdblk.writepending > (cckdblk.cachenbr - (cckdblk.cachenbr >> 2))) + if ((cache_waiters(CACHE_DEVBUF) || cache_busy(CACHE_DEVBUF) > 90) && !cckdblk.nostress) { - stressed = 1; cckdblk.stats_stresswrites++; - if (len < CCKD_STRESS_MINLEN) - compress = CCKD_COMPRESS_NONE; - else - compress = CCKD_STRESS_COMP; - if (cckdblk.writepending < cckdblk.cachenbr - (cckdblk.cachenbr >> 2) + 8) - parm = CCKD_STRESS_PARM1; - else - parm = CCKD_STRESS_PARM2; - if (cckd->cdevhdr[cckd->sfn].compress_parm >= 0 - && cckd->cdevhdr[cckd->sfn].compress_parm < parm) - parm = cckd->cdevhdr[cckd->sfn].compress_parm; + comp = len < CCKD_STRESS_MINLEN ? + CCKD_COMPRESS_NONE : CCKD_STRESS_COMP; + parm = cache_busy(CACHE_DEVBUF) <= 95 ? + CCKD_STRESS_PARM1 : CCKD_STRESS_PARM2; } - else stressed = 0; + /* Compress the track image */ cckdtrc ("cckddasd: %d wrtrk[%d] %d comp %s parm %d\n", - writer, o, cckdblk.cache[o].trk, comp[compress], parm); - - switch (compress) { - -#ifdef CCKD_COMPRESS_ZLIB - case CCKD_COMPRESS_ZLIB: - memcpy (&buf2, buf, CKDDASD_TRKHDR_SIZE); - buf2[0] = CCKD_COMPRESS_ZLIB; - len2 = 65535 - CKDDASD_TRKHDR_SIZE; - rc = compress2 (&buf2[CKDDASD_TRKHDR_SIZE], &len2, - &buf[CKDDASD_TRKHDR_SIZE], len - CKDDASD_TRKHDR_SIZE, - parm); - len2 += CKDDASD_TRKHDR_SIZE; - cckdtrc ("cckddasd: writer[%d] compress trk %d len %lu rc=%d\n", - writer, trk, len2, rc); - if (rc != Z_OK || len2 >= len) - { - bufp = buf; - bufl = len; - } - else - { - bufp = (BYTE *)&buf2; - bufl = len2; - } - break; -#endif - -#ifdef CCKD_COMPRESS_BZIP2 - case CCKD_COMPRESS_BZIP2: - memcpy (&buf2, buf, CKDDASD_TRKHDR_SIZE); - buf2[0] = CCKD_COMPRESS_BZIP2; - len2 = 65535 - CKDDASD_TRKHDR_SIZE; - rc = BZ2_bzBuffToBuffCompress ( - &buf2[CKDDASD_TRKHDR_SIZE], (unsigned int *)&len2, - &buf[CKDDASD_TRKHDR_SIZE], len - CKDDASD_TRKHDR_SIZE, - parm >= 1 && parm <= 9 ? parm : 5, 0, 0); - len2 += CKDDASD_TRKHDR_SIZE; - cckdtrc ("cckddasd: %d writer compress trk %d len %lu rc=%d\n", - writer, trk, len2, rc); - if (rc != BZ_OK || len2 >= len) - { - bufp = buf; - bufl = len; - } - else - { - bufp = (BYTE *)&buf2; - bufl = len2; - } - break; -#endif - - default: - case CCKD_COMPRESS_NONE: - buf[0] = CCKD_COMPRESS_NONE; - bufp = buf; - bufl = len; - rc = 0; - break; - } /* switch (compress) */ + writer, o, trk, compress[comp], parm); + bufp = (BYTE *)&buf2; + bufl = cckd_compress(dev, &bufp, buf, len, comp, parm); + cckdtrc ("cckddasd: %d wrtrk[%d] %d compressed length %d\n", + writer, o, trk, bufl); obtain_lock (&cckd->filelock); @@ -1630,35 +1527,44 @@ BYTE *comp[] = {"none", "zlib", "bzip2"}; release_lock (&cckd->filelock); /* Schedule the garbage collector */ - if (cckdblk.gcols < cckdblk.gcolmax) + if (cckdblk.gcs < cckdblk.gcmax) create_thread (&tid, NULL, cckd_gcol, NULL); - obtain_lock (&cckdblk.cachelock); - cckdblk.cache[o].flags &= ~CCKD_CACHE_WRITING; - if (cckdblk.cache[o].flags & CCKD_CACHE_WRITEWAIT) + obtain_lock (&cckd->iolock); + cache_lock (CACHE_DEVBUF); + flag = cache_setflag (CACHE_DEVBUF, o, ~CCKD_CACHE_WRITING, 0); + cache_unlock (CACHE_DEVBUF); + cckd->wrpending--; + if (cckd->iowaiters && ((flag & CCKD_CACHE_IOWAIT) || !cckd->wrpending)) { cckdtrc ("cckddasd: writer[%d] cache[%2.2d] %d signalling write complete\n", writer, o, trk); - signal_condition (&cckd->writecond); - } - else if (cckdblk.cachewaiting && !(cckdblk.cache[o].flags & CCKD_CACHE_BUSY)) - { cckdtrc ("cckddasd: writer[%d] cache[%2.2d] %d signalling" - " cache entry available\n", writer, o, trk); - signal_condition (&cckdblk.cachecond); + broadcast_condition (&cckd->iocond); } + release_lock(&cckd->iolock); cckdtrc ("cckddasd: %d wrtrk[%2.2d] %d complete flags:%8.8x\n", - writer, o, cckdblk.cache[o].trk, cckdblk.cache[o].flags); + writer, o, trk, cache_getflag(CACHE_DEVBUF,o)); + obtain_lock(&cckdblk.wrlock); } if (!cckdblk.batch) - cckdmsg ("cckddasd: writer thread %d stopping: tid="TIDPAT", pid=%d\n", + logmsg (_("HHCCD012I Writer thread %d stopping: tid="TIDPAT", pid=%d\n"), writer, thread_id(), getpid()); - cckdblk.writers--; - if (!cckdblk.writers) signal_condition(&cckdblk.termcond); - release_lock(&cckdblk.cachelock); + cckdblk.wrs--; + if (cckdblk.wrs == 0) signal_condition(&cckdblk.termcond); + release_lock(&cckdblk.wrlock); } /* end thread cckd_writer */ +int cckd_writer_scan (int *o, int ix, int i, void *data) +{ + UNREFERENCED(data); + if ((cache_getflag(ix,i) & DEVBUF_TYPE_COMP) + && (cache_getflag(ix,i) & CCKD_CACHE_WRITE) + && (*o == -1 || cache_getage(ix, i) < cache_getage(ix, *o))) + *o = i; + return 0; +} /*-------------------------------------------------------------------*/ /* Get file space */ @@ -1685,22 +1591,21 @@ struct stat st; /* File status area */ len + CCKD_FREEBLK_SIZE <= cckd->cdevhdr[sfx].free_largest)) { /* no free space big enough; add space to end of the file */ fpos = cckd->cdevhdr[sfx].size; - if ((U64)(fpos + len) > 4294967295ULL) + if (((U64)((U64)fpos + (U64)len)) > ((U64)4294967295ULL)) { - devmsg("%4.4X:cckddasd file[%d] get space error, size exceeds 4G\n", - dev->devnum, sfx); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD102E file[%d] get space error, size exceeds 4G\n"), sfx); return -1; } rc = fstat (cckd->fd[sfx], &st); if (rc < 0) { - devmsg("%4.4X:cckddasd file[%d] get space fstat error, size %llx: %s\n", - dev->devnum, sfx, (long long)cckd->cdevhdr[sfx].size, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD103E file[%d] get space fstat error, size %llx: %s\n"), + sfx, (long long)cckd->cdevhdr[sfx].size, strerror(errno)); return -1; } - if (fpos + len > st.st_size) + if ((off_t)(fpos + len) > (off_t)st.st_size) { int sz = fpos + len; /* FIXME - workaround for ftruncate() linux problem */ @@ -1715,16 +1620,36 @@ struct stat st; /* File status area */ cckd->fd[sfx] = open (sfn, O_RDWR|O_BINARY); if (cckd->fd[sfx] < 0) { - devmsg ("%4.4X:cckddasd truncate re-open error: %s\n", - dev->devnum, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD104E truncate re-open error: %s\n"), + strerror(errno)); return -1; } } rc = ftruncate (cckd->fd[sfx], sz); + + /* Turns out certain linux file-systems (eg FAT) don't allow + us to *increase* the size of the file using ftruncate + (which implies `sparse' blocks or whatever). So try to + write zeroes if an error occurred. */ + if (rc < 0) + { + BYTE zbuf[1024]; + unsigned int l = sz - st.st_size; + off_t rcoff = lseek (cckd->fd[sfx], (off_t)st.st_size, SEEK_SET); + if (rcoff >= 0) + { + memset(zbuf, 0, sizeof(zbuf)); + do { + rc = write (cckd->fd[sfx], zbuf, l < sizeof(zbuf) ? l : sizeof(zbuf)); + l -= sizeof(zbuf); + } while (rc > 0 && l > 0); + } + } + if (rc < 0) { - devmsg("%4.4X:cckddasd file[%d] get space ftruncate error, size %llx: %s\n", - dev->devnum, sfx, (long long)cckd->cdevhdr[sfx].size, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD105E file[%d] get space ftruncate error, size %llx: %s\n"), + sfx, (long long)cckd->cdevhdr[sfx].size, strerror(errno)); return -1; } } @@ -1800,7 +1725,6 @@ struct stat st; /* File status area */ } /* end function cckd_get_space */ - /*-------------------------------------------------------------------*/ /* Release file space */ /*-------------------------------------------------------------------*/ @@ -1927,7 +1851,6 @@ int sfx; /* Shadow file index */ } /* end function cckd_rel_space */ - /*-------------------------------------------------------------------*/ /* Release free space at end of file */ /*-------------------------------------------------------------------*/ @@ -1973,7 +1896,6 @@ int sfx; /* Shadow file index */ } /* end function cckd_rel_free_atend */ - /*-------------------------------------------------------------------*/ /* Flush pending free space */ /*-------------------------------------------------------------------*/ @@ -1986,6 +1908,7 @@ U32 ppos, pos; /* Free space offsets */ cckd = dev->cckd_ext; sfx = cckd->sfn; + if (cckd->cdevhdr[sfx].free_number == 0) return; cckdtrc ("cckddasd: rel_flush_space nbr %d\n", cckd->cdevhdr[sfx].free_number); @@ -2036,7 +1959,6 @@ U32 ppos, pos; /* Free space offsets */ } /* end function cckd_flush_space */ - /*-------------------------------------------------------------------*/ /* Read compressed dasd header */ /*-------------------------------------------------------------------*/ @@ -2057,8 +1979,8 @@ int fend,mend; /* Byte order indicators */ rcoff = lseek(cckd->fd[sfx], CKDDASD_DEVHDR_SIZE, SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd file[%d] hdr lseek error, offset %llx: %s\n", - dev->devnum, sfx, (long long)CKDDASD_DEVHDR_SIZE, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD106E file[%d] hdr lseek error, offset %llx: %s\n"), + sfx, (long long)CKDDASD_DEVHDR_SIZE, strerror(errno)); return -1; } @@ -2066,8 +1988,8 @@ int fend,mend; /* Byte order indicators */ rc = read (cckd->fd[sfx], &cckd->cdevhdr[sfx], CCKDDASD_DEVHDR_SIZE); if (rc != CCKDDASD_DEVHDR_SIZE) { - devmsg ("%4.4X:cckddasd file[%d] chdr read error, offset %llx: %s\n", - dev->devnum, sfx, (long long)CKDDASD_DEVHDR_SIZE, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD107E file[%d] chdr read error, offset %llx: %s\n"), + sfx, (long long)CKDDASD_DEVHDR_SIZE, strerror(errno)); return -1; } @@ -2079,7 +2001,7 @@ int fend,mend; /* Byte order indicators */ { if (cckd->open[sfx] == CCKD_OPEN_RW) { - rc = cckd_swapend (cckd->fd[sfx], dev->msgpipew); + rc = cckd_swapend (cckd->fd[sfx], stdout); if (rc < 0) return -1; return cckd_read_chdr (dev); } @@ -2094,7 +2016,6 @@ int fend,mend; /* Byte order indicators */ } /* end function cckd_read_chdr */ - /*-------------------------------------------------------------------*/ /* Write compressed dasd header */ /*-------------------------------------------------------------------*/ @@ -2111,15 +2032,15 @@ int sfx; /* File index */ rcoff = lseek(cckd->fd[sfx], CKDDASD_DEVHDR_SIZE, SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd file[%d] chdr lseek error, offset %llx: %s\n", - dev->devnum, sfx, (long long)CKDDASD_DEVHDR_SIZE, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD108E file[%d] chdr lseek error, offset %llx: %s\n"), + sfx, (long long)CKDDASD_DEVHDR_SIZE, strerror(errno)); return -1; } rc = write (cckd->fd[sfx], &cckd->cdevhdr[sfx], CCKDDASD_DEVHDR_SIZE); if (rc < CCKDDASD_DEVHDR_SIZE) { - devmsg ("%4.4X:cckddasd file[%d] chdr write error, offset %llx: %s\n", - dev->devnum, sfx, (long long)CKDDASD_DEVHDR_SIZE, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD109E file[%d] chdr write error, offset %llx: %s\n"), + sfx, (long long)CKDDASD_DEVHDR_SIZE, strerror(errno)); return -1; } @@ -2127,7 +2048,6 @@ int sfx; /* File index */ } /* end function cckd_write_chdr */ - /*-------------------------------------------------------------------*/ /* Read the level 1 table */ /*-------------------------------------------------------------------*/ @@ -2150,8 +2070,8 @@ int len; /* Length of level 1 table */ cckd->l1[sfx] = malloc (len); if (cckd->l1[sfx] == NULL) { - devmsg ("%4.4X:cckddasd l1 table malloc error: %s\n", - dev->devnum, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD110E l1 table malloc error: %s\n"), + strerror(errno)); return -1; } @@ -2159,15 +2079,15 @@ int len; /* Length of level 1 table */ rcoff = lseek (cckd->fd[sfx], CCKD_L1TAB_POS, SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd file[%d] l1 lseek error, offset %llx: %s\n", - dev->devnum, sfx, (long long)CCKD_L1TAB_POS, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD111E file[%d] l1 lseek error, offset %llx: %s\n"), + sfx, (long long)CCKD_L1TAB_POS, strerror(errno)); return -1; } rc = read(cckd->fd[sfx], cckd->l1[sfx], len); if (rc != len) { - devmsg ("%4.4X:cckddasd file[%d] l1 read error, offset %llx: %s\n", - dev->devnum, sfx, (long long)CCKD_L1TAB_POS, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD112E file[%d] l1 read error, offset %llx: %s\n"), + sfx, (long long)CCKD_L1TAB_POS, strerror(errno)); return -1; } if (cckd->swapend[sfx]) @@ -2180,7 +2100,6 @@ int len; /* Length of level 1 table */ } /* end function cckd_read_l1 */ - /*-------------------------------------------------------------------*/ /* Write the level 1 table */ /*-------------------------------------------------------------------*/ @@ -2199,15 +2118,15 @@ int len; /* Length of level 1 table */ rcoff = lseek (cckd->fd[sfx], CCKD_L1TAB_POS, SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd file[%d] l1 lseek error, offset %llx: %s\n", - dev->devnum, sfx, (long long)CCKD_L1TAB_POS, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD113E file[%d] l1 lseek error, offset %llx: %s\n"), + sfx, (long long)CCKD_L1TAB_POS, strerror(errno)); return -1; } rc = write (cckd->fd[sfx], cckd->l1[sfx], len); if (rc != len) { - devmsg ("%4.4X:cckddasd file[%d] l1 write error, offset %llx: %s\n", - dev->devnum, sfx, (long long)CCKD_L1TAB_POS, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD114E file[%d] l1 write error, offset %llx: %s\n"), + sfx, (long long)CCKD_L1TAB_POS, strerror(errno)); return -1; } @@ -2218,7 +2137,6 @@ int len; /* Length of level 1 table */ } /* end function cckd_write_l1 */ - /*-------------------------------------------------------------------*/ /* Update a level 1 table entry */ /*-------------------------------------------------------------------*/ @@ -2237,15 +2155,15 @@ off_t l1pos; /* Offset to l1 entry */ rcoff = lseek (cckd->fd[sfx], l1pos, SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd file[%d] l1[%d] lseek error, offset %llx: %s\n", - dev->devnum, sfx, l1x, (long long)l1pos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD115E file[%d] l1[%d] lseek error, offset %llx: %s\n"), + sfx, l1x, (long long)l1pos, strerror(errno)); return -1; } rc = write (cckd->fd[sfx], &cckd->l1[sfx][l1x], CCKD_L1ENT_SIZE); if (rc != CCKD_L1ENT_SIZE) { - devmsg ("%4.4X:cckddasd file[%d] l1[%d] write error, offset %llx: %s\n", - dev->devnum, sfx, l1x, (long long)l1pos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD116E file[%d] l1[%d] write error, offset %llx: %s\n"), + sfx, l1x, (long long)l1pos, strerror(errno)); return -1; } @@ -2256,7 +2174,6 @@ off_t l1pos; /* Offset to l1 entry */ } /* end function cckd_write_l1ent */ - /*-------------------------------------------------------------------*/ /* Initial read */ /*-------------------------------------------------------------------*/ @@ -2275,15 +2192,15 @@ int sfx; /* File index */ rcoff = lseek (cckd->fd[sfx], 0, SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd file[%d] devhdr lseek error, offset %llx: %s\n", - dev->devnum, sfx, (long long)0, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD117E file[%d] devhdr lseek error, offset %llx: %s\n"), + sfx, (long long)0, strerror(errno)); return -1; } rc = read (cckd->fd[sfx], &devhdr, CKDDASD_DEVHDR_SIZE); if (rc != CKDDASD_DEVHDR_SIZE) { - devmsg ("%4.4X:cckddasd file[%d] devhdr read error, offset %llx: %s\n", - dev->devnum, sfx, (long long)0, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD118E file[%d] devhdr read error, offset %llx: %s\n"), + sfx, (long long)0, strerror(errno)); return -1; } @@ -2295,8 +2212,8 @@ int sfx; /* File index */ else if (!(sfx && memcmp (&devhdr.devid, "CKD_S370", 8) == 0 && cckd->ckddasd) && !(sfx && memcmp (&devhdr.devid, "FBA_S370", 8) == 0 && cckd->fbadasd)) { - devmsg ("%4.4X:cckddasd file[%d] devhdr id error\n", - dev->devnum, sfx); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD119E file[%d] devhdr id error\n"), + sfx); return -1; } @@ -2311,7 +2228,6 @@ int sfx; /* File index */ return 0; } /* end function cckd_read_init */ - /*-------------------------------------------------------------------*/ /* Read the free space */ /*-------------------------------------------------------------------*/ @@ -2338,8 +2254,8 @@ int i; /* Index */ cckd->free = calloc (cckd->freenbr, CCKD_FREEBLK_ISIZE); if (!cckd->free) { - devmsg ("%4.4X:cckddasd: calloc failed for free space, size %d: %s\n", - dev->devnum, cckd->freenbr * CCKD_FREEBLK_ISIZE, + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD120E calloc failed for free space, size %d: %s\n"), + cckd->freenbr * CCKD_FREEBLK_ISIZE, strerror(errno)); return -1; } @@ -2353,15 +2269,15 @@ int i; /* Index */ rcoff = lseek (cckd->fd[sfx], fpos, SEEK_SET); if (rcoff < 0) { - devmsg("%4.4X:cckddasd file[%d] free space lseek error, offset %llx: %s\n", - dev->devnum, sfx, (long long)fpos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD121E file[%d] free space lseek error, offset %llx: %s\n"), + sfx, (long long)fpos, strerror(errno)); return -1; } rc = read (cckd->fd[sfx], &cckd->free[0], CCKD_FREEBLK_SIZE); if (rc < CCKD_FREEBLK_SIZE) { - devmsg("%4.4X:cckddasd file[%d] free space read error, offset %llx: %s\n", - dev->devnum, sfx, (long long)fpos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD122E file[%d] free space read error, offset %llx: %d,%d %s\n"), + sfx, (long long)fpos, rc, CCKD_FREEBLK_SIZE, strerror(errno)); return -1; } if (fpos + cckd->free[0].len == cckd->cdevhdr[sfx].size) @@ -2373,8 +2289,8 @@ int i; /* Index */ rc = ftruncate (cckd->fd[sfx], (off_t)cckd->cdevhdr[sfx].size); if (rc < 0) { - devmsg("%4.4X:cckddasd file[%d] free space ftruncate error, size %llx: %s\n", - dev->devnum, sfx, (long long)cckd->cdevhdr[sfx].size, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD123E file[%d] free space ftruncate error, size %llx: %s\n"), + sfx, (long long)cckd->cdevhdr[sfx].size, strerror(errno)); return -1; } } @@ -2390,15 +2306,17 @@ int i; /* Index */ rcoff = lseek (cckd->fd[sfx], fpos, SEEK_SET); if (rcoff < 0) { - devmsg("%4.4X:cckddasd file[%d] free space lseek error, offset %llx: %s\n", - dev->devnum, sfx, (long long)fpos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD124E file[%d] free space lseek error, offset %llx: %s\n"), + sfx, (long long)fpos, strerror(errno)); return -1; } rc = read (cckd->fd[sfx], &cckd->free[i], CCKD_FREEBLK_SIZE); if (rc < CCKD_FREEBLK_SIZE) { - devmsg("%4.4X:cckddasd file[%d] free space read error, offset %llx: %s\n", - dev->devnum, sfx, (long long)fpos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD125E file[%d] free space read error, offset %llx: %d,%d,%d %s\n"), + sfx, (long long)fpos, rc, CCKD_FREEBLK_SIZE, errno, strerror(errno)); +cckd_print_itrace(); +sleep(600); return -1; } cckd->free[i].prev = i - 1; @@ -2452,15 +2370,15 @@ int i; /* Index */ rcoff = lseek (cckd->fd[sfx], fpos, SEEK_SET); if (rcoff < 0) { - devmsg("%4.4X:cckddasd file[%d] free space lseek error, offset %llx: %s\n", - dev->devnum, sfx, (long long)fpos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD126E file[%d] free space lseek error, offset %llx: %s\n"), + sfx, (long long)fpos, strerror(errno)); return -1; } rc = write (cckd->fd[sfx], &cckd->free[i], CCKD_FREEBLK_SIZE); if (rc < CCKD_FREEBLK_SIZE) { - devmsg("%4.4X:cckddasd file[%d] free space write error, offset %llx: %s\n", - dev->devnum, sfx, (long long)fpos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD127E file[%d] free space write error, offset %llx: %s\n"), + sfx, (long long)fpos, strerror(errno)); return -1; } fpos = (off_t)cckd->free[i].pos; @@ -2477,7 +2395,6 @@ int i; /* Index */ } /* end function cckd_write_fsp */ - /*-------------------------------------------------------------------*/ /* Read a new level 2 table */ /*-------------------------------------------------------------------*/ @@ -2486,100 +2403,59 @@ int cckd_read_l2 (DEVBLK *dev, int sfx, int l1x) CCKDDASD_EXT *cckd; /* -> cckd extension */ int rc; /* Return code */ off_t rcoff; /* lseek() return value */ -int i; /* Index variable */ -int fnd=-1; /* Cache index for hit */ -int lru=-1; /* Least-Recently-Used cache - index */ +int fnd; /* Found cache */ +int lru; /* Oldest available cache */ +CCKD_L2ENT *buf; /* -> Cache buffer */ cckd = dev->cckd_ext; /* return if table is already active */ if (sfx == cckd->sfx && l1x == cckd->l1x) return 0; - obtain_lock (&cckdblk.l2cachelock); + cache_lock(CACHE_L2); /* Inactivate the previous entry */ - if (cckd->l2active) - cckd->l2active->flags &= ~CCKD_CACHE_ACTIVE; - cckd->l2active = (void *)cckd->l2 = NULL; - cckd->sfx = cckd->l1x = -1; - -cckd_read_l2_retry: + if (cckd->l2active >= 0) + cache_setflag(CACHE_L2, cckd->l2active, ~L2_CACHE_ACTIVE, 0); + cckd->l2 = NULL; + cckd->l2active = cckd->sfx = cckd->l1x = -1; /* scan the cache array for the l2tab */ - for (i = 0; i < cckdblk.l2cachenbr; i++) - { - if (sfx == cckdblk.l2cache[i].sfx - && l1x == cckdblk.l2cache[i].l1x - && dev == cckdblk.l2cache[i].dev) - { fnd = i; - break; - } - /* find the oldest entry */ - if ((lru == - 1 || cckdblk.l2cache[i].age < cckdblk.l2cache[lru].age) - && !(cckdblk.l2cache[i].flags & CCKD_CACHE_BUSY)) - lru = i; - } + fnd = cache_lookup (CACHE_L2, L2_CACHE_SETKEY(sfx, dev->devnum, l1x), &lru); /* check for level 2 cache hit */ if (fnd >= 0) { cckdtrc ("cckddasd: l2[%d,%d] cache[%d] hit\n", sfx, l1x, fnd); - cckdblk.l2cache[fnd].age = ++cckdblk.cacheage; - cckdblk.l2cache[fnd].flags = CCKD_CACHE_ACTIVE; + cache_setflag (CACHE_L2, fnd, 0, L2_CACHE_ACTIVE); + cache_setage (CACHE_L2, fnd); cckdblk.stats_l2cachehits++; - release_lock (&cckdblk.l2cachelock); + cache_unlock (CACHE_L2); cckd->sfx = sfx; cckd->l1x = l1x; - cckd->l2 = (CCKD_L2ENT *)cckdblk.l2cache[fnd].buf; - cckd->l2active = &cckdblk.l2cache[fnd]; + cckd->l2 = cache_getbuf(CACHE_L2, fnd, 0); + cckd->l2active = fnd; return 1; } - cckdtrc ("cckddasd: l2[%d,%d] cache[%d] miss\n", sfx, l1x, lru); - /* Check if an available entry was found */ - if (lru < 0) - { - int j = 8; - if (cckdblk.l2cachenbr + j > CCKD_MAX_L2CACHE) - j = CCKD_MAX_L2CACHE - cckdblk.l2cachenbr; - if (j > 0) - { - cckdblk.l2cachenbr += j; - devmsg ("%4.4X:cckddasd: expanding l2 cache to %d\n", - dev->devnum, cckdblk.l2cachenbr); - goto cckd_read_l2_retry; - } - devmsg ("%4.4X:cckddasd: No available l2 cache entry !!\n", - dev->devnum); - return -1; - } + cckdtrc ("cckddasd: l2[%d,%d] cache[%d] miss\n", sfx, l1x, lru); - /* get buffer for level 2 table if there isn't one */ - if (!cckdblk.l2cache[lru].buf) - { - cckdblk.l2cache[lru].buf = malloc (CCKD_L2TAB_SIZE); - if (!cckdblk.l2cache[lru].buf) - { - devmsg ("cckddasd: malloc failed for l2 buffer, size %d: %s\n", - CCKD_L2TAB_SIZE, strerror(errno)); - cckdblk.l2cache[lru].flags = CCKD_CACHE_INVALID; - goto cckd_read_l2_retry; - } - } + /* Steal an entry if all are busy */ + if (lru < 0) lru = cckd_steal_l2(); - cckdblk.l2cache[lru].dev = dev; - cckdblk.l2cache[lru].sfx = sfx; - cckdblk.l2cache[lru].l1x = l1x; - cckdblk.l2cache[lru].age = ++cckdblk.cacheage; - cckdblk.l2cache[lru].flags = CCKD_CACHE_ACTIVE; + /* Make the entry active */ + cache_setkey (CACHE_L2, lru, L2_CACHE_SETKEY(sfx, dev->devnum, l1x)); + cache_setflag (CACHE_L2, lru, 0, L2_CACHE_ACTIVE); + cache_setage (CACHE_L2, lru); + buf = cache_getbuf(CACHE_L2, lru, CCKD_L2TAB_SIZE); cckdblk.stats_l2cachemisses++; - release_lock (&cckdblk.l2cachelock); + cache_unlock (CACHE_L2); + if (buf == NULL) return -1; /* check for null table */ if (!cckd->l1[sfx][l1x] || cckd->l1[sfx][l1x] == 0xffffffff) { - memset (cckdblk.l2cache[lru].buf, cckd->l1[sfx][l1x] & 0xff, CCKD_L2TAB_SIZE); + memset (buf, cckd->l1[sfx][l1x] & 0xff, CCKD_L2TAB_SIZE); cckdtrc ("cckddasd: l2[%d,%d] cache[%d] null\n", sfx, l1x, lru); } /* read the new level 2 table */ @@ -2588,23 +2464,27 @@ int lru=-1; /* Least-Recently-Used cache rcoff = lseek (cckd->fd[sfx], (off_t)cckd->l1[sfx][l1x], SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd: file[%d] l2[%d] lseek error offset %lld: %s\n", - dev->devnum, sfx, l1x, (long long)cckd->l1[sfx][l1x], + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD128E file[%d] l2[%d] lseek error offset %lld: %s\n"), + sfx, l1x, (long long)cckd->l1[sfx][l1x], strerror(errno)); - cckdblk.l2cache[lru].flags = 0; + cache_lock(CACHE_L2); + cache_setflag(CACHE_L2, lru, 0, 0); + cache_unlock(CACHE_L2); return -1; } - rc = read (cckd->fd[sfx], cckdblk.l2cache[lru].buf, CCKD_L2TAB_SIZE); + rc = read (cckd->fd[sfx], buf, CCKD_L2TAB_SIZE); if (rc < CCKD_L2TAB_SIZE) { - devmsg ("%4.4X:cckddasd: file[%d] l2[%d] read error offset %lld: %s\n", - dev->devnum, sfx, l1x, (long long)cckd->l1[sfx][l1x], + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD129E file[%d] l2[%d] read error offset %lld: %s\n"), + sfx, l1x, (long long)cckd->l1[sfx][l1x], strerror(errno)); - cckdblk.l2cache[lru].flags = 0; + cache_lock(CACHE_L2); + cache_setflag(CACHE_L2, lru, 0, 0); + cache_unlock(CACHE_L2); return -1; } if (cckd->swapend[sfx]) - cckd_swapend_l2 ((CCKD_L2ENT *)cckdblk.l2cache[lru].buf); + cckd_swapend_l2 (buf); cckdtrc ("cckddasd: file[%d] cache[%d] l2[%d] read offset 0x%llx\n", sfx, lru, l1x, (long long)cckd->l1[sfx][l1x]); cckd->l2reads[sfx]++; @@ -2614,52 +2494,75 @@ int lru=-1; /* Least-Recently-Used cache cckd->sfx = sfx; cckd->l1x = l1x; - cckd->l2 = (CCKD_L2ENT *)cckdblk.l2cache[lru].buf; - cckd->l2active = &cckdblk.l2cache[lru]; + cckd->l2 = buf; + cckd->l2active = lru; return 0; } /* end function cckd_read_l2 */ - /*-------------------------------------------------------------------*/ -/* Purge all l2tab cache entries for a given index */ +/* Purge all l2tab cache entries for a given device */ /*-------------------------------------------------------------------*/ void cckd_purge_l2 (DEVBLK *dev) { CCKDDASD_EXT *cckd; /* -> cckd extension */ -int i; /* Index variable */ - /* scan the cache array for l2tabs matching this index */ - obtain_lock (&cckdblk.l2cachelock); + cckd = dev->cckd_ext; - /* Invalidate the active entry */ - if (dev != NULL) - { - cckd = dev->cckd_ext; - cckd->sfx = cckd->l1x = -1; - cckd->l2 = (void *)cckd->l2active = NULL; - } + cache_lock (CACHE_L2); + cckd->l2active = cckd->sfx = cckd->l1x = -1; + cckd->l2 = NULL; + cache_scan (CACHE_L2, cckd_purge_l2_scan, dev); + cache_unlock (CACHE_L2); +} +int cckd_purge_l2_scan (int *answer, int ix, int i, void *data) +{ +U16 sfx; /* Cached suffix */ +U16 devnum; /* Cached device number */ +U32 l1x; /* Cached level 1 index */ +DEVBLK *dev = data; /* -> device block */ - for (i = 0; i < cckdblk.l2cachenbr && cckdblk.l2cache; i++) + UNREFERENCED(answer); + L2_CACHE_GETKEY(i, sfx, devnum, l1x); + if (dev == NULL || devnum == dev->devnum) { - if (dev == NULL || dev == cckdblk.l2cache[i].dev) - { - /* Invalidate the cache entry */ - cckdblk.l2cache[i].dev = NULL; - cckdblk.l2cache[i].sfx = cckdblk.l2cache[i].l1x = -1; - cckdblk.l2cache[i].age = cckdblk.l2cache[i].flags = 0; - if (dev == NULL && cckdblk.l2cache[i].buf) - { - free (cckdblk.l2cache[i].buf); - cckdblk.l2cache[i].buf = NULL; - } - } + cckdtrc ("cckddasd: purge l2cache[%d] %4.4X sfx %d ix %d purged\n", + i, devnum, sfx, l1x); + cache_release(ix, i, 0); } - release_lock (&cckdblk.l2cachelock); - -} /* end function cckd_purge_l2 */ + return 0; +} +/*-------------------------------------------------------------------*/ +/* Steal an l2tab cache entry */ +/*-------------------------------------------------------------------*/ +int cckd_steal_l2 () +{ +DEVBLK *dev; /* -> device block */ +CCKDDASD_EXT *cckd; /* -> cckd extension */ +int i; /* Stolen cache index */ +U16 sfx; /* Cached suffix */ +U16 devnum; /* Cached device number */ +U32 l1x; /* Cached level 1 index */ + + i = cache_scan (CACHE_L2, cckd_steal_l2_scan, NULL); + L2_CACHE_GETKEY(i, sfx, devnum, l1x); + dev = cckd_find_device_by_devnum(devnum); + cckd = dev->cckd_ext; + cckd->l2active = cckd->sfx = cckd->l1x = -1; + cckd->l2 = NULL; + cache_release(CACHE_L2, i, 0); + return i; +} +int cckd_steal_l2_scan (int *answer, int ix, int i, void *data) +{ + UNREFERENCED(data); + if (*answer < 0) *answer = i; + else if (cache_getage(ix, i) < cache_getage(ix, *answer)) + *answer = i; + return 0; +} /*-------------------------------------------------------------------*/ /* Write the current level 2 table */ @@ -2691,15 +2594,15 @@ off_t rcoff; /* lseek() return value */ rcoff = lseek (cckd->fd[sfx], l2pos, SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd: file[%d] l2[%d] lseek error offset %lld: %s\n", - dev->devnum, sfx, l1x, (long long)l2pos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD130E file[%d] l2[%d] lseek error offset %lld: %s\n"), + sfx, l1x, (long long)l2pos, strerror(errno)); return -1; } rc = write (cckd->fd[sfx], cckd->l2, CCKD_L2TAB_SIZE); if (rc < CCKD_L2TAB_SIZE) { - devmsg ("%4.4X:cckddasd: file[%d] l2[%d] write error offset %lld: %s\n", - dev->devnum, sfx, l1x, (long long)l2pos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD131E file[%d] l2[%d] write error offset %lld: %s\n"), + sfx, l1x, (long long)l2pos, strerror(errno)); return -1; } cckdtrc ("cckddasd: file[%d] l2[%d] written offset 0x%llx\n", @@ -2717,7 +2620,6 @@ off_t rcoff; /* lseek() return value */ } /* end function cckd_write_l2 */ - /*-------------------------------------------------------------------*/ /* Return a level 2 entry */ /*-------------------------------------------------------------------*/ @@ -2754,7 +2656,6 @@ int sfx,l1x,l2x; /* Lookup table indices */ } /* end function cckd_read_l2ent */ - /*-------------------------------------------------------------------*/ /* Update a level 2 entry */ /*-------------------------------------------------------------------*/ @@ -2786,15 +2687,15 @@ off_t rcoff; /* lseek() return value */ rcoff = lseek (cckd->fd[sfx], l2pos, SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd: file[%d] l2[%d,%d] lseek error offset %lld: %s\n", - dev->devnum, sfx, l1x, l2x, (long long)l2pos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD132E file[%d] l2[%d,%d] lseek error offset %lld: %s\n"), + sfx, l1x, l2x, (long long)l2pos, strerror(errno)); return -1; } rc = write (cckd->fd[sfx], &cckd->l2[l2x], CCKD_L2ENT_SIZE); if (rc < CCKD_L2ENT_SIZE) { - devmsg ("%4.4X:cckddasd: file[%d] l2[%d,%d] write error offset %lld: %s\n", - dev->devnum, sfx, l1x, l2x, (long long)l2pos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD133E file[%d] l2[%d,%d] write error offset %lld: %s\n"), + sfx, l1x, l2x, (long long)l2pos, strerror(errno)); return -1; } cckdtrc ("cckddasd: file[%d] l2[%d,%d] updated offset 0x%llx\n", @@ -2803,7 +2704,6 @@ off_t rcoff; /* lseek() return value */ return 0; } /* end function cckd_write_l2ent */ - /*-------------------------------------------------------------------*/ /* Read a track image */ /*-------------------------------------------------------------------*/ @@ -2827,15 +2727,15 @@ CCKD_L2ENT l2; /* Level 2 entry */ rcoff = lseek (cckd->fd[sfx], (off_t)l2.pos, SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd: file[%d] trk %d lseek error offset %llx: %s\n", - dev->devnum, sfx, trk, (long long)l2.pos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD134E file[%d] trk %d lseek error offset %llx: %s\n"), + sfx, trk, (long long)l2.pos, strerror(errno)); goto cckd_read_trkimg_error; } rc = read (cckd->fd[sfx], buf, l2.len); if (rc < l2.len) { - devmsg ("%4.4X:cckddasd: file[%d] trk %d read error offset %llx: %s\n", - dev->devnum, sfx, trk, (long long)l2.pos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD135E file[%d] trk %d read error offset %llx: %s\n"), + sfx, trk, (long long)l2.pos, strerror(errno)); goto cckd_read_trkimg_error; } cckd->reads[sfx]++; @@ -2866,7 +2766,6 @@ CCKD_L2ENT l2; /* Level 2 entry */ } /* end function cckd_read_trkimg */ - /*-------------------------------------------------------------------*/ /* Write a track image */ /*-------------------------------------------------------------------*/ @@ -2892,8 +2791,8 @@ int after = 0; /* 1=New track after old */ rc = cckd_cchh (dev, buf, trk); if (rc < 0) { - devmsg ("%4.4X:cckddasd: file[%d] trk %d not written, invalid format\n", - dev->devnum, sfx, trk); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD136E file[%d] trk %d not written, invalid format\n"), + sfx, trk); return -1; } @@ -2922,15 +2821,15 @@ int after = 0; /* 1=New track after old */ rcoff = lseek (cckd->fd[sfx], (off_t)l2.pos, SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd: file[%d] trk %d lseek error offset %llx: %s\n", - dev->devnum, sfx, trk, (long long)l2.pos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD137E file[%d] trk %d lseek error offset %llx: %s\n"), + sfx, trk, (long long)l2.pos, strerror(errno)); return -1; } rc = write (cckd->fd[sfx], buf, len); if (rc < len) { - devmsg ("%4.4X:cckddasd: file[%d] trk %d write error offset %llx len %d rc %d: %s\n", - dev->devnum, sfx, trk, (long long)l2.pos, len, rc, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD138E file[%d] trk %d write error offset %llx len %d rc %d: %s\n"), + sfx, trk, (long long)l2.pos, len, rc, strerror(errno)); return -1; } cckdtrc ("cckddasd: file[%d] trk %d written offset %llx len %d" @@ -2957,7 +2856,6 @@ int after = 0; /* 1=New track after old */ } /* end function cckd_write_trkimg */ - /*-------------------------------------------------------------------*/ /* Harden the file */ /*-------------------------------------------------------------------*/ @@ -2992,7 +2890,6 @@ int rc, hrc=0; /* Return codes */ return hrc; } /* cckd_harden */ - /*-------------------------------------------------------------------*/ /* Return length of an uncompressed track image */ /*-------------------------------------------------------------------*/ @@ -3024,15 +2921,14 @@ int size; /* Track size */ if (size > dev->ckdtrksz || memcmp (&buf[size-CKDDASD_RECHDR_SIZE], &eighthexFF, 8) != 0) { - devmsg ("%4.4X:cckddasd trklen err for %2.2x%2.2x%2.2x%2.2x%2.2x\n", - dev->devnum, buf[0], buf[1], buf[2], buf[3], buf[4]); - size = dev->ckdtrksz; + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD139E trklen err for %2.2x%2.2x%2.2x%2.2x%2.2x\n"), + buf[0], buf[1], buf[2], buf[3], buf[4]); + size = -1; } return size; } - /*-------------------------------------------------------------------*/ /* Truncate the file */ /*-------------------------------------------------------------------*/ @@ -3054,8 +2950,8 @@ off_t sz; /* Change for ftruncate */ rc = fstat (cckd->fd[sfx], &st); if (rc < 0) { - cckdmsg ("%4.4X:cckddasd truncate fstat error: %s\n", - dev->devnum, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD140E truncate fstat error: %s\n"), + strerror(errno)); return; } @@ -3075,8 +2971,8 @@ off_t sz; /* Change for ftruncate */ cckd->fd[sfx] = open (sfn, O_RDWR|O_BINARY); if (cckd->fd[sfx] < 0) { - devmsg ("%4.4X:cckddasd truncate re-open error: %s\n", - dev->devnum, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD141E truncate re-open error: %s\n"), + strerror(errno)); return; } } @@ -3084,15 +2980,14 @@ off_t sz; /* Change for ftruncate */ rc = ftruncate (cckd->fd[sfx], (off_t)cckd->cdevhdr[sfx].size); if (rc < 0) { - devmsg ("%4.4X:cckddasd truncate ftruncate error: %s\n", - dev->devnum, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD142E truncate ftruncate error: %s\n"), + strerror(errno)); return; } } } /* end function cckd_truncate */ - /*-------------------------------------------------------------------*/ /* Build a null track */ /*-------------------------------------------------------------------*/ @@ -3151,7 +3046,6 @@ int size; /* Size of null record */ } /* end function cckd_null_trk */ - /*-------------------------------------------------------------------*/ /* Verify a track/block header and return track/block number */ /*-------------------------------------------------------------------*/ @@ -3169,65 +3063,65 @@ char *comp[] = {"none", "zlib", "bzip2"}; /* CKD dasd header verification */ if (cckd->ckddasd) { - cyl = (buf[1] << 8) + buf[2]; - head = (buf[3] << 8) + buf[4]; + cyl = fetch_hw (buf + 1); + head = fetch_hw (buf + 3); t = cyl * dev->ckdheads + head; - if (cyl < dev->ckdcyls - && head < dev->ckdheads + if (cyl < dev->ckdcyls && head < dev->ckdheads && (trk == -1 || t == trk)) { - if ((buf[0] & CCKD_COMPRESS_MASK) <= CCKD_COMPRESS_MAX) + if (buf[0] & ~cckdblk.comps) { if (buf[0] & ~CCKD_COMPRESS_MASK) { if (cckdblk.bytemsgs++ < 10) - devmsg ("%4.4X:cckddasd: invalid byte 0 trk %d: " - "buf %2.2x%2.2x%2.2x%2.2x%2.2x\n", dev->devnum, + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD143E invalid byte 0 trk %d: " + "buf %2.2x%2.2x%2.2x%2.2x%2.2x\n"), dev->devnum, t, buf[0],buf[1],buf[2],buf[3],buf[4]); buf[0] &= CCKD_COMPRESS_MASK; } - return t; } - if (buf[0] <= CCKD_COMPRESS_MAX_POSSIBLE) + if (buf[0] & ~cckdblk.comps) badcomp = 1; + else + return t; } } /* FBA dasd header verification */ else { - t = (buf[1] << 24) + (buf[2] << 16) + (buf[3] << 8) + buf[4]; - if (t < dev->fbanumblk - && (trk == -1 || t == trk)) + t = fetch_fw (buf + 1); + if (t < dev->fbanumblk && (trk == -1 || t == trk)) { - if ((buf[0] & CCKD_COMPRESS_MASK) <= CCKD_COMPRESS_MAX) + if (buf[0] & ~cckdblk.comps) { if (buf[0] & ~CCKD_COMPRESS_MASK) { - devmsg ("%4.4X:cckddasd: invalid byte 0 blkgrp %d: " - "buf %2.2x%2.2x%2.2x%2.2x%2.2x\n", dev->devnum, + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD144E invalid byte 0 blkgrp %d: " + "buf %2.2x%2.2x%2.2x%2.2x%2.2x\n"), dev->devnum, t, buf[0],buf[1],buf[2],buf[3],buf[4]); buf[0] &= CCKD_COMPRESS_MASK; } - return t; } - if (buf[0] <= CCKD_COMPRESS_MAX_POSSIBLE) + if (buf[0] & ~cckdblk.comps) badcomp = 1; + else + return t; } } if (badcomp) { - devmsg ("%4.4X:cckddasd: invalid %s hdr %s %d: " - "%s compression unsupported\n", - dev->devnum, cckd->ckddasd ? "trk" : "blk", + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD145E invalid %s hdr %s %d: " + "%s compression unsupported\n"), + cckd->ckddasd ? "trk" : "blk", cckd->ckddasd ? "trk" : "blk", t, comp[buf[0]]); } else { - devmsg ("%4.4X:cckddasd: invalid %s hdr %s %d " - "buf %2.2x%2.2x%2.2x%2.2x%2.2x\n", - dev->devnum, cckd->ckddasd ? "trk" : "blk", + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD146E invalid %s hdr %s %d " + "buf %2.2x%2.2x%2.2x%2.2x%2.2x\n"), + cckd->ckddasd ? "trk" : "blk", cckd->ckddasd ? "trk" : "blk", trk, buf[0], buf[1], buf[2], buf[3], buf[4]); cckd_print_itrace (); @@ -3247,10 +3141,13 @@ int head; /* Head */ char cchh[4],cchh2[4]; /* Cyl, head big-endian */ int r; /* Record number */ int sz; /* Track size */ +int vlen; /* Validation length */ int kl,dl; /* Key/Data lengths */ cckd = dev->cckd_ext; + if (buf == NULL || len < 0) return -1; + cckdtrc ("cckddasd: validating %s %d len %d %2.2x%2.2x%2.2x%2.2x%2.2x " "%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n", cckd->ckddasd ? "trk" : "blkgrp", trk, len, @@ -3260,7 +3157,8 @@ int kl,dl; /* Key/Data lengths */ /* FBA dasd check */ if (cckd->fbadasd) { - if (len == CFBA_BLOCK_SIZE + CKDDASD_TRKHDR_SIZE) return 0; + if (len == CFBA_BLOCK_SIZE + CKDDASD_TRKHDR_SIZE || len == 0) + return 0; cckdtrc ("cckddasd: validation failed: bad length%s\n",""); return -1; } @@ -3275,7 +3173,7 @@ int kl,dl; /* Key/Data lengths */ /* validate record 0 */ memcpy (cchh2, &buf[5], 4); cchh2[0] &= 0x7f; /* fix for ovflow */ - if (memcmp (cchh, cchh2, 4) != 0 || buf[9] != 0 || + if (/* memcmp (cchh, cchh2, 4) != 0 || */ buf[9] != 0 || buf[10] != 0 || buf[11] != 0 || buf[12] != 8) { cckdtrc ("cckddasd: validation failed: bad r0%s\n",""); @@ -3283,7 +3181,8 @@ int kl,dl; /* Key/Data lengths */ } /* validate records 1 thru n */ - for (r = 1, sz = 21; sz + 8 <= len; sz += 8 + kl + dl, r++) + vlen = len > 0 ? len : dev->ckdtrksz; + for (r = 1, sz = 21; sz + 8 <= vlen; sz += 8 + kl + dl, r++) { if (memcmp (&buf[sz], eighthexFF, 8) == 0) break; kl = buf[sz+5]; @@ -3292,10 +3191,12 @@ int kl,dl; /* Key/Data lengths */ memcpy (cchh2, &buf[sz], 4); cchh2[0] &= 0x7f; /* fix for funny formatted vm disks */ + /* if (r == 1) memcpy (cchh, cchh2, 4); + */ - if (memcmp (cchh, cchh2, 4) != 0 || buf[sz+4] == 0 || - sz + 8 + kl + dl >= len) + if (/*memcmp (cchh, cchh2, 4) != 0 ||*/ buf[sz+4] == 0 || + sz + 8 + kl + dl >= vlen) { cckdtrc ("cckddasd: validation failed: bad r%d " "%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n", @@ -3306,18 +3207,16 @@ int kl,dl; /* Key/Data lengths */ } sz += 8; - if (sz != len) + if ((sz != len && len > 0) || sz > vlen) { cckdtrc ("cckddasd: validation failed: no eot%s\n",""); return -1; } - return 0; + return sz; } /* end function cckd_validate */ - - /*-------------------------------------------------------------------*/ /* Create a shadow file name */ /*-------------------------------------------------------------------*/ @@ -3335,15 +3234,14 @@ BYTE *sfxptr; /* -> Last char of file name */ /* Error if no shadow file name specified */ if (dev->dasdsfn[0] == '\0') { - devmsg ("%4.4X:cckddasd: no shadow file name specified\n", - dev->devnum); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD147E no shadow file name specified\n")); return -1; } /* Error if number shadow files exceeded */ if (sfx > CCKD_MAX_SF) { - devmsg ("cckddasd: [%d] number of shadow files exceeded: %d\n", + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD148E [%d] number of shadow files exceeded: %d\n"), sfx, CCKD_MAX_SF); return -1; } @@ -3366,7 +3264,6 @@ BYTE *sfxptr; /* -> Last char of file name */ } /* end function cckd_sf_name */ - /*-------------------------------------------------------------------*/ /* Initialize shadow files */ /*-------------------------------------------------------------------*/ @@ -3404,9 +3301,9 @@ char sfn[256]; /* Shadow file name */ if (rc < 0) continue; if (strcmp ((char *)&sfn, (char *)&sfn2) == 0) { - devmsg ("%4.4X:cckddasd shadow file[%d] name %s\n" - " collides with %4.4X file[%d] name %s\n", - dev->devnum, i, sfn, dev2->devnum, j, sfn2); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD149E shadow file[%d] name %s\n" + " collides with %4.4X file[%d] name %s\n"), + i, sfn, dev2->devnum, j, sfn2); return -1; } } @@ -3433,7 +3330,7 @@ char sfn[256]; /* Shadow file name */ else cckd->open[cckd->sfn] = CCKD_OPEN_RW; /* Call the chkdsk function */ - rc = cckd_chkdsk (cckd->fd[cckd->sfn], dev->msgpipew, 0); + rc = cckd_chkdsk (cckd->fd[cckd->sfn], stdout, 0); if (rc < 0) return -1; /* Perform initial read */ @@ -3466,7 +3363,7 @@ char sfn[256]; /* Shadow file name */ cckd->fd[i] = open (sfn, O_RDONLY|O_BINARY); if (cckd->fd[i] < 0) { - devmsg ("cckddasd: error re-opening %s readonly\n %s\n", + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD150E error re-opening %s readonly\n %s\n"), sfn, strerror(errno)); return -1; } @@ -3505,8 +3402,8 @@ int l1size; /* Size of level 1 table */ sfd = open (sfn, O_RDWR|O_CREAT|O_EXCL|O_BINARY, S_IRUSR | S_IWUSR | S_IRGRP); if (sfd < 0) - { devmsg ("%4.4X:cckddasd: shadow file[%d] open error: %s\n", - dev->devnum, sfx, strerror (errno)); + { logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD151E shadow file[%d] open error: %s\n"), + sfx, strerror (errno)); return -1; } @@ -3514,16 +3411,16 @@ int l1size; /* Size of level 1 table */ rcoff = lseek (cckd->fd[sfx-1], 0, SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd: file[%d] lseek error offset %d: %s\n", - dev->devnum, sfx-1, 0, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD152E file[%d] lseek error offset %d: %s\n"), + sfx-1, 0, strerror(errno)); close (sfd); return -1; } rc = read (cckd->fd[sfx-1], &devhdr, CKDDASD_DEVHDR_SIZE); if (rc < CKDDASD_DEVHDR_SIZE) { - devmsg ("%4.4X:cckddasd: file[%d] read error offset %d: %s\n", - dev->devnum, sfx-1, 0, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD153E file[%d] read error offset %d: %s\n"), + sfx-1, 0, strerror(errno)); close (sfd); return -1; } @@ -3532,8 +3429,8 @@ int l1size; /* Size of level 1 table */ rc = write (sfd, &devhdr, CKDDASD_DEVHDR_SIZE); if (rc < CKDDASD_DEVHDR_SIZE) { - devmsg ("%4.4X:cckddasd: shadow file[%d] write error offset %d: %s\n", - dev->devnum, sfx, 0, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD154E shadow file[%d] write error offset %d: %s\n"), + sfx, 0, strerror(errno)); close (sfd); return -1; } @@ -3549,8 +3446,8 @@ int l1size; /* Size of level 1 table */ cckd->l1[sfx] = malloc (l1size); if (!cckd->l1[sfx]) { - devmsg ("%4.4X:cckddasd file[%d] l1 malloc failed: %s\n", - dev->devnum, sfx, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD155E file[%d] l1 malloc failed: %s\n"), + sfx, strerror(errno)); close (sfd); return -1; } @@ -3576,37 +3473,40 @@ int l1size; /* Size of level 1 table */ } /* end function cckd_sf_new */ - /*-------------------------------------------------------------------*/ /* Add a shadow file (sf+) */ /*-------------------------------------------------------------------*/ void cckd_sf_add (DEVBLK *dev) { CCKDDASD_EXT *cckd; /* -> cckd extension */ +int syncio; /* Saved syncio bit */ int rc; /* Return code */ BYTE sfn[256]; /* Shadow file name */ cckd = dev->cckd_ext; if (!cckd) { - devmsg ("%4.4X:cckddasd: not a cckd device\n", dev->devnum); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD156E not a cckd device\n"), dev->devnum); return; } + + /* Disable synchronous I/O for the device */ + syncio = cckd_disable_syncio(dev); /* schedule updated track entries to be written */ - obtain_lock (&cckdblk.cachelock); + obtain_lock (&cckd->iolock); cckd_flush_cache (dev); - while (cckdblk.writepending || cckd->ioactive) + while (cckd->wrpending || cckd->ioactive) { - cckdblk.writewaiting++; - wait_condition (&cckdblk.writecond, &cckdblk.cachelock); - cckdblk.writewaiting--; + cckd->iowaiters++; + wait_condition (&cckd->iocond, &cckd->iolock); + cckd->iowaiters--; cckd_flush_cache (dev); } cckd_purge_cache (dev); cckd_purge_l2 (dev); - dev->dasdcur = -1; cckd->active = NULL; + dev->bufcur = dev->cache = -1; cckd->merging = 1; - release_lock (&cckdblk.cachelock); + release_lock (&cckd->iolock); /* obtain control of the file */ obtain_lock (&cckd->filelock); @@ -3618,14 +3518,15 @@ BYTE sfn[256]; /* Shadow file name */ rc = cckd_sf_new (dev); if (rc < 0) { - devmsg ("%4.4X:cckddasd: file[%d] error adding shadow file: %s\n", - dev->devnum, cckd->sfn + 1, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD157E file[%d] error adding shadow file: %s\n"), + cckd->sfn + 1, strerror(errno)); release_lock (&cckd->filelock); - obtain_lock (&cckdblk.cachelock); + obtain_lock (&cckd->iolock); cckd->merging = 0; - if (cckdblk.writewaiting) - broadcast_condition (&cckdblk.writecond); - release_lock (&cckdblk.cachelock); + if (cckd->iowaiters) + broadcast_condition (&cckd->iocond); + dev->syncio = syncio; + release_lock (&cckd->iolock); return; } @@ -3640,26 +3541,27 @@ BYTE sfn[256]; /* Shadow file name */ } rc = cckd_sf_name (dev, cckd->sfn, (char *)&sfn); - devmsg ("%4.4X:cckddasd: file[%d] %s added\n",dev->devnum, cckd->sfn, sfn); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD158E file[%d] %s added\n"), cckd->sfn, sfn); release_lock (&cckd->filelock); - obtain_lock (&cckdblk.cachelock); + obtain_lock (&cckd->iolock); cckd->merging = 0; - if (cckdblk.writewaiting) - broadcast_condition (&cckdblk.writecond); - release_lock (&cckdblk.cachelock); + if (cckd->iowaiters) + broadcast_condition (&cckd->iocond); + dev->syncio = syncio; + release_lock (&cckd->iolock); cckd_sf_stats (dev); } /* end function cckd_sf_add */ - /*-------------------------------------------------------------------*/ /* Remove a shadow file (sf-) */ /*-------------------------------------------------------------------*/ void cckd_sf_remove (DEVBLK *dev, int merge) { CCKDDASD_EXT *cckd; /* -> cckd extension */ +int syncio; /* Saved syncio bit */ int rc; /* Return code */ off_t rcoff; /* lseek() return value */ int add = 0; /* 1=Add shadow file back */ @@ -3675,30 +3577,35 @@ BYTE buf[65536]; /* Buffer */ cckd = dev->cckd_ext; if (!cckd) { - devmsg ("%4.4X:cckddasd: not a cckd device\n",dev->devnum); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD159E not a cckd device\n"),dev->devnum); return; } if (!cckd->sfn) { - devmsg ("%4.4X:cckddasd: cannot remove base file\n",dev->devnum); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD160E cannot remove base file\n"),dev->devnum); return; } + cckdtrc("cckddasd: merge starting%s\n",""); + + /* Disable synchronous I/O for the device */ + syncio = cckd_disable_syncio(dev); + /* Schedule updated track entries to be written */ - obtain_lock (&cckdblk.cachelock); + obtain_lock (&cckd->iolock); cckd_flush_cache (dev); - while (cckdblk.writepending || cckd->ioactive) + while (cckd->wrpending || cckd->ioactive) { - cckdblk.writewaiting++; - wait_condition (&cckdblk.writecond, &cckdblk.cachelock); - cckdblk.writewaiting--; + cckd->iowaiters++; + wait_condition (&cckd->iocond, &cckd->iolock); + cckd->iowaiters--; cckd_flush_cache (dev); } cckd_purge_cache (dev); cckd_purge_l2 (dev); - dev->dasdcur = -1; cckd->active = NULL; + dev->bufcur = dev->cache = -1; cckd->merging = 1; - release_lock (&cckdblk.cachelock); + release_lock (&cckd->iolock); obtain_lock (&cckd->filelock); sfx[0] = cckd->sfn; @@ -3713,21 +3620,21 @@ BYTE buf[65536]; /* Buffer */ cckd->fd[sfx[1]] = open (sfn, O_RDONLY|O_BINARY); if (merge) { - devmsg ("%4.4X:cckddasd: file[%d] not merged, " - "file[%d] cannot be opened read-write\n", - dev->devnum, sfx[0], sfx[1]); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD161E file[%d] not merged, " + "file[%d] cannot be opened read-write\n"), + sfx[0], sfx[1]); goto sf_remove_exit; } else add = 1; } else { - rc = cckd_chkdsk (cckd->fd[sfx[1]], dev->msgpipew, 0); + rc = cckd_chkdsk (cckd->fd[sfx[1]], stdout, 0); if (rc < 0) { - devmsg ("%4.4X:cckddasd: file[%d] not merged, " - "file[%d] check failed\n", - dev->devnum, sfx[0], sfx[1]); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD162E file[%d] not merged, " + "file[%d] check failed\n"), + sfx[0], sfx[1]); goto sf_remove_exit; } cckd->open[sfx[1]] = CCKD_OPEN_RW; @@ -3739,9 +3646,9 @@ BYTE buf[65536]; /* Buffer */ rc = cckd_harden (dev); if (rc < 0) { - devmsg ("%4.4X:cckddasd: file[%d] not merged, " - "file[%d] not hardened\n", - dev->devnum, sfx[0], sfx[0]); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD163E file[%d] not merged, " + "file[%d] not hardened\n"), + sfx[0], sfx[0]); goto sf_remove_exit; } } @@ -3776,8 +3683,8 @@ BYTE buf[65536]; /* Buffer */ rcoff = lseek (cckd->fd[sfx[0]], (off_t)cckd->l1[sfx[0]][i], SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd: file[%d] l2[%d] lseek error offset %lld: %s\n", - dev->devnum, sfx[0], i, (long long)cckd->l1[sfx[0]][i], + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD164E file[%d] l2[%d] lseek error offset %lld: %s\n"), + sfx[0], i, (long long)cckd->l1[sfx[0]][i], strerror(errno)); err = 1; continue; @@ -3785,8 +3692,8 @@ BYTE buf[65536]; /* Buffer */ rc = read (cckd->fd[sfx[0]], &l2[0], CCKD_L2TAB_SIZE); if (rc < CCKD_L2TAB_SIZE) { - devmsg ("%4.4X:cckddasd: file[%d] l2[%d] read error offset %lld: %s\n", - dev->devnum, sfx[0], i, (long long)cckd->l1[sfx[0]][i], + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD165E file[%d] l2[%d] read error offset %lld: %s\n"), + sfx[0], i, (long long)cckd->l1[sfx[0]][i], strerror(errno)); err = 1; continue; @@ -3803,8 +3710,8 @@ BYTE buf[65536]; /* Buffer */ rcoff = lseek (cckd->fd[sfx[1]], (off_t)cckd->l1[sfx[1]][i], SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd: file[%d] l2[%d] lseek error offset %lld: %s\n", - dev->devnum, sfx[1], i, (long long)cckd->l1[sfx[1]][i], + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD166E file[%d] l2[%d] lseek error offset %lld: %s\n"), + sfx[1], i, (long long)cckd->l1[sfx[1]][i], strerror(errno)); err = 1; continue; @@ -3812,8 +3719,8 @@ BYTE buf[65536]; /* Buffer */ rc = read (cckd->fd[sfx[1]], &l2[1], CCKD_L2TAB_SIZE); if (rc < CCKD_L2TAB_SIZE) { - devmsg ("%4.4X:cckddasd: file[%d] l2[%d] read error offset %lld: %s\n", - dev->devnum, sfx[1], i, (long long)cckd->l1[sfx[1]][i], + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD167E file[%d] l2[%d] read error offset %lld: %s\n"), + sfx[1], i, (long long)cckd->l1[sfx[1]][i], strerror(errno)); err = 1; continue; @@ -3838,13 +3745,13 @@ BYTE buf[65536]; /* Buffer */ rcoff = lseek (cckd->fd[sfx[0]], (off_t)l2[0][j].pos, SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd: file[%d] %s[%d] lseek error " - " offset %lld: %s\n", - dev->devnum, sfx[0], cckd->ckddasd ? "trk" : "blkgrp", + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD168E file[%d] %s[%d] lseek error " + " offset %lld: %s\n"), + sfx[0], cckd->ckddasd ? "trk" : "blkgrp", i * 256 + j, (long long)l2[0][j].pos, strerror(errno)); - devmsg ("%4.4X:cckddasd: file[%d] %s[%d] not merged\n", - dev->devnum, sfx[0], cckd->ckddasd ? "trk" : "blkgrp", + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD169E file[%d] %s[%d] not merged\n"), + sfx[0], cckd->ckddasd ? "trk" : "blkgrp", i * 256 + j); err = 1; continue; @@ -3852,13 +3759,13 @@ BYTE buf[65536]; /* Buffer */ rc = read (cckd->fd[sfx[0]], &buf, (size_t)l2[0][j].len); if (rc != (int)l2[0][j].len) { - devmsg ("%4.4X:cckddasd: file[%d] %s[%d] read error " - " offset %lld: %s\n", - dev->devnum, sfx[0], cckd->ckddasd ? "trk" : "blkgrp", + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD170E file[%d] %s[%d] read error " + " offset %lld: %s\n"), + sfx[0], cckd->ckddasd ? "trk" : "blkgrp", i * 256 + j, (long long)l2[0][j].pos, strerror(errno)); - devmsg ("%4.4X:cckddasd: file[%d] %s[%d] not merged\n", - dev->devnum, sfx[0], cckd->ckddasd ? "trk" : "blkgrp", + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD171E file[%d] %s[%d] not merged\n"), + sfx[0], cckd->ckddasd ? "trk" : "blkgrp", i * 256 + j); err = 1; continue; @@ -3877,12 +3784,12 @@ BYTE buf[65536]; /* Buffer */ rcoff = lseek (cckd->fd[sfx[1]], pos, SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd: file[%d] %s[%d] lseek error " - " offset %lld: %s\n", - dev->devnum, sfx[1], cckd->ckddasd ? "trk" : "blkgrp", + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD172E file[%d] %s[%d] lseek error " + " offset %lld: %s\n"), + sfx[1], cckd->ckddasd ? "trk" : "blkgrp", i * 256 + j, (long long)pos, strerror(errno)); - devmsg ("%4.4X:cckddasd: file[%d] %s[%d] not merged\n", - dev->devnum, sfx[0], cckd->ckddasd ? "trk" : "blkgrp", + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD173E file[%d] %s[%d] not merged\n"), + sfx[0], cckd->ckddasd ? "trk" : "blkgrp", i * 256 + j); err = 1; continue; @@ -3890,12 +3797,12 @@ BYTE buf[65536]; /* Buffer */ rc = write (cckd->fd[sfx[1]], &buf, (size_t)l2[0][j].len); if (rc != (int)l2[0][j].len) { - devmsg ("%4.4X:cckddasd: file[%d] %s[%d] write error " - " offset %lld: %s\n", - dev->devnum, sfx[1], cckd->ckddasd ? "trk" : "blkgrp", + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD174E file[%d] %s[%d] write error " + " offset %lld: %s\n"), + sfx[1], cckd->ckddasd ? "trk" : "blkgrp", i * 256, (long long)pos, strerror(errno)); - devmsg ("%4.4X:cckddasd: file[%d] %s[%d] not merged\n", - dev->devnum, sfx[0], cckd->ckddasd ? "trk" : "blkgrp", + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD175E file[%d] %s[%d] not merged\n"), + sfx[0], cckd->ckddasd ? "trk" : "blkgrp", i * 256 + j); err = 1; continue; @@ -3922,7 +3829,7 @@ BYTE buf[65536]; /* Buffer */ else { pos = (off_t)cckd->l1[sfx[1]][i]; - if (pos == 0 || pos == 0xffffffff) + if (pos == 0 || pos == (off_t)0xffffffff) pos = cckd_get_space (dev, CCKD_L2TAB_SIZE); cckdtrc ("cckddasd: merging l2[%d] to %llx\n", @@ -3931,12 +3838,12 @@ BYTE buf[65536]; /* Buffer */ rcoff = lseek (cckd->fd[sfx[1]], pos, SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X:cckddasd: file[%d] l1[%d] lseek error " - " offset %lld: %s\n", - dev->devnum, sfx[1], i, (long long)pos, + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD176E file[%d] l1[%d] lseek error " + " offset %lld: %s\n"), + sfx[1], i, (long long)pos, strerror(errno)); - devmsg ("%4.4X:cckddasd: file[%d] %s[%d-%d] not merged\n", - dev->devnum, sfx[0], cckd->ckddasd ? "trks" : "blkgrps", + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD177E file[%d] %s[%d-%d] not merged\n"), + sfx[0], cckd->ckddasd ? "trks" : "blkgrps", i * 256, i * 256 +255); err = 1; continue; @@ -3944,12 +3851,12 @@ BYTE buf[65536]; /* Buffer */ rc = write (cckd->fd[sfx[1]], &l2[1], CCKD_L2TAB_SIZE); if (rc != CCKD_L2TAB_SIZE) { - devmsg ("%4.4X:cckddasd: file[%d] l1[%d] write error " - " offset %lld: %s\n", - dev->devnum, sfx[1], i, (long long)pos, + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD178E file[%d] l1[%d] write error " + " offset %lld: %s\n"), + sfx[1], i, (long long)pos, strerror(errno)); - devmsg ("%4.4X:cckddasd: file[%d] %s[%d-%d] not merged\n", - dev->devnum, sfx[0], cckd->ckddasd ? "trks" : "blkgrps", + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD179E file[%d] %s[%d-%d] not merged\n"), + sfx[0], cckd->ckddasd ? "trks" : "blkgrps", i * 256, i * 256 + 255); err = 1; continue; @@ -3962,12 +3869,14 @@ BYTE buf[65536]; /* Buffer */ /* Validate the merge */ cckd_harden (dev); if (err) - cckd_chkdsk (cckd->fd[sfx[1]], dev->msgpipew, 2); + cckd_chkdsk (cckd->fd[sfx[1]], stdout, 2); cckd_read_init (dev); } /* if merge */ /* Remove the old file */ +//FIXME: unlink doesn't free space ?? + if (!cckdblk.ftruncwa) ftruncate(cckd->fd[sfx[0]], 0); close (cckd->fd[sfx[0]]); free (cckd->l1[sfx[0]]); cckd->l1[sfx[0]] = NULL; @@ -3978,23 +3887,24 @@ BYTE buf[65536]; /* Buffer */ /* Add the file back if necessary */ if (add) rc = cckd_sf_new (dev) ; - devmsg ("cckddasd: shadow file [%d] successfully %s%s\n", + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD200I shadow file [%d] successfully %s%s\n"), sfx[0], merge ? "merged" : add ? "re-added" : "removed", err ? " with errors" : ""); sf_remove_exit: release_lock (&cckd->filelock); - obtain_lock (&cckdblk.cachelock); + obtain_lock (&cckd->iolock); cckd->merging = 0; - if (cckdblk.writewaiting) - broadcast_condition (&cckdblk.writecond); - release_lock (&cckdblk.cachelock); + if (cckd->iowaiters) + broadcast_condition (&cckd->iocond); + dev->syncio = syncio; + cckdtrc("cckddasd: merge complete%s\n",""); + release_lock (&cckd->iolock); cckd_sf_stats (dev); } /* end function cckd_sf_remove */ - /*-------------------------------------------------------------------*/ /* Set shadow file name (sf=) */ /*-------------------------------------------------------------------*/ @@ -4005,14 +3915,12 @@ CCKDDASD_EXT *cckd; /* -> cckd extension */ cckd = dev->cckd_ext; if (!cckd) { - devmsg ("%4.4X: cckddasd: device is not a shadow file\n", - dev->devnum); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD201W device is not a shadow file\n")); return; } if (CCKD_MAX_SF == 0) { - devmsg ("%4.4X: cckddasd: file shadowing not activated\n", - dev->devnum); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD202W file shadowing not activated\n")); return; } @@ -4020,49 +3928,50 @@ CCKDDASD_EXT *cckd; /* -> cckd extension */ if (cckd->sfn) { - devmsg ("%4.4X: cckddasd: shadowing is already active\n", - dev->devnum); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD203W shadowing is already active\n")); release_lock (&cckd->filelock); return; } strcpy ((char *)&dev->dasdsfn, (const char *)sfn); - devmsg ("cckddasd: shadow file name set to %s\n", sfn); + logmsg (_("HHCCD204I shadow file name set to %s\n"), sfn); release_lock (&cckd->filelock); } /* end function cckd_sf_newname */ - /*-------------------------------------------------------------------*/ /* Check and compress a shadow file (sfc) */ /*-------------------------------------------------------------------*/ void cckd_sf_comp (DEVBLK *dev) { CCKDDASD_EXT *cckd; /* -> cckd extension */ +int syncio; /* Saved syncio bit */ int rc; /* Return code */ cckd = dev->cckd_ext; if (!cckd) { - devmsg ("%4.4X: cckddasd: device is not a shadow file\n", - dev->devnum); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD205W device is not a shadow file\n")); return; } + + /* Disable synchronous I/O for the device */ + syncio = cckd_disable_syncio(dev); /* schedule updated track entries to be written */ - obtain_lock (&cckdblk.cachelock); + obtain_lock (&cckd->iolock); cckd_flush_cache (dev); - while (cckdblk.writepending || cckd->ioactive) + while (cckd->wrpending || cckd->ioactive) { - cckdblk.writewaiting++; - wait_condition (&cckdblk.writecond, &cckdblk.cachelock); - cckdblk.writewaiting--; + cckd->iowaiters++; + wait_condition (&cckd->iocond, &cckd->iolock); + cckd->iowaiters--; cckd_flush_cache (dev); } cckd_purge_cache (dev); cckd_purge_l2 (dev); - dev->dasdcur = -1; cckd->active = NULL; + dev->bufcur = dev->cache = -1; cckd->merging = 1; - release_lock (&cckdblk.cachelock); + release_lock (&cckd->iolock); /* obtain control of the file */ obtain_lock (&cckd->filelock); @@ -4071,18 +3980,19 @@ int rc; /* Return code */ cckd_harden (dev); /* Call the compress function */ - rc = cckd_comp (cckd->fd[cckd->sfn], dev->msgpipew); + rc = cckd_comp (cckd->fd[cckd->sfn], stdout); /* Perform initial read */ rc = cckd_read_init (dev); release_lock (&cckd->filelock); - obtain_lock (&cckdblk.cachelock); + obtain_lock (&cckd->iolock); cckd->merging = 0; - if (cckdblk.writewaiting) - broadcast_condition (&cckdblk.writecond); - release_lock (&cckdblk.cachelock); + if (cckd->iowaiters) + broadcast_condition (&cckd->iocond); + dev->syncio = syncio; + release_lock (&cckd->iolock); /* Display the shadow file statistics */ cckd_sf_stats (dev); @@ -4090,7 +4000,6 @@ int rc; /* Return code */ return; } /* end function cckd_sf_comp */ - /*-------------------------------------------------------------------*/ /* Display shadow file statistics (sfd) */ /*-------------------------------------------------------------------*/ @@ -4109,8 +4018,7 @@ BYTE sfn[256]; /* Shadow file name */ cckd = dev->cckd_ext; if (!cckd) { - devmsg ("%4.4X: cckddasd: device is not a shadow file\n", - dev->devnum); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD206W device is not a shadow file\n")); return; } @@ -4127,23 +4035,23 @@ BYTE sfn[256]; /* Shadow file name */ } /* header */ - devmsg ("cckddasd: size free nbr st reads writes l2reads hits switches\n"); + logmsg (_("HHCCD210I size free nbr st reads writes l2reads hits switches\n")); if (cckd->readaheads || cckd->misses) - devmsg ("cckddasd: readaheads misses\n"); - devmsg ("cckddasd: --------------------------------------------------------------------\n"); + logmsg (_("HHCCD211I readaheads misses\n")); + logmsg (_("HHCCD212I -------------------------------------------------------------------\n")); /* total statistics */ - devmsg ("cckddasd: [*] %10lld %3lld%% %4d %7d %7d %7d %7d %7d\n", + logmsg (_("HHCCD213I [*] %10lld %3lld%% %4d %7d %7d %7d %7d %7d\n"), size, (free * 100) / size, freenbr, cckd->totreads, cckd->totwrites, cckd->totl2reads, cckd->cachehits, cckd->switches); if (cckd->readaheads || cckd->misses) - devmsg ("cckddasd: %7d %7d\n", + logmsg (_("HHCCD214I %7d %7d\n"), cckd->readaheads, cckd->misses); /* base file statistics */ - devmsg ("cckddasd: %s\n", dev->filename); - devmsg ("cckddasd: [0] %10lld %3lld%% %4d %s %7d %7d %7d\n", + logmsg (_("HHCCD215I %s\n"), dev->filename); + logmsg (_("HHCCD216I [0] %10lld %3lld%% %4d %s %7d %7d %7d\n"), (long long)st.st_size, (long long)((long long)((long long)cckd->cdevhdr[0].free_total * 100) / st.st_size), cckd->cdevhdr[0].free_number, ost[cckd->open[0]], @@ -4152,13 +4060,13 @@ BYTE sfn[256]; /* Shadow file name */ if (dev->dasdsfn[0] && CCKD_MAX_SF > 0) { cckd_sf_name ( dev, -1, (char *)&sfn); - devmsg ("cckddasd: %s\n", sfn); + logmsg (_("HHCCD217I %s\n"), sfn); } /* shadow file statistics */ for (i = 1; i <= cckd->sfn; i++) { - devmsg ("cckddasd: [%d] %10lld %3lld%% %4d %s %7d %7d %7d\n", + logmsg (_("HHCCD218I [%d] %10lld %3lld%% %4d %s %7d %7d %7d\n"), i, (long long)cckd->cdevhdr[i].size, (long long)((long long)((long long)cckd->cdevhdr[i].free_total * 100) / cckd->cdevhdr[i].size), cckd->cdevhdr[i].free_number, ost[cckd->open[i]], @@ -4167,6 +4075,60 @@ BYTE sfn[256]; /* Shadow file name */ // release_lock (&cckd->filelock); } /* end function cckd_sf_stats */ +/*-------------------------------------------------------------------*/ +/* Disable synchronous I/O for a device */ +/*-------------------------------------------------------------------*/ +int cckd_disable_syncio(DEVBLK *dev) +{ + if (!dev->syncio) return 0; + obtain_lock(&dev->lock); + while (dev->syncio_active) + { + release_lock(&dev->lock); + usleep(1); + obtain_lock(&dev->lock); + } + dev->syncio = 0; + release_lock(&dev->lock); + cckdtrc ("cckddasd: syncio disabled%s\n",""); + return 1; +} + +/*-------------------------------------------------------------------*/ +/* Lock/unlock the device chain */ +/*-------------------------------------------------------------------*/ +void cckd_lock_devchain(int flag) +{ +//struct timespec tm; +//struct timeval now; +//int timeout; + + obtain_lock(&cckdblk.devlock); + while ((flag && cckdblk.devusers != 0) + || (!flag && cckdblk.devusers < 0)) + { +//gettimeofday(&now,NULL); +//tm.tv_sec = now.tv_sec + 2; +//tm.tv_nsec = now.tv_usec * 1000; + cckdblk.devwaiters++; + wait_condition(&cckdblk.devcond, &cckdblk.devlock); +//timeout = timed_wait_condition(&cckdblk.devcond, &cckdblk.devlock, &tm); +//if (timeout) cckd_print_itrace(); + cckdblk.devwaiters--; + } + if (flag) cckdblk.devusers--; + else cckdblk.devusers++; + release_lock(&cckdblk.devlock); +} +void cckd_unlock_devchain() +{ + obtain_lock(&cckdblk.devlock); + if (cckdblk.devusers < 0) cckdblk.devusers++; + else cckdblk.devusers--; + if (cckdblk.devusers == 0 && cckdblk.devwaiters) + signal_condition(&cckdblk.devcond); + release_lock(&cckdblk.devlock); +} /*-------------------------------------------------------------------*/ /* Garbage Collection thread */ @@ -4190,37 +4152,41 @@ int gctab[5]= { /* default gcol parameters */ //char *gcstates[] = {"critical","severe","moderate","light","none"}; obtain_lock (&cckdblk.gclock); - gcol = ++cckdblk.gcols; + gcol = ++cckdblk.gcs; /* Return without messages if too many already started */ - if (gcol > cckdblk.gcolmax) + if (gcol > cckdblk.gcmax) { - --cckdblk.gcols; + --cckdblk.gcs; release_lock (&cckdblk.gclock); return; } if (!cckdblk.batch) - cckdmsg ("cckddasd: garbage collector thread started: tid="TIDPAT" pid=%d \n", + logmsg (_("HHCCD003I Garbage collector thread started: tid="TIDPAT", pid=%d \n"), thread_id(), getpid()); - while (gcol <= cckdblk.gcolmax) + while (gcol <= cckdblk.gcmax) { + cckd_lock_devchain(0); /* Perform collection on each device */ for (dev = cckdblk.dev1st; dev; dev = cckd->devnext) { cckd = dev->cckd_ext; - if (!cckd || cckd->stopping || cckd->merging) + obtain_lock (&cckd->iolock); + + /* Bypass if merging or stopping */ + if (cckd->merging || cckd->stopping) + { + release_lock (&cckd->iolock); continue; + } + /* If OPENED bit not on then flush if updated */ if (!(cckd->cdevhdr[cckd->sfn].options & CCKD_OPENED)) { - if (cckd->updated) - { - obtain_lock (&cckdblk.cachelock); - cckd_flush_cache (dev); - release_lock (&cckdblk.cachelock); - } + if (cckd->updated) cckd_flush_cache (dev); + release_lock (&cckd->iolock); continue; } @@ -4239,32 +4205,31 @@ int gctab[5]= { /* default gcol parameters */ if (cckd->cdevhdr[cckd->sfn].free_number > 3000) gc = 0; /* Set the size */ - if (cckdblk.gcolparm > 0) size = gctab[gc] << cckdblk.gcolparm; - else if (cckdblk.gcolparm < 0) size = gctab[gc] >> abs(cckdblk.gcolparm); + if (cckdblk.gcparm > 0) size = gctab[gc] << cckdblk.gcparm; + else if (cckdblk.gcparm < 0) size = gctab[gc] >> abs(cckdblk.gcparm); else size = gctab[gc]; if (size > cckd->cdevhdr[cckd->sfn].used >> 10) size = cckd->cdevhdr[cckd->sfn].used >> 10; if (size < 64) size = 64; + release_lock (&cckd->iolock); + /* Call the garbage collector */ rc = cckd_gc_percolate (dev, size); /* Schedule any updated tracks to be written */ - obtain_lock (&cckdblk.cachelock); + obtain_lock (&cckd->iolock); cckd_flush_cache (dev); - - /* Wait for pending writes to complete */ - while (cckdblk.writepending || cckd->ioactive) + while (cckd->wrpending) { - cckdblk.writewaiting++; - wait_condition (&cckdblk.writecond, &cckdblk.cachelock); - cckdblk.writewaiting--; - cckd_flush_cache (dev); + cckd->iowaiters++; + wait_condition (&cckd->iocond, &cckd->iolock); + cckd->iowaiters--; } - release_lock (&cckdblk.cachelock); + release_lock (&cckd->iolock); /* Sync the file */ - if (cckdblk.gcolwait >= 5 || cckd->lastsync + 5 <= now.tv_sec) + if (cckdblk.gcwait >= 5 || cckd->lastsync + 5 <= now.tv_sec) { obtain_lock (&cckd->filelock); if (cckdblk.fsync) @@ -4276,26 +4241,26 @@ int gctab[5]= { /* default gcol parameters */ } } /* for each cckd device */ + cckd_unlock_devchain(); /* wait a bit */ gettimeofday (&now, NULL); - tm.tv_sec = now.tv_sec + cckdblk.gcolwait; + tm.tv_sec = now.tv_sec + cckdblk.gcwait; tm.tv_nsec = now.tv_usec * 1000; cckdtrc ("cckddasd: gcol wait %d seconds at %s", - cckdblk.gcolwait, ctime (&now.tv_sec)); + cckdblk.gcwait, ctime (&now.tv_sec)); timed_wait_condition (&cckdblk.gccond, &cckdblk.gclock, &tm); } if (!cckdblk.batch) - cckdmsg ("cckddasd: garbage collector thread stopping: tid="TIDPAT", pid=%d\n", + logmsg (_("HHCCD013I Garbage collector thread stopping: tid="TIDPAT", pid=%d\n"), thread_id(), getpid()); - cckdblk.gcols--; - if (!cckdblk.gcols) signal_condition (&cckdblk.termcond); + cckdblk.gcs--; + if (!cckdblk.gcs) signal_condition (&cckdblk.termcond); release_lock (&cckdblk.gclock); } /* end thread cckd_gcol */ - /*-------------------------------------------------------------------*/ /* Garbage Collection -- Percolate algorithm */ /* */ @@ -4425,15 +4390,15 @@ int asw; /* New spc after current spc */ rcoff = lseek (fd, (off_t)bpos, SEEK_SET); if (rcoff < 0) { - devmsg ("%4.4X cckddasd: gcperc lseek error file[%d] offset 0x%llx: %s\n", - dev->devnum, sfx, (long long)bpos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD180E gcperc lseek error file[%d] offset 0x%llx: %s\n"), + sfx, (long long)bpos, strerror(errno)); goto cckd_gc_perc_error; } rc = read (fd, &buf, blen); if (rc < (int)blen) { - devmsg ("%4.4X cckddasd: gcperc read error file[%d] offset 0x%llx: %s\n", - dev->devnum, sfx, (long long)bpos, strerror(errno)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD181E gcperc read error file[%d] offset 0x%llx: %d,%d %s\n"), + sfx, (long long)bpos, rc, blen, strerror(errno)); goto cckd_gc_perc_error; } @@ -4485,10 +4450,10 @@ int asw; /* New spc after current spc */ if (rc < 0) goto cckd_gc_perc_error; if (l2.pos != (U32)(bpos + b)) { - devmsg ("%4.4X:cckddasd: unknown space at offset 0x%llx\n", - dev->devnum, (long long)(bpos + b)); - devmsg ("%4.4X:cckddasd: %2.2x%2.2x%2.2x%2.2x%2.2x\n", - dev->devnum, buf[b+0], buf[b+1],buf[b+2], buf[b+3], buf[b+4]); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD182E unknown space at offset 0x%llx\n"), + (long long)(bpos + b)); + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD183E %2.2x%2.2x%2.2x%2.2x%2.2x\n"), + buf[b+0], buf[b+1],buf[b+2], buf[b+3], buf[b+4]); cckd_print_itrace (); goto cckd_gc_perc_error; } @@ -4526,18 +4491,286 @@ int asw; /* New spc after current spc */ } /* end function cckd_gc_percolate */ +/*-------------------------------------------------------------------*/ +/* Find device by devnum */ +/*-------------------------------------------------------------------*/ +DEVBLK *cckd_find_device_by_devnum (U16 devnum) +{ +DEVBLK *dev; +CCKDDASD_EXT *cckd; + + cckd_lock_devchain (0); + for (dev = cckdblk.dev1st; dev; dev = cckd->devnext) + { + if (dev->devnum == devnum) break; + cckd = dev->cckd_ext; + } + cckd_unlock_devchain (); + return dev; +} /* end function cckd_find_device_by_devnum */ + +/*-------------------------------------------------------------------*/ +/* Uncompress a track image */ +/*-------------------------------------------------------------------*/ +BYTE *cckd_uncompress (DEVBLK *dev, BYTE *from, int len, int maxlen, + int trk) +{ +BYTE *to = NULL; /* Uncompressed buffer */ +int newlen; /* Uncompressed length */ +int comp; /* Compression type */ +char *compress[] = {"none", "zlib", "bzip2"}; + + cckdtrc ("cckddasd: uncompress comp %d len %d maxlen %d trk %d\n", + from[0] & CCKD_COMPRESS_MASK, len, maxlen, trk); + + /* Uncompress the track image */ + comp = (from[0] & CCKD_COMPRESS_MASK); + switch (comp) { + + case CCKD_COMPRESS_NONE: + newlen = cckd_trklen (dev, from); + to = from; + break; + case CCKD_COMPRESS_ZLIB: + to = calloc (maxlen, 1); + if (to == NULL) { + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD190E uncompress %d calloc() error: %s\n"), + trk, strerror(errno)); + return NULL; + } + newlen = cckd_uncompress_zlib (dev, to, from, len, maxlen); + break; + case CCKD_COMPRESS_BZIP2: + to = calloc (maxlen, 1); + if (to == NULL) { + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD191E uncompress %d calloc() error: %s\n"), + trk, strerror(errno)); + return NULL; + } + newlen = cckd_uncompress_bzip2 (dev, to, from, len, maxlen); + break; + default: + newlen = -1; + break; + } + + newlen = cckd_validate (dev, to, trk, newlen); + + if (newlen < 0 && (to == NULL || to == from)) { + to = calloc (maxlen, 1); + if (to == NULL) { + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD192E uncompress %d calloc() error: %s\n"), + trk, strerror(errno)); + return NULL; + } + } + + /* Try each uncompression routine in turn */ + if (newlen < 0) + { + newlen = cckd_trklen (dev, from); + newlen = cckd_validate (dev, from, trk, newlen); + if (newlen > 0) { + free (to); + to = from; + } + } + if (newlen < 0) + { + newlen = cckd_uncompress_zlib (dev, to, from, len, maxlen); + newlen = cckd_validate (dev, to, trk, newlen); + } + if (newlen < 0) + { + newlen = cckd_uncompress_bzip2 (dev, to, from, len, maxlen); + newlen = cckd_validate (dev, to, trk, newlen); + } + + /* Handle error condition */ + if (newlen < 0) + { + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD193E uncompress error trk %d: %2.2x%2.2x%2.2x%2.2x%2.2x\n"), + trk, from[0], from[1], from[2], from[3], from[4]); + if (comp & ~cckdblk.comps) + logmsg ("%4.4X:",dev->devnum); logmsg (_("HHCCD194E %s compression not supported\n"), + compress[comp]); + free (to); + to = NULL; + } + + return to; +} + +int cckd_uncompress_zlib (DEVBLK *dev, BYTE *to, BYTE *from, int len, int maxlen) +{ +#if defined(HAVE_LIBZ) +unsigned long newlen; +int rc; + + UNREFERENCED(dev); + memcpy (to, from, CKDDASD_TRKHDR_SIZE); + newlen = maxlen - CKDDASD_TRKHDR_SIZE; + rc = uncompress(&to[CKDDASD_TRKHDR_SIZE], &newlen, + &from[CKDDASD_TRKHDR_SIZE], len - CKDDASD_TRKHDR_SIZE); + if (rc == Z_OK) + { + newlen += CKDDASD_TRKHDR_SIZE; + to[0] = 0; + } + else + newlen = -1; + + cckdtrc ("cckddasd: uncompress zlib newlen %d rc %d\n",(int)newlen,rc); + + return (int)newlen; +#else + UNREFERENCED(dev); + UNREFERENCED(to); + UNREFERENCED(from); + UNREFERENCED(len); + UNREFERENCED(maxlen); + return -1; +#endif +} +int cckd_uncompress_bzip2 (DEVBLK *dev, BYTE *to, BYTE *from, int len, int maxlen) +{ +#if defined(CCKD_BZIP2) +unsigned int newlen; +int rc; + + UNREFERENCED(dev); + memcpy (to, from, CKDDASD_TRKHDR_SIZE); + newlen = maxlen - CKDDASD_TRKHDR_SIZE; + rc = BZ2_bzBuffToBuffDecompress ( + &to[CKDDASD_TRKHDR_SIZE], &newlen, + &from[CKDDASD_TRKHDR_SIZE], len - CKDDASD_TRKHDR_SIZE, + 0, 0); + if (rc == BZ_OK) + { + newlen += CKDDASD_TRKHDR_SIZE; + to[0] = 0; + } + else + newlen = -1; + + cckdtrc ("cckddasd: uncompress bz2 newlen %d rc %d\n",newlen,rc); + + return (int)newlen; +#else + UNREFERENCED(dev); + UNREFERENCED(to); + UNREFERENCED(from); + UNREFERENCED(len); + UNREFERENCED(maxlen); + return -1; +#endif +} + +/*-------------------------------------------------------------------*/ +/* Compress a track image */ +/*-------------------------------------------------------------------*/ +int cckd_compress (DEVBLK *dev, BYTE **to, BYTE *from, int len, + int comp, int parm) +{ +int newlen; + + switch (comp) { + case CCKD_COMPRESS_NONE: + newlen = cckd_compress_none (dev, to, from, len, parm); + break; + case CCKD_COMPRESS_ZLIB: + newlen = cckd_compress_zlib (dev, to, from, len, parm); + break; + case CCKD_COMPRESS_BZIP2: + newlen = cckd_compress_bzip2 (dev, to, from, len, parm); + break; + default: + newlen = cckd_compress_bzip2 (dev, to, from, len, parm); + break; + } + return newlen; +} +int cckd_compress_none (DEVBLK *dev, BYTE **to, BYTE *from, int len, int parm) +{ + UNREFERENCED(dev); + UNREFERENCED(parm); + *to = from; + from[0] = CCKD_COMPRESS_NONE; + return len; +} +int cckd_compress_zlib (DEVBLK *dev, BYTE **to, BYTE *from, int len, int parm) +{ +#if defined(HAVE_LIBZ) +unsigned long newlen; +int rc; +BYTE *buf; + + UNREFERENCED(dev); + buf = *to; + from[0] = CCKD_COMPRESS_NONE; + memcpy (buf, from, CKDDASD_TRKHDR_SIZE); + buf[0] = CCKD_COMPRESS_ZLIB; + newlen = 65535 - CKDDASD_TRKHDR_SIZE; + rc = compress2 (&buf[CKDDASD_TRKHDR_SIZE], &newlen, + &from[CKDDASD_TRKHDR_SIZE], len - CKDDASD_TRKHDR_SIZE, + parm); + newlen += CKDDASD_TRKHDR_SIZE; + if (rc != Z_OK || (int)newlen >= len) + { + *to = from; + newlen = len; + } + return (int)newlen; +#else + +#if defined(CCKD_BZIP2) + return cckd_compress_bzip2 (dev, to, from, len, parm); +#else + return cckd_compress_none (dev, to, from, len, parm); +#endif + +#endif +} +int cckd_compress_bzip2 (DEVBLK *dev, BYTE **to, BYTE *from, int len, int parm) +{ +#if defined(CCKD_BZIP2) +unsigned int newlen; +int rc; +BYTE *buf; + + UNREFERENCED(dev); + buf = *to; + from[0] = CCKD_COMPRESS_NONE; + memcpy (buf, from, CKDDASD_TRKHDR_SIZE); + buf[0] = CCKD_COMPRESS_BZIP2; + newlen = 65535 - CKDDASD_TRKHDR_SIZE; + rc = BZ2_bzBuffToBuffCompress ( + &buf[CKDDASD_TRKHDR_SIZE], &newlen, + &from[CKDDASD_TRKHDR_SIZE], len - CKDDASD_TRKHDR_SIZE, + parm >= 1 && parm <= 9 ? parm : 5, 0, 0); + newlen += CKDDASD_TRKHDR_SIZE; + if (rc != BZ_OK || newlen >= (unsigned int)len) + { + *to = from; + newlen = len; + } + return newlen; +#else + return cckd_compress_zlib (dev, to, from, len, parm); +#endif +} /*-------------------------------------------------------------------*/ /* cckd command help */ /*-------------------------------------------------------------------*/ void cckd_command_help() { - cckdmsg ("cckd command parameters:\n" + logmsg ("cckd command parameters:\n" "help\t\tDisplay help message\n" "stats\t\tDisplay cckd statistics\n" "opts\t\tDisplay cckd options\n" - "cache=\tSet cache size (M)\t\t\t(1 .. 64)\n" - "l2cache=\tSet l2cache size (K)\t\t\t(256 .. 2048)\n" + "comp=\t\tOverride compression\t\t(-1 .. 2)\n" + "compparm=\tOverride compression parm\t\t(-1 .. 9)\n" "ra=\t\tSet number readahead threads\t\t(1 .. 9)\n" "raq=\t\tSet readahead queue size\t\t(0 .. 16)\n" "rat=\t\tSet number tracks to read ahead\t\t(0 .. 16)\n" @@ -4553,34 +4786,32 @@ void cckd_command_help() ); } /* end function cckd_command_help */ - /*-------------------------------------------------------------------*/ /* cckd command stats */ /*-------------------------------------------------------------------*/ void cckd_command_opts() { - cckdmsg ("cache=%d,l2cache=%d,ra=%d,raq=%d,rat=%d," + logmsg ("comp=%d,compparm=%d,ra=%d,raq=%d,rat=%d," "wr=%d,gcint=%d,gcparm=%d,nostress=%d,\n" "\tfreepend=%d,fsync=%d,ftruncwa=%d,trace=%d\n", - (cckdblk.cachenbr + 8) >> 4, - cckdblk.l2cachenbr << 1, cckdblk.ramax, + cckdblk.comp, cckdblk.compparm, + cckdblk.ramax, cckdblk.ranbr, cckdblk.readaheads, - cckdblk.writermax, cckdblk.gcolwait, - cckdblk.gcolparm, cckdblk.nostress, cckdblk.freepend, + cckdblk.wrmax, cckdblk.gcwait, + cckdblk.gcparm, cckdblk.nostress, cckdblk.freepend, cckdblk.fsync, cckdblk.ftruncwa,cckdblk.itracen); } /* end function cckd_command_opts */ - /*-------------------------------------------------------------------*/ /* cckd command stats */ /*-------------------------------------------------------------------*/ void cckd_command_stats() { - cckdmsg("reads....%10lld Kbytes...%10lld writes...%10lld Kbytes...%10lld\n" + logmsg("reads....%10lld Kbytes...%10lld writes...%10lld Kbytes...%10lld\n" "readaheads%9lld misses...%10lld syncios..%10lld misses...%10lld\n" "switches.%10lld l2 reads.%10lld stress writes...%10lld\n" "cachehits%10lld misses...%10lld l2 hits..%10lld misses...%10lld\n" - "waits write....%10lld read.....%10lld cache....%10lld\n" + "waits i/o......%10lld cache....%10lld\n" "garbage collector moves....%10lld Kbytes...%10lld\n", cckdblk.stats_reads, cckdblk.stats_readbytes >> 10, cckdblk.stats_writes, cckdblk.stats_writebytes >> 10, @@ -4590,48 +4821,24 @@ void cckd_command_stats() cckdblk.stats_stresswrites, cckdblk.stats_cachehits, cckdblk.stats_cachemisses, cckdblk.stats_l2cachehits, cckdblk.stats_l2cachemisses, - cckdblk.stats_writewaits, cckdblk.stats_readwaits, - cckdblk.stats_cachewaits, + cckdblk.stats_iowaits, cckdblk.stats_cachewaits, cckdblk.stats_gcolmoves, cckdblk.stats_gcolbytes >> 10); } /* end function cckd_command_stats */ - /*-------------------------------------------------------------------*/ /* cckd command debug */ /*-------------------------------------------------------------------*/ void cckd_command_debug() { - int i; - - cckdmsg ("cache:\n"); - for (i = 0; i < cckdblk.cachenbr; i++) - { - cckdmsg ("[%3d] %4.4X:%6.6d %8.8x %p %lld\n", - i, cckdblk.cache[i].dev ? cckdblk.cache[i].dev->devnum : 0, - cckdblk.cache[i].trk, cckdblk.cache[i].flags, - cckdblk.cache[i].buf, cckdblk.cache[i].age); - } - - cckdmsg ("l2cache:\n"); - for (i = 0; i < cckdblk.l2cachenbr; i++) - { - cckdmsg ("[%3d] %4.4X:%d.%3.3d %8.8x %p %lld\n", - i, cckdblk.l2cache[i].dev ? cckdblk.l2cache[i].dev->devnum : 0, - cckdblk.l2cache[i].sfx, cckdblk.l2cache[i].l1x, - cckdblk.l2cache[i].flags, cckdblk.l2cache[i].buf, - cckdblk.l2cache[i].age); - } - } - /*-------------------------------------------------------------------*/ /* cckd command processor */ /*-------------------------------------------------------------------*/ int cckd_command(BYTE *op, int cmd) { -BYTE *kw, *p, c = '\0'; -int val, i, opts = 0; +BYTE *kw, *p, c = '\0', buf[256]; +int val, opts = 0; /* Display help for null operand */ if (op == NULL) @@ -4641,6 +4848,9 @@ int val, i, opts = 0; return 0; } + strcpy(buf, op); + op = buf; + /* Initialize the global cckd block if necessary */ if (memcmp (&cckdblk.id, "CCKDBLK ", sizeof(cckdblk.id))) cckddasd_init (0, NULL); @@ -4676,65 +4886,29 @@ int val, i, opts = 0; if (!cmd) return 0; cckd_command_debug(); } - else if (strcasecmp (kw, "cache") == 0) + else if (strcasecmp (kw, "comp") == 0) { - val = val << 4; - if (val < CCKD_MIN_CACHE || val > CCKD_MAX_CACHE || c != '\0') + if (val < -1 || (val & ~cckdblk.comps) || c != '\0') { - cckdmsg ("Invalid value for cache= (%d)\n", val); + logmsg ("Invalid value for comp=\n"); return -1; } else { - obtain_lock (&cckdblk.cachelock); - - /* Free cache entries if the number is decreasing */ - if (val < cckdblk.cachenbr) - { - for (i = cckdblk.cachenbr - 1; i >= val; i--); - { - if (cckdblk.cache[i].flags & CCKD_CACHE_ACTIVE) - break; - else if (cckdblk.cache[i].buf) - free (cckdblk.cache[i].buf); - memset (&cckdblk.cache[i], 0, CCKD_CACHE_SIZE); - } - val = i + 1; - } - - cckdblk.cachenbr = val; - release_lock (&cckdblk.cachelock); + cckdblk.comp = val; opts = 1; } } - else if (strcasecmp (kw, "l2cache") == 0) + else if (strcasecmp (kw, "compparm") == 0) { - val = (val + 1) >> 1; - if (val < CCKD_MIN_L2CACHE || val > CCKD_MAX_L2CACHE || c != '\0') + if (val < -1 || val > 9 || c != '\0') { - cckdmsg ("Invalid value for l2cache=\n"); + logmsg ("Invalid value for compparm=\n"); return -1; } else { - obtain_lock (&cckdblk.l2cachelock); - - /* Free cache entries if the number is decreasing */ - if (val < cckdblk.l2cachenbr) - { - for (i = cckdblk.l2cachenbr - 1; i >= val; i--); - { - if (cckdblk.l2cache[i].flags & CCKD_CACHE_ACTIVE) - break; - else if (cckdblk.l2cache[i].buf) - free (cckdblk.l2cache[i].buf); - memset (&cckdblk.l2cache[i], 0, CCKD_CACHE_SIZE); - } - val = i + 1; - } - - cckdblk.l2cachenbr = val; - release_lock (&cckdblk.l2cachelock); + cckdblk.compparm = val; opts = 1; } } @@ -4742,7 +4916,7 @@ int val, i, opts = 0; { if (val < CCKD_MIN_RA || val > CCKD_MAX_RA || c != '\0') { - cckdmsg ("Invalid value for ra=\n"); + logmsg ("Invalid value for ra=\n"); return -1; } else @@ -4755,7 +4929,7 @@ int val, i, opts = 0; { if (val < 0 || val > CCKD_MAX_RA_SIZE || c != '\0') { - cckdmsg ("Invalid value for raq=\n"); + logmsg ("Invalid value for raq=\n"); return -1; } else @@ -4768,7 +4942,7 @@ int val, i, opts = 0; { if (val < 0 || val > CCKD_MAX_RA_SIZE || c != '\0') { - cckdmsg ("Invalid value for rat=\n"); + logmsg ("Invalid value for rat=\n"); return -1; } else @@ -4781,12 +4955,12 @@ int val, i, opts = 0; { if (val < CCKD_MIN_WRITER || val > CCKD_MAX_WRITER || c != '\0') { - cckdmsg ("Invalid value for wr=\n"); + logmsg ("Invalid value for wr=\n"); return -1; } else { - cckdblk.writermax = val; + cckdblk.wrmax = val; opts = 1; } } @@ -4794,12 +4968,12 @@ int val, i, opts = 0; { if (val < 1 || val > 60 || c != '\0') { - cckdmsg ("Invalid value for gcint=\n"); + logmsg ("Invalid value for gcint=\n"); return -1; } else { - cckdblk.gcolwait = val; + cckdblk.gcwait = val; opts = 1; } } @@ -4807,12 +4981,12 @@ int val, i, opts = 0; { if (val < -8 || val > 8 || c != '\0') { - cckdmsg ("Invalid value for gcparm=\n"); + logmsg ("Invalid value for gcparm=\n"); return -1; } else { - cckdblk.gcolparm = val; + cckdblk.gcparm = val; opts = 1; } } @@ -4820,7 +4994,7 @@ int val, i, opts = 0; { if (val < 0 || val > 1 || c != '\0') { - cckdmsg ("Invalid value for nostress=\n"); + logmsg ("Invalid value for nostress=\n"); return -1; } else @@ -4833,7 +5007,7 @@ int val, i, opts = 0; { if (val < -1 || val > CCKD_MAX_FREEPEND || c != '\0') { - cckdmsg ("Invalid value for freepend=\n"); + logmsg ("Invalid value for freepend=\n"); return -1; } else @@ -4846,7 +5020,7 @@ int val, i, opts = 0; { if (val < 0 || val > 1 || c != '\0') { - cckdmsg ("Invalid value for fsync=\n"); + logmsg ("Invalid value for fsync=\n"); return -1; } else @@ -4859,7 +5033,7 @@ int val, i, opts = 0; { if (val < 0 || val > 1000 || c != '\0') { - cckdmsg ("Invalid value for ftruncwa=\n"); + logmsg ("Invalid value for ftruncwa=\n"); return -1; } else @@ -4872,31 +5046,35 @@ int val, i, opts = 0; { if (val < 0 || val > CCKD_MAX_TRACE || c != '\0') { - cckdmsg ("Invalid value for trace=\n"); + logmsg ("Invalid value for trace=\n"); return -1; } else { /* Disable tracing in case it's already active */ - cckdblk.itracex = cckdblk.itracen = 0; - if (cckdblk.itrace) + CCKD_TRACE *p = cckdblk.itrace; + cckdblk.itrace = NULL; + if (p) { sleep (1); - free (cckdblk.itrace); - cckdblk.itrace = NULL; + cckdblk.itrace = cckdblk.itracep = cckdblk.itracex = NULL; + cckdblk.itracen = 0; + free (p); } /* Get a new trace table */ if (val > 0) { - cckdblk.itrace = calloc ( val, 128); - if (cckdblk.itrace) + p = calloc ( val, sizeof(CCKD_TRACE)); + if (p) { - cckdblk.itracex = 0; cckdblk.itracen = val; + cckdblk.itracex = p + val; + cckdblk.itracep = p; + cckdblk.itrace = p; } else - cckdmsg ("calloc() failed for trace table: %s\n", + logmsg ("calloc() failed for trace table: %s\n", strerror(errno)); } opts = 1; @@ -4904,7 +5082,7 @@ int val, i, opts = 0; } else { - cckdmsg ("cckd invalid keyword: %s\n",kw); + logmsg ("cckd invalid keyword: %s\n",kw); if (!cmd) return -1; cckd_command_help (); op = NULL; @@ -4915,34 +5093,31 @@ int val, i, opts = 0; return 0; } /* end function cckd_command */ - /*-------------------------------------------------------------------*/ /* Print internal trace */ /*-------------------------------------------------------------------*/ void cckd_print_itrace() { -int start, i, n; /* Indexes */ +CCKD_TRACE *i, *p; /* Trace table pointers */ - if (cckdblk.itracen == 0) return; - cckdmsg ("cckddasd: print_itrace\n"); - n = cckdblk.itracen; - cckdblk.itracen = 0; + if (!cckdblk.itrace) return; + logmsg (_("HHCCD900I print_itrace\n")); + i = cckdblk.itrace; + cckdblk.itrace = NULL; sleep (1); - i = start = cckdblk.itracex; + p = cckdblk.itracep; do { - if (i >= 128 * n) i = 0; - if (cckdblk.itrace[i] != '\0') - cckdmsg ("%s", &cckdblk.itrace[i]); - i+=128; - } while (i != start); - memset (cckdblk.itrace, 0, n * 128); - cckdblk.itracex = 0; - cckdblk.itracen = n; - sleep (2); + if (p >= cckdblk.itracex) p = i; + if (p[0] != '\0') + logmsg ("%s", (char *)p); + ++p; + } while (p != cckdblk.itracep); + memset (i, 0, cckdblk.itracen * sizeof(CCKD_TRACE)); + cckdblk.itracep = i; + cckdblk.itrace = i; } - DEVHND cckddasd_device_hndinfo = { &ckddasd_init_handler, &ckddasd_execute_ccw, @@ -4951,11 +5126,14 @@ DEVHND cckddasd_device_hndinfo = { &cckddasd_start, &cckddasd_end, &cckddasd_start, - &cckddasd_end + &cckddasd_end, + &cckd_read_track, + &cckd_update_track, + &cckd_used, + NULL, + NULL }; - - DEVHND cfbadasd_device_hndinfo = { &fbadasd_init_handler, &fbadasd_execute_ccw, @@ -4964,5 +5142,10 @@ DEVHND cfbadasd_device_hndinfo = { &cckddasd_start, &cckddasd_end, &cckddasd_start, - &cckddasd_end + &cckddasd_end, + &cfba_read_block, + &cfba_write_block, + &cfba_used, + NULL, + NULL }; diff --git a/cckddiag.c b/cckddiag.c new file mode 100644 index 0000000..b700186 --- /dev/null +++ b/cckddiag.c @@ -0,0 +1,674 @@ +/* CCKDDIAG.C (c) Copyright Roger Bowler, 1999-2003 */ +/* CCKD diagnostic tool */ +/* 2003-02-07 James M. Morrison initial implementation */ +/* portions borrowed from cckdcdsk & other CCKD code */ +/*-------------------------------------------------------------------*/ +/* Diagnostic tool to display various CCKD data */ +/*-------------------------------------------------------------------*/ + +/* TODO: add FBA support or write cfbadiag */ + +#include +#include +#include +#include "hercules.h" +#include "dasdblks.h" /* data_dump */ + +typedef struct _CKD_RECSTAT { /* CKD DASD record stats */ + int cc; /* CC cylinder # (relative zero) */ + int hh; /* HH head # (relative zero) */ + int r; /* Record # (relative zero) */ + int kl; /* key length */ + int dl; /* data length */ +} CKD_RECSTAT; + +/*-------------------------------------------------------------------*/ +/* Global data areas */ +/*-------------------------------------------------------------------*/ +CCKD_L1ENT *l1 = NULL; /* L1TAB */ +CCKD_L2ENT *l2 = NULL; /* L2TAB */ +void *tbuf = NULL; /* track header & data */ +void *bulk = NULL; /* bulk data buffer */ +int fd = 0; /* File descriptor */ +static BYTE eighthexFF[] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; + +#ifdef DEBUG + int debug = 1; // enable debug code +#else + int debug = 0; // disable debug code +#endif + int pausesnap = 0; // 1 = pause after snap (getc) + +#ifdef EXTERNALGUI +#if 0 +/* Special flag to indicate whether or not we're being + run under the control of the external GUI facility. */ +int extgui = 0; +#endif +#endif /*EXTERNALGUI*/ + +/*-------------------------------------------------------------------*/ +/* print syntax */ +/*-------------------------------------------------------------------*/ +int syntax() +{ + fprintf (stderr, "\n" + "cckddiag [options] file-name\n" + "Valid options are one or more of the following:\n" + " -v display version and exit\n" + " -d display DEVHDR\n" + " -c display CDEVHDR\n" + " -1 display L1TAB (numeric one)\n" + " -g enable debug output\n" + "CKD track related options:\n" + " -a cc hh display absolute CCHH data\n" + " -r tt display relative TT data\n" + " -2 display L2TAB related to -a or -r\n" + " -t display track data\n" + " -x hex display track key/data\n" + "Offset option:\n" + " -o oo ll hex display data at offset oo of length ll\n" + "Further information: man 1 cckddiag\n" + ); + return -1; +} + +/*-------------------------------------------------------------------*/ +/* snap - display msg, dump data */ +/*-------------------------------------------------------------------*/ +/* Newline appended to message */ +void snap(BYTE *msg, void *data, int len) { +int x; + + if (msg != NULL) + fprintf(stderr, "%s\n", msg); + data_dump(data, len); + if (pausesnap) { + fprintf(stderr, "Press enter to continue\n"); + x = getc(stdin); + } +} + +/*-------------------------------------------------------------------*/ +/* clean - cleanup before exit */ +/*-------------------------------------------------------------------*/ +void clean() { + close(fd); + free(l1); /* L1TAB buffer */ + free(l2); /* L2TAB buffer */ + free(tbuf); /* track and header buffer */ + free(bulk); /* offset data buffer */ +} + +/*-------------------------------------------------------------------*/ +/* makbuf - allocate buffer, handle errors (exit if any) */ +/*-------------------------------------------------------------------*/ +void *makbuf(int len, char *label) { + void *p; + + p = malloc(len); + if (p == NULL) { + fprintf(stderr, "malloc %s of length %d failed\n", + label, len); + clean(); + exit(4); + } + if (debug) fprintf(stderr, "\n" + "MAKBUF malloc %s buffer of %d bytes at %p\n", + label, len, p); + return p; +} + +/*-------------------------------------------------------------------*/ +/* readpos - common lseek and read invocation with error handling */ +/*-------------------------------------------------------------------*/ +/* This code exits on error rather than return to caller. */ +int readpos( + int fd, /* opened CCKD image file */ + void *buf, /* buffer of size len */ + off_t offset, /* offset into CCKD image to read */ + size_t len /* length of data to read */ + ) { + if (debug) + fprintf(stderr, "\nREADPOS seeking %d (0x%8.8X)\n", + (int)offset, (unsigned int)offset); + if (lseek(fd, offset, SEEK_SET) < 0) { + fprintf(stderr, _("lseek to pos 0x%8.8x error: %s\n"), + (unsigned int) offset, strerror(errno)); + clean(); + exit (1); + } + if (debug) + fprintf(stderr, + "READPOS reading buf addr %p length %d (0x%8.8X)\n", + buf, len, len); + if (read(fd, buf, len) < (ssize_t)len) { + fprintf(stderr, _("cckddiag: read error: %s\n"), + strerror(errno)); + clean(); + exit (2); + } + return 0; +} + +/*-------------------------------------------------------------------*/ +/* decomptrk - decompress track data */ +/*-------------------------------------------------------------------*/ +int decomptrk( + BYTE *ibuf, /* input buffer address */ + int ibuflen, /* input buffer length */ + BYTE *obuf, /* output buffer address */ + int obuflen, /* output buffer length */ + int heads, /* >=0 means CKD, else FBA */ + int trk, /* relative track or block number */ + BYTE *msg /* addr of 80 byte msg buf or NULL */ + ) +/* ibuf points at CKDDASD_TRKHDR header followed by track data */ +/* ibuflen specifies length of TRKHDR and data */ +/* This code based on decompression logic in cdsk_valid_trk. */ +/* Returns length of decompressed data or -1 on error. */ +{ +int rc; /* Return code */ +BYTE *bufp; /* Buffer pointer */ +int bufl; /* Buffer length */ + + memset(obuf, 0x00, obuflen); /* clear output buffer */ + + /* Uncompress the track/block image */ + switch (ibuf[0] & CCKD_COMPRESS_MASK) { + + case CCKD_COMPRESS_NONE: + bufl = (ibuflen < obuflen) ? ibuflen : obuflen; + memcpy (obuf, ibuf, bufl); + break; + +#ifdef HAVE_LIBZ + case CCKD_COMPRESS_ZLIB: + bufp = (BYTE *)obuf; + memcpy (obuf, ibuf, CKDDASD_TRKHDR_SIZE); + bufl = obuflen - CKDDASD_TRKHDR_SIZE; + rc = uncompress(&obuf[CKDDASD_TRKHDR_SIZE], + (uLongf *)&bufl, + &ibuf[CKDDASD_TRKHDR_SIZE], + ibuflen); + if (rc != Z_OK) { + if (msg) + snprintf(msg, 80, "%s %d uncompress error, rc=%d;" + "%2.2x%2.2x%2.2x%2.2x%2.2x", + heads >= 0 ? "trk" : "blk", trk, rc, + ibuf[0], ibuf[1], ibuf[2], ibuf[3], ibuf[4]); + return -1; + } + bufl += CKDDASD_TRKHDR_SIZE; + break; +#endif + +#ifdef CCKD_BZIP2 + case CCKD_COMPRESS_BZIP2: + bufp = obuf; + memcpy(obuf, ibuf, CKDDASD_TRKHDR_SIZE); + bufl = obuflen - CKDDASD_TRKHDR_SIZE; + rc = BZ2_bzBuffToBuffDecompress ( + &obuf[CKDDASD_TRKHDR_SIZE], + &bufl, + &ibuf[CKDDASD_TRKHDR_SIZE], + ibuflen, 0, 0); + if (rc != BZ_OK) { + if (msg) + snprintf(msg, 80, "%s %d decompress error, rc=%d;" + "%2.2x%2.2x%2.2x%2.2x%2.2x", + heads >= 0 ? "trk" : "blk", trk, rc, + ibuf[0], ibuf[1], ibuf[2], ibuf[3], ibuf[4]); + return -1; + } + bufl += CKDDASD_TRKHDR_SIZE; + break; +#endif + + default: + return -1; + + } /* switch (buf[0] & CCKD_COMPRESS_MASK) */ + return bufl; +} + +/*-------------------------------------------------------------------*/ +/* show_ckd_count - display CKD dasd record COUNT field */ +/*-------------------------------------------------------------------*/ +/* RECHDR is stored in big-endian byte order. */ +BYTE *show_ckd_count(CKDDASD_RECHDR *rh, int trk) { +int cc, hh, r, kl, dl; +BYTE *past; + + cc = (rh->cyl[0] << 8) | (rh->cyl[1]); + hh = (rh->head[0] << 8) | (rh->head[1]); + r = rh->rec; + kl = rh->klen; + dl = (rh->dlen[0] << 8) | (rh->dlen[1]); + fprintf(stderr, "\n" + "Track %d COUNT " + "CC=%d HH=%d R=%d KL=%d DL=%d\n", + trk, cc, hh, r, kl, dl); + past = (BYTE *)rh + sizeof(CKDDASD_RECHDR); + return past; +} + +/*-------------------------------------------------------------------*/ +/* show_ckd_key - display CKD dasd record KEY field */ +/*-------------------------------------------------------------------*/ +BYTE *show_ckd_key(CKDDASD_RECHDR *rh, BYTE *buf, int trk, int xop) { + + if (rh->klen && xop) { + fprintf(stderr, + "\nTrack %d R%d KEY (%d bytes)\n", + trk, rh->rec, rh->klen); + data_dump(buf, rh->klen); + } + return (BYTE *)buf + rh->klen; /* skip past KEY field */ +} + +/*-------------------------------------------------------------------*/ +/* show_ckd_data - display CKD dasd record DATA field */ +/*-------------------------------------------------------------------*/ +BYTE *show_ckd_data(CKDDASD_RECHDR *rh, BYTE *buf, int trk, int xop) { +int dl; + + dl = (rh->dlen[0] << 8) | (rh->dlen[1]); + if (dl && xop) { + fprintf(stderr, + "\nTrack %d R%d DATA (%d bytes)\n", + trk, rh->rec, dl); + data_dump(buf, dl); + } + return buf + dl; /* skip past DATA field */ +} + +/*-------------------------------------------------------------------*/ +/* showtrk - display track data */ +/*-------------------------------------------------------------------*/ +/* This code mimics selected logic in cdsk_valid_trk. */ +void showtrk( + CKDDASD_TRKHDR *buf, /* track header ptr */ + int imglen, /* TRKHDR + track user data length */ + int trk, /* relative track number */ + int xop /* 1=dump key & data blks; 0=don't */ + ) { +BYTE buf2[64*1024]; /* max uncompressed buffer */ +BYTE msg[81]; /* error message buffer */ +CKDDASD_RECHDR *rh; /* CCKD COUNT field */ +BYTE *bufp; +int len; + + if (debug) + snap("\nSHOWTRK Compressed track header and data", buf, imglen); + len = decomptrk( + (BYTE *)buf, /* input buffer address */ + imglen, /* input buffer length */ + buf2, /* output buffer address */ + sizeof(buf2), /* output buffer length */ + 1, /* >=0 means CKD, else FBA */ + trk, /* relative track or block number */ + msg /* addr of message buffer */ + ); + if (debug) + snap("\nSHOWTRK Decompressed track header and data", buf2, len); + bufp = &buf2[sizeof(CKDDASD_TRKHDR)]; + while (bufp < &buf2[sizeof(buf2)]) { + (BYTE *)rh = bufp; + if (memcmp((BYTE *)rh, &eighthexFF, 8) == 0) { + fprintf(stderr, "\nEnd of Track\n"); + break; + } + bufp = show_ckd_count(rh, trk); + bufp = show_ckd_key(rh, bufp, trk, xop); + bufp = show_ckd_data(rh, bufp, trk, xop); + } +} + +/*-------------------------------------------------------------------*/ +/* offtify - given decimal or hex input string, return off_t */ +/* Locale independent, does not check for overflow */ +/* References and */ +/*-------------------------------------------------------------------*/ +/* Based on code in P. J. Plauger's "The Standard C Library" */ +/* See page 34, in Chapter 2 (ctype.h) */ +off_t offtify(BYTE *s) { + +static const char xd[] = {"0123456789abcdefABCDEF"}; +static const char xv[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, + 10, 11, 12, 13, 14, 15}; +off_t v; +BYTE *p; + + p = s; + if ( (*s == '0') && (*(s+1) == 'x') ) { + s = s + 2; + for (v = 0; isxdigit(*s); ++s) + v = (v << 4) + xv[strchr(xd, *s) - xd]; + if (debug) + fprintf(stderr, + "OFFTIFY string %s hex %8.8X decimal %d\n", + p, (unsigned int)v, (int)v); + return v; + } else { /* decimal input */ + v = (off_t) atoi(s); + if (debug) + fprintf(stderr, + "OFFTIFY string %s decimal %8.8X %d\n", + p, (unsigned int)v, (int)v); + return v; + } +} + +/*-------------------------------------------------------------------*/ +/* Main function for CCKD diagnostics */ +/*-------------------------------------------------------------------*/ +int main (int argc, char *argv[]) +{ +int cckd_diag_rc = 0; /* Program return code */ +char *fn; /* File name */ + +CKDDASD_DEVHDR devhdr; /* [C]CKD device hdr */ +CCKDDASD_DEVHDR cdevhdr; /* Compressed CKD device hdr */ +CKDDEV *ckd=0; /* CKD DASD table entry */ +FBADEV *fba=0; /* FBA DASD table entry */ + +int cmd_devhdr = 0; /* display DEVHDR */ +int cmd_cdevhdr = 0; /* display CDEVHDR */ +int cmd_l1tab = 0; /* display L1TAB */ +int cmd_l2tab = 0; /* display L2TAB */ +int cmd_trkdata = 0; /* display track data */ +int cmd_hexdump = 0; /* display track data (hex) */ + +int cmd_offset = 0; /* 1 = display data at */ +int op_offset = 0; /* op_offset of length */ +int op_length = 0; /* op_length */ + +int cmd_cchh = 0; /* 1 = display CCHH data */ +int op_cc = 0; /* CC = cylinder */ +int op_hh = 0; /* HH = head */ + +int cmd_tt = 0; /* 1 = display TT data */ +int op_tt = 0; /* relative track # */ + +int swapend; /* 1 = New endianess doesn't + match machine endianess */ +int n, trk=0, l1ndx=0, l2ndx=0; +off_t l2taboff=0; /* offset to assoc. L2 table */ +int ckddasd; /* 1=CKD dasd 0=FBA dasd */ +int heads=0; /* Heads per cylinder */ +int blks; /* Number fba blocks */ +off_t trkhdroff=0; /* offset to assoc. trk hdr */ +int imglen=0; /* track length */ + +#if defined(ENABLE_NLS) + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); +#endif + +#ifdef EXTERNALGUI + if (argc >= 1 && strncmp(argv[argc-1],"EXTERNALGUI",11) == 0) + { + extgui = 1; + argc--; + } +#endif /*EXTERNALGUI*/ + + /* parse the arguments */ + argc--; + argv++ ; + while (argc > 0) { + if(**argv != '-') break; + + switch(argv[0][1]) { + case 'v': if (argv[0][2] != '\0') return syntax (); + display_version (stderr, + "Hercules CCKD diagnostic program\n"); + return 0; + case 'd': if (argv[0][2] != '\0') return syntax (); + cmd_devhdr = 1; + break; + case 'c': if (argv[0][2] != '\0') return syntax (); + cmd_cdevhdr = 1; + break; + case '1': if (argv[0][2] != '\0') return syntax (); + cmd_l1tab = 1; + break; + case '2': if (argv[0][2] != '\0') return syntax (); + cmd_l2tab = 1; + break; + case 'a': if (argv[0][2] != '\0') return syntax (); + cmd_cchh = 1; + argc--; argv++; + op_cc = offtify(*argv); + argc--; argv++; + op_hh = offtify(*argv); + break; + case 'r': if (argv[0][2] != '\0') return syntax (); + cmd_tt = 1; + argc--; argv++; + op_tt = offtify(*argv); + break; + case 'o': if (argv[0][2] != '\0') return syntax (); + cmd_offset = 1; + argc--; + argv++; + op_offset = offtify(*argv); + argc--; + argv++; + op_length = offtify(*argv); + break; + case 't': if (argv[0][2] != '\0') return syntax (); + cmd_trkdata = 1; + break; + case 'x': if (argv[0][2] != '\0') return syntax (); + cmd_hexdump = 1; + cmd_trkdata = 1; + break; + case 'g': if (argv[0][2] != '\0') return syntax (); + debug = 1; + break; + default: return syntax (); + } + argc--; + argv++; + } + if (argc != 1) return syntax (); + fn = argv[0]; + + /* open the file */ + fd = open(fn, O_RDONLY | O_BINARY); + if (fd < 0) { + fprintf(stderr, + _("cckddiag: error opening file %s: %s\n"), + fn, strerror(errno)); + return -1; + } + + /*---------------------------------------------------------------*/ + /* display DEVHDR - first 512 bytes of dasd image */ + /*---------------------------------------------------------------*/ + readpos(fd, &devhdr, 0, sizeof(devhdr)); + if (cmd_devhdr) { + fprintf(stderr, "\nDEVHDR - %d (decimal) bytes:\n", + sizeof(devhdr)); + data_dump(&devhdr, sizeof(devhdr)); + } + + /*---------------------------------------------------------------*/ + /* Determine CKD or FBA device type */ + /*---------------------------------------------------------------*/ + if (memcmp(devhdr.devid, "CKD_C370", 8) == 0 + || memcmp(devhdr.devid, "CKD_S370", 8) == 0) { + ckddasd = 1; + ckd = dasd_lookup(DASD_CKDDEV, NULL, devhdr.devtype, 0); + if (ckd == NULL) { + fprintf(stderr, + "DASD table entry not found for devtype 0x%2.2X\n", + devhdr.devtype); + clean(fd); + exit(5); + } + } + else + if (memcmp(devhdr.devid, "FBA_C370", 8) == 0 + || memcmp(devhdr.devid, "FBA_S370", 8) == 0) { + ckddasd = 0; + fba = dasd_lookup(DASD_FBADEV, NULL, devhdr.devtype, 0); + if (fba == NULL) { + fprintf(stderr, + "DASD table entry not found for " + "devtype 0x%2.2X\n", + DEFAULT_FBA_TYPE); + clean(fd); + exit(6); + } + } + else { + fprintf(stderr, "incorrect header id\n"); + clean(); + return -1; + } + + /*---------------------------------------------------------------*/ + /* Set up device characteristics */ + /*---------------------------------------------------------------*/ + if (ckddasd) { + heads = ((U32)(devhdr.heads[3]) << 24) + | ((U32)(devhdr.heads[2]) << 16) + | ((U32)(devhdr.heads[1]) << 8) + | (U32)(devhdr.heads[0]); + if (debug) + fprintf(stderr, + "\n%s device has %d heads/cylinder\n", + ckd->name, heads); + } else { + blks = ((U32)(cdevhdr.cyls[0]) << 24) + | ((U32)(cdevhdr.cyls[2]) << 16) + | ((U32)(cdevhdr.cyls[1]) << 8) + | (U32)(cdevhdr.cyls[0]); + } + + /*---------------------------------------------------------------*/ + /* display CDEVHDR - follows DEVHDR */ + /*---------------------------------------------------------------*/ + readpos(fd, &cdevhdr, CKDDASD_DEVHDR_SIZE, sizeof(cdevhdr)); + if (cmd_cdevhdr) { + fprintf(stderr, "\nCDEVHDR - %d (decimal) bytes:\n", + sizeof(cdevhdr)); + data_dump(&cdevhdr, sizeof(cdevhdr)); + } + + /*---------------------------------------------------------------*/ + /* Find machine endian-ness */ + /*---------------------------------------------------------------*/ + /* cckd_endian() returns 1 for big-endian machines */ + swapend = (cckd_endian() != + ((cdevhdr.options & CCKD_BIGENDIAN) != 0)); + + /*---------------------------------------------------------------*/ + /* display L1TAB - follows CDEVHDR */ + /*---------------------------------------------------------------*/ + /* swap numl1tab if needed */ + n = cdevhdr.numl1tab; + if (swapend) cckd_swapend4((char *)&n); + + l1 = makbuf(n * CCKD_L1ENT_SIZE, "L1TAB"); + readpos(fd, l1, CCKD_L1TAB_POS, n * CCKD_L1ENT_SIZE); + /* L1TAB itself is not adjusted for endian-ness */ + if (cmd_l1tab) { + fprintf(stderr, "\nL1TAB - %d (0x%8.8X) bytes:\n", + (n * CCKD_L1ENT_SIZE), (n * CCKD_L1ENT_SIZE)); + data_dump(l1, n * CCKD_L1ENT_SIZE); + } + + /*---------------------------------------------------------------*/ + /* display OFFSET, LENGTH data */ + /*---------------------------------------------------------------*/ + if (cmd_offset) { + bulk = makbuf(op_length, "BULK"); + readpos(fd, bulk, op_offset, op_length); + fprintf(stderr, + "\nIMAGE OFFSET %d (0x%8.8X) " + "of length %d (0x%8.8X) bytes:\n", + op_offset, op_offset, op_length, op_length); + data_dump(bulk, op_length); + free(bulk); + bulk = NULL; + } + + /*---------------------------------------------------------------*/ + /* FBA isn't supported here because I don't know much about FBA */ + /*---------------------------------------------------------------*/ + if ( (!ckddasd) && ((cmd_cchh) || (cmd_tt)) ) { + fprintf(stderr, "CCHH/reltrk not supported for FBA\n"); + clean(); + exit(3); + } + + /*---------------------------------------------------------------*/ + /* Setup CCHH or relative track request */ + /*---------------------------------------------------------------*/ + if (ckddasd) { + if (cmd_tt) { + trk = op_tt; + op_cc = trk / heads; + op_hh = trk % heads; + } else { + trk = (op_cc * heads) + op_hh; + } + l1ndx = trk / cdevhdr.numl2tab; + l2ndx = trk % cdevhdr.numl2tab; + l2taboff = l1[l1ndx]; + if (swapend) cckd_swapend4((char *)&l2taboff); + } + + /*---------------------------------------------------------------*/ + /* display CKD CCHH or relative track data */ + /*---------------------------------------------------------------*/ + if ((cmd_cchh) || (cmd_tt)) { + fprintf(stderr, + "CC %d HH %d = reltrk %d; " + "L1 index = %d, L2 index = %d\n" + "L1 index %d = L2TAB offset %d (0x%8.8X)\n", + op_cc, op_hh, trk, + l1ndx, l2ndx, + l1ndx, (int)l2taboff, (int)l2taboff); + l2 = makbuf(cdevhdr.numl2tab * sizeof(CCKD_L2ENT), "L2TAB"); + readpos(fd, l2, l2taboff, + cdevhdr.numl2tab * sizeof(CCKD_L2ENT)); + if (cmd_l2tab) { + fprintf(stderr, + "\nL2TAB - %d (decimal) bytes\n", + (cdevhdr.numl2tab * sizeof(CCKD_L2ENT))); + data_dump(l2, (cdevhdr.numl2tab * sizeof(CCKD_L2ENT)) ); + } + fprintf(stderr, "\nL2 index %d = L2TAB entry %d bytes\n", + l2ndx, sizeof(CCKD_L2ENT) ); + data_dump(&l2[l2ndx], sizeof(CCKD_L2ENT) ); + trkhdroff = l2[l2ndx].pos; + imglen = l2[l2ndx].len; + if (swapend) { + cckd_swapend4((char *)&trkhdroff); + cckd_swapend4((char *)&imglen); + } + fprintf(stderr, "\nTRKHDR offset %d (0x%8.8X); " + "length %d (0x%4.4X)\n", + (int)trkhdroff, (int)trkhdroff, imglen, imglen); + tbuf = makbuf(imglen, "TRKHDR+DATA"); + readpos(fd, tbuf, trkhdroff, imglen); + fprintf(stderr, "\nTRKHDR track %d\n", trk); + data_dump(tbuf, sizeof(CKDDASD_TRKHDR) ); + if (cmd_trkdata) showtrk(tbuf, imglen, trk, cmd_hexdump); + free(l2); free(tbuf); + l2 = NULL; tbuf = NULL; + } + + /* Close file, exit */ + fprintf(stderr, "\n"); + clean(); + return cckd_diag_rc; +} + diff --git a/cckdfix.c b/cckdfix.c new file mode 100644 index 0000000..58b10be --- /dev/null +++ b/cckdfix.c @@ -0,0 +1,107 @@ +#include "hercules.h" +int main ( int argc, char *argv[]) +{ +int fd; +CKDDASD_DEVHDR devhdr; +CCKDDASD_DEVHDR cdevhdr; +int heads, cyls, devt; + + fd = open (argv[1], O_RDWR|O_BINARY); + if (fd < 0) return 1; + + read (fd, &devhdr, CKDDASD_DEVHDR_SIZE); + read (fd, &cdevhdr, CCKDDASD_DEVHDR_SIZE); + + /* --------------------------------------- */ + /* Device header updates */ + /* --------------------------------------- */ + + /* device identifier */ + +// memcpy (devhdr.devid, "CKD_C370", 8); + + /* number of heads per cylinder + must be in little-endian byte order */ + +// devhdr.heads[3] = (heads >> 24) & 0xFF; +// devhdr.heads[2] = (heads >> 16) & 0xFF; +// devhdr.heads[1] = (heads >> 8) & 0xFF; +// devhdr.heads[0] = heads & 0xFF; + + /* device type -- last two digits */ + +// devhdr.devtype = devt; /* eg 0x90 for 3390 */ + + /* file sequence number; must be zero for + compressed ckd dasd emulation */ + +// devhdr.fileseq = 0; + + /* highest cylinder on this file; must be zero for + compressed ckd dasd emulation */ + +// devhdr.highcyl[0] = 0; +// devhdr.highcyl[1] = 0; + +// memset (&devhdr.resv, 0, 492); + + + /* --------------------------------------- */ + /* Compressed device header updates */ + /* --------------------------------------- */ + + /* version-release-modification level */ + +// cdevhdr.vrm[0] = CCKD_VERSION; +// cdevhdr.vrm[0] = CCKD_RELEASE; +// cdevhdr.vrm[0] = CCKD_MODLVL; + + /* options byte */ + +// cdevhdr.options = 0; +// cdevhdr.options |= CCKD_NOFUDGE; +// cdevhdr.options |= CCKD_BIGENDIAN; +// cdevhdr.options |= CCKD_OPENED; + + /* lookup table sizes*/ + +// cdevhdr.numl1tab = (cyls * heads) >> 8; +// if ((cyls * heads) & 0xff != 0) +// cdevhdr.numl1tab++; +// cdevhdr.numl2tab = 256; + + /* free space header -- set to zeroes to force + cckdcdsk to rebuild the free space */ + +// memset (&cdevhdr.CCKD_FREEHDR, 0, CCKD_FREEHDR_SIZE); + + /* number of cylinders on the emulated device + must be in little-endian byte order */ + +// cdevhdr.cyls[3] = (cyls >> 24) & 0xFF; +// cdevhdr.cyls[2] = (cyls >> 16) & 0xFF; +// cdevhdr.cyls[1] = (cyls >> 8) & 0xFF; +// cdevhdr.cyls[0] = cyls & 0xFF; + +// cdevhdr.resv1 = 0; + + /* compression algorithm and parameter */ + +// cdevhdr.compress = CCKD_COMPRESS_NONE; +// cdevhdr.compress_parm = 0; + +// cdevhdr.compress = CCKD_COMPRESS_ZLIB; +// cdevhdr.compress_parm = Z_DEFAULT_COMPRESSION; + +// cdevhdr.compress = CCKD_COMPRESS_BZIP2; +// cdevhdr.compress_parm = 5; + +// memset (&cdevhdr.resv2, 0, 464); + + lseek (fd, 0, SEEK_SET); + write (fd, &devhdr, CKDDASD_DEVHDR_SIZE); + write (fd, &cdevhdr, CCKDDASD_DEVHDR_SIZE); + + close (fd); + return 0; +} diff --git a/cckdutil.c b/cckdutil.c index eba8a38..f3bd97b 100644 --- a/cckdutil.c +++ b/cckdutil.c @@ -7,6 +7,7 @@ /*-------------------------------------------------------------------*/ #include "hercules.h" +#include "opcode.h" #define ENDMSG(m, format, a...) \ if(m!=NULL) fprintf (m, "cckdend: " format, ## a) @@ -675,11 +676,20 @@ int ckddasd; /* 1=CKD dasd 0=FBA dasd */ U32 trkavg=0, trksum=0, trknum=0; /* Used to compute avg trk sz*/ int trys; /* Nbr recovery trys for trk */ +int comps = 0; /* Supported compressions */ +int badcomps[] = {0, 0, 0}; /* Bad compression counts */ char msg[256]; /* Message */ BYTE *space[] = {"none", "devhdr", "cdevhdr", "l1tab", "l2tab", "trkimg", "free_blk", "file_end"}; BYTE *compression[] = {"none", "zlib", "bzip2"}; +#if defined(HAVE_LIBZ) + comps |= CCKD_COMPRESS_ZLIB; +#endif +#if defined(CCKD_BZIP2) + comps |= CCKD_COMPRESS_BZIP2; +#endif + #ifdef EXTERNALGUI /* The number of "steps" (checks) we'll be doing... */ if (extgui) fprintf (stderr,"STEPS=10\n"); @@ -845,16 +855,8 @@ BYTE *compression[] = {"none", "zlib", "bzip2"}; goto cdsk_return; } - /* Check number of cylinders */ - if (hdrcyls < ckd->cyls || hdrcyls > ckd->cyls + ckd->altcyls) - { - CDSKMSG (m, "Invalid number of cylinders in header: %d, " - "expecting %d - %d\n", - hdrcyls, ckd->cyls, ckd->cyls + ckd->altcyls); - goto cdsk_return; - } - - if (cdevhdr.numl1tab != ((hdrcyls * heads) + 255) / 256) + if (cdevhdr.numl1tab < ((hdrcyls * heads) + 255) / 256 + || cdevhdr.numl1tab > ((hdrcyls * heads) + 255) / 256 + 1) { CDSKMSG (m, "Invalid number of l1 table entries in header: " "%d, expecting %d\n", @@ -866,19 +868,18 @@ BYTE *compression[] = {"none", "zlib", "bzip2"}; } else { - int numl1; trks = ((U32)(cdevhdr.cyls[3]) << 24) | ((U32)(cdevhdr.cyls[2]) << 16) | ((U32)(cdevhdr.cyls[1]) << 8) | (U32)(cdevhdr.cyls[0]); trks = (trks / CFBA_BLOCK_NUM) + 1; - numl1 = (trks + 255) / 256; trksz = CFBA_BLOCK_SIZE + CKDDASD_TRKHDR_SIZE; cyls = heads = -1; - if (cdevhdr.numl1tab != numl1) + if (cdevhdr.numl1tab < (trks + 255) / 256 + || cdevhdr.numl1tab > (trks + 255) / 256 + 1) { CDSKMSG (m, "Invalid number of l1 table entries in header: " - "%d, expecting %d\n", cdevhdr.numl1tab, numl1); + "%d, expecting %d\n", cdevhdr.numl1tab, (trks + 255) / 256); goto cdsk_return; } } @@ -1269,11 +1270,10 @@ BYTE *compression[] = {"none", "zlib", "bzip2"}; /* consistency check on track header */ if (ckddasd) { - if ( buf[0] > CCKD_COMPRESS_MAX - || (buf[1] * 256 + buf[2]) >= cyls - || (buf[3] * 256 + buf[4]) >= heads - || (buf[1] * 256 + buf[2]) * heads + - (buf[3] * 256 + buf[4]) != trk) + if ((buf[0] & ~CCKD_COMPRESS_MASK) + || fetch_hw (buf + 1) >= cyls + || fetch_hw (buf + 3) >= heads + || fetch_hw (buf + 1) * heads + fetch_hw (buf + 3) != trk) { sprintf (msg, "track %d invalid header " "0x%2.2x%2.2x%2.2x%2.2x%2.2x", trk, @@ -1283,8 +1283,8 @@ BYTE *compression[] = {"none", "zlib", "bzip2"}; } else { - if ((buf[0] & CCKD_COMPRESS_MASK) > CCKD_COMPRESS_MAX - || (buf[1] << 24) + (buf[2] << 16) + (buf[3] << 8) + buf[4] != trk) + if ((buf[0] & ~CCKD_COMPRESS_MASK) + || (int)fetch_fw (buf + 1) != trk) { sprintf (msg, "block %d invalid header " "0x%2.2x%2.2x%2.2x%2.2x%2.2x", trk, @@ -1292,6 +1292,19 @@ BYTE *compression[] = {"none", "zlib", "bzip2"}; goto bad_trk; } } + + /* Check for unsupported compression */ + if (buf[0] & ~comps) + { + sprintf (msg, "%s %d compressed using %s" + " which is not configured", + ckddasd ? "track" : "block", trk, + compression[buf[0]]); + if (badcomps[buf[0]]++ < 10) + goto bad_trk; + CDSKMSG (m, "Unsupported compression threshold exceeded, aborting\n"); + goto cdsk_return; + } } /* if we've had problems with the level 2 table @@ -2008,6 +2021,15 @@ int kl,dl; /* Key/Data lengths */ BYTE *bufp; /* Buffer pointer */ int bufl; /* Buffer length */ BYTE buf2[65536]; /* Uncompressed buffer */ +int comps = 0; /* Supported compressions */ +BYTE *compression[] = {"none", "zlib", "bzip2", "????"}; + +#if defined(HAVE_LIBZ) + comps |= CCKD_COMPRESS_ZLIB; +#endif +#if defined(CCKD_BZIP2) + comps |= CCKD_COMPRESS_BZIP2; +#endif /* Check for extraneous bits in the first byte */ if (buf[0] & ~CCKD_COMPRESS_MASK) @@ -2020,6 +2042,16 @@ BYTE buf2[65536]; /* Uncompressed buffer */ return -1; } + /* Check for unsupported compression */ + if (buf[0] & ~comps) + { + if (msg) + sprintf(msg,"%s %d compression %s not configured", + heads >= 0 ? "trk" : "blk", trk, + compression[buf[0]]); + return -1; + } + /* Uncompress the track/block image */ switch (buf[0] & CCKD_COMPRESS_MASK) { @@ -2028,7 +2060,7 @@ BYTE buf2[65536]; /* Uncompressed buffer */ bufl = len; break; -#ifdef CCKD_COMPRESS_ZLIB +#ifdef HAVE_LIBZ case CCKD_COMPRESS_ZLIB: bufp = (BYTE *)&buf2; memcpy (&buf2, buf, CKDDASD_TRKHDR_SIZE); @@ -2048,7 +2080,7 @@ BYTE buf2[65536]; /* Uncompressed buffer */ break; #endif -#ifdef CCKD_COMPRESS_BZIP2 +#ifdef CCKD_BZIP2 case CCKD_COMPRESS_BZIP2: bufp = (BYTE *)&buf2; memcpy (&buf2, buf, CKDDASD_TRKHDR_SIZE); @@ -2105,7 +2137,7 @@ BYTE buf2[65536]; /* Uncompressed buffer */ /* validate record 0 */ memcpy (cchh2, &bufp[5], 4); cchh2[0] &= 0x7f; /* fix for ovflow */ - if (memcmp (cchh, cchh2, 4) != 0 || bufp[9] != 0 || + if (/* memcmp (cchh, cchh2, 4) != 0 ||*/ bufp[9] != 0 || bufp[10] != 0 || bufp[11] != 0 || bufp[12] != 8) { if (msg) @@ -2126,9 +2158,11 @@ BYTE buf2[65536]; /* Uncompressed buffer */ memcpy (cchh2, &bufp[sz], 4); cchh2[0] &= 0x7f; /* fix for funny formatted vm disks */ + /* if (r == 1) memcpy (cchh, cchh2, 4); + */ - if (memcmp (cchh, cchh2, 4) != 0 || bufp[sz+4] == 0 || + if (/*memcmp (cchh, cchh2, 4) != 0 ||*/ bufp[sz+4] == 0 || sz + 8 + kl + dl >= bufl) { if (msg) diff --git a/cgibin.c b/cgibin.c index 9ef3ec2..fdb3d2c 100644 --- a/cgibin.c +++ b/cgibin.c @@ -183,26 +183,21 @@ void cgibin_psw(WEBBLK *webblk) } -void get_msgbuf(BYTE **msgbuf, int *msgslot, int *nummsgs, int *msg_size, int *max_msgs); - void cgibin_syslog(WEBBLK *webblk) { -BYTE *msgbuf; /* Circular message buffer */ -int msgslot; /* Next available buffer slot*/ -int nummsgs; /* Number of msgs in buffer */ -int msg_size; -int max_msgs; -BYTE *pointer; -int currmsgn; +int msgcnt; +int msgnum; +char *msgbuf; + char *command; -char *value; -int autorefresh = 0; -int refresh_interval = 5; -int msgcount = 22; +char *value; +int autorefresh = 0; +int refresh_interval = 5; +int msgcount = 22; if ((command = cgi_variable(webblk,"command"))) - SYNCHRONOUS_PANEL_CMD(command); + panel_command(command); if((value = cgi_variable(webblk,"msgcount"))) msgcount = atoi(value); @@ -232,22 +227,9 @@ int msgcount = 22; fprintf(webblk->hsock, "

Hercules System Log

\n"); fprintf(webblk->hsock, "
\n");
 
-    get_msgbuf(&msgbuf, &msgslot, &nummsgs, &msg_size, &max_msgs);
-
-    for(currmsgn = 0; currmsgn < nummsgs; currmsgn++) {
-        if(!msgcount || currmsgn >= (nummsgs - msgcount))
-        {
-            if(nummsgs < max_msgs)
-                pointer = msgbuf + (currmsgn * msg_size);
-            else
-                if(currmsgn + msgslot < max_msgs) 
-                    pointer = msgbuf + ((currmsgn + msgslot) * msg_size);
-                else
-                    pointer = msgbuf + ((currmsgn + msgslot - max_msgs) * msg_size);
-    
-            fprintf(webblk->hsock,"%80.80s\n",pointer);
-        }
-    }
+    msgnum = msgcount ? log_line(msgcount) : -1;
+    while((msgcnt = log_read(&msgbuf, &msgnum, LOG_NOBLOCK)))
+        fwrite(msgbuf,msgcnt,1,webblk->hsock);
 
     fprintf(webblk->hsock, "
\n"); @@ -751,9 +733,8 @@ BYTE buf[80]; class, dev->devtype, (dev->fd > 2 ? "open " : ""), - (dev->busy ? "busy " : ""), - ((dev->pending || dev->pcipending) ? - "pending " : "")); + (dev-> busy ? "busy " : ""), + ((dev->pending || dev->pcipending) ? "pending " : "")); } fprintf(webblk->hsock,"\n"); @@ -810,7 +791,8 @@ int subchan; dev->pmcw.intparm[0], dev->pmcw.intparm[1], dev->pmcw.intparm[2], dev->pmcw.intparm[3]); - fprintf(webblk->hsock,"00" + fprintf(webblk->hsock,"Q" + "0" "ISC" "00" "A" @@ -822,7 +804,8 @@ int subchan; "V" "DEVNUM\n"); - fprintf(webblk->hsock,"" + fprintf(webblk->hsock,"%d" + "" "%d" "" "%d" @@ -833,6 +816,7 @@ int subchan; "%d" "%d" "%2.2X%2.2X\n", + ((dev->pmcw.flag4 & PMCW4_Q) >> 7), ((dev->pmcw.flag4 & PMCW4_ISC) >> 3), (dev->pmcw.flag4 & 1), ((dev->pmcw.flag5 >> 7) & 1), diff --git a/channel.c b/channel.c index 972a613..df197fd 100644 --- a/channel.c +++ b/channel.c @@ -27,6 +27,8 @@ #include "w32chan.h" #endif // defined(OPTION_FISHIO) +void call_execute_ccw_chain(int arch_mode, void* pDevBlk); + #ifdef OPTION_IODELAY_KLUDGE #define IODELAY(_dev) \ do { \ @@ -145,20 +147,21 @@ int devcount = 0; /* #of devices on channel */ DEVBLK *dev; /* -> Device control block */ PSA_3XX *psa; /* -> Prefixed storage area */ - /* Find a device on specified channel with pending interrupt */ + /* Find a device on specified channel */ for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) { /* Skip the device if not on specified channel */ - if ((dev->devnum & 0xFF00) != chan) - continue; + if ((dev->devnum & 0xFF00) != chan + || (dev->pmcw.flag5 & PMCW5_V) == 0 #if defined(FEATURE_CHANNEL_SWITCHING) - if(regs->chanset != dev->chanset) + || regs->chanset != dev->chanset +#endif /*defined(FEATURE_CHANNEL_SWITCHING)*/ + ) continue; -#endif /*defined(FEATURE_CHANNEL_SWITCHING)*/ - /* Count devices on channel */ + /* Found device on the channel */ devcount++; - + break; } /* end for(dev) */ /* Exit with condition code 3 if no devices on channel */ @@ -182,35 +185,38 @@ PSA_3XX *psa; /* -> Prefixed storage area */ /*-------------------------------------------------------------------*/ int testch (REGS *regs, U16 chan) { -int devcount = 0; /* #of devices on channel */ DEVBLK *dev; /* -> Device control block */ +int devcount = 0; /* Number of devices found */ +int cc = 0; /* Returned condition code */ - /* Find a device on specified channel with pending interrupt */ + /* Scan devices on the channel */ for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) { /* Skip the device if not on specified channel */ if ((dev->devnum & 0xFF00) != chan + || (dev->pmcw.flag5 & PMCW5_V) == 0 #if defined(FEATURE_CHANNEL_SWITCHING) || regs->chanset != dev->chanset -#endif /*defined(FEATURE_CHANNEL_SWITCHING)*/ +#endif /*defined(FEATURE_CHANNEL_SWITCHING)*/ ) continue; - /* Count devices on channel */ + /* Increment device count on this channel */ devcount++; - /* Exit with condition code 1 if interrupt pending */ + /* Test for pending interrupt */ if (dev->pending || dev->pcipending) - return 1; - - } /* end for(dev) */ + { + cc = 1; + break; + } + } - /* Exit with condition code 3 if no devices on channel */ + /* Set condition code 3 if no devices found on the channel */ if (devcount == 0) - return 3; + cc = 3; - /* Exit with condition code 0 indicating channel available */ - return 0; + return cc; } /* end function testch */ @@ -221,93 +227,97 @@ int testio (REGS *regs, DEVBLK *dev, BYTE ibyte) { int cc; /* Condition code */ PSA_3XX *psa; /* -> Prefixed storage area */ -int deq=0; /* Device may be dequeued */ +/* ISW20030812 - Added 1 line */ +IOINT *ioint=NULL; +/* ISW20030812 - END */ UNREFERENCED(ibyte); -if (dev->ccwtrace || dev->ccwstep) - logmsg (_("HHCCP051I %4.4X: Test I/O\n"), dev->devnum); + if (dev->ccwtrace || dev->ccwstep) + logmsg (_("HHCCP051I %4.4X: Test I/O\n"), dev->devnum); - /* Obtain the device lock */ obtain_lock (&dev->lock); /* Test device status and set condition code */ - if (dev->busy) + if ((dev->busy && dev->ioactive == DEV_SYS_LOCAL) + || dev->startpending) { /* Set condition code 2 if device is busy */ cc = 2; } - else if (dev->pcipending) - { - /* Set condition code 1 if PCI interrupt pending */ - cc = 1; - - /* Store the channel status word at PSA+X'40' */ - psa = (PSA_3XX*)(regs->mainstor + regs->PX); - memcpy (psa->csw, dev->pcicsw, 8); - if (dev->ccwtrace || dev->ccwstep) - display_csw (dev, dev->pcicsw); - - /* Clear the pending PCI interrupt */ - dev->pcipending = 0; - deq = 1; - } - else if (dev->pending) + else { - /* Set condition code 1 if interrupt pending */ - cc = 1; + if (dev->pending || dev->pcipending || dev->attnpending) + { + /* Set condition code 1 if interrupt pending */ + cc = 1; - /* Store the channel status word at PSA+X'40' */ - psa = (PSA_3XX*)(regs->mainstor + regs->PX); - memcpy (psa->csw, dev->csw, 8); - if (dev->ccwtrace || dev->ccwstep) - display_csw (dev, dev->csw); + /* Store the channel status word at PSA+X'40' */ + psa = (PSA_3XX*)(regs->mainstor + regs->PX); + if (dev->pcipending) + { + memcpy (psa->csw, dev->pcicsw, 8); + dev->pcipending = 0; + /* ISW20030812 - Added 1 line */ + ioint=&dev->pciioint; + /* ISW20030812 - END */ + } + else + { + if(dev->pending) + { + memcpy (psa->csw, dev->csw, 8); + dev->pending = 0; + ioint=&dev->ioint; + } + else + { + memcpy (psa->csw, dev->attncsw, 8); + dev->attnpending = 0; + ioint=&dev->attnioint; + } + } - /* Clear the pending interrupt */ - dev->pending = 0; - deq = 1; + /* Signal console thread to redrive select */ + if (dev->console) + { + signal_thread (sysblk.cnsltid, SIGUSR2); + } - /* Signal console thread to redrive select */ - if (dev->console) - { - signal_thread (sysblk.cnsltid, SIGUSR2); + if (dev->ccwtrace || dev->ccwstep) + display_csw (dev, psa->csw); } - } - else - { - /* Set condition code 1 if device is LCS CTC */ - if ( dev->ctctype == CTC_LCS ) + else { - cc = 1; - dev->csw[4] = 0; - dev->csw[5] = 0; - psa = (PSA_3XX*)(regs->mainstor + regs->PX); - memcpy (psa->csw, dev->csw, 8); - if (dev->ccwtrace) + /* Set condition code 1 if device is LCS CTC */ + if ( dev->ctctype == CTC_LCS ) { - logmsg(_("HHCCP052I TIO modification executed CC=1\n")); + cc = 1; + dev->csw[4] = 0; + dev->csw[5] = 0; + psa = (PSA_3XX*)(regs->mainstor + regs->PX); + memcpy (psa->csw, dev->csw, 8); + if (dev->ccwtrace) + { + logmsg(_("HHCCP052I TIO modification executed CC=1\n")); display_csw (dev, dev->csw); + } } + else + /* Set condition code 0 if device is available */ + cc = 0; } - else - - /* Set condition code 0 if device is available */ - cc = 0; } - /* Release the device lock */ release_lock (&dev->lock); - - /* Dequeue the pending interruption */ - if (deq) + /* ISW20030812 - Added 6 lines */ + if(ioint) { obtain_lock (&sysblk.intlock); - if (!dev->pending && !dev->pcipending) - DEQUEUE_IO_INTERRUPT (dev); - if (sysblk.iointq == NULL) - OFF_IC_IOPENDING; + DEQUEUE_IO_INTERRUPT(ioint); release_lock (&sysblk.intlock); } + /* ISW20030812 - END */ /* Return the condition code */ return cc; @@ -319,33 +329,41 @@ if (dev->ccwtrace || dev->ccwstep) /*-------------------------------------------------------------------*/ int haltio (REGS *regs, DEVBLK *dev, BYTE ibyte) { -int cc; /* Condition code */ +int cc; /* Condition code */ PSA_3XX *psa; /* -> Prefixed storage area */ -int deq=0; /* Device may be dequeued */ +int pending = 0; /* New interrupt pending */ UNREFERENCED(ibyte); if (dev->ccwtrace || dev->ccwstep) logmsg (_("HHCCP053I %4.4X: Halt I/O\n"), dev->devnum); - /* Obtain the device lock */ obtain_lock (&dev->lock); /* Test device status and set condition code */ if (dev->busy) { - /* Set condition code 2 if device is busy */ - cc = 2; + /* Invoke the provided halt_device routine @ISW */ + /* if it has been provided by the handler @ISW */ + /* code at init @ISW */ + if(dev->halt_device!=NULL) /* @ISW */ + { /* @ISW */ + dev->halt_device(dev); /* @ISW */ + cc=0; /* @ISW */ + } /* @ISW */ + else + { + /* Set condition code 2 if device is busy */ + cc = 2; - /* Tell channel and device to halt */ - dev->scsw.flag2 |= SCSW2_FC_HALT; + /* Tell channel and device to halt */ + dev->scsw.flag2 |= SCSW2_FC_HALT; - /* Clear pending interrupts */ - dev->pending = 0; - dev->pcipending = 0; - deq = 1; + /* Clear pending interrupts */ + dev->pending = dev->pcipending = 0; + } } - else if (!(dev->pcipending) && !(dev->pending) && (dev->ctctype != CTC_LCS)) + else if (!dev->attnpending && !dev->pending && !dev->pcipending && dev->ctctype != CTC_LCS) { /* Set condition code 1 */ cc = 1; @@ -353,11 +371,12 @@ int deq=0; /* Device may be dequeued */ /* Store the channel status word at PSA+X'40' */ psa = (PSA_3XX*)(regs->mainstor + regs->PX); memcpy (psa->csw, dev->csw, 8); + + /* Set pending interrupt */ + dev->pending = pending = 1; + if (dev->ccwtrace || dev->ccwstep) display_csw (dev, dev->csw); - - /* Signal pending interrupt */ - dev->pending = 1; } else { @@ -374,11 +393,10 @@ int deq=0; /* Device may be dequeued */ logmsg(_("HHCCP054I HIO modification executed CC=1\n")); display_csw (dev, dev->csw); } - } else - /* Set condition code 0 if interrupt is pending */ - cc = 0; + /* Set condition code 0 if interrupt is pending */ + cc = 0; } /* For 3270 device, clear any pending input */ @@ -394,27 +412,14 @@ int deq=0; /* Device may be dequeued */ signal_thread (sysblk.cnsltid, SIGUSR2); } - /* Release the device lock */ release_lock (&dev->lock); - /* Possible I/O interrupt */ - obtain_lock (&sysblk.intlock); - if (dev->pending || dev->pcipending) + if (pending) { - QUEUE_IO_INTERRUPT (dev); - } - else if (deq) - { - DEQUEUE_IO_INTERRUPT (dev); - } - if (sysblk.iointq) - { - ON_IC_IOPENDING; - WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); + obtain_lock (&sysblk.intlock); + QUEUE_IO_INTERRUPT (&dev->ioint); + release_lock (&sysblk.intlock); } - else - OFF_IC_IOPENDING; - release_lock (&sysblk.intlock); /* Return the condition code */ return cc; @@ -441,7 +446,6 @@ int cc; /* Condition code */ UNREFERENCED(regs); - /* Obtain the device lock */ obtain_lock (&dev->lock); #if defined(_FEATURE_IO_ASSIST) @@ -456,14 +460,14 @@ int cc; /* Condition code */ /* Check pending status */ if ((dev->pciscsw.flag3 & SCSW3_SC_PEND) - || (dev->scsw.flag3 & SCSW3_SC_PEND)) + || (dev->scsw.flag3 & SCSW3_SC_PEND) + || (dev->attnscsw.flag3 & SCSW3_SC_PEND)) cc = 1; else { cc = 2; #if !defined(OPTION_FISHIO) obtain_lock(&sysblk.ioqlock); - /* If there are devices on the i/o queue, then try and find dev */ if(sysblk.ioq != NULL) { DEVBLK *tmp; @@ -490,9 +494,13 @@ int cc; /* Condition code */ /* Reset the device */ if(!cc) { - dev->busy = 0; + /* Terminate suspended channel program */ if (dev->scsw.flag3 & SCSW3_AC_SUSP) + { + dev->suspended = 0; signal_condition (&dev->resumecond); + } + /* Reset the scsw */ dev->scsw.flag2 &= ~(SCSW2_AC_RESUM | SCSW2_FC_START | SCSW2_AC_START); dev->scsw.flag3 &= ~(SCSW3_AC_SUSP); @@ -501,8 +509,7 @@ int cc; /* Condition code */ release_lock(&sysblk.ioqlock); #endif /*!defined(OPTION_FISHIO)*/ } - - /* Release the device lock */ + release_lock (&dev->lock); /* Return the condition code */ @@ -531,7 +538,6 @@ int cc; /* Condition code */ UNREFERENCED(regs); #endif - /* Obtain the device lock */ obtain_lock (&dev->lock); #if defined(_FEATURE_IO_ASSIST) @@ -550,7 +556,7 @@ int cc; /* Condition code */ #if defined(_FEATURE_IO_ASSIST) /* For I/O assisted devices we must intercept if type B status is present on the subchannel */ - if(regs->sie_state + if(regs->sie_state && ( (regs->siebk->tschds & dev->pciscsw.unitstat) || (regs->siebk->tschsc & dev->pciscsw.chanstat) ) ) { @@ -577,18 +583,13 @@ int cc; /* Condition code */ dev->pciscsw.flag3 &= ~(SCSW3_SC); dev->pcipending = 0; - /* Release the device lock */ - release_lock (&dev->lock); - - /* Dequeue the I/O */ - obtain_lock (&sysblk.intlock); - if (!dev->pcipending && !dev->pending) - DEQUEUE_IO_INTERRUPT (dev); - if (sysblk.iointq == NULL) - OFF_IC_IOPENDING; - release_lock (&sysblk.intlock); - /* Return condition code 0 to indicate status was pending */ + release_lock (&dev->lock); + /* ISW20030812 - Added 3 lines */ + obtain_lock(&sysblk.intlock); + DEQUEUE_IO_INTERRUPT(&dev->pciioint); + release_lock(&sysblk.intlock); + /* ISW20030812 - END */ return 0; } /* end if(pcipending) */ @@ -608,7 +609,7 @@ int cc; /* Condition code */ #if defined(_FEATURE_IO_ASSIST) /* For I/O assisted devices we must intercept if type B status is present on the subchannel */ - if(regs->sie_state + if(regs->sie_state && ( (regs->siebk->tschds & dev->scsw.unitstat) || (regs->siebk->tschsc & dev->scsw.chanstat) ) ) { @@ -618,7 +619,7 @@ int cc; /* Condition code */ } #endif - /* Set condition code 0 if status pending */ + /* Set condition code 0 for status pending */ cc = 0; /* Display the subchannel status word */ @@ -677,23 +678,71 @@ int cc; /* Condition code */ } else { + /* Test device status and set condition code */ + if (dev->attnscsw.flag3 & SCSW3_SC_PEND) + { +#if defined(_FEATURE_IO_ASSIST) + /* For I/O assisted devices we must intercept if type B + status is present on the subchannel */ + if(regs->sie_state + && ( (regs->siebk->tschds & dev->attnscsw.unitstat) + || (regs->siebk->tschsc & dev->attnscsw.chanstat) ) ) + { + dev->pmcw.flag27 &= ~PMCW27_I; + release_lock (&dev->lock); + longjmp(regs->progjmp,SIE_INTERCEPT_IOINST); + } +#endif + + /* Set condition code 0 for status pending */ + cc = 0; + + /* Display the subchannel status word */ + if (dev->ccwtrace || dev->ccwstep) + display_scsw (dev, dev->attnscsw); + + /* Copy the ATTN SCSW to the IRB */ + irb->scsw = dev->attnscsw; + + /* Clear the ESW and ECW in the IRB */ + memset (&irb->esw, 0, sizeof(ESW)); + irb->esw.lpum = 0x80; + memset (irb->ecw, 0, sizeof(irb->ecw)); + /* Clear the pending ATTN status */ + dev->attnscsw.flag2 &= ~(SCSW2_FC | SCSW2_AC); + dev->attnscsw.flag3 &= ~(SCSW3_SC); + dev->attnpending = 0; + + /* Signal console thread to redrive select */ + if (dev->console) + { + signal_thread (sysblk.cnsltid, SIGUSR2); + } + /* Return condition code 0 to indicate status was pending */ + release_lock (&dev->lock); + /* ISW20030812 - Added 3 lines */ + obtain_lock(&sysblk.intlock); + DEQUEUE_IO_INTERRUPT(&dev->attnioint); + release_lock(&sysblk.intlock); + /* ISW20030812 - END */ + return 0; + } /* Set condition code 1 if status not pending */ - cc = 1; + else + { + cc = 1; + } } /* Clear any pending interrupt */ dev->pending = 0; - /* Release the device lock */ release_lock (&dev->lock); - - /* Dequeue the I/O */ - obtain_lock (&sysblk.intlock); - if (!dev->pcipending && !dev->pending) - DEQUEUE_IO_INTERRUPT (dev); - if (sysblk.iointq == NULL) - OFF_IC_IOPENDING; - release_lock (&sysblk.intlock); + /* ISW20030812 - Added 3 lines */ + obtain_lock(&sysblk.intlock); + DEQUEUE_IO_INTERRUPT(&dev->ioint); + release_lock(&sysblk.intlock); + /* ISW20030812 - END */ /* Return the condition code */ return cc; @@ -709,12 +758,13 @@ int cc; /* Condition code */ /*-------------------------------------------------------------------*/ void clear_subchan (REGS *regs, DEVBLK *dev) { +int pending = 0; + UNREFERENCED(regs); if (dev->ccwtrace || dev->ccwstep) logmsg (_("HHCCP055I %4.4X: Clear subchannel\n"), dev->devnum); - /* Obtain the device lock */ obtain_lock (&dev->lock); #if defined(_FEATURE_IO_ASSIST) @@ -728,7 +778,8 @@ void clear_subchan (REGS *regs, DEVBLK *dev) #endif /* If the device is busy then signal the device to clear */ - if (dev->busy) + if ((dev->busy && dev->ioactive == DEV_SYS_LOCAL) + || dev->startpending) { /* Set clear pending condition */ dev->scsw.flag2 |= SCSW2_FC_CLEAR | SCSW2_AC_CLEAR; @@ -761,16 +812,13 @@ void clear_subchan (REGS *regs, DEVBLK *dev) dev->scsw.flag2 |= SCSW2_FC_CLEAR; dev->scsw.flag3 &= ~(SCSW3_AC | SCSW3_SC); dev->scsw.flag3 |= SCSW3_SC_PEND; - dev->scsw.ccwaddr[0] = 0; - dev->scsw.ccwaddr[1] = 0; - dev->scsw.ccwaddr[2] = 0; - dev->scsw.ccwaddr[3] = 0; + store_fw (dev->scsw.ccwaddr, 0); dev->scsw.chanstat = 0; dev->scsw.unitstat = 0; - dev->scsw.count[0] = 0; - dev->scsw.count[1] = 0; + store_hw (dev->scsw.count, 0); dev->pcipending = 0; dev->pending = 1; + pending = 1; /* For 3270 device, clear any pending input */ if (dev->devtype == 0x3270) @@ -786,29 +834,15 @@ void clear_subchan (REGS *regs, DEVBLK *dev) } } - /* Release the device lock */ release_lock (&dev->lock); - /* Handle change in status for pending interrupts */ - obtain_lock (&sysblk.intlock); - - if (dev->pcipending || dev->pending) - { - QUEUE_IO_INTERRUPT (dev); - } - else + /* Queue any pending i/o interrupt */ + if (pending) { - DEQUEUE_IO_INTERRUPT (dev); - } - if (sysblk.iointq) - { - ON_IC_IOPENDING; - WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); + obtain_lock (&sysblk.intlock); + QUEUE_IO_INTERRUPT (&dev->ioint); + release_lock (&sysblk.intlock); } - else - OFF_IC_IOPENDING; - - release_lock (&sysblk.intlock); } /* end function clear_subchan */ @@ -825,12 +859,13 @@ void clear_subchan (REGS *regs, DEVBLK *dev) /*-------------------------------------------------------------------*/ int halt_subchan (REGS *regs, DEVBLK *dev) { +int pending = 0; + UNREFERENCED(regs); if (dev->ccwtrace || dev->ccwstep) logmsg (_("HHCCP056I %4.4X: Halt subchannel\n"), dev->devnum); - /* Obtain the device lock */ obtain_lock (&dev->lock); #if defined(_FEATURE_IO_ASSIST) @@ -867,15 +902,15 @@ int halt_subchan (REGS *regs, DEVBLK *dev) } /* If the device is busy then signal subchannel to halt */ - if (dev->busy) + if ((dev->busy && dev->ioactive == DEV_SYS_LOCAL) + || dev->startpending) { /* Set halt pending condition and reset pending condition */ dev->scsw.flag2 |= (SCSW2_FC_HALT | SCSW2_AC_HALT); dev->scsw.flag3 &= ~SCSW3_SC_PEND; /* Clear any pending interrupt */ - dev->pcipending = 0; - dev->pending = 0; + dev->pending = dev->pcipending = 0; /* Signal the subchannel to resume if it is suspended */ if (dev->scsw.flag3 & SCSW3_AC_SUSP) @@ -883,6 +918,13 @@ int halt_subchan (REGS *regs, DEVBLK *dev) dev->scsw.flag2 |= SCSW2_AC_RESUM; signal_condition (&dev->resumecond); } + /* Invoke the provided halt_device routine @ISW */ + /* if it has been provided by the handler @ISW */ + /* code at init @ISW */ + if(dev->halt_device!=NULL) /* @ISW */ + { /* @ISW */ + dev->halt_device(dev); /* @ISW */ + } /* @ISW */ #if !defined(NO_SIGABEND_HANDLER) else { @@ -898,6 +940,7 @@ int halt_subchan (REGS *regs, DEVBLK *dev) dev->scsw.flag3 |= SCSW3_SC_PEND; dev->pcipending = 0; dev->pending = 1; + pending = 1; /* For 3270 device, clear any pending input */ if (dev->devtype == 0x3270) @@ -913,32 +956,20 @@ int halt_subchan (REGS *regs, DEVBLK *dev) } } - /* Release the device lock */ - release_lock (&dev->lock); + release_lock (&dev->lock); - /* Handle change in status for pending interrupts */ - obtain_lock (&sysblk.intlock); - if (dev->pcipending || dev->pending) - { - QUEUE_IO_INTERRUPT (dev); - } - else - { - DEQUEUE_IO_INTERRUPT (dev); - } - if (sysblk.iointq) + /* Queue any pending i/o interrupt */ + if (pending) { - ON_IC_IOPENDING; - WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); + obtain_lock (&sysblk.intlock); + QUEUE_IO_INTERRUPT (&dev->ioint); + release_lock (&sysblk.intlock); } - else - OFF_IC_IOPENDING; - release_lock (&sysblk.intlock); - /* Return condition code zero */ if (dev->ccwtrace || dev->ccwstep) logmsg (_("HHCCP059I %4.4X: Halt subchannel: cc=0\n"), dev->devnum); + /* Return condition code zero */ return 0; } /* end function halt_subchan */ @@ -958,7 +989,6 @@ int resume_subchan (REGS *regs, DEVBLK *dev) { UNREFERENCED(regs); - /* Obtain the device lock */ obtain_lock (&dev->lock); #if defined(_FEATURE_IO_ASSIST) @@ -1008,12 +1038,12 @@ int resume_subchan (REGS *regs, DEVBLK *dev) /* Set the resume pending flag and signal the subchannel */ dev->scsw.flag2 |= SCSW2_AC_RESUM; signal_condition (&dev->resumecond); - if (dev->ccwtrace || dev->ccwstep) - logmsg (_("HHCCP062I %4.4X: Resume subchannel: cc=0\n"), dev->devnum); - /* Release the device lock */ release_lock (&dev->lock); + if (dev->ccwtrace || dev->ccwstep) + logmsg (_("HHCCP062I %4.4X: Resume subchannel: cc=0\n"), dev->devnum); + /* Return condition code zero */ return 0; @@ -1027,55 +1057,56 @@ int resume_subchan (REGS *regs, DEVBLK *dev) /* channelset_reset */ /* chp_reset */ /* io_reset */ +/* */ +/* Caller holds `intlock' */ /*-------------------------------------------------------------------*/ void device_reset (DEVBLK *dev) { obtain_lock (&dev->lock); - - dev->pending = 0; - if(dev->busy) - signal_condition(&dev->resumecond); - dev->busy = 0; - dev->readpending = 0; - dev->pcipending = 0; - dev->crwpending = 0; - dev->pmcw.intparm[0] = 0; - dev->pmcw.intparm[1] = 0; - dev->pmcw.intparm[2] = 0; - dev->pmcw.intparm[3] = 0; + dev->busy = dev->reserved = dev->pending = dev->pcipending = + dev->startpending = 0; + dev->ioactive = DEV_SYS_NONE; + if (dev->suspended) + { + dev->suspended = 0; + signal_condition (&dev->resumecond); + } + if (dev->iowaiters) signal_condition (&dev->iocond); + store_fw (dev->pmcw.intparm, 0); dev->pmcw.flag4 &= ~PMCW4_ISC; dev->pmcw.flag5 &= ~(PMCW5_E | PMCW5_LM | PMCW5_MM | PMCW5_D); dev->pmcw.pnom = 0; dev->pmcw.lpum = 0; - dev->pmcw.mbi[0] = 0; - dev->pmcw.mbi[1] = 0; + store_hw (dev->pmcw.mbi, 0); dev->pmcw.flag27 &= ~PMCW27_S; +#if defined(_FEATURE_IO_ASSIST) + dev->pmcw.zone = 0; + dev->pmcw.flag25 &= ~PMCW25_VISC; + dev->pmcw.flag27 &= ~PMCW27_I; +#endif + memset (&dev->scsw, 0, sizeof(SCSW)); + memset (&dev->pciscsw, 0, sizeof(SCSW)); + + dev->readpending = 0; + dev->crwpending = 0; dev->ckdxtdef = 0; dev->ckdsetfm = 0; dev->ckdlcount = 0; dev->ckdssi = 0; - memset (&dev->scsw, 0, sizeof(SCSW)); - memset (&dev->pciscsw, 0, sizeof(SCSW)); memset (dev->sense, 0, sizeof(dev->sense)); memset (dev->pgid, 0, sizeof(dev->pgid)); - #if defined(_FEATURE_IO_ASSIST) - dev->pmcw.zone = 0; - dev->pmcw.flag25 &= ~PMCW25_VISC; - dev->pmcw.flag27 &= ~PMCW27_I; dev->mainstor = sysblk.mainstor; dev->storkeys = sysblk.storkeys; dev->mainlim = sysblk.mainsize - 1; #endif - + dev->ioint.dev = dev; + dev->ioint.pending = 1; + dev->pciioint.dev = dev; + dev->pciioint.pcipending = 1; + dev->attnioint.dev = dev; + dev->attnioint.attnpending = 1; release_lock (&dev->lock); - - /* Remove the device from the pending interrupt queue */ - obtain_lock (&sysblk.intlock); - if (!sysblk.iointq) - OFF_IC_IOPENDING; - release_lock (&sysblk.intlock); - } /* end device_reset() */ /*-------------------------------------------------------------------*/ @@ -1088,22 +1119,21 @@ void device_reset (DEVBLK *dev) void channelset_reset(REGS *regs) { DEVBLK *dev; /* -> Device control block */ - - /* Release intlock as it is held by the caller (SIGP) */ - release_lock(&sysblk.intlock); +int console = 0; /* 1 = console device reset */ /* Reset each device in the configuration */ for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) { if( regs->chanset == dev->chanset) + { + if (dev->console) console = 1; device_reset(dev); + } } - /* Re-acquire the intlock */ - obtain_lock(&sysblk.intlock); - /* Signal console thread to redrive select */ - signal_thread (sysblk.cnsltid, SIGUSR2); + if (console) + signal_thread (sysblk.cnsltid, SIGUSR2); } /* end function channelset_reset */ @@ -1118,23 +1148,30 @@ int chp_reset(BYTE chpid) DEVBLK *dev; /* -> Device control block */ int i; int operational = 3; +int console = 0; + + obtain_lock (&sysblk.intlock); /* Reset each device in the configuration */ for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) { for(i = 0; i < 8; i++) - { + { if((chpid == dev->pmcw.chpid[i]) && (dev->pmcw.pim & dev->pmcw.pam & dev->pmcw.pom & (0x80 >> i)) ) { operational = 0; + if (dev->console) console = 1; device_reset(dev); } } } /* Signal console thread to redrive select */ - signal_thread (sysblk.cnsltid, SIGUSR2); + if (console) + signal_thread (sysblk.cnsltid, SIGUSR2); + + release_lock (&sysblk.intlock); return operational; @@ -1151,38 +1188,64 @@ void io_reset (void) { DEVBLK *dev; /* -> Device control block */ +int console = 0; /* 1 = console device reset */ // #if defined(FEATURE_CHANNEL_SWITCHING) int i; /* Connect each channel set to its home cpu */ for(i = 0; i < MAX_CPU_ENGINES; i++) sysblk.regs[i].chanset = i; -// #endif /*defined(FEATURE_CHANNEL_SWITCHING)*/ +// #endif /*defined(FEATURE_CHANNEL_SWITCHING)*/ + + obtain_lock (&sysblk.intlock); /* Reset each device in the configuration */ for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) + { + if (dev->console) console = 1; device_reset(dev); + } /* No crws pending anymore */ OFF_IC_CHANRPT; + release_lock (&sysblk.intlock); + /* Signal console thread to redrive select */ - signal_thread (sysblk.cnsltid, SIGUSR2); + if (console) + signal_thread (sysblk.cnsltid, SIGUSR2); } /* end function io_reset */ #if !defined(OPTION_FISHIO) +/*-------------------------------------------------------------------*/ +/* Set a thread's priority to its proper value */ +/*-------------------------------------------------------------------*/ +void adjust_thread_priority(int *newprio) +{ + /* Set root mode in order to set priority */ + SETMODE(ROOT); + + /* Set device thread priority; ignore any errors */ + setpriority(PRIO_PROCESS, 0, *newprio); + + /* Back to user mode */ + SETMODE(USER); +} /*-------------------------------------------------------------------*/ /* Execute a queued I/O */ /*-------------------------------------------------------------------*/ -void device_thread () +void *device_thread (void *arg) { - DEVBLK *dev; - struct timespec waittime; - struct timeval now; - int timedout; +DEVBLK *dev; +int current_priority; /* Current thread priority */ + + UNREFERENCED(arg); + + adjust_thread_priority(&sysblk.devprio); + current_priority = getpriority(PRIO_PROCESS, 0); obtain_lock(&sysblk.ioqlock); @@ -1198,46 +1261,38 @@ void device_thread () if (sysblk.ioq && sysblk.devtwait) signal_condition(&sysblk.ioqcond); dev->tid = thread_id(); + + /* Set priority to requested device priority */ + if (dev->devprio != current_priority) + adjust_thread_priority(&dev->devprio); + release_lock (&sysblk.ioqlock); - switch (sysblk.arch_mode) - { -#if defined(_370) - case ARCH_370: s370_execute_ccw_chain (dev); break; -#endif -#if defined(_390) - case ARCH_390: s390_execute_ccw_chain (dev); break; -#endif -#if defined(_900) - case ARCH_900: z900_execute_ccw_chain (dev); break; -#endif - } + call_execute_ccw_chain(sysblk.arch_mode, dev); + + /* Reset priority to default priority */ + if (current_priority > sysblk.devprio) + adjust_thread_priority(&sysblk.devprio); obtain_lock(&sysblk.ioqlock); dev->tid = 0; } if (sysblk.devtmax < 0 - || (sysblk.devtmax > 0 && sysblk.devtnbr > sysblk.devtmax)) + || (sysblk.devtmax == 0 && sysblk.devtwait > 3) + || (sysblk.devtmax > 0 && sysblk.devtnbr > sysblk.devtmax) + || (sysblk.shutdown)) break; - gettimeofday(&now, NULL); - waittime.tv_sec = now.tv_sec + MAX_DEVICE_THREAD_IDLE_SECS; - waittime.tv_nsec = now.tv_usec * 1000; - - /* Wait for work to arrive or timer to expire... */ - + /* Wait for work to arrive */ sysblk.devtwait++; - timedout = timed_wait_condition - (&sysblk.ioqcond, &sysblk.ioqlock, &waittime); + wait_condition (&sysblk.ioqcond, &sysblk.ioqlock); sysblk.devtwait--; - - /* If we timed out AND ioq is NULL then we should exit */ - if (timedout && sysblk.ioq == NULL) break; } sysblk.devtnbr--; release_lock (&sysblk.ioqlock); + return NULL; } /* end function device_thread */ @@ -1510,14 +1565,23 @@ BYTE area[64]; /* Data display area */ { idadata = (idadata - idalen) + 1; memcpy (dev->mainstor + idadata, - &iobuf[ idacount - idalen ], idalen); + iobuf + dev->curblkrem, idalen); } else { - if (readcmd) - memcpy (dev->mainstor + idadata, iobuf, idalen); - else - memcpy (iobuf, dev->mainstor + idadata, idalen); + if (readcmd) + memcpy (dev->mainstor + idadata, iobuf, idalen); + else + memcpy (iobuf, dev->mainstor + idadata, idalen); + + /* + JRJ: I believe that the following line of code + code is suspect, because data chaining adds the + used length later, as needed. Also, I note that + this kind of thing is not done in non-IDA mode. + Finally, since iobuf is not used for anything after + this (in IDA mode), it probably doesn't hurt anything. + */ /* Increment buffer pointer */ iobuf += idalen; @@ -1555,7 +1619,7 @@ BYTE area[64]; /* Data display area */ /* Point to start of data for read backward command */ if (IS_CCW_RDBACK (code)) { - addr -= (count + 1); + addr = addr - count + 1; } /* Channel program check if data is outside main storage */ @@ -1593,10 +1657,23 @@ BYTE area[64]; /* Data display area */ } /* end for(page) */ /* Copy data between main storage and channel buffer */ + if (readcmd) - memcpy (dev->mainstor + addr, iobuf, count); + { + if (IS_CCW_RDBACK(code)) + { + /* read backward - use END of buffer */ + memcpy(dev->mainstor + addr,iobuf + dev->curblkrem, count); + } + else /* read forward */ + { + memcpy (dev->mainstor + addr, iobuf, count); + } + } else + { memcpy (iobuf, dev->mainstor + addr, count); + } } /* end if(!IDA) */ @@ -1611,13 +1688,12 @@ BYTE area[64]; /* Data display area */ /*-------------------------------------------------------------------*/ int ARCH_DEP(device_attention) (DEVBLK *dev, BYTE unitstat) { - /* Obtain the device lock */ obtain_lock (&dev->lock); #ifdef FEATURE_CHANNEL_SUBSYSTEM /* If subchannel not valid and enabled, do not present interrupt */ if ((dev->pmcw.flag5 & PMCW5_V) == 0 - || (dev->pmcw.flag5 & PMCW5_E) == 0) + || (dev->pmcw.flag5 & PMCW5_E) == 0) { release_lock (&dev->lock); return 3; @@ -1625,16 +1701,17 @@ int ARCH_DEP(device_attention) (DEVBLK *dev, BYTE unitstat) #endif /*FEATURE_CHANNEL_SUBSYSTEM*/ /* If device is already busy or interrupt pending */ - if (dev->busy || dev->pending - || (dev->scsw.flag3 & SCSW3_SC_PEND)) + if (dev->busy || dev->pending || dev->pcipending || dev->attnpending + || (dev->scsw.flag3 & SCSW3_SC_PEND)) { /* Resume the suspended device with attention set */ - if(dev->scsw.flag3 & SCSW3_AC_SUSP) + if(dev->scsw.flag3 & SCSW3_AC_SUSP) { dev->scsw.flag3 |= SCSW3_SC_ALERT | SCSW3_SC_PEND; dev->scsw.unitstat |= unitstat; dev->scsw.flag2 |= SCSW2_AC_RESUM; signal_condition(&dev->resumecond); + release_lock (&dev->lock); if (dev->ccwtrace || dev->ccwstep) @@ -1643,8 +1720,9 @@ int ARCH_DEP(device_attention) (DEVBLK *dev, BYTE unitstat) return 0; } - + release_lock (&dev->lock); + return 1; } @@ -1653,43 +1731,36 @@ int ARCH_DEP(device_attention) (DEVBLK *dev, BYTE unitstat) #ifdef FEATURE_S370_CHANNEL /* Set CSW for attention interrupt */ - dev->csw[0] = 0; - dev->csw[1] = 0; - dev->csw[2] = 0; - dev->csw[3] = 0; - dev->csw[4] = unitstat; - dev->csw[5] = 0; - dev->csw[6] = 0; - dev->csw[7] = 0; + dev->attncsw[0] = 0; + dev->attncsw[1] = 0; + dev->attncsw[2] = 0; + dev->attncsw[3] = 0; + dev->attncsw[4] = unitstat; + dev->attncsw[5] = 0; + dev->attncsw[6] = 0; + dev->attncsw[7] = 0; #endif /*FEATURE_S370_CHANNEL*/ #ifdef FEATURE_CHANNEL_SUBSYSTEM /* Set SCSW for attention interrupt */ - dev->scsw.flag0 = 0; - dev->scsw.flag1 = 0; - dev->scsw.flag2 = 0; - dev->scsw.flag3 = SCSW3_SC_ALERT | SCSW3_SC_PEND; - dev->scsw.ccwaddr[0] = 0; - dev->scsw.ccwaddr[1] = 0; - dev->scsw.ccwaddr[2] = 0; - dev->scsw.ccwaddr[3] = 0; - dev->scsw.unitstat = unitstat; - dev->scsw.chanstat = 0; - dev->scsw.count[0] = 0; - dev->scsw.count[1] = 0; + dev->attnscsw.flag0 = 0; + dev->attnscsw.flag1 = 0; + dev->attnscsw.flag2 = 0; + dev->attnscsw.flag3 = SCSW3_SC_ALERT | SCSW3_SC_PEND; + store_fw (dev->attnscsw.ccwaddr, 0); + dev->attnscsw.unitstat = unitstat; + dev->attnscsw.chanstat = 0; + store_hw (dev->attnscsw.count, 0); #endif /*FEATURE_CHANNEL_SUBSYSTEM*/ /* Set the interrupt pending flag for this device */ - dev->pending = 1; + dev->attnpending = 1; - /* Release the device lock */ release_lock (&dev->lock); - /* Signal waiting CPUs that an interrupt is pending */ + /* Queue the i/o interrupt */ obtain_lock (&sysblk.intlock); - QUEUE_IO_INTERRUPT (dev); - ON_IC_IOPENDING; - WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); + QUEUE_IO_INTERRUPT (&dev->attnioint); release_lock (&sysblk.intlock); return 0; @@ -1715,11 +1786,10 @@ int ARCH_DEP(device_attention) (DEVBLK *dev, BYTE unitstat) int ARCH_DEP(startio) (REGS *regs, DEVBLK *dev, ORB *orb) /*@IWZ*/ { #if !defined(OPTION_FISHIO) -DEVBLK *previoq, *ioq; /* Device I/O queue pointers */ int rc; /* Return code */ +DEVBLK *previoq, *ioq; /* Device I/O queue pointers */ #endif // !defined(OPTION_FISHIO) - /* Obtain the device lock */ obtain_lock (&dev->lock); #if defined(_FEATURE_IO_ASSIST) @@ -1734,8 +1804,9 @@ int rc; /* Return code */ #ifdef FEATURE_CHANNEL_SUBSYSTEM /* Return condition code 1 if status pending */ - if ((dev->scsw.flag3 & SCSW3_SC_PEND) - || (dev->pciscsw.flag3 & SCSW3_SC_PEND)) + if ((dev->scsw.flag3 & SCSW3_SC_PEND) + || (dev->pciscsw.flag3 & SCSW3_SC_PEND) + || (dev->attnscsw.flag3 & SCSW3_SC_PEND)) { release_lock (&dev->lock); return 1; @@ -1743,27 +1814,19 @@ int rc; /* Return code */ #endif /*FEATURE_CHANNEL_SUBSYSTEM*/ /* Return condition code 2 if device is busy */ - if (dev->busy || dev->pending) + if (dev->busy && dev->ioactive == DEV_SYS_LOCAL) { release_lock (&dev->lock); return 2; } /* Set the device busy indicator */ - dev->busy = 1; - - /* Signal console thread to redrive select */ - if (dev->console) - { - signal_thread (sysblk.cnsltid, SIGUSR2); - } - - /* Store the start I/O parameters in the device block */ - memcpy (&dev->orb, orb, sizeof(ORB)); /*@IWZ*/ + dev->busy = dev->startpending = 1; /* Initialize the subchannel status word */ - memset (&dev->scsw, 0, sizeof(SCSW)); + memset (&dev->scsw, 0, sizeof(SCSW)); memset (&dev->pciscsw, 0, sizeof(SCSW)); + memset (&dev->attnscsw, 0, sizeof(SCSW)); dev->scsw.flag0 = (orb->flag4 & SCSW0_KEY); /*@IWZ*/ if (orb->flag4 & ORB4_S) dev->scsw.flag0 |= SCSW0_S; /*@IWZ*/ if (orb->flag5 & ORB5_F) dev->scsw.flag1 |= SCSW1_F; /*@IWZ*/ @@ -1779,6 +1842,15 @@ int rc; /* Return code */ memcpy (dev->pmcw.intparm, orb->intparm, /*@IWZ*/ sizeof(dev->pmcw.intparm)); /*@IWZ*/ + /* Signal console thread to redrive select */ + if (dev->console) + { + signal_thread (sysblk.cnsltid, SIGUSR2); + } + + /* Store the start I/O parameters in the device block */ + memcpy (&dev->orb, orb, sizeof(ORB)); /*@IWZ*/ + /* Schedule the I/O. The various methods are a direct * correlation to the interest in the subject: * [1] Synchronous I/O. Attempts to complete the channel program @@ -1790,38 +1862,29 @@ int rc; /* Return code */ * [4] Original. Create a thread to execute this I/O */ -#ifdef OPTION_SYNCIO - if (dev->syncio + if (dev->syncio && dev->ioactive == DEV_SYS_NONE #ifdef OPTION_IODELAY_KLUDGE && sysblk.iodelay < 1 #endif /*OPTION_IODELAY_KLUDGE*/ - ) + ) { - /* Attempt synchronous I/O */ + /* Initiate synchronous I/O */ dev->syncio_active = 1; + dev->syncio_retry = 0; + dev->ioactive = DEV_SYS_LOCAL; release_lock (&dev->lock); - switch (sysblk.arch_mode) - { -#if defined(_370) - case ARCH_370: s370_execute_ccw_chain (dev); break; -#endif -#if defined(_390) - case ARCH_390: s390_execute_ccw_chain (dev); break; -#endif -#if defined(_900) - case ARCH_900: z900_execute_ccw_chain (dev); break; -#endif - } - /* Return code 0 if the retry bit is not on */ + call_execute_ccw_chain(sysblk.arch_mode, dev); + + /* Return if retry not required */ + dev->syncio_active = 0; if (!dev->syncio_retry) return 0; - obtain_lock (&dev->lock); } -#endif /*OPTION_SYNCIO*/ + else + release_lock (&dev->lock); #if defined(OPTION_FISHIO) - release_lock (&dev->lock); - return ScheduleIORequest(dev,dev->devnum); + return ScheduleIORequest( dev, dev->devnum, &dev->devprio ); #else // !defined(OPTION_FISHIO) if (sysblk.devtmax >= 0) { @@ -1837,8 +1900,6 @@ int rc; /* Return code */ dev->nextioq = ioq; if (previoq) previoq->nextioq = dev; else sysblk.ioq = dev; -// dev->nextioq = sysblk.ioq; -// sysblk.ioq = dev; /* Signal a device thread if one is waiting, otherwise create a device thread if the maximum number hasn't been created */ @@ -1846,7 +1907,7 @@ int rc; /* Return code */ signal_condition(&sysblk.ioqcond); else if (sysblk.devtmax == 0 || sysblk.devtnbr < sysblk.devtmax) { - rc = create_device_thread(&dev->tid,&sysblk.detattr,device_thread,NULL); + rc = create_thread(&dev->tid,&sysblk.detattr,device_thread,NULL); if (rc != 0 && sysblk.devtnbr == 0) { logmsg (_("HHCCP067E %4.4X create_thread error: %s"), @@ -1864,7 +1925,7 @@ int rc; /* Return code */ else { /* Execute the CCW chain on a separate thread */ - if ( create_device_thread (&dev->tid, &sysblk.detattr, + if ( create_thread (&dev->tid, &sysblk.detattr, ARCH_DEP(execute_ccw_chain), dev) ) { logmsg (_("HHCCP068E %4.4X create_thread error: %s"), @@ -1874,8 +1935,6 @@ int rc; /* Return code */ } } - release_lock (&dev->lock); - /* Return with condition code zero */ return 0; @@ -1887,6 +1946,7 @@ int rc; /* Return code */ /*-------------------------------------------------------------------*/ void *ARCH_DEP(execute_ccw_chain) (DEVBLK *dev) { +int sysid = DEV_SYS_LOCAL; /* System Identifier */ U32 ccwaddr; /* Address of CCW @IWZ*/ U16 idapmask; /* IDA page size - 1 @IWZ*/ BYTE idawfmt; /* IDAW format (1 or 2) @IWZ*/ @@ -1912,11 +1972,33 @@ BYTE tracethis = 0; /* 1=Trace this CCW only */ BYTE area[64]; /* Message area */ int bufpos = 0; /* Position in I/O buffer */ BYTE iobuf[65536]; /* Channel I/O buffer */ -#ifdef OPTION_SYNCIO -int retry = 0; /* 1=I/O asynchronous retry */ -#endif - if (dev->hnd->start) (dev->hnd->start) (dev); + /* Wait for the device to become available */ + obtain_lock (&dev->lock); + if (!dev->syncio_active && dev->shared) + { + while (dev->ioactive != DEV_SYS_NONE + && dev->ioactive != sysid) + { + dev->iowaiters++; + wait_condition(&dev->iocond, &dev->lock); + dev->iowaiters--; + } + dev->ioactive = sysid; + dev->busy = 1; + if (sysid == DEV_SYS_LOCAL) + dev->startpending = 0; + } + else + { + dev->ioactive = DEV_SYS_LOCAL; + dev->startpending = 0; + } + release_lock (&dev->lock); + + /* Call the i/o start exit */ + if (!dev->syncio_retry) + if (dev->hnd->start) (dev->hnd->start) (dev); /* Extract the I/O parameters from the ORB */ /*@IWZ*/ FETCH_FW(ccwaddr, dev->orb.ccwaddr); /*@IWZ*/ @@ -1941,11 +2023,9 @@ int retry = 0; /* 1=I/O asynchronous retry */ /* Set the subchannel active and device active bits in the SCSW */ dev->scsw.flag3 |= (SCSW3_AC_SCHAC | SCSW3_AC_DEVAC); -#ifdef OPTION_SYNCIO /* Check for retried synchronous I/O */ if (dev->syncio_retry) { - dev->syncio_active = 0; dev->syncios--; dev->asyncios++; ccwaddr = dev->syncio_addr; dev->code = dev->prevcode; @@ -1956,10 +2036,8 @@ int retry = 0; /* 1=I/O asynchronous retry */ } else { -#endif dev->chained = dev->prev_chained = dev->code = dev->prevcode = dev->ccwseq = 0; -#ifdef OPTION_SYNCIO } /* Check for synchronous I/O */ @@ -1968,18 +2046,26 @@ int retry = 0; /* 1=I/O asynchronous retry */ dev->syncios++; DEVTRACE ("synchronous I/O ccw addr %8.8x\n", ccwaddr); } -#endif + +#if defined(_FEATURE_IO_ASSIST) + #define _IOA_MBO sysblk.zpb[dev->pmcw.zone].mbo + #define _IOA_MBM sysblk.zpb[dev->pmcw.zone].mbm + #define _IOA_MBK sysblk.zpb[dev->pmcw.zone].mbk +#else /*defined(_FEATURE_IO_ASSIST)*/ + #define _IOA_MBO sysblk.mbo + #define _IOA_MBM sysblk.mbm + #define _IOA_MBK sysblk.mbk +#endif /*defined(_FEATURE_IO_ASSIST)*/ #ifdef FEATURE_CHANNEL_SUBSYSTEM /* Update the measurement block if applicable */ - if (sysblk.zpb[dev->pmcw.zone].mbm && (dev->pmcw.flag5 & PMCW5_MM_MBU) - ) + if (_IOA_MBM && (dev->pmcw.flag5 & PMCW5_MM_MBU)) { - mbaddr = sysblk.zpb[dev->pmcw.zone].mbo; + mbaddr = _IOA_MBO; mbaddr += (dev->pmcw.mbi[0] << 8 | dev->pmcw.mbi[1]) << 5; if ( !CHADDRCHK(mbaddr, dev) - && (((STORAGE_KEY(mbaddr, dev) & STORKEY_KEY) == sysblk.zpb[dev->pmcw.zone].mbk) - || (sysblk.zpb[dev->pmcw.zone].mbk == 0))) + && (((STORAGE_KEY(mbaddr, dev) & STORKEY_KEY) == _IOA_MBK) + || (_IOA_MBK == 0))) { STORAGE_KEY(mbaddr, dev) |= (STORKEY_REF | STORKEY_CHANGE); mbk = (MBK*)&dev->mainstor[mbaddr]; @@ -1998,13 +2084,10 @@ int retry = 0; /* 1=I/O asynchronous retry */ } /* Generate an initial status I/O interruption if requested */ - if ((dev->scsw.flag1 & SCSW1_I) -#ifdef OPTION_SYNCIO - && !dev->syncio_retry -#endif - ) + if ((dev->scsw.flag1 & SCSW1_I) && !dev->syncio_retry) { - /* Obtain the device lock */ + IODELAY(dev); /* do the delay NOW, before obtaining the INTLOCK */ + obtain_lock (&dev->lock); /* Update the CCW address in the SCSW */ @@ -2019,61 +2102,67 @@ int retry = 0; /* 1=I/O asynchronous retry */ /* Set interrupt pending flag */ dev->pending = 1; - /* Release the device lock */ release_lock (&dev->lock); + /* Queue the interrupt */ + obtain_lock (&sysblk.intlock); + QUEUE_IO_INTERRUPT (&dev->ioint); + release_lock (&sysblk.intlock); + if (dev->ccwtrace || dev->ccwstep || tracethis) logmsg (_("HHCCP069I Device %4.4X initial status interrupt\n"), dev->devnum); - - IODELAY(dev); - - /* Signal waiting CPUs that interrupt is pending */ - obtain_lock (&sysblk.intlock); - QUEUE_IO_INTERRUPT (dev); - ON_IC_IOPENDING; - WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); - release_lock (&sysblk.intlock); } #endif /*FEATURE_CHANNEL_SUBSYSTEM*/ /* Execute the CCW chain */ + /* On entry : No locks held */ while ( chain ) { /* Test for attention status from device */ if (dev->scsw.flag3 & SCSW3_SC_ALERT) { - /* Obtain the device lock */ + IODELAY(dev); + + /* Call the i/o end exit */ + if (dev->hnd->end) (dev->hnd->end) (dev); + obtain_lock (&dev->lock); + /* Turn off busy bit, turn on pending bit */ + dev->busy = 0; dev->pending = 1; - /* Reset device busy indicator */ - dev->busy = 0; + /* Wake up any waiters if the device isn't reserved */ + if (!dev->reserved) + { + dev->ioactive = DEV_SYS_NONE; + if (dev->iowaiters) + signal_condition (&dev->iocond); + } - /* Release the device lock */ release_lock (&dev->lock); - IODELAY(dev); - - /* Signal waiting CPUs that an interrupt may be pending */ + /* Queue the pending interrupt */ obtain_lock (&sysblk.intlock); - QUEUE_IO_INTERRUPT (dev); - ON_IC_IOPENDING; - WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); + QUEUE_IO_INTERRUPT (&dev->ioint); release_lock (&sysblk.intlock); if (dev->ccwtrace || dev->ccwstep || tracethis) logmsg (_("HHCCP070I Device %4.4X attention completed\n"), dev->devnum); - if (dev->hnd->end) (dev->hnd->end) (dev); + return NULL; } /* end attention processing */ /* Test for clear subchannel request */ if (dev->scsw.flag2 & SCSW2_AC_CLEAR) { - /* Obtain the device lock */ + IODELAY(dev); + + /* Call the i/o end exit */ + if (dev->hnd->end) (dev->hnd->end) (dev); + obtain_lock (&dev->lock); /* [15.3.2] Perform clear function subchannel modification */ @@ -2087,18 +2176,23 @@ int retry = 0; /* 1=I/O asynchronous retry */ dev->scsw.flag2 &= ~((SCSW2_FC - SCSW2_FC_CLEAR) | SCSW2_AC); dev->scsw.flag3 &= ~(SCSW3_AC | SCSW3_SC); dev->scsw.flag3 |= SCSW3_SC_PEND; - dev->scsw.ccwaddr[0] = 0; - dev->scsw.ccwaddr[1] = 0; - dev->scsw.ccwaddr[2] = 0; - dev->scsw.ccwaddr[3] = 0; + store_fw (dev->scsw.ccwaddr, 0); dev->scsw.chanstat = 0; dev->scsw.unitstat = 0; - dev->scsw.count[0] = 0; - dev->scsw.count[1] = 0; - dev->pcipending = 0; + store_hw (dev->scsw.count, 0); + /* Turn off busy & pcipending bits, turn on pending bit */ + dev->busy = dev->pcipending = 0; dev->pending = 1; + /* Wake up any waiters if the device isn't reserved */ + if (!dev->reserved) + { + dev->ioactive = DEV_SYS_NONE; + if (dev->iowaiters) + signal_condition (&dev->iocond); + } + /* For 3270 device, clear any pending input */ if (dev->devtype == 0x3270) { @@ -2112,41 +2206,48 @@ int retry = 0; /* 1=I/O asynchronous retry */ signal_thread (sysblk.cnsltid, SIGUSR2); } - /* Reset device busy indicator */ - dev->busy = 0; - - /* Release the device lock */ release_lock (&dev->lock); - IODELAY(dev); - - /* Signal waiting CPUs that an interrupt may be pending */ + /* Queue the pending interrupt */ obtain_lock (&sysblk.intlock); - QUEUE_IO_INTERRUPT (dev); - ON_IC_IOPENDING; - WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); + DEQUEUE_IO_INTERRUPT(&dev->pciioint); + QUEUE_IO_INTERRUPT(&dev->ioint); release_lock (&sysblk.intlock); if (dev->ccwtrace || dev->ccwstep || tracethis) logmsg (_("HHCCP071I Device %4.4X clear completed\n"), dev->devnum); - if (dev->hnd->end) (dev->hnd->end) (dev); + return NULL; } /* end perform clear subchannel */ /* Test for halt subchannel request */ if (dev->scsw.flag2 & SCSW2_AC_HALT) { - /* Obtain the device lock */ + IODELAY(dev); + + /* Call the i/o end exit */ + if (dev->hnd->end) (dev->hnd->end) (dev); + obtain_lock (&dev->lock); /* [15.4.2] Perform halt function signaling and completion */ dev->scsw.flag2 &= ~SCSW2_AC_HALT; dev->scsw.flag3 |= SCSW3_SC_PEND; dev->scsw.unitstat |= CSW_CE | CSW_DE; - dev->pcipending = 0; + + /* Turn off busy & pcipending bits, turn on pending bit */ + dev->busy = dev->pcipending = 0; dev->pending = 1; + /* Wake up any waiters if the device isn't reserved */ + if (!dev->reserved) + { + dev->ioactive = DEV_SYS_NONE; + if (dev->iowaiters) + signal_condition (&dev->iocond); + } + /* For 3270 device, clear any pending input */ if (dev->devtype == 0x3270) { @@ -2159,26 +2260,19 @@ int retry = 0; /* 1=I/O asynchronous retry */ { signal_thread (sysblk.cnsltid, SIGUSR2); } - - /* Reset device busy indicator */ - dev->busy = 0; - /* Release the device lock */ release_lock (&dev->lock); - IODELAY(dev); - - /* Signal waiting CPUs that an interrupt may be pending */ + /* Queue the pending interrupt */ obtain_lock (&sysblk.intlock); - QUEUE_IO_INTERRUPT (dev); - ON_IC_IOPENDING; - WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); + DEQUEUE_IO_INTERRUPT(&dev->pciioint); + QUEUE_IO_INTERRUPT(&dev->ioint); release_lock (&sysblk.intlock); if (dev->ccwtrace || dev->ccwstep || tracethis) logmsg (_("HHCCP072I Device %4.4X halt completed\n"), dev->devnum); - if (dev->hnd->end) (dev->hnd->end) (dev); + return NULL; } /* end perform halt subchannel */ @@ -2194,10 +2288,8 @@ int retry = 0; /* 1=I/O asynchronous retry */ ccw = dev->mainstor + ccwaddr; /* Increment to next CCW address */ -#ifdef OPTION_SYNCIO if ((dev->chained & CCW_FLAGS_CD) == 0) - dev->syncio_addr = ccwaddr; -#endif + dev->syncio_addr = ccwaddr; ccwaddr += 8; /* Update the CCW address in the SCSW */ @@ -2271,13 +2363,6 @@ int retry = 0; /* 1=I/O asynchronous retry */ /* Suspend channel program if suspend flag is set */ if (flags & CCW_FLAGS_SUSP) { -///*debug*/ /* Trace the CCW if not already done */ -///*debug*/ if (!(dev->ccwtrace || dev->ccwstep || tracethis)) -///*debug*/ { -///*debug*/ display_ccw (dev, ccw, addr); -///*debug*/ tracethis = 1; -///*debug*/ } - /* Channel program check if the ORB suspend control bit was zero, or if this is a data chained CCW */ if ((dev->scsw.flag0 & SCSW0_S) == 0 @@ -2287,26 +2372,27 @@ int retry = 0; /* 1=I/O asynchronous retry */ break; } - /* Obtain the device lock */ + /* Retry if synchronous I/O */ + if (dev->syncio_active) + { + dev->syncio_retry = 1; + return NULL; + } + + IODELAY(dev); + + /* Call the i/o suspend exit */ + if (dev->hnd->suspend) (dev->hnd->suspend) (dev); + obtain_lock (&dev->lock); /* Suspend the device if not already resume pending */ if ((dev->scsw.flag2 & SCSW2_AC_RESUM) == 0) { -#ifdef OPTION_SYNCIO - /* Retry if synchronous I/O */ - if (dev->syncio_active) - { - dev->syncio_retry = 1; - release_lock (&dev->lock); - if (dev->hnd->end) (dev->hnd->end) (dev); - return NULL; - } -#endif /* Set the subchannel status word to suspended */ dev->scsw.flag3 = SCSW3_AC_SUSP - | SCSW3_SC_INTER - | SCSW3_SC_PEND; + | SCSW3_SC_INTER + | SCSW3_SC_PEND; dev->scsw.unitstat = 0; dev->scsw.chanstat = 0; STORE_HW(dev->scsw.count,count); @@ -2315,50 +2401,74 @@ int retry = 0; /* 1=I/O asynchronous retry */ that suspend interrupts are to be suppressed */ if ((dev->scsw.flag1 & SCSW1_U) == 0) { - /* Set interrupt pending flag */ dev->pending = 1; - - /* Release the device lock */ release_lock (&dev->lock); - - IODELAY(dev); - - /* Signal waiting CPUs that interrupt is pending */ obtain_lock (&sysblk.intlock); - QUEUE_IO_INTERRUPT (dev); - ON_IC_IOPENDING; - WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); + QUEUE_IO_INTERRUPT(&dev->ioint); release_lock (&sysblk.intlock); - - /* Re-obtain the device lock */ obtain_lock (&dev->lock); } + /* Wake up any waiters if the device isn't reserved */ + if (!dev->reserved) + { + dev->ioactive = DEV_SYS_NONE; + if (dev->iowaiters) + signal_condition (&dev->iocond); + } + /* Signal console thread to redrive select */ if (dev->console) { signal_thread (sysblk.cnsltid, SIGUSR2); } - /* Suspend the device until resume instruction */ + /* Turn on the `suspended' bit. This enables remote + systems to use the device while we're waiting */ + dev->suspended = 1; + if (dev->ccwtrace || dev->ccwstep || tracethis) logmsg (_("HHCCP073I Device %4.4X suspended\n"), dev->devnum); - if (dev->hnd->suspend) (dev->hnd->suspend) (dev); - - while (dev->busy && (dev->scsw.flag2 & SCSW2_AC_RESUM) == 0) + /* Suspend the device until resume instruction */ + while (dev->suspended && (dev->scsw.flag2 & SCSW2_AC_RESUM) == 0) + { wait_condition (&dev->resumecond, &dev->lock); + } /* If the device has been reset then simply return */ - if(!dev->busy) + if (!dev->suspended) { + if (dev->ioactive == sysid) + { + dev->busy = 0; + + /* Wake up any waiters if the device isn't reserved */ + if (!dev->reserved) + { + dev->ioactive = DEV_SYS_NONE; + if (dev->iowaiters) + signal_condition (&dev->iocond); + } + } release_lock (&dev->lock); - if (dev->hnd->end) (dev->hnd->end) (dev); return NULL; } - if (dev->hnd->resume) (dev->hnd->resume) (dev); + /* Turn the `suspended' bit off */ + dev->suspended = 0; + + /* Wait for the device to become available */ + while (dev->ioactive != DEV_SYS_NONE + && dev->ioactive != sysid) + { + dev->iowaiters++; + wait_condition(&dev->iocond, &dev->lock); + dev->iowaiters--; + } + dev->ioactive = sysid; + dev->busy = 1; if (dev->ccwtrace || dev->ccwstep || tracethis) logmsg (_("HHCCP074I Device %4.4X resumed\n"), @@ -2372,9 +2482,11 @@ int retry = 0; /* 1=I/O asynchronous retry */ /* Reset the resume pending flag */ dev->scsw.flag2 &= ~SCSW2_AC_RESUM; - /* Release the device lock */ release_lock (&dev->lock); + /* Call the i/o resume exit */ + if (dev->hnd->resume) (dev->hnd->resume) (dev); + /* Reset fields as if starting a new channel program */ dev->code = 0; tic = 0; @@ -2384,9 +2496,7 @@ int retry = 0; /* 1=I/O asynchronous retry */ dev->prevcode = 0; dev->ccwseq = 0; bufpos = 0; -#ifdef OPTION_SYNCIO dev->syncio_retry = 0; -#endif /* Go back and refetch the suspended CCW */ ccwaddr -= 8; @@ -2396,25 +2506,11 @@ int retry = 0; /* 1=I/O asynchronous retry */ #endif /*FEATURE_CHANNEL_SUBSYSTEM*/ /* Signal I/O interrupt if PCI flag is set */ - if ((flags & CCW_FLAGS_PCI) -#ifdef OPTION_SYNCIO - && !dev->syncio_retry -#endif - ) + if ((flags & CCW_FLAGS_PCI) && !dev->syncio_retry) { - /* Obtain the device lock */ - obtain_lock (&dev->lock); - - /* Set PCI interrupt pending flag */ - dev->pcipending = 1; + IODELAY(dev); -///*debug*/ /* Trace the CCW if not already done */ -///*debug*/ if (!(dev->ccwtrace || dev->ccwstep || tracethis)) -///*debug*/ { -///*debug*/ display_ccw (dev, ccw, addr); -///*debug*/ tracethis = 1; -///*debug*/ } -///*debug*/ logmsg (_("%4.4X: PCI flag set\n"), dev->devnum); + obtain_lock (&dev->lock); #ifdef FEATURE_S370_CHANNEL /* Save the PCI CSW replacing any previous pending PCI */ @@ -2437,20 +2533,17 @@ int retry = 0; /* 1=I/O asynchronous retry */ STORE_FW(dev->pciscsw.ccwaddr,ccwaddr); dev->pciscsw.unitstat = 0; dev->pciscsw.chanstat = CSW_PCI; - dev->pciscsw.count[0] = 0; - dev->pciscsw.count[1] = 0; + store_hw (dev->pciscsw.count, 0); #endif /*FEATURE_CHANNEL_SUBSYSTEM*/ - /* Release the device lock */ - release_lock (&dev->lock); + /* Turn on the pci pending bit */ + dev->pcipending = 1; - IODELAY(dev); + release_lock (&dev->lock); - /* Signal waiting CPUs that an interrupt is pending */ + /* Queue the pci pending interrupt */ obtain_lock (&sysblk.intlock); - QUEUE_IO_INTERRUPT (dev); - ON_IC_IOPENDING; - WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); + QUEUE_IO_INTERRUPT (&dev->pciioint); release_lock (&sysblk.intlock); } /* end if(CCW_FLAGS_PCI) */ @@ -2463,13 +2556,6 @@ int retry = 0; /* 1=I/O asynchronous retry */ break; } - /* Check that I/O buffer exists */ - if (iobuf == NULL) - { - chanstat = CSW_PROGC; - break; - } - /* For WRITE and CONTROL operations, copy data from main storage into channel buffer */ if (IS_CCW_WRITE(dev->code) @@ -2543,22 +2629,12 @@ int retry = 0; /* 1=I/O asynchronous retry */ } /* Pass the CCW to the device handler for execution */ -#ifdef OPTION_SYNCIO - retry = dev->syncio_retry; -#endif (dev->hnd->exec) (dev, dev->code, flags, dev->chained, count, dev->prevcode, dev->ccwseq, iobuf, &more, &unitstat, &residual); -#ifdef OPTION_SYNCIO - if (retry) dev->syncio_retry = 0; /* Check if synchronous I/O needs to be retried */ - if (dev->syncio_retry) - { - if (dev->hnd->end) (dev->hnd->end) (dev); + if (dev->syncio_active && dev->syncio_retry) return NULL; - } - retry = 0; -#endif /* Check for Command Retry (suggested by Jim Pierson) */ if ( unitstat == ( CSW_CE | CSW_DE | CSW_UC | CSW_SM ) ) @@ -2592,7 +2668,7 @@ int retry = 0; /* 1=I/O asynchronous retry */ || (flags & CCW_FLAGS_SLI) == 0) && (dev->code != 0x03) #if defined(FEATURE_INCORRECT_LENGTH_INDICATION_SUPPRESSION) - /* Suppress incorrect length indication if + /* Suppress incorrect length indication if CCW format is one and SLI mode is indicated in the ORB */ && !((dev->orb.flag5 & ORB5_F) @@ -2686,9 +2762,12 @@ int retry = 0; /* 1=I/O asynchronous retry */ dev->ccwseq++; } /* end while(chain) */ + + IODELAY(dev); + + /* Call the i/o end exit */ if (dev->hnd->end) (dev->hnd->end) (dev); - /* Obtain the device lock */ obtain_lock (&dev->lock); #ifdef FEATURE_S370_CHANNEL @@ -2735,9 +2814,13 @@ int retry = 0; /* 1=I/O asynchronous retry */ } #endif /*FEATURE_CHANNEL_SUBSYSTEM*/ - /* Set the interrupt pending flag for this device */ - dev->busy = 0; - dev->pending = 1; + /* Wake up any waiters if the device isn't reserved */ + if (!dev->reserved) + { + dev->ioactive = DEV_SYS_NONE; + if (dev->iowaiters) + signal_condition (&dev->iocond); + } /* Signal console thread to redrive select */ if (dev->console) @@ -2745,16 +2828,14 @@ int retry = 0; /* 1=I/O asynchronous retry */ signal_thread (sysblk.cnsltid, SIGUSR2); } - /* Release the device lock */ - release_lock (&dev->lock); + dev->busy = 0; + dev->pending = 1; - IODELAY(dev); + release_lock (&dev->lock); - /* Signal waiting CPUs that an interrupt is pending */ + /* Queue the pending interrupt */ obtain_lock (&sysblk.intlock); - QUEUE_IO_INTERRUPT (dev); - ON_IC_IOPENDING; - WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); + QUEUE_IO_INTERRUPT (&dev->ioint); release_lock (&sysblk.intlock); return NULL; @@ -2813,7 +2894,7 @@ int i; /* Interruption subclass */ #endif regs->chanset != dev->chanset) return 0; -#endif /*defined(FEATURE_CHANNEL_SWITCHING)*/ +#endif /*defined(FEATURE_CHANNEL_SWITCHING)*/ /* Isolate the channel number */ i = dev->devnum >> 8; @@ -2851,7 +2932,7 @@ int i; /* Interruption subclass */ return 0; /* Isolate the interruption subclass */ - i = + i = #if defined(_FEATURE_IO_ASSIST) /* For I/O Assisted devices use the guest (V)ISC */ regs->sie_state ? (dev->pmcw.flag25 & PMCW25_VISC) : @@ -2897,9 +2978,10 @@ int i; /* Interruption subclass */ int ARCH_DEP(present_io_interrupt) (REGS *regs, U32 *ioid, U32 *ioparm, U32 *iointid, BYTE *csw) { +IOINT *io; /* -> I/O interrupt entry */ DEVBLK *dev; /* -> Device control block */ -int iopending = 0; /* 1 = I/O still pending */ int icode = 0; /* Intercept code */ +BYTE *pendcsw; /* Pending CSW */ UNREFERENCED_370(ioparm); UNREFERENCED_370(iointid); @@ -2910,59 +2992,78 @@ int icode = 0; /* Intercept code */ UNREFERENCED_900(csw); /* Find a device with pending interrupt */ - for (dev = sysblk.iointq; dev != NULL; dev = dev->iointq) +retry: + for (io = sysblk.iointq; io != NULL; io = io->next) { - obtain_lock (&dev->lock); - if (dev->pending || dev->pcipending) - { - /* Exit loop if enabled for interrupts from this device */ - if ((icode = ARCH_DEP(interrupt_enabled)(regs, dev)) + /* Exit loop if enabled for interrupts from this device */ + if ((icode = ARCH_DEP(interrupt_enabled)(regs, io->dev)) #if defined(_FEATURE_IO_ASSIST) - && icode != SIE_INTERCEPT_IOINTP + && icode != SIE_INTERCEPT_IOINTP #endif - ) - break; - iopending = 1; -#if MAX_CPU_ENGINES > 1 - /* See if another CPU can take this interrupt */ - WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); -#endif /*MAX_CPU_ENGINES > 1*/ - } - release_lock (&dev->lock); - } /* end for(dev) */ + ) + break; + + /* See if another CPU can take this interrupt */ + WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); + + } /* end for(io) */ #if defined(_FEATURE_IO_ASSIST) /* In the case of I/O assist, do a rescan, to see if there are any devices with pending subclasses for which we are not enabled, if so cause a interception */ - if (dev == NULL && regs->sie_state) + if (io == NULL && regs->sie_state) { /* Find a device with a pending interrupt, regardless of the interrupt subclass mask */ - for (dev = sysblk.iointq; dev != NULL; dev = dev->iointq) + for (io = sysblk.iointq; io != NULL; io = io->next) { - obtain_lock (&dev->lock); - if (dev->pending || dev->pcipending) - /* Exit loop if pending interrupts from this device */ - if ((icode = ARCH_DEP(interrupt_enabled)(regs, dev))) - break; - release_lock (&dev->lock); - } /* end for(dev) */ + /* Exit loop if pending interrupts from this device */ + if ((icode = ARCH_DEP(interrupt_enabled)(regs, io->dev))) + break; + } /* end for(io) */ } #endif /* If no interrupt pending, exit with condition code 0 */ - if(dev == NULL) + if (io == NULL) { if (sysblk.iointq == NULL) OFF_IC_IOPENDING; return 0; } + dev = io->dev; + obtain_lock (&dev->lock); + + /* Ignore the interrupt if the corresponding devblk bit is off. + This means that the interrupt is being removed but the + i/o interrupt entry hasn't yet been dequeued. */ + if ((io->pending && !dev->pending) + || (io->pcipending && !dev->pcipending) + || (io->attnpending && !dev->attnpending)) + { + release_lock (&dev->lock); + DEQUEUE_IO_INTERRUPT (io); + goto retry; + } + #ifdef FEATURE_S370_CHANNEL /* Extract the I/O address and CSW */ *ioid = dev->devnum; - memcpy (csw, dev->pcipending ? dev->pcicsw : dev->csw, 8); + if(io->pcipending) + { + pendcsw=dev->pcicsw; + } + if(io->pending) + { + pendcsw=dev->csw; + } + if(io->attnpending) + { + pendcsw=dev->attncsw; + } + memcpy (csw, pendcsw , 8); /* Display the channel status word */ if (dev->ccwtrace || dev->ccwstep) @@ -2974,13 +3075,13 @@ int icode = 0; /* Intercept code */ *ioid = 0x00010000 | dev->subchan; FETCH_FW(*ioparm,dev->pmcw.intparm); #if defined(FEATURE_ESAME) || defined(_FEATURE_IO_ASSIST) - *iointid = + *iointid = #if defined(_FEATURE_IO_ASSIST) /* For I/O Assisted devices use (V)ISC */ (regs->sie_state) ? (icode == SIE_NO_INTERCEPT) ? ((dev->pmcw.flag25 & PMCW25_VISC) << 27) : - ((dev->pmcw.flag25 & PMCW25_VISC) << 27) + ((dev->pmcw.flag25 & PMCW25_VISC) << 27) | (dev->pmcw.zone << 16) | ((dev->pmcw.flag27 & PMCW27_I) << 8) : #endif @@ -3002,27 +3103,26 @@ int icode = 0; /* Intercept code */ if(!regs->sie_state || icode != SIE_NO_INTERCEPT) dev->pmcw.flag27 &= ~PMCW27_I; - /* Remove the device from the I/O interrupt queue - unless both `pcipending' and `pending' are set */ - if (!(dev->pcipending == 1 && dev->pending == 1)) + /* Reset the interrupt pending flag for the device */ + DEQUEUE_IO_INTERRUPT (io); + if(io->pending) { - DEQUEUE_IO_INTERRUPT (dev); - if (sysblk.iointq == NULL) - OFF_IC_IOPENDING; + dev->pending=0; + } + if(io->pcipending) + { + dev->pcipending=0; + } + if(io->attnpending) + { + dev->attnpending=0; } - - /* Reset the interrupt pending flag for the device */ - if (dev->pcipending) - dev->pcipending = 0; - else - dev->pending = 0; /* Signal console thread to redrive select */ if (dev->console) signal_thread (sysblk.cnsltid, SIGUSR2); } - /* Release the device lock */ release_lock (&dev->lock); /* Exit with condition code indicating interrupt cleared */ @@ -3032,10 +3132,11 @@ int icode = 0; /* Intercept code */ #if defined(_FEATURE_IO_ASSIST) +/* Both intlock & dev->lock held */ static inline int ARCH_DEP(interrupt_zone) (DEVBLK *dev, BYTE zone) { - /* Ignore when no interrupts pending for this device */ - if (!(dev->pending || dev->pcipending)) + /* Ignore if interrupt is being removed */ + if (!dev->pending && !dev->pcipending) return 0; /* Ignore this device if subchannel not valid and enabled */ @@ -3050,29 +3151,25 @@ static inline int ARCH_DEP(interrupt_zone) (DEVBLK *dev, BYTE zone) return 1; } /* end function interrupt_zone */ -int ARCH_DEP(present_zone_io_interrupt) (U32 *ioid, U32 *ioparm, +int ARCH_DEP(present_zone_io_interrupt) (U32 *ioid, U32 *ioparm, U32 *iointid, BYTE zone) { +IOINT *io; /* -> I/O interrupt entry */ DEVBLK *dev; /* -> Device control block */ - /* Find a device with pending interrupt */ - for (dev = sysblk.iointq; dev != NULL; dev = dev->iointq) + for (io = sysblk.iointq; io != NULL; io = io->next) { + dev = io->dev; obtain_lock (&dev->lock); - /* Exit loop if enabled for interrupts from this device */ if (ARCH_DEP(interrupt_zone)(dev, zone)) break; - release_lock (&dev->lock); - } /* end for(dev) */ - - /* Release the device lock */ - release_lock (&dev->lock); + } /* end for(io) */ /* If no enabled interrupt pending, exit with condition code 0 */ - if (dev == NULL) + if (io == NULL) return 0; /* Extract the I/O address and interrupt parameter for @@ -3081,18 +3178,17 @@ DEVBLK *dev; /* -> Device control block */ FETCH_FW(*ioparm,dev->pmcw.intparm); *iointid = (0x80000000 >> (dev->pmcw.flag25 & PMCW25_VISC)) | (dev->pmcw.zone << 16); + release_lock (&dev->lock); /* Find all other pending subclasses */ - for (dev = dev->iointq; dev != NULL; dev = dev->iointq) + for (io = sysblk.iointq; io != NULL; io = io->next) { + dev = io->dev; obtain_lock (&dev->lock); - - /* Exit loop if enabled for interrupts from this device */ if (ARCH_DEP(interrupt_zone)(dev, zone)) *iointid |= (0x80000000 >> (dev->pmcw.flag25 & PMCW25_VISC)); - release_lock (&dev->lock); - } /* end for(dev) */ + } /* end for(io) */ /* Exit with condition code indicating interrupt pending */ return 1; @@ -3130,7 +3226,6 @@ int device_attention (DEVBLK *dev, BYTE unitstat) return 3; } -#if defined(OPTION_FISHIO) void call_execute_ccw_chain(int arch_mode, void* pDevBlk) { switch (arch_mode) @@ -3146,6 +3241,5 @@ void call_execute_ccw_chain(int arch_mode, void* pDevBlk) #endif } } -#endif // defined(OPTION_FISHIO) #endif /*!defined(_GEN_ARCH)*/ diff --git a/ckddasd.c b/ckddasd.c index 0eea94b..1bfc0e8 100644 --- a/ckddasd.c +++ b/ckddasd.c @@ -17,32 +17,8 @@ /*-------------------------------------------------------------------*/ #include "hercules.h" - #include "devtype.h" -#ifdef CKDTRACE -#undef DEVTRACE -#define DEVTRACE(format, a...) \ -do { \ - if (dev->ccwtrace||dev->ccwstep) \ - { \ - int n; \ - if (!dev->ckdtrace) dev->ckdtrace = calloc (128, CKDTRACE); \ - if (dev->ckdtracex >= 128 * CKDTRACE) \ - { \ - n = 0; \ - dev->ckdtracex = 128; \ - } \ - else \ - { \ - n = dev->ckdtracex; \ - dev->ckdtracex += 128; \ - } \ - sprintf(&dev->ckdtrace[n], "%4.4X:" format, dev->devnum, a); \ - } \ -} while (0) -#endif - /*-------------------------------------------------------------------*/ /* Bit definitions for File Mask */ /*-------------------------------------------------------------------*/ @@ -196,13 +172,6 @@ do { \ /*-------------------------------------------------------------------*/ static BYTE eighthexFF[] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; -/*-------------------------------------------------------------------*/ -/* Internal functions */ -/*-------------------------------------------------------------------*/ -static int ckd_read_track (DEVBLK *, int, int, BYTE *); -static int ckd_update_track (DEVBLK *, BYTE *, int, BYTE *); -static int ckd_used (DEVBLK *); - /*-------------------------------------------------------------------*/ /* Initialize the device handler */ /*-------------------------------------------------------------------*/ @@ -222,22 +191,45 @@ int trks; /* #of tracks in CKD file */ int cyls; /* #of cylinders in CKD file */ int highcyl; /* Highest cyl# in CKD file */ BYTE *cu = NULL; /* Specified control unit */ -char *kw, *op; /* Argument keyword/option */ +char *kw; /* Argument keyword */ int cckd=0; /* 1 if compressed CKD */ + if(!sscanf(dev->typname,"%hx",&(dev->devtype))) + dev->devtype = 0x3380; + /* The first argument is the file name */ if (argc == 0 || strlen(argv[0]) > sizeof(dev->filename)-1) { - devmsg (_("HHCDA001E File name missing or invalid\n")); + logmsg (_("HHCDA001E File name missing or invalid\n")); return -1; } /* Save the file name in the device block */ strcpy (dev->filename, argv[0]); + /* Device is shareable */ + dev->shared = 1; + + /* Check for possible remote device */ + if (stat(dev->filename, &statbuf) < 0) + { + rc = shared_ckd_init ( dev, argc, argv); + if (rc < 0) + { + logmsg (_("HHCDA002E %4.4X:File not found or invalid\n"), + dev->devnum); + return -1; + } + else + return rc; + } + /* Default to synchronous I/O */ dev->syncio = 1; + /* No active track or cache entry */ + dev->bufcur = dev->cache = -1; + /* Locate and save the last character of the file name */ sfxptr = strrchr (dev->filename, '/'); if (sfxptr == NULL) sfxptr = dev->filename + 1; @@ -287,14 +279,6 @@ int cckd=0; /* 1 if compressed CKD */ dev->ckdfakewr = 1; continue; } - if (strlen (argv[i]) > 6 && - memcmp ("cache=", argv[i], 6) == 0) - { - kw = strtok (argv[i], "="); - op = strtok (NULL, " \t"); - if (op) dev->ckdcachenbr = atoi (op); - continue; - } if (strlen (argv[i]) > 3 && memcmp ("sf=", argv[i], 3) == 0) { @@ -323,20 +307,7 @@ int cckd=0; /* 1 if compressed CKD */ continue; } - /* the following parameters are processed by cckd code */ - if (strlen (argv[i]) > 8 && !memcmp ("l2cache=", argv[i], 8)) - continue; - if (strlen (argv[i]) > 5 && !memcmp ("dfwq=", argv[i], 5)) - continue; - if (strlen (argv[i]) > 3 && !memcmp ("wt=", argv[i], 3)) - continue; - if (strlen (argv[i]) == 4 && !memcmp ("ra=", argv[i], 3) - && argv[i][3] >= '0' && argv[i][3] <= '0' + CCKD_MAX_RA) - continue; - if (strlen (argv[i]) == 5 && !memcmp ("dfw=", argv[i], 4)) - continue; - - devmsg (_("HHCDA002E parameter %d is invalid: %s\n"), + logmsg (_("HHCDA003E parameter %d is invalid: %s\n"), i + 1, argv[i]); return -1; } @@ -347,7 +318,7 @@ int cckd=0; /* 1 if compressed CKD */ /* Open all of the CKD image files which comprise this volume */ if (dev->ckdrdonly) - devmsg (_("HHCDA003I opening %s readonly%s\n"), dev->filename, + logmsg (_("HHCDA004I opening %s readonly%s\n"), dev->filename, dev->ckdfakewr ? " with fake writing" : ""); for (fileseq = 1;;) { @@ -360,7 +331,7 @@ int cckd=0; /* 1 if compressed CKD */ dev->fd = open (dev->filename, O_RDONLY|O_BINARY); if (dev->fd < 0) { - devmsg (_("HHCDA004E %s open error: %s\n"), + logmsg (_("HHCDA005E %s open error: %s\n"), dev->filename, strerror(errno)); return -1; } @@ -375,7 +346,7 @@ int cckd=0; /* 1 if compressed CKD */ /* If shadow file, only one base file is allowed */ if (fileseq > 1 && dev->dasdsfn[0] != '\0') { - devmsg (_("HHCDA005E %s not in a single file for shadowing\n"), + logmsg (_("HHCDA006E %s not in a single file for shadowing\n"), dev->filename); return -1; } @@ -384,7 +355,7 @@ int cckd=0; /* 1 if compressed CKD */ rc = fstat (dev->fd, &statbuf); if (rc < 0) { - devmsg (_("HHCDA006E %s fstat error: %s\n"), + logmsg (_("HHCDA007E %s fstat error: %s\n"), dev->filename, strerror(errno)); return -1; } @@ -394,10 +365,10 @@ int cckd=0; /* 1 if compressed CKD */ if (rc < (int)CKDDASD_DEVHDR_SIZE) { if (rc < 0) - devmsg (_("HHCDA007E %s read error: %s\n"), + logmsg (_("HHCDA008E %s read error: %s\n"), dev->filename, strerror(errno)); else - devmsg (_("HHCDA08E %s CKD header incomplete\n"), + logmsg (_("HHCDA09E %s CKD header incomplete\n"), dev->filename); return -1; } @@ -407,7 +378,7 @@ int cckd=0; /* 1 if compressed CKD */ { if (memcmp(devhdr.devid, "CKD_C370", 8) != 0) { - devmsg (_("HHCDA009E %s CKD header invalid\n"), + logmsg (_("HHCDA010E %s CKD header invalid\n"), dev->filename); return -1; } @@ -416,7 +387,7 @@ int cckd=0; /* 1 if compressed CKD */ cckd = 1; if (fileseq != 1) { - devmsg (_("HHCDA010E %s Only 1 CCKD file allowed\n"), + logmsg (_("HHCDA011E %s Only 1 CCKD file allowed\n"), dev->filename); return -1; } @@ -431,12 +402,12 @@ int cckd=0; /* 1 if compressed CKD */ { if (rc < 0) { - devmsg (_("HHCDA011E %s read error: %s\n"), + logmsg (_("HHCDA012E %s read error: %s\n"), dev->filename, strerror(errno)); } else { - devmsg (_("HHCDA012E %s CCKD header incomplete\n"), + logmsg (_("HHCDA013E %s CCKD header incomplete\n"), dev->filename); } return -1; @@ -447,13 +418,13 @@ int cckd=0; /* 1 if compressed CKD */ if (devhdr.fileseq != fileseq && !(devhdr.fileseq == 0 && fileseq == 1)) { - devmsg (_("HHCDA013E %s CKD file out of sequence\n"), + logmsg (_("HHCDA014E %s CKD file out of sequence\n"), dev->filename); return -1; } /* Extract fields from device header */ - heads = ((U32)(devhdr.heads[3]) << 24) + heads = ((U32)(devhdr.heads[3]) << 24) | ((U32)(devhdr.heads[2]) << 16) | ((U32)(devhdr.heads[1]) << 8) | (U32)(devhdr.heads[0]); @@ -479,7 +450,7 @@ int cckd=0; /* 1 if compressed CKD */ if (devhdr.fileseq > 0) { - devmsg (_("HHCDA014I %s seq=%d cyls=%d-%d\n"), + logmsg (_("HHCDA015I %s seq=%d cyls=%d-%d\n"), dev->filename, devhdr.fileseq, dev->ckdcyls, (highcyl > 0 ? highcyl : dev->ckdcyls + cyls - 1)); } @@ -493,7 +464,7 @@ int cckd=0; /* 1 if compressed CKD */ } else if (heads != dev->ckdheads || trksize != dev->ckdtrksz) { - devmsg (_("HHCDA015E %s heads=%d trklen=%d, " + logmsg (_("HHCDA016E %s heads=%d trklen=%d, " "expected heads=%d trklen=%d\n"), dev->filename, heads, trksize, dev->ckdheads, dev->ckdtrksz); @@ -506,7 +477,7 @@ int cckd=0; /* 1 if compressed CKD */ != statbuf.st_size || (highcyl != 0 && highcyl != dev->ckdcyls + cyls - 1))) { - devmsg (_("HHCDA016E %s CKD header inconsistent with file size\n"), + logmsg (_("HHCDA017E %s CKD header inconsistent with file size\n"), dev->filename); return -1; } @@ -514,7 +485,7 @@ int cckd=0; /* 1 if compressed CKD */ /* Check for correct high cylinder number */ if (highcyl != 0 && highcyl != dev->ckdcyls + cyls - 1) { - devmsg (_("HHCDA017E %s CKD header high cylinder incorrect\n"), + logmsg (_("HHCDA018E %s CKD header high cylinder incorrect\n"), dev->filename); return -1; } @@ -540,7 +511,7 @@ int cckd=0; /* 1 if compressed CKD */ /* Check that maximum files has not been exceeded */ if (fileseq > CKD_MAXFILES) { - devmsg (_("HHCDA018E %s exceeds maximum %d CKD files\n"), + logmsg (_("HHCDA019E %s exceeds maximum %d CKD files\n"), dev->filename, CKD_MAXFILES); return -1; } @@ -551,7 +522,7 @@ int cckd=0; /* 1 if compressed CKD */ *sfxptr = sfxchar; /* Log the device geometry */ - devmsg (_("HHCDA019I %s cyls=%d heads=%d tracks=%d trklen=%d\n"), + logmsg (_("HHCDA020I %s cyls=%d heads=%d tracks=%d trklen=%d\n"), dev->filename, dev->ckdcyls, dev->ckdheads, dev->ckdtrks, dev->ckdtrksz); @@ -562,7 +533,7 @@ int cckd=0; /* 1 if compressed CKD */ dev->ckdtab = dasd_lookup (DASD_CKDDEV, NULL, dev->devtype, dev->ckdcyls); if (dev->ckdtab == NULL) { - devmsg (_("HHCDA020E %4.4X device type %4.4X not found in dasd table\n"), + logmsg (_("HHCDA021E %4.4X device type %4.4X not found in dasd table\n"), dev->devnum, dev->devtype); return -1; } @@ -571,7 +542,7 @@ int cckd=0; /* 1 if compressed CKD */ dev->ckdcu = dasd_lookup (DASD_CKDCU, cu ? cu : dev->ckdtab->cu, 0, 0); if (dev->ckdcu == NULL) { - devmsg (_("HHCDA021E %4.4X control unit %s not found in dasd table\n"), + logmsg (_("HHCDA022E %4.4X control unit %s not found in dasd table\n"), dev->devnum, cu ? cu : dev->ckdtab->cu); return -1; } @@ -598,11 +569,6 @@ int cckd=0; /* 1 if compressed CKD */ a single buffer before passing data to the device handler */ dev->cdwmerge = 1; - /* Set the routine addresses for read_track and write_track */ - dev->ckdrdtrk = &ckd_read_track; - dev->ckdupdtrk = &ckd_update_track; - dev->ckdused = &ckd_used; - if (!cckd) return 0; else return cckddasd_init_handler(dev, argc, argv); @@ -623,29 +589,44 @@ void ckddasd_query_device (DEVBLK *dev, BYTE **class, } /* end function ckddasd_query_device */ +/*-------------------------------------------------------------------*/ +/* Release cache entries */ +/*-------------------------------------------------------------------*/ +int ckddasd_purge_cache (int *answer, int ix, int i, void *data) +{ +U16 devnum; /* Cached device number */ +int trk; /* Cached track */ +DEVBLK *dev = data; /* -> device block */ + + UNREFERENCED(answer); + CKD_CACHE_GETKEY(i, devnum, trk); + if (dev->devnum == devnum) + cache_release (ix, i, CACHE_FREEBUF); + return 0; +} + + +static int ckddasd_read_track (DEVBLK *dev, int trk, BYTE *unitstat); /*-------------------------------------------------------------------*/ /* Close the device */ /*-------------------------------------------------------------------*/ int ckddasd_close_device ( DEVBLK *dev ) { -int i; /* Index */ +int i; /* Index */ BYTE unitstat; /* Unit Status */ /* Write the last track image if it's modified */ - if (dev->bufupd) ckd_read_track (dev, -1, -1, &unitstat); + ckddasd_read_track (dev, -1, &unitstat); /* Free the cache */ - if (dev->ckdcache) - { - for (i = 0; i < dev->ckdcachenbr; i++) - if (dev->ckdcache[i].buf) - free (dev->ckdcache[i].buf); - free (dev->ckdcache); - } + cache_lock(CACHE_DEVBUF); + cache_scan(CACHE_DEVBUF, ckddasd_purge_cache, dev); + cache_unlock(CACHE_DEVBUF); if (!dev->batch) - devmsg (_("HHCDA022I %4.4X cache hits %d, misses %d\n"), - dev->devnum, dev->ckdcachehits, dev->ckdcachemisses); + logmsg (_("HHCDA023I %4.4X cache hits %d, misses %d, waits %d\n"), + dev->devnum, dev->cachehits, dev->cachemisses, + dev->cachewaits); /* Close all of the CKD image files */ for (i = 0; i < dev->ckdnumfd; i++) @@ -658,34 +639,91 @@ BYTE unitstat; /* Unit Status */ return 0; } /* end function ckddasd_close_device */ + +/*-------------------------------------------------------------------*/ +/* Read a track image at CCHH */ +/*-------------------------------------------------------------------*/ +static +int ckd_read_cchh (DEVBLK *dev, int cyl, int head, BYTE *unitstat) +{ +int rc; /* Return code */ +int trk; /* Track number */ + + /* Command reject if seek position is outside volume */ + if (cyl >= dev->ckdcyls || head >= dev->ckdheads) + { + ckd_build_sense (dev, SENSE_CR, 0, 0, + FORMAT_0, MESSAGE_4); + *unitstat = CSW_CE | CSW_DE | CSW_UC; + return -1; + } + + /* Calculate the track number */ + trk = cyl * dev->ckdheads + head; + + /* Call the read exit */ + rc = (dev->hnd->read) (dev, trk, unitstat); + + return rc; +} /* end function ckd_read_cchh */ + +/*-------------------------------------------------------------------*/ +/* Return track image length */ +/*-------------------------------------------------------------------*/ +static int ckd_trklen (DEVBLK *dev, BYTE *buf) +{ +int sz; /* Size so far */ + + for (sz = CKDDASD_TRKHDR_SIZE; + memcmp (buf + sz, &eighthexFF, 8) != 0; ) + { + /* add length of count, key, and data fields */ + sz += CKDDASD_RECHDR_SIZE + + buf[sz+5] + + (buf[sz+6] << 8) + buf[sz+7]; + if (sz > dev->ckdtrksz - 8) break; + } + + /* add length for end-of-track indicator */ + sz += CKDDASD_RECHDR_SIZE; + + if (sz > dev->ckdtrksz) + sz = dev->ckdtrksz; + + return sz; +} + /*-------------------------------------------------------------------*/ /* Read a track image */ /*-------------------------------------------------------------------*/ static -int ckd_read_track (DEVBLK *dev, int cyl, int head, BYTE *unitstat) +int ckddasd_read_track (DEVBLK *dev, int trk, BYTE *unitstat) { int rc; /* Return code */ +int cyl; /* Cylinder */ +int head; /* Head */ off_t offset; /* File offsets */ -int trk; /* New track number */ -int i,o; /* Indexes */ +int i,o,f; /* Indexes */ int active; /* 1=Synchronous I/O active */ CKDDASD_TRKHDR *trkhdr; /* -> New track header */ - /* Calculate the track number */ - trk = cyl * dev->ckdheads + head; + DEVTRACE (_("HHCDA024I read trk %d cur trk %d\n"), trk, dev->bufcur); - DEVTRACE ("HHCDA023I read trk %d cur trk %d\n", trk, dev->dasdcur); + /* Calculate cylinder and head */ + cyl = trk / dev->ckdheads; + head = trk % dev->ckdheads; /* Reset buffer offsets */ dev->bufoff = 0; dev->bufoffhi = dev->ckdtrksz; /* Return if reading the same track image */ - if (trk >= 0 && trk == dev->dasdcur && dev->buf) return 0; + if (trk >= 0 && trk == dev->bufcur) + return 0; /* Turn off the synchronous I/O bit if trk overflow or trk 0 */ active = dev->syncio_active; - if (dev->ckdtrkof || (cyl <= 0 && head <= 0)) + if (dev->ckdtrkof || trk <= 0) dev->syncio_active = 0; /* Write the previous track image if modified */ @@ -698,8 +736,8 @@ CKDDASD_TRKHDR *trkhdr; /* -> New track header */ return -1; } - DEVTRACE ("HHCDA024I read track: updating track %d\n", - dev->dasdcur); + DEVTRACE (_("HHCDA025I read track: updating track %d\n"), + dev->bufcur); dev->bufupd = 0; @@ -709,11 +747,16 @@ CKDDASD_TRKHDR *trkhdr; /* -> New track header */ if (offset < 0) { /* Handle seek error condition */ - devmsg (_("HHCDA025E error writing trk %d: lseek error: %s\n"), - dev->dasdcur, strerror(errno)); + logmsg (_("HHCDA026E error writing trk %d: lseek error: %s\n"), + dev->bufcur, strerror(errno)); ckd_build_sense (dev, SENSE_EC, 0, 0, FORMAT_1, MESSAGE_0); *unitstat = CSW_CE | CSW_DE | CSW_UC; + cache_lock(CACHE_DEVBUF); + cache_setflag(CACHE_DEVBUF, dev->cache, ~CKD_CACHE_ACTIVE, 0); + cache_unlock(CACHE_DEVBUF); + dev->bufupdlo = dev->bufupdhi = 0; + dev->bufcur = dev->cache = -1; return -1; } @@ -723,113 +766,118 @@ CKDDASD_TRKHDR *trkhdr; /* -> New track header */ if (rc < dev->bufupdhi - dev->bufupdlo) { /* Handle seek error condition */ - devmsg (_("HHCDA026E error writing trk %d: write error: %s\n"), - dev->dasdcur, strerror(errno)); + logmsg (_("HHCDA027E error writing trk %d: write error: %s\n"), + dev->bufcur, strerror(errno)); ckd_build_sense (dev, SENSE_EC, 0, 0, FORMAT_1, MESSAGE_0); *unitstat = CSW_CE | CSW_DE | CSW_UC; + cache_lock(CACHE_DEVBUF); + cache_setflag(CACHE_DEVBUF, dev->cache, ~CKD_CACHE_ACTIVE, 0); + cache_unlock(CACHE_DEVBUF); + dev->bufupdlo = dev->bufupdhi = 0; + dev->bufcur = dev->cache = -1; return -1; } dev->bufupdlo = dev->bufupdhi = 0; } - /* Return on special case when called by the close handler */ - if (cyl < 0 && head < 0) return 0; + cache_lock (CACHE_DEVBUF); - /* Command reject if seek position is outside volume */ - if (cyl >= dev->ckdcyls || head >= dev->ckdheads) - { - ckd_build_sense (dev, SENSE_CR, 0, 0, - FORMAT_0, MESSAGE_4); - *unitstat = CSW_CE | CSW_DE | CSW_UC; - return -1; - } + /* Make the previous cache entry inactive */ + if (dev->cache >= 0) + cache_setflag(CACHE_DEVBUF, dev->cache, ~CKD_CACHE_ACTIVE, 0); + dev->bufcur = dev->cache = -1; - /* Get the cache if it doesn't exist */ - if (dev->ckdcache == NULL) + /* Return on special case when called by the close handler */ + if (trk < 0) { - /* default cache size is number of heads (trks/cyl) */ - if (dev->ckdcachenbr < 1) - dev->ckdcachenbr = dev->ckdheads; - - dev->ckdcache = calloc (dev->ckdcachenbr, CKDDASD_CACHE_SIZE); - if (dev->ckdcache == NULL) - { - /* Handle calloc error condition */ - devmsg (_("HHCDA027E calloc error for cache table " - "size %d: %s\n"), - dev->ckdcachenbr * CKDDASD_CACHE_SIZE, - strerror(errno)); - return (SENSE_EC << 8); - } + cache_unlock (CACHE_DEVBUF); + return 0; } +ckd_read_track_retry: + /* Search the cache */ - for (i = 0, o = -1; i < dev->ckdcachenbr; i++) + i = cache_lookup (CACHE_DEVBUF, CKD_CACHE_SETKEY(dev->devnum, trk), &o); + + /* Cache hit */ + if (i >= 0) { - if (dev->ckdcache[i].trk == trk && dev->ckdcache[i].buf) - { - DEVTRACE ("HHCDA028I read trk %d found in cache[%d]\n", - trk, i); - dev->fd = dev->ckdcache[i].fd; - dev->buf = dev->ckdcache[i].buf; - dev->ckdtrkoff = dev->ckdcache[i].off; - dev->ckdcache[i].age = ++dev->ckdcacheage; - dev->dasdcur = trk; - dev->ckdcachehits++; - return 0; - } - if (o < 0 || dev->ckdcache[i].age < dev->ckdcache[o].age) - o = i; - } + cache_setflag(CACHE_DEVBUF, dev->cache, ~0, FBA_CACHE_ACTIVE); + cache_setage(CACHE_DEVBUF, dev->cache); + cache_unlock(CACHE_DEVBUF); + + DEVTRACE (_("HHCDA028I read trk %d cache hit, using cache[%d]\n"), + trk, i); + + dev->cachehits++; + dev->cache = i; + dev->buf = cache_getbuf(CACHE_DEVBUF, dev->cache, 0); + dev->bufcur = trk; + dev->bufoff = 0; + dev->bufoffhi = dev->ckdtrksz; + dev->buflen = ckd_trklen (dev, dev->buf); + dev->bufsize = cache_getlen(CACHE_DEVBUF, dev->cache); + + /* Set the file descriptor */ + for (f = 0; f < dev->ckdnumfd; f++) + if (trk < dev->ckdhitrk[f]) break; + dev->fd = dev->ckdfd[f]; + + /* Calculate the track offset */ + dev->ckdtrkoff = CKDDASD_DEVHDR_SIZE + + (off_t)(trk - (f ? dev->ckdhitrk[f-1] : 0)) * dev->ckdtrksz; + + dev->syncio_active = active; + + return 0; + } /* Retry if synchronous I/O */ if (dev->syncio_active) { + cache_unlock(CACHE_DEVBUF); dev->syncio_retry = 1; return -1; } - dev->syncio_active = active; - DEVTRACE ("HHCDA029I read trk %d cache miss, using cache[%d]\n", - trk, o); + /* Wait if no available cache entry */ + if (o < 0) + { + DEVTRACE (_("HHCDA029I read trk %d no available cache entry, waiting\n"), + trk); + dev->cachewaits++; + cache_wait(CACHE_DEVBUF); + goto ckd_read_track_retry; + } /* Cache miss */ - dev->ckdcachemisses++; + DEVTRACE (_("HHCDA030I read trk %d cache miss, using cache[%d]\n"), + trk, o); - /* Get a track image buffer if one doesn't exist */ - if (dev->ckdcache[o].buf == NULL) - { - dev->ckdcache[o].buf = malloc(dev->ckdtrksz); - if (dev->ckdcache[o].buf == NULL) - { - /* Handle calloc error condition */ - devmsg (_("HHCDA030E malloc error for cache entry buffer " - "size %d: %s\n"), - dev->ckdtrksz, strerror(errno)); - dev->syncio_active = active; - return (SENSE_EC << 8); - } - } + dev->cachemisses++; - dev->ckdcache[o].trk = trk; - dev->ckdcache[o].age = ++dev->ckdcacheage; - dev->buf = dev->ckdcache[o].buf; - - /* Calculate the file number */ - for (i = 0; i < dev->ckdnumfd; i++) - if (trk < dev->ckdhitrk[i]) break; - dev->fd = dev->ckdfd[i]; - dev->ckdcache[o].fd = dev->fd; + /* Make this cache entry active */ + cache_setkey (CACHE_DEVBUF, o, CKD_CACHE_SETKEY(dev->devnum, trk)); + cache_setflag(CACHE_DEVBUF, o, 0, CKD_CACHE_ACTIVE|DEVBUF_TYPE_CKD); + cache_setage (CACHE_DEVBUF, o); + dev->buf = cache_getbuf(CACHE_DEVBUF, o, dev->ckdtrksz); + cache_unlock (CACHE_DEVBUF); + + /* Set the file descriptor */ + for (f = 0; f < dev->ckdnumfd; f++) + if (trk < dev->ckdhitrk[f]) break; + dev->fd = dev->ckdfd[f]; /* Calculate the track offset */ dev->ckdtrkoff = CKDDASD_DEVHDR_SIZE + - (off_t)(trk - (i ? dev->ckdhitrk[i-1] : 0)) * dev->ckdtrksz; - dev->ckdcache[o].off = dev->ckdtrkoff; + (off_t)(trk - (f ? dev->ckdhitrk[f-1] : 0)) * dev->ckdtrksz; + + dev->syncio_active = active; - DEVTRACE ("HHCDA031I read trk %d reading file %d offset %lld len %d\n", - trk, i+1, (long long)dev->ckdtrkoff, dev->ckdtrksz); + DEVTRACE (_("HHCDA031I read trk %d reading file %d offset %lld len %d\n"), + trk, f+1, (long long)dev->ckdtrkoff, dev->ckdtrksz); /* Seek to the track image offset */ offset = (off_t)dev->ckdtrkoff; @@ -837,11 +885,14 @@ CKDDASD_TRKHDR *trkhdr; /* -> New track header */ if (offset < 0) { /* Handle seek error condition */ - devmsg (_("HHCDA032E error reading trk %d: lseek error: %s\n"), + logmsg (_("HHCDA032E error reading trk %d: lseek error: %s\n"), trk, strerror(errno)); - ckd_build_sense (dev, SENSE_EC, 0, 0, - FORMAT_1, MESSAGE_0); + ckd_build_sense (dev, SENSE_EC, 0, 0, FORMAT_1, MESSAGE_0); *unitstat = CSW_CE | CSW_DE | CSW_UC; + dev->bufcur = dev->cache = -1; + cache_lock(CACHE_DEVBUF); + cache_release(CACHE_DEVBUF, o, 0); + cache_unlock(CACHE_DEVBUF); return -1; } @@ -850,16 +901,19 @@ CKDDASD_TRKHDR *trkhdr; /* -> New track header */ if (rc < dev->ckdtrksz) { /* Handle read error condition */ - devmsg (_("HHCDA033E error reading trk %d: read error: %s\n"), + logmsg (_("HHCDA033E error reading trk %d: read error: %s\n"), trk, (rc < 0 ? strerror(errno) : "unexpected end of file")); - ckd_build_sense (dev, SENSE_EC, 0, 0, - FORMAT_1, MESSAGE_0); + ckd_build_sense (dev, SENSE_EC, 0, 0, FORMAT_1, MESSAGE_0); *unitstat = CSW_CE | CSW_DE | CSW_UC; + dev->bufcur = dev->cache = -1; + cache_lock(CACHE_DEVBUF); + cache_release(CACHE_DEVBUF, o, 0); + cache_unlock(CACHE_DEVBUF); return -1; } /* Validate the track header */ - DEVTRACE ("HHCDA034I read trk %d trkhdr %2.2x %2.2x%2.2x %2.2x%2.2x\n", + DEVTRACE (_("HHCDA034I read trk %d trkhdr %2.2x %2.2x%2.2x %2.2x%2.2x\n"), trk, dev->buf[0], dev->buf[1], dev->buf[2], dev->buf[3], dev->buf[4]); trkhdr = (CKDDASD_TRKHDR *)dev->buf; if ((trkhdr->bin != 0 @@ -869,27 +923,38 @@ CKDDASD_TRKHDR *trkhdr; /* -> New track header */ || trkhdr->head[1] != (head & 0xFF)) && !dev->dasdcopy) { - devmsg (_("HHCDA035E %4.4X invalid track header for cyl %d head %d " + logmsg (_("HHCDA035E %4.4X invalid track header for cyl %d head %d " " %2.2x%2.2x%2.2x%2.2x%2.2x\n"), dev->devnum, cyl, head, trkhdr->bin,trkhdr->cyl[0],trkhdr->cyl[1],trkhdr->head[0],trkhdr->head[1]); ckd_build_sense (dev, 0, SENSE1_ITF, 0, 0, 0); *unitstat = CSW_CE | CSW_DE | CSW_UC; + dev->bufcur = dev->cache = -1; + cache_lock(CACHE_DEVBUF); + cache_release(CACHE_DEVBUF, o, 0); + cache_unlock(CACHE_DEVBUF); return -1; } - dev->dasdcur = trk; + dev->cache = o; + dev->buf = cache_getbuf(CACHE_DEVBUF, dev->cache, 0); + dev->bufcur = trk; + dev->bufoff = 0; + dev->bufoffhi = dev->ckdtrksz; + dev->buflen = ckd_trklen (dev, dev->buf); + dev->bufsize = cache_getlen(CACHE_DEVBUF, dev->cache); return 0; -} /* end function ckd_read_track */ +} /* end function ckdread_read_track */ + /*-------------------------------------------------------------------*/ /* Update a track image */ /*-------------------------------------------------------------------*/ static -int ckd_update_track (DEVBLK *dev, BYTE *buf, int len, BYTE *unitstat) +int ckddasd_update_track (DEVBLK *dev, int trk, int off, + BYTE *buf, int len, BYTE *unitstat) { int rc; /* Return code */ -off_t offset; /* File offsets */ /* Immediately return if fake writing */ if (dev->ckdfakewr) @@ -904,8 +969,19 @@ off_t offset; /* File offsets */ return -1; } + /* Read the track if it's not current */ + if (trk != dev->bufcur) + { + rc = (dev->hnd->read) (dev, trk, unitstat); + if (rc < 0) + { + dev->bufcur = dev->cache = -1; + return -1; + } + } + /* Invalid track format if going past buffer end */ - if (dev->bufoff + len > dev->bufoffhi) + if (off + len > dev->bufoffhi) { ckd_build_sense (dev, 0, SENSE1_ITF, 0, 0, 0); *unitstat = CSW_CE | CSW_DE | CSW_UC; @@ -913,64 +989,50 @@ off_t offset; /* File offsets */ } /* Copy the data into the buffer */ - if (buf) memcpy (&dev->buf[dev->bufoff], buf, len); + if (buf) memcpy (dev->buf + off, buf, len); - /* Write the updated data now if lazy write turned off */ - if (dev->ckdnolazywr) - { - /* Retry if synchronous I/O and not track overflow */ - if (dev->syncio_active && !dev->ckdtrkof) - { - dev->syncio_retry = 1; - return -1; - } + /* Set low and high updated offsets */ + if (!dev->bufupd || off < dev->bufupdlo) + dev->bufupdlo = off; + if (off + len > dev->bufupdhi) + dev->bufupdhi = off + len; - offset = (off_t)(dev->ckdtrkoff + dev->bufoff); - offset = lseek (dev->fd, offset, SEEK_SET); - if (offset < 0) - { - /* Handle seek error condition */ - devmsg (_("HHCDA036E error writing trk %d: lseek error: %s\n"), - dev->dasdcur, strerror(errno)); - ckd_build_sense (dev, SENSE_EC, 0, 0, - FORMAT_1, MESSAGE_0); - *unitstat = CSW_CE | CSW_DE | CSW_UC; - return -1; - } - - /* Write the portion of the track image that was modified */ - rc = write (dev->fd, &dev->buf[dev->bufoff], len); - if (rc < len) - { - /* Handle seek error condition */ - devmsg (_("HHCDA037E error writing trk %d: write error: %s\n"), - dev->dasdcur, strerror(errno)); - ckd_build_sense (dev, SENSE_EC, 0, 0, - FORMAT_1, MESSAGE_0); - *unitstat = CSW_CE | CSW_DE | CSW_UC; - return -1; - } - } - else + /* Indicate track image has been modified */ + if (!dev->bufupd) { - /* Set low and high updated offsets */ - if (!dev->bufupd || dev->bufoff < dev->bufupdlo) - dev->bufupdlo = dev->bufoff; - if (dev->bufoff + len > dev->bufupdhi) - dev->bufupdhi = dev->bufoff + len; - - /* Indicate track image has been modified */ dev->bufupd = 1; + shared_update_notify (dev, trk); } return len; } /* end function ckd_update_track */ +/*-------------------------------------------------------------------*/ +/* CKD start/resume channel program */ +/*-------------------------------------------------------------------*/ +void ckddasd_start (DEVBLK *dev) +{ + /* Reset buffer offsets */ + dev->bufoff = 0; + dev->bufoffhi = dev->ckdtrksz; +} + +/*-------------------------------------------------------------------*/ +/* CKD end/suspend channel program */ +/*-------------------------------------------------------------------*/ +void ckddasd_end (DEVBLK *dev) +{ +BYTE unitstat; /* Unit Status */ + + /* Write the last track image if it's modified */ + ckddasd_read_track (dev, -1, &unitstat); +} + /*-------------------------------------------------------------------*/ /* Return used cylinders */ /*-------------------------------------------------------------------*/ static -int ckd_used (DEVBLK *dev) +int ckddasd_used (DEVBLK *dev) { return dev->ckdcyls; } @@ -1057,10 +1119,10 @@ static int ckd_seek ( DEVBLK *dev, int cyl, int head, { int rc; /* Return code */ - DEVTRACE("HHCDA038I seeking to cyl %d head %d\n", cyl, head); + DEVTRACE(_("HHCDA038I seeking to cyl %d head %d\n"), cyl, head); /* Read the track image */ - rc = (dev->ckdrdtrk) (dev, cyl, head, unitstat); + rc = ckd_read_cchh (dev, cyl, head, unitstat); if (rc < 0) return -1; /* Set device orientation fields */ @@ -1096,8 +1158,8 @@ int head; /* Next head for multitrack */ if (dev->ckdlcount == 0 && (dev->ckdfmask & CKDMASK_SKCTL) == CKDMASK_SKCTL_INHSMT) { - DEVTRACE("HHCDA039E MT advance error: " - "locate record %d file mask %2.2X\n", + DEVTRACE(_("HHCDA039E MT advance error: " + "locate record %d file mask %2.2X\n"), dev->ckdlcount, dev->ckdfmask); if (dev->ckdtrkof) ckd_build_sense (dev, 0, SENSE1_FP | SENSE1_IE, 0, 0, 0); @@ -1128,7 +1190,7 @@ int head; /* Next head for multitrack */ head = 0; cyl++; } - DEVTRACE("HHCDA040I MT advance to cyl %d head %d\n", cyl, head); + DEVTRACE(_("HHCDA040I MT advance to cyl %d head %d\n"), cyl, head); /* File protect error if next track is outside the limits of the device or outside the defined extent */ @@ -1180,7 +1242,7 @@ char *orient[] = {"none", "index", "count", "key", "data", "eot"}; && code != 0x9D) skipr0 = 1; - DEVTRACE ("HHCDA041I read count orientation is %s\n", + DEVTRACE (_("HHCDA041I read count orientation is %s\n"), orient[dev->ckdorient]); /* If orientation is at End-Of_Track then a multi-track advance @@ -1204,7 +1266,8 @@ char *orient[] = {"none", "index", "count", "key", "data", "eot"}; if (dev->bufoff + CKDDASD_RECHDR_SIZE >= dev->bufoffhi) { /* Handle error condition */ - devmsg (_("HHCDA042E attempt to read past end of track\n")); + logmsg (_("HHCDA042E attempt to read past end of track %d %d\n"), + dev->bufoff, dev->bufoffhi); /* Set unit check with equipment check */ ckd_build_sense (dev, SENSE_EC, 0, 0, @@ -1225,7 +1288,7 @@ char *orient[] = {"none", "index", "count", "key", "data", "eot"}; dev->ckdcurdl = (rechdr->dlen[0] << 8) + rechdr->dlen[1]; dev->ckdtrkof = (rechdr->cyl[0] == 0xFF) ? 0 : rechdr->cyl[0] >> 7; - DEVTRACE("HHCDA043I cyl %d head %d record %d kl %d dl %d of %d\n", + DEVTRACE(_("HHCDA043I cyl %d head %d record %d kl %d dl %d of %d\n"), dev->ckdcurcyl, dev->ckdcurhead, dev->ckdcurrec, dev->ckdcurkl, dev->ckdcurdl, dev->ckdtrkof); @@ -1313,7 +1376,7 @@ CKDDASD_RECHDR rechdr; /* CKD record header */ if (rc < 0) return rc; } - DEVTRACE("HHCDA044I read key %d bytes\n", dev->ckdcurkl); + DEVTRACE(_("HHCDA044I read key %d bytes\n"), dev->ckdcurkl); /* Read key field */ if (dev->ckdcurkl > 0) @@ -1321,7 +1384,7 @@ CKDDASD_RECHDR rechdr; /* CKD record header */ if (dev->bufoffhi - dev->bufoff < dev->ckdcurkl) { /* Handle error condition */ - devmsg (_("ckddasd: attempt to read past end of track\n")); + logmsg (_("ckddasd: attempt to read past end of track\n")); /* Set unit check with equipment check */ ckd_build_sense (dev, SENSE_EC, 0, 0, @@ -1363,7 +1426,7 @@ CKDDASD_RECHDR rechdr; /* Record header */ if (dev->ckdorient == CKDORIENT_COUNT) dev->bufoff += dev->ckdcurkl; - DEVTRACE("HHCDA045I read data %d bytes\n", dev->ckdcurdl); + DEVTRACE(_("HHCDA045I read data %d bytes\n"), dev->ckdcurdl); /* Read data field */ if (dev->ckdcurdl > 0) @@ -1371,7 +1434,7 @@ CKDDASD_RECHDR rechdr; /* Record header */ if (dev->bufoff + dev->ckdcurdl >= dev->bufoffhi) { /* Handle error condition */ - devmsg (_("HHCDA046E attempt to read past end of track\n")); + logmsg (_("HHCDA046E attempt to read past end of track\n")); /* Set unit check with equipment check */ ckd_build_sense (dev, SENSE_EC, 0, 0, @@ -1432,7 +1495,7 @@ int ckdlen; /* Count+key+data length */ } /* Logically erase rest of track by writing end of track marker */ - rc = (dev->ckdupdtrk) (dev, eighthexFF, 8, unitstat); + rc = (dev->hnd->write) (dev, dev->bufcur, dev->bufoff, eighthexFF, 8, unitstat); if (rc < 0) return -1; /* Return total count key and data size */ @@ -1489,20 +1552,20 @@ int ckdlen; /* Count+key+data length */ /* Pad the I/O buffer with zeroes if necessary */ while (len < ckdlen) buf[len++] = '\0'; - DEVTRACE("HHCDA047I writing cyl %d head %d record %d kl %d dl %d\n", + DEVTRACE(_("HHCDA047I writing cyl %d head %d record %d kl %d dl %d\n"), dev->ckdcurcyl, dev->ckdcurhead, recnum, keylen, datalen); /* Set track overflow flag if called for */ if (trk_ovfl) { - DEVTRACE("HHCDA048I setting track overflow flag for " - "cyl %d head %d record %d\n", + DEVTRACE(_("HHCDA048I setting track overflow flag for " + "cyl %d head %d record %d\n"), dev->ckdcurcyl, dev->ckdcurhead, recnum); buf[0] |= 0x80; } /* Write count key and data */ - rc = (dev->ckdupdtrk) (dev, buf, ckdlen, unitstat); + rc = (dev->hnd->write) (dev, dev->bufcur, dev->bufoff, buf, ckdlen, unitstat); if (rc < 0) return -1; dev->bufoff += ckdlen; @@ -1513,7 +1576,7 @@ int ckdlen; /* Count+key+data length */ } /* Logically erase rest of track by writing end of track marker */ - rc = (dev->ckdupdtrk) (dev, eighthexFF, 8, unitstat); + rc = (dev->hnd->write) (dev, dev->bufcur, dev->bufoff, eighthexFF, 8, unitstat); if (rc < 0) return -1; /* Set the device orientation fields */ @@ -1540,7 +1603,7 @@ int kdlen; /* Key+data length */ /* Unit check if not oriented to count area */ if (dev->ckdorient != CKDORIENT_COUNT) { - devmsg (_("HHCDA049E Write KD orientation error\n")); + logmsg (_("HHCDA049E Write KD orientation error\n")); ckd_build_sense (dev, SENSE_CR, 0, 0, FORMAT_0, MESSAGE_2); *unitstat = CSW_CE | CSW_DE | CSW_UC; @@ -1553,12 +1616,12 @@ int kdlen; /* Key+data length */ /* Pad the I/O buffer with zeroes if necessary */ while (len < kdlen) buf[len++] = '\0'; - DEVTRACE("HHCDA050I updating cyl %d head %d record %d kl %d dl %d\n", + DEVTRACE(_("HHCDA050I updating cyl %d head %d record %d kl %d dl %d\n"), dev->ckdcurcyl, dev->ckdcurhead, dev->ckdcurrec, dev->ckdcurkl, dev->ckdcurdl); /* Write key and data */ - rc = (dev->ckdupdtrk) (dev, buf, kdlen, unitstat); + rc = (dev->hnd->write) (dev, dev->bufcur, dev->bufoff, buf, kdlen, unitstat); if (rc < 0) return -1; dev->bufoff += kdlen; @@ -1582,7 +1645,7 @@ int rc; /* Return code */ if (dev->ckdorient != CKDORIENT_COUNT && dev->ckdorient != CKDORIENT_KEY) { - devmsg (_("HHCDA051E Write data orientation error\n")); + logmsg (_("HHCDA051E Write data orientation error\n")); ckd_build_sense (dev, SENSE_CR, 0, 0, FORMAT_0, MESSAGE_2); *unitstat = CSW_CE | CSW_DE | CSW_UC; @@ -1596,12 +1659,12 @@ int rc; /* Return code */ /* Pad the I/O buffer with zeroes if necessary */ while (len < dev->ckdcurdl) buf[len++] = '\0'; - DEVTRACE("HHCDA052I updating cyl %d head %d record %d dl %d\n", + DEVTRACE(_("HHCDA052I updating cyl %d head %d record %d dl %d\n"), dev->ckdcurcyl, dev->ckdcurhead, dev->ckdcurrec, dev->ckdcurdl); /* Write data */ - rc = (dev->ckdupdtrk) (dev, buf, dev->ckdcurdl, unitstat); + rc = (dev->hnd->write) (dev, dev->bufcur, dev->bufoff, buf, dev->ckdcurdl, unitstat); if (rc < 0) return -1; dev->bufoff += dev->ckdcurdl; @@ -1655,7 +1718,7 @@ BYTE trk_ovfl; /* == 1 if track ovfl write */ && (code & 0x7F) != 0x16 && (code & 0x7F) != 0x12 && (code & 0x7F) != 0x0E && (code & 0x7F) != 0x06) { - devmsg(_("HHCDA053E Data chaining not supported for CCW %2.2X\n"), + logmsg(_("HHCDA053E Data chaining not supported for CCW %2.2X\n"), code); ckd_build_sense (dev, SENSE_CR, 0, 0, FORMAT_0, MESSAGE_1); @@ -1682,8 +1745,10 @@ BYTE trk_ovfl; /* == 1 if track ovfl write */ dev->ckdwckd = 0; dev->ckdlcount = 0; dev->ckdtrkof = 0; + /* ISW20030819-1 : Clear Write HA flag */ + dev->ckdwrha = 0; } - else dev->syncio_retry = 0; + dev->syncio_retry = 0; /* Reset index marker flag if sense or control command, or any write command (other search ID or search key), @@ -2262,6 +2327,8 @@ BYTE trk_ovfl; /* == 1 if track ovfl write */ num = (count < size) ? count : size; /* FIXME: what devices want 5 bytes, what ones want 7, and what ones want 11? Do this right when we figure that out */ + /* ISW20030819-1 Indicate WRHA performed */ + dev->ckdwrha=1; *residual = 0; /* Return normal status */ @@ -2774,7 +2841,7 @@ BYTE trk_ovfl; /* == 1 if track ovfl write */ /* Extract the file mask from the I/O buffer */ dev->ckdfmask = iobuf[0]; - DEVTRACE("HHCDA054I set file mask %2.2X\n", dev->ckdfmask); + DEVTRACE(_("HHCDA054I set file mask %2.2X\n"), dev->ckdfmask); /* Command reject if file mask is invalid */ if ((dev->ckdfmask & CKDMASK_RESV) != 0) @@ -2942,7 +3009,7 @@ BYTE trk_ovfl; /* == 1 if track ovfl write */ for (i=0; i < (ssize_t)sizeof(module)-1 && i < num; i++) module[i] = guest_to_host(iobuf[i]); module[i] = '\0'; - devmsg (_("HHCDA055I search key %s\n"), module); + logmsg (_("HHCDA055I search key %s\n"), module); } #endif /*OPTION_CKD_KEY_TRACING*/ @@ -3547,6 +3614,7 @@ BYTE trk_ovfl; /* == 1 if track ovfl write */ ckd_build_sense (dev, SENSE_CR, 0, 0, FORMAT_0, MESSAGE_2); *unitstat = CSW_CE | CSW_DE | CSW_UC; + logmsg("DEBUG : WR0 OUTSIDE PACK\n"); break; } @@ -3554,11 +3622,13 @@ BYTE trk_ovfl; /* == 1 if track ovfl write */ and not preceded by either a Search Home Address that compared equal on all 4 bytes, or a Write Home Address not within the domain of a Locate Record */ - if (dev->ckdlcount == 0 && dev->ckdhaeq == 0) + /* ISW20030819-1 : Added check for previously issued WRHA */ + if (dev->ckdlcount == 0 && dev->ckdhaeq == 0 && dev->ckdwrha==0) { ckd_build_sense (dev, SENSE_CR, 0, 0, FORMAT_0, MESSAGE_2); *unitstat = CSW_CE | CSW_DE | CSW_UC; + logmsg("DEBUG : WR0 CASE 2\n"); break; } @@ -3568,6 +3638,7 @@ BYTE trk_ovfl; /* == 1 if track ovfl write */ ckd_build_sense (dev, SENSE_CR, 0, 0, FORMAT_0, MESSAGE_2); *unitstat = CSW_CE | CSW_DE | CSW_UC; + logmsg("DEBUG : WR0 BAD FM\n"); break; } @@ -3584,6 +3655,7 @@ BYTE trk_ovfl; /* == 1 if track ovfl write */ ckd_build_sense (dev, SENSE_CR, 0, 0, FORMAT_0, MESSAGE_2); *unitstat = CSW_CE | CSW_DE | CSW_UC; + logmsg("DEBUG : LOC REC 2\n"); break; } } @@ -4247,6 +4319,13 @@ BYTE trk_ovfl; /* == 1 if track ovfl write */ break; } + /* Call the release exit and mark the device not reserved */ + if (dev->hnd->release) (dev->hnd->release) (dev); + + obtain_lock (&dev->lock); + dev->reserved = 0; + release_lock (&dev->lock); + /* Perform the operation of a sense command */ goto sense; @@ -4255,13 +4334,6 @@ BYTE trk_ovfl; /* == 1 if track ovfl write */ /*---------------------------------------------------------------*/ /* DEVICE RESERVE */ /*---------------------------------------------------------------*/ - /* If synchronous I/O then retry asynchronously */ - if (dev->syncio_active) - { - dev->syncio_retry = 1; - break; - } - /* Command reject if within the domain of a Locate Record, or indeed if preceded by any command at all apart from Suspend Multipath Reconnection */ @@ -4275,6 +4347,14 @@ BYTE trk_ovfl; /* == 1 if track ovfl write */ break; } + /* Mark the device reserved and call the reserve exit */ + + obtain_lock (&dev->lock); + dev->reserved = 1; + release_lock (&dev->lock); + + if (dev->hnd->reserve) (dev->hnd->reserve) (dev); + /* Perform the operation of a sense command */ goto sense; @@ -4447,12 +4527,12 @@ BYTE trk_ovfl; /* == 1 if track ovfl write */ } /* Calculate residual byte count */ - num = (count < 24) ? count : 24; + num = (count < 32) ? count : 32; *residual = count - num; - if (count < 24) *more = 1; + if (count < 32) *more = 1; /* Build the buffered error log in the I/O area */ - memset (iobuf, 0x00, 24); + memset (iobuf, 0x00, 32); /* Return unit status */ *unitstat = CSW_CE | CSW_DE; @@ -4595,5 +4675,13 @@ DEVHND ckddasd_device_hndinfo = { &ckddasd_execute_ccw, &ckddasd_close_device, &ckddasd_query_device, - NULL, NULL, NULL, NULL + &ckddasd_start, + &ckddasd_end, + &ckddasd_start, + &ckddasd_end, + &ckddasd_read_track, + &ckddasd_update_track, + &ckddasd_used, + NULL, + NULL }; diff --git a/cmpsc.c b/cmpsc.c index 94f4586..ff6ca81 100644 --- a/cmpsc.c +++ b/cmpsc.c @@ -24,7 +24,7 @@ /* 0x01: Debug compression */ /* 0x02: Debug expansion */ /*----------------------------------------------------------------------------*/ -//#define OPTION_CMPSC_DEBUGLVL 3 /* Debug all */ +//#define OPTION_CMPSC_DEBUGLVL 3 /* Debug all */ /******************************************************************************/ /******************************************************************************/ @@ -43,12 +43,12 @@ /* x(i) : examine child bit for children 1 to 5 */ /* y(i) : examine child bit for 6th/13th and 7th/14th sibling */ /*----------------------------------------------------------------------------*/ -#define CCE_act(cce) (SBITS((cce), 8, 10)) -#define CCE_cct(cce) (SBITS((cce), 0, 2)) -#define CCE_cptr(cce) ((SBITS((cce), 11, 15) << 8) | (cce)[2]) -#define CCE_d(cce) (SBIT((cce), 10)) -#define CCE_x(cce, i) (SBIT((cce), (i) + 3)) -#define CCE_y(cce, i) (SBIT((cce), (i) + 8)) +#define CCE_act(cce) (SBITS((cce), 8, 10)) +#define CCE_cct(cce) (SBITS((cce), 0, 2)) +#define CCE_cptr(cce) ((SBITS((cce), 11, 15) << 8) | (cce)[2]) +#define CCE_d(cce) (SBIT((cce), 10)) +#define CCE_x(cce, i) (SBIT((cce), (i) + 3)) +#define CCE_y(cce, i) (SBIT((cce), (i) + 8)) /*----------------------------------------------------------------------------*/ /* Expansion Character Entry macro's (ECE) */ @@ -58,10 +58,10 @@ /* pptr : predecessor pointer */ /* psl : partial symbol length */ /*----------------------------------------------------------------------------*/ -#define ECE_csl(ece) (SBITS((ece), 5, 7)) -#define ECE_ofst(ece) ((ece)[7]) -#define ECE_pptr(ece) ((SBITS((ece), 3, 7) << 8) | ((ece)[1])) -#define ECE_psl(ece) (SBITS((ece), 0, 2)) +#define ECE_csl(ece) (SBITS((ece), 5, 7)) +#define ECE_ofst(ece) ((ece)[7]) +#define ECE_pptr(ece) ((SBITS((ece), 3, 7) << 8) | ((ece)[1])) +#define ECE_psl(ece) (SBITS((ece), 0, 2)) /*----------------------------------------------------------------------------*/ /* General Purpose Register 0 macro's (GR0) */ @@ -71,10 +71,10 @@ /* f1 : format-1 sibling descriptors */ /* st : symbol-translation option */ /*----------------------------------------------------------------------------*/ -#define GR0_cdss(regs) (((regs)->GR_L(0) & 0x0000F000) >> 12) -#define GR0_e(regs) (((regs)->GR_L(0) & 0x00000100) ? TRUE : FALSE) -#define GR0_f1(regs) (((regs)->GR_L(0) & 0x00000200) ? TRUE : FALSE) -#define GR0_st(regs) (((regs)->GR_L(0) & 0x00010000) ? TRUE : FALSE) +#define GR0_cdss(regs) (((regs)->GR_L(0) & 0x0000F000) >> 12) +#define GR0_e(regs) (((regs)->GR_L(0) & 0x00000100) ? TRUE : FALSE) +#define GR0_f1(regs) (((regs)->GR_L(0) & 0x00000200) ? TRUE : FALSE) +#define GR0_st(regs) (((regs)->GR_L(0) & 0x00010000) ? TRUE : FALSE) /*----------------------------------------------------------------------------*/ /* General Purpose Register 1 macro's (GR1) */ @@ -83,9 +83,9 @@ /* dictor: compression dictionary or expansion dictionary */ /* sttoff: symbol-translation-table offset */ /*----------------------------------------------------------------------------*/ -#define GR1_cbn(regs) (((regs)->GR_L(1) & 0x00000007)) -#define GR1_dictor(regs) (GR_A(1, regs) & ((GREG) 0xFFFFFFFFFFFFF000ULL)) -#define GR1_sttoff(regs) (((regs)->GR_L(1) & 0x00000FF8) << 4) +#define GR1_cbn(regs) (((regs)->GR_L(1) & 0x00000007)) +#define GR1_dictor(regs) (GR_A(1, regs) & ((GREG) 0xFFFFFFFFFFFFF000ULL)) +#define GR1_sttoff(regs) (((regs)->GR_L(1) & 0x00000FF8) << 4) /*----------------------------------------------------------------------------*/ /* Format-0 Sibling Descriptors macro's (SD0) */ @@ -93,8 +93,8 @@ /* sct : sibling count */ /* y(i) : examine child bit for siblings 1 to 5 */ /*----------------------------------------------------------------------------*/ -#define SD0_sct(sd0) (SBITS((sd0), 0, 2)) -#define SD0_y(sd0, i) (SBIT((sd0), (i) + 3)) +#define SD0_sct(sd0) (SBITS((sd0), 0, 2)) +#define SD0_y(sd0, i) (SBIT((sd0), (i) + 3)) /*----------------------------------------------------------------------------*/ /* Format-1 Sibling Descriptors macro's (SD1) */ @@ -102,8 +102,8 @@ /* sct : sibling count */ /* y(i) : examine child bit for sibling 1 to 12 */ /*----------------------------------------------------------------------------*/ -#define SD1_sct(sd1) (SBITS((sd1), 0, 3)) -#define SD1_y(sd1, i) (SBIT((sd1), (i) + 4)) +#define SD1_sct(sd1) (SBITS((sd1), 0, 3)) +#define SD1_y(sd1, i) (SBIT((sd1), (i) + 4)) /******************************************************************************/ /******************************************************************************/ @@ -122,12 +122,12 @@ /* ecs : number of additional extension characters */ /* mcc : indication if siblings follow child characters */ /*----------------------------------------------------------------------------*/ -#define CCE_cc(cce, i) ((&(&(cce)[3])[CCE_ecs((cce))])[(i)]) -#define CCE_ccc(cce, i) (CCE_cc((cce), (i)) == CCE_cc((cce), 0) ? TRUE : FALSE) -#define CCE_ccs(cce) (CCE_cct((cce)) - CCE_mcc((cce))) -#define CCE_ec(cce, i) ((&(cce)[3])[(i)]) -#define CCE_ecs(cce) ((CCE_cct((cce)) <= 1) ? CCE_act((cce)) : CCE_d((cce))) -#define CCE_mcc(cce) ((CCE_cct((cce)) + CCE_d((cce)) == 6) ? TRUE : FALSE) +#define CCE_cc(cce, i) ((&(&(cce)[3])[CCE_ecs((cce))])[(i)]) +#define CCE_ccc(cce, i) (CCE_cc((cce), (i)) == CCE_cc((cce), 0) ? TRUE : FALSE) +#define CCE_ccs(cce) (CCE_cct((cce)) - CCE_mcc((cce))) +#define CCE_ec(cce, i) ((&(cce)[3])[(i)]) +#define CCE_ecs(cce) ((CCE_cct((cce)) <= 1) ? CCE_act((cce)) : CCE_d((cce))) +#define CCE_mcc(cce) ((CCE_cct((cce)) + CCE_d((cce)) == 6) ? TRUE : FALSE) /*----------------------------------------------------------------------------*/ /* Expansion Character Entry macro's (ECE) */ @@ -135,8 +135,8 @@ /* ec : address of first extension character */ /* upr : indication wheter entry is unpreceeded */ /*----------------------------------------------------------------------------*/ -#define ECE_ec(ece) (ECE_upr((ece)) ? &(ece)[1] : &(ece)[2]) -#define ECE_upr(ece) (ECE_psl((ece)) ? FALSE : TRUE) +#define ECE_ec(ece) (ECE_upr((ece)) ? &(ece)[1] : &(ece)[2]) +#define ECE_upr(ece) (ECE_psl((ece)) ? FALSE : TRUE) /*----------------------------------------------------------------------------*/ /* General Purpose Register 0 macro's (GR0) */ @@ -144,8 +144,8 @@ /* dctsz : dictionary size */ /* smbsz : symbol size */ /*----------------------------------------------------------------------------*/ -#define GR0_dctsz(regs) (0x800 << GR0_cdss((regs))) -#define GR0_smbsz(regs) (GR0_cdss((regs)) + 8) +#define GR0_dctsz(regs) (0x800 << GR0_cdss((regs))) +#define GR0_smbsz(regs) (GR0_cdss((regs)) + 8) /*----------------------------------------------------------------------------*/ /* Format-0 Sibling Descriptors macro's (SD0) */ @@ -156,11 +156,11 @@ /* sc(i) : sibling character */ /* scs : number of sibling characters */ /*----------------------------------------------------------------------------*/ -#define SD0_ccc(sd0, i) (SD0_sc((sd0), (i)) == SD0_sc((sd0), 0) ? TRUE : FALSE) -#define SD0_ecb(sd0, i, cce, y) (((i) < 5) ? SD0_y((sd0), (i)) : (y) ? CCE_y((cce), ((i) - 5)) : TRUE) -#define SD0_msc(sd0) (SD0_sct((sd0)) ? FALSE : TRUE) -#define SD0_sc(sd0, i) ((&(sd0)[1])[(i)]) -#define SD0_scs(sd0) (SD0_msc((sd0)) ? 7 : SD0_sct((sd0))) +#define SD0_ccc(sd0, i) (SD0_sc((sd0), (i)) == SD0_sc((sd0), 0) ? TRUE : FALSE) +#define SD0_ecb(sd0, i, cce, y) (((i) < 5) ? SD0_y((sd0), (i)) : (y) ? CCE_y((cce), ((i) - 5)) : TRUE) +#define SD0_msc(sd0) (SD0_sct((sd0)) ? FALSE : TRUE) +#define SD0_sc(sd0, i) ((&(sd0)[1])[(i)]) +#define SD0_scs(sd0) (SD0_msc((sd0)) ? 7 : SD0_sct((sd0))) /*----------------------------------------------------------------------------*/ /* Format-1 Sibling Descriptors macro's (SD1) */ @@ -171,20 +171,20 @@ /* sc(i) : sibling character */ /* scs : number of sibling characters */ /*----------------------------------------------------------------------------*/ -#define SD1_ccc(sd1, i) (SD1_sc((sd1), (i)) == SD1_sc((sd1), 0) ? TRUE : FALSE) -#define SD1_ecb(sd1, i, cce, y) (((i) < 12) ? SD1_y((sd1), (i)) : (y) ? CCE_y((cce), ((i) - 12)) : TRUE) -#define SD1_msc(sd1) ((SD1_sct((sd1)) == 15) ? TRUE : FALSE) -#define SD1_sc(sd1,i) ((&(sd1)[2])[(i)]) -#define SD1_scs(sd1) (SD1_msc((sd1)) ? 14 : SD1_sct((sd1))) +#define SD1_ccc(sd1, i) (SD1_sc((sd1), (i)) == SD1_sc((sd1), 0) ? TRUE : FALSE) +#define SD1_ecb(sd1, i, cce, y) (((i) < 12) ? SD1_y((sd1), (i)) : (y) ? CCE_y((cce), ((i) - 12)) : TRUE) +#define SD1_msc(sd1) ((SD1_sct((sd1)) == 15) ? TRUE : FALSE) +#define SD1_sc(sd1,i) ((&(sd1)[2])[(i)]) +#define SD1_scs(sd1) (SD1_msc((sd1)) ? 14 : SD1_sct((sd1))) /*----------------------------------------------------------------------------*/ /* Format independent sibling descriptor macro's */ /*----------------------------------------------------------------------------*/ -#define SD_ccc(regs, sd, i) (GR0_f1((regs)) ? SD1_ccc((sd), (i)) : SD0_ccc((sd), (i))) +#define SD_ccc(regs, sd, i) (GR0_f1((regs)) ? SD1_ccc((sd), (i)) : SD0_ccc((sd), (i))) #define SD_ecb(regs, sd, i, cce, y) (GR0_f1((regs)) ? SD1_ecb((sd), (i), (cce), (y)) : SD0_ecb((sd), (i), (cce), (y))) -#define SD_msc(regs, sd) (GR0_f1((regs)) ? SD1_msc((sd)) : SD0_msc((sd))) -#define SD_sc(regs, sd, i) (GR0_f1((regs)) ? SD1_sc((sd), (i)) : SD0_sc((sd), (i))) -#define SD_scs(regs, sd) (GR0_f1((regs)) ? SD1_scs((sd)) : SD0_scs((sd))) +#define SD_msc(regs, sd) (GR0_f1((regs)) ? SD1_msc((sd)) : SD0_msc((sd))) +#define SD_sc(regs, sd, i) (GR0_f1((regs)) ? SD1_sc((sd), (i)) : SD0_sc((sd), (i))) +#define SD_scs(regs, sd) (GR0_f1((regs)) ? SD1_scs((sd)) : SD0_scs((sd))) /******************************************************************************/ /******************************************************************************/ @@ -200,10 +200,10 @@ /* SBIT : return bit in bytes */ /* SBITS : return bits in bytes (bits must be in one byte!) */ /*----------------------------------------------------------------------------*/ -#define BIT(byte, bit) ((byte) & (0x80 >> (bit)) ? TRUE : FALSE) -#define BITS(byte, start, end) (((BYTE)((byte) << (start))) >> (7 - (end) + (start))) -#define SBIT(bytes, bit) (BIT((bytes)[(bit) / 8], (bit) % 8)) -#define SBITS(bytes, strt, end) (BITS((bytes)[(strt) / 8], (strt) % 8, (end) % 8)) +#define BIT(byte, bit) ((byte) & (0x80 >> (bit)) ? TRUE : FALSE) +#define BITS(byte, start, end) (((BYTE)((byte) << (start))) >> (7 - (end) + (start))) +#define SBIT(bytes, bit) (BIT((bytes)[(bit) / 8], (bit) % 8)) +#define SBITS(bytes, strt, end) (BITS((bytes)[(strt) / 8], (strt) % 8, (end) % 8)) /******************************************************************************/ /******************************************************************************/ @@ -214,7 +214,7 @@ /*----------------------------------------------------------------------------*/ /* The next macro sets the compressed bit number in GR1 */ /*----------------------------------------------------------------------------*/ -#define GR1_setcbn(regs, cbn) ((regs)->GR_L(1) = ((regs)->GR_L(1) & 0xFFFFFFF8) | ((cbn) & 0x00000007)) +#define GR1_setcbn(regs, cbn) ((regs)->GR_L(1) = ((regs)->GR_L(1) & 0xFFFFFFF8) | ((cbn) & 0x00000007)) /*----------------------------------------------------------------------------*/ /* After a succesful compression of characters to an index symbol or a */ @@ -252,10 +252,10 @@ /* function print_cce. */ /*----------------------------------------------------------------------------*/ #if defined(OPTION_CMPSC_DEBUGLVL) && OPTION_CMPSC_DEBUGLVL & 1 -#define FETCH_CCE ARCH_DEP(print_cce) +#define FETCH_CCE ARCH_DEP(print_cce) static void ARCH_DEP(print_cce)(int r2, REGS *regs, BYTE *cce, int index); #else -#define FETCH_CCE _FETCH_CCE +#define FETCH_CCE _FETCH_CCE #endif #define _FETCH_CCE(r2, regs, cce, index) \ ARCH_DEP(vfetchc)((cce), 7, (GR1_dictor((regs)) + (index) * 8) & ADDRESS_MAXWRAP((regs)), (r2), (regs)) @@ -266,10 +266,10 @@ static void ARCH_DEP(print_cce)(int r2, REGS *regs, BYTE *cce, int index); /* function print_ece. */ /*----------------------------------------------------------------------------*/ #if defined(OPTION_CMPSC_DEBUGLVL) && OPTION_CMPSC_DEBUGLVL & 2 -#define FETCH_ECE ARCH_DEP(print_ece) +#define FETCH_ECE ARCH_DEP(print_ece) static void ARCH_DEP(print_ece)(int r2, REGS *regs, BYTE *ece, int index); #else -#define FETCH_ECE _FETCH_ECE +#define FETCH_ECE _FETCH_ECE #endif #define _FETCH_ECE(r2, regs, cce, index) \ ARCH_DEP(vfetchc)((ece), 7, (GR1_dictor((regs)) + (index) * 8) & ADDRESS_MAXWRAP((regs)), (r2), (regs)) @@ -279,10 +279,10 @@ static void ARCH_DEP(print_ece)(int r2, REGS *regs, BYTE *ece, int index); /* directly do a vfetchc. But in debugging mode we call function print_sd. */ /*----------------------------------------------------------------------------*/ #if defined(OPTION_CMPSC_DEBUGLVL) && OPTION_CMPSC_DEBUGLVL & 1 -#define FETCH_SD ARCH_DEP(print_sd) +#define FETCH_SD ARCH_DEP(print_sd) static void ARCH_DEP(print_sd)(int r2, REGS *regs, BYTE *sd, int index); #else -#define FETCH_SD _FETCH_SD +#define FETCH_SD _FETCH_SD #endif #define _FETCH_SD(r2, regs, sd, index) \ { \ @@ -315,16 +315,16 @@ static void ARCH_DEP(print_sd)(int r2, REGS *regs, BYTE *sd, int index); /* Constants */ /*----------------------------------------------------------------------------*/ #if !defined(BOOL) -#define BOOL BYTE +#define BOOL BYTE #endif /* !defined(BOOL) */ #if !defined(FALSE) -#define FALSE 0 +#define FALSE 0 #endif /* !defined(TRUE) */ -#define PROCESS_MAX 4096 /* CPU-determined amount of data */ +#define PROCESS_MAX 4096 /* CPU-determined amount of data */ #if !defined(TRUE) -#define TRUE !FALSE +#define TRUE !FALSE #endif /* !defined(FALSE) */ -#define TRUEFALSE(boolean) ((boolean) ? "True" : "False") +#define TRUEFALSE(boolean) ((boolean) ? "True" : "False") /*----------------------------------------------------------------------------*/ /* Compression status enumeration for communicating between compress and */ @@ -365,11 +365,11 @@ static int ARCH_DEP(test_ec)(int r2, REGS *regs, REGS *iregs, BYTE *cce); /*----------------------------------------------------------------------------*/ static void ARCH_DEP(compress)(int r1, int r2, REGS *regs, REGS *iregs) { - BYTE cce[8]; /* compression character entry */ - BOOL eos; /* indication end of source */ - U16 last_match; /* Last matched index symbol */ - BYTE next_ch; /* next character read */ - int xlated; /* number of bytes processed */ + BYTE cce[8]; /* compression character entry */ + BOOL eos; /* indication end of source */ + U16 last_match; /* Last matched index symbol */ + BYTE next_ch; /* next character read */ + int xlated; /* number of bytes processed */ /* Initialize end of source */ eos = FALSE; @@ -403,27 +403,27 @@ static void ARCH_DEP(compress)(int r1, int r2, REGS *regs, REGS *iregs) /* Try to find a child in compression character entry */ switch(ARCH_DEP(search_cce)(r2, regs, iregs, cce, &next_ch, &last_match)) - { - case parent_found: - continue; + { + case parent_found: + continue; - case search_siblings: + case search_siblings: /* Try to find a child in the sibling descriptors */ if(ARCH_DEP(search_sd)(r2, regs, iregs, cce, &next_ch, &last_match) == parent_found) continue; - break; + break; - case end_of_source: + case end_of_source: eos = TRUE; break; - default: - break; - } + default: + break; + } - /* No parent found, write index symbol */ - break; + /* No parent found, write index symbol */ + break; } /* Write the last match, this can be the alphabet entry */ @@ -446,13 +446,13 @@ static void ARCH_DEP(compress)(int r1, int r2, REGS *regs, REGS *iregs) /*----------------------------------------------------------------------------*/ static void ARCH_DEP(expand)(int r1, int r2, REGS *regs, REGS *iregs) { - BYTE byte; /* a byte */ - U16 index_symbol; /* Index symbol */ - BYTE ece[8]; /* Expansion Character Entry */ - int entries; /* Entries processed */ - U16 pptr; /* predecessor pointer */ - int written; /* Childs written */ - int xlated; /* number of bytes generated */ + BYTE byte; /* a byte */ + U16 index_symbol; /* Index symbol */ + BYTE ece[8]; /* Expansion Character Entry */ + int entries; /* Entries processed */ + U16 pptr; /* predecessor pointer */ + int written; /* Childs written */ + int xlated; /* number of bytes generated */ /* Try to generate the CPU-determined amount of data */ xlated = 0; @@ -764,8 +764,8 @@ static void ARCH_DEP(print_sd)(int r2, REGS *regs, BYTE *sd, int index) /*----------------------------------------------------------------------------*/ static enum cmpsc_status ARCH_DEP(search_cce)(int r2, REGS *regs, REGS *iregs, BYTE *cce, BYTE *next_ch, U16 *last_match) { - BYTE ccce[8]; /* child compression character entry */ - int i; /* child character index */ + BYTE ccce[8]; /* child compression character entry */ + int i; /* child character index */ BOOL search_siblings; search_siblings = TRUE; @@ -832,12 +832,12 @@ static enum cmpsc_status ARCH_DEP(search_cce)(int r2, REGS *regs, REGS *iregs, B /*----------------------------------------------------------------------------*/ static enum cmpsc_status ARCH_DEP(search_sd)(int r2, REGS *regs, REGS *iregs, BYTE *cce, BYTE *next_ch, U16 *last_match) { - BYTE ccce[8]; /* child compression character entry */ - int i; /* sibling character index */ - BYTE sd[16]; /* sibling descriptor format-0 and format-1 */ - int sd_ptr; /* pointer to sibling descriptor */ - int searched; /* number of children searched */ - BOOL y_in_parent; /* indicator if y bits are in parent */ + BYTE ccce[8]; /* child compression character entry */ + int i; /* sibling character index */ + BYTE sd[16]; /* sibling descriptor format-0 and format-1 */ + int sd_ptr; /* pointer to sibling descriptor */ + int searched; /* number of children searched */ + BOOL y_in_parent; /* indicator if y bits are in parent */ BOOL search_siblings; search_siblings = TRUE; @@ -933,7 +933,7 @@ static int ARCH_DEP(store_ch)(int r1, REGS *regs, REGS *iregs, BYTE *data, int l { /* Check destination size */ - if(GR_A(r1 + 1, iregs) < length + (U32) offset) + if(GR_A(r1 + 1, iregs) < length + (U32) offset -1) { #if defined(OPTION_CMPSC_DEBUGLVL) && OPTION_CMPSC_DEBUGLVL & 2 @@ -967,10 +967,10 @@ static int ARCH_DEP(store_ch)(int r1, REGS *regs, REGS *iregs, BYTE *data, int l /*----------------------------------------------------------------------------*/ static void ARCH_DEP(store_is)(int r1, int r2, REGS *regs, REGS *iregs, U16 index_symbol) { - U32 clear_mask; /* mask to clear the bits */ - U32 set_mask; /* mask to set the bits */ - int threebytes; /* indicates 2 or 3 bytes overlap */ - BYTE work[3]; /* work bytes */ + U32 clear_mask; /* mask to clear the bits */ + U32 set_mask; /* mask to set the bits */ + int threebytes; /* indicates 2 or 3 bytes overlap */ + BYTE work[3]; /* work bytes */ /* Check if symbol translation is requested */ if(GR0_st(regs)) @@ -1054,7 +1054,7 @@ static int ARCH_DEP(test_ec)(int r2, REGS *regs, REGS *iregs, BYTE *cce) /*----------------------------------------------------------------------------*/ DEF_INST(compression_call) { - REGS iregs; /* Intermediate registers */ + REGS iregs; /* Intermediate registers */ int r1; int r2; @@ -1088,10 +1088,10 @@ DEF_INST(compression_call) /* Initialize itermediate registers using COMMITREGS the other way round */ COMMITREGS(&iregs, regs, r1, r2); -#if (_GEN_ARCH == _ARCHMODE3) +#if (__GEN_ARCH == 900) /* In z/Archtecture we need the 64bit flag */ iregs.psw.amode64 = regs->psw.amode64; -#endif /* (_GEN_ARCH == _ARCHMODE3) */ +#endif /* (__GEN_ARCH == 900) */ /* Now go to the requested function */ if(GR0_e(regs)) diff --git a/codepage.c b/codepage.c index 63bad06..6a91278 100644 --- a/codepage.c +++ b/codepage.c @@ -3,8 +3,12 @@ #include "hercules.h" +#if defined(HAVE_ICONV) + #include +#endif /*defined(HAVE_ICONV)*/ -unsigned char + +static unsigned char ascii_to_ebcdic[] = { "\x00\x01\x02\x03\x37\x2D\x2E\x2F\x16\x05\x25\x0B\x0C\x0D\x0E\x0F" "\x10\x11\x12\x13\x3C\x3D\x32\x26\x18\x19\x1A\x27\x22\x1D\x35\x1F" @@ -25,7 +29,7 @@ ascii_to_ebcdic[] = { }; -unsigned char +static unsigned char ebcdic_to_ascii[] = { "\x00\x01\x02\x03\xA6\x09\xA7\x7F\xA9\xB0\xB1\x0B\x0C\x0D\x0E\x0F" "\x10\x11\x12\x13\xB2\x0A\x08\xB7\x18\x19\x1A\xB8\xBA\x1D\xBB\x1F" @@ -46,7 +50,7 @@ ebcdic_to_ascii[] = { }; -unsigned char +static unsigned char cp_437_to_037[] = { "\x00\x01\x02\x03\x37\x2D\x2E\x2F\x16\x05\x15\x0B\x0C\x0D\x0E\x0F" "\x10\x11\x12\x13\x3C\x3D\x32\x26\x18\x19\x3F\x27\x22\x1D\x1E\x1F" @@ -67,7 +71,7 @@ cp_437_to_037[] = { }; -unsigned char +static unsigned char cp_037_to_437[] = { "\x00\x01\x02\x03\x07\x09\x07\x7F\x07\x07\x07\x0B\x0C\x0D\x0E\x0F" "\x10\x11\x12\x13\x07\x0A\x08\x07\x18\x19\x07\x07\x07\x07\x07\x07" @@ -88,7 +92,7 @@ cp_037_to_437[] = { }; -unsigned char +static unsigned char cp_437_to_500[] = { "\x00\x01\x02\x03\x37\x2D\x2E\x2F\x16\x05\x15\x0B\x0C\x0D\x0E\x0F" "\x10\x11\x12\x13\x3C\x3D\x32\x26\x18\x19\x3F\x27\x22\x1D\x1E\x1F" @@ -109,7 +113,7 @@ cp_437_to_500[] = { }; -unsigned char +static unsigned char cp_500_to_437[] = { "\x00\x01\x02\x03\x07\x09\x07\x7F\x07\x07\x07\x0B\x0C\x0D\x0E\x0F" "\x10\x11\x12\x13\x07\x0A\x08\x07\x18\x19\x07\x07\x07\x07\x07\x07" @@ -129,7 +133,8 @@ cp_500_to_437[] = { "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x07\x07\x9A\x07\x07\x07" }; -unsigned char + +static unsigned char cp_850_to_273[] = { "\x00\x01\x02\x03\x37\x2D\x2E\x2F\x16\x05\x25\x0B\x0C\x0D\x0E\x0F" "\x10\x11\x12\x13\x3C\x3D\x32\x26\x18\x19\x3F\x27\x1C\x1D\x1E\x1F" @@ -149,7 +154,8 @@ cp_850_to_273[] = { "\xCA\x8F\x1B\xB9\xB6\x7C\xE1\x9D\x90\xBD\xB3\xDA\xFA\xEA\x3E\x41" }; -unsigned char + +static unsigned char cp_273_to_850[] = { "\x00\x01\x02\x03\xDC\x09\xC3\x7F\xCA\xB2\xD5\x0B\x0C\x0D\x0E\x0F" "\x10\x11\x12\x13\xDB\xDA\x08\xC1\x18\x19\xC8\xF2\x1C\x1D\x1E\x1F" @@ -169,7 +175,15 @@ cp_273_to_850[] = { "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\xFC\xEA\x5D\xEB\xE9\x9F" }; -CPCONV cpconv[] = { + +typedef struct _CPCONV { + char *name; + unsigned char *h2g; + unsigned char *g2h; +} CPCONV; + + +static CPCONV cpconv[] = { { "default", ascii_to_ebcdic, ebcdic_to_ascii }, { "437/037", cp_437_to_037, cp_037_to_437 }, { "437/500", cp_437_to_500, cp_500_to_437 }, @@ -177,13 +191,139 @@ CPCONV cpconv[] = { { NULL, ascii_to_ebcdic, ebcdic_to_ascii } }; +static CPCONV *codepage_conv = cpconv; + +#if defined(HAVE_ICONV) +static iconv_t codepage_g2h = NULL; +static iconv_t codepage_h2g = NULL; + +static int set_iconv_cp(char *name) +{ +char *codepage; +char *fcp, *tcp; +char *strtok_str; + +char ibyte, obyte; +char *ibytes ,*obytes; +size_t nibytes, nobytes; + + if(codepage_g2h) + iconv_close(codepage_g2h); + if(codepage_h2g) + iconv_close(codepage_h2g); + + codepage_g2h = codepage_h2g = NULL; + + codepage = strdup(name); + + if(!(fcp = strtok_r(codepage,"/,:",&strtok_str))) + { + free(codepage); + return -1; + } + if(!(tcp = strtok_r(NULL,"/,:",&strtok_str))) + { + free(codepage); + return -1; + } + + if((codepage_g2h = iconv_open (fcp,tcp)) == (iconv_t)(-1)) + { + codepage_g2h = NULL; + free(codepage); + return -1; + } + if((codepage_h2g = iconv_open (tcp,fcp)) == (iconv_t)(-1)) + { + iconv_close(codepage_g2h); + codepage_g2h = codepage_h2g = NULL; + free(codepage); + return -1; + } + + free(codepage); + + ibytes = &ibyte; obytes = &obyte; + nibytes = nobytes = 1; + if(iconv(codepage_g2h, &ibytes, &nibytes, &obytes, &nobytes) == (size_t)(-1) ) + + { + iconv_close(codepage_g2h); + iconv_close(codepage_h2g); + codepage_g2h = codepage_h2g = NULL; + return -1; + } + + ibytes = &ibyte; obytes = &obyte; + nibytes = nobytes = 1; + if(iconv(codepage_h2g, &ibytes, &nibytes, &obytes, &nobytes) == (size_t)(-1) ) + + { + iconv_close(codepage_g2h); + iconv_close(codepage_h2g); + codepage_g2h = codepage_h2g = NULL; + return -1; + } + + return 0; +} +#endif /*defined(HAVE_ICONV)*/ + + void set_codepage(char *name) { - for(sysblk.codepage = cpconv; - sysblk.codepage->name && strcasecmp(sysblk.codepage->name,name); - sysblk.codepage++); + if(name == NULL) + if(!(name = getenv("HERCULES_CP"))) + name = "default"; + + for(codepage_conv = cpconv; + codepage_conv->name && strcasecmp(codepage_conv->name,name); + codepage_conv++); - if(!sysblk.codepage->name) - logmsg(_("HHCCF051E CodePage conversion table %s is not defined\n"), + if(!codepage_conv->name) + { +#if defined(HAVE_ICONV) + if(set_iconv_cp(name)) +#endif /*defined(HAVE_ICONV)*/ + logmsg(_("HHCCF051E CodePage conversion table %s is not defined\n"), name); + } +} + + +unsigned char host_to_guest (unsigned char byte) +{ +#if defined(HAVE_ICONV) +char obyte; +char *gbyte = &obyte; +char *hbyte = &byte; +size_t inbytes = 1, outbytes = 1; + + if(codepage_h2g) + { + iconv(codepage_h2g, &hbyte, &inbytes, &gbyte, &outbytes); + return obyte; + } + else +#endif /*defined(HAVE_ICONV)*/ + return codepage_conv->h2g[byte]; +} + + +unsigned char guest_to_host (unsigned char byte) +{ +#if defined(HAVE_ICONV) +char obyte; +char *hbyte = &obyte; +char *gbyte = &byte; +size_t inbytes = 1, outbytes = 1; + + if(codepage_g2h) + { + iconv(codepage_g2h, &gbyte, &inbytes, &hbyte, &outbytes); + return obyte; + } + else +#endif /*defined(HAVE_ICONV)*/ + return codepage_conv->g2h[byte]; } diff --git a/codepage.h b/codepage.h index c5638cf..535a7ba 100644 --- a/codepage.h +++ b/codepage.h @@ -1,18 +1,11 @@ /* CODEPAGE.H (c) Copyright Jan Jaeger, 1999-2003 */ /* Code Page conversion */ +#ifndef _HERCULES_CODEPAGE_H +#define _HERCULES_CODEPAGE_H -typedef struct _CPCONV { - char *name; - unsigned char *h2g; - unsigned char *g2h; -} CPCONV; +extern void set_codepage(char *name); +extern unsigned char host_to_guest (unsigned char byte); +extern unsigned char guest_to_host (unsigned char byte); - -void set_codepage(char *name); - -#define host_to_guest(_hbyte) \ - (sysblk.codepage->h2g[(_hbyte)]) - -#define guest_to_host(_gbyte) \ - (sysblk.codepage->g2h[(_gbyte)]) +#endif /* _HERCULES_CODEPAGE_H */ diff --git a/commadpt.c b/commadpt.c new file mode 100644 index 0000000..a7a699a --- /dev/null +++ b/commadpt.c @@ -0,0 +1,2459 @@ +/*-------------------------------------------------------------------*/ +/* Hercules Communication Line Driver */ +/* (c) 1999-2003 Roger Bowler & Others */ +/* Use of this program is governed by the QPL License */ +/* Original Author : Ivan Warren */ +/* Prime Maintainer : Ivan Warren */ +/*-------------------------------------------------------------------*/ + +#include "hercules.h" +#include "devtype.h" +#include "parser.h" +#include + +#include "commadpt.h" + +#if defined(OPTION_DYNAMIC_LOAD) && defined(WIN32) && !defined(HDL_USE_LIBTOOL) + SYSBLK *psysblk; + #define sysblk (*psysblk) +#endif + +COMMADPT_PEND_TEXT; /* Defined in commadpt.h */ + /* Defines commadpt_pendccw_text array */ + +/*---------------------------------------------------------------*/ +/* PARSER TABLES */ +/*---------------------------------------------------------------*/ +static PARSER ptab[]={ + {"lport","%s"}, + {"lhost","%s"}, + {"rport","%s"}, + {"rhost","%s"}, + {"dial","%s"}, + {"rto","%s"}, + {"pto","%s"}, + {"eto","%s"}, + {"switched","%s"}, + {NULL,NULL} +}; + +enum { + COMMADPT_KW_LPORT=1, + COMMADPT_KW_LHOST, + COMMADPT_KW_RPORT, + COMMADPT_KW_RHOST, + COMMADPT_KW_DIAL, + COMMADPT_KW_READTO, + COMMADPT_KW_POLLTO, + COMMADPT_KW_ENABLETO, + COMMADPT_KW_SWITCHED +} commadpt_kw; + +static void logdump(char *txt,DEVBLK *dev,BYTE *bfr,size_t sz) +{ + size_t i; + if(!dev->ccwtrace) + { + return; + } + logmsg(_("HHCCA300D %4.4X:%s : Status = TEXT=%s, TRANS=%s, TWS=%s\n"), + dev->devnum, + txt, + dev->commadpt->in_textmode?"YES":"NO", + dev->commadpt->in_xparmode?"YES":"NO", + dev->commadpt->xparwwait?"YES":"NO"); + logmsg(_("HHCCA300D %4.4X:%s : Dump of %d (%x) byte(s)\n"),dev->devnum,txt,sz,sz); + for(i=0;idevnum,txt,i); + } + if(i%4==0) + { + logmsg(" "); + } + logmsg("%2.2X",bfr[i]); + } + logmsg("\n"); +} +/*-------------------------------------------------------------------*/ +/* Handler utility routines */ +/*-------------------------------------------------------------------*/ + +/*-------------------------------------------------------------------*/ +/* Buffer ring management */ +/*-------------------------------------------------------------------*/ + +/*-------------------------------------------------------------------*/ +/* Buffer ring management : Init a buffer ring */ +/*-------------------------------------------------------------------*/ +void commadpt_ring_init(COMMADPT_RING *ring,size_t sz) +{ + ring->bfr=malloc(sz); + ring->sz=sz; + ring->hi=0; + ring->lo=0; + ring->havedata=0; + ring->overflow=0; +} +/*-------------------------------------------------------------------*/ +/* Buffer ring management : Free a buffer ring */ +/*-------------------------------------------------------------------*/ +static void commadpt_ring_terminate(COMMADPT_RING *ring) +{ + if(ring->bfr!=NULL) + { + free(ring->bfr); + ring->bfr=NULL; + } + ring->sz=0; + ring->hi=0; + ring->lo=0; + ring->havedata=0; + ring->overflow=0; +} +/*-------------------------------------------------------------------*/ +/* Buffer ring management : Flush a buffer ring */ +/*-------------------------------------------------------------------*/ +static void commadpt_ring_flush(COMMADPT_RING *ring) +{ + ring->hi=0; + ring->lo=0; + ring->havedata=0; + ring->overflow=0; +} +/*-------------------------------------------------------------------*/ +/* Buffer ring management : Queue a byte in the ring */ +/*-------------------------------------------------------------------*/ +inline static void commadpt_ring_push(COMMADPT_RING *ring,BYTE b) +{ + ring->bfr[ring->hi++]=b; + if(ring->hi>ring->sz) + { + ring->hi=0; + } + if(ring->hi==ring->lo) + { + ring->overflow=1; + } + ring->havedata=1; +} +/*-------------------------------------------------------------------*/ +/* Buffer ring management : Queue a byte array in the ring */ +/*-------------------------------------------------------------------*/ +inline static void commadpt_ring_pushbfr(COMMADPT_RING *ring,BYTE *b,size_t sz) +{ + size_t i; + for(i=0;ibfr[ring->lo++]; + if(ring->lo>ring->sz) + { + ring->lo=0; + } + if(ring->hi==ring->lo) + { + ring->havedata=0; + } + return b; +} + +/*-------------------------------------------------------------------*/ +/* Buffer ring management : Retrive a byte array from the ring */ +/*-------------------------------------------------------------------*/ +inline static size_t commadpt_ring_popbfr(COMMADPT_RING *ring,BYTE *b,size_t sz) +{ + size_t i; + for(i=0;ihavedata;i++) + { + b[i]=commadpt_ring_pop(ring); + } + return i; +} +/*-------------------------------------------------------------------*/ +/* Free all private structures and buffers */ +/*-------------------------------------------------------------------*/ +static void commadpt_clean_device(DEVBLK *dev) +{ + commadpt_ring_terminate(&dev->commadpt->inbfr); + commadpt_ring_terminate(&dev->commadpt->outbfr); + commadpt_ring_terminate(&dev->commadpt->rdwrk); + if(dev->commadpt!=NULL) + { + free(dev->commadpt); + dev->commadpt=NULL; + if(dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:clean : Control block freed\n"), + dev->devnum); + } + } + else + { + if(dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:clean : Control block not freed : not allocated\n"),dev->devnum); + } + } + return; +} + +/*-------------------------------------------------------------------*/ +/* Allocate initial private structures */ +/*-------------------------------------------------------------------*/ +static int commadpt_alloc_device(DEVBLK *dev) +{ + dev->commadpt=malloc(sizeof(COMMADPT)); + if(dev->commadpt==NULL) + { + logmsg(_("HHCCA020E %4.4X:Memory allocation failure for main control block\n"), + dev->devnum); + return -1; + } + memset(dev->commadpt,0,sizeof(COMMADPT)); + commadpt_ring_init(&dev->commadpt->inbfr,4096); + commadpt_ring_init(&dev->commadpt->outbfr,4096); + commadpt_ring_init(&dev->commadpt->pollbfr,4096); + commadpt_ring_init(&dev->commadpt->rdwrk,65536); + dev->commadpt->dev=dev; + return 0; +} +/*-------------------------------------------------------------------*/ +/* Parsing utilities */ +/*-------------------------------------------------------------------*/ +/*-------------------------------------------------------------------*/ +/* commadpt_getport : returns a port number or -1 */ +/*-------------------------------------------------------------------*/ +static int commadpt_getport(char *txt) +{ + int pno; + struct servent *se; + pno=atoi(txt); + if(pno==0) + { + se=getservbyname(txt,"tcp"); + if(se==NULL) + { + return -1; + } + pno=se->s_port; + } + return(pno); +} +/*-------------------------------------------------------------------*/ +/* commadpt_getaddr : set an in_addr_t if ok, else return -1 */ +/*-------------------------------------------------------------------*/ +static int commadpt_getaddr(INADDR_T *ia,char *txt) +{ + struct hostent *he; + he=gethostbyname(txt); + if(he==NULL) + { + return(-1); + } + memcpy(ia,he->h_addr_list[0],4); + return(0); +} +/*-------------------------------------------------------------------*/ +/* commadpt_connout : make a tcp outgoing call */ +/* return values : 0 -> call succeeded or initiated */ +/* <0 -> call failed */ +/*-------------------------------------------------------------------*/ +static int commadpt_connout(COMMADPT *ca) +{ + int rc; + char wbfr[256]; + struct sockaddr_in sin; + struct in_addr intmp; + sin.sin_family=AF_INET; + sin.sin_addr.s_addr=ca->rhost; + sin.sin_port=htons(ca->rport); + if(ca->sfd>=0) + { + close(ca->sfd); + ca->connect=0; + } + ca->sfd=socket(AF_INET,SOCK_STREAM,0); + rc=fcntl(ca->sfd,F_GETFL); + rc|=O_NONBLOCK; + fcntl(ca->sfd,F_SETFL,rc); + rc=connect(ca->sfd,(struct sockaddr *)&sin,sizeof(sin)); + if(rc<0) + { + if(errno==EINPROGRESS) + { + return(0); + } + else + { + strerror_r(errno,wbfr,256); + intmp.s_addr=ca->rhost; + logmsg(_("HHCCA001I %4.4X:Connect out to %s:%d failed during initial status : %s\n"), + ca->devnum, + inet_ntoa(intmp), + ca->rport, + strerror(errno)); + close(ca->sfd); + ca->connect=0; + return(-1); + } + } + ca->connect=1; + return(0); +} +/*-------------------------------------------------------------------*/ +/* commadpt_initiate_userdial : interpret DIAL data and initiate call*/ +/* return values : 0 -> call succeeded or initiated */ +/* <0 -> call failed */ +/*-------------------------------------------------------------------*/ +static int commadpt_initiate_userdial(COMMADPT *ca) +{ + int dotcount; /* Number of seps (the 4th is the port separator) */ + int i; /* work */ + int cur; /* Current section */ + INADDR_T destip; /* Destination IP address */ + U16 destport; /* Destination TCP port */ + int incdata; /* Incorrect dial data found */ + int goteon; /* EON presence flag */ + + /* See the DIAL CCW portion in execute_ccw for dial format information */ + + incdata=0; + goteon=0; + dotcount=0; + cur=0; + destip=0; + for(i=0;idialcount;i++) + { + if(goteon) + { + /* EON MUST be last data byte */ + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4x : Found data beyond EON\n"),ca->devnum); + } + incdata=1; + break; + } + switch(ca->dialdata[i]&0x0f) + { + case 0x0d: /* SEP */ + if(dotcount<4) + { + if(cur>255) + { + incdata=1; + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4x : Found incorrect IP address section at position %d\n"),ca->devnum,dotcount+1); + logmsg(_("HHCCA300D %4.4x : %d greater than 255\n"),ca->devnum,cur); + } + break; + } + destip<<=8; + destip+=cur; + cur=0; + dotcount++; + } + else + { + incdata=1; + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4x : Too many separators in dial data\n"),ca->devnum); + } + break; + } + break; + case 0x0c: /* EON */ + goteon=1; + break; + + /* A,B,E,F not valid */ + case 0x0a: + case 0x0b: + case 0x0e: + case 0x0f: + incdata=1; + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4x : Incorrect dial data byte %2.2x\n"),ca->devnum,ca->dialdata[i]); + } + break; + default: + cur*=10; + cur+=ca->dialdata[i]&0x0f; + break; + } + if(incdata) + { + break; + } + } + if(incdata) + { + return -1; + } + if(dotcount<4) + { + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4x : Not enough separators (only %d found) in dial data\n"),ca->devnum,dotcount); + } + return -1; + } + if(cur>65535) + { + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4x : Destination TCP port %d exceeds maximum of 65535\n"),ca->devnum,cur); + } + return -1; + } + destport=cur; + /* Update RHOST/RPORT */ + ca->rport=destport; + ca->rhost=destip; + return(commadpt_connout(ca)); +} +/*-------------------------------------------------------------------*/ +/* Communication Thread - Read socket data (after POLL request */ +/*-------------------------------------------------------------------*/ +static int commadpt_read_poll(COMMADPT *ca) +{ + BYTE b; + int rc; + while((rc=read(ca->sfd,&b,1))>0) + { + if(b==0x32) + { + continue; + } + if(b==0x37) + { + return(1); + } + } + if(rc>0) + { + /* Store POLL IX in bfr followed by byte */ + commadpt_ring_push(&ca->inbfr,ca->pollix); + commadpt_ring_push(&ca->inbfr,b); + return(2); + } + return(0); +} + +/*-------------------------------------------------------------------*/ +/* Communication Thread - Read socket data */ +/*-------------------------------------------------------------------*/ +static void commadpt_read(COMMADPT *ca) +{ + BYTE bfr[256]; + int gotdata; + int rc; + gotdata=0; + while((rc=read(ca->sfd,bfr,256))>0) + { + logdump("RECV",ca->dev,bfr,rc); + commadpt_ring_pushbfr(&ca->inbfr,bfr,(size_t)rc); + gotdata=1; + } + if(!gotdata) + { + if(ca->connect) + { + ca->connect=0; + close(ca->sfd); + ca->sfd=-1; + if(ca->curpending!=COMMADPT_PEND_IDLE) + { + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + } + } + } +} +/*-------------------------------------------------------------------*/ +/* Communication Thread - Set TimeOut */ +/*-------------------------------------------------------------------*/ +static struct timeval *commadpt_setto(struct timeval *tv,int tmo) +{ + if(tmo!=0) + { + if(tmo<0) + { + tv->tv_sec=0; + tv->tv_usec=1; + } + else + { + tv->tv_sec=tmo/1000; + tv->tv_usec=(tmo%1000)*1000; + } + return(tv); + } + return(NULL); +} + +/*-------------------------------------------------------------------*/ +/* Communication Thread main loop */ +/*-------------------------------------------------------------------*/ +static void *commadpt_thread(void *vca) +{ + COMMADPT *ca; /* Work CA Control Block Pointer */ + int sockopt; /* Used for setsocketoption */ + struct sockaddr_in sin; /* bind socket address structure */ + int devnum; /* device number copy for convenience*/ + int rc; /* return code from various rtns */ + struct timeval tv; /* select timeout structure */ + struct timeval *seltv; /* ptr to the timeout structure */ + fd_set rfd,wfd,xfd; /* SELECT File Descriptor Sets */ + BYTE pipecom; /* Byte read from IPC pipe */ + int tempfd; /* Temporary FileDesc holder */ + BYTE b; /* Work data byte */ + int writecont; /* Write contention active */ + int soerr; /* getsockopt SOERROR value */ + socklen_t soerrsz; /* Size for getsockopt */ + int maxfd; /* highest FD for select */ + int ca_shutdown; /* Thread shutdown internal flag */ + int init_signaled; /* Thread initialisation signaled */ + int pollact; /* A Poll Command is in progress */ + int i; /* Ye Old Loop Counter */ + + /*---------------------END OF DECLARES---------------------------*/ + + /* fetch the commadpt structure */ + ca=(COMMADPT *)vca; + + /* Obtain the CA lock */ + obtain_lock(&ca->lock); + + /* get a work copy of devnum (for messages) */ + devnum=ca->devnum; + + /* reset shutdown flag */ + ca_shutdown=0; + + init_signaled=0; + + logmsg(_("HHCCA002I %4.4X:Line Communication thread "TIDPAT" started\n"),devnum,thread_id()); + + pollact=0; /* Initialise Poll activity flag */ + + /* Determine if we should listen */ + /* if this is a DIAL=OUT only line, no listen is necessary */ + if(ca->dolisten) + { + /* Create the socket for a listen */ + ca->lfd=socket(AF_INET,SOCK_STREAM,0); + if(ca->lfd<0) + { + logmsg(_("HHCCA003E %4.4X:Cannot obtain socket for incoming calls : %s\n"),devnum,strerror(errno)); + ca->have_cthread=0; + release_lock(&ca->lock); + return NULL; + } + /* Turn blocking I/O off */ + rc=fcntl(ca->lfd,F_GETFL); + rc|=O_NONBLOCK; + fcntl(ca->lfd,F_SETFL,rc); + + /* Reuse the address regardless of any */ + /* spurious connection on that port */ + sockopt=1; + setsockopt(ca->lfd,SOL_SOCKET,SO_REUSEADDR,&sockopt,sizeof(sockopt)); + + /* Bind the socket */ + sin.sin_family=AF_INET; + sin.sin_addr.s_addr=ca->lhost; + sin.sin_port=htons(ca->lport); + while(1) + { + rc=bind(ca->lfd,(struct sockaddr *)&sin,sizeof(sin)); + if(rc<0) + { + if(errno==EADDRINUSE) + { + logmsg(_("HHCCA004W %4.4X:Waiting 5 seconds for port %d to become available\n"),devnum,ca->lport); + /* + * Check for a shutdown condition on entry + */ + if(ca->curpending==COMMADPT_PEND_SHUTDOWN) + { + ca_shutdown=1; + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + break; + } + + /* Set to wait 5 seconds or input on the IPC pipe */ + /* whichever comes 1st */ + if(!init_signaled) + { + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + init_signaled=1; + } + + FD_ZERO(&rfd); + FD_ZERO(&wfd); + FD_ZERO(&xfd); + FD_SET(ca->pipe[1],&rfd); + tv.tv_sec=5; + tv.tv_usec=0; + + release_lock(&ca->lock); + rc=select(ca->pipe[1]+1,&rfd,&wfd,&wfd,&tv); + obtain_lock(&ca->lock); + /* + * Check for a shutdown condition again after the sleep + */ + if(ca->curpending==COMMADPT_PEND_SHUTDOWN) + { + ca_shutdown=1; + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + break; + } + if(rc!=0) + { + /* Ignore any other command at this stage */ + read(ca->pipe[1],&b,1); + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + } + } + else + { + logmsg(_("HHCCA018E %4.4X:Bind failed : %s\n"),devnum,strerror(errno)); + ca_shutdown=1; + break; + } + } + else + { + break; + } + } + /* Start the listen */ + if(!ca_shutdown) + { + listen(ca->lfd,10); + logmsg(_("HHCCA005I %4.4X:Listening on port %d for incoming TCP connections\n"), + devnum, + ca->lport); + ca->listening=1; + } + } + if(!init_signaled) + { + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + init_signaled=1; + } + + /* The MAIN select loop */ + /* It will listen on the following sockets : */ + /* ca->lfd : The listen socket */ + /* ca->sfd : + * read : When a read, prepare or DIAL command is in effect + * write : When a write contention occurs + * ca->pipe[0] : Always + * + * A 3 Seconds timer is started for a read operation + */ + + while(!ca_shutdown) + { + FD_ZERO(&rfd); + FD_ZERO(&wfd); + FD_ZERO(&xfd); + maxfd=0; + if(ca->listening) + { + FD_SET(ca->lfd,&rfd); + maxfd=maxfdlfd?ca->lfd:maxfd; + } + seltv=NULL; + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:cthread - Entry - DevExec = %s\n"),devnum,commadpt_pendccw_text[ca->curpending]); + } + writecont=0; + switch(ca->curpending) + { + case COMMADPT_PEND_SHUTDOWN: + ca_shutdown=1; + break; + case COMMADPT_PEND_IDLE: + break; + case COMMADPT_PEND_READ: + if(!ca->connect) + { + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + break; + } + if(ca->inbfr.havedata) + { + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + break; + } + seltv=commadpt_setto(&tv,ca->rto); + FD_SET(ca->sfd,&rfd); + maxfd=maxfdsfd?ca->sfd:maxfd; + break; + case COMMADPT_PEND_POLL: + /* Poll active check - provision for write contention */ + /* pollact will be reset when NON syn data is received*/ + /* or when the read times out */ + /* Also prevents WRITE from exiting early */ + if(!pollact && !writecont) + { + int gotenq; + + pollact=1; + gotenq=0; + /* Send SYN+SYN */ + commadpt_ring_push(&ca->outbfr,0x32); + commadpt_ring_push(&ca->outbfr,0x32); + /* Fill the Output ring with POLL Data */ + /* Up to 7 chars or ENQ */ + for(i=0;i<7;i++) + { + if(!ca->pollbfr.havedata) + { + break; + } + ca->pollused++; + b=commadpt_ring_pop(&ca->pollbfr); + if(b!=0x2D) + { + commadpt_ring_push(&ca->outbfr,b); + } + else + { + gotenq=1; + break; + } + } + if(!gotenq) + { + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:Poll Command abort - Poll address >7 Bytes\n"),devnum); + } + ca->badpoll=1; + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + break; + } + b=commadpt_ring_pop(&ca->pollbfr); + ca->pollix=b; + seltv=commadpt_setto(&tv,ca->pto); + } + if(!writecont && ca->pto!=0) + { + /* Set tv value (have been set earlier) */ + seltv=&tv; + /* Set to read data still */ + FD_SET(ca->sfd,&rfd); + maxfd=maxfdsfd?ca->sfd:maxfd; + } + /* DO NOT BREAK - Continue with WRITE processing */ + case COMMADPT_PEND_WRITE: + if(!writecont) + { + while(ca->outbfr.havedata) + { + b=commadpt_ring_pop(&ca->outbfr); + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:Writing 1 byte in socket : %2.2X\n"),ca->devnum,b); + } + rc=write(ca->sfd,&b,1); + if(rc!=1) + { + if(errno==EAGAIN) + { + /* Contending for write */ + writecont=1; + FD_SET(ca->sfd,&wfd); + maxfd=maxfdsfd?ca->sfd:maxfd; + break; + } + else + { + close(ca->sfd); + ca->sfd=-1; + ca->connect=0; + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + break; + } + } + } + } + else + { + FD_SET(ca->sfd,&wfd); + maxfd=maxfdsfd?ca->sfd:maxfd; + } + if(!writecont && !pollact) + { + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + break; + } + break; + case COMMADPT_PEND_DIAL: + if(ca->connect) + { + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + break; + } + rc=commadpt_initiate_userdial(ca); + if(rc!=0 || (rc==0 && ca->connect)) + { + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + break; + } + FD_SET(ca->sfd,&wfd); + maxfd=maxfdsfd?ca->sfd:maxfd; + break; + case COMMADPT_PEND_ENABLE: + if(ca->connect) + { + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + break; + } + switch(ca->dialin+ca->dialout*2) + { + case 0: /* DIAL=NO */ + /* callissued is set here when the call */ + /* actually failed. But we want to time */ + /* a bit for program issuing ENABLES in */ + /* a tight loop */ + if(ca->callissued) + { + seltv=commadpt_setto(&tv,ca->eto); + break; + } + /* Issue a Connect out */ + rc=commadpt_connout(ca); + if(rc==0) + { + /* Call issued */ + if(ca->connect) + { + /* Call completed already */ + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + } + else + { + /* Call initiated - FD will be ready */ + /* for writing when the connect ends */ + /* getsockopt/SOERROR will tell if */ + /* the call was sucessfull or not */ + FD_SET(ca->sfd,&wfd); + maxfd=maxfdsfd?ca->sfd:maxfd; + ca->callissued=1; + } + } + /* Call did not succeed */ + /* Manual says : on a leased line, if DSR is not up */ + /* the terminate enable after a timeout.. That is */ + /* what the call just did (although the time out */ + /* was probably instantaneous) */ + /* This is the equivalent of the comm equipment */ + /* being offline */ + /* INITIATE A 3 SECOND TIMEOUT */ + /* to prevent OSes from issuing a loop of ENABLES */ + else + { + seltv=commadpt_setto(&tv,ca->eto); + } + break; + default: + case 3: /* DIAL=INOUT */ + case 1: /* DIAL=IN */ + /* Wait forever */ + break; + case 2: /* DIAL=OUT */ + /* Makes no sense */ + /* line must be enabled through a DIAL command */ + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + break; + } + /* For cases not DIAL=OUT, the listen is already started */ + break; + + /* The CCW Executor says : DISABLE */ + case COMMADPT_PEND_DISABLE: + if(ca->connect) + { + close(ca->sfd); + ca->sfd=-1; + ca->connect=0; + } + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + break; + + /* A PREPARE has been issued */ + case COMMADPT_PEND_PREPARE: + if(!ca->connect || ca->inbfr.havedata) + { + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + break; + } + FD_SET(ca->sfd,&rfd); + maxfd=maxfdsfd?ca->sfd:maxfd; + break; + + /* Don't know - shouldn't be here anyway */ + default: + break; + } + + /* If the CA is shutting down, exit the loop now */ + if(ca_shutdown) + { + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + break; + } + + /* Set the IPC pipe in the select */ + FD_SET(ca->pipe[0],&rfd); + + /* The the MAX File Desc for Arg 1 of SELECT */ + maxfd=maxfdpipe[0]?ca->pipe[0]:maxfd; + maxfd++; + + /* Release the CA Lock before the select - all FDs addressed by the select are only */ + /* handled by the thread, and communication from CCW Executor/others to this thread */ + /* is via the pipe, which queues the info */ + release_lock(&ca->lock); + + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:cthread - Select IN maxfd = %d / Devexec = %s\n"),devnum,maxfd,commadpt_pendccw_text[ca->curpending]); + } + rc=select(maxfd,&rfd,&wfd,&xfd,seltv); + + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:cthread - Select OUT rc=%d\n"),devnum,rc); + } + /* Get the CA lock back */ + obtain_lock(&ca->lock); + + if(rc==-1) + { + logmsg(_("HHCCA006T %4.4X:Select failed : %s\n"),devnum,strerror(errno)); + break; + } + + /* Select timed out */ + if(rc==0) + { + pollact=0; /* Poll not active */ + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:cthread - Select TIME OUT\n"),devnum); + } + /* Reset Call issued flag */ + ca->callissued=0; + + /* timeout condition */ + signal_condition(&ca->ipc); + ca->curpending=COMMADPT_PEND_IDLE; + continue; + } + + if(FD_ISSET(ca->pipe[0],&rfd)) + { + rc=read(ca->pipe[0],&pipecom,1); + if(rc==0) + { + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:cthread - IPC Pipe closed\n"),devnum); + } + /* Pipe closed : terminate thread & release CA */ + ca_shutdown=1; + break; + } + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:cthread - IPC Pipe Data ; code = %d\n"),devnum,pipecom); + } + switch(pipecom) + { + case 0: /* redrive select */ + /* occurs when a new CCW is being executed */ + break; + case 1: /* Halt current I/O */ + ca->callissued=0; + if(ca->curpending==COMMADPT_PEND_DIAL) + { + close(ca->sfd); + ca->sfd=-1; + } + ca->curpending=COMMADPT_PEND_IDLE; + ca->haltpending=1; + signal_condition(&ca->ipc); + signal_condition(&ca->ipc_halt); /* Tell the halt initiator too */ + break; + default: + break; + } + continue; + } + if(ca->connect) + { + if(FD_ISSET(ca->sfd,&rfd)) + { + int dopoll; + dopoll=0; + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:cthread - inbound socket data\n"),devnum); + } + if(pollact) + { + switch(commadpt_read_poll(ca)) + { + case 0: /* Only SYNs received */ + /* Continue the timeout */ + dopoll=1; + break; + case 1: /* EOT Received */ + /* Send next poll sequence */ + pollact=0; + dopoll=1; + break; + case 2: /* Something else received */ + /* Index byte already stored in inbfr */ + /* read the remaining data and return */ + ca->pollsm=1; + dopoll=0; + break; + default: + /* Same as 0 */ + dopoll=1; + break; + } + } + if(!dopoll) + { + commadpt_read(ca); + ca->curpending=COMMADPT_PEND_IDLE; + signal_condition(&ca->ipc); + continue; + } + } + } + if(ca->sfd>=0) + { + if(FD_ISSET(ca->sfd,&wfd)) + { + if(ca->dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:cthread - socket write available\n"),devnum); + } + switch(ca->curpending) + { + case COMMADPT_PEND_DIAL: + case COMMADPT_PEND_ENABLE: /* Leased line enable call case */ + soerrsz=sizeof(soerr); + getsockopt(ca->sfd,SOL_SOCKET,SO_ERROR,&soerr,&soerrsz); + if(soerr==0) + { + ca->connect=1; + } + else + { + logmsg(_("HHCCA007W %4.4X:Outgoing call failed during %s command : %s\n"),devnum,commadpt_pendccw_text[ca->curpending],strerror(soerr)); + if(ca->curpending==COMMADPT_PEND_ENABLE) + { + /* Ensure top of the loop doesn't restart a new call */ + /* but starts a 3 second timer instead */ + ca->callissued=1; + } + ca->connect=0; + close(ca->sfd); + ca->sfd=-1; + } + signal_condition(&ca->ipc); + ca->curpending=COMMADPT_PEND_IDLE; + break; + + case COMMADPT_PEND_WRITE: + writecont=0; + break; + + default: + break; + } + continue; + } + } + /* Test for incoming call */ + if(ca->listening) + { + if(FD_ISSET(ca->lfd,&rfd)) + { + logmsg(_("HHCCA008I %4.4X:cthread - Incoming Call\n"),devnum); + tempfd=accept(ca->lfd,NULL,0); + if(tempfd<0) + { + continue; + } + /* If the line is already connected, just close */ + /* this call */ + if(ca->connect) + { + close(tempfd); + continue; + } + /* Turn non-blocking I/O on */ + rc=fcntl(tempfd,F_GETFL); + rc|=O_NONBLOCK; + fcntl(tempfd,F_SETFL,rc); + + /* Check the line type & current operation */ + + /* if DIAL=IN or DIAL=INOUT or DIAL=NO */ + if(ca->dialin || (ca->dialin+ca->dialout==0)) + { + /* check if ENABLE is in progress */ + if(ca->curpending==COMMADPT_PEND_ENABLE) + { + /* Accept the call, indicate the line */ + /* is connected and notify CCW exec */ + ca->curpending=COMMADPT_PEND_IDLE; + ca->connect=1; + ca->sfd=tempfd; + signal_condition(&ca->ipc); + continue; + } + /* if this is a leased line, accept the */ + /* call anyway */ + if(ca->dialin==0) + { + ca->connect=1; + ca->sfd=tempfd; + continue; + } + } + /* All other cases : just reject the call */ + close(tempfd); + } + } + } + ca->curpending=COMMADPT_PEND_CLOSED; + /* Check if we already signaled the init process */ + if(!init_signaled) + { + signal_condition(&ca->ipc); + } + /* The CA is shutting down - terminate the thread */ + /* NOTE : the requestor was already notified upon */ + /* detection of PEND_SHTDOWN. However */ + /* the requestor will only run when the */ + /* lock is released, because back */ + /* notification was made while holding */ + /* the lock */ + logmsg(_("HHCCA009I %4.4X:BSC utility thread terminated\n"),ca->devnum); + release_lock(&ca->lock); + return NULL; +} +/*-------------------------------------------------------------------*/ +/* Wakeup the comm thread */ +/* Code : 0 -> Just wakeup the thread to redrive the select */ +/* Code : 1 -> Halt the current executing I/O */ +/*-------------------------------------------------------------------*/ +static void commadpt_wakeup(COMMADPT *ca,BYTE code) +{ + write(ca->pipe[1],&code,1); +} +/*-------------------------------------------------------------------*/ +/* Wait for a copndition from the thread */ +/* MUST HOLD the CA lock */ +/*-------------------------------------------------------------------*/ +static void commadpt_wait(DEVBLK *dev) +{ + COMMADPT *ca; + ca=dev->commadpt; + wait_condition(&ca->ipc,&ca->lock); +} + +/*-------------------------------------------------------------------*/ +/* Halt currently executing I/O command */ +/*-------------------------------------------------------------------*/ +static void commadpt_halt(DEVBLK *dev) +{ + if(!dev->busy) + { + return; + } + obtain_lock(&dev->commadpt->lock); + commadpt_wakeup(dev->commadpt,1); + /* Due to the mysteries of the host OS scheduling */ + /* the wait_condition may or may not exit after */ + /* the CCW executor thread relinquishes control */ + /* This however should not be of any concern */ + /* */ + /* but returning from the wait guarantees that */ + /* the working thread will (or has) notified */ + /* the CCW executor to terminate the current I/O */ + wait_condition(&dev->commadpt->ipc_halt,&dev->commadpt->lock); + release_lock(&dev->commadpt->lock); +} +/* The following 3 MSG functions ensure only 1 (one) */ +/* hardcoded instance exist for the same numbered msg */ +/* that is issued on multiple situations */ +static void msg013e(DEVBLK *dev,char *kw,char *kv) +{ + logmsg(_("HHCCA013E %4.4X:Incorrect %s specification %s\n"),dev->devnum,kw,kv); +} +static void msg015e(DEVBLK *dev,char *dialt,char *kw) +{ + logmsg(_("HHCCA015E %4.4X:Missing parameter : DIAL=%s and %s not specified\n"),dev->devnum,dialt,kw); +} +static void msg016w017i(DEVBLK *dev,char *dialt,char *kw,char *kv) +{ + logmsg(_("HHCCA016W %4.4X:Conflicting parameter : DIAL=%s and %s=%s specified\n"),dev->devnum,dialt,kw,kv); + logmsg(_("HHCCA017I %4.4X:RPORT parameter ignored\n"),dev->devnum); +} +/*-------------------------------------------------------------------*/ +/* Device Initialisation */ +/*-------------------------------------------------------------------*/ +static int commadpt_init_handler (DEVBLK *dev, int argc, BYTE *argv[]) +{ + int i; + int rc; + int pc; /* Parse code */ + int errcnt; + struct in_addr in_temp; + char *dialt; + char fmtbfr[64]; + int etospec; /* ETO= Specified */ + union { + int num; + char text[80]; + } res; + dev->devtype=0x2703; + if(dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:Initialisation starting\n"),dev->devnum); + } + + if(dev->commadpt!=NULL) + { + commadpt_clean_device(dev); + } + rc=commadpt_alloc_device(dev); + if(rc<0) + { + logmsg(_("HHCCA010I %4.4X:initialisation not performed\n"), + dev->devnum); + return(-1); + } + if(dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:Initialisation : Control block allocated\n"),dev->devnum); + } + errcnt=0; + /* + * Initialise ports & hosts + */ + dev->commadpt->sfd=-1; + dev->commadpt->lport=0; + dev->commadpt->rport=0; + dev->commadpt->lhost=INADDR_ANY; + dev->commadpt->rhost=INADDR_NONE; + dev->commadpt->dialin=0; + dev->commadpt->dialout=1; + dev->commadpt->rto=3000; /* Read Time-Out in milis */ + dev->commadpt->pto=3000; /* Poll Time-out in milis */ + dev->commadpt->eto=10000; /* Enable Time-out in milis */ + etospec=0; + + for(i=0;idevnum,argv[i]); + errcnt++; + continue; + } + if(pc==0) + { + logmsg(_("HHCCA012E %4.4X:Unrecognized parameter %s\n"),dev->devnum,argv[i]); + errcnt++; + continue; + } + switch(pc) + { + case COMMADPT_KW_LPORT: + rc=commadpt_getport(res.text); + if(rc<0) + { + errcnt++; + msg013e(dev,"LPORT",res.text); + break; + } + dev->commadpt->lport=rc; + break; + case COMMADPT_KW_LHOST: + if(strcmp(res.text,"*")==0) + { + dev->commadpt->lhost=INADDR_ANY; + break; + } + rc=commadpt_getaddr(&dev->commadpt->lhost,res.text); + if(rc!=0) + { + msg013e(dev,"LHOST",res.text); + errcnt++; + } + break; + case COMMADPT_KW_RPORT: + rc=commadpt_getport(res.text); + if(rc<0) + { + errcnt++; + msg013e(dev,"RPORT",res.text); + break; + } + dev->commadpt->rport=rc; + break; + case COMMADPT_KW_RHOST: + if(strcmp(res.text,"*")==0) + { + dev->commadpt->rhost=INADDR_NONE; + break; + } + rc=commadpt_getaddr(&dev->commadpt->rhost,res.text); + if(rc!=0) + { + msg013e(dev,"RHOST",res.text); + errcnt++; + } + break; + case COMMADPT_KW_READTO: + dev->commadpt->rto=atoi(res.text); + break; + case COMMADPT_KW_POLLTO: + dev->commadpt->pto=atoi(res.text); + break; + case COMMADPT_KW_ENABLETO: + dev->commadpt->eto=atoi(res.text); + etospec=1; + break; + case COMMADPT_KW_SWITCHED: + case COMMADPT_KW_DIAL: + if(strcasecmp(res.text,"yes")==0 || strcmp(res.text,"1")==0 || strcasecmp(res.text,"inout")==0) + { + dev->commadpt->dialin=1; + dev->commadpt->dialout=1; + break; + } + if(strcasecmp(res.text,"no")==0 || strcmp(res.text,"0")==0) + { + dev->commadpt->dialin=0; + dev->commadpt->dialout=0; + break; + } + if(strcasecmp(res.text,"in")==0) + { + dev->commadpt->dialin=1; + dev->commadpt->dialout=0; + break; + } + if(strcasecmp(res.text,"out")==0) + { + dev->commadpt->dialin=0; + dev->commadpt->dialout=1; + break; + } + logmsg(_("HHCCA014E %4.4X:Incorrect switched/dial specification %s; defaulting to DIAL=OUT\n"),dev->devnum,res.text); + dev->commadpt->dialin=0; + dev->commadpt->dialout=0; + break; + default: + break; + } + } + /* + * Check parameters consistency + * when DIAL=NO : + * lport must not be 0 + * lhost may be anything + * rport must not be 0 + * rhost must not be INADDR_NONE + * when DIAL=IN or DIAL=INOUT + * lport must NOT be 0 + * lhost may be anything + * rport MUST be 0 + * rhost MUST be INADDR_NONE + * when DIAL=OUT + * lport MUST be 0 + * lhost MUST be INADDR_ANY + * rport MUST be 0 + * rhost MUST be INADDR_NONE + */ + switch(dev->commadpt->dialin+dev->commadpt->dialout*2) + { + case 0: + dialt="NO"; + break; + case 1: + dialt="IN"; + break; + case 2: + dialt="OUT"; + break; + case 3: + dialt="INOUT"; + break; + default: + dialt="*ERR*"; + break; + } + switch(dev->commadpt->dialin+dev->commadpt->dialout*2) + { + case 0: /* DIAL = NO */ + dev->commadpt->eto=0; + if(dev->commadpt->lport==0) + { + msg015e(dev,dialt,"LPORT"); + errcnt++; + } + if(dev->commadpt->rport==0) + { + msg015e(dev,dialt,"RPORT"); + errcnt++; + } + if(dev->commadpt->rhost==INADDR_NONE) + { + msg015e(dev,dialt,"RHOST"); + errcnt++; + } + if(etospec) + { + snprintf(fmtbfr,sizeof(fmtbfr),"%d",dev->commadpt->eto); + msg016w017i(dev,dialt,"ETO",fmtbfr); + errcnt++; + } + dev->commadpt->eto=0; + break; + case 1: /* DIAL = IN */ + case 3: /* DIAL = INOUT */ + if(dev->commadpt->lport==0) + { + msg015e(dev,dialt,"LPORT"); + errcnt++; + } + if(dev->commadpt->rport!=0) + { + snprintf(fmtbfr,sizeof(fmtbfr),"%d",dev->commadpt->rport); + msg016w017i(dev,dialt,"RPORT",fmtbfr); + } + if(dev->commadpt->rhost!=INADDR_NONE) + { + in_temp.s_addr=dev->commadpt->rhost; + msg016w017i(dev,dialt,"RHOST",inet_ntoa(in_temp)); + dev->commadpt->rhost=INADDR_NONE; + } + break; + case 2: /* DIAL = OUT */ + if(dev->commadpt->lport!=0) + { + snprintf(fmtbfr,sizeof(fmtbfr),"%d",dev->commadpt->lport); + msg016w017i(dev,dialt,"LPORT",fmtbfr); + dev->commadpt->lport=0; + } + if(dev->commadpt->rport!=0) + { + snprintf(fmtbfr,sizeof(fmtbfr),"%d",dev->commadpt->rport); + msg016w017i(dev,dialt,"RPORT",fmtbfr); + dev->commadpt->rport=0; + } + if(dev->commadpt->lhost!=INADDR_ANY) /* Actually it's more like INADDR_NONE */ + { + in_temp.s_addr=dev->commadpt->lhost; + msg016w017i(dev,dialt,"LHOST",inet_ntoa(in_temp)); + dev->commadpt->lhost=INADDR_ANY; + } + if(dev->commadpt->rhost!=INADDR_NONE) + { + in_temp.s_addr=dev->commadpt->rhost; + msg016w017i(dev,dialt,"RHOST",inet_ntoa(in_temp)); + dev->commadpt->rhost=INADDR_NONE; + } + break; + } + if(errcnt>0) + { + logmsg(_("HHCCA021I %4.4X:Initialisation failed due to previous errors\n"),dev->devnum); + return -1; + } + in_temp.s_addr=dev->commadpt->lhost; + in_temp.s_addr=dev->commadpt->rhost; + dev->bufsize=256; + dev->numsense=2; + memset(dev->sense,0,sizeof(dev->sense)); + + /* Initialise various flags & statuses */ + dev->commadpt->enabled=0; + dev->commadpt->connect=0; + dev->commadpt->lnctl=COMMADPT_LNCTL_BSC; + dev->fd=100; /* Ensures 'close' function called */ + dev->commadpt->devnum=dev->devnum; + + /* Initialize the CA lock */ + initialize_lock(&dev->commadpt->lock); + + /* Initialise thread->I/O & halt initiation EVB */ + initialize_condition(&dev->commadpt->ipc); + initialize_condition(&dev->commadpt->ipc_halt); + + /* Allocate I/O -> Thread signaling pipe */ + pipe(dev->commadpt->pipe); + + /* Point to the halt routine for HDV/HIO/HSCH handling */ + dev->halt_device=commadpt_halt; + + /* Obtain the CA lock */ + obtain_lock(&dev->commadpt->lock); + + /* Indicate listen required if DIAL!=OUT */ + if(dev->commadpt->dialin || + (!dev->commadpt->dialin && !dev->commadpt->dialout)) + { + dev->commadpt->dolisten=1; + } + else + { + dev->commadpt->dolisten=0; + } + + /* Start the async worker thread */ + dev->commadpt->curpending=COMMADPT_PEND_TINIT; + if(create_thread(&dev->commadpt->cthread,&sysblk.detattr,commadpt_thread,dev->commadpt)) + { + logmsg(D_("HHCCAxxxE create_thread: %s\n"),strerror(errno)); + release_lock(&dev->commadpt->lock); + return -1; + } + commadpt_wait(dev); + if(dev->commadpt->curpending!=COMMADPT_PEND_IDLE) + { + logmsg(_("HHCCA019E %4.4x : BSC comm thread did not initialise\n"),dev->devnum); + /* Release the CA lock */ + release_lock(&dev->commadpt->lock); + return -1; + } + dev->commadpt->have_cthread=1; + + /* Release the CA lock */ + release_lock(&dev->commadpt->lock); + /* Indicate succesfull completion */ + return 0; +} + +static char *commadpt_lnctl_names[]={ + "NONE", + "BSC", + "TELE2" +}; + +/*-------------------------------------------------------------------*/ +/* Query the device definition */ +/*-------------------------------------------------------------------*/ +static void commadpt_query_device (DEVBLK *dev, BYTE **class, + int buflen, BYTE *buffer) +{ + *class = "LINE"; + snprintf(buffer,buflen,"%s STA=%s CN=%s, EIB=%s OP=%s", + commadpt_lnctl_names[dev->commadpt->lnctl], + dev->commadpt->enabled?"ENA":"DISA", + dev->commadpt->connect?"YES":"NO", + dev->commadpt->eibmode?"YES":"NO", + commadpt_pendccw_text[dev->commadpt->curpending]); +} + +/*-------------------------------------------------------------------*/ +/* Close the device */ +/* Invoked by HERCULES shutdown & DEVINIT processing */ +/*-------------------------------------------------------------------*/ +static int commadpt_close_device ( DEVBLK *dev ) +{ + if(dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:Closing down\n"),dev->devnum); + } + + /* Obtain the CA lock */ + obtain_lock(&dev->commadpt->lock); + + /* Terminate current I/O thread if necessary */ + if(dev->busy) + { + commadpt_halt(dev); + } + + /* Terminate worker thread if it is still up */ + if(dev->commadpt->have_cthread) + { + dev->commadpt->curpending=COMMADPT_PEND_SHUTDOWN; + commadpt_wakeup(dev->commadpt,0); + commadpt_wait(dev); + dev->commadpt->cthread=(TID)-1; + dev->commadpt->have_cthread=0; + } + + /* release the CA lock */ + release_lock(&dev->commadpt->lock); + + /* Free all work storage */ + commadpt_clean_device(dev); + + /* Indicate to hercules the device is no longer opened */ + dev->fd=-1; + + if(dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:Closed down\n"),dev->devnum); + } + return 0; +} + + +/*-------------------------------------------------------------------*/ +/* Execute a Channel Command Word */ +/*-------------------------------------------------------------------*/ +static void commadpt_execute_ccw (DEVBLK *dev, BYTE code, BYTE flags, + BYTE chained, U16 count, BYTE prevcode, int ccwseq, + BYTE *iobuf, BYTE *more, BYTE *unitstat, U16 *residual) +{ +U32 num; /* Work : Actual CCW transfer count */ +BYTE b; /* Input processing work variable : Current character */ +BYTE setux; /* EOT kludge */ +BYTE turnxpar; /* Write contains turn to transparent mode */ +int i; /* work */ +BYTE gotdle; /* Write routine DLE marker */ + UNREFERENCED(flags); + UNREFERENCED(chained); + UNREFERENCED(prevcode); + UNREFERENCED(ccwseq); + *residual = 0; + /* + * Obtain the COMMADPT lock + */ + if(dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X:CCW Exec - Entry code = %x\n"),dev->devnum,code); + } + obtain_lock(&dev->commadpt->lock); + switch (code) { + /*---------------------------------------------------------------*/ + /* CONTROL NO-OP */ + /*---------------------------------------------------------------*/ + case 0x03: + *residual=0; + *unitstat=CSW_CE|CSW_DE; + break; + + /*---------------------------------------------------------------*/ + /* BASIC SENSE */ + /*---------------------------------------------------------------*/ + case 0x04: + num=countnumsense?count:dev->numsense; + *more=countnumsense?1:0; + memcpy(iobuf,dev->sense,num); + *residual=count-num; + *unitstat=CSW_CE|CSW_DE; + break; + + /*---------------------------------------------------------------*/ + /* ENABLE */ + /*---------------------------------------------------------------*/ + case 0x27: + if(dev->commadpt->dialin+dev->commadpt->dialout*2==2) + { + /* Enable makes no sense on a dial out only line */ + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_IR; + dev->sense[1]=0x2E; /* Simulate Failed Call In */ + break; + } + if(dev->commadpt->connect) + { + /* Already connected */ + dev->commadpt->enabled=1; + *unitstat=CSW_CE|CSW_DE; + break; + } + dev->commadpt->curpending=COMMADPT_PEND_ENABLE; + commadpt_wakeup(dev->commadpt,0); + commadpt_wait(dev); + /* If the line is not connected now, then ENABLE failed */ + if(dev->commadpt->connect) + { + *unitstat=CSW_CE|CSW_DE; + dev->commadpt->enabled=1; + /* Clean the input buffer */ + commadpt_ring_flush(&dev->commadpt->inbfr); + break; + } + if(dev->commadpt->haltpending) + { + *unitstat=CSW_CE|CSW_DE|CSW_UX; + dev->commadpt->haltpending=0; + break; + } + if(dev->commadpt->dialin) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_IR; + dev->sense[1]=0x2e; + } + else + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_IR; + dev->sense[1]=0x21; + } + break; + + /*---------------------------------------------------------------*/ + /* DISABLE */ + /*---------------------------------------------------------------*/ + case 0x2F: + /* Reset some flags */ + dev->commadpt->xparwwait=0; + commadpt_ring_flush(&dev->commadpt->inbfr); /* Flush buffers */ + commadpt_ring_flush(&dev->commadpt->outbfr); /* Flush buffers */ + + if((!dev->commadpt->dialin && !dev->commadpt->dialout) || !dev->commadpt->connect) + { + *unitstat=CSW_CE|CSW_DE; + dev->commadpt->enabled=0; + break; + } + dev->commadpt->curpending=COMMADPT_PEND_DISABLE; + commadpt_wakeup(dev->commadpt,0); + commadpt_wait(dev); + dev->commadpt->enabled=0; + *unitstat=CSW_CE|CSW_DE; + break; + /*---------------------------------------------------------------*/ + /* SET MODE */ + /*---------------------------------------------------------------*/ + case 0x23: + /* Transparent Write Wait State test */ + if(dev->commadpt->xparwwait) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_CR; + return; + } + num=1; + *residual=count-num; + *unitstat=CSW_CE|CSW_DE; + if(dev->ccwtrace) + { + logmsg(_("HHCCA300D %4.4X Set Mode : %s\n"),dev->devnum,iobuf[0]&0x40 ? "EIB":"NO EIB"); + } + dev->commadpt->eibmode=(iobuf[0]&0x40)?1:0; + break; + /*---------------------------------------------------------------*/ + /* POLL Command */ + /*---------------------------------------------------------------*/ + case 0x09: + /* Transparent Write Wait State test */ + if(dev->commadpt->xparwwait) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_CR; + return; + } + /* Save POLL data */ + commadpt_ring_flush(&dev->commadpt->pollbfr); + commadpt_ring_pushbfr(&dev->commadpt->pollbfr,iobuf,count); + /* Set some utility variables */ + dev->commadpt->pollused=0; + dev->commadpt->badpoll=0; + /* Tell thread */ + dev->commadpt->curpending=COMMADPT_PEND_POLL; + commadpt_wakeup(dev->commadpt,0); + commadpt_wait(dev); + /* Flush the output & poll rings */ + commadpt_ring_flush(&dev->commadpt->outbfr); + commadpt_ring_flush(&dev->commadpt->pollbfr); + /* Check for HALT */ + if(dev->commadpt->haltpending) + { + *unitstat=CSW_CE|CSW_DE|CSW_UX; + dev->commadpt->haltpending=0; + break; + } + /* Check for bad poll data */ + if(dev->commadpt->badpoll) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=0x08; + dev->sense[1]=0x84; + break; + } + /* Determine remaining length */ + *residual=count-dev->commadpt->pollused; + /* Determine if SM should be set (succesfull or unsucessfull POLLs) */ + /* exhausting poll data when all stations reported NO data */ + /* does not set Status Modifier */ + *unitstat=CSW_CE|CSW_DE|(dev->commadpt->pollsm?CSW_SM:0); + /* NOTE : The index byte (and rest) are in the Input Ring */ + break; + + /*---------------------------------------------------------------*/ + /* DIAL */ + /* Info on DIAL DATA : */ + /* Dial character formats : */ + /* x x x x 0 0 0 0 : 0 */ + /* ........ */ + /* x x x x 1 0 0 1 : 9 */ + /* x x x x 1 1 0 0 : SEP */ + /* x x x x 1 1 0 1 : EON */ + /* EON is ignored */ + /* format is : AAA/SEP/BBB/SEP/CCC/SEP/DDD/SEP/PPPP */ + /* where A,B,C,D,P are numbers from 0 to 9 */ + /* This perfoms an outgoing call to AAA.BBB.CCC.DDD port PPPP */ + /*---------------------------------------------------------------*/ + case 0x29: + /* The line must have dial-out capability */ + if(!dev->commadpt->dialout) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_CR; + dev->sense[1]=0x04; + break; + } + /* The line must be disabled */ + if(dev->commadpt->enabled) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_CR; + dev->sense[1]=0x05; + break; + } + num=count>sizeof(dev->commadpt->dialdata) ? sizeof(dev->commadpt->dialdata) : count; + memcpy(dev->commadpt->dialdata,iobuf,num); + dev->commadpt->curpending=COMMADPT_PEND_DIAL; + commadpt_wakeup(dev->commadpt,0); + commadpt_wait(dev); + *residual=count-num; + if(dev->commadpt->haltpending) + { + *unitstat=CSW_CE|CSW_DE|CSW_UX; + dev->commadpt->haltpending=0; + break; + } + if(!dev->commadpt->connect) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_IR; + dev->commadpt->enabled=0; + } + else + { + *unitstat=CSW_CE|CSW_DE; + dev->commadpt->enabled=1; + } + break; + + /*---------------------------------------------------------------*/ + /* READ */ + /*---------------------------------------------------------------*/ + case 0x02: + setux=0; + /* Check the line is enabled */ + if(!dev->commadpt->enabled) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_CR; + dev->sense[1]=0x06; + break; + } + /* Transparent Write Wait State test */ + if(dev->commadpt->xparwwait) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_CR; + break; + } + /* Check for any remaining data in read work buffer */ + if(dev->commadpt->readcomp) + { + if(dev->commadpt->rdwrk.havedata) + { + num=commadpt_ring_popbfr(&dev->commadpt->rdwrk,iobuf,count); + if(dev->commadpt->rdwrk.havedata) + { + *more=1; + } + *residual=count-num; + *unitstat=CSW_CE|CSW_DE; + break; + } + } + dev->commadpt->readcomp=0; + *unitstat=0; + num=0; + /* The following is the BIG READ ROUTINE MESS */ + /* the manual's indications on when to exit */ + /* a read and what to transfer to the main */ + /* storage is fuzzy (at best) */ + /* */ + /* The line input can be in 3 possible */ + /* conditions : */ + /* Transparent Text Mode */ + /* Text Mode */ + /* none of the above (initial status) */ + /* transition from one mode to the other is */ + /* also not very well documented */ + /* so the following code is based on */ + /* empirical knowledge and some interpretation*/ + /* also... the logic should probably be */ + /* rewritten */ + + /* We will remain in READ state with the thread */ + /* as long as we haven't met a read ending condition */ + while(1) + { + /* READ state */ + dev->commadpt->curpending=COMMADPT_PEND_READ; + /* Tell worker thread */ + commadpt_wakeup(dev->commadpt,0); + /* Wait for some data */ + commadpt_wait(dev); + + /* If we are not connected, the read fails */ + if(!dev->commadpt->connect) + { + *unitstat=CSW_DE|CSW_CE|CSW_UC; + dev->sense[0]=SENSE_IR; + break; + } + + /* If the I/O was halted - indicate Unit Check */ + if(dev->commadpt->haltpending) + { + *unitstat=CSW_CE|CSW_DE|CSW_UX; + dev->commadpt->haltpending=0; + break; + } + + /* If no data is present - 3 seconds have passed without */ + /* receiving data (or a SYNC) */ + if(!dev->commadpt->inbfr.havedata) + { + *unitstat=CSW_DE|CSW_CE|CSW_UC; + dev->sense[0]=0x01; + dev->sense[1]=0xe3; + break; + } + /* Start processing data flow here */ + /* Pop bytes until we run out of data or */ + /* until the processing indicates the read */ + /* should now terminate */ + while( + dev->commadpt->inbfr.havedata + && !dev->commadpt->readcomp) + { + /* fetch 1 byte from the input ring */ + b=commadpt_ring_pop(&dev->commadpt->inbfr); + if(!dev->commadpt->gotdle) + { + if(b==0x10) + { + dev->commadpt->gotdle=1; + continue; + } + } + if(dev->commadpt->in_textmode) + { + if(dev->commadpt->in_xparmode) + { + /* TRANSPARENT MODE READ */ + if(dev->commadpt->gotdle) + { + switch(b) + { + case 0x10: + commadpt_ring_push(&dev->commadpt->rdwrk,b); + break; + case 0x32: + break; + case 0x1F: /* ITB - Exit xparent, set EIB - do NOT exit read yet */ + dev->commadpt->in_xparmode=0; + commadpt_ring_push(&dev->commadpt->rdwrk,0x10); + commadpt_ring_push(&dev->commadpt->rdwrk,b); + if(dev->commadpt->eibmode) + { + commadpt_ring_push(&dev->commadpt->rdwrk,0); + } + break; + case 0x26: /* ETB - Same as ITB but DO exit read now */ + dev->commadpt->in_xparmode=0; + commadpt_ring_push(&dev->commadpt->rdwrk,0x10); + commadpt_ring_push(&dev->commadpt->rdwrk,b); + if(dev->commadpt->eibmode) + { + commadpt_ring_push(&dev->commadpt->rdwrk,0); + } + dev->commadpt->readcomp=1; + break; + case 0x03: /* ETX - Same as ETB */ + dev->commadpt->in_xparmode=0; + commadpt_ring_push(&dev->commadpt->rdwrk,0x10); + commadpt_ring_push(&dev->commadpt->rdwrk,b); + if(dev->commadpt->eibmode) + { + commadpt_ring_push(&dev->commadpt->rdwrk,0); + } + dev->commadpt->readcomp=1; + break; + case 0x2D: /* ENQ */ + dev->commadpt->in_xparmode=0; + dev->commadpt->in_textmode=0; + commadpt_ring_push(&dev->commadpt->rdwrk,0x10); + commadpt_ring_push(&dev->commadpt->rdwrk,b); + dev->commadpt->readcomp=1; + break; + default: + commadpt_ring_push(&dev->commadpt->rdwrk,0x10); + commadpt_ring_push(&dev->commadpt->rdwrk,b); + break; + } + } + else + { + commadpt_ring_push(&dev->commadpt->rdwrk,b); + } + } + else + { + if(b!=0x32) + { + /* TEXT MODE READ */ + if(dev->commadpt->gotdle) + { + switch(b) + { + case 0x02: /* STX */ + dev->commadpt->in_xparmode=1; + break; + case 0x2D: /* ENQ */ + dev->commadpt->readcomp=1; + break; + default: + if((b&0xf0)==0x60 || (b&0xf0)==0x70) + { + dev->commadpt->readcomp=1; + } + break; + } + commadpt_ring_push(&dev->commadpt->rdwrk,0x10); + commadpt_ring_push(&dev->commadpt->rdwrk,b); + } + else + { + switch(b) + { + case 0x2D: /* ENQ */ + dev->commadpt->readcomp=1; + dev->commadpt->in_textmode=0; + commadpt_ring_push(&dev->commadpt->rdwrk,b); + break; + case 0x3D: /* NAK */ + dev->commadpt->readcomp=1; + commadpt_ring_push(&dev->commadpt->rdwrk,b); + break; + case 0x26: /* ETB */ + case 0x03: /* ETX */ + dev->commadpt->readcomp=1; + dev->commadpt->in_textmode=0; + commadpt_ring_push(&dev->commadpt->rdwrk,b); + if(dev->commadpt->eibmode) + { + commadpt_ring_push(&dev->commadpt->rdwrk,0); + } + break; + case 0x1F: /* ITB */ + commadpt_ring_push(&dev->commadpt->rdwrk,b); + if(dev->commadpt->eibmode) + { + commadpt_ring_push(&dev->commadpt->rdwrk,0); + } + break; + default: + commadpt_ring_push(&dev->commadpt->rdwrk,b); + break; + } + } + } + } + } + else + { + if(b!=0x32) + { + if(dev->commadpt->gotdle) + { + if((b & 0xf0) == 0x60 || (b&0xf0)==0x70) + { + commadpt_ring_push(&dev->commadpt->rdwrk,0x10); + commadpt_ring_push(&dev->commadpt->rdwrk,b); + dev->commadpt->readcomp=1; + } + else + { + if(b==0x02) + { + commadpt_ring_push(&dev->commadpt->rdwrk,0x10); + commadpt_ring_push(&dev->commadpt->rdwrk,b); + dev->commadpt->in_textmode=1; + dev->commadpt->in_xparmode=1; + } + } + } + else + { + switch(b) + { + case 0x37: /* EOT */ + setux=1; + dev->commadpt->readcomp=1; + break; + case 0x01: + case 0x02: + dev->commadpt->in_textmode=1; + break; + case 0x2D: /* ENQ */ + dev->commadpt->readcomp=1; + break; + case 0x3D: /* NAK */ + dev->commadpt->readcomp=1; + break; + default: + break; + } + commadpt_ring_push(&dev->commadpt->rdwrk,b); + } + } + } + dev->commadpt->gotdle=0; + } /* END WHILE - READ FROM DATA BUFFER */ + /* If readcomp is set, then we may exit the read loop */ + if(dev->commadpt->readcomp) + { + if(dev->commadpt->rdwrk.havedata) + { + num=commadpt_ring_popbfr(&dev->commadpt->rdwrk,iobuf,count); + if(dev->commadpt->rdwrk.havedata) + { + *more=1; + } + *residual=count-num; + *unitstat=CSW_CE|CSW_DE|(setux?CSW_UX:0); + logdump("Read",dev,iobuf,num); + break; + } + } + } /* END WHILE - READ FROM THREAD */ + break; + + /*---------------------------------------------------------------*/ + /* WRITE */ + /*---------------------------------------------------------------*/ + case 0x01: + logdump("Writ",dev,iobuf,count); + *residual=count; + + /* Check if we have an opened path */ + if(!dev->commadpt->connect) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_IR; + break; + } + + /* Check if the line has been enabled */ + if(!dev->commadpt->enabled) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_CR; + break; + } + + /* read 1 byte to check for pending input */ + i=read(dev->commadpt->sfd,&b,1); + if(i>0) + { + /* Push it in the communication input buffer ring */ + commadpt_ring_push(&dev->commadpt->inbfr,b); + } + /* Set UX on write if line has pending inbound data */ + if(dev->commadpt->inbfr.havedata) + { + *unitstat=CSW_CE|CSW_DE|CSW_UX; + break; + } + /* + * Fill in the Write Buffer + */ + + /* To start : not transparent mode, no DLE received yet */ + turnxpar=0; + gotdle=0; + + /* Scan the I/O buffer */ + for(i=0;icommadpt->outbfr,0x10); + } + } + else /* non transparent mode */ + { + if(b==0x10) + { + gotdle=1; /* Indicate we have a DLE for next pass */ + } + else + { + /* If there was a DLE on previous pass */ + if(gotdle) + { + /* check for DLE/ETX */ + if(b==0x02) + { + /* Indicate transparent mode on */ + turnxpar=1; + } + } + } + } + /* Put the current byte on the output ring */ + commadpt_ring_push(&dev->commadpt->outbfr,b); + } + /* If we had a DLE/STX, the line is now in Transparent Write Wait state */ + /* meaning that no CCW codes except Write, No-Op, Sense are allowed */ + /* (that's what the manual says.. I doubt DISABLE is disallowed) */ + /* Anyway.. The program will have an opportunity to turn XPARENT mode */ + /* off on the next CCW. */ + /* CAVEAT : The manual doesn't say if the line remains in transparent */ + /* Write Wait state if the next CCW doesn't start with DLE/ETX */ + /* or DLE/ITB */ + if(turnxpar) + { + dev->commadpt->xparwwait=1; + } + else + { + dev->commadpt->xparwwait=0; + } + /* Indicate to the worker thread the current operation is OUTPUT */ + dev->commadpt->curpending=COMMADPT_PEND_WRITE; + + /* All bytes written out - residual = 0 */ + *residual=0; + + /* Wake-up the worker thread */ + commadpt_wakeup(dev->commadpt,0); + + /* Wait for operation completion */ + commadpt_wait(dev); + + /* Check if the line is still connected */ + if(!dev->commadpt->connect) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_IR; + break; + } + + /* Check if the I/O was interrupted */ + if(dev->commadpt->haltpending) + { + *unitstat=CSW_CE|CSW_DE|CSW_UX; + break; + } + *unitstat=CSW_CE|CSW_DE; + break; + + /*---------------------------------------------------------------*/ + /* PREPARE */ + /* NOTE : DO NOT SET RESIDUAL to 0 : Otherwise, channel.c */ + /* will reflect a channel prot check - residual */ + /* should indicate NO data was transfered for this */ + /* pseudo-read operation */ + /*---------------------------------------------------------------*/ + case 0x06: + *residual=count; + /* PREPARE not allowed unless line is enabled */ + if(!dev->commadpt->enabled) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_CR; + dev->sense[1]=0x06; + break; + } + + /* Transparent Write Wait State test */ + if(dev->commadpt->xparwwait) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_CR; + return; + } + + /* If data is present, prepare ends immediatly */ + if(dev->commadpt->inbfr.havedata) + { + *unitstat=CSW_CE|CSW_DE; + break; + } + + /* Indicate to the worker thread to notify us when data arrives */ + dev->commadpt->curpending=COMMADPT_PEND_PREPARE; + + /* Wakeup worker thread */ + commadpt_wakeup(dev->commadpt,0); + + /* Wait for completion */ + commadpt_wait(dev); + + /* If I/O was halted (this one happens often) */ + if(dev->commadpt->haltpending) + { + *unitstat=CSW_CE|CSW_DE|CSW_UX; + dev->commadpt->haltpending=0; + break; + } + + /* Check if the line is still connected */ + if(!dev->commadpt->connect) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_IR; + break; + } + + /* Normal Prepare exit condition - data is present in the input buffer */ + *unitstat=CSW_CE|CSW_DE; + break; + + default: + /*---------------------------------------------------------------*/ + /* INVALID OPERATION */ + /*---------------------------------------------------------------*/ + /* Set command reject sense byte, and unit check status */ + *unitstat=CSW_CE+CSW_DE+CSW_UC; + dev->sense[0]=SENSE_CR; + break; + + } + release_lock(&dev->commadpt->lock); +} + + +/*---------------------------------------------------------------*/ +/* DEVICE FUNCTION POINTERS */ +/*---------------------------------------------------------------*/ + +#if defined(OPTION_DYNAMIC_LOAD) +static +#endif +DEVHND comadpt_device_hndinfo = { + &commadpt_init_handler, + &commadpt_execute_ccw, + &commadpt_close_device, + &commadpt_query_device, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL +}; + +/* Libtool static name colision resolution */ +/* note : lt_dlopen will look for symbol & modulename_LTX_symbol */ +#if !defined(HDL_BUILD_SHARED) && defined(HDL_USE_LIBTOOL) +#define hdl_ddev hdt2703_LTX_hdl_ddev +#define hdl_depc hdt2703_LTX_hdl_depc +#define hdl_reso hdt2703_LTX_hdl_reso +#define hdl_init hdt2703_LTX_hdl_init +#define hdl_fini hdt2703_LTX_hdl_fini +#endif + + +#if defined(OPTION_DYNAMIC_LOAD) +HDL_DEPENDENCY_SECTION; +{ + HDL_DEPENDENCY(HERCULES); + HDL_DEPENDENCY(DEVBLK); + HDL_DEPENDENCY(SYSBLK); +} +END_DEPENDENCY_SECTION; + + +#if defined(WIN32) && !defined(HDL_USE_LIBTOOL) +#undef sysblk +HDL_RESOLVER_SECTION; +{ + HDL_RESOLVE_PTRVAR( psysblk, sysblk ); +} +END_RESOLVER_SECTION; +#endif + + +HDL_DEVICE_SECTION; +{ + HDL_DEVICE(2703, comadpt_device_hndinfo ); +} +END_DEVICE_SECTION; +#endif diff --git a/commadpt.h b/commadpt.h new file mode 100644 index 0000000..2314343 --- /dev/null +++ b/commadpt.h @@ -0,0 +1,113 @@ +#ifndef __COMMADPT_H__ +#define __COMMADPT_H__ + +#include +#include + +#ifdef WIN32 +#define INADDR_T unsigned int +#else +#define INADDR_T in_addr_t +#endif + +typedef struct _COMMADPT_RING +{ + BYTE *bfr; + size_t sz; + size_t hi; + size_t lo; + BYTE havedata:1, + overflow:1; +} COMMADPT_RING; + +typedef struct _COMMADPT +{ + DEVBLK *dev; /* the devblk to which this CA is attched */ + BYTE lnctl; /* Line control used */ + int rto; /* Read Time-Out */ + int pto; /* Poll Time-Out */ + int eto; /* Enable Time-Out */ + TID cthread; /* Thread used to control the socket */ + BYTE curpending; /* Current pending operation */ + U16 lport; /* Local listening port */ + INADDR_T lhost; /* Local listening address */ + U16 rport; /* Remote TCP Port */ + INADDR_T rhost; /* Remote connection IP address */ + int sfd; /* Communication socket FD */ + int lfd; /* Listen socket for DIAL=IN, INOUT & NO */ + COND ipc; /* I/O <-> thread IPC condition EVB */ + COND ipc_halt; /* I/O <-> thread IPC HALT special EVB */ + LOCK lock; /* COMMADPT lock */ + int pipe[2]; /* pipe used for I/O to thread signaling */ + COMMADPT_RING inbfr; /* Input buffer ring */ + COMMADPT_RING outbfr; /* Output buffer ring */ + COMMADPT_RING pollbfr; /* Ring used for POLL data */ + COMMADPT_RING rdwrk; /* Inbound data flow work ring */ + U16 devnum; /* devnum copy from DEVBLK */ + BYTE dialdata[32]; /* Dial data information */ + U16 dialcount; /* data count for dial */ + BYTE pollix; /* Next POLL Index */ + U16 pollused; /* Count of Poll data used during Poll */ + U32 + enabled:1, /* An ENABLE CCW has been sucesfully issued */ + connect:1, /* A connection exists with the remote peer */ + eibmode:1, /* EIB Setmode issued */ + dialin:1, /* This is a SWITCHED DIALIN line */ + dialout:1, /* This is a SWITCHED DIALOUT line */ + have_cthread:1, /* the comm thread is running */ + dolisten:1, /* Start a listen */ + listening:1, /* Listening */ + haltpending:1, /* A request has been issued to halt current*/ + /* CCW */ + xparwwait:1, /* Transparent Write Wait state : a Write */ + /* was previously issued that turned the */ + /* line into transparent mode. Anything */ + /* else than another write, Sense or NO-OP */ + /* is rejected with SENSE_CR */ + /* This condition is reset upon receipt of */ + /* DLE/ETX or DLE/ETB on a subsequent write */ + input_overrun:1, /* The input ring buffer has overwritten */ + /* itself */ + in_textmode:1, /* Input buffer processing : text mode */ + in_xparmode:1, /* Input buffer processing : transparent */ + gotdle:1, /* DLE Received in inbound flow */ + pollsm:1, /* Issue Status Modifier on POLL Exit */ + badpoll:1, /* Bad poll data (>7 Bytes before ENQ) */ + callissued:1, /* The connect out for the DIAL/ENABLE */ + /* has already been issued */ + readcomp:1; /* Data in the read buffer completes a read */ +} COMMADPT; + +enum { + COMMADPT_LNCTL_BSC=1, /* BSC Line Control */ + COMMADPT_LNCTL_ASYNC /* ASYNC Line Control */ +} commadpt_lnctl; + +enum { + COMMADPT_PEND_IDLE=0, /* NO CCW currently executing */ + COMMADPT_PEND_READ, /* A READ CCW is running */ + COMMADPT_PEND_WRITE, /* A WRITE CCW is running */ + COMMADPT_PEND_ENABLE, /* A ENABLE CCW is running */ + COMMADPT_PEND_DIAL, /* A DIAL CCW is running */ + COMMADPT_PEND_DISABLE, /* A DISABLE CCW is running */ + COMMADPT_PEND_PREPARE, /* A PREPARE CCW is running */ + COMMADPT_PEND_POLL, /* A POLL CCW Is Running */ + COMMADPT_PEND_TINIT, /* */ + COMMADPT_PEND_CLOSED, /* */ + COMMADPT_PEND_SHUTDOWN /* */ +} commadpt_pendccw; + +#define COMMADPT_PEND_TEXT static char *commadpt_pendccw_text[]={\ + "IDLE",\ + "READ",\ + "WRITE",\ + "ENABLE",\ + "DIAL",\ + "DISABLE",\ + "PREPARE",\ + "POLL",\ + "TINIT",\ + "TCLOSED",\ + "SHUTDOWN"} + +#endif diff --git a/config.c b/config.c index f0b932d..51917d4 100644 --- a/config.c +++ b/config.c @@ -19,15 +19,15 @@ /* OSTAILOR parameter by Jay Maynard */ /* PANRATE parameter by Reed H. Petty */ /* CPUPRIO parameter by Jan Jaeger */ +/* HERCPRIO, TODPRIO, DEVPRIO parameters by Mark L. Gaubatz */ /* z/Architecture support - (c) Copyright Jan Jaeger, 1999-2003 */ /*-------------------------------------------------------------------*/ - #include "hercules.h" - #include "devtype.h" - #include "opcode.h" +#include "httpmisc.h" +#include "hostinfo.h" #if !defined(_GEN_ARCH) @@ -47,7 +47,12 @@ #include "w32chan.h" #endif // defined(OPTION_FISHIO) -extern DEVENT device_handler_table[]; +typedef struct _DEVARRAY +{ + U16 cuu1; + U16 cuu2; +} DEVARRAY; + /*-------------------------------------------------------------------*/ /* Internal macro definitions */ @@ -57,14 +62,16 @@ extern DEVENT device_handler_table[]; /*-------------------------------------------------------------------*/ /* Global data areas */ /*-------------------------------------------------------------------*/ -SYSBLK sysblk; /*-------------------------------------------------------------------*/ /* External GUI control */ /*-------------------------------------------------------------------*/ +/* Now defined in hsys.c */ +#if 0 #ifdef EXTERNALGUI int extgui = 0; /* 1=external gui active */ #endif /*EXTERNALGUI*/ +#endif /*-------------------------------------------------------------------*/ /* Static data areas */ @@ -77,10 +84,10 @@ static BYTE buf[256]; /* Config statement buffer */ #endif /*EXTERNALGUI*/ static BYTE *keyword; /* -> Statement keyword */ static BYTE *operand; /* -> First argument */ -#define MAX_ARGS 12 /* Max #of additional args */ static int addargc; /* Number of additional args */ static BYTE *addargv[MAX_ARGS]; /* Additional argument array */ + /*-------------------------------------------------------------------*/ /* Subroutine to parse an argument string. The string that is passed */ /* is modified in-place by inserting null characters at the end of */ @@ -129,7 +136,7 @@ int parse_args (BYTE* p, int maxargc, BYTE** pargv, int* pargc) return *pargc; } -static void delayed_exit (int exit_code) +void delayed_exit (int exit_code) { /* Delay exiting is to give the system * time to display the error message. */ @@ -137,6 +144,129 @@ static void delayed_exit (int exit_code) exit(exit_code); } + +/* storage configuration routine. To be moved *JJ */ +static void config_storage(int mainsize, int xpndsize) +{ + /* Obtain main storage */ + sysblk.mainsize = mainsize * 1024 * 1024; + +#if defined(NO_CYGWIN_MALLOC_BUG) || !defined(WIN32) + sysblk.mainstor = malloc(sysblk.mainsize + 8192); + + if (sysblk.mainstor == NULL) +#else + /* + Windows "double memory consumption" bug fix + (which should work on all other systems too) + + ============================================================= + From: golden_dog98 [golden_dog98@yahoo.com] + Sent: Monday, July 07, 2003 1:08 AM + To: hercules-390@yahoogroups.com + Subject: [hercules-390] To "Fish" (was: "Re: How can I use all my + physical memory") + + This problem is caused by how CYGWIN allocates memory under Windows + 2000. In malloc.cc, malloc() calls sYSMALLOc() to allocate chunks of + memory. sYSMALLOc calls mmap() with flags MAP_PRIVATE and + MAP_ANONYMOUS. mmap() calls mmap64() with the same flags. Around + line 540 of mmap.cc, mmap64() checks to see if MAP_PRIVATE is set and + if has_working_copy_on_write() is true (which it is for Win2000) and + sets access to FILE_MAP_COPY. mmap64() then calls + fhandler_disk_file::mmap() in mmap.cc. Because access is set to + FILE_MAP_COPY, protect is set to PAGE_WRITECOPY when CreateFileMapping + () is called. Then MapViewOfFileEx() is called with access set to + FILE_MAP_COPY. This allocates the storage with "copy on write + acess", which essentially doubles the storage usage. See + http://msdn.microsoft.com/library/default.asp?url=/library/en- + us/fileio/base/mapviewoffileex.asp. + + I changed line 1299 of Hercules' config.c to fix the problem: + + sysblk.mainstor = mmap(0, sysblk.mainsize + 8192, PROT_READ | + PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, -1, 0); + + I also had to include at the top of config.c: + + #include + + I tested this with a 512MB system and all went well.... + + Mark D. + ============================================================= + */ +#if !defined(MAP_ANONYMOUS) /* (see NOTE just below) */ + + /* *** NOTE: we can't use the "HAVE_MMAP" test above *** + *** because of a "Unix-ism" bug in autoconf that *** + *** causes mmap tests to always fail on Windows *** + *** systems as explained in the below Cygwin post *** + *** mailing list post: + + http://www.cygwin.com/ml/cygwin/2002-04/msg00412.html + */ + sysblk.mainstor = malloc(sysblk.mainsize + 8192); +/* ISW20030828-1 : Check for MALLOC result */ + if (sysblk.mainstor == NULL) +#else /* !defined(MAP_ANONYMOUS) */ + sysblk.mainstor = mmap(0, sysblk.mainsize + 8192, + PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, -1, 0); +/* ISW20030828-1 : Check for MMAP result */ + if (sysblk.mainstor == ((void *)-1)) +#endif /* !defined(MAP_ANONYMOUS) */ +#endif /* NO_CYGWIN_MALLOC_BUG */ + { + fprintf(stderr, _("HHCCF031S Cannot obtain %dMB main storage: %s\n"), + mainsize, strerror(errno)); + delayed_exit(1); + } + + /* Obtain main storage key array */ + sysblk.storkeys = malloc(sysblk.mainsize / STORAGE_KEY_UNITSIZE); + if (sysblk.storkeys == NULL) + { + fprintf(stderr, _("HHCCF032S Cannot obtain storage key array: %s\n"), + strerror(errno)); + delayed_exit(1); + } + + /* Initial power-on reset for main storage */ + memset(sysblk.mainstor,0,sysblk.mainsize); + memset(sysblk.storkeys,0,sysblk.mainsize / STORAGE_KEY_UNITSIZE); + +#if 0 /*DEBUG-JJ-20/03/2000*/ + /* Mark selected frames invalid for debugging purposes */ + for (i = 64 ; i < (sysblk.mainsize / STORAGE_KEY_UNITSIZE); i += 2) + if (i < (sysblk.mainsize / STORAGE_KEY_UNITSIZE) - 64) + sysblk.storkeys[i] = STORKEY_BADFRM; + else + sysblk.storkeys[i++] = STORKEY_BADFRM; +#endif + + if (xpndsize != 0) + { +#ifdef _FEATURE_EXPANDED_STORAGE + + /* Obtain expanded storage */ + sysblk.xpndsize = xpndsize * (1024*1024 / XSTORE_PAGESIZE); + sysblk.xpndstor = malloc(sysblk.xpndsize * XSTORE_PAGESIZE); + if (sysblk.xpndstor == NULL) + { + fprintf(stderr, _("HHCCF033S Cannot obtain %dMB expanded storage: " + "%s\n"), + xpndsize, strerror(errno)); + delayed_exit(1); + } + /* Initial power-on reset for expanded storage */ + memset(sysblk.xpndstor,0,sysblk.xpndsize * XSTORE_PAGESIZE); +#else /*!_FEATURE_EXPANDED_STORAGE*/ + logmsg(_("HHCCF034W Expanded storage support not installed\n")); +#endif /*!_FEATURE_EXPANDED_STORAGE*/ + } /* end if(sysblk.xpndsize) */ +} + + /*-------------------------------------------------------------------*/ /* Subroutine to read a statement from the configuration file */ /* The statement is then parsed into keyword, operand, and */ @@ -152,6 +282,9 @@ static int read_config (BYTE *fname, FILE *fp) int i; /* Array subscript */ int c; /* Character work area */ int stmtlen; /* Statement length */ +int lstarted; /* Indicate if non-whitespace*/ +char *cnfline; + /* has been seen yet in line */ while (1) { @@ -159,7 +292,7 @@ int stmtlen; /* Statement length */ stmt++; /* Read next statement from configuration file */ - for (stmtlen = 0; ;) + for (stmtlen = 0, lstarted = 0; ;) { /* Read character from configuration file */ c = fgetc(fp); @@ -167,7 +300,7 @@ int stmtlen; /* Statement length */ /* Check for I/O error */ if (ferror(fp)) { - logmsg(_("HHCCF001S Error reading file %s line %d: %s\n"), + fprintf(stderr, _("HHCCF001S Error reading file %s line %d: %s\n"), fname, stmt, strerror(errno)); delayed_exit(1); } @@ -183,10 +316,14 @@ int stmtlen; /* Statement length */ /* Ignore nulls and carriage returns */ if (c == '\0' || c == '\r') continue; + /* Check if it is a white space and no other character yet */ + if(!lstarted && isspace(c)) continue; + lstarted=1; + /* Check that statement does not overflow buffer */ if (stmtlen >= (int)(sizeof(buf) - 1)) { - logmsg(_("HHCCF002S File %s line %d is too long\n"), + fprintf(stderr, _("HHCCF002S File %s line %d is too long\n"), fname, stmt); delayed_exit(1); } @@ -205,9 +342,23 @@ int stmtlen; /* Statement length */ if (stmtlen == 0 || buf[0] == '*' || buf[0] == '#') continue; + cnfline = strdup(buf); + /* Parse the statement just read */ parse_args (buf, MAX_ARGS, addargv, &addargc); +#if defined(OPTION_DYNAMIC_LOAD) + if(config_command) + { + if( config_command(addargc, (char**)addargv, cnfline) ) + { + free(cnfline); + continue; + } + } +#endif /*defined(OPTION_DYNAMIC_LOAD)*/ + + free(cnfline); /* Move the first two arguments to separate variables */ @@ -227,68 +378,242 @@ int stmtlen; /* Statement length */ return 0; } /* end function read_config */ +/*-------------------------------------------------------------------*/ +/* Function to Parse compound device numbers */ +/* Syntax : CCUU[-CUU][,CUU..][.nn][...] */ +/* Examples : 200-23F */ +/* 200,201 */ +/* 200.16 */ +/* 200-23F,280.8 */ +/* etc... */ +/* - is the range specification (from CUU to CUU) */ +/* , is the separator */ +/* . is the count indicator (nn is decimal) */ +/* 1st parm is the specification string as specified above */ +/* 2nd parm is the address of an array of DEVARRAY */ +/* Return value : 0 - Parsing error, etc.. */ +/* >0 - Size of da */ +/* */ +/* NOTE : A basic validity check is made for the following : */ +/* All CUUs must belong on the same channel */ +/* (this check is to eventually pave the way to a formal */ +/* channel/cu/device architecture) */ +/* no 2 identical CCUUs */ +/* ex : 200,300 : WRONG */ +/* 200.12,200.32 : WRONG */ +/* 2FF.2 : WRONG */ +/* NOTE : caller should free the array returned in da if the return */ +/* value is not 0 */ +/*-------------------------------------------------------------------*/ +static size_t parse_devnums(const char *spec,DEVARRAY **da) +{ + size_t gcount; /* Group count */ + size_t i; /* Index runner */ + char *grps; /* Pointer to current devnum group */ + char *sc; /* Specification string copy */ + DEVARRAY *dgrs; /* Device groups */ + U16 cuu1,cuu2; /* CUUs */ + char *strptr; /* strtoul ptr-ptr */ +// FIXME: gcc 2.96 for BYTE causes invalid HHCCF057E ... WTF ?? +// BYTE basechan=0; /* Channel for all CUUs */ + int basechan=0; /* Channel for all CUUs */ + int duplicate; /* duplicated CUU indicator */ + int badcuu; /* offending CUU */ + + sc=malloc(strlen(spec)+1); + strcpy(sc,spec); + + /* Split by ',' groups */ + gcount=0; + grps=strtok(sc,","); + dgrs=NULL; + while(grps!=NULL) + { + if(dgrs==NULL) + { + dgrs=malloc(sizeof(DEVARRAY)); + } + else + { + dgrs=realloc(dgrs,(sizeof(DEVARRAY))*(gcount+1)); + } + cuu1=strtoul(grps,&strptr,16); + switch(*strptr) + { + case 0: /* Single CUU */ + cuu2=cuu1; + break; + case '-': /* CUU Range */ + cuu2=strtoul(&strptr[1],&strptr,16); + if(*strptr!=0) + { + fprintf(stderr,_("HHCCF053E Incorrect second device number in device range near character %c\n"),*strptr); + free(dgrs); + return(0); + } + break; + case '.': /* CUU Count */ + cuu2=cuu1+strtoul(&strptr[1],&strptr,10); + cuu2--; + if(*strptr!=0) + { + fprintf(stderr,_("HHCCF054E Incorrect Device count near character %c\n"),*strptr); + free(dgrs); + return(0); + } + break; + default: + fprintf(stderr,_("HHCCF055E Incorrect device address specification near character %c\n"),*strptr); + free(dgrs); + return(0); + } + /* Check cuu1 <= cuu2 */ + if(cuu1>cuu2) + { + fprintf(stderr,_("HHCCF056E Incorrect device address range. %4.4X < %4.4X\n"),cuu2,cuu1); + free(dgrs); + return(0); + } + if(gcount==0) + { + basechan=(cuu1 >> 8) & 0xff; + } + badcuu=-1; + if(((cuu1 >> 8) & 0xff) != basechan) + { + badcuu=cuu1; + } + else + { + if(((cuu2 >> 8) & 0xff) != basechan) + { + badcuu=cuu2; + } + } + if(badcuu>=0) + { + fprintf(stderr,_("HHCCF057E %4.4X is on wrong channel (1st device defined on channel %2.2X)\n"),badcuu,basechan); + free(dgrs); + return(0); + } + /* Check for duplicates */ + duplicate=0; + for(i=0;i=dgrs[i].cuu1 && cuu1<=dgrs[i].cuu2) + { + duplicate=1; + break; + } + /* check 2nd cuu not within existing range */ + if(cuu2>=dgrs[i].cuu1 && cuu1<=dgrs[i].cuu2) + { + duplicate=1; + break; + } + /* check current range doesn't completelly overlap existing range */ + if(cuu1dgrs[i].cuu2) + { + duplicate=1; + break; + } + } + if(duplicate) + { + fprintf(stderr,_("HHCCF058E Some or all devices in %4.4X-%4.4X duplicate devices already defined\n"),cuu1,cuu2); + free(dgrs); + return(0); + } + dgrs[gcount].cuu1=cuu1; + dgrs[gcount].cuu2=cuu2; + gcount++; + grps=strtok(NULL,","); + } + free(sc); + *da=dgrs; + return(gcount); +} +char *config_cnslport = "3270"; /*-------------------------------------------------------------------*/ /* Function to build system configuration */ /*-------------------------------------------------------------------*/ void build_config (BYTE *fname) { int rc; /* Return code */ -int i; /* Array subscript */ +int i,j; /* Array subscript */ int scount; /* Statement counter */ int cpu; /* CPU number */ -int pfd[2]; /* Message pipe handles */ -DEVBLK *dev; /* -> Device block */ FILE *fp; /* Configuration file pointer*/ BYTE *sserial; /* -> CPU serial string */ BYTE *smodel; /* -> CPU model string */ +BYTE *sversion; /* -> CPU version string */ BYTE *smainsize; /* -> Main size string */ BYTE *sxpndsize; /* -> Expanded size string */ -BYTE *scnslport; /* -> Console port number */ BYTE *snumcpu; /* -> Number of CPUs */ BYTE *snumvec; /* -> Number of VFs */ BYTE *sarchmode; /* -> Architectural mode */ BYTE *sloadparm; /* -> IPL load parameter */ BYTE *ssysepoch; /* -> System epoch */ BYTE *stzoffset; /* -> System timezone offset */ +BYTE *sdiag8cmd; /* -> Allow diagnose 8 */ BYTE *stoddrag; /* -> TOD clock drag factor */ BYTE *sostailor; /* -> OS to tailor system to */ BYTE *spanrate; /* -> Panel refresh rate */ BYTE *sdevtmax; /* -> Max device threads */ +BYTE *shercprio; /* -> Hercules base priority */ +BYTE *stodprio; /* -> Timer thread priority */ BYTE *scpuprio; /* -> CPU thread priority */ +BYTE *sdevprio; /* -> Device thread priority */ BYTE *spgmprdos; /* -> Program product OS OK */ -BYTE *scodepage; /* -> Code page */ -#if defined(OPTION_HTTP_SERVER) -BYTE *shttpport; /* -> HTTP port number */ -#endif /*defined(OPTION_HTTP_SERVER)*/ +#if defined(_FEATURE_ECPSVM) +BYTE *secpsvmlevel; /* -> ECPS:VM Keyword */ +BYTE *secpsvmlvl; /* -> ECPS:VM level (or 'no')*/ +int ecpsvmac; /* -> ECPS:VM add'l arg cnt */ +#endif /*defined(_FEATURE_ECPSVM)*/ +#if defined(OPTION_SHARED_DEVICES) +BYTE *sshrdport; /* -> Shared device port nbr */ +#endif /*defined(OPTION_SHARED_DEVICES)*/ #ifdef OPTION_IODELAY_KLUDGE BYTE *siodelay; /* -> I/O delay value */ #endif /*OPTION_IODELAY_KLUDGE*/ BYTE *scckd; /* -> CCKD parameters */ BYTE loadparm[8]; /* Load parameter (EBCDIC) */ BYTE version = 0x00; /* CPU version code */ +int dfltver = 1; /* Default version code */ U32 serial; /* CPU serial number */ U16 model; /* CPU model number */ -U16 mainsize; /* Main storage size (MB) */ -U16 xpndsize; /* Expanded storage size (MB)*/ -U16 cnslport; /* Console port number */ +int mainsize; /* Main storage size (MB) */ +int xpndsize; /* Expanded storage size (MB)*/ U16 numcpu; /* Number of CPUs */ U16 numvec; /* Number of VFs */ -#if defined(OPTION_HTTP_SERVER) -U16 httpport; /* HTTP port number */ -#endif /*defined(OPTION_HTTP_SERVER)*/ +#if defined(OPTION_SHARED_DEVICES) +U16 shrdport; /* Shared device port number */ +#endif /*defined(OPTION_SHARED_DEVICES)*/ int archmode; /* Architectural mode */ S32 sysepoch; /* System epoch year */ S32 tzoffset; /* System timezone offset */ +int diag8cmd; /* Allow diagnose 8 commands */ int toddrag; /* TOD clock drag factor */ U64 ostailor; /* OS to tailor system to */ int panrate; /* Panel refresh rate */ +int hercprio; /* Hercules base priority */ +int todprio; /* Timer thread priority */ int cpuprio; /* CPU thread priority */ +int devprio; /* Device thread priority */ BYTE pgmprdos; /* Program product OS OK */ BYTE *sdevnum; /* -> Device number string */ BYTE *sdevtype; /* -> Device type string */ U16 devnum; /* Device number */ +DEVARRAY *devnarray; /* Compound device numbers */ +size_t devncount; /* size of comp devnum array */ +int baddev; /* devblk attach failed ind */ int devtmax; /* Max number device threads */ +#if defined(_FEATURE_ECPSVM) +int ecpsvmavail; /* ECPS:VM Available flag */ +int ecpsvmlevel; /* ECPS:VM declared level */ +#endif /*defined(_FEATURE_ECPSVM)*/ #ifdef OPTION_IODELAY_KLUDGE int iodelay=-1; /* I/O delay value */ #endif /*OPTION_IODELAY_KLUDGE*/ @@ -300,56 +625,47 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- pipe is opened... prevents cygwin from thrashing in select(). sigh */ +#endif +#if defined(OPTION_CONFIG_SYMBOLS) +BYTE **newargv; +BYTE **orig_newargv; #endif - /* Clear the system configuration block */ - memset (&sysblk, 0, sizeof(SYSBLK)); + SET_IC_INITIAL_STATE; - /* Gabor Hoffer (performance option) */ - for (i = 0; i < 256; i++) - { - s370_opcode_table [i] = opcode_table [i][0]; - s390_opcode_table [i] = opcode_table [i][1]; - z900_opcode_table [i] = opcode_table [i][2]; - } +#if !defined(OPTION_CONFIG_SYMBOLS) + UNREFERENCED(j); +#endif /* Initialize SETMODE and set user authority */ SETMODE(INIT); - /* Direct logmsg output to stderr during initialization */ - sysblk.msgpipew = stderr; - #ifdef OPTION_SELECT_KLUDGE /* Reserve some fd's to be used later for the message pipes */ for (i = 0; i < OPTION_SELECT_KLUDGE; i++) dummyfd[i] = dup(fileno(stderr)); #endif - if((scodepage = getenv("HERCULES_CP"))) - set_codepage(scodepage); - else - set_codepage("default"); - /* Open the configuration file */ fp = fopen (fname, "r"); if (fp == NULL) { - logmsg(_("HHCCF003S Cannot open file %s: %s\n"), + fprintf(stderr, _("HHCCF003S Cannot open file %s: %s\n"), fname, strerror(errno)); delayed_exit(1); } - + /* Set the default system parameter values */ serial = 0x000001; model = 0x0586; mainsize = 2; xpndsize = 0; - cnslport = 3270; - numcpu = 1; + numcpu = 0; numvec = MAX_CPU_ENGINES; memset (loadparm, 0x4B, 8); sysepoch = 1900; tzoffset = 0; + diag8cmd = 0; toddrag = 1; #if defined(_390) archmode = ARCH_390; @@ -358,12 +674,38 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- #endif ostailor = OS_NONE; panrate = PANEL_REFRESH_RATE_SLOW; - cpuprio = 15; + hercprio = DEFAULT_HERCPRIO; + todprio = DEFAULT_TOD_PRIO; + cpuprio = DEFAULT_CPU_PRIO; + devprio = DEFAULT_DEV_PRIO; pgmprdos = PGM_PRD_OS_RESTRICTED; devtmax = MAX_DEVICE_THREADS; -#if defined(OPTION_HTTP_SERVER) - httpport = 0; -#endif /*defined(OPTION_HTTP_SERVER)*/ +#if defined(_FEATURE_ECPSVM) + ecpsvmavail = 0; + ecpsvmlevel = 20; +#endif /*defined(_FEATURE_ECPSVM)*/ +#if defined(OPTION_SHARED_DEVICES) + shrdport = 0; +#endif /*defined(OPTION_SHARED_DEVICES)*/ + + + /* Cap the default priorities at zero if setuid not available */ +#if !defined(NO_SETUID) + if (sysblk.suid != 0) + { +#endif /*!defined(NO_SETUID)*/ + if (hercprio < 0) + hercprio = 0; + if (todprio < 0) + todprio = 0; + if (cpuprio < 0) + cpuprio = 0; + if (devprio < 0) + devprio = 0; +#if !defined(NO_SETUID) + } +#endif /*!defined(NO_SETUID)*/ + /* Read records from the configuration file */ for (scount = 0; ; scount++) @@ -371,7 +713,7 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- /* Read next record from the configuration file */ if ( read_config (fname, fp) ) { - logmsg(_("HHCCF004S No device records in file %s\n"), + fprintf(stderr, _("HHCCF004S No device records in file %s\n"), fname); delayed_exit(1); } @@ -380,29 +722,52 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- if (strlen(keyword) <= 4 && sscanf(keyword, "%x%c", &rc, &c) == 1) break; + /* ISW */ + /* Also exit if keyword contains '-', ',' or '.' */ + /* Added because device statements may now be a compound device number specification */ + if(strchr(keyword,'-')) + { + break; + } + if(strchr(keyword,'.')) + { + break; + } + if(strchr(keyword,',')) + { + break; + } /* Clear the operand value pointers */ sserial = NULL; smodel = NULL; + sversion = NULL; smainsize = NULL; sxpndsize = NULL; - scnslport = NULL; snumcpu = NULL; snumvec = NULL; sarchmode = NULL; sloadparm = NULL; ssysepoch = NULL; stzoffset = NULL; + sdiag8cmd = NULL; stoddrag = NULL; sostailor = NULL; spanrate = NULL; + shercprio = NULL; + stodprio = NULL; scpuprio = NULL; + sdevprio = NULL; sdevtmax = NULL; spgmprdos = NULL; - scodepage = NULL; -#if defined(OPTION_HTTP_SERVER) - shttpport = NULL; -#endif /*defined(OPTION_HTTP_SERVER)*/ +#if defined(_FEATURE_ECPSVM) + secpsvmlevel = NULL; + secpsvmlvl = NULL; + ecpsvmac = 0; +#endif /*defined(_FEATURE_ECPSVM)*/ +#if defined(OPTION_SHARED_DEVICES) + sshrdport = NULL; +#endif /*defined(OPTION_SHARED_DEVICES)*/ #ifdef OPTION_IODELAY_KLUDGE siodelay = NULL; #endif /*OPTION_IODELAY_KLUDGE*/ @@ -416,12 +781,29 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- smodel = operand; smainsize = addargv[0]; sxpndsize = addargv[1]; - scnslport = addargv[2]; + config_cnslport = strdup(addargv[2]); snumcpu = addargv[3]; sloadparm = addargv[4]; } else { +#if defined(OPTION_DYNAMIC_LOAD) + if (!strcasecmp (keyword, "modpath")) + { + hdl_setpath(strdup(operand)); + } + else + if (!strcasecmp (keyword, "ldmod")) + { + hdl_load(operand, 0); + + for(i = 0; i < addargc; i++) + hdl_load(addargv[i], 0); + + addargc = 0; + } + else +#endif /*defined(OPTION_DYNAMIC_LOAD)*/ if (strcasecmp (keyword, "cpuserial") == 0) { sserial = operand; @@ -440,7 +822,7 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- } else if (strcasecmp (keyword, "cnslport") == 0) { - scnslport = operand; + config_cnslport = strdup(operand); } else if (strcasecmp (keyword, "numcpu") == 0) { @@ -462,6 +844,10 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- { stzoffset = operand; } + else if (strcasecmp (keyword, "diag8cmd") == 0) + { + sdiag8cmd = operand; + } #ifdef OPTION_TODCLOCK_DRAG_FACTOR else if (strcasecmp (keyword, "toddrag") == 0) { @@ -482,10 +868,26 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- { sarchmode = operand; } + else if (strcasecmp (keyword, "cpuverid") == 0) + { + sversion = operand; + } + else if (strcasecmp (keyword, "hercprio") == 0) + { + shercprio = operand; + } + else if (strcasecmp (keyword, "todprio") == 0) + { + stodprio = operand; + } else if (strcasecmp (keyword, "cpuprio") == 0) { scpuprio = operand; } + else if (strcasecmp (keyword, "devprio") == 0) + { + sdevprio = operand; + } else if (strcasecmp (keyword, "devtmax") == 0) { sdevtmax = operand; @@ -496,85 +898,157 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- } else if (strcasecmp (keyword, "codepage") == 0) { - scodepage = operand; + set_codepage(operand); + } +#if defined(_FEATURE_ECPSVM) + /* ECPS:VM support */ + else if(strcasecmp(keyword, "ecps:vm") == 0) + { + secpsvmlevel=operand; + secpsvmlvl=addargv[0]; + ecpsvmac=addargc; + fprintf(stderr, _("HHCCF061W Warning in %s line %d: " + "ECPS:VM Statement deprecated. Use ECPSVM instead\n"), + fname, stmt); + } + else if(strcasecmp(keyword, "ecpsvm") == 0) + { + secpsvmlevel=operand; + secpsvmlvl=addargv[0]; + ecpsvmac=addargc; } +#endif /*defined(_FEATURE_ECPSVM)*/ #ifdef OPTION_IODELAY_KLUDGE else if (strcasecmp (keyword, "iodelay") == 0) { siodelay = operand; } #endif /*OPTION_IODELAY_KLUDGE*/ +#if defined(OPTION_CONFIG_SYMBOLS) + else if (strcasecmp(keyword,"defsym")==0) + { + char *subval; + /* Execute this operation immediatelly */ + if(operand==NULL) + { + fprintf(stderr, _("HHCCF059S Error in %s line %d: " + "Missing symbol name on DEFSYM statement\n"), + fname, stmt); + delayed_exit(1); + } + if(addargc!=1) + { + fprintf(stderr, _("HHCCF060S Error in %s line %d: " + "DEFSYM requires a single symbol value (include quotation marks if necessary)\n"), + fname, stmt); + delayed_exit(1); + } + subval=resolve_symbol_string(addargv[0]); + if(subval!=NULL) + { + set_symbol(operand,subval); + free(subval); + } + else + { + set_symbol(operand,addargv[0]); + } + addargc--; + } +#endif /* defined(OPTION_CONFIG_SYMBOLS) */ #if defined(OPTION_HTTP_SERVER) else if (strcasecmp (keyword, "httpport") == 0) { - shttpport = operand; - if(addargc > 0) + if (!operand) { - if(!strcasecmp(addargv[0],"auth")) + fprintf(stderr, _("HHCCF007S Error in %s line %d: " + "Missing argument.\n"), + fname, stmt); + delayed_exit(1); + } + if (sscanf(operand, "%hu%c", &sysblk.httpport, &c) != 1 + || sysblk.httpport == 0 || (sysblk.httpport < 1024 && sysblk.httpport != 80) ) + { + fprintf(stderr, _("HHCCF029S Error in %s line %d: " + "Invalid HTTP port number %s\n"), + fname, stmt, operand); + delayed_exit(1); + } + if (addargc > 0) + { + if (!strcasecmp(addargv[0],"auth")) sysblk.httpauth = 1; - else if(strcasecmp(addargv[0],"noauth")) + else if (strcasecmp(addargv[0],"noauth")) { - logmsg(_("HHCCF005S Error in %s line %d: " - "Unrecognized argument %s\n"), - fname, stmt, addargv[0]); + fprintf(stderr, _("HHCCF005S Error in %s line %d: " + "Unrecognized argument %s\n"), + fname, stmt, addargv[0]); delayed_exit(1); } addargc--; } - if(addargc > 0) + if (addargc > 0) { + if (sysblk.httpuser) free(sysblk.httpuser); sysblk.httpuser = strdup(addargv[1]); - if(--addargc) + if (--addargc) + { + if (sysblk.httppass) free(sysblk.httppass); sysblk.httppass = strdup(addargv[2]); + } else { - logmsg(_("HHCCF006S Error in %s line %d: " - "Userid, but no password given %s\n"), - fname, stmt, addargv[1]); + fprintf(stderr, _("HHCCF006S Error in %s line %d: " + "Userid, but no password given %s\n"), + fname, stmt, addargv[1]); delayed_exit(1); } addargc--; } - + } else if (strcasecmp (keyword, "httproot") == 0) { - if (operand) - sysblk.httproot = strdup(operand); - else + if (!operand) { - logmsg(_("HHCCF007S Error in %s line %d: " - "Missing argument.\n"), + fprintf(stderr, _("HHCCF007S Error in %s line %d: " + "Missing argument.\n"), fname, stmt); delayed_exit(1); } + if (sysblk.httproot) free(sysblk.httproot); + sysblk.httproot = strdup(operand); + /* (will be validated later) */ } #endif /*defined(OPTION_HTTP_SERVER)*/ +#if defined(OPTION_SHARED_DEVICES) + else if (strcasecmp (keyword, "shrdport") == 0) + { + sshrdport = operand; + } +#endif /*defined(OPTION_SHARED_DEVICES)*/ else if (strcasecmp (keyword, "cckd") == 0) { scckd = operand; } else { - logmsg(_("HHCCF008S Error in %s line %d: " + logmsg( _("HHCCF008E Error in %s line %d: " "Unrecognized keyword %s\n"), fname, stmt, keyword); - delayed_exit(1); + operand = ""; + addargc = 0; } /* Check for one and only one operand */ if (operand == NULL || addargc != 0) { - logmsg(_("HHCCF009S Error in %s line %d: " + logmsg( _("HHCCF009E Error in %s line %d: " "Incorrect number of operands\n"), fname, stmt); - delayed_exit(1); } } - if(scodepage) - set_codepage(scodepage); - if (sarchmode != NULL) { #if defined(_370) @@ -599,7 +1073,7 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- else #endif { - logmsg(_("HHCCF010S Error in %s line %d: " + fprintf(stderr, _("HHCCF010S Error in %s line %d: " "Unknown or unsupported ARCHMODE specification %s\n"), fname, stmt, sarchmode); delayed_exit(1); @@ -611,13 +1085,27 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- sysblk.arch_z900 = sysblk.arch_mode != ARCH_390; #endif + /* Parse CPU version number operand */ + if (sversion != NULL) + { + if (strlen(sversion) != 2 + || sscanf(sversion, "%hhx%c", &version, &c) != 1) + { + fprintf(stderr, _("HHCCF012S Error in %s line %d: " + "%s is not a valid CPU version code\n"), + fname, stmt, sversion); + delayed_exit(1); + } + dfltver = 0; + } + /* Parse CPU serial number operand */ if (sserial != NULL) { if (strlen(sserial) != 6 || sscanf(sserial, "%x%c", &serial, &c) != 1) { - logmsg(_("HHCCF011S Error in %s line %d: " + fprintf(stderr, _("HHCCF051S Error in %s line %d: " "%s is not a valid serial number\n"), fname, stmt, sserial); delayed_exit(1); @@ -630,7 +1118,7 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- if (strlen(smodel) != 4 || sscanf(smodel, "%hx%c", &model, &c) != 1) { - logmsg(_("HHCCF012S Error in %s line %d: " + fprintf(stderr, _("HHCCF012S Error in %s line %d: " "%s is not a valid CPU model\n"), fname, stmt, smodel); delayed_exit(1); @@ -640,10 +1128,10 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- /* Parse main storage size operand */ if (smainsize != NULL) { - if (sscanf(smainsize, "%hu%c", &mainsize, &c) != 1 + if (sscanf(smainsize, "%u%c", &mainsize, &c) != 1 || mainsize < 2 || mainsize > 1024) { - logmsg(_("HHCCF013S Error in %s line %d: " + fprintf(stderr, _("HHCCF013S Error in %s line %d: " "Invalid main storage size %s\n"), fname, stmt, smainsize); delayed_exit(1); @@ -653,35 +1141,63 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- /* Parse expanded storage size operand */ if (sxpndsize != NULL) { - if (sscanf(sxpndsize, "%hu%c", &xpndsize, &c) != 1 + if (sscanf(sxpndsize, "%u%c", &xpndsize, &c) != 1 || xpndsize > 1024) { - logmsg(_("HHCCF014S Error in %s line %d: " + fprintf(stderr, _("HHCCF014S Error in %s line %d: " "Invalid expanded storage size %s\n"), fname, stmt, sxpndsize); delayed_exit(1); } } - /* Parse console port number operand */ - if (scnslport != NULL) + /* Parse Hercules priority operand */ + if (shercprio != NULL) + if (sscanf(shercprio, "%d%c", &hercprio, &c) != 1) + { + fprintf(stderr, _("HHCCF016S Error in %s line %d: " + "Invalid Hercules process group thread priority %s\n"), + fname, stmt, shercprio); + delayed_exit(1); + } + +#if !defined(NO_SETUID) + if(sysblk.suid != 0 && hercprio < 0) { - if (sscanf(scnslport, "%hu%c", &cnslport, &c) != 1 - || cnslport == 0) + logmsg(_("HHCCF017W Hercules is not running as setuid root, " + "cannot raise Hercules process group thread priority\n")); + hercprio = 0; /* Set priority to Normal */ + } +#endif /*!defined(NO_SETUID)*/ + + sysblk.hercprio = hercprio; + + /* Parse TOD Clock priority operand */ + if (stodprio != NULL) + if (sscanf(stodprio, "%d%c", &todprio, &c) != 1) { - logmsg(_("HHCCF015S Error in %s line %d: " - "Invalid console port number %s\n"), - fname, stmt, scnslport); + fprintf(stderr, _("HHCCF016S Error in %s line %d: " + "Invalid TOD Clock thread priority %s\n"), + fname, stmt, stodprio); delayed_exit(1); } + +#if !defined(NO_SETUID) + if(sysblk.suid != 0 && todprio < 0) + { + logmsg(_("HHCCF017W Hercules is not running as setuid root, " + "cannot raise TOD Clock thread priority\n")); + todprio = 0; /* Set priority to Normal */ } +#endif /*!defined(NO_SETUID)*/ + + sysblk.todprio = todprio; /* Parse CPU thread priority operand */ if (scpuprio != NULL) - { if (sscanf(scpuprio, "%d%c", &cpuprio, &c) != 1) { - logmsg(_("HHCCF016S Error in %s line %d: " + fprintf(stderr, _("HHCCF016S Error in %s line %d: " "Invalid CPU thread priority %s\n"), fname, stmt, scpuprio); delayed_exit(1); @@ -689,21 +1205,58 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- #if !defined(NO_SETUID) if(sysblk.suid != 0 && cpuprio < 0) + { logmsg(_("HHCCF017W Hercules is not running as setuid root, " "cannot raise CPU priority\n")); + cpuprio = 0; /* Set priority to Normal */ + } #endif /*!defined(NO_SETUID)*/ - } - else sysblk.cpuprio = cpuprio; + /* Parse Device thread priority operand */ + if (sdevprio != NULL) + if (sscanf(sdevprio, "%d%c", &devprio, &c) != 1) + { + fprintf(stderr, _("HHCCF016S Error in %s line %d: " + "Invalid device thread priority %s\n"), + fname, stmt, sdevprio); + delayed_exit(1); + } + +#if !defined(NO_SETUID) + if(sysblk.suid != 0 && devprio < 0) + logmsg(_("HHCCF017W Hercules is not running as setuid root, " + "cannot raise device thread priority\n")); +#endif /*!defined(NO_SETUID)*/ + + sysblk.devprio = devprio; + + /* Parse Device thread priority operand */ + if (sdevprio != NULL) + if (sscanf(sdevprio, "%d%c", &devprio, &c) != 1) + { + fprintf(stderr, _("HHCCF016S Error in %s line %d: " + "Invalid device thread priority %s\n"), + fname, stmt, sdevprio); + delayed_exit(1); + } + +#if !defined(NO_SETUID) + if(sysblk.suid != 0 && devprio < 0) + logmsg(_("HHCCF017W Hercules is not running as setuid root, " + "cannot raise device thread priority\n")); +#endif /*!defined(NO_SETUID)*/ + + sysblk.devprio = devprio; + /* Parse number of CPUs operand */ if (snumcpu != NULL) { if (sscanf(snumcpu, "%hu%c", &numcpu, &c) != 1 - || numcpu < 1 || numcpu > MAX_CPU_ENGINES) + || numcpu > MAX_CPU_ENGINES) { - logmsg(_("HHCCF018S Error in %s line %d: " + fprintf(stderr, _("HHCCF018S Error in %s line %d: " "Invalid number of CPUs %s\n"), fname, stmt, snumcpu); delayed_exit(1); @@ -717,7 +1270,7 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- if (sscanf(snumvec, "%hu%c", &numvec, &c) != 1 || numvec > MAX_CPU_ENGINES) { - logmsg(_("HHCCF019S Error in %s line %d: " + fprintf(stderr, _("HHCCF019S Error in %s line %d: " "Invalid number of VFs %s\n"), fname, stmt, snumvec); delayed_exit(1); @@ -732,7 +1285,7 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- { if (strlen(sloadparm) > 8) { - logmsg(_("HHCCF021S Error in %s line %d: " + fprintf(stderr, _("HHCCF021S Error in %s line %d: " "Load parameter %s exceeds 8 characters\n"), fname, stmt, sloadparm); delayed_exit(1); @@ -754,7 +1307,7 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- && (sysepoch != 1970) )) { - logmsg(_("HHCCF022S Error in %s line %d: " + fprintf(stderr, _("HHCCF022S Error in %s line %d: " "%s is not a valid system epoch.\n" "Patch config.c to expand the table\n"), fname, stmt, ssysepoch); @@ -769,21 +1322,38 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- || sscanf(stzoffset, "%d%c", &tzoffset, &c) != 1 || (tzoffset < -2359) || (tzoffset > 2359)) { - logmsg(_("HHCCF023S Error in %s line %d: " + fprintf(stderr, _("HHCCF023S Error in %s line %d: " "%s is not a valid timezone offset\n"), fname, stmt, stzoffset); delayed_exit(1); } } -#ifdef OPTION_TODCLOCK_DRAG_FACTOR - /* Parse TOD clock drag factor operand */ - if (stoddrag != NULL) + /* Parse diag8cmd operand */ + if (sdiag8cmd != NULL) + { + if (strcasecmp (sdiag8cmd, "enable") == 0) + diag8cmd = 1; + else + if (strcasecmp (sdiag8cmd, "disable") == 0) + diag8cmd = 0; + else + { + fprintf(stderr, _("HHCCF052S Error in %s line %d: " + "%s: invalid argument\n"), + fname, stmt, sdiag8cmd); + delayed_exit(1); + } + } + +#ifdef OPTION_TODCLOCK_DRAG_FACTOR + /* Parse TOD clock drag factor operand */ + if (stoddrag != NULL) { if (sscanf(stoddrag, "%u%c", &toddrag, &c) != 1 || toddrag < 1 || toddrag > 10000) { - logmsg(_("HHCCF024S Error in %s line %d: " + fprintf(stderr, _("HHCCF024S Error in %s line %d: " "Invalid TOD clock drag factor %s\n"), fname, stmt, stoddrag); delayed_exit(1); @@ -807,7 +1377,7 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- if (sscanf(spanrate, "%u%c", &panrate, &c) != 1 || panrate < (1000/CLK_TCK) || panrate > 5000) { - logmsg(_("HHCCF025S Error in %s line %d: " + fprintf(stderr, _("HHCCF025S Error in %s line %d: " "Invalid panel refresh rate %s\n"), fname, stmt, spanrate); delayed_exit(1); @@ -846,7 +1416,7 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- } else { - logmsg(_("HHCCF026S Error in %s line %d: " + fprintf(stderr, _("HHCCF026S Error in %s line %d: " "Unknown OS tailor specification %s\n"), fname, stmt, sostailor); delayed_exit(1); @@ -859,7 +1429,7 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- if (sscanf(sdevtmax, "%d%c", &devtmax, &c) != 1 || devtmax < -1) { - logmsg(_("HHCCF027S Error in %s line %d: " + fprintf(stderr, _("HHCCF027S Error in %s line %d: " "Invalid maximum device threads %s\n"), fname, stmt, sdevtmax); delayed_exit(1); @@ -884,27 +1454,93 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- } else { - logmsg(_("HHCCF028S Error in %s line %d: " + fprintf(stderr, _("HHCCF028S Error in %s line %d: " "Invalid program product OS permission %s\n"), fname, stmt, spgmprdos); delayed_exit(1); } } -#if defined(OPTION_HTTP_SERVER) - /* Parse http port number operand */ - if (shttpport != NULL) +#if defined(_FEATURE_ECPSVM) + /* Parse ECPS:VM level */ + if(secpsvmlevel != NULL) + { + while(1) /* Dummy while loop for break support */ + { + ecpsvmavail=0; + ecpsvmlevel=0; + if(strcasecmp(secpsvmlevel,"no")==0) + { + ecpsvmavail=0; + break; + } + if(strcasecmp(secpsvmlevel,"yes")==0) + { + ecpsvmavail=1; + ecpsvmlevel=20; + break; + } + if(strcasecmp(secpsvmlevel,"level")==0) + { + ecpsvmavail=1; + if(ecpsvmac==0) + { + fprintf(stderr, _("HHCCF062W Warning in %s line %d: " + "Missing ECPSVM level value. 20 Assumed\n"), + fname, stmt); + ecpsvmavail=1; + ecpsvmlevel=20; + break; + } + if (sscanf(secpsvmlvl, "%d%c", &ecpsvmlevel, &c) != 1) + { + fprintf(stderr, _("HHCCF051W Warning in %s line %d: " + "Invalid ECPSVM level value : %s. 20 Assumed\n"), + fname, stmt, secpsvmlevel); + ecpsvmavail=1; + ecpsvmlevel=20; + break; + } + break; + } + ecpsvmavail=1; + if (sscanf(secpsvmlevel, "%d%c", &ecpsvmlevel, &c) != 1) + { + fprintf(stderr, _("HHCCF051W Error in %s line %d: " + "Invalid ECPSVM keyword : %s. NO Assumed\n"), + fname, stmt, secpsvmlevel); + ecpsvmavail=0; + ecpsvmlevel=0; + break; + } + else + { + fprintf(stderr, _("HHCCF063W Warning in %s line %d: " + "Specifying ECPSVM level directly is deprecated. Use the 'LEVEL' keyword instead.\n"), + fname, stmt); + break; + } + break; + } + sysblk.ecpsvm.available=ecpsvmavail; + sysblk.ecpsvm.level=ecpsvmlevel; + } +#endif /*defined(_FEATURE_ECPSVM)*/ + +#if defined(OPTION_SHARED_DEVICES) + /* Parse shared device port number operand */ + if (sshrdport != NULL) { - if (sscanf(shttpport, "%hu%c", &httpport, &c) != 1 - || httpport == 0 || (httpport < 1024 && httpport != 80) ) + if (sscanf(sshrdport, "%hu%c", &shrdport, &c) != 1 + || shrdport < 1024 ) { - logmsg(_("HHCCF029S Error in %s line %d: " - "Invalid HTTP port number %s\n"), - fname, stmt, shttpport); + fprintf(stderr, _("HHCCF029S Error in %s line %d: " + "Invalid SHRDPORT port number %s\n"), + fname, stmt, sshrdport); delayed_exit(1); } } -#endif /*defined(OPTION_HTTP_SERVER)*/ +#endif /*defined(OPTION_SHARED_DEVICES)*/ #ifdef OPTION_IODELAY_KLUDGE /* Parse I/O delay value */ @@ -912,7 +1548,7 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- { if (sscanf(siodelay, "%d%c", &iodelay, &c) != 1) { - logmsg(_("HHCCF030S Error in %s line %d: " + fprintf(stderr, _("HHCCF030S Error in %s line %d: " "Invalid I/O delay value: %s\n"), fname, stmt, siodelay); delayed_exit(1); @@ -922,66 +1558,44 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- /* Parse cckd value value */ if (scckd) - if (cckd_command (scckd, 0)) - delayed_exit(1); + cckd_command (scckd, 0); } /* end for(scount) */ - /* Obtain main storage */ - sysblk.mainsize = mainsize * 1024 * 1024; - sysblk.mainstor = malloc(sysblk.mainsize); - if (sysblk.mainstor == NULL) - { - logmsg(_("HHCCF031S Cannot obtain %dMB main storage: %s\n"), - mainsize, strerror(errno)); - delayed_exit(1); - } + /* Set root mode in order to set priority */ + SETMODE(ROOT); - /* Obtain main storage key array */ - sysblk.storkeys = malloc(sysblk.mainsize / STORAGE_KEY_UNITSIZE); - if (sysblk.storkeys == NULL) - { - logmsg(_("HHCCF032S Cannot obtain storage key array: %s\n"), - strerror(errno)); - delayed_exit(1); - } + /* Set Hercules base priority */ + if (setpriority(PRIO_PGRP, 0, hercprio)) + logmsg (_("HHCCF064W Hercules set priority %d failed: %s\n"), + hercprio, strerror(errno)); -#if 0 /*DEBUG-JJ-20/03/2000*/ - /* Mark selected frames invalid for debugging purposes */ - for (i = 64 ; i < (sysblk.mainsize / STORAGE_KEY_UNITSIZE); i += 2) - if (i < (sysblk.mainsize / STORAGE_KEY_UNITSIZE) - 64) - sysblk.storkeys[i] = STORKEY_BADFRM; - else - sysblk.storkeys[i++] = STORKEY_BADFRM; -#endif + /* Back to user mode */ + SETMODE(USER); - if (xpndsize != 0) - { -#ifdef _FEATURE_EXPANDED_STORAGE + /* Display Hercules thread information on control panel */ + logmsg (_("HHCCF065I Hercules: tid="TIDPAT", pid=%d, pgid=%d, " + "priority=%d\n"), + thread_id(), getpid(), getpgid(0), + getpriority(PRIO_PGRP,0)); - /* Obtain expanded storage */ - sysblk.xpndsize = xpndsize * (1024*1024 / XSTORE_PAGESIZE); - sysblk.xpndstor = malloc(sysblk.xpndsize * XSTORE_PAGESIZE); - if (sysblk.xpndstor == NULL) - { - logmsg(_("HHCCF033S Cannot obtain %dMB expanded storage: " - "%s\n"), - xpndsize, strerror(errno)); - delayed_exit(1); - } -#else /*!_FEATURE_EXPANDED_STORAGE*/ - logmsg(_("HHCCF034W Expanded storage support not installed\n")); -#endif /*!_FEATURE_EXPANDED_STORAGE*/ - } /* end if(sysblk.xpndsize) */ + config_storage(mainsize, xpndsize); - /* Save the console port number */ - sysblk.cnslport = cnslport; +#if defined(OPTION_SHARED_DEVICES) + sysblk.shrdport = shrdport; +#endif /*defined(OPTION_SHARED_DEVICES)*/ -#if defined(OPTION_HTTP_SERVER) - sysblk.httpport = httpport; -#endif /*defined(OPTION_HTTP_SERVER)*/ + sysblk.diag8cmd = diag8cmd; +#if defined(_370) || defined(_390) + if(dfltver) + version = +#if defined(_900) + (sysblk.arch_mode == ARCH_900) ? 0x00 : +#endif + 0xFD; +#endif /* Build CPU identifier */ sysblk.cpuid = ((U64)version << 56) | ((U64)serial << 32) @@ -995,33 +1609,21 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- initialize_lock (&sysblk.mainlock); initialize_lock (&sysblk.intlock); initialize_lock (&sysblk.sigplock); -#if MAX_CPU_ENGINES == 1 || !defined(OPTION_FAST_INTCOND) - initialize_condition (&sysblk.intcond); -#endif -#if MAX_CPU_ENGINES > 1 initialize_condition (&sysblk.broadcast_cond); -#ifdef SMP_SERIALIZATION - for(i = 0; i < MAX_CPU_ENGINES; i++) - initialize_lock (&sysblk.regs[i].serlock); -#endif /*SMP_SERIALIZATION*/ -#endif /*MAX_CPU_ENGINES > 1*/ initialize_detach_attr (&sysblk.detattr); #if defined(OPTION_CPU_UTILIZATION) for(i = 0; i < MAX_CPU_ENGINES; i++) initialize_lock (&sysblk.regs[i].accum_wait_time_lock); #endif /*defined(OPTION_CPU_UTILIZATION)*/ -#if defined(OPTION_W32_CTCI) - tt32_init(sysblk.msgpipew); -#endif /* defined(OPTION_W32_CTCI) */ + #if defined(OPTION_FISHIO) - InitIOScheduler // initialize i/o scheduler... - ( - sysblk.msgpipew, // (for issuing msgs to Herc console) - sysblk.arch_mode, // (for calling execute_ccw_chain) - DEVICE_THREAD_PRIORITY, // (for calling fthread_create) - MAX_DEVICE_THREAD_IDLE_SECS, // (maximum device thread wait time) - devtmax // (maximum #of device threads allowed) - ); + InitIOScheduler // initialize i/o scheduler... + ( + sysblk.arch_mode, // (for calling execute_ccw_chain) + &sysblk.devprio, // (ptr to device thread priority) + MAX_DEVICE_THREAD_IDLE_SECS, // (maximum device thread wait time) + devtmax // (maximum #of device threads allowed) + ); #else // !defined(OPTION_FISHIO) initialize_lock (&sysblk.ioqlock); initialize_condition (&sysblk.ioqcond); @@ -1030,11 +1632,6 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- sysblk.devtwait = sysblk.devtnbr = sysblk.devthwm = sysblk.devtunavail = 0; #endif // defined(OPTION_FISHIO) - InitializeListHead(&bind_head); - initialize_lock(&bind_lock); - - /* Initialize HercIFC fd's */ - sysblk.ifcfd[0] = sysblk.ifcfd[1] = -1; /* Set up the system TOD clock offset: compute the number of seconds from the designated year to 1970 for TOD clock @@ -1093,7 +1690,7 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- /* Set the panel refresh rate */ sysblk.panrate = panrate; -#if defined(FEATURE_REGION_RELOCATE) +#if defined(_FEATURE_REGION_RELOCATE) /* Initialize base zone storage view (SIE compat) */ for(i = 0; i < FEATURE_SIE_MAXZONES; i++) { @@ -1112,6 +1709,20 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- } #endif + /* Gabor Hoffer (performance option) */ + for (i = 0; i < 256; i++) + { +#if defined(_370) + s370_opcode_table [i] = opcode_table [i][ARCH_370]; +#endif +#if defined(_390) + s390_opcode_table [i] = opcode_table [i][ARCH_390]; +#endif +#if defined(_900) + z900_opcode_table [i] = opcode_table [i][ARCH_900]; +#endif + } + /* Initialize the CPU registers */ for (cpu = 0; cpu < MAX_CPU_ENGINES; cpu++) { @@ -1136,9 +1747,7 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- sysblk.regs[cpu].vf = &sysblk.vf[cpu]; #endif /*defined(_FEATURE_VECTOR_FACILITY)*/ -#if MAX_CPU_ENGINES > 1 && defined(OPTION_FAST_INTCOND) initialize_condition (&sysblk.regs[cpu].intcond); -#endif #if defined(_FEATURE_SIE) sysblk.sie_regs[cpu] = sysblk.regs[cpu]; @@ -1157,24 +1766,69 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- if (sdevnum == NULL || sdevtype == NULL) { - logmsg(_("HHCCF035S Error in %s line %d: " + fprintf(stderr, _("HHCCF035S Error in %s line %d: " "Missing device number or device type\n"), fname, stmt); delayed_exit(1); } + /* Parse devnum */ + devncount=parse_devnums(sdevnum,&devnarray); - if (strlen(sdevnum) > 4 - || sscanf(sdevnum, "%hx%c", &devnum, &c) != 1) + if(devncount==0) { - logmsg(_("HHCCF036S Error in %s line %d: " - "%s is not a valid device number\n"), + fprintf(stderr, _("HHCCF036S Error in %s line %d: " + "%s is not a valid device number(s) specification\n"), fname, stmt, sdevnum); delayed_exit(1); } - - /* Build the device configuration block */ - if (attach_device (devnum, sdevtype, addargc, addargv)) - delayed_exit(1); +#if defined(OPTION_CONFIG_SYMBOLS) + newargv=malloc(MAX_ARGS*sizeof(char *)); + orig_newargv=malloc(MAX_ARGS*sizeof(char *)); +#endif /* #if defined(OPTION_CONFIG_SYMBOLS) */ + for(baddev=0,i=0;i<(int)devncount;i++) + { + for(devnum=devnarray[i].cuu1;devnum<=devnarray[i].cuu2;devnum++) + { +#if defined(OPTION_CONFIG_SYMBOLS) + char wrkbfr[16]; + snprintf(wrkbfr,sizeof(wrkbfr),"%3.3x",devnum); + set_symbol("cuu",wrkbfr); + snprintf(wrkbfr,sizeof(wrkbfr),"%4.4x",devnum); + set_symbol("ccuu",wrkbfr); + snprintf(wrkbfr,sizeof(wrkbfr),"%3.3X",devnum); + set_symbol("CUU",wrkbfr); + snprintf(wrkbfr,sizeof(wrkbfr),"%4.4X",devnum); + set_symbol("CCUU",wrkbfr); + for(j=0;jnextdev) - dev->msgpipew = sysblk.msgpipew; - cckdblk.msgpipew = sysblk.msgpipew; - -#if defined(OPTION_FISHIO) - ios_msgpipew = sysblk.msgpipew; -#endif // defined(OPTION_FISHIO) -#if defined(OPTION_W32_CTCI) - g_tt32_msgpipew = sysblk.msgpipew; -#endif // defined(OPTION_W32_CTCI) - - /* Display the version identifier on the control panel */ - display_version (sysblk.msgpipew, "Hercules "); if (sysblk.pgmprdos == PGM_PRD_OS_LICENSED) { - logmsg(_("HHCCF039W PGMPRDOS LICENSED specified.\n" + logmsg(_("\nHHCCF039W PGMPRDOS LICENSED specified.\n" " Licensed program product operating systems are " "enabled.\n You are " "responsible for meeting all conditions of your\n" @@ -1241,8 +1858,10 @@ int dummyfd[OPTION_SELECT_KLUDGE]; /* Dummy file descriptors -- #endif /*_FEATURE_VECTOR_FACILITY*/ #ifndef PROFILE_CPU + obtain_lock (&sysblk.intlock); for(i = 0; i < numcpu; i++) configure_cpu(sysblk.regs + i); + release_lock (&sysblk.intlock); #endif /* close configuration file */ rc = fclose(fp); @@ -1268,20 +1887,23 @@ int cpu; } release_lock (&sysblk.intlock); +#if defined(OPTION_SHARED_DEVICES) + /* Terminate the shared device listener thread */ + if (sysblk.shrdtid) + signal_thread (sysblk.shrdtid, SIGUSR2); +#endif + /* Detach all devices */ for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) if (dev->pmcw.flag5 & PMCW5_V) detach_device(dev->devnum); - /* Terminate HercIFC if necessary */ - if( sysblk.ifcfd[0] != -1 || sysblk.ifcfd[1] != -1 ) - { - close( sysblk.ifcfd[0] ); - close( sysblk.ifcfd[1] ); - sysblk.ifcfd[0] = sysblk.ifcfd[1] = -1; - - kill( sysblk.ifcpid, SIGINT ); - } +#if !defined(OPTION_FISHIO) + /* Terminate device threads */ + obtain_lock (&sysblk.ioqlock); + broadcast_condition (&sysblk.ioqcond); + release_lock (&sysblk.ioqlock); +#endif /* Deconfigure all CPU's */ for(cpu = 0; cpu < MAX_CPU_ENGINES; cpu++) @@ -1293,6 +1915,7 @@ int cpu; /*-------------------------------------------------------------------*/ /* Function to start a new CPU thread */ +/* Caller MUST own the intlock */ /*-------------------------------------------------------------------*/ int configure_cpu(REGS *regs) { @@ -1312,6 +1935,10 @@ int configure_cpu(REGS *regs) regs->cpuad, strerror(errno)); return -1; } + + /* Wait for CPU thread to initialize */ + wait_condition (®s->intcond, &sysblk.intlock); + return 0; } /* end function configure_cpu */ @@ -1338,79 +1965,126 @@ int deconfigure_cpu(REGS *regs) } /* end function deconfigure_cpu */ -/*-------------------------------------------------------------------*/ -/* Function to build a device configuration block */ -/*-------------------------------------------------------------------*/ -int attach_device (U16 devnum, char *type, - int addargc, BYTE *addargv[]) +/* 4 next functions used for fast device lookup cache management */ +#if defined(OPTION_FAST_DEVLOOKUP) +static void AddDevnumFastLookup(DEVBLK *dev,U16 devnum) { -DEVBLK *dev; /* -> Device block */ -DEVBLK**dvpp; /* -> Device block address */ -DEVENT *devent = device_handler_table; -int rc; /* Return code */ -int newdevblk = 0; /* 1=Newly created devblk */ - - /* Check whether device number has already been defined */ - if (find_device_by_devnum(devnum) != NULL) + unsigned int Channel; + if(sysblk.devnum_fl==NULL) { - logmsg (_("HHCCF041E Device %4.4X already exists\n"), devnum); - return 1; + sysblk.devnum_fl=(DEVBLK ***)malloc(sizeof(DEVBLK **)*256); + memset(sysblk.devnum_fl,0,sizeof(DEVBLK **)*256); } - - for(;devent->hnd;devent++) - if(!strcasecmp(devent->name, type)) - break; - - if(!devent->hnd) + Channel=(devnum & 0xff00)>>8; + if(sysblk.devnum_fl[Channel]==NULL) { - logmsg (_("HHCCF042E Device type %s not recognized\n"), - type); - return 1; + sysblk.devnum_fl[Channel]=(DEVBLK **)malloc(sizeof(DEVBLK *)*256); + memset(sysblk.devnum_fl[Channel],0,sizeof(DEVBLK *)*256); + } + sysblk.devnum_fl[Channel][devnum & 0xff]=dev; +} +static void AddSubchanFastLookup(DEVBLK *dev,U16 subchan) +{ + unsigned int schw; +#if 0 + logmsg("DEBUG : ASFL Adding %d\n",subchan); +#endif + if(sysblk.subchan_fl==NULL) + { + sysblk.subchan_fl=(DEVBLK ***)malloc(sizeof(DEVBLK **)*256); + memset(sysblk.subchan_fl,0,sizeof(DEVBLK **)*256); + } + schw=(subchan & 0xff00)>>8; + if(sysblk.subchan_fl[schw]==NULL) + { + sysblk.subchan_fl[schw]=(DEVBLK **)malloc(sizeof(DEVBLK *)*256); + memset(sysblk.subchan_fl[schw],0,sizeof(DEVBLK *)*256); } + sysblk.subchan_fl[schw][subchan & 0xff]=dev; +} +static void DelDevnumFastLookup(U16 devnum) +{ + unsigned int Channel; + if(sysblk.devnum_fl==NULL) + { + return; + } + Channel=(devnum & 0xff00)>>8; + if(sysblk.devnum_fl[Channel]==NULL) + { + return; + } + sysblk.devnum_fl[Channel][devnum & 0xff]=NULL; +} +static void DelSubchanFastLookup(U16 subchan) +{ + unsigned int schw; +#if 0 + logmsg("DEBUG : DSFL Removing %d\n",subchan); +#endif + if(sysblk.subchan_fl==NULL) + { + return; + } + schw=(subchan & 0xff00)>>8; + if(sysblk.subchan_fl[schw]==NULL) + { + return; + } + sysblk.subchan_fl[schw][subchan & 0xff]=NULL; +} +#endif - /* Attempt to reuse an existing device block */ - dev = find_unused_device(); +DEVBLK *get_devblk(U16 devnum) +{ +DEVBLK *dev; +DEVBLK**dvpp; - /* If no device block is available, create a new one */ - if (dev == NULL) + for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) + if (!(dev->pmcw.flag5 & PMCW5_V)) break; + + if(!dev) { - /* Obtain a device block */ - dev = (DEVBLK*)malloc(sizeof(DEVBLK)); - if (dev == NULL) + if (!(dev = (DEVBLK*)malloc(sizeof(DEVBLK)))) { - logmsg (_("HHCCF043E Cannot obtain device block " - "for device %4.4X: %s\n"), - devnum, strerror(errno)); - return 1; + logmsg (_("HHCCF043E Cannot obtain device block\n"), + strerror(errno)); + return NULL; } memset (dev, 0, sizeof(DEVBLK)); - /* Indicate a newly allocated devblk */ - newdevblk = 1; - /* Initialize the device lock and conditions */ initialize_lock (&dev->lock); initialize_condition (&dev->resumecond); + initialize_condition (&dev->iocond); - /* Assign new subchannel number */ - dev->subchan = sysblk.highsubchan++; + /* Search for the last device block on the chain */ + for (dvpp = &(sysblk.firstdev); *dvpp != NULL; + dvpp = &((*dvpp)->nextdev)); - } + /* Add the new device block to the end of the chain */ + *dvpp = dev; - /* Obtain the device lock */ - obtain_lock(&dev->lock); + dev->subchan = sysblk.highsubchan++; + } /* Initialize the device block */ - dev->hnd = devent->hnd; - dev->msgpipew = sysblk.msgpipew; + obtain_lock (&dev->lock); + dev->cpuprio = sysblk.cpuprio; + dev->devprio = sysblk.devprio; + dev->hnd = NULL; dev->devnum = devnum; dev->chanset = devnum >> 12; if( dev->chanset >= MAX_CPU_ENGINES ) dev->chanset = MAX_CPU_ENGINES - 1; - dev->devtype = devent->type; - dev->typname = devent->name; dev->fd = -1; + dev->ioint.dev = dev; + dev->ioint.pending = 1; + dev->pciioint.dev = dev; + dev->pciioint.pcipending = 1; + dev->attnioint.dev = dev; + dev->attnioint.attnpending = 1; /* Initialize storage view */ dev->mainstor = sysblk.mainstor; @@ -1418,6 +2092,7 @@ int newdevblk = 0; /* 1=Newly created devblk */ dev->mainlim = sysblk.mainsize - 1; /* Initialize the path management control word */ + memset (&dev->pmcw, 0, sizeof(PMCW)); dev->pmcw.devnum[0] = dev->devnum >> 8; dev->pmcw.devnum[1] = dev->devnum & 0xFF; dev->pmcw.lpm = 0x80; @@ -1426,17 +2101,75 @@ int newdevblk = 0; /* 1=Newly created devblk */ dev->pmcw.pam = 0x80; dev->pmcw.chpid[0] = dev->devnum >> 8; +#if defined(OPTION_SHARED_DEVICES) + dev->shrdwait = -1; +#endif /*defined(OPTION_SHARED_DEVICES)*/ + + /* Mark device valid */ + dev->pmcw.flag5 |= PMCW5_V; + +#ifdef _FEATURE_CHANNEL_SUBSYSTEM + /* Indicate a CRW is pending for this device */ + dev->crwpending = 1; +#endif /*_FEATURE_CHANNEL_SUBSYSTEM*/ + + return dev; +} + + +void ret_devblk(DEVBLK *dev) +{ + /* Mark device invalid */ + dev->pmcw.flag5 &= ~PMCW5_V; +#if defined(OPTION_FAST_DEVLOOKUP) + DelSubchanFastLookup(dev->subchan); + DelDevnumFastLookup(dev->devnum); +#endif + release_lock(&dev->lock); +} + + +/*-------------------------------------------------------------------*/ +/* Function to build a device configuration block */ +/*-------------------------------------------------------------------*/ +int attach_device (U16 devnum, char *type, + int addargc, BYTE *addargv[]) +{ +DEVBLK *dev; /* -> Device block */ +int rc; /* Return code */ + + /* Check whether device number has already been defined */ + if (find_device_by_devnum(devnum) != NULL) + { + logmsg (_("HHCCF041E Device %4.4X already exists\n"), devnum); + return 1; + } + + /* obtain device block */ + dev = get_devblk(devnum); + + if(!(dev->hnd = hdl_ghnd(type))) + { + logmsg (_("HHCCF042E Device type %s not recognized\n"), type); + + ret_devblk(dev); + + return 1; + } + + dev->typname = strdup(type); + /* Call the device handler initialization function */ rc = (dev->hnd->init)(dev, addargc, addargv); + if (rc < 0) { logmsg (_("HHCCF044E Initialization failed for device %4.4X\n"), devnum); - release_lock(&dev->lock); - /* Release the device block if we just acquired it */ - if (newdevblk) - free(dev); + free(dev->typname); + + ret_devblk(dev); return 1; } @@ -1450,36 +2183,13 @@ int newdevblk = 0; /* 1=Newly created devblk */ logmsg (_("HHCCF045E Cannot obtain buffer " "for device %4.4X: %s\n"), dev->devnum, strerror(errno)); - release_lock(&dev->lock); - /* Release the device block if we just acquired it */ - if(newdevblk) - free(dev); + ret_devblk(dev); return 1; } } - /* If we acquired a new device block, add it to the chain */ - if (newdevblk) - { - /* Search for the last device block on the chain */ - for (dvpp = &(sysblk.firstdev); *dvpp != NULL; - dvpp = &((*dvpp)->nextdev)); - - /* Add the new device block to the end of the chain */ - *dvpp = dev; - dev->nextdev = NULL; - } - - /* Mark device valid */ - dev->pmcw.flag5 |= PMCW5_V; - -#ifdef _FEATURE_CHANNEL_SUBSYSTEM - /* Indicate a CRW is pending for this device */ - dev->crwpending = 1; -#endif /*_FEATURE_CHANNEL_SUBSYSTEM*/ - /* Release device lock */ release_lock(&dev->lock); @@ -1511,21 +2221,19 @@ DEVBLK *dev; /* -> Device block */ /* Obtain the device lock */ obtain_lock(&dev->lock); - /* Mark device invalid */ - dev->pmcw.flag5 &= ~(PMCW5_E | PMCW5_V); + /* Close file or socket */ + if ((dev->fd > 2) || dev->console) + /* Call the device close handler */ + (dev->hnd->close)(dev); + + free(dev->typname); #ifdef _FEATURE_CHANNEL_SUBSYSTEM /* Indicate a CRW is pending for this device */ dev->crwpending = 1; #endif /*_FEATURE_CHANNEL_SUBSYSTEM*/ - /* Close file or socket */ - if ((dev->fd > 2) || dev->console) - /* Call the device close handler */ - (dev->hnd->close)(dev); - - /* Release device lock */ - release_lock(&dev->lock); + ret_devblk(dev); #ifdef _FEATURE_CHANNEL_SUBSYSTEM /* Signal machine check */ @@ -1573,6 +2281,10 @@ DEVBLK *dev; /* -> Device block */ /* Disable the device */ dev->pmcw.flag5 &= ~PMCW5_E; +#if defined(OPTION_FAST_DEVLOOKUP) + DelSubchanFastLookup(olddevn); + DelSubchanFastLookup(newdevn); +#endif #ifdef _FEATURE_CHANNEL_SUBSYSTEM /* Indicate a CRW is pending for this device */ @@ -1587,40 +2299,51 @@ DEVBLK *dev; /* -> Device block */ machine_check_crwpend(); #endif /*_FEATURE_CHANNEL_SUBSYSTEM*/ - logmsg (_("HHCCF050I Device %4.4X defined as %4.4X\n"), - olddevn, newdevn); +// logmsg (_("HHCCF050I Device %4.4X defined as %4.4X\n"), +// olddevn, newdevn); return 0; } /* end function define_device */ -/*-------------------------------------------------------------------*/ -/* Function to find an unused device block entry */ -/*-------------------------------------------------------------------*/ -DEVBLK *find_unused_device () -{ -DEVBLK *dev; - - for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) - if (!(dev->pmcw.flag5 & PMCW5_V)) break; - - return dev; - -} /* end function find_unused_device */ - - /*-------------------------------------------------------------------*/ /* Function to find a device block given the device number */ /*-------------------------------------------------------------------*/ DEVBLK *find_device_by_devnum (U16 devnum) { DEVBLK *dev; +#if defined(OPTION_FAST_DEVLOOKUP) +DEVBLK **devtab; +int Chan; + + Chan=(devnum & 0xff00)>>8; + if(sysblk.devnum_fl!=NULL) + { + devtab=sysblk.devnum_fl[(devnum & 0xff00)>>8]; + if(devtab!=NULL) + { + dev=devtab[devnum & 0xff]; + if(dev && dev->pmcw.flag5 & PMCW5_V && dev->devnum==devnum) + { + return dev; + } + else + { + DelDevnumFastLookup(devnum); + } + } + } +#endif for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) if (dev->devnum == devnum && dev->pmcw.flag5 & PMCW5_V) break; - +#if defined(OPTION_FAST_DEVLOOKUP) + if(dev) + { + AddDevnumFastLookup(dev,devnum); + } +#endif return dev; - } /* end function find_device_by_devnum */ @@ -1629,15 +2352,42 @@ DEVBLK *dev; /*-------------------------------------------------------------------*/ DEVBLK *find_device_by_subchan (U16 subchan) { -DEVBLK *dev; - + DEVBLK *dev; +#if defined(OPTION_FAST_DEVLOOKUP) +#if 0 + logmsg("DEBUG : FDBS FL Looking for %d\n",subchan); +#endif + if(sysblk.subchan_fl!=NULL) + { + if(sysblk.subchan_fl[(subchan & 0xff00)>>8]!=NULL) + { + dev=sysblk.subchan_fl[(subchan & 0xff00)>>8][subchan & 0xff]; + if(dev) + { + return dev; + } + } + } +#endif +#if 0 + logmsg("DEBUG : FDBS SL Looking for %d\n",subchan); +#endif for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) if (dev->subchan == subchan) break; - return dev; +#if defined(OPTION_FAST_DEVLOOKUP) + if(dev) + { + AddSubchanFastLookup(dev,subchan); + } + else + { + DelSubchanFastLookup(subchan); + } +#endif + return dev; } /* end function find_device_by_subchan */ - #endif /*!defined(_GEN_ARCH)*/ diff --git a/config.h.in b/config.h.in index e85e578..01deda3 100644 --- a/config.h.in +++ b/config.h.in @@ -1,5 +1,11 @@ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Define to use built-in memrchr implementation */ +#undef BUILTIN_MEMRCHR + +/* Define to use built-in strerror_r implementation */ +#undef BUILTIN_STRERROR_R + /* Define to enable bzip2 compression in emulated DASDs */ #undef CCKD_BZIP2 @@ -34,16 +40,71 @@ */ #undef HAVE_ALLOCA_H +/* Define to 1 if you have the `argz_append' function. */ +#undef HAVE_ARGZ_APPEND + +/* Define to 1 if you have the `argz_create_sep' function. */ +#undef HAVE_ARGZ_CREATE_SEP + /* Define to 1 if you have the header file. */ #undef HAVE_ARGZ_H +/* Define to 1 if you have the `argz_insert' function. */ +#undef HAVE_ARGZ_INSERT + +/* Define to 1 if you have the `argz_next' function. */ +#undef HAVE_ARGZ_NEXT + +/* Define to 1 if you have the `argz_stringify' function. */ +#undef HAVE_ARGZ_STRINGIFY + +/* Define to 1 if you have the header file. */ +#undef HAVE_ASSERT_H + +/* Define to 1 if you have the `bcopy' function. */ +#undef HAVE_BCOPY + /* Define to 1 if you have the header file. */ #undef HAVE_BYTESWAP_H +/* Define to 1 if you have the `closedir' function. */ +#undef HAVE_CLOSEDIR + +/* Define to 1 if you have the header file. */ +#undef HAVE_CTYPE_H + /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_DIRENT_H + +/* Define if you have the GNU dld library. */ +#undef HAVE_DLD + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLD_H + +/* Define to 1 if you have the `dlerror' function. */ +#undef HAVE_DLERROR + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_DL_H + +/* Define if you have the _dyld_func_lookup function. */ +#undef HAVE_DYLD + +/* Define to 1 if you have the header file. */ +#undef HAVE_ERRNO_H + +/* Define to 1 if the system has the type `error_t'. */ +#undef HAVE_ERROR_T + /* Define to 1 if you have the `fabsl' function. */ #undef HAVE_FABSL @@ -74,6 +135,9 @@ /* Define to 1 if you have the `getgid' function. */ #undef HAVE_GETGID +/* Define to 1 if you have the `getopt_long' function. */ +#undef HAVE_GETOPT_LONG + /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE @@ -89,9 +153,16 @@ /* Define to 1 if you have the `getuid' function. */ #undef HAVE_GETUID -/* Define if you have the iconv() function. */ +/* Define to 1 if you have the `iconv' function. */ #undef HAVE_ICONV +/* Define to 1 if you have the `index' function. */ +#undef HAVE_INDEX + +/* Define to 1 if you have the `InitializeCriticalSectionAndSpinCount' + function. */ +#undef HAVE_INITIALIZECRITICALSECTIONANDSPINCOUNT + /* Define if exists and doesn't clash with . */ #undef HAVE_INTTYPES_H @@ -108,6 +179,9 @@ /* Define to 1 if you have the `ldexpl' function. */ #undef HAVE_LDEXPL +/* Define to 1 if you have the `dl' library (-ldl). */ +#undef HAVE_LIBDL + /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM @@ -132,30 +206,60 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_IF_TUN_H + /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H +/* Define to 1 if you have the header file. */ +#undef HAVE_MACH_O_DYLD_H + /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H +/* Define to 1 if you have the `memcpy' function. */ +#undef HAVE_MEMCPY + +/* Define to 1 if you have the `memmove' function. */ +#undef HAVE_MEMMOVE + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mempcpy' function. */ #undef HAVE_MEMPCPY +/* Define to 1 if you have the `memrchr' function. */ +#undef HAVE_MEMRCHR + /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define to 1 if you have the `munmap' function. */ #undef HAVE_MUNMAP +/* Define to 1 if you have the header file, and it defines `DIR'. */ +#undef HAVE_NDIR_H + /* Define to 1 if you have the header file. */ #undef HAVE_NL_TYPES_H +/* Define to 1 if you have the `opendir' function. */ +#undef HAVE_OPENDIR + +/* Define if libtool can extract symbol lists from object files. */ +#undef HAVE_PRELOADED_SYMBOLS + /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV +/* Define to 1 if you have the `readdir' function. */ +#undef HAVE_READDIR + +/* Define to 1 if you have the `rindex' function. */ +#undef HAVE_RINDEX + /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV @@ -168,6 +272,9 @@ /* Define to 1 if you have the `setreuid' function. */ #undef HAVE_SETREUID +/* Define if you have the shl_load function. */ +#undef HAVE_SHL_LOAD + /* Define to 1 if you have the `sqrtl' function. */ #undef HAVE_SQRTL @@ -181,6 +288,9 @@ uintmax_t. */ #undef HAVE_STDINT_H_WITH_UINTMAX +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H @@ -190,21 +300,50 @@ /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP +/* Define to 1 if you have the `strchr' function. */ +#undef HAVE_STRCHR + +/* Define to 1 if you have the `strcmp' function. */ +#undef HAVE_STRCMP + /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP +/* Define to 1 if you have the `strerror_r' function. */ +#undef HAVE_STRERROR_R + /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the `strlcat' function. */ +#undef HAVE_STRLCAT + +/* Define to 1 if you have the `strlcpy' function. */ +#undef HAVE_STRLCPY + +/* Define to 1 if you have the `strrchr' function. */ +#undef HAVE_STRRCHR + /* Define to 1 if you have the `strsignal' function. */ #undef HAVE_STRSIGNAL /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_DIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_DL_H + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_NDIR_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H @@ -235,6 +374,12 @@ /* Define to 1 if you have the `__argz_stringify' function. */ #undef HAVE___ARGZ_STRINGIFY +/* Define to to indicate shared libraries are being used */ +#undef HDL_BUILD_SHARED + +/* Define to cause dynamic loader to use libtool instead of dlopen */ +#undef HDL_USE_LIBTOOL + /* Define to enable bzip2 compression in emulated tapes */ #undef HET_BZIP2 @@ -247,6 +392,38 @@ /* Directory where to find NLS data */ #undef LOCALEDIR +/* Define if the OS needs help to load dependent libraries for dlopen(). */ +#undef LTDL_DLOPEN_DEPLIBS + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LTDL_OBJDIR + +/* Define to the name of the environment variable that determines the dynamic + library search path. */ +#undef LTDL_SHLIBPATH_VAR + +/* Define to the extension used for shared libraries, say, ".so". */ +#undef LTDL_SHLIB_EXT + +/* Define to the system default library search path. */ +#undef LTDL_SYSSEARCHPATH + +/* Defines the maximum number of emulated CPU engines */ +#undef MAX_CPU_ENGINES + +/* Directory where HERCULES modules are installed */ +#undef MODULESDIR + +/* Define to indicate optreset exists */ +#undef NEED_GETOPT_OPTRESET + +/* Define to indicate a wrapper for getopt is needed */ +#undef NEED_GETOPT_WRAPPER + +/* Define if dlsym() requires a leading underscore in symbol names. */ +#undef NEED_USCORE + /* Define to disable use of threads */ #undef NOTHREAD @@ -265,6 +442,12 @@ /* Define to disable sigabend_handler (please describe this better) */ #undef NO_SIGABEND_HANDLER +/* Define to enable symbolic substitutions in configuration file */ +#undef OPTION_CONFIG_SYMBOLS + +/* Define to enable Hercules Dynamic Loader feature */ +#undef OPTION_DYNAMIC_LOAD + /* Define to use included threads implementation (fthreads) */ #undef OPTION_FTHREADS @@ -328,6 +511,9 @@ /* Define to empty if `const' does not conform to ANSI C. */ #undef const +/* Define to a type to use for `error_t' if it is not otherwise available. */ +#undef error_t + /* Define as `__inline' if that's what the C compiler calls it, or to nothing if it is not supported. */ #undef inline diff --git a/configure b/configure index 9ba67f0..ce5ff17 100644 --- a/configure +++ b/configure @@ -7,6 +7,160 @@ # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null && + echo_test_string="`eval $cmd`" && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else @@ -752,6 +906,26 @@ ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_CXXCPP_set=${CXXCPP+set} +ac_env_CXXCPP_value=$CXXCPP +ac_cv_env_CXXCPP_set=${CXXCPP+set} +ac_cv_env_CXXCPP_value=$CXXCPP +ac_env_F77_set=${F77+set} +ac_env_F77_value=$F77 +ac_cv_env_F77_set=${F77+set} +ac_cv_env_F77_value=$F77 +ac_env_FFLAGS_set=${FFLAGS+set} +ac_env_FFLAGS_value=$FFLAGS +ac_cv_env_FFLAGS_set=${FFLAGS+set} +ac_cv_env_FFLAGS_value=$FFLAGS # # Report the --help message. @@ -835,25 +1009,44 @@ Optional Features: (and sometimes confusing) to the casual installer --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors - --disable-largefile omit support for large files + --enable-static[=PKGS] + build static libraries [default=no] + --enable-shared[=PKGS] + build shared libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-ltdl-install install libltdl --disable-rpath do not hardcode runtime library paths --disable-nls do not use Native Language Support + --enable-getoptwrapper force use of the getopt wrapper kludge + --disable-largefile omit support for large files + --disable-dynamic-load disable/enable dynamic loader option + --disable-external-gui disable interface to external Windows GUI + --enable-multi-cpu=NUMBER|no + enable/disable multi-cpu support (valid range is + 1-8, default is 2) --enable-fthreads use included fthreads instead of libpthread --enable-fishhang debug correct lock handling (fthreads only) --enable-cckd-bzip2 enable bzip2 compression for emulated DASD --enable-het-bzip2 enable bzip2 compression for emulated tapes - --enable-profiling enable execution profiling --enable-debug enable debugging (TRACE/VERIFY/ASSERT macros) --enable-setuid-hercifc install hercifc setuid root --enable-optimization=FLAGS enable/disable automatic optimization, or specify flags - --disable-external-gui disable interface to external Windows GUI + --disable-configsymbols enable/disable symbolic substitutions in + configuration file --enable-custom=STRING provide a custom description for this build Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-tags[=TAGS] + include additional configurations [automatic] --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir @@ -869,6 +1062,11 @@ Some influential environment variables: CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1473,7 +1671,7 @@ fi # Define the identity of the package. PACKAGE=hercules - VERSION=2.17.1 + VERSION=3.00 cat >>confdefs.h <<_ACEOF @@ -1630,65 +1828,105 @@ fi -# Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} - { (exit 1); exit 1; }; } +##------------------------------------------------------------ +## Begin JAP unwanted "-g -O2" optimization flags fix... +## +## AM_GNU_GETTEXT() +## +## AC_CANONICAL_HOST +## +## # Initialization +## CFLAGS="-W -Wall $CFLAGS" +## +## # Programs +## AC_PROG_CC +## AC_PROG_LIBTOOL +## -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +# Initialization +CFLAGS="-W -Wall $CFLAGS" +# ISW20030826-2 : add -I./intl as specified by gettext/info - Maintainers - Adjusting files - src/Makefile.in - Paragraph before last +# added line below +CPPFLAGS="-I ./intl" + +# Programs (Note use "HC_PROG_CC" and not "AC_PROG_CC". We now +# have our own "hercules.m4" macro defined in the +# autoconf directory that fixes an undesired compiler +# optimization flags issue) + +rm -f .deps 2>/dev/null +mkdir .deps 2>/dev/null +if test -d .deps; then + DEPDIR=.deps else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} - { (exit 1); exit 1; }; } + # MS-DOS does not allow filenames that begin with a dot. + DEPDIR=_deps +fi +rmdir .deps 2>/dev/null + + +ac_config_commands="$ac_config_commands depfiles" + +am_make=${MAKE-make} +cat > confinc << 'END' +doit: + @echo done +END +# If we don't find an include directive, just comment out the code. +echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 -build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} - { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6 +rm -f confinc confmf + +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval="$enable_dependency_tracking" +fi; +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 -host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + -# Initialization -CFLAGS="-W -Wall $CFLAGS" -# Programs ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2446,79 +2684,6 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -rm -f .deps 2>/dev/null -mkdir .deps 2>/dev/null -if test -d .deps; then - DEPDIR=.deps -else - # MS-DOS does not allow filenames that begin with a dot. - DEPDIR=_deps -fi -rmdir .deps 2>/dev/null - - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -doit: - @echo done -END -# If we don't find an include directive, just comment out the code. -echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi - - -echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6 -rm -f confinc confmf - -# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval="$enable_dependency_tracking" - -fi; -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - - -if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - depcc="$CC" am_compiler_list= @@ -2590,526 +2755,750 @@ CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type -# OS-specific settings that we can't figure out any other way (yet) - -case "$host_os" in - darwin*) - if test $host_vendor = apple ; then - CPPFLAGS=-traditional-cpp - cat >>confdefs.h <<\_ACEOF -#define _BSD_SOCKLEN_T_ int -_ACEOF - cat >>confdefs.h <<\_ACEOF -#define _INTL_REDIRECT_MACROS 1 -_ACEOF + # Restore the saved CFLAGS from autoconf invocation + CFLAGS=$ac_env_CFLAGS_value - fi - ;; - linux*) - build_hercifc=true - ;; - *cygwin*) - build_hercifc=false - cat >>confdefs.h <<\_ACEOF -#define WIN32 1 -_ACEOF - cat >>confdefs.h <<\_ACEOF -#define NO_SIGABEND_HANDLER 1 -_ACEOF +## +## End JAP unwanted "-g -O2" optimization flags fix... +##------------------------------------------------------------ - ;; - *) - build_hercifc=false - ;; -esac +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=no +fi; -# Arch-specific settings that we can't figure out any other way (yet) -case "$host_cpu-$GCC" in - hppa*-yes) - CFLAGS="$CFLAGS -ffunction-sections" - ;; -esac +modexecdir=${libdir}/${PACKAGE} -if test "x$build_hercifc" = "xtrue"; then - BUILD_HERCIFC_TRUE= - BUILD_HERCIFC_FALSE='#' -else - BUILD_HERCIFC_TRUE='#' - BUILD_HERCIFC_FALSE= -fi +# ISW20030827-1 : Enable use of embedded libltdl 1 Line added -# System Services -# Check whether --enable-largefile or --disable-largefile was given. -if test "${enable_largefile+set}" = set; then - enableval="$enable_largefile" +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes fi; -if test "$enable_largefile" != no; then - echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 -echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 -if test "${ac_cv_sys_largefile_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +# Check whether --enable-fast-install or --disable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval="$enable_fast_install" + p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ + enable_fast_install=yes +fi; - ; - return 0; -} -_ACEOF - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + fi -rm -f conftest.$ac_objext - CC="$CC -n32" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_largefile_CC=' -n32'; break +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -fi -rm -f conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + fi -echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 -echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 -if test "${ac_cv_sys_file_offset_bits+set}" = set; then + +echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 +if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - while :; do - ac_cv_sys_file_offset_bits=no - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ + # Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && break + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +SED=$lt_cv_path_SED - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break +fi + +echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6 + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi fi -rm -f conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_file_offset_bits=64; break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -fi -rm -f conftest.$ac_objext conftest.$ac_ext - break -done -fi -echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 -echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 -if test "$ac_cv_sys_file_offset_bits" != no; then -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi -rm -f conftest* - echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 -echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 -if test "${ac_cv_sys_large_files+set}" = set; then +if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - while :; do - ac_cv_sys_large_files=no - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 -cat conftest.$ac_ext >&5 + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi fi -rm -f conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_large_files=1; break +LD="$lt_cv_path_LD" +if test -n "$LD"; then + echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6 else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f conftest.$ac_objext conftest.$ac_ext - break -done +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 &5 -echo "${ECHO_T}$ac_cv_sys_large_files" >&6 -if test "$ac_cv_sys_large_files" != no; then +echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +with_gnu_ld=$lt_cv_prog_gnu_ld -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF +echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' fi -rm -f conftest* -fi +echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/${ac_tool_prefix}nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + esac + fi + done + IFS="$lt_save_ifs" + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6 +NM="$lt_cv_path_NM" -# Libraries +echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6 +fi -echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 -echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6 -if test "${ac_cv_lib_m_sqrt+set}" = set; then +echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 +echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 +if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char sqrt (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -sqrt (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_m_sqrt=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_m_sqrt=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5 -echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6 -if test $ac_cv_lib_m_sqrt = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF +beos*) + lt_cv_deplibs_check_method=pass_all + ;; - LIBS="-lm $LIBS" +bsdi4*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin* | mingw* | pw32*) + # win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='win32_libid' + ;; + +darwin* | rhapsody*) + # this will be overwritten by pass_all, but leave it in just in case + lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' + lt_cv_file_magic_cmd='/usr/bin/file -L' + case "$host_os" in + rhapsody* | darwin1.[012]) + lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System` + ;; + *) # Darwin 1.3 on + lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' + ;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | kfreebsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case "$host_cpu" in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + irix5* | nonstopux*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" + ;; + *) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" + ;; + esac + lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux*) + case $host_cpu in + alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh*) + lt_cv_deplibs_check_method=pass_all ;; + *) + # glibc up to 2.1.1 does not perform some relocations on ARM + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; + esac + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' + else + lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' + fi + ;; + +osf3* | osf4* | osf5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' + lt_cv_file_magic_test_file=/shlib/libc.so + lt_cv_deplibs_check_method=pass_all + ;; + +sco3.2v5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=/lib/libc.so + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac fi +echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown -echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 -echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 -if test "${ac_cv_lib_socket_connect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char connect (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -connect (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval="$enable_libtool_lock" + +fi; +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 3402 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_socket_connect=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_socket_connect=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 -if test $ac_cv_lib_socket_connect = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 -_ACEOF - - LIBS="-lsocket $LIBS" - -fi + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; -echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 +if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyname (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -3119,7 +3508,7 @@ char gethostbyname (); int main () { -gethostbyname (); + ; return 0; } @@ -3136,416 +3525,198 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_nsl_gethostbyname=yes + lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostbyname=no +lt_cv_cc_needs_belf=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 -if test $ac_cv_lib_nsl_gethostbyname = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNSL 1 -_ACEOF - - LIBS="-lnsl $LIBS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu fi +echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*-cygwin* | *-*-mingw* | *-*-pw32*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + echo "$as_me:$LINENO: result: $DLLTOOL" >&5 +echo "${ECHO_T}$DLLTOOL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 -echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6 -if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lresolv $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char inet_aton (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -inet_aton (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_resolv_inet_aton=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_resolv_inet_aton=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5 -echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6 -if test $ac_cv_lib_resolv_inet_aton = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBRESOLV 1 -_ACEOF - - LIBS="-lresolv $LIBS" - -fi - - -echo "$as_me:$LINENO: checking for main in -lz" >&5 -echo $ECHO_N "checking for main in -lz... $ECHO_C" >&6 -if test "${ac_cv_lib_z_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_z_main=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_z_main=no + test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_z_main" >&5 -echo "${ECHO_T}$ac_cv_lib_z_main" >&6 -if test $ac_cv_lib_z_main = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF - - LIBS="-lz $LIBS" - fi - -echo "$as_me:$LINENO: checking for BZ2_bzBuffToBuffDecompress in -lbz2" >&5 -echo $ECHO_N "checking for BZ2_bzBuffToBuffDecompress in -lbz2... $ECHO_C" >&6 -if test "${ac_cv_lib_bz2_BZ2_bzBuffToBuffDecompress+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbz2 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char BZ2_bzBuffToBuffDecompress (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -BZ2_bzBuffToBuffDecompress (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_bz2_BZ2_bzBuffToBuffDecompress=yes +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 +echo "${ECHO_T}$ac_ct_DLLTOOL" >&6 else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_bz2_BZ2_bzBuffToBuffDecompress=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bz2_BZ2_bzBuffToBuffDecompress" >&5 -echo "${ECHO_T}$ac_cv_lib_bz2_BZ2_bzBuffToBuffDecompress" >&6 -if test $ac_cv_lib_bz2_BZ2_bzBuffToBuffDecompress = yes; then - have_libbz2=yes + + DLLTOOL=$ac_ct_DLLTOOL else - have_libbz2=no + DLLTOOL="$ac_cv_prog_DLLTOOL" fi - - - MKINSTALLDIRS= - if test -n "$ac_aux_dir"; then - MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" - fi - if test -z "$MKINSTALLDIRS"; then - MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" - fi - - - - - - # Extract the first word of "msgfmt", so it can be a program name with args. -set dummy msgfmt; ac_word=$2 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MSGFMT+set}" = set; then +if test "${ac_cv_prog_AS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$MSGFMT" in - /*) - ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && - (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - ac_cv_path_MSGFMT="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" - ;; -esac + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AS="${ac_tool_prefix}as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi -MSGFMT="$ac_cv_path_MSGFMT" -if test "$MSGFMT" != ":"; then - echo "$as_me:$LINENO: result: $MSGFMT" >&5 -echo "${ECHO_T}$MSGFMT" >&6 +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + echo "$as_me:$LINENO: result: $AS" >&5 +echo "${ECHO_T}$AS" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi - # Extract the first word of "gmsgfmt", so it can be a program name with args. -set dummy gmsgfmt; ac_word=$2 +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_GMSGFMT+set}" = set; then +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $GMSGFMT in - [\\/]* | ?:[\\/]*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_ac_ct_AS="as" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done - test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" - ;; -esac + test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false" fi -GMSGFMT=$ac_cv_path_GMSGFMT - -if test -n "$GMSGFMT"; then - echo "$as_me:$LINENO: result: $GMSGFMT" >&5 -echo "${ECHO_T}$GMSGFMT" >&6 +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 +echo "${ECHO_T}$ac_ct_AS" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi - - # Extract the first word of "xgettext", so it can be a program name with args. -set dummy xgettext; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_XGETTEXT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case "$XGETTEXT" in - /*) - ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && - (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - ac_cv_path_XGETTEXT="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" - ;; -esac -fi -XGETTEXT="$ac_cv_path_XGETTEXT" -if test "$XGETTEXT" != ":"; then - echo "$as_me:$LINENO: result: $XGETTEXT" >&5 -echo "${ECHO_T}$XGETTEXT" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - rm -f messages.po - - # Extract the first word of "msgmerge", so it can be a program name with args. -set dummy msgmerge; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MSGMERGE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case "$MSGMERGE" in - /*) - ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then - ac_cv_path_MSGMERGE="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" - ;; -esac -fi -MSGMERGE="$ac_cv_path_MSGMERGE" -if test "$MSGMERGE" != ":"; then - echo "$as_me:$LINENO: result: $MSGMERGE" >&5 -echo "${ECHO_T}$MSGMERGE" >&6 + AS=$ac_ct_AS else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + AS="$ac_cv_prog_AS" fi - - if test "$GMSGFMT" != ":"; then - if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && - (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - : ; - else - GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` - echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5 -echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6 - GMSGFMT=":" - fi - fi - - if test "$XGETTEXT" != ":"; then - if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && - (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - : ; - else - echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 -echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 - XGETTEXT=":" - fi - rm -f messages.po - fi - - ac_config_commands="$ac_config_commands default-1" - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_RANLIB+set}" = set; then +if test "${ac_cv_prog_OBJDUMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -3554,7 +3725,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -3563,27 +3734,27 @@ done fi fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +echo "${ECHO_T}$OBJDUMP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -3592,90 +3763,35 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" + ac_cv_prog_ac_ct_OBJDUMP="objdump" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" + test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false" fi fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +echo "${ECHO_T}$ac_ct_OBJDUMP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi - RANLIB=$ac_ct_RANLIB + OBJDUMP=$ac_ct_OBJDUMP else - RANLIB="$ac_cv_prog_RANLIB" + OBJDUMP="$ac_cv_prog_OBJDUMP" fi + ;; - echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5 -echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6 -if test "${ac_cv_lib_cposix_strerror+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcposix $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char strerror (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -strerror (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_cposix_strerror=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_cposix_strerror=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5 -echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6 -if test $ac_cv_lib_cposix_strerror = yes; then - LIBS="$LIBS -lcposix" -fi +esac +need_locks="$enable_libtool_lock" ac_ext=c @@ -4018,171 +4134,31 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -fi -rm -f conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - -echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 -if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset x; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *ccp; - char **p; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - ccp = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++ccp; - p = (char**) ccp; - ccp = (char const *const *) p; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - } -#endif - - ; - return 0; -} +$ac_includes_default + +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -4196,100 +4172,46 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_c_const=yes + eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_c_const=no +eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6 -if test $ac_cv_c_const = no; then - -cat >>confdefs.h <<\_ACEOF -#define const +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#ifndef __cplusplus -static $ac_kw int static_foo () {return 0; } -$ac_kw int foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -fi -rm -f conftest.$ac_objext conftest.$ac_ext done -fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 -case $ac_cv_c_inline in - inline | yes) ;; - no) -cat >>confdefs.h <<\_ACEOF -#define inline -_ACEOF - ;; - *) cat >>confdefs.h <<_ACEOF -#define inline $ac_cv_c_inline -_ACEOF - ;; -esac - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h +for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" $ac_includes_default - #include <$ac_header> _ACEOF rm -f conftest.$ac_objext @@ -4304,93 +4226,208 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -eval "$as_ac_Header=no" +ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 -echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6 -if test "${ac_cv_type_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -$ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -if ((off_t *) 0) - return 0; -if (sizeof (off_t)) - return 0; - ; - return 0; -} +#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_off_t=yes + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_type_off_t=no + ac_cpp_err=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no fi -echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6 -if test $ac_cv_type_off_t = yes; then - : +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -cat >>confdefs.h <<_ACEOF -#define off_t long +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 -if test "${ac_cv_type_size_t+set}" = set; then +done + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CXX" && break +done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + + CXX=$ac_ct_CXX +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -$ac_includes_default + #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -4400,10 +4437,10 @@ $ac_includes_default int main () { -if ((size_t *) 0) - return 0; -if (sizeof (size_t)) - return 0; +#ifndef __GNUC__ + choke me +#endif + ; return 0; } @@ -4420,37 +4457,31 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_size_t=yes + ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_type_size_t=no +ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 -if test $ac_cv_type_size_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned -_ACEOF - -fi - -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -echo "$as_me:$LINENO: checking for working alloca.h" >&5 -echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 -if test "${ac_cv_working_alloca_h+set}" = set; then +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include + #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -4460,70 +4491,62 @@ else int main () { -char *p = (char *) alloca (2 * sizeof (int)); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_working_alloca_h=yes + ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_working_alloca_h=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +ac_cv_prog_cxx_g=no fi -echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 -echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 -if test $ac_cv_working_alloca_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA_H 1 -_ACEOF - +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$as_me:$LINENO: checking for alloca" >&5 -echo $ECHO_N "checking for alloca... $ECHO_C" >&6 -if test "${ac_cv_func_alloca_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# if HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif - +#include +$ac_declaration #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -4533,102 +4556,34 @@ char *alloca (); int main () { -char *p = (char *) alloca (1); +exit (42); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_alloca_works=yes + : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_func_alloca_works=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 -echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 - -if test $ac_cv_func_alloca_works = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA 1 -_ACEOF - -else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. - -ALLOCA=alloca.$ac_objext - -cat >>confdefs.h <<\_ACEOF -#define C_ALLOCA 1 -_ACEOF - - -echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 -echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 -if test "${ac_cv_os_cray+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#if defined(CRAY) && ! defined(CRAY2) -webecray -#else -wenotbecray -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "webecray" >/dev/null 2>&1; then - ac_cv_os_cray=yes -else - ac_cv_os_cray=no -fi -rm -f conftest* - +continue fi -echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 -echo "${ECHO_T}$ac_cv_os_cray" >&6 -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else +rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -char (*f) (); - +$ac_declaration #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -4638,168 +4593,262 @@ char (*f) (); int main () { -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -f = $ac_func; -#endif - +exit (42); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_var=yes" + break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - break -fi +depcc="$CXX" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + echo '#include "conftest.h"' > conftest.c + echo 'int i;' > conftest.h + echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=conftest.c object=conftest.o \ + depfile=conftest.Po tmpdepfile=conftest.TPo \ + $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && + grep conftest.h conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none fi -echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 -echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 -if test "${ac_cv_c_stack_direction+set}" = set; then +fi +echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - ac_cv_c_stack_direction=0 -else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -int -find_stack_direction () -{ - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; -} - -int -main () -{ - exit (find_stack_direction () < 0); -} +#include + Syntax error _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_stack_direction=1 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_c_stack_direction=-1 -fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + ac_cpp_err=yes fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Broken: fails on valid input. +continue fi -echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 -echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 +rm -f conftest.err conftest.$ac_ext -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include _ACEOF - - -fi - - - -for ac_header in stdlib.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6 +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -$ac_includes_default -#include <$ac_header> +#include + Syntax error _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_header_compiler=no + cat conftest.$ac_ext >&5 + # Broken: fails on valid input. +continue fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 +rm -f conftest.err conftest.$ac_ext -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include <$ac_header> +#include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -4810,7 +4859,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cxx_preproc_warn_flag else ac_cpp_err= fi @@ -4818,1528 +4867,1783 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - ac_header_preproc=yes + # Broken: success on invalid input. +continue else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - ac_header_preproc=no + # Passes both tests. +ac_preproc_ok=: +break fi rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 f77 xlf cf77 cft77 frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 fc + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + test -n "$F77" && break + done fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 f77 xlf cf77 cft77 frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 fc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi + test -n "$ac_ct_F77" && break done + F77=$ac_ct_F77 +fi -for ac_func in getpagesize -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then + +# Provide some information about the compiler. +echo "$as_me:4991:" \ + "checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. +ac_save_ext=$ac_ext +ac_ext=F +echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 +if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" + program main +#ifndef __GNUC__ + choke me #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -char (*f) (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -f = $ac_func; -#endif - - ; - return 0; -} + end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_var=yes" + ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -eval "$as_ac_var=no" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - +ac_compiler_gnu=no fi -done - -echo "$as_me:$LINENO: checking for working mmap" >&5 -echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 +ac_ext=$ac_save_ext +G77=`test $ac_compiler_gnu = yes && echo yes` +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_mmap_fixed_mapped=no -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -$ac_includes_default -/* malloc might have been renamed as rpl_malloc. */ -#undef malloc - -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the file system buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propagated back to all the places they're supposed to be. - - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ - -#include -#include - -#if !STDC_HEADERS && !HAVE_STDLIB_H -char *malloc (); -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#if !HAVE_GETPAGESIZE -/* Assume that all systems that can run configure have sys/param.h. */ -# if !HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# if HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -int -main () -{ - char *data, *data2, *data3; - int i, pagesize; - int fd; - - pagesize = getpagesize (); - - /* First, make a file with some known garbage in it. */ - data = (char *) malloc (pagesize); - if (!data) - exit (1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand (); - umask (0); - fd = creat ("conftest.mmap", 0600); - if (fd < 0) - exit (1); - if (write (fd, data, pagesize) != pagesize) - exit (1); - close (fd); - - /* Next, try to mmap the file at a fixed address which already has - something else allocated at it. If we can, also make sure that - we see the same garbage. */ - fd = open ("conftest.mmap", O_RDWR); - if (fd < 0) - exit (1); - data2 = (char *) malloc (2 * pagesize); - if (!data2) - exit (1); - data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - exit (1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit (1); + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main - /* Finally, make sure that changes to the mapped area do not - percolate back to the file as seen by read(). (This is a bug on - some variants of i386 svr4.0.) */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = (char *) malloc (pagesize); - if (!data3) - exit (1); - if (read (fd, data3, pagesize) != pagesize) - exit (1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - exit (1); - close (fd); - exit (0); -} + end _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_mmap_fixed_mapped=yes + ac_cv_prog_f77_g=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_func_mmap_fixed_mapped=no +ac_cv_prog_f77_g=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext + fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "$G77" = yes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "$G77" = yes; then + FFLAGS="-O2" + else + FFLAGS= + fi fi -echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 -echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 -if test $ac_cv_func_mmap_fixed_mapped = yes; then +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -cat >>confdefs.h <<\_ACEOF -#define HAVE_MMAP 1 -_ACEOF -fi -rm -f conftest.mmap +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! - echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 -echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6 -if test "${ac_cv_gnu_library_2_1+set}" = set; then +# find the maximum length of command line arguments +echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 +if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + i=0 + testring="ABCD" -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "Lucky GNU user" >/dev/null 2>&1; then - ac_cv_gnu_library_2_1=yes -else - ac_cv_gnu_library_2_1=no -fi -rm -f conftest* + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while (test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \ + = "XX$testring") >/dev/null 2>&1 && + new_result=`expr "X$testring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + testring=$testring$testring + done + testring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac fi -echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 -echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6 - GLIBC21="$ac_cv_gnu_library_2_1" +if test -n $lt_cv_sys_max_cmd_len ; then + echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 +else + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 +fi - echo "$as_me:$LINENO: checking whether integer division by zero raises SIGFPE" >&5 -echo $ECHO_N "checking whether integer division by zero raises SIGFPE... $ECHO_C" >&6 -if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then +# Check for command to grab the raw symbol name followed by C symbol from nm. +echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] - # Guess based on the CPU. - case "$host_cpu" in - alpha* | i3456786 | m68k | s390*) - gt_cv_int_divbyzero_sigfpe="guessing yes";; - *) - gt_cv_int_divbyzero_sigfpe="guessing no";; - esac +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' -#include -#include +# Transform the above into a raw symbol and a C symbol. +symxfrm='\1 \2\3 \3' -static void -#ifdef __cplusplus -sigfpe_handler (int sig) -#else -sigfpe_handler (sig) int sig; -#endif -{ - /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ - exit (sig != SIGFPE); -} - -int x = 1; -int y = 0; -int z; -int nan; +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" -int main () -{ - signal (SIGFPE, sigfpe_handler); -/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ -#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) - signal (SIGTRAP, sigfpe_handler); -#endif -/* Linux/SPARC yields signal SIGILL. */ -#if defined (__sparc__) && defined (__linux__) - signal (SIGILL, sigfpe_handler); -#endif +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - z = x / y; - nan = y / y; - exit (1); -} +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris* | sysv5*) + symcode='[BDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gt_cv_int_divbyzero_sigfpe=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -( exit $ac_status ) -gt_cv_int_divbyzero_sigfpe=no -fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac -fi -echo "$as_me:$LINENO: result: $gt_cv_int_divbyzero_sigfpe" >&5 -echo "${ECHO_T}$gt_cv_int_divbyzero_sigfpe" >&6 - case "$gt_cv_int_divbyzero_sigfpe" in - *yes) value=1;; - *) value=0;; - esac +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGISTW]' ;; +esac -cat >>confdefs.h <<_ACEOF -#define INTDIV0_RAISES_SIGFPE $value -_ACEOF +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" + # Check to see that the pipe works correctly. + pipe_works=no - echo "$as_me:$LINENO: checking for inttypes.h" >&5 -echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 -if test "${jm_ac_cv_header_inttypes_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -#include -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } + rm -f conftest* + cat > conftest.$ac_ext <&5 +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +EOF + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - jm_ac_cv_header_inttypes_h=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -jm_ac_cv_header_inttypes_h=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $jm_ac_cv_header_inttypes_h" >&5 -echo "${ECHO_T}$jm_ac_cv_header_inttypes_h" >&6 - if test $jm_ac_cv_header_inttypes_h = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 -_ACEOF + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi - fi + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - echo "$as_me:$LINENO: checking for stdint.h" >&5 -echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6 -if test "${jm_ac_cv_header_stdint_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -#include -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const #endif -int -main () + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = { -uintmax_t i = (uintmax_t) -1; - ; - return 0; +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus } -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - jm_ac_cv_header_stdint_h=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -jm_ac_cv_header_stdint_h=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $jm_ac_cv_header_stdint_h" >&5 -echo "${ECHO_T}$jm_ac_cv_header_stdint_h" >&6 - if test $jm_ac_cv_header_stdint_h = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STDINT_H_WITH_UINTMAX 1 -_ACEOF + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= fi +done +fi - echo "$as_me:$LINENO: checking for unsigned long long" >&5 -echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6 -if test "${ac_cv_type_unsigned_long_long+set}" = set; then +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6 +else + echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6 +fi + +echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6 +if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -unsigned long long ull = 1; int i = 63; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -unsigned long long ullmax = (unsigned long long) -1; - return ull << i | ull >> i | ullmax / ull | ullmax % ull; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_unsigned_long_long=yes + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_type_unsigned_long_long=no + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rmdir .libs 2>/dev/null fi -echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5 -echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6 - if test $ac_cv_type_unsigned_long_long = yes; then +echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6 +objdir=$lt_cv_objdir -cat >>confdefs.h <<\_ACEOF -#define HAVE_UNSIGNED_LONG_LONG 1 -_ACEOF - fi +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac - if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e s/^X//' +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' - test $ac_cv_type_unsigned_long_long = yes \ - && ac_type='unsigned long long' \ - || ac_type='unsigned long' +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' -cat >>confdefs.h <<_ACEOF -#define uintmax_t $ac_type -_ACEOF +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - fi +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +# Constants: +rm="rm -f" - echo "$as_me:$LINENO: checking for inttypes.h" >&5 -echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 -if test "${gt_cv_header_inttypes_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -#include -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gt_cv_header_inttypes_h=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -gt_cv_header_inttypes_h=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $gt_cv_header_inttypes_h" >&5 -echo "${ECHO_T}$gt_cv_header_inttypes_h" >&6 - if test $gt_cv_header_inttypes_h = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_INTTYPES_H 1 -_ACEOF - - fi - +# Global variables: +default_ofile=libtool +can_build_shared=yes +# All known linkers require a `.a' archive for static linking (except M$VC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" - if test $gt_cv_header_inttypes_h = yes; then - echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5 -echo $ECHO_N "checking whether the inttypes.h PRIxNN macros are broken... $ECHO_C" >&6 -if test "${gt_cv_inttypes_pri_broken+set}" = set; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -#ifdef PRId32 -char *p = PRId32; -#endif - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gt_cv_inttypes_pri_broken=no + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -gt_cv_inttypes_pri_broken=yes -fi -rm -f conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5 -echo "${ECHO_T}$gt_cv_inttypes_pri_broken" >&6 - fi - if test "$gt_cv_inttypes_pri_broken" = yes; then - -cat >>confdefs.h <<_ACEOF -#define PRI_MACROS_BROKEN 1 -_ACEOF - - fi - - - if test "X$prefix" = "XNONE"; then - acl_final_prefix="$ac_default_prefix" - else - acl_final_prefix="$prefix" - fi - if test "X$exec_prefix" = "XNONE"; then - acl_final_exec_prefix='${prefix}' - else - acl_final_exec_prefix="$exec_prefix" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" - +done +done -# Check whether --with-gnu-ld or --without-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi; -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by GCC" >&5 -echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -if test "${acl_cv_path_LD+set}" = set; then + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else - acl_cv_path_LD="$LD" # Let the user override the test with a path. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" fi fi - -LD="$acl_cv_path_LD" -if test -n "$LD"; then - echo "$as_me:$LINENO: result: $LD" >&5 -echo "${ECHO_T}$LD" >&6 +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 -if test "${acl_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - acl_cv_prog_gnu_ld=yes + + AR=$ac_ct_AR else - acl_cv_prog_gnu_ld=no -fi + AR="$ac_cv_prog_AR" fi -echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 -echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 -with_gnu_ld=$acl_cv_prog_gnu_ld - - - echo "$as_me:$LINENO: checking for shared library run path origin" >&5 -echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 -if test "${acl_cv_rpath+set}" = set; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ - ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh - . ./conftest.sh - rm -f ./conftest.sh - acl_cv_rpath=done +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi fi -echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 -echo "${ECHO_T}$acl_cv_rpath" >&6 - wl="$acl_cv_wl" - libext="$acl_cv_libext" - shlibext="$acl_cv_shlibext" - hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - hardcode_direct="$acl_cv_hardcode_direct" - hardcode_minus_L="$acl_cv_hardcode_minus_L" - sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec" - sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec" - # Check whether --enable-rpath or --disable-rpath was given. -if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" - : +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - enable_rpath=yes -fi; + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi - use_additional=yes - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + ;; + *) + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. -if test "${with_libiconv_prefix+set}" = set; then - withval="$with_libiconv_prefix" +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" + else + MAGIC_CMD=: + fi +fi - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" + fi + ;; +esac - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +enable_dlopen=yes +enable_win32_dll=yes - else - additional_includedir="$withval/include" - additional_libdir="$withval/lib" - fi - fi +# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval="$enable_libtool_lock" fi; - LIBICONV= - LTLIBICONV= - INCICONV= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='iconv ' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" - else - : - fi - else - found_dir= - found_la= - found_so= - found_a= - if test $use_additional = yes; then - if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then - found_dir="$additional_libdir" - found_so="$additional_libdir/lib$name.$shlibext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" - fi - else - if test -f "$additional_libdir/lib$name.$libext"; then - found_dir="$additional_libdir" - found_a="$additional_libdir/lib$name.$libext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" - fi - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIBICONV; do +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then - found_dir="$dir" - found_so="$dir/lib$name.$shlibext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" - fi - else - if test -f "$dir/lib$name.$libext"; then - found_dir="$dir" - found_a="$dir/lib$name.$libext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" - fi - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - else - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - if test "$hardcode_direct" = yes; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - else - if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - haveit= - for x in $LDFLAGS $LIBICONV; do +# Check whether --with-pic or --without-pic was given. +if test "${with_pic+set}" = set; then + withval="$with_pic" + pic_mode="$withval" +else + pic_mode=default +fi; +test -z "$pic_mode" && pic_mode=default - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +# Use C for the default configuration in the libtool script +tagname= +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" - fi - if test "$hardcode_minus_L" != no; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - else - LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" - else - LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" - fi - fi - additional_includedir= - case "$found_dir" in - */lib | */lib/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux*) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INCICONV; do - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +# Source file extension for C test sources. +ac_ext=c - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - if test -n "$found_la"; then - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/lib"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/lib"; then - if test -n "$GCC"; then - case $host_os in - linux*) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIBICONV; do +# Object file extension for compiled C test sources. +objext=o +objext=$objext - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIBICONV; do +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" - ;; - esac - done - fi - else - LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$hardcode_libdir_separator"; then - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" - else - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" - done - fi - fi - if test "X$ltrpathdirs" != "X"; then - for found_dir in $ltrpathdirs; do - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" - done - fi +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} +# Allow CC to be a program name with arguments. +compiler=$CC +# +# Check for any special shared library compilation flags. +# +lt_prog_cc_shlib= +if test "$GCC" = no; then + case $host_os in + sco3.2v5*) + lt_prog_cc_shlib='-belf' + ;; + esac +fi +if test -n "$lt_prog_cc_shlib"; then + { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 +echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} + if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : + else + { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 +echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} + lt_cv_prog_cc_can_build_shared=no + fi +fi +# +# Check to make sure the static flag actually works. +# +echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_prog_compiler_static" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi +lt_prog_compiler_no_builtin_flag= +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' -for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ -stdlib.h string.h unistd.h sys/param.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_header_compiler=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:6001: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:6005: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else - eval "$as_ac_Header=$ac_header_preproc" + : fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi +lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= -done +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + linux*) + case $CC in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + esac + ;; + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + sco3.2v5*) + lt_prog_compiler_pic='-Kpic' + lt_prog_compiler_static='-dn' + ;; + solaris*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6 +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then -for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ -geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ -strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -char (*f) (); + lt_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:6234: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:6238: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -f = $ac_func; -#endif +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" +if test x"$lt_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -eval "$as_ac_var=no" + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF fi -done +case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + # According to Tom Tromey, Ian Lance Taylor reported there are C compilers + # that will create temporary files in the current directory regardless of + # the output directory. Thus, making CWD read-only will cause this test + # to fail, enabling locking or at least warning the user not to do parallel + # builds. + chmod -w . + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:6301: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:6305: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s out/conftest.err; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs=no + fi + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; - am_save_CPPFLAGS="$CPPFLAGS" + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; - for element in $INCICONV; do - haveit= - for x in $CPPFLAGS; do + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac - if test "X$x" = "X$element"; then - haveit=yes - break + if test "$ld_shlibs" = yes; then + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= fi - done - if test -z "$haveit"; then - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi - done + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi - echo "$as_me:$LINENO: checking for iconv" >&5 -echo $ECHO_N "checking for iconv... $ECHO_C" >&6 -if test "${am_cv_func_iconv+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + + if test "$GCC" = yes; then + case $host_os in aix4.012|aix4.012.*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi - am_cv_func_iconv="no, consider installing GNU libiconv" - am_cv_lib_iconv=no - cat >conftest.$ac_ext <<_ACEOF + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include -#include + #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -6349,9 +6653,7 @@ else int main () { -iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); + ; return 0; } @@ -6368,20 +6670,32 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - am_cv_func_iconv=yes + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - if test "$am_cv_func_iconv" != yes; then - am_save_LIBS="$LIBS" - LIBS="$LIBS $LIBICONV" - cat >conftest.$ac_ext <<_ACEOF +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include -#include + #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -6391,9 +6705,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext int main () { -iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); + ; return 0; } @@ -6410,120 +6722,1164 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - am_cv_lib_iconv=yes - am_cv_func_iconv=yes + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS="$am_save_LIBS" - fi +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec=' ' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds it's shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; -fi -echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 -echo "${ECHO_T}$am_cv_func_iconv" >&6 - if test "$am_cv_func_iconv" = yes; then + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; -cat >>confdefs.h <<\_ACEOF -#define HAVE_ICONV 1 -_ACEOF + bsdi4*) + export_dynamic_flag_spec=-rdynamic + ;; - fi - if test "$am_cv_lib_iconv" = yes; then - echo "$as_me:$LINENO: checking how to link with libiconv" >&5 -echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $LIBICONV" >&5 -echo "${ECHO_T}$LIBICONV" >&6 - else - CPPFLAGS="$am_save_CPPFLAGS" - LIBICONV= - LTLIBICONV= - fi + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + darwin* | rhapsody*) + if test "$GXX" = yes ; then + archive_cmds_need_lc=no + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='-flat_namespace -undefined suppress' + ;; + 10.*) + allow_undefined_flag='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='-all_load $convenience' + link_all_deplibs=yes + else + ld_shlibs=no + fi + ;; + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; - if test "$am_cv_func_iconv" = yes; then - echo "$as_me:$LINENO: checking for iconv declaration" >&5 -echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 - if test "${am_cv_proto_iconv+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + freebsd1*) + ld_shlibs=no + ;; - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; -#include -#include -extern -#ifdef __cplusplus -"C" -#endif -#if defined(__STDC__) || defined(__cplusplus) -size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); -#else -size_t iconv(); -#endif + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - am_cv_proto_iconv_arg1="" -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -am_cv_proto_iconv_arg1="const" -fi -rm -f conftest.$ac_objext conftest.$ac_ext - am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" -fi + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; - am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - echo "$as_me:$LINENO: result: ${ac_t:- - }$am_cv_proto_iconv" >&5 -echo "${ECHO_T}${ac_t:- - }$am_cv_proto_iconv" >&6 + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + ia64*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + *) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; -cat >>confdefs.h <<_ACEOF -#define ICONV_CONST $am_cv_proto_iconv_arg1 -_ACEOF + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; - fi + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; - echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 -echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 -if test "${am_cv_langinfo_codeset+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" + openbsd*) + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + + sco3.2v5*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4.2uw2*) + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=no + hardcode_shlibpath_var=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + no_undefined_flag='${wl}-z ${wl}text' + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv5*) + no_undefined_flag=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + hardcode_libdir_flag_spec= + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6 +test "$ld_shlibs" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.01* | freebsdelf3.01*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var " || \ + test "X$hardcode_automatic"="Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6 + +if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" +# +# +# The following section is a PATCH to overcome the +# stripped import library issues under cygwin + case $host_os in + cygwin*) + striplib= + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + *) + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + esac +# +# +# AC_MSG_RESULT([yes]) +# +# + +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -6533,7 +7889,7 @@ else int main () { -char* cs = nl_langinfo(CODESET); +dlopen (); ; return 0; } @@ -6550,46 +7906,68 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - am_cv_langinfo_codeset=yes + ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -am_cv_langinfo_codeset=no +ac_cv_lib_dl_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - +LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 -echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 - if test $am_cv_langinfo_codeset = yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else -cat >>confdefs.h <<\_ACEOF -#define HAVE_LANGINFO_CODESET 1 -_ACEOF + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes - fi +fi - if test $ac_cv_header_locale_h = yes; then + ;; - echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 -echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 -if test "${am_cv_val_LC_MESSAGES+set}" = set; then + *) + echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { -return LC_MESSAGES +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +f = shl_load; +#endif + ; return 0; } @@ -6606,155 +7984,162 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - am_cv_val_LC_MESSAGES=yes + ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -am_cv_val_LC_MESSAGES=no +ac_cv_func_shl_load=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 -echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 - if test $am_cv_val_LC_MESSAGES = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LC_MESSAGES 1 -_ACEOF - - fi - - fi - - for ac_prog in bison -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_INTLBISON+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" else - if test -n "$INTLBISON"; then - ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_INTLBISON="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dld_shl_load=no fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -INTLBISON=$ac_cv_prog_INTLBISON -if test -n "$INTLBISON"; then - echo "$as_me:$LINENO: result: $INTLBISON" >&5 -echo "${ECHO_T}$INTLBISON" >&6 +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$INTLBISON" && break -done - - if test -z "$INTLBISON"; then - ac_verc_fail=yes - else - echo "$as_me:$LINENO: checking version of bison" >&5 -echo $ECHO_N "checking version of bison... $ECHO_C" >&6 - ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - esac - echo "$as_me:$LINENO: result: $ac_prog_version" >&5 -echo "${ECHO_T}$ac_prog_version" >&6 - fi - if test $ac_verc_fail = yes; then - INTLBISON=: - fi - - - - - - - - - - - - - - - - echo "$as_me:$LINENO: checking whether NLS is requested" >&5 -echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 - # Check whether --enable-nls or --disable-nls was given. -if test "${enable_nls+set}" = set; then - enableval="$enable_nls" - USE_NLS=$enableval + echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - USE_NLS=yes -fi; - echo "$as_me:$LINENO: result: $USE_NLS" >&5 -echo "${ECHO_T}$USE_NLS" >&6 - - - - BUILD_INCLUDED_LIBINTL=no - USE_INCLUDED_LIBINTL=no - - LIBINTL= - LTLIBINTL= - POSUB= - - if test "$USE_NLS" = "yes"; then - gt_use_preinstalled_gnugettext=no + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +char (*f) (); - echo "$as_me:$LINENO: checking whether included gettext is requested" >&5 -echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6 +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +f = dlopen; +#endif -# Check whether --with-included-gettext or --without-included-gettext was given. -if test "${with_included_gettext+set}" = set; then - withval="$with_included_gettext" - nls_cv_force_use_gnu_gettext=$withval + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_dlopen=yes else - nls_cv_force_use_gnu_gettext=no -fi; - echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5 -echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6 - - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then - - - - - - - echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 -echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6 -if test "${gt_cv_func_gnugettext1_libc+set}" = set; then + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include -extern int _nl_msg_cat_cntr; -extern int *_nl_domain_bindings; + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -6764,8 +8149,7 @@ extern int *_nl_domain_bindings; int main () { -bindtextdomain ("", ""); -return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings +dlopen (); ; return 0; } @@ -6782,416 +8166,17300 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gt_cv_func_gnugettext1_libc=yes + ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -gt_cv_func_gnugettext1_libc=no +ac_cv_lib_dl_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libc" >&5 -echo "${ECHO_T}$gt_cv_func_gnugettext1_libc" >&6 +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" - if test "$gt_cv_func_gnugettext1_libc" != "yes"; then +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_svld_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dld_link (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dld_dld_link=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi - use_additional=yes +fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" +fi - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +fi -# Check whether --with-libintl-prefix or --without-libintl-prefix was given. -if test "${with_libintl_prefix+set}" = set; then - withval="$with_libintl_prefix" - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then +fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" +fi - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + ;; + esac - else - additional_includedir="$withval/include" - additional_libdir="$withval/lib" - fi - fi + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi -fi; - LIBINTL= - LTLIBINTL= - INCINTL= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='intl ' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" - else - : - fi - else - found_dir= - found_la= - found_so= - found_a= - if test $use_additional = yes; then - if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then - found_dir="$additional_libdir" - found_so="$additional_libdir/lib$name.$shlibext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" - fi - else - if test -f "$additional_libdir/lib$name.$libext"; then - found_dir="$additional_libdir" - found_a="$additional_libdir/lib$name.$libext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" - fi - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIBINTL; do + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then - found_dir="$dir" - found_so="$dir/lib$name.$shlibext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" - fi - else - if test -f "$dir/lib$name.$libext"; then - found_dir="$dir" - found_a="$dir/lib$name.$libext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" - fi - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then - LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" - else - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - if test "$hardcode_direct" = yes; then - LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" - else - if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then - LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - haveit= - for x in $LDFLAGS $LIBINTL; do + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" + echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6 + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# Report which librarie types wil actually be built +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case "$host_os" in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + darwin* | rhapsody*) + if test "$GCC" = yes; then + archive_cmds_need_lc=no + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='-flat_namespace -undefined suppress' + ;; + 10.*) + allow_undefined_flag='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='-all_load $convenience' + link_all_deplibs=yes + else + ld_shlibs=no + fi + ;; +esac +echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6 + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# 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. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext='$shrext' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + test -f Makefile && make "$ltmain" +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + +# Check whether --with-tags or --without-tags was given. +if test "${with_tags+set}" = set; then + withval="$with_tags" + tagnames="$withval" +fi; + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && test "X$CXX" != "Xno"; then + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +# Source file extension for C++ test sources. +ac_ext=cc + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +compiler_CXX=$CC +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +else + lt_prog_compiler_no_builtin_flag_CXX= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes; then + case $host_os in aix4.012|aix4.012.*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_CXX=yes + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols_CXX=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX=' ' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds it's shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs_CXX=no + fi + ;; + + darwin* | rhapsody*) + if test "$GXX" = yes; then + archive_cmds_need_lc_CXX=no + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='-flat_namespace -undefined suppress' + ;; + 10.*) + allow_undefined_flag_CXX='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='-all_load $convenience' + link_all_deplibs_CXX=yes + else + ld_shlibs_CXX=no + fi + ;; + + dgux*) + case $cc_basename in + ec++) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd12*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | kfreebsd*-gnu) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC) + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + case "$host_cpu" in + hppa*64*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld_CXX='+b $libdir' + hardcode_libdir_separator_CXX=: + ;; + ia64*) + hardcode_libdir_flag_spec_CXX='-L$libdir' + ;; + *) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case "$host_cpu" in + hppa*64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC) + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case "$host_cpu" in + ia64*|hppa*64*) + archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + irix5* | irix6*) + case $cc_basename in + CC) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc) + # Intel C++ + with_gnu_ld=yes + archive_cmds_need_lc_CXX=no + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + cxx) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + osf3*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sco*) + archive_cmds_need_lc_CXX=no + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.0-5 | solaris2.0-5.*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + archive_cmds_need_lc_CXX=no + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + + +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" + + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$rm -f confest.$objext + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + cxx) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + sco*) + case $cc_basename in + CC) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + *) + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + unixware*) + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:10601: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:10605: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 + +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi +case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + # According to Tom Tromey, Ian Lance Taylor reported there are C compilers + # that will create temporary files in the current directory regardless of + # the output directory. Thus, making CWD read-only will cause this test + # to fail, enabling locking or at least warning the user not to do parallel + # builds. + chmod -w . + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:10668: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:10672: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s out/conftest.err; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.01* | freebsdelf3.01*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var CXX" || \ + test "X$hardcode_automatic_CXX"="Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6 + +if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" +# +# +# The following section is a PATCH to overcome the +# stripped import library issues under cygwin + case $host_os in + cygwin*) + striplib= + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + *) + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + esac +# +# +# AC_MSG_RESULT([yes]) +# +# + +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +f = shl_load; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_shl_load=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +f = dlopen; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_svld_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dld_link (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dld_dld_link=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6 + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext='$shrext' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_CXX" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + test -f Makefile && make "$ltmain" +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code=" subroutine t\n return\n end\n" + +# Code to be used in simple link tests +lt_simple_link_test_code=" program t\n end\n" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` + +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case "$host_os" in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +aix4*) + test "$enable_shared" = yes && enable_static=no + ;; +esac +echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6 + +test "$ld_shlibs_F77" = no && can_build_shared=no + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux*) + case $CC in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + sco3.2v5*) + lt_prog_compiler_pic_F77='-Kpic' + lt_prog_compiler_static_F77='-dn' + ;; + + solaris*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:12854: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:12858: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 + +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + # According to Tom Tromey, Ian Lance Taylor reported there are C compilers + # that will create temporary files in the current directory regardless of + # the output directory. Thus, making CWD read-only will cause this test + # to fail, enabling locking or at least warning the user not to do parallel + # builds. + chmod -w . + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:12921: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:12925: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s out/conftest.err; then + lt_cv_prog_compiler_c_o_F77=yes + fi + fi + chmod u+w . + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test "$ld_shlibs_F77" = yes; then + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_F77=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_F77=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + + if test "$GCC" = yes; then + case $host_os in aix4.012|aix4.012.*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_F77=yes + else + # We have old collect2 + hardcode_direct_F77=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_F77=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols_F77=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77=' ' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds it's shared libraries. + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi4*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + if test "$GXX" = yes ; then + archive_cmds_need_lc_F77=no + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='-flat_namespace -undefined suppress' + ;; + 10.*) + allow_undefined_flag_F77='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_F77='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_F77='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='-all_load $convenience' + link_all_deplibs_F77=yes + else + ld_shlibs_F77=no + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*) + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + ia64*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + *) + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + openbsd*) + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + + sco3.2v5*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; + + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + esac + link_all_deplibs_F77=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4.2uw2*) + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + no_undefined_flag_F77='${wl}-z ${wl}text' + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv5*) + no_undefined_flag_F77=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + hardcode_libdir_flag_spec_F77= + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6 +test "$ld_shlibs_F77" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.01* | freebsdelf3.01*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var F77" || \ + test "X$hardcode_automatic_F77"="Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6 + +if test "$hardcode_action_F77" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" +# +# +# The following section is a PATCH to overcome the +# stripped import library issues under cygwin + case $host_os in + cygwin*) + striplib= + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + *) + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + esac +# +# +# AC_MSG_RESULT([yes]) +# +# + +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi + + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext='$shrext' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_F77 + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_F77 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_F77" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + test -f Makefile && make "$ltmain" +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$CC + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no + + +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:14903: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:14907: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + linux*) + case $CC in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + sco3.2v5*) + lt_prog_compiler_pic_GCJ='-Kpic' + lt_prog_compiler_static_GCJ='-dn' + ;; + + solaris*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:15136: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:15140: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 + +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi + +fi +case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + # According to Tom Tromey, Ian Lance Taylor reported there are C compilers + # that will create temporary files in the current directory regardless of + # the output directory. Thus, making CWD read-only will cause this test + # to fail, enabling locking or at least warning the user not to do parallel + # builds. + chmod -w . + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:15203: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:15207: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s out/conftest.err; then + lt_cv_prog_compiler_c_o_GCJ=yes + fi + fi + chmod u+w . + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_GCJ=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + + if test "$ld_shlibs_GCJ" = yes; then + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_GCJ=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_GCJ=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + + if test "$GCC" = yes; then + case $host_os in aix4.012|aix4.012.*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_GCJ=yes + else + # We have old collect2 + hardcode_direct_GCJ=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_GCJ=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols_GCJ=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ=' ' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds it's shared libraries. + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + + bsdi4*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + + darwin* | rhapsody*) + if test "$GXX" = yes ; then + archive_cmds_need_lc_GCJ=no + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_GCJ='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_GCJ='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='-all_load $convenience' + link_all_deplibs_GCJ=yes + else + ld_shlibs_GCJ=no + fi + ;; + + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + freebsd1*) + ld_shlibs_GCJ=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*) + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + ia64*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + *) + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + + openbsd*) + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + + sco3.2v5*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; + + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + esac + link_all_deplibs_GCJ=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4.2uw2*) + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + no_undefined_flag_GCJ='${wl}-z ${wl}text' + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv5*) + no_undefined_flag_GCJ=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + hardcode_libdir_flag_spec_GCJ= + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + ;; + + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + *) + ld_shlibs_GCJ=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6 +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.01* | freebsdelf3.01*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var GCJ" || \ + test "X$hardcode_automatic_GCJ"="Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6 + +if test "$hardcode_action_GCJ" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" +# +# +# The following section is a PATCH to overcome the +# stripped import library issues under cygwin + case $host_os in + cygwin*) + striplib= + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + *) + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + esac +# +# +# AC_MSG_RESULT([yes]) +# +# + +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +f = shl_load; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_shl_load=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +f = dlopen; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_svld_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dld_link (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dld_dld_link=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6 + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext='$shrext' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ + +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_GCJ + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_GCJ + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_GCJ + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_GCJ" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_GCJ + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + test -f Makefile && make "$ltmain" +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$CC +lt_cv_prog_compiler_c_o_RC=yes + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext='$shrext' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_RC + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_RC + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_RC" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + test -f Makefile && make "$ltmain" +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + + +# ISW20030827-1 : Enable use of embedded libltdl 1 Line added +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + } +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_const=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + + + + + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include <$ac_hdr> + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_opendir=no +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="none required" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_opendir" = no; then + for ac_lib in dir; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6 +if test "$ac_cv_search_opendir" != no; then + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" + +fi + +else + echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_opendir=no +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="none required" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_opendir" = no; then + for ac_lib in x; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6 +if test "$ac_cv_search_opendir" != no; then + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" + +fi + +fi + +# Check whether --enable-ltdl-install or --disable-ltdl-install was given. +if test "${enable_ltdl_install+set}" = set; then + enableval="$enable_ltdl_install" + +fi; + + + +if test x"${enable_ltdl_install-no}" != xno; then + INSTALL_LTDL_TRUE= + INSTALL_LTDL_FALSE='#' +else + INSTALL_LTDL_TRUE='#' + INSTALL_LTDL_FALSE= +fi + + + +if test x"${enable_ltdl_convenience-no}" != xno; then + CONVENIENCE_LTDL_TRUE= + CONVENIENCE_LTDL_FALSE='#' +else + CONVENIENCE_LTDL_TRUE='#' + CONVENIENCE_LTDL_FALSE= +fi + + + +echo "$as_me:$LINENO: checking which extension is used for loadable modules" >&5 +echo $ECHO_N "checking which extension is used for loadable modules... $ECHO_C" >&6 +if test "${libltdl_cv_shlibext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +module=yes +eval libltdl_cv_shlibext=$shrext + +fi +echo "$as_me:$LINENO: result: $libltdl_cv_shlibext" >&5 +echo "${ECHO_T}$libltdl_cv_shlibext" >&6 +if test -n "$libltdl_cv_shlibext"; then + +cat >>confdefs.h <<_ACEOF +#define LTDL_SHLIB_EXT "$libltdl_cv_shlibext" +_ACEOF + +fi + + +echo "$as_me:$LINENO: checking which variable specifies run-time library path" >&5 +echo $ECHO_N "checking which variable specifies run-time library path... $ECHO_C" >&6 +if test "${libltdl_cv_shlibpath_var+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + libltdl_cv_shlibpath_var="$shlibpath_var" +fi +echo "$as_me:$LINENO: result: $libltdl_cv_shlibpath_var" >&5 +echo "${ECHO_T}$libltdl_cv_shlibpath_var" >&6 +if test -n "$libltdl_cv_shlibpath_var"; then + +cat >>confdefs.h <<_ACEOF +#define LTDL_SHLIBPATH_VAR "$libltdl_cv_shlibpath_var" +_ACEOF + +fi + + +echo "$as_me:$LINENO: checking for the default library search path" >&5 +echo $ECHO_N "checking for the default library search path... $ECHO_C" >&6 +if test "${libltdl_cv_sys_search_path+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec" +fi +echo "$as_me:$LINENO: result: $libltdl_cv_sys_search_path" >&5 +echo "${ECHO_T}$libltdl_cv_sys_search_path" >&6 +if test -n "$libltdl_cv_sys_search_path"; then + sys_search_path= + for dir in $libltdl_cv_sys_search_path; do + if test -z "$sys_search_path"; then + sys_search_path="$dir" + else + sys_search_path="$sys_search_path$PATH_SEPARATOR$dir" + fi + done + +cat >>confdefs.h <<_ACEOF +#define LTDL_SYSSEARCHPATH "$sys_search_path" +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6 +if test "${libltdl_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + libltdl_cv_objdir="$objdir" + if test -n "$objdir"; then + : + else + rm -f .libs 2>/dev/null + mkdir .libs 2>/dev/null + if test -d .libs; then + libltdl_cv_objdir=.libs + else + # MS-DOS does not allow filenames that begin with a dot. + libltdl_cv_objdir=_libs + fi + rmdir .libs 2>/dev/null + fi + +fi +echo "$as_me:$LINENO: result: $libltdl_cv_objdir" >&5 +echo "${ECHO_T}$libltdl_cv_objdir" >&6 + +cat >>confdefs.h <<_ACEOF +#define LTDL_OBJDIR "$libltdl_cv_objdir/" +_ACEOF + + + +echo "$as_me:$LINENO: checking whether libtool supports -dlopen/-dlpreopen" >&5 +echo $ECHO_N "checking whether libtool supports -dlopen/-dlpreopen... $ECHO_C" >&6 +if test "${libltdl_cv_preloaded_symbols+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$lt_cv_sys_global_symbol_pipe"; then + libltdl_cv_preloaded_symbols=yes + else + libltdl_cv_preloaded_symbols=no + fi + +fi +echo "$as_me:$LINENO: result: $libltdl_cv_preloaded_symbols" >&5 +echo "${ECHO_T}$libltdl_cv_preloaded_symbols" >&6 +if test x"$libltdl_cv_preloaded_symbols" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PRELOADED_SYMBOLS 1 +_ACEOF + +fi + +LIBADD_DL= + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +f = shl_load; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_shl_load=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHL_LOAD 1 +_ACEOF + +else + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHL_LOAD 1 +_ACEOF + + LIBADD_DL="$LIBADD_DL -ldld" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBDL 1 +_ACEOF + + LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes" +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#if HAVE_DLFCN_H +# include +#endif + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dlopen(0, 0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBDL 1 +_ACEOF + libltdl_cv_func_dlopen="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_svld_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +if test $ac_cv_lib_svld_dlopen = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBDL 1 +_ACEOF + + LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes" +else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dld_link (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dld_dld_link=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DLD 1 +_ACEOF + + LIBADD_DL="$LIBADD_DL -ldld" +else + echo "$as_me:$LINENO: checking for _dyld_func_lookup" >&5 +echo $ECHO_N "checking for _dyld_func_lookup... $ECHO_C" >&6 +if test "${ac_cv_func__dyld_func_lookup+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _dyld_func_lookup (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _dyld_func_lookup (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__dyld_func_lookup) || defined (__stub____dyld_func_lookup) +choke me +#else +f = _dyld_func_lookup; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func__dyld_func_lookup=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func__dyld_func_lookup=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func__dyld_func_lookup" >&5 +echo "${ECHO_T}$ac_cv_func__dyld_func_lookup" >&6 +if test $ac_cv_func__dyld_func_lookup = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DYLD 1 +_ACEOF + +fi + + +fi + + +fi + + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + +fi + + +fi + + +fi + + +if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes +then + lt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBADD_DL" + +for ac_func in dlerror +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + LIBS="$lt_save_LIBS" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +echo "$as_me:$LINENO: checking for _ prefix in compiled symbols" >&5 +echo $ECHO_N "checking for _ prefix in compiled symbols... $ECHO_C" >&6 +if test "${ac_cv_sys_symbol_underscore+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_sys_symbol_underscore=no + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + ac_nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$ac_nlist"; then + # See whether the symbols have a leading underscore. + if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then + ac_cv_sys_symbol_underscore=yes + else + if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then + : + else + echo "configure: cannot find nm_test_func in $ac_nlist" >&5 + fi + fi + else + echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "configure: failed program was:" >&5 + cat conftest.c >&5 + fi + rm -rf conftest* + +fi +echo "$as_me:$LINENO: result: $ac_cv_sys_symbol_underscore" >&5 +echo "${ECHO_T}$ac_cv_sys_symbol_underscore" >&6 + + +if test x"$ac_cv_sys_symbol_underscore" = xyes; then + if test x"$libltdl_cv_func_dlopen" = xyes || + test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then + echo "$as_me:$LINENO: checking whether we have to add an underscore for dlsym" >&5 +echo $ECHO_N "checking whether we have to add an underscore for dlsym... $ECHO_C" >&6 +if test "${libltdl_cv_need_uscore+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + libltdl_cv_need_uscore=unknown + save_LIBS="$LIBS" + LIBS="$LIBS $LIBADD_DL" + if test "$cross_compiling" = yes; then : + libltdl_cv_need_uscore=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) libltdl_cv_need_uscore=no ;; + x$lt_dlneed_uscore) libltdl_cv_need_uscore=yes ;; + x$lt_unknown|x*) ;; + esac + else : + # compilation failed + + fi +fi +rm -fr conftest* + + LIBS="$save_LIBS" + +fi +echo "$as_me:$LINENO: result: $libltdl_cv_need_uscore" >&5 +echo "${ECHO_T}$libltdl_cv_need_uscore" >&6 + fi +fi + +if test x"$libltdl_cv_need_uscore" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define NEED_USCORE 1 +_ACEOF + +fi + + +echo "$as_me:$LINENO: checking whether deplibs are loaded by dlopen" >&5 +echo $ECHO_N "checking whether deplibs are loaded by dlopen... $ECHO_C" >&6 +if test "${libltdl_cv_sys_dlopen_deplibs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # PORTME does your system automatically load deplibs for dlopen? + # or its logical equivalent (e.g. shl_load for HP-UX < 11) + # For now, we just catch OSes we know something about -- in the + # future, we'll try test this programmatically. + libltdl_cv_sys_dlopen_deplibs=unknown + case "$host_os" in + aix3*|aix4.1.*|aix4.2.*) + # Unknown whether this is true for these versions of AIX, but + # we want this `case' here to explicitly catch those versions. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + aix[45]*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + darwin*) + # Assuming the user has installed a libdl from somewhere, this is true + # If you are looking for one http://www.opendarwin.org/projects/dlcompat + libltdl_cv_sys_dlopen_deplibs=yes + ;; + kfreebsd*-gnu) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + gnu*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + hpux10*|hpux11*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + irix[12345]*|irix6.[01]*) + # Catch all versions of IRIX before 6.2, and indicate that we don't + # know how it worked for any of those versions. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + irix*) + # The case above catches anything before 6.2, and it's known that + # at 6.2 and later dlopen does load deplibs. + libltdl_cv_sys_dlopen_deplibs=yes + ;; + linux*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + netbsd*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + openbsd*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + osf[1234]*) + # dlopen did load deplibs (at least at 4.x), but until the 5.x series, + # it did *not* use an RPATH in a shared library to find objects the + # library depends on, so we explictly say `no'. + libltdl_cv_sys_dlopen_deplibs=no + ;; + osf5.0|osf5.0a|osf5.1) + # dlopen *does* load deplibs and with the right loader patch applied + # it even uses RPATH in a shared library to search for shared objects + # that the library depends on, but there's no easy way to know if that + # patch is installed. Since this is the case, all we can really + # say is unknown -- it depends on the patch being installed. If + # it is, this changes to `yes'. Without it, it would be `no'. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + osf*) + # the two cases above should catch all versions of osf <= 5.1. Read + # the comments above for what we know about them. + # At > 5.1, deplibs are loaded *and* any RPATH in a shared library + # is used to find them so we can finally say `yes'. + libltdl_cv_sys_dlopen_deplibs=yes + ;; + solaris*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + esac + +fi +echo "$as_me:$LINENO: result: $libltdl_cv_sys_dlopen_deplibs" >&5 +echo "${ECHO_T}$libltdl_cv_sys_dlopen_deplibs" >&6 +if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then + +cat >>confdefs.h <<\_ACEOF +#define LTDL_DLOPEN_DEPLIBS 1 +_ACEOF + +fi + + +for ac_header in argz.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +echo "$as_me:$LINENO: checking for error_t" >&5 +echo $ECHO_N "checking for error_t... $ECHO_C" >&6 +if test "${ac_cv_type_error_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#if HAVE_ARGZ_H +# include +#endif + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((error_t *) 0) + return 0; +if (sizeof (error_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_error_t=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_error_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_error_t" >&5 +echo "${ECHO_T}$ac_cv_type_error_t" >&6 +if test $ac_cv_type_error_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_ERROR_T 1 +_ACEOF + + +else + +cat >>confdefs.h <<\_ACEOF +#define error_t int +_ACEOF + +fi + + + + + + + +for ac_func in argz_append argz_create_sep argz_insert argz_next argz_stringify +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + + + + + + + + + + + + + + + + + + + + + + + +for ac_header in assert.h ctype.h errno.h malloc.h memory.h stdlib.h \ + stdio.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + +for ac_header in dl.h sys/dl.h dld.h mach-o/dyld.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in string.h strings.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + break +fi + +done + + + + +for ac_func in strchr index +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + break +fi +done + + + +for ac_func in strrchr rindex +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + break +fi +done + + + +for ac_func in memcpy bcopy +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + break +fi +done + + + +for ac_func in memmove strcmp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + +for ac_func in closedir opendir readdir +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + + + + + + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MSGFMT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != ":"; then + echo "$as_me:$LINENO: result: $MSGFMT" >&5 +echo "${ECHO_T}$MSGFMT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_GMSGFMT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT + +if test -n "$GMSGFMT"; then + echo "$as_me:$LINENO: result: $GMSGFMT" >&5 +echo "${ECHO_T}$GMSGFMT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_XGETTEXT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + echo "$as_me:$LINENO: result: $XGETTEXT" >&5 +echo "${ECHO_T}$XGETTEXT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + rm -f messages.po + + # Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MSGMERGE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$MSGMERGE" in + /*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" + ;; +esac +fi +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + echo "$as_me:$LINENO: result: $MSGMERGE" >&5 +echo "${ECHO_T}$MSGMERGE" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + if test "$GMSGFMT" != ":"; then + if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && + (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` + echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5 +echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6 + GMSGFMT=":" + fi + fi + + if test "$XGETTEXT" != ":"; then + if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && + (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 +echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 + XGETTEXT=":" + fi + rm -f messages.po + fi + + ac_config_commands="$ac_config_commands default-1" + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + + echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5 +echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6 +if test "${ac_cv_lib_cposix_strerror+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcposix $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strerror (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +strerror (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_cposix_strerror=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_cposix_strerror=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5 +echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6 +if test $ac_cv_lib_cposix_strerror = yes; then + LIBS="$LIBS -lcposix" +fi + + + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#ifndef __cplusplus +static $ac_kw int static_foo () {return 0; } +$ac_kw int foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 +case $ac_cv_c_inline in + inline | yes) ;; + no) +cat >>confdefs.h <<\_ACEOF +#define inline +_ACEOF + ;; + *) cat >>confdefs.h <<_ACEOF +#define inline $ac_cv_c_inline +_ACEOF + ;; +esac + +echo "$as_me:$LINENO: checking for off_t" >&5 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6 +if test "${ac_cv_type_off_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((off_t *) 0) + return 0; +if (sizeof (off_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_off_t=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_off_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_off_t" >&6 +if test $ac_cv_type_off_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define off_t long +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((size_t *) 0) + return 0; +if (sizeof (size_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_size_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned +_ACEOF + +fi + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +echo "$as_me:$LINENO: checking for working alloca.h" >&5 +echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 +if test "${ac_cv_working_alloca_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_working_alloca_h=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_working_alloca_h=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 +echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 +if test $ac_cv_working_alloca_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA_H 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for alloca" >&5 +echo $ECHO_N "checking for alloca... $ECHO_C" >&6 +if test "${ac_cv_func_alloca_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# if HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +char *p = (char *) alloca (1); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_alloca_works=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_alloca_works=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 +echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 + +if test $ac_cv_func_alloca_works = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA 1 +_ACEOF + +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. + +ALLOCA=alloca.$ac_objext + +cat >>confdefs.h <<\_ACEOF +#define C_ALLOCA 1 +_ACEOF + + +echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 +echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 +if test "${ac_cv_os_cray+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#if defined(CRAY) && ! defined(CRAY2) +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "webecray" >/dev/null 2>&1; then + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 +echo "${ECHO_T}$ac_cv_os_cray" >&6 +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 +echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 +if test "${ac_cv_c_stack_direction+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +int +find_stack_direction () +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} + +int +main () +{ + exit (find_stack_direction () < 0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_stack_direction=1 +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_c_stack_direction=-1 +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 +echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 + +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + +fi + + + +for ac_header in stdlib.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_func in getpagesize +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +echo "$as_me:$LINENO: checking for working mmap" >&5 +echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=no +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !STDC_HEADERS && !HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#if !HAVE_GETPAGESIZE +/* Assume that all systems that can run configure have sys/param.h. */ +# if !HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# if HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + exit (1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + exit (1); + if (write (fd, data, pagesize) != pagesize) + exit (1); + close (fd); + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + exit (1); + data2 = (char *) malloc (2 * pagesize); + if (!data2) + exit (1); + data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit (1); + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + exit (1); + if (read (fd, data3, pagesize) != pagesize) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit (1); + close (fd); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_mmap_fixed_mapped=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP 1 +_ACEOF + +fi +rm -f conftest.mmap + + + echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 +echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6 +if test "${ac_cv_gnu_library_2_1+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "Lucky GNU user" >/dev/null 2>&1; then + ac_cv_gnu_library_2_1=yes +else + ac_cv_gnu_library_2_1=no +fi +rm -f conftest* + + + +fi +echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 +echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6 + + GLIBC21="$ac_cv_gnu_library_2_1" + + + + + echo "$as_me:$LINENO: checking whether integer division by zero raises SIGFPE" >&5 +echo $ECHO_N "checking whether integer division by zero raises SIGFPE... $ECHO_C" >&6 +if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + + # Guess based on the CPU. + case "$host_cpu" in + alpha* | i3456786 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac + +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#include +#include + +static void +#ifdef __cplusplus +sigfpe_handler (int sig) +#else +sigfpe_handler (sig) int sig; +#endif +{ + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ + exit (sig != SIGFPE); +} + +int x = 1; +int y = 0; +int z; +int nan; + +int main () +{ + signal (SIGFPE, sigfpe_handler); +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) + signal (SIGTRAP, sigfpe_handler); +#endif +/* Linux/SPARC yields signal SIGILL. */ +#if defined (__sparc__) && defined (__linux__) + signal (SIGILL, sigfpe_handler); +#endif + + z = x / y; + nan = y / y; + exit (1); +} + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_int_divbyzero_sigfpe=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +gt_cv_int_divbyzero_sigfpe=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + +fi +echo "$as_me:$LINENO: result: $gt_cv_int_divbyzero_sigfpe" >&5 +echo "${ECHO_T}$gt_cv_int_divbyzero_sigfpe" >&6 + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac + +cat >>confdefs.h <<_ACEOF +#define INTDIV0_RAISES_SIGFPE $value +_ACEOF + + + + echo "$as_me:$LINENO: checking for inttypes.h" >&5 +echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 +if test "${jm_ac_cv_header_inttypes_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +uintmax_t i = (uintmax_t) -1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + jm_ac_cv_header_inttypes_h=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +jm_ac_cv_header_inttypes_h=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $jm_ac_cv_header_inttypes_h" >&5 +echo "${ECHO_T}$jm_ac_cv_header_inttypes_h" >&6 + if test $jm_ac_cv_header_inttypes_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H_WITH_UINTMAX 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for stdint.h" >&5 +echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6 +if test "${jm_ac_cv_header_stdint_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +uintmax_t i = (uintmax_t) -1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + jm_ac_cv_header_stdint_h=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +jm_ac_cv_header_stdint_h=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $jm_ac_cv_header_stdint_h" >&5 +echo "${ECHO_T}$jm_ac_cv_header_stdint_h" >&6 + if test $jm_ac_cv_header_stdint_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H_WITH_UINTMAX 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for unsigned long long" >&5 +echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6 +if test "${ac_cv_type_unsigned_long_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +unsigned long long ull = 1; int i = 63; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +unsigned long long ullmax = (unsigned long long) -1; + return ull << i | ull >> i | ullmax / ull | ullmax % ull; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_unsigned_long_long=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_unsigned_long_long=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6 + if test $ac_cv_type_unsigned_long_long = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UNSIGNED_LONG_LONG 1 +_ACEOF + + fi + + + + + if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then + + test $ac_cv_type_unsigned_long_long = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + +cat >>confdefs.h <<_ACEOF +#define uintmax_t $ac_type +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for inttypes.h" >&5 +echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 +if test "${gt_cv_header_inttypes_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_header_inttypes_h=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +gt_cv_header_inttypes_h=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $gt_cv_header_inttypes_h" >&5 +echo "${ECHO_T}$gt_cv_header_inttypes_h" >&6 + if test $gt_cv_header_inttypes_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H 1 +_ACEOF + + fi + + + + if test $gt_cv_header_inttypes_h = yes; then + echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5 +echo $ECHO_N "checking whether the inttypes.h PRIxNN macros are broken... $ECHO_C" >&6 +if test "${gt_cv_inttypes_pri_broken+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef PRId32 +char *p = PRId32; +#endif + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_inttypes_pri_broken=no +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +gt_cv_inttypes_pri_broken=yes +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5 +echo "${ECHO_T}$gt_cv_inttypes_pri_broken" >&6 + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then + +cat >>confdefs.h <<_ACEOF +#define PRI_MACROS_BROKEN 1 +_ACEOF + + fi + + + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" + + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by GCC" >&5 +echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${acl_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$acl_cv_path_LD" +if test -n "$LD"; then + echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${acl_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + acl_cv_prog_gnu_ld=yes +else + acl_cv_prog_gnu_ld=no +fi +fi +echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 +with_gnu_ld=$acl_cv_prog_gnu_ld + + + + echo "$as_me:$LINENO: checking for shared library run path origin" >&5 +echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 +if test "${acl_cv_rpath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + +fi +echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 +echo "${ECHO_T}$acl_cv_rpath" >&6 + wl="$acl_cv_wl" + libext="$acl_cv_libext" + shlibext="$acl_cv_shlibext" + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + hardcode_direct="$acl_cv_hardcode_direct" + hardcode_minus_L="$acl_cv_hardcode_minus_L" + sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec" + # Check whether --enable-rpath or --disable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval="$enable_rpath" + : +else + enable_rpath=yes +fi; + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then + withval="$with_libiconv_prefix" + + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi + +fi; + LIBICONV= + LTLIBICONV= + INCICONV= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + found_dir="$dir" + found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done + fi + + + + + + + + + + + + + + +for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ +stdlib.h string.h unistd.h sys/param.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + + + + + + + + + + + + + + +for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ +geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ +strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + echo "$as_me:$LINENO: checking for iconv" >&5 +echo $ECHO_N "checking for iconv... $ECHO_C" >&6 +if test "${am_cv_func_iconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + am_cv_func_iconv=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + +fi +echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 +echo "${ECHO_T}$am_cv_func_iconv" >&6 + if test "$am_cv_func_iconv" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ICONV 1 +_ACEOF + + fi + if test "$am_cv_lib_iconv" = yes; then + echo "$as_me:$LINENO: checking how to link with libiconv" >&5 +echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $LIBICONV" >&5 +echo "${ECHO_T}$LIBICONV" >&6 + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + if test "$am_cv_func_iconv" = yes; then + echo "$as_me:$LINENO: checking for iconv declaration" >&5 +echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 + if test "${am_cv_proto_iconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + am_cv_proto_iconv_arg1="" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +am_cv_proto_iconv_arg1="const" +fi +rm -f conftest.$ac_objext conftest.$ac_ext + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" +fi + + am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + echo "$as_me:$LINENO: result: ${ac_t:- + }$am_cv_proto_iconv" >&5 +echo "${ECHO_T}${ac_t:- + }$am_cv_proto_iconv" >&6 + +cat >>confdefs.h <<_ACEOF +#define ICONV_CONST $am_cv_proto_iconv_arg1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 +echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 +if test "${am_cv_langinfo_codeset+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +char* cs = nl_langinfo(CODESET); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + am_cv_langinfo_codeset=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +am_cv_langinfo_codeset=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 +echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 + if test $am_cv_langinfo_codeset = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LANGINFO_CODESET 1 +_ACEOF + + fi + + if test $ac_cv_header_locale_h = yes; then + + echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 +echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 +if test "${am_cv_val_LC_MESSAGES+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +return LC_MESSAGES + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + am_cv_val_LC_MESSAGES=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +am_cv_val_LC_MESSAGES=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 +echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 + if test $am_cv_val_LC_MESSAGES = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LC_MESSAGES 1 +_ACEOF + + fi + + fi + + for ac_prog in bison +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_INTLBISON+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$INTLBISON"; then + ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_INTLBISON="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +INTLBISON=$ac_cv_prog_INTLBISON +if test -n "$INTLBISON"; then + echo "$as_me:$LINENO: result: $INTLBISON" >&5 +echo "${ECHO_T}$INTLBISON" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$INTLBISON" && break +done + + if test -z "$INTLBISON"; then + ac_verc_fail=yes + else + echo "$as_me:$LINENO: checking version of bison" >&5 +echo $ECHO_N "checking version of bison... $ECHO_C" >&6 + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + echo "$as_me:$LINENO: result: $ac_prog_version" >&5 +echo "${ECHO_T}$ac_prog_version" >&6 + fi + if test $ac_verc_fail = yes; then + INTLBISON=: + fi + + + + + + + + + + + + + + + + echo "$as_me:$LINENO: checking whether NLS is requested" >&5 +echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 + # Check whether --enable-nls or --disable-nls was given. +if test "${enable_nls+set}" = set; then + enableval="$enable_nls" + USE_NLS=$enableval +else + USE_NLS=yes +fi; + echo "$as_me:$LINENO: result: $USE_NLS" >&5 +echo "${ECHO_T}$USE_NLS" >&6 + + + + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + + LIBINTL= + LTLIBINTL= + POSUB= + + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + + echo "$as_me:$LINENO: checking whether included gettext is requested" >&5 +echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6 + +# Check whether --with-included-gettext or --without-included-gettext was given. +if test "${with_included_gettext+set}" = set; then + withval="$with_included_gettext" + nls_cv_force_use_gnu_gettext=$withval +else + nls_cv_force_use_gnu_gettext=no +fi; + echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5 +echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6 + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + + + + + + + echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 +echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6 +if test "${gt_cv_func_gnugettext1_libc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +bindtextdomain ("", ""); +return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_func_gnugettext1_libc=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +gt_cv_func_gnugettext1_libc=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libc" >&5 +echo "${ECHO_T}$gt_cv_func_gnugettext1_libc" >&6 + + if test "$gt_cv_func_gnugettext1_libc" != "yes"; then + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libintl-prefix or --without-libintl-prefix was given. +if test "${with_libintl_prefix+set}" = set; then + withval="$with_libintl_prefix" + + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi + +fi; + LIBINTL= + LTLIBINTL= + INCINTL= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='intl ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + found_dir="$dir" + found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$hardcode_direct" = yes; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" + ;; + esac + done + fi + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" + done + fi + + echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 +echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6 +if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +bindtextdomain ("", ""); +return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_func_gnugettext1_libintl=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +gt_cv_func_gnugettext1_libintl=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test "$gt_cv_func_gnugettext1_libintl" != yes && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +bindtextdomain ("", ""); +return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + gt_cv_func_gnugettext1_libintl=yes + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS" +fi +echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libintl" >&5 +echo "${ECHO_T}$gt_cv_func_gnugettext1_libintl" >&6 + fi + + if test "$gt_cv_func_gnugettext1_libc" = "yes" \ + || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ + && test "$PACKAGE" != gettext; }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + INTLOBJS="\$(GETTOBJS)" + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="\${top_builddir}/intl/libintl.la $LIBICONV" + LTLIBINTL="\${top_builddir}/intl/libintl.la $LTLIBICONV" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + CATOBJEXT=.gmo + fi + + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_NLS 1 +_ACEOF + + else + USE_NLS=no + fi + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then + echo "$as_me:$LINENO: checking how to link with libintl" >&5 +echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $LIBINTL" >&5 +echo "${ECHO_T}$LIBINTL" >&6 + + for element in $INCINTL; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" - fi - if test "$hardcode_minus_L" != no; then - LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" - else - LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" - else - LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" - fi - fi - additional_includedir= - case "$found_dir" in - */lib | */lib/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux*) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INCINTL; do + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + fi + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETTEXT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DCGETTEXT 1 +_ACEOF + + fi + + POSUB=po + fi + + + if test "$PACKAGE" = gettext; then + BUILD_INCLUDED_LIBINTL=yes + fi + + + + + + + nls_cv_header_intl= + nls_cv_header_libgt= + + DATADIRNAME=share + + + INSTOBJEXT=.mo + + + GENCAT=gencat + + + INTL_LIBTOOL_SUFFIX_PREFIX=l + + + + INTLLIBS="$LIBINTL" + + + + + + + + + +## +## ISW - Add flag to warn about duplicates (if necessary) +## + + + + if test "x$lt_cv_prog_gnu_ld" = "xyes"; then + LDFLAGS="$LDFLAGS -Wl,--warn-common" + fi + + + + ac_use_dup_sharegetopt=auto + # Check whether --enable-getoptwrapper or --disable-getoptwrapper was given. +if test "${enable_getoptwrapper+set}" = set; then + enableval="$enable_getoptwrapper" + case "${enableval}" in + yes) + ac_use_dup_sharegetopt=yes + ;; + no) + ac_use_dup_sharegetopt=no + ;; + auto) + ac_use_dup_sharegetopt=auto + ;; + *) + ac_use_dup_sharegetopt=auto + ;; + esac +else + + ac_use_dup_sharegetopt=auto + +fi; + + rm -f libconftest* + rm -f .libs/libconftest* + + echo "$as_me:$LINENO: checking whether use of a getopt wrapper is necessary" >&5 +echo $ECHO_N "checking whether use of a getopt wrapper is necessary... $ECHO_C" >&6 + if test "x$ac_use_dup_sharegetopt" = "xauto"; then + if test $(./libtool --features | fgrep "enable shared libraries" | wc -l) -eq 1;then + cat > conftest1.c << DUPGETOPT1 + extern char *optarg; + extern int optind; + extern int test2(); + int test1() + { + int i; + char *c; + i=optind; + c=optarg; + getopt(0,0,0); + test2(); + return 0; + } +DUPGETOPT1 + cat > conftest2.c << DUPGETOPT2 + extern char *optarg; + extern int optind; + int test2() + { + int i; + char *c; + i=optind; + c=optarg; + getopt(0,0,0); + return 0; + } +DUPGETOPT2 + ./libtool --mode=compile ${CC-cc} conftest1.c -c -o conftest1.lo > /dev/null 2>&1 + ./libtool --mode=link ${CC-cc} -shared -rpath /lib -no-undefined conftest1.lo -o libconftest1.la > /dev/null 2>&1 + ./libtool --mode=compile ${CC-cc} conftest2.c -c -o conftest2.lo > /dev/null 2>&1 + ./libtool --mode=link ${CC-cc} -shared -rpath /lib -no-undefined conftest2.lo libconftest1.la -o libconftest2.la > /tmp/a 2>&1 + if test $? = 0; then + ac_cv_dup_getopt=no + ac_cv_dup_getoptmsg=no + else + ac_cv_dup_getopt=yes + ac_cv_dup_getoptmsg=yes + fi + else + ac_cv_dup_getopt=no + ac_cv_dup_getoptmsg=no + fi + rm -f *conftest* + rm -f .libs/*conftest* + else + ac_cv_dup_getopt="$ac_use_dup_sharegetopt" + ac_cv_dup_getoptmsg="$ac_use_dup_sharegetopt (forced)" + fi + echo "$as_me:$LINENO: result: $ac_cv_dup_getoptmsg" >&5 +echo "${ECHO_T}$ac_cv_dup_getoptmsg" >&6 + if test "x$ac_cv_dup_getopt" = "xyes";then + cat >>confdefs.h <<\_ACEOF +#define NEED_GETOPT_WRAPPER 1 +_ACEOF + + fi + + + + + echo "$as_me:$LINENO: checking whether to use optreset" >&5 +echo $ECHO_N "checking whether to use optreset... $ECHO_C" >&6 +if test "${ac_cv_need_optreset+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +extern int optreset; +optreset=1; +getopt(0,0,0); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_need_optreset=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_need_optreset=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + + +fi +echo "$as_me:$LINENO: result: $ac_cv_need_optreset" >&5 +echo "${ECHO_T}$ac_cv_need_optreset" >&6 + if test "x$ac_cv_need_optreset" = "xyes"; then + cat >>confdefs.h <<\_ACEOF +#define NEED_GETOPT_OPTRESET 1 +_ACEOF + + fi + + + +# OS-specific settings that we can't figure out any other way (yet) + +build_hercifc=false +use_dlltool=false +is_cygwin=false + +case "$host_os" in + darwin*) + if test $host_vendor = apple ; then + CPPFLAGS=-traditional-cpp + cat >>confdefs.h <<\_ACEOF +#define _BSD_SOCKLEN_T_ int +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _INTL_REDIRECT_MACROS 1 +_ACEOF + +## Do whatever is necessary to get the following symbol defined +## so the included libltdl will be built and used +## AC_PROVIDE_AC_LIBTOOL_DLOPEN + fi + ;; + linux*) + build_hercifc=true + ;; + *cygwin*) + is_cygwin=true + build_hercifc=false + use_dlltool=true + cat >>confdefs.h <<\_ACEOF +#define WIN32 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define NO_SIGABEND_HANDLER 1 +_ACEOF + + ;; + *) + build_hercifc=false + ;; +esac + + + +if test "x$build_hercifc" = "xtrue"; then + BUILD_HERCIFC_TRUE= + BUILD_HERCIFC_FALSE='#' +else + BUILD_HERCIFC_TRUE='#' + BUILD_HERCIFC_FALSE= +fi + + +# Arch-specific settings that we can't figure out any other way (yet) + +case "$host_cpu-$GCC" in + hppa*-yes) + CFLAGS="$CFLAGS -ffunction-sections" + ;; +esac + + +# System Services +# Check whether --enable-largefile or --disable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval="$enable_largefile" + +fi; +if test "$enable_largefile" != no; then + + echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_largefile_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_largefile_CC=' -n32'; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + ac_cv_sys_file_offset_bits=no + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_file_offset_bits=64; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + break +done +fi +echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 +if test "$ac_cv_sys_file_offset_bits" != no; then + +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF + +fi +rm -f conftest* + echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_large_files+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + ac_cv_sys_large_files=no + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_large_files=1; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + break +done +fi +echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +echo "${ECHO_T}$ac_cv_sys_large_files" >&6 +if test "$ac_cv_sys_large_files" != no; then + +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF + +fi +rm -f conftest* +fi + + +# Libraries + +echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 +echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6 +if test "${ac_cv_lib_m_sqrt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sqrt (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +sqrt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_m_sqrt=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_m_sqrt=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5 +echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6 +if test $ac_cv_lib_m_sqrt = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + + +echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_connect=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_socket_connect=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 +if test $ac_cv_lib_socket_connect = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSOCKET 1 +_ACEOF + + LIBS="-lsocket $LIBS" + +fi + + +echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_nsl_gethostbyname=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +if test $ac_cv_lib_nsl_gethostbyname = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNSL 1 +_ACEOF + + LIBS="-lnsl $LIBS" + +fi + + +echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 +echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6 +if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lresolv $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char inet_aton (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +inet_aton (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_resolv_inet_aton=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_resolv_inet_aton=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5 +echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6 +if test $ac_cv_lib_resolv_inet_aton = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRESOLV 1 +_ACEOF + + LIBS="-lresolv $LIBS" + +fi + + +echo "$as_me:$LINENO: checking for main in -lz" >&5 +echo $ECHO_N "checking for main in -lz... $ECHO_C" >&6 +if test "${ac_cv_lib_z_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_z_main=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_z_main=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_z_main" >&5 +echo "${ECHO_T}$ac_cv_lib_z_main" >&6 +if test $ac_cv_lib_z_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBS="-lz $LIBS" + +fi + +echo "$as_me:$LINENO: checking for BZ2_bzBuffToBuffDecompress in -lbz2" >&5 +echo $ECHO_N "checking for BZ2_bzBuffToBuffDecompress in -lbz2... $ECHO_C" >&6 +if test "${ac_cv_lib_bz2_BZ2_bzBuffToBuffDecompress+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbz2 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char BZ2_bzBuffToBuffDecompress (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +BZ2_bzBuffToBuffDecompress (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_bz2_BZ2_bzBuffToBuffDecompress=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_bz2_BZ2_bzBuffToBuffDecompress=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_bz2_BZ2_bzBuffToBuffDecompress" >&5 +echo "${ECHO_T}$ac_cv_lib_bz2_BZ2_bzBuffToBuffDecompress" >&6 +if test $ac_cv_lib_bz2_BZ2_bzBuffToBuffDecompress = yes; then + have_libbz2=yes +else + have_libbz2=no +fi + - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +# OPTION_DYNAMIC_LOAD requires availability of either dlopen +# or libtool. If neither available OPTION_DYNAMIC_LOAD is not +# possible and USE_DLLTOOL shouldn't be set either. (Each test +# done twice; first time to cause default autoconf behavior, +# the second time to set our flag) - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - if test -n "$found_la"; then - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/lib"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/lib"; then - if test -n "$GCC"; then - case $host_os in - linux*) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIBINTL; do +# Leave this one so ltdl doesn't get to think dlopen is not available - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIBINTL; do +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDL 1 +_ACEOF - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + LIBS="-ldl $LIBS" - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" - ;; - esac - done - fi - else - LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$hardcode_libdir_separator"; then - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" +fi + +# ISW : Following lines commented out - UNCONDITIONALLY use libtool +# AC_CHECK_LIB(dl,dlopen, have_dlopen=true, have_dlopen=false ) +# ISW20030827-1 : 1 lines added, 2 lines commented out +have_lt_dlopen=true +# ISW : Following lines - UNCONDITIONALLY use libtool +have_dlopen=false +# AC_CHECK_LIB(ltdl,lt_dlopen) +# AC_CHECK_LIB(ltdl,lt_dlopen, have_lt_dlopen=true, have_lt_dlopen=false ) + +opt_dynamic_load=true + +# Check whether --enable-dynamic-load or --disable-dynamic-load was given. +if test "${enable_dynamic_load+set}" = set; then + enableval="$enable_dynamic_load" + case "${enableval}" in + yes) opt_dynamic_load=true ;; + no) opt_dynamic_load=false ;; + *) opt_dynamic_load=true ;; + esac +else + opt_dynamic_load=true +fi; + +if test $opt_dynamic_load = true; then + if test $have_dlopen = true || test $have_lt_dlopen = true; then + cat >>confdefs.h <<\_ACEOF +#define OPTION_DYNAMIC_LOAD 1 +_ACEOF + + if test $have_dlopen != true; then + cat >>confdefs.h <<\_ACEOF +#define HDL_USE_LIBTOOL 1 +_ACEOF + + fi + else + opt_dynamic_load=false + use_dlltool=false + fi +else + opt_dynamic_load=false + use_dlltool=false +fi + + + +if test "x$opt_dynamic_load" = "xtrue"; then + OPTION_DYNAMIC_LOAD_TRUE= + OPTION_DYNAMIC_LOAD_FALSE='#' +else + OPTION_DYNAMIC_LOAD_TRUE='#' + OPTION_DYNAMIC_LOAD_FALSE= +fi + + + +if test "x$use_dlltool" = "xtrue"; then + USE_DLLTOOL_TRUE= + USE_DLLTOOL_FALSE='#' +else + USE_DLLTOOL_TRUE='#' + USE_DLLTOOL_FALSE= +fi + + + +if test "x$enable_shared" = "xyes"; then + BUILD_SHARED_TRUE= + BUILD_SHARED_FALSE='#' +else + BUILD_SHARED_TRUE='#' + BUILD_SHARED_FALSE= +fi + + +if test x$enable_shared = xyes; then + cat >>confdefs.h <<\_ACEOF +#define HDL_BUILD_SHARED 1 +_ACEOF + +fi + +# Check whether --enable-external-gui or --disable-external-gui was given. +if test "${enable_external_gui+set}" = set; then + enableval="$enable_external_gui" + case "${enableval}" in + yes) build_external_gui=true ;; + no) build_external_gui=false ;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-external-gui" >&5 +echo "$as_me: error: bad value ${enableval} for --enable-external-gui" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + case "$host_os" in + *cygwin*) build_external_gui=true ;; + *) build_external_gui=false ;; + esac +fi; + +if test x$build_external_gui = xtrue; then + if test $is_cygwin = true && test $opt_dynamic_load != true; then + { { echo "$as_me:$LINENO: error: dynamic loader option required for external gui support on win32" >&5 +echo "$as_me: error: dynamic loader option required for external gui support on win32" >&2;} + { (exit 1); exit 1; }; } + else + if test $is_cygwin = true && test $use_dlltool != true; then + { { echo "$as_me:$LINENO: error: internal error: external gui specified for win32 but use_dlltool not set" >&5 +echo "$as_me: error: internal error: external gui specified for win32 but use_dlltool not set" >&2;} + { (exit 1); exit 1; }; } else - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" - done + cat >>confdefs.h <<\_ACEOF +#define EXTERNALGUI 1 +_ACEOF + fi fi - if test "X$ltrpathdirs" != "X"; then - for found_dir in $ltrpathdirs; do - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" - done - fi +fi - echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 -echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6 -if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then +max_num_cpus=8 +default_num_cpus=2 +num_cpus_error=no + +# Check whether --enable-multi-cpu or --disable-multi-cpu was given. +if test "${enable_multi_cpu+set}" = set; then + enableval="$enable_multi_cpu" + case "${enableval}" in + no) num_cpu_engines=1 ;; + yes) num_cpu_engines=${default_num_cpus} ;; + 0|9) num_cpus_error=yes ;; + 1|2|3|4|5|6|7|8) num_cpu_engines=${enableval} ;; + *) num_cpus_error=yes ;; + esac +else + num_cpu_engines=${default_num_cpus} +fi; + +if test $num_cpus_error = no; then + cat >>confdefs.h <<_ACEOF +#define MAX_CPU_ENGINES ${num_cpu_engines} +_ACEOF + +else + { { echo "$as_me:$LINENO: error: bad value \"${enableval}\" for --enable-multi-cpu" >&5 +echo "$as_me: error: bad value \"${enableval}\" for --enable-multi-cpu" >&2;} + { (exit 1); exit 1; }; } +fi + +# Check whether --enable-fthreads or --disable-fthreads was given. +if test "${enable_fthreads+set}" = set; then + enableval="$enable_fthreads" + case "${host_os},${enableval}" in + *cygwin*,yes) + build_fthreads=true + cat >>confdefs.h <<\_ACEOF +#define OPTION_FTHREADS 1 +_ACEOF + + ;; + *,yes) + { { echo "$as_me:$LINENO: error: fthreads are only for win32" >&5 +echo "$as_me: error: fthreads are only for win32" >&2;} + { (exit 1); exit 1; }; } + ;; + *) + ;; + esac +else + +echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 +echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 +if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - gt_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $INCINTL" - gt_save_LIBS="$LIBS" - LIBS="$LIBS $LIBINTL" - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include -extern int _nl_msg_cat_cntr; -extern + +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus -"C" +extern "C" #endif -const char *_nl_expand_alias (); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_create (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -7201,8 +25469,7 @@ const char *_nl_expand_alias (); int main () { -bindtextdomain ("", ""); -return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) +pthread_create (); ; return 0; } @@ -7219,25 +25486,51 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gt_cv_func_gnugettext1_libintl=yes + ac_cv_lib_pthread_pthread_create=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -gt_cv_func_gnugettext1_libintl=no +ac_cv_lib_pthread_pthread_create=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - if test "$gt_cv_func_gnugettext1_libintl" != yes && test -n "$LIBICONV"; then - LIBS="$LIBS $LIBICONV" - cat >conftest.$ac_ext <<_ACEOF +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6 +if test $ac_cv_lib_pthread_pthread_create = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPTHREAD 1 +_ACEOF + + LIBS="-lpthread $LIBS" + +else + case "$host_os" in + *cygwin*) + # Alternate pthreads location for older cygwin + { echo "$as_me:$LINENO: Looking for pthreadw32 in /usr/DLL" >&5 +echo "$as_me: Looking for pthreadw32 in /usr/DLL" >&6;} + LDFLAGS_SAVE="$LDFLAGS" + LDFLAGS="$LDFLAGS -L/usr/DLL" + +echo "$as_me:$LINENO: checking for pthread_create in -lpthreadw32" >&5 +echo $ECHO_N "checking for pthread_create in -lpthreadw32... $ECHO_C" >&6 +if test "${ac_cv_lib_pthreadw32_pthread_create+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthreadw32 $LIBS" +cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include -extern int _nl_msg_cat_cntr; -extern + +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus -"C" +extern "C" #endif -const char *_nl_expand_alias (); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_create (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -7247,8 +25540,7 @@ const char *_nl_expand_alias (); int main () { -bindtextdomain ("", ""); -return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) +pthread_create (); ; return 0; } @@ -7265,400 +25557,583 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" - gt_cv_func_gnugettext1_libintl=yes - + ac_cv_lib_pthreadw32_pthread_create=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +ac_cv_lib_pthreadw32_pthread_create=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi - CPPFLAGS="$gt_save_CPPFLAGS" - LIBS="$gt_save_LIBS" +LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libintl" >&5 -echo "${ECHO_T}$gt_cv_func_gnugettext1_libintl" >&6 - fi - - if test "$gt_cv_func_gnugettext1_libc" = "yes" \ - || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ - && test "$PACKAGE" != gettext; }; then - gt_use_preinstalled_gnugettext=yes - else - LIBINTL= - LTLIBINTL= - INCINTL= - fi - - - if test "$gt_use_preinstalled_gnugettext" != "yes"; then - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" = "yes"; then - INTLOBJS="\$(GETTOBJS)" - BUILD_INCLUDED_LIBINTL=yes - USE_INCLUDED_LIBINTL=yes - LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV" - LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV" - LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` - fi - - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - CATOBJEXT=.gmo - fi - - - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - -cat >>confdefs.h <<\_ACEOF -#define ENABLE_NLS 1 +echo "$as_me:$LINENO: result: $ac_cv_lib_pthreadw32_pthread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreadw32_pthread_create" >&6 +if test $ac_cv_lib_pthreadw32_pthread_create = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPTHREADW32 1 _ACEOF - else - USE_NLS=no - fi - fi - - if test "$USE_NLS" = "yes"; then - - if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then - echo "$as_me:$LINENO: checking how to link with libintl" >&5 -echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $LIBINTL" >&5 -echo "${ECHO_T}$LIBINTL" >&6 - - for element in $INCINTL; do - haveit= - for x in $CPPFLAGS; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" - fi - done - - fi - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETTEXT 1 -_ACEOF + LIBS="-lpthreadw32 $LIBS" +else + LDFLAGS="$LDFLAGS_SAVE" +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_DCGETTEXT 1 -_ACEOF + ;; + esac +fi - fi +fi; - POSUB=po - fi - if test "$PACKAGE" = gettext; then - BUILD_INCLUDED_LIBINTL=yes - fi +if test x$build_fthreads = xtrue; then + BUILD_FTHREADS_TRUE= + BUILD_FTHREADS_FALSE='#' +else + BUILD_FTHREADS_TRUE='#' + BUILD_FTHREADS_FALSE= +fi +# Check whether --enable-fishhang or --disable-fishhang was given. +if test "${enable_fishhang+set}" = set; then + enableval="$enable_fishhang" + case "${enableval}" in + yes) + fishhang=true + CFLAGS="-DFISH_HANG $CFLAGS" + cat >>confdefs.h <<\_ACEOF +#define FISH_HANG 1 +_ACEOF + ;; + no) fishhang=false ;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-fishhang" >&5 +echo "$as_me: error: bad value ${enableval} for --enable-fishhang" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + fishhang=false +fi; +if test x$fishhang = xtrue; then + if test x$build_fthreads != xtrue; then + { { echo "$as_me:$LINENO: error: fishhang requested but fthreads not specified" >&5 +echo "$as_me: error: fishhang requested but fthreads not specified" >&2;} + { (exit 1); exit 1; }; } + fi +fi - nls_cv_header_intl= - nls_cv_header_libgt= - DATADIRNAME=share +if test x$fishhang = xtrue; then + BUILD_FISHHANG_TRUE= + BUILD_FISHHANG_FALSE='#' +else + BUILD_FISHHANG_TRUE='#' + BUILD_FISHHANG_FALSE= +fi - INSTOBJEXT=.mo +echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -pthread" >&5 +echo $ECHO_N "checking whether ${CC-cc} accepts -pthread... $ECHO_C" >&6 - GENCAT=gencat +echo 'void f(){}' >conftest.c +if test -z "`${CC-cc} -pthread -c conftest.c 2>&1`"; then + LIBS="-pthread $LIBS" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest* + +# Headers +for ac_header in byteswap.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 - INTL_LIBTOOL_SUFFIX_PREFIX= +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - INTLLIBS="$LIBINTL" +fi +done +case "$host_os" in + *cygwin*) + ;; + *) + if test "${ac_cv_header_fenv_h+set}" = set; then + echo "$as_me:$LINENO: checking for fenv.h" >&5 +echo $ECHO_N "checking for fenv.h... $ECHO_C" >&6 +if test "${ac_cv_header_fenv_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_fenv_h" >&5 +echo "${ECHO_T}$ac_cv_header_fenv_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking fenv.h usability" >&5 +echo $ECHO_N "checking fenv.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 +# Is the header present? +echo "$as_me:$LINENO: checking fenv.h presence" >&5 +echo $ECHO_N "checking fenv.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: fenv.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: fenv.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: fenv.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: fenv.h: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: fenv.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: fenv.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: fenv.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: fenv.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: fenv.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: fenv.h: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for fenv.h" >&5 +echo $ECHO_N "checking for fenv.h... $ECHO_C" >&6 +if test "${ac_cv_header_fenv_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_fenv_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_fenv_h" >&5 +echo "${ECHO_T}$ac_cv_header_fenv_h" >&6 +fi +if test $ac_cv_header_fenv_h = yes; then + : +else + cat >>confdefs.h <<\_ACEOF +#define NO_IEEE_SUPPORT 1 +_ACEOF +fi -# Check whether --enable-fthreads or --disable-fthreads was given. -if test "${enable_fthreads+set}" = set; then - enableval="$enable_fthreads" - case "${host_os},${enableval}" in - *cygwin*,yes) - build_fthreads=true - cat >>confdefs.h <<\_ACEOF -#define OPTION_FTHREADS 1 -_ACEOF - ;; - *,yes) - { { echo "$as_me:$LINENO: error: fthreads are only for win32" >&5 -echo "$as_me: error: fthreads are only for win32" >&2;} - { (exit 1); exit 1; }; } - ;; - *) - ;; - esac -else + ;; +esac -echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 -echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 -if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then +if test x$build_fthreads != xtrue; then + if test "${ac_cv_header_pthread_h+set}" = set; then + echo "$as_me:$LINENO: checking for pthread.h" >&5 +echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 +if test "${ac_cv_header_pthread_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 +echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" + # Is the header compilable? +echo "$as_me:$LINENO: checking pthread.h usability" >&5 +echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pthread_create (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -pthread_create (); - ; - return 0; -} +$ac_includes_default +#include _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_pthread_pthread_create=yes + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_lib_pthread_pthread_create=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +ac_header_compiler=no fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6 -if test $ac_cv_lib_pthread_pthread_create = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPTHREAD 1 +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking pthread.h presence" >&5 +echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include _ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 - LIBS="-lpthread $LIBS" +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for pthread.h" >&5 +echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 +if test "${ac_cv_header_pthread_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_pthread_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 +echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 +fi +if test $ac_cv_header_pthread_h = yes; then + : else case "$host_os" in - *cygwin*) - # Alternate pthreads location for older cygwin - { echo "$as_me:$LINENO: Looking for pthreadw32 in /usr/DLL" >&5 -echo "$as_me: Looking for pthreadw32 in /usr/DLL" >&6;} - LDFLAGS_SAVE="$LDFLAGS" - LDFLAGS="$LDFLAGS -L/usr/DLL" - -echo "$as_me:$LINENO: checking for pthread_create in -lpthreadw32" >&5 -echo $ECHO_N "checking for pthread_create in -lpthreadw32... $ECHO_C" >&6 -if test "${ac_cv_lib_pthreadw32_pthread_create+set}" = set; then + *cygwin*) + # Alternate pthreads location for older cygwin + { echo "$as_me:$LINENO: Looking for pthread.h in /usr/Pthreads" >&5 +echo "$as_me: Looking for pthread.h in /usr/Pthreads" >&6;} + CFLAGS="$CFLAGS -I/usr/Pthreads" + if test "${ac_cv_header_pthread_h+set}" = set; then + echo "$as_me:$LINENO: checking for pthread.h" >&5 +echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 +if test "${ac_cv_header_pthread_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 +echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthreadw32 $LIBS" + # Is the header compilable? +echo "$as_me:$LINENO: checking pthread.h usability" >&5 +echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pthread_create (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -pthread_create (); - ; - return 0; -} +$ac_includes_default +#include _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_pthreadw32_pthread_create=yes + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking pthread.h presence" >&5 +echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_pthreadw32_pthread_create=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + ac_cpp_err=yes fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthreadw32_pthread_create" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreadw32_pthread_create" >&6 -if test $ac_cv_lib_pthreadw32_pthread_create = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPTHREADW32 1 -_ACEOF - - LIBS="-lpthreadw32 $LIBS" - +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else - LDFLAGS="$LDFLAGS_SAVE" -fi - - ;; - esac + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 -fi; - - - -if test x$build_fthreads = xtrue; then - BUILD_FTHREADS_TRUE= - BUILD_FTHREADS_FALSE='#' +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for pthread.h" >&5 +echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 +if test "${ac_cv_header_pthread_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - BUILD_FTHREADS_TRUE='#' - BUILD_FTHREADS_FALSE= + ac_cv_header_pthread_h=$ac_header_preproc fi +echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 +echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 - -# Check whether --enable-fishhang or --disable-fishhang was given. -if test "${enable_fishhang+set}" = set; then - enableval="$enable_fishhang" - case "${enableval}" in - yes) - fishhang=true - CFLAGS="-DFISH_HANG $CFLAGS" - cat >>confdefs.h <<\_ACEOF -#define FISH_HANG 1 -_ACEOF - - ;; - no) fishhang=false ;; - *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-fishhang" >&5 -echo "$as_me: error: bad value ${enableval} for --enable-fishhang" >&2;} - { (exit 1); exit 1; }; } ;; - esac -else - fishhang=false -fi; - - - -if test x$fishhang = xtrue; then - BUILD_FISHHANG_TRUE= - BUILD_FISHHANG_FALSE='#' +fi +if test $ac_cv_header_pthread_h = yes; then + : else - BUILD_FISHHANG_TRUE='#' - BUILD_FISHHANG_FALSE= + { { echo "$as_me:$LINENO: error: Unable to find pthread.h" >&5 +echo "$as_me: error: Unable to find pthread.h" >&2;} + { (exit 1); exit 1; }; } fi -if test x$fishhang = xtrue; then - if test x$build_fthreads != xtrue; then - { { echo "$as_me:$LINENO: error: fishhang requested but fthreads not specified" >&5 -echo "$as_me: error: fishhang requested but fthreads not specified" >&2;} + ;; + *) + { { echo "$as_me:$LINENO: error: Unable to find pthread.h" >&5 +echo "$as_me: error: Unable to find pthread.h" >&2;} { (exit 1); exit 1; }; } - fi + ;; + esac fi -echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -pthread" >&5 -echo $ECHO_N "checking whether ${CC-cc} accepts -pthread... $ECHO_C" >&6 - -echo 'void f(){}' >conftest.c -if test -z "`${CC-cc} -pthread -c conftest.c 2>&1`"; then - LIBS="-pthread $LIBS" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 fi -rm -f conftest* -# Headers - -for ac_header in byteswap.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if test "${ac_cv_header_inttypes_h+set}" = set; then + echo "$as_me:$LINENO: checking for inttypes.h" >&5 +echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 +if test "${ac_cv_header_inttypes_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +echo "$as_me:$LINENO: result: $ac_cv_header_inttypes_h" >&5 +echo "${ECHO_T}$ac_cv_header_inttypes_h" >&6 else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking inttypes.h usability" >&5 +echo $ECHO_N "checking inttypes.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" $ac_includes_default -#include <$ac_header> +#include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -7683,12 +26158,12 @@ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking inttypes.h presence" >&5 +echo $ECHO_N "checking inttypes.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include <$ac_header> +#include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -7720,59 +26195,119 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + { echo "$as_me:$LINENO: WARNING: inttypes.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: inttypes.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: inttypes.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: inttypes.h: proceeding with the preprocessor's result" >&2;};; no:yes ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + { echo "$as_me:$LINENO: WARNING: inttypes.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: inttypes.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: inttypes.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: inttypes.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: inttypes.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: inttypes.h: proceeding with the preprocessor's result" >&2;};; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +echo "$as_me:$LINENO: checking for inttypes.h" >&5 +echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 +if test "${ac_cv_header_inttypes_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + ac_cv_header_inttypes_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_inttypes_h" >&5 +echo "${ECHO_T}$ac_cv_header_inttypes_h" >&6 + +fi +if test $ac_cv_header_inttypes_h = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_INTTYPES_H 1 +_ACEOF + +else + echo "$as_me:$LINENO: checking for u_int8_t" >&5 +echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6 +if test "${ac_cv_type_u_int8_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((u_int8_t *) 0) + return 0; +if (sizeof (u_int8_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_u_int8_t=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_u_int8_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_u_int8_t" >&5 +echo "${ECHO_T}$ac_cv_type_u_int8_t" >&6 +if test $ac_cv_type_u_int8_t = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_U_INT 1 +_ACEOF + +else + { { echo "$as_me:$LINENO: error: Unable to find fixed-size data types" >&5 +echo "$as_me: error: Unable to find fixed-size data types" >&2;} + { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi -done -case "$host_os" in - *cygwin*) - ;; - *) - if test "${ac_cv_header_fenv_h+set}" = set; then - echo "$as_me:$LINENO: checking for fenv.h" >&5 -echo $ECHO_N "checking for fenv.h... $ECHO_C" >&6 -if test "${ac_cv_header_fenv_h+set}" = set; then + +for ac_header in linux/if_tun.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_fenv_h" >&5 -echo "${ECHO_T}$ac_cv_header_fenv_h" >&6 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -echo "$as_me:$LINENO: checking fenv.h usability" >&5 -echo $ECHO_N "checking fenv.h usability... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" $ac_includes_default -#include +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -7797,12 +26332,12 @@ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -echo "$as_me:$LINENO: checking fenv.h presence" >&5 -echo $ECHO_N "checking fenv.h presence... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include +#include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -7834,60 +26369,69 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) - { echo "$as_me:$LINENO: WARNING: fenv.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: fenv.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: fenv.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: fenv.h: proceeding with the preprocessor's result" >&2;};; + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) - { echo "$as_me:$LINENO: WARNING: fenv.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: fenv.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: fenv.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: fenv.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: fenv.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: fenv.h: proceeding with the preprocessor's result" >&2;};; + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac -echo "$as_me:$LINENO: checking for fenv.h" >&5 -echo $ECHO_N "checking for fenv.h... $ECHO_C" >&6 -if test "${ac_cv_header_fenv_h+set}" = set; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_fenv_h=$ac_header_preproc + eval "$as_ac_Header=$ac_header_preproc" fi -echo "$as_me:$LINENO: result: $ac_cv_header_fenv_h" >&5 -echo "${ECHO_T}$ac_cv_header_fenv_h" >&6 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi -if test $ac_cv_header_fenv_h = yes; then - : -else - cat >>confdefs.h <<\_ACEOF -#define NO_IEEE_SUPPORT 1 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi +done - ;; -esac -if test x$build_fthreads != xtrue; then - if test "${ac_cv_header_pthread_h+set}" = set; then - echo "$as_me:$LINENO: checking for pthread.h" >&5 -echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 -if test "${ac_cv_header_pthread_h+set}" = set; then +# Compiler characteristics + +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 else - # Is the header compilable? -echo "$as_me:$LINENO: checking pthread.h usability" >&5 -echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6 + # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -$ac_includes_default -#include +#include +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -7901,104 +26445,78 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_header_compiler=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking pthread.h presence" >&5 -echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6 + # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include +#include +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;};; - no:yes ) - { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;};; -esac -echo "$as_me:$LINENO: checking for pthread.h" >&5 -echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 -if test "${ac_cv_header_pthread_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_pthread_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 - -fi -if test $ac_cv_header_pthread_h = yes; then - : -else - case "$host_os" in - *cygwin*) - # Alternate pthreads location for older cygwin - { echo "$as_me:$LINENO: Looking for pthread.h in /usr/Pthreads" >&5 -echo "$as_me: Looking for pthread.h in /usr/Pthreads" >&6;} - CFLAGS_SAVE="$CFLAGS" - CFLAGS="$CFLAGS -I/usr/Pthreads" - if test "${ac_cv_header_pthread_h+set}" = set; then - echo "$as_me:$LINENO: checking for pthread.h" >&5 -echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 -if test "${ac_cv_header_pthread_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +cat conftest.$ac_ext >&5 +ac_cv_c_bigendian=no fi -echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 +rm -f conftest.$ac_objext conftest.$ac_ext else - # Is the header compilable? -echo "$as_me:$LINENO: checking pthread.h usability" >&5 -echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +# It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianess by grep'ing values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -$ac_includes_default -#include +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -8012,122 +26530,99 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_header_compiler=yes + if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking pthread.h presence" >&5 -echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF +else + cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include +int +main () +{ + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_header_preproc=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_c_bigendian=yes fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;};; - no:yes ) - { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;};; -esac -echo "$as_me:$LINENO: checking for pthread.h" >&5 -echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 -if test "${ac_cv_header_pthread_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_pthread_h=$ac_header_preproc +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 - fi -if test $ac_cv_header_pthread_h = yes; then - : -else - CFLAGS="$CFLAGS_SAVE" - cat >>confdefs.h <<\_ACEOF -#define NOTHREAD 1 -_ACEOF - - { echo "$as_me:$LINENO: WARNING: Unable to find pthread.h, disabling threads" >&5 -echo "$as_me: WARNING: Unable to find pthread.h, disabling threads" >&2;} +rm -f conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +case $ac_cv_c_bigendian in + yes) - - ;; - *) - { echo "$as_me:$LINENO: WARNING: Unable to find pthread.h, disabling threads" >&5 -echo "$as_me: WARNING: Unable to find pthread.h, disabling threads" >&2;} - cat >>confdefs.h <<\_ACEOF -#define NOTHREAD 1 +cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 _ACEOF - - ;; - esac -fi + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianess +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianess +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac -fi -if test "${ac_cv_header_inttypes_h+set}" = set; then - echo "$as_me:$LINENO: checking for inttypes.h" >&5 -echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 -if test "${ac_cv_header_inttypes_h+set}" = set; then +# GCC only seems to support regparm on i386 right now, but that could +# change in the future. +echo "$as_me:$LINENO: checking whether gcc supports __attribute__((regparm(n)))" >&5 +echo $ECHO_N "checking whether gcc supports __attribute__((regparm(n)))... $ECHO_C" >&6 +if test "${ac_cv_attr_regparm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_inttypes_h" >&5 -echo "${ECHO_T}$ac_cv_header_inttypes_h" >&6 else - # Is the header compilable? -echo "$as_me:$LINENO: checking inttypes.h usability" >&5 -echo $ECHO_N "checking inttypes.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -$ac_includes_default -#include + if test x$GCC != xyes; then + # __attribute__ is a GNU C extension + ac_cv_attr_regparm=no + else + SAVE_CFLAGS="$CFLAGS" + CFLAGS="-Wall -Werror" + cat >conftest.$ac_ext <<_ACEOF +void conftest () __attribute__ ((regparm(1))); _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -8141,195 +26636,277 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_header_compiler=yes + ac_cv_attr_regparm=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_header_compiler=no +ac_cv_attr_regparm=no fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + CFLAGS="$SAVE_CFLAGS" + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_attr_regparm" >&5 +echo "${ECHO_T}$ac_cv_attr_regparm" >&6 -# Is the header present? -echo "$as_me:$LINENO: checking inttypes.h presence" >&5 -echo $ECHO_N "checking inttypes.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi +if test "$GCC" = "yes" && test x$ac_cv_attr_regparm = xyes; then + case "$host_os" in + *cygwin*) + echo "$as_me:$LINENO: checking for cygwin __attribute__ ((regparm(3))) bug" >&5 +echo $ECHO_N "checking for cygwin __attribute__ ((regparm(3))) bug... $ECHO_C" >&6 +if test "${ac_cv_cygwin_gcc_attr_regparm_bug+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes + if test "$cross_compiling" = yes; then + ac_cv_cygwin_gcc_attr_regparm_bug=yes else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: inttypes.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: inttypes.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: inttypes.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: inttypes.h: proceeding with the preprocessor's result" >&2;};; - no:yes ) - { echo "$as_me:$LINENO: WARNING: inttypes.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: inttypes.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: inttypes.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: inttypes.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: inttypes.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: inttypes.h: proceeding with the preprocessor's result" >&2;};; -esac -echo "$as_me:$LINENO: checking for inttypes.h" >&5 -echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 -if test "${ac_cv_header_inttypes_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +/* from Fish */ + +typedef struct _REGS +{ + int a, b, c, d; + char e[5000]; +} +REGS; + +int func1 (int a, int b, int c, REGS *regs) __attribute__ ((regparm(3))); +int func2 (int a, int b, int c, REGS *regs) __attribute__ ((regparm(3))); + +int main ( int argc, char *argv[] ) +{ + REGS* regs = 0; + exit(func1 (1, 2, 3, regs)); +} + +int func1 (int a, int b, int c, REGS *regs) +{ + REGS iregs; + return func2 (a, b, c, &iregs); +} + +int func2 (int a, int b, int c, REGS *regs) +{ + return ((a == 1 && b == 2 && c == 3) ? 0 : 1); +} + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_cygwin_gcc_attr_regparm_bug=no else - ac_cv_header_inttypes_h=$ac_header_preproc + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_cygwin_gcc_attr_regparm_bug=yes fi -echo "$as_me:$LINENO: result: $ac_cv_header_inttypes_h" >&5 -echo "${ECHO_T}$ac_cv_header_inttypes_h" >&6 +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_cygwin_gcc_attr_regparm_bug" >&5 +echo "${ECHO_T}$ac_cv_cygwin_gcc_attr_regparm_bug" >&6 + ;; + esac + if test x$ac_cv_cygwin_gcc_attr_regparm_bug = xyes; then + ac_cv_attr_regparm=no + fi fi -if test $ac_cv_header_inttypes_h = yes; then + +if test x$ac_cv_attr_regparm != xyes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_INTTYPES_H 1 +#define NO_ATTR_REGPARM 1 _ACEOF -else - echo "$as_me:$LINENO: checking for u_int8_t" >&5 -echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6 -if test "${ac_cv_type_u_int8_t+set}" = set; then +fi + + +if test "$GCC" = "yes"; then +case "$host_os" in + *cygwin*) + echo "$as_me:$LINENO: checking for cygwin gcc __builtin_alloca bug" >&5 +echo $ECHO_N "checking for cygwin gcc __builtin_alloca bug... $ECHO_C" >&6 +if test "${ac_cv_cygwin_gcc_alloca_bug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +else + SAVE_CFLAGS="$CFLAGS" + CFLAGS="-O2 -fomit-frame-pointer" + if test "$cross_compiling" = yes; then + ac_cv_cygwin_gcc_alloca_bug=yes else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -$ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () + +/* + * Test for presence of gcc 3.2 compiler bug. + * + * Required compiler options: + * + * -O2 -fomit-frame-pointer + * + * Note: using any other -O option other than + * -O2 DOES NOT cause the bug to occur!, nor + * does using -fno-omit-frame-pointer! In fact, + * using "-fno-omit-frame-pointer" is the sug- + * gested workaround for this particular bug. + */ + +int foo () { -if ((u_int8_t *) 0) - return 0; -if (sizeof (u_int8_t)) - return 0; - ; - return 0; + char a[5000+16]; + memset(a,0xCD,5000); + a[5000]=0; + return strlen(a); +} + +int main ( int argc, char* argv[] ) +{ + return (foo() != 5000); } + _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_u_int8_t=yes + ac_cv_cygwin_gcc_alloca_bug=no else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_type_u_int8_t=no +( exit $ac_status ) +ac_cv_cygwin_gcc_alloca_bug=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_u_int8_t" >&5 -echo "${ECHO_T}$ac_cv_type_u_int8_t" >&6 -if test $ac_cv_type_u_int8_t = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_U_INT 1 + CFLAGS="$SAVE_CFLAGS" +fi +echo "$as_me:$LINENO: result: $ac_cv_cygwin_gcc_alloca_bug" >&5 +echo "${ECHO_T}$ac_cv_cygwin_gcc_alloca_bug" >&6 + ;; + *) + if test "${ac_cv_cygwin_gcc_alloca_bug+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_cygwin_gcc_alloca_bug=no +fi + + ;; +esac +fi + + +case "$host_cpu" in + i486|i586|i686) ;; + *) + # byteswap assembler routines are i486+-only + cat >>confdefs.h <<\_ACEOF +#define NO_ASM_BYTESWAP 1 _ACEOF + ;; +esac + +# Check whether --enable-cckd-bzip2 or --disable-cckd-bzip2 was given. +if test "${enable_cckd_bzip2+set}" = set; then + enableval="$enable_cckd_bzip2" + case "${enableval}" in + yes) cckd_bzip2=yes ;; + no) cckd_bzip2=no ;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-cckd-bzip2" >&5 +echo "$as_me: error: bad value ${enableval} for --enable-cckd-bzip2" >&2;} + { (exit 1); exit 1; }; } ;; + esac else - { { echo "$as_me:$LINENO: error: Unable to find fixed-size data types" >&5 -echo "$as_me: error: Unable to find fixed-size data types" >&2;} + cckd_bzip2=$have_libbz2 +fi; + +# Check whether --enable-het-bzip2 or --disable-het-bzip2 was given. +if test "${enable_het_bzip2+set}" = set; then + enableval="$enable_het_bzip2" + case "${enableval}" in + yes) het_bzip2=yes ;; + no) het_bzip2=no ;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-het-bzip2" >&5 +echo "$as_me: error: bad value ${enableval} for --enable-het-bzip2" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + het_bzip2=$have_libbz2 +fi; + +if test $cckd_bzip2 = yes || test $het_bzip2 = yes; then + if test $have_libbz2 != yes; then + { { echo "$as_me:$LINENO: error: bzip2 compression requested but libbz2 not found" >&5 +echo "$as_me: error: bzip2 compression requested but libbz2 not found" >&2;} { (exit 1); exit 1; }; } + else + LIBS="-lbz2 $LIBS" + fi +fi + +if test $cckd_bzip2 = yes; then + cat >>confdefs.h <<\_ACEOF +#define CCKD_BZIP2 1 +_ACEOF + fi +if test $het_bzip2 = yes; then + cat >>confdefs.h <<\_ACEOF +#define HET_BZIP2 1 +_ACEOF + fi +# Library functions -# Compiler characteristics +# Check for presence of memrchr in system -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 -if test "${ac_cv_c_bigendian+set}" = set; then +for ac_func in memrchr +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # See if sys/param.h defines the BYTE_ORDER macro. -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -#include -#include - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" #endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - # It does; now see whether it defined to BIG_ENDIAN or not. -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -#include +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -8340,49 +26917,92 @@ cat >conftest.$ac_ext <<_ACEOF int main () { -#if BYTE_ORDER != BIG_ENDIAN - not big endian +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; #endif ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_c_bigendian=yes + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_c_bigendian=no +eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + have_memrchr=yes +else + have_memrchr=no +fi +done + +if test $have_memrchr = no; then + cat >>confdefs.h <<\_ACEOF +#define BUILTIN_MEMRCHR 1 +_ACEOF + +fi + + +if test x$have_memrchr = xno; then + USE_BUILTIN_MEMRCHR_TRUE= + USE_BUILTIN_MEMRCHR_FALSE='#' +else + USE_BUILTIN_MEMRCHR_TRUE='#' + USE_BUILTIN_MEMRCHR_FALSE= +fi + + + +for ac_func in strerror_r +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -# It does not; compile a test program. -if test "$cross_compiling" = yes; then - # try to guess the endianess by grep'ing values into an object file - ac_cv_c_bigendian=unknown cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; -void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; -void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -8392,296 +27012,214 @@ void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () { - _ascii (); _ebcdic (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then - ac_cv_c_bigendian=yes -fi -if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi -fi + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + cat >>confdefs.h <<\_ACEOF +#define BUILTIN_STRERROR_R 1 +_ACEOF + +fi +done + + + + + + + +for ac_func in sqrtl ldexpl fabsl fmodl frexpl +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } u; - u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_c_bigendian=no + eval "$as_ac_var=yes" else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_c_bigendian=yes -fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 -case $ac_cv_c_bigendian in - yes) - -cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - ;; - no) - ;; - *) - { { echo "$as_me:$LINENO: error: unknown endianess -presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -echo "$as_me: error: unknown endianess -presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} - { (exit 1); exit 1; }; } ;; -esac - -# GCC only seems to support regparm on i386 right now, but that could -# change in the future. -echo "$as_me:$LINENO: checking whether gcc supports __attribute__((regparm(n)))" >&5 -echo $ECHO_N "checking whether gcc supports __attribute__((regparm(n)))... $ECHO_C" >&6 -if test "${ac_cv_attr_regparm+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test x$GCC != xyes; then - # __attribute__ is a GNU C extension - ac_cv_attr_regparm=no - else - SAVE_CFLAGS="$CFLAGS" - CFLAGS="-Wall -Werror" - cat >conftest.$ac_ext <<_ACEOF -void conftest () __attribute__ ((regparm(1))); -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_attr_regparm=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_attr_regparm=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext - CFLAGS="$SAVE_CFLAGS" - fi fi -echo "$as_me:$LINENO: result: $ac_cv_attr_regparm" >&5 -echo "${ECHO_T}$ac_cv_attr_regparm" >&6 +done -if test x$ac_cv_attr_regparm = xyes; then - case "$host_os" in - *cygwin*) - echo "$as_me:$LINENO: checking for cygwin regparm bug" >&5 -echo $ECHO_N "checking for cygwin regparm bug... $ECHO_C" >&6 -if test "${ac_cv_attr_regparm_cygwin_bug+set}" = set; then + + +for ac_func in strsignal getopt_long +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - true else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); -/* from Fish */ - -typedef struct _REGS -{ - int a, b, c, d; - char e[4000]; -} -REGS; - -__attribute__ ((regparm(3))) int func1 (int a, int b, int c, REGS *regs); -__attribute__ ((regparm(3))) int func2 (int a, int b, int c, REGS *regs); - -int main ( int argc, char *argv[] ) -{ - REGS* regs = 0; - exit(func1 (1, 2, 3, regs)); -} - -__attribute__ ((regparm(3))) int func1 (int a, int b, int c, REGS *regs) -{ - REGS iregs; - return func2 (a, b, c, &iregs); -} - -__attribute__ ((regparm(3))) int func2 (int a, int b, int c, REGS *regs) +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () { - return ((a == 1 && b == 2 && c == 3) ? 0 : 1); -} +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + ; + return 0; +} _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_attr_regparm_cygwin_bug=no + eval "$as_ac_var=yes" else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_attr_regparm_cygwin_bug=yes -fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_attr_regparm_cygwin_bug" >&5 -echo "${ECHO_T}$ac_cv_attr_regparm_cygwin_bug" >&6 - ;; - esac - - if test x$ac_cv_attr_regparm_cygwin_bug = xyes; then - ac_cv_attr_regparm=no - fi -fi - -if test x$ac_cv_attr_regparm != xyes; then - cat >>confdefs.h <<\_ACEOF -#define NO_ATTR_REGPARM 1 -_ACEOF - -fi - -case "$host_cpu" in - i486|i586|i686) ;; - *) - # byteswap assembler routines are i486+-only - cat >>confdefs.h <<\_ACEOF -#define NO_ASM_BYTESWAP 1 -_ACEOF - - ;; -esac - -# Check whether --enable-cckd-bzip2 or --disable-cckd-bzip2 was given. -if test "${enable_cckd_bzip2+set}" = set; then - enableval="$enable_cckd_bzip2" - case "${enableval}" in - yes) cckd_bzip2=yes ;; - no) cckd_bzip2=no ;; - *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-cckd-bzip2" >&5 -echo "$as_me: error: bad value ${enableval} for --enable-cckd-bzip2" >&2;} - { (exit 1); exit 1; }; } ;; - esac -else - cckd_bzip2=$have_libbz2 -fi; - -# Check whether --enable-het-bzip2 or --disable-het-bzip2 was given. -if test "${enable_het_bzip2+set}" = set; then - enableval="$enable_het_bzip2" - case "${enableval}" in - yes) het_bzip2=yes ;; - no) het_bzip2=no ;; - *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-het-bzip2" >&5 -echo "$as_me: error: bad value ${enableval} for --enable-het-bzip2" >&2;} - { (exit 1); exit 1; }; } ;; - esac -else - het_bzip2=$have_libbz2 -fi; - -if test $cckd_bzip2 = yes || test $het_bzip2 = yes; then - if test $have_libbz2 != yes; then - { { echo "$as_me:$LINENO: error: bzip2 compression requested but libbz2 not found" >&5 -echo "$as_me: error: bzip2 compression requested but libbz2 not found" >&2;} - { (exit 1); exit 1; }; } - else - LIBS="-lbz2 $LIBS" - fi +eval "$as_ac_var=no" fi - -if test $cckd_bzip2 = yes; then - cat >>confdefs.h <<\_ACEOF -#define CCKD_BZIP2 1 -_ACEOF - +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi - -if test $het_bzip2 = yes; then - cat >>confdefs.h <<\_ACEOF -#define HET_BZIP2 1 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi - -# Library functions - - - - +done -for ac_func in sqrtl ldexpl fabsl fmodl frexpl +for ac_func in InitializeCriticalSectionAndSpinCount do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -8757,7 +27295,7 @@ fi done -for ac_func in strsignal +for ac_func in iconv do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -8832,16 +27370,21 @@ _ACEOF fi done -echo "$as_me:$LINENO: checking for InitializeCriticalSectionAndSpinCount" >&5 -echo $ECHO_N "checking for InitializeCriticalSectionAndSpinCount... $ECHO_C" >&6 -if test "${ac_cv_func_InitializeCriticalSectionAndSpinCount+set}" = set; then + + +for ac_func in strlcpy strlcat +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char InitializeCriticalSectionAndSpinCount (); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -8849,7 +27392,7 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char InitializeCriticalSectionAndSpinCount (); +char $ac_func (); char (*f) (); #ifdef F77_DUMMY_MAIN @@ -8864,10 +27407,10 @@ main () /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_InitializeCriticalSectionAndSpinCount) || defined (__stub___InitializeCriticalSectionAndSpinCount) +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = InitializeCriticalSectionAndSpinCount; +f = $ac_func; #endif ; @@ -8886,16 +27429,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_InitializeCriticalSectionAndSpinCount=yes + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_func_InitializeCriticalSectionAndSpinCount=no +eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_InitializeCriticalSectionAndSpinCount" >&5 -echo "${ECHO_T}$ac_cv_func_InitializeCriticalSectionAndSpinCount" >&6 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done # If we have setresuid AND getresuid, we can do setuid stuff @@ -9072,21 +27622,6 @@ fi # User-definable settings -# Check whether --enable-profiling or --disable-profiling was given. -if test "${enable_profiling+set}" = set; then - enableval="$enable_profiling" - case "${enableval}" in - yes) - enable_profiling=true - CFLAGS="-pg -DPROFILE_CPU $CFLAGS" - ;; - no) ;; - *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-profiling" >&5 -echo "$as_me: error: bad value ${enableval} for --enable-profiling" >&2;} - { (exit 1); exit 1; }; } ;; - esac -fi; - # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" @@ -9147,6 +27682,24 @@ else test x$debug != xtrue && auto_optimize=true fi; +# Check whether --enable-configsymbols or --disable-configsymbols was given. +if test "${enable_configsymbols+set}" = set; then + enableval="$enable_configsymbols" + case "${enableval}" in + yes) opt_configsymbols=true ;; + no) opt_configsymbols=false ;; + *) opt_configsymbols=true;; + esac +else + opt_configsymbols=true +fi; +if test x$opt_configsymbols = xtrue; then + cat >>confdefs.h <<\_ACEOF +#define OPTION_CONFIG_SYMBOLS 1 +_ACEOF + +fi + if test x$auto_optimize = xtrue; then case "$host_cpu" in powerpc) @@ -9155,8 +27708,10 @@ if test x$auto_optimize = xtrue; then i586|i686) if test "$GCC" = "yes"; then OFLAGS="-O3 -march=$host_cpu $OFLAGS" - if test x$enable_profiling != xtrue && test x$debug != xtrue; then + if test x$debug != xtrue && test x$ac_cv_cygwin_gcc_alloca_bug != xyes; then OFLAGS="-fomit-frame-pointer $OFLAGS" + elif test x$ac_cv_cygwin_gcc_alloca_bug = xyes; then + OFLAGS="-fno-omit-frame-pointer $OFLAGS" fi else OFLAGS="$OFLAGS" @@ -9166,6 +27721,8 @@ if test x$auto_optimize = xtrue; then OFLAGS="$OFLAGS" ;; esac +elif test x$ac_cv_cygwin_gcc_alloca_bug = xyes; then + OFLAGS="-fno-omit-frame-pointer $OFLAGS" fi if test "x$OFLAGS" = x; then @@ -9177,29 +27734,6 @@ echo "${ECHO_T}$OFLAGS" >&6 CFLAGS="$OFLAGS $CFLAGS" fi -# Check whether --enable-external-gui or --disable-external-gui was given. -if test "${enable_external_gui+set}" = set; then - enableval="$enable_external_gui" - case "${enableval}" in - yes) build_external_gui=true ;; - no) build_external_gui=false ;; - *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-external-gui" >&5 -echo "$as_me: error: bad value ${enableval} for --enable-external-gui" >&2;} - { (exit 1); exit 1; }; } ;; - esac -else - case "$host_os" in - *cygwin*) build_external_gui=true ;; - *) build_external_gui=false ;; - esac -fi; - -if test x$build_external_gui = xtrue; then - cat >>confdefs.h <<\_ACEOF -#define EXTERNALGUI 1 -_ACEOF - -fi # Check whether --enable-custom or --disable-custom was given. if test "${enable_custom+set}" = set; then @@ -9210,24 +27744,39 @@ _ACEOF fi; -if test "x$prefix" = "xNONE"; then - PKGDATADIR="/usr/local/share/${PACKAGE}" -else - PKGDATADIR="${prefix}/share/${PACKAGE}" + + +if test "x${DESTPREFIX}" = "x"; then + if test "x$prefix" = "xNONE"; then + DESTPREFIX="/usr/local/share" + else + DESTPREFIX="${prefix}" + fi fi + +PKGDATADIR="${DESTPREFIX}/share/${PACKAGE}" cat >>confdefs.h <<_ACEOF #define PKGDATADIR "${PKGDATADIR}" _ACEOF -if test "x$prefix" = "xNONE"; then - LOCALEDIR="/usr/local/share/locale" -else - PKGDATADIR="${prefix}/share/locale}" -fi +LOCALEDIR="${DESTPREFIX}/share/locale" cat >>confdefs.h <<_ACEOF #define LOCALEDIR "${LOCALEDIR}" _ACEOF +MODULESDIR="${DESTPREFIX}/lib/${PACKAGE}" +cat >>confdefs.h <<_ACEOF +#define MODULESDIR "${MODULESDIR}" +_ACEOF + +{ echo "$as_me:$LINENO: Package destination directory prefix is ${DESTPREFIX}" >&5 +echo "$as_me: Package destination directory prefix is ${DESTPREFIX}" >&6;} + + + + + + @@ -9268,7 +27817,21 @@ _ACEOF -ac_config_files="$ac_config_files Makefile util/Makefile html/Makefile po/Makefile.in po/Makefile intl/Makefile m4/Makefile" + + + + + + + + + + + + + + +ac_config_files="$ac_config_files Makefile util/Makefile html/Makefile po/Makefile.in po/Makefile man/Makefile intl/Makefile m4/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -9359,6 +27922,20 @@ echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"INSTALL_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"INSTALL_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CONVENIENCE_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CONVENIENCE_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${BUILD_HERCIFC_TRUE}" && test -z "${BUILD_HERCIFC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"BUILD_HERCIFC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -9366,6 +27943,27 @@ echo "$as_me: error: conditional \"BUILD_HERCIFC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${OPTION_DYNAMIC_LOAD_TRUE}" && test -z "${OPTION_DYNAMIC_LOAD_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"OPTION_DYNAMIC_LOAD\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"OPTION_DYNAMIC_LOAD\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_DLLTOOL_TRUE}" && test -z "${USE_DLLTOOL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_DLLTOOL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_DLLTOOL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_SHARED_TRUE}" && test -z "${BUILD_SHARED_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_SHARED\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILD_SHARED\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${BUILD_FTHREADS_TRUE}" && test -z "${BUILD_FTHREADS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"BUILD_FTHREADS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -9380,6 +27978,13 @@ echo "$as_me: error: conditional \"BUILD_FISHHANG\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${USE_BUILTIN_MEMRCHR_TRUE}" && test -z "${USE_BUILTIN_MEMRCHR_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_BUILTIN_MEMRCHR\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_BUILTIN_MEMRCHR\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${SETUID_HERCIFC_TRUE}" && test -z "${SETUID_HERCIFC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"SETUID_HERCIFC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -9804,6 +28409,7 @@ do "html/Makefile" ) CONFIG_FILES="$CONFIG_FILES html/Makefile" ;; "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "po/Makefile" ) CONFIG_FILES="$CONFIG_FILES po/Makefile" ;; + "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "intl/Makefile" ) CONFIG_FILES="$CONFIG_FILES intl/Makefile" ;; "m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; @@ -9911,14 +28517,6 @@ s,@SET_MAKE@,$SET_MAKE,;t t s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t s,@MAINT@,$MAINT,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t @@ -9933,16 +28531,49 @@ s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t -s,@BUILD_HERCIFC_TRUE@,$BUILD_HERCIFC_TRUE,;t t -s,@BUILD_HERCIFC_FALSE@,$BUILD_HERCIFC_FALSE,;t t +s,@modexecdir@,$modexecdir,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@EGREP@,$EGREP,;t t +s,@LN_S@,$LN_S,;t t +s,@ECHO@,$ECHO,;t t +s,@AR@,$AR,;t t +s,@ac_ct_AR@,$ac_ct_AR,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@DLLTOOL@,$DLLTOOL,;t t +s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t +s,@AS@,$AS,;t t +s,@ac_ct_AS@,$ac_ct_AS,;t t +s,@OBJDUMP@,$OBJDUMP,;t t +s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t +s,@CPP@,$CPP,;t t +s,@CXX@,$CXX,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@CXXDEPMODE@,$CXXDEPMODE,;t t +s,@CXXCPP@,$CXXCPP,;t t +s,@F77@,$F77,;t t +s,@FFLAGS@,$FFLAGS,;t t +s,@ac_ct_F77@,$ac_ct_F77,;t t +s,@LIBTOOL@,$LIBTOOL,;t t +s,@INSTALL_LTDL_TRUE@,$INSTALL_LTDL_TRUE,;t t +s,@INSTALL_LTDL_FALSE@,$INSTALL_LTDL_FALSE,;t t +s,@CONVENIENCE_LTDL_TRUE@,$CONVENIENCE_LTDL_TRUE,;t t +s,@CONVENIENCE_LTDL_FALSE@,$CONVENIENCE_LTDL_FALSE,;t t +s,@LIBADD_DL@,$LIBADD_DL,;t t +s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t s,@MSGFMT@,$MSGFMT,;t t s,@GMSGFMT@,$GMSGFMT,;t t s,@XGETTEXT@,$XGETTEXT,;t t s,@MSGMERGE@,$MSGMERGE,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@CPP@,$CPP,;t t s,@ALLOCA@,$ALLOCA,;t t s,@GLIBC21@,$GLIBC21,;t t s,@LIBICONV@,$LIBICONV,;t t @@ -9961,10 +28592,20 @@ s,@INTLLIBS@,$INTLLIBS,;t t s,@LIBINTL@,$LIBINTL,;t t s,@LTLIBINTL@,$LTLIBINTL,;t t s,@POSUB@,$POSUB,;t t +s,@BUILD_HERCIFC_TRUE@,$BUILD_HERCIFC_TRUE,;t t +s,@BUILD_HERCIFC_FALSE@,$BUILD_HERCIFC_FALSE,;t t +s,@OPTION_DYNAMIC_LOAD_TRUE@,$OPTION_DYNAMIC_LOAD_TRUE,;t t +s,@OPTION_DYNAMIC_LOAD_FALSE@,$OPTION_DYNAMIC_LOAD_FALSE,;t t +s,@USE_DLLTOOL_TRUE@,$USE_DLLTOOL_TRUE,;t t +s,@USE_DLLTOOL_FALSE@,$USE_DLLTOOL_FALSE,;t t +s,@BUILD_SHARED_TRUE@,$BUILD_SHARED_TRUE,;t t +s,@BUILD_SHARED_FALSE@,$BUILD_SHARED_FALSE,;t t s,@BUILD_FTHREADS_TRUE@,$BUILD_FTHREADS_TRUE,;t t s,@BUILD_FTHREADS_FALSE@,$BUILD_FTHREADS_FALSE,;t t s,@BUILD_FISHHANG_TRUE@,$BUILD_FISHHANG_TRUE,;t t s,@BUILD_FISHHANG_FALSE@,$BUILD_FISHHANG_FALSE,;t t +s,@USE_BUILTIN_MEMRCHR_TRUE@,$USE_BUILTIN_MEMRCHR_TRUE,;t t +s,@USE_BUILTIN_MEMRCHR_FALSE@,$USE_BUILTIN_MEMRCHR_FALSE,;t t s,@SETUID_HERCIFC_TRUE@,$SETUID_HERCIFC_TRUE,;t t s,@SETUID_HERCIFC_FALSE@,$SETUID_HERCIFC_FALSE,;t t CEOF diff --git a/configure.ac b/configure.ac index fbdb793..1573ee4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,33 +1,91 @@ AC_INIT(hercules.h) AC_CONFIG_AUX_DIR(autoconf) -AM_INIT_AUTOMAKE(hercules,2.17.1) +AM_INIT_AUTOMAKE(hercules,3.00) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE -AC_CANONICAL_HOST +##------------------------------------------------------------ +## Begin JAP unwanted "-g -O2" optimization flags fix... +## +## AM_GNU_GETTEXT() +## +## AC_CANONICAL_HOST +## +## # Initialization +## CFLAGS="-W -Wall $CFLAGS" +## +## # Programs +## AC_PROG_CC +## AC_PROG_LIBTOOL +## # Initialization CFLAGS="-W -Wall $CFLAGS" +# ISW20030826-2 : add -I./intl as specified by gettext/info - Maintainers - Adjusting files - src/Makefile.in - Paragraph before last +# added line below +CPPFLAGS="-I ./intl" -# Programs -AC_PROG_CC +# Programs (Note use "HC_PROG_CC" and not "AC_PROG_CC". We now +# have our own "hercules.m4" macro defined in the +# autoconf directory that fixes an undesired compiler +# optimization flags issue) + +HC_PROG_CC + +## +## End JAP unwanted "-g -O2" optimization flags fix... +##------------------------------------------------------------ + +AC_DISABLE_STATIC + +modexecdir=${libdir}/${PACKAGE} +AC_SUBST(modexecdir) + +# ISW20030827-1 : Enable use of embedded libltdl 1 Line added +AC_LIBTOOL_DLOPEN +AC_LIBTOOL_WIN32_DLL +AC_PROG_LIBTOOL +# ISW20030827-1 : Enable use of embedded libltdl 1 Line added +AC_LIB_LTDL +AC_SUBST([LIBTOOL_DEPS]) + +AM_GNU_GETTEXT(use-libtool) + + + +## +## ISW - Add flag to warn about duplicates (if necessary) +## +HC_LD_DISALLOWDUPS() + +HC_LD_DUPSHAREGETOPT() +HC_HAVE_OPTERR() # OS-specific settings that we can't figure out any other way (yet) +build_hercifc=false +use_dlltool=false +is_cygwin=false + case "$host_os" in - darwin*) + darwin*) if test $host_vendor = apple ; then CPPFLAGS=-traditional-cpp - AC_DEFINE([_BSD_SOCKLEN_T_],[int]) - AC_DEFINE([_INTL_REDIRECT_MACROS]) + AC_DEFINE([_BSD_SOCKLEN_T_],[int]) + AC_DEFINE([_INTL_REDIRECT_MACROS]) +## Do whatever is necessary to get the following symbol defined +## so the included libltdl will be built and used +## AC_PROVIDE_AC_LIBTOOL_DLOPEN fi ;; linux*) build_hercifc=true ;; *cygwin*) + is_cygwin=true build_hercifc=false + use_dlltool=true AC_DEFINE([WIN32]) AC_DEFINE([NO_SIGABEND_HANDLER]) ;; @@ -36,6 +94,8 @@ case "$host_os" in ;; esac +AM_CONDITIONAL(BUILD_HERCIFC, [test "x$build_hercifc" = "xtrue"]) + # Arch-specific settings that we can't figure out any other way (yet) case "$host_cpu-$GCC" in @@ -44,7 +104,6 @@ case "$host_cpu-$GCC" in ;; esac -AM_CONDITIONAL(BUILD_HERCIFC, [test "x$build_hercifc" = "xtrue"]) # System Services AC_SYS_LARGEFILE @@ -60,7 +119,103 @@ AC_CHECK_LIB(z, main) AC_CHECK_LIB(bz2, BZ2_bzBuffToBuffDecompress, [have_libbz2=yes],[have_libbz2=no]) -AM_GNU_GETTEXT() +# OPTION_DYNAMIC_LOAD requires availability of either dlopen +# or libtool. If neither available OPTION_DYNAMIC_LOAD is not +# possible and USE_DLLTOOL shouldn't be set either. (Each test +# done twice; first time to cause default autoconf behavior, +# the second time to set our flag) + +# Leave this one so ltdl doesn't get to think dlopen is not available +AC_CHECK_LIB(dl,dlopen) +# ISW : Following lines commented out - UNCONDITIONALLY use libtool +# AC_CHECK_LIB(dl,dlopen, have_dlopen=true, have_dlopen=false ) +# ISW20030827-1 : 1 lines added, 2 lines commented out +have_lt_dlopen=true +# ISW : Following lines - UNCONDITIONALLY use libtool +have_dlopen=false +# AC_CHECK_LIB(ltdl,lt_dlopen) +# AC_CHECK_LIB(ltdl,lt_dlopen, have_lt_dlopen=true, have_lt_dlopen=false ) + +opt_dynamic_load=true + +AC_ARG_ENABLE(dynamic-load, + AC_HELP_STRING([--disable-dynamic-load], + [disable/enable dynamic loader option]), + [case "${enableval}" in + yes) opt_dynamic_load=true ;; + no) opt_dynamic_load=false ;; + *) opt_dynamic_load=true ;; + esac],[opt_dynamic_load=true]) + +if test $opt_dynamic_load = true; then + if test $have_dlopen = true || test $have_lt_dlopen = true; then + AC_DEFINE([OPTION_DYNAMIC_LOAD]) + if test $have_dlopen != true; then + AC_DEFINE([HDL_USE_LIBTOOL]) + fi + else + opt_dynamic_load=false + use_dlltool=false + fi +else + opt_dynamic_load=false + use_dlltool=false +fi + +AM_CONDITIONAL(OPTION_DYNAMIC_LOAD, [test "x$opt_dynamic_load" = "xtrue"]) +AM_CONDITIONAL(USE_DLLTOOL, [test "x$use_dlltool" = "xtrue"]) +AM_CONDITIONAL(BUILD_SHARED, [test "x$enable_shared" = "xyes"]) + +if test x$enable_shared = xyes; then + AC_DEFINE(HDL_BUILD_SHARED) +fi + +AC_ARG_ENABLE(external-gui, + AC_HELP_STRING([--disable-external-gui], + [disable interface to external Windows GUI]), + [case "${enableval}" in + yes) build_external_gui=true ;; + no) build_external_gui=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-external-gui) ;; + esac], + [case "$host_os" in + *cygwin*) build_external_gui=true ;; + *) build_external_gui=false ;; + esac]) + +if test x$build_external_gui = xtrue; then + if test $is_cygwin = true && test $opt_dynamic_load != true; then + AC_MSG_ERROR([dynamic loader option required for external gui support on win32]) + else + if test $is_cygwin = true && test $use_dlltool != true; then + AC_MSG_ERROR([internal error: external gui specified for win32 but use_dlltool not set]) + else + AC_DEFINE([EXTERNALGUI]) + fi + fi +fi + +max_num_cpus=8 +default_num_cpus=2 +num_cpus_error=no + +AC_ARG_ENABLE(multi-cpu, + AC_HELP_STRING([--enable-multi-cpu=NUMBER|no], + [enable/disable multi-cpu support (valid range is 1-8, default is 2)]), + [case "${enableval}" in + no) num_cpu_engines=1 ;; + yes) num_cpu_engines=${default_num_cpus} ;; + 0|9) num_cpus_error=yes ;; + 1|2|3|4|5|6|7|8) num_cpu_engines=${enableval} ;; + *) num_cpus_error=yes ;; + esac], + [num_cpu_engines=${default_num_cpus}]) + +if test $num_cpus_error = no; then + AC_DEFINE_UNQUOTED(MAX_CPU_ENGINES,${num_cpu_engines}) +else + AC_MSG_ERROR(bad value "${enableval}" for --enable-multi-cpu) +fi AC_ARG_ENABLE(fthreads, AC_HELP_STRING([--enable-fthreads], @@ -105,14 +260,14 @@ AC_ARG_ENABLE(fishhang, esac], [fishhang=false]) -AM_CONDITIONAL(BUILD_FISHHANG, [test x$fishhang = xtrue]) - if test x$fishhang = xtrue; then if test x$build_fthreads != xtrue; then AC_MSG_ERROR(fishhang requested but fthreads not specified) fi fi +AM_CONDITIONAL(BUILD_FISHHANG, [test x$fishhang = xtrue]) + dnl AC_MSG_NOTICE([Checking to see if -pthread is needed to compile]) AC_MSG_CHECKING([whether ${CC-cc} accepts -pthread]) @@ -143,17 +298,13 @@ if test x$build_fthreads != xtrue; then *cygwin*) # Alternate pthreads location for older cygwin AC_MSG_NOTICE([Looking for pthread.h in /usr/Pthreads]) - CFLAGS_SAVE="$CFLAGS" CFLAGS="$CFLAGS -I/usr/Pthreads" AC_CHECK_HEADER(pthread.h, [], - [CFLAGS="$CFLAGS_SAVE" - AC_DEFINE([NOTHREAD]) - AC_MSG_WARN([Unable to find pthread.h, disabling threads]) ]) + [AC_MSG_ERROR([Unable to find pthread.h]) ]) ;; *) - AC_MSG_WARN([Unable to find pthread.h, disabling threads]) - AC_DEFINE([NOTHREAD]) + AC_MSG_ERROR([Unable to find pthread.h]) ;; esac]) fi @@ -165,10 +316,13 @@ AC_CHECK_HEADER(inttypes.h, [AC_DEFINE([HAVE_U_INT])], [AC_MSG_ERROR([Unable to find fixed-size data types])] )] ) +AC_CHECK_HEADERS(linux/if_tun.h) + # Compiler characteristics AC_C_BIGENDIAN + # GCC only seems to support regparm on i386 right now, but that could # change in the future. AC_CACHE_CHECK([whether gcc supports __attribute__((regparm(n)))], @@ -185,23 +339,23 @@ AC_CACHE_CHECK([whether gcc supports __attribute__((regparm(n)))], CFLAGS="$SAVE_CFLAGS" fi]) -if test x$ac_cv_attr_regparm = xyes; then +if test "$GCC" = "yes" && test x$ac_cv_attr_regparm = xyes; then case "$host_os" in *cygwin*) - AC_CACHE_CHECK([for cygwin regparm bug], - [ac_cv_attr_regparm_cygwin_bug], + AC_CACHE_CHECK([for cygwin __attribute__ ((regparm(3))) bug], + [ac_cv_cygwin_gcc_attr_regparm_bug], [AC_TRY_RUN([ /* from Fish */ typedef struct _REGS { int a, b, c, d; - char e[4000]; + char e[5000]; } REGS; -__attribute__ ((regparm(3))) int func1 (int a, int b, int c, REGS *regs); -__attribute__ ((regparm(3))) int func2 (int a, int b, int c, REGS *regs); +int func1 (int a, int b, int c, REGS *regs) __attribute__ ((regparm(3))); +int func2 (int a, int b, int c, REGS *regs) __attribute__ ((regparm(3))); int main ( int argc, char *argv[] ) { @@ -209,24 +363,24 @@ int main ( int argc, char *argv[] ) exit(func1 (1, 2, 3, regs)); } -__attribute__ ((regparm(3))) int func1 (int a, int b, int c, REGS *regs) +int func1 (int a, int b, int c, REGS *regs) { REGS iregs; return func2 (a, b, c, &iregs); } -__attribute__ ((regparm(3))) int func2 (int a, int b, int c, REGS *regs) +int func2 (int a, int b, int c, REGS *regs) { return ((a == 1 && b == 2 && c == 3) ? 0 : 1); } ], - ac_cv_attr_regparm_cygwin_bug=no, - ac_cv_attr_regparm_cygwin_bug=yes, - true)]) + ac_cv_cygwin_gcc_attr_regparm_bug=no, + ac_cv_cygwin_gcc_attr_regparm_bug=yes, + ac_cv_cygwin_gcc_attr_regparm_bug=yes)]) ;; esac - if test x$ac_cv_attr_regparm_cygwin_bug = xyes; then + if test x$ac_cv_cygwin_gcc_attr_regparm_bug = xyes; then ac_cv_attr_regparm=no fi fi @@ -235,6 +389,54 @@ if test x$ac_cv_attr_regparm != xyes; then AC_DEFINE(NO_ATTR_REGPARM) fi + +if test "$GCC" = "yes"; then +case "$host_os" in + *cygwin*) + AC_CACHE_CHECK([for cygwin gcc __builtin_alloca bug], + [ac_cv_cygwin_gcc_alloca_bug], + [SAVE_CFLAGS="$CFLAGS" + CFLAGS="-O2 -fomit-frame-pointer" + AC_TRY_RUN([ +/* + * Test for presence of gcc 3.2 compiler bug. + * + * Required compiler options: + * + * -O2 -fomit-frame-pointer + * + * Note: using any other -O option other than + * -O2 DOES NOT cause the bug to occur!, nor + * does using -fno-omit-frame-pointer! In fact, + * using "-fno-omit-frame-pointer" is the sug- + * gested workaround for this particular bug. + */ + +int foo () +{ + char a[5000+16]; + memset(a,0xCD,5000); + a[5000]=0; + return strlen(a); +} + +int main ( int argc, char* argv[] ) +{ + return (foo() != 5000); +} +], + ac_cv_cygwin_gcc_alloca_bug=no, + ac_cv_cygwin_gcc_alloca_bug=yes, + ac_cv_cygwin_gcc_alloca_bug=yes) + CFLAGS="$SAVE_CFLAGS"]) + ;; + *) + AC_CACHE_VAL(ac_cv_cygwin_gcc_alloca_bug, ac_cv_cygwin_gcc_alloca_bug=no) + ;; +esac +fi + + case "$host_cpu" in i486|i586|i686) ;; *) @@ -279,11 +481,23 @@ if test $het_bzip2 = yes; then AC_DEFINE(HET_BZIP2) fi + # Library functions +# Check for presence of memrchr in system +AC_CHECK_FUNCS(memrchr,[have_memrchr=yes],[have_memrchr=no]) +if test $have_memrchr = no; then + AC_DEFINE(BUILTIN_MEMRCHR) +fi +AM_CONDITIONAL(USE_BUILTIN_MEMRCHR, [test x$have_memrchr = xno]) + +AC_CHECK_FUNCS(strerror_r,,[AC_DEFINE(BUILTIN_STRERROR_R)]) + AC_CHECK_FUNCS(sqrtl ldexpl fabsl fmodl frexpl) -AC_CHECK_FUNCS(strsignal) -AC_CHECK_FUNC(InitializeCriticalSectionAndSpinCount) +AC_CHECK_FUNCS(strsignal getopt_long) +AC_CHECK_FUNCS(InitializeCriticalSectionAndSpinCount) +AC_CHECK_FUNCS(iconv) +AC_CHECK_FUNCS(strlcpy strlcat) # If we have setresuid AND getresuid, we can do setuid stuff AC_CHECK_FUNCS([setresuid getresuid], @@ -302,17 +516,6 @@ fi # User-definable settings -AC_ARG_ENABLE(profiling, - AC_HELP_STRING([--enable-profiling], [enable execution profiling]), - [case "${enableval}" in - yes) - enable_profiling=true - CFLAGS="-pg -DPROFILE_CPU $CFLAGS" - ;; - no) ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-profiling]) ;; - esac]) - AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable debugging (TRACE/VERIFY/ASSERT macros)]), [case "${enableval}" in @@ -349,6 +552,18 @@ AC_ARG_ENABLE(optimization, esac], [test x$debug != xtrue && auto_optimize=true]) +AC_ARG_ENABLE(configsymbols, + AC_HELP_STRING([--disable-configsymbols], + [enable/disable symbolic substitutions in configuration file]), + [case "${enableval}" in + yes) opt_configsymbols=true ;; + no) opt_configsymbols=false ;; + *) opt_configsymbols=true;; + esac],[opt_configsymbols=true]) +if test x$opt_configsymbols = xtrue; then + AC_DEFINE([OPTION_CONFIG_SYMBOLS]) +fi + if test x$auto_optimize = xtrue; then case "$host_cpu" in powerpc) @@ -357,8 +572,10 @@ if test x$auto_optimize = xtrue; then i586|i686) if test "$GCC" = "yes"; then OFLAGS="-O3 -march=$host_cpu $OFLAGS" - if test x$enable_profiling != xtrue && test x$debug != xtrue; then + if test x$debug != xtrue && test x$ac_cv_cygwin_gcc_alloca_bug != xyes; then OFLAGS="-fomit-frame-pointer $OFLAGS" + elif test x$ac_cv_cygwin_gcc_alloca_bug = xyes; then + OFLAGS="-fno-omit-frame-pointer $OFLAGS" fi else OFLAGS="$OFLAGS" @@ -368,6 +585,8 @@ if test x$auto_optimize = xtrue; then OFLAGS="$OFLAGS" ;; esac +elif test x$ac_cv_cygwin_gcc_alloca_bug = xyes; then + OFLAGS="-fno-omit-frame-pointer $OFLAGS" fi if test "x$OFLAGS" = x; then @@ -377,22 +596,6 @@ else CFLAGS="$OFLAGS $CFLAGS" fi -AC_ARG_ENABLE(external-gui, - AC_HELP_STRING([--disable-external-gui], - [disable interface to external Windows GUI]), - [case "${enableval}" in - yes) build_external_gui=true ;; - no) build_external_gui=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-external-gui) ;; - esac], - [case "$host_os" in - *cygwin*) build_external_gui=true ;; - *) build_external_gui=false ;; - esac]) - -if test x$build_external_gui = xtrue; then - AC_DEFINE([EXTERNALGUI]) -fi AC_ARG_ENABLE(custom, AC_HELP_STRING([--enable-custom=STRING], @@ -404,18 +607,26 @@ dnl config.h, but this is the only way I've found to do so. The incantation dnl "${prefix}/share" is needed because ${datadir} doesn't expand to the dnl desired data directory. If there's a better way to get there, PLEASE dnl replace this. --JRM -if test "x$prefix" = "xNONE"; then - PKGDATADIR="/usr/local/share/${PACKAGE}" -else - PKGDATADIR="${prefix}/share/${PACKAGE}" + +dnl If DEST is set, we're doing an RPM build, and we want to use that +dnl value. If it's not set, and prefix is set and not equal to NONE, then +dnl we'll use that. If prefix is NONE, then default to /usr/local. + +if test "x${DESTPREFIX}" = "x"; then + if test "x$prefix" = "xNONE"; then + DESTPREFIX="/usr/local/share" + else + DESTPREFIX="${prefix}" + fi fi + +PKGDATADIR="${DESTPREFIX}/share/${PACKAGE}" AC_DEFINE_UNQUOTED([PKGDATADIR], "${PKGDATADIR}") -if test "x$prefix" = "xNONE"; then - LOCALEDIR="/usr/local/share/locale" -else - PKGDATADIR="${prefix}/share/locale}" -fi +LOCALEDIR="${DESTPREFIX}/share/locale" AC_DEFINE_UNQUOTED([LOCALEDIR], "${LOCALEDIR}") +MODULESDIR="${DESTPREFIX}/lib/${PACKAGE}" +AC_DEFINE_UNQUOTED([MODULESDIR], "${MODULESDIR}") +AC_MSG_NOTICE([Package destination directory prefix is ${DESTPREFIX}]) AH_TEMPLATE([NO_ATTR_REGPARM], [Define if your gcc does not support __attribute__((regparm(n)))]) @@ -455,5 +666,25 @@ AH_TEMPLATE([_BSD_SOCKLEN_T_], [Define missing macro on apple darwin (osx) platform]) AH_TEMPLATE([_INTL_REDIRECT_MACROS], [Define to 1 if non-Intel architecture (gettext)]) - -AC_OUTPUT([Makefile util/Makefile html/Makefile po/Makefile.in po/Makefile intl/Makefile m4/Makefile ]) +AH_TEMPLATE([BUILTIN_MEMRCHR], + [Define to use built-in memrchr implementation]) +AH_TEMPLATE([BUILTIN_STRERROR_R], + [Define to use built-in strerror_r implementation]) +AH_TEMPLATE([OPTION_CONFIG_SYMBOLS], + [Define to enable symbolic substitutions in configuration file]) +AH_TEMPLATE([OPTION_DYNAMIC_LOAD], + [Define to enable Hercules Dynamic Loader feature]) +AH_TEMPLATE([HDL_USE_LIBTOOL], + [Define to cause dynamic loader to use libtool instead of dlopen]) +AH_TEMPLATE([MAX_CPU_ENGINES], + [Defines the maximum number of emulated CPU engines]) +AH_TEMPLATE([HDL_BUILD_SHARED], + [Define to to indicate shared libraries are being used]) +AH_TEMPLATE([NEED_GETOPT_WRAPPER], + [Define to indicate a wrapper for getopt is needed]) +AH_TEMPLATE([NEED_GETOPT_OPTRESET], + [Define to indicate optreset exists]) +AH_TEMPLATE([MODULESDIR], + [Directory where HERCULES modules are installed]) + +AC_OUTPUT([Makefile util/Makefile html/Makefile po/Makefile.in po/Makefile man/Makefile intl/Makefile m4/Makefile ]) diff --git a/console.c b/console.c index e8a3ed0..c92ff09 100644 --- a/console.c +++ b/console.c @@ -51,6 +51,18 @@ #include "opcode.h" + +#if defined(OPTION_DYNAMIC_LOAD) && defined(WIN32) && !defined(HDL_USE_LIBTOOL) + SYSBLK *psysblk; + #define sysblk (*psysblk) + #define config_cnslport (*config_cnslport) +static +#else +extern +#endif + char *config_cnslport; + + /*-------------------------------------------------------------------*/ /* Telnet command definitions */ /*-------------------------------------------------------------------*/ @@ -244,6 +256,81 @@ unsigned char print_chars[17]; #endif +#if 1 +struct sockaddr_in * get_inet_socket(char *host_serv) +{ +char *host = NULL; +char *serv; +struct sockaddr_in *sin; + + if((serv = strchr(host_serv,':'))) + { + *serv++ = '\0'; + if(*host_serv) + host = host_serv; + } + else + serv = host_serv; + + if(!(sin = malloc(sizeof(struct sockaddr_in)))) + return sin; + + sin->sin_family = AF_INET; + + if(host) + { + struct hostent *hostent; + + hostent = gethostbyname(host); + + if(!hostent) + { + logmsg(_("HHCGI001I Unable to determine IP address from %s\n"), + host); + free(sin); + return NULL; + } + + memcpy(&sin->sin_addr,*hostent->h_addr_list,sizeof(sin->sin_addr)); + } + else + sin->sin_addr.s_addr = INADDR_ANY; + + if(serv) + { + if(!isdigit(*serv)) + { + struct servent *servent; + + servent = getservbyname(serv, "tcp"); + + if(!servent) + { + logmsg(_("HHCGI002I Unable to determine port number from %s\n"), + host); + free(sin); + return NULL; + } + + sin->sin_port = servent->s_port; + } + else + sin->sin_port = htons(atoi(serv)); + + } + else + { + logmsg(_("HHCGI003E Invalid parameter: %s\n"), + host_serv); + free(sin); + return NULL; + } + + return sin; + +} + +#endif /*-------------------------------------------------------------------*/ /* SUBROUTINE TO REMOVE ANY IAC SEQUENCES FROM THE DATA STREAM */ /* Returns the new length after deleting IAC commands */ @@ -801,10 +888,10 @@ BYTE buf[32]; /* tn3270 write buffer */ /* Close the connection if an error occurred */ if (rc & CSW_UC) { - close (dev->fd); - dev->fd = -1; dev->connected = 0; + dev->fd = -1; dev->sense[0] = SENSE_DC; + return (CSW_UC); } @@ -977,6 +1064,12 @@ BYTE c; /* Character work area */ } /* end function recv_1052_data */ + +/* o_rset identifies the filedescriptors of all known connections */ + +static fd_set o_rset; +static int o_mfd; + /*-------------------------------------------------------------------*/ /* NEW CLIENT CONNECTION THREAD */ @@ -998,9 +1091,9 @@ BYTE class; /* D=3270, P=3287, K=3215/1052 */ BYTE model; /* 3270 model (2,3,4,5,X) */ BYTE extended; /* Extended attributes (Y,N) */ BYTE buf[256]; /* Message buffer */ -BYTE conmsg[80]; /* Connection message */ -BYTE hostmsg[80]; /* Host ID message */ -BYTE rejmsg[80]; /* Rejection message */ +BYTE conmsg[256]; /* Connection message */ +BYTE hostmsg[256]; /* Host ID message */ +BYTE rejmsg[256]; /* Rejection message */ /* Load the socket address from the thread parameter */ csock = *csockp; @@ -1074,13 +1167,18 @@ BYTE rejmsg[80]; /* Rejection message */ dev->readpending = 0; dev->rlen3270 = 0; dev->keybdrem = 0; - dev->busy = 0; - dev->pending = 0; - dev->pcipending = 0; + memset (&dev->scsw, 0, sizeof(SCSW)); memset (&dev->pciscsw, 0, sizeof(SCSW)); + dev->busy = dev->pending = dev->pcipending = 0; + + /* Set device in old readset such that the associated + file descriptor will be closed after detach */ + FD_SET (dev->fd, &o_rset); + if (dev->fd > o_mfd) o_mfd = dev->fd; release_lock (&dev->lock); + break; } @@ -1166,7 +1264,8 @@ BYTE rejmsg[80]; /* Rejection message */ /* Raise attention interrupt for the device */ if (class != 'P') /* do not raise attention for 3287 */ - rc = device_attention (dev, CSW_ATTN); + /* rc = device_attention (dev, CSW_ATTN); *ISW3274DR* - Removed */ + rc = device_attention (dev, CSW_DE); /* *ISW3274DR - Added */ /* Signal connection thread to redrive its select loop */ signal_thread (sysblk.cnsltid, SIGUSR2); @@ -1180,15 +1279,24 @@ BYTE rejmsg[80]; /* Rejection message */ /*-------------------------------------------------------------------*/ /* CONSOLE CONNECTION AND ATTENTION HANDLER THREAD */ /*-------------------------------------------------------------------*/ +static int console_cnslcnt; + +static void console_shutdown(void * unused __attribute__ ((unused)) ) +{ + console_cnslcnt = 0; +} + static void * console_connection_handler (void *arg) { int rc = 0; /* Return code */ int lsock; /* Socket for listening */ int csock; /* Socket for conversation */ -struct sockaddr_in server; /* Server address structure */ +struct sockaddr_in *server; /* Server address structure */ fd_set readset; /* Read bit map for select */ +fd_set c_rset; /* Currently valid dev->fd's */ int maxfd; /* Highest fd for select */ +int fd, c_mfd = 0; int optval; /* Argument for setsockopt */ TID tidneg; /* Negotiation thread id */ DEVBLK *dev; /* -> Device block */ @@ -1196,6 +1304,8 @@ BYTE unitstat; /* Status after receive data */ UNREFERENCED(arg); + hdl_adsc(console_shutdown, NULL); + /* Display thread started message on control panel */ logmsg (_("HHCTE001I Console connection thread started: " "tid="TIDPAT", pid=%d\n"), @@ -1204,9 +1314,6 @@ BYTE unitstat; /* Status after receive data */ /* Get information about this system */ uname (&hostinfo); - /* Wait for system to finish coming up */ - while (!initdone) sleep(1); - /* Obtain a socket */ lsock = socket (AF_INET, SOCK_STREAM, 0); @@ -1222,21 +1329,22 @@ BYTE unitstat; /* Status after receive data */ &optval, sizeof(optval)); /* Prepare the sockaddr structure for the bind */ - memset (&server, 0, sizeof(server)); - server.sin_family = AF_INET; - server.sin_addr.s_addr = INADDR_ANY; - server.sin_port = sysblk.cnslport; - server.sin_port = htons(server.sin_port); + if(!( server = get_inet_socket(config_cnslport) )) + { + logmsg(_("HHCTE010E CNSLPORT statement invalid: %s\n"), + config_cnslport); + return NULL; + } /* Attempt to bind the socket to the port */ - while (sysblk.cnslcnt) + while (console_cnslcnt) { - rc = bind (lsock, (struct sockaddr *)&server, sizeof(server)); + rc = bind (lsock, (struct sockaddr *)server, sizeof(struct sockaddr_in)); if (rc == 0 || errno != EADDRINUSE) break; logmsg (_("HHCTE002W Waiting for port %u to become free\n"), - sysblk.cnslport); + ntohs(server->sin_port)); sleep(10); } /* end while */ @@ -1256,32 +1364,56 @@ BYTE unitstat; /* Status after receive data */ } logmsg (_("HHCTE003I Waiting for console connection on port %u\n"), - sysblk.cnslport); + ntohs(server->sin_port)); + + FD_ZERO(&o_rset); + o_mfd = 0; /* Handle connection requests and attention interrupts */ - while (sysblk.cnslcnt) { + while (console_cnslcnt) { /* Initialize the select parameters */ maxfd = lsock; FD_ZERO (&readset); FD_SET (lsock, &readset); + FD_ZERO(&c_rset); + c_mfd = 0; + /* Include the socket for each connected console */ for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) { if (dev->console && dev->connected - && (dev->busy == 0 || (dev->scsw.flag3 & SCSW3_AC_SUSP)) - && dev->pending == 0 - && (dev->pmcw.flag5 & PMCW5_V) -// NOT S/370 && (dev->pmcw.flag5 & PMCW5_E) - && (dev->scsw.flag3 & SCSW3_SC_PEND) == 0) +// NOT S/370 && (dev->pmcw.flag5 & PMCW5_E) + && (dev->pmcw.flag5 & PMCW5_V) ) { - FD_SET (dev->fd, &readset); - if (dev->fd > maxfd) maxfd = dev->fd; + FD_SET (dev->fd, &c_rset); + if (dev->fd > c_mfd) c_mfd = dev->fd; + + if( (!dev->busy || (dev->scsw.flag3 & SCSW3_AC_SUSP)) + && !(dev->pending || dev->pcipending) + && (dev->scsw.flag3 & SCSW3_SC_PEND) == 0) + { + FD_SET (dev->fd, &readset); + if (dev->fd > maxfd) maxfd = dev->fd; + } } } /* end for(dev) */ + + /* Close any no longer existing connections */ + for(fd = 1; fd <= (c_mfd < o_mfd ? c_mfd : o_mfd); fd++) + if(FD_ISSET(fd, &o_rset) && !FD_ISSET(fd, &c_rset)) + close(fd); + if(o_mfd > c_mfd) + for(; fd <= o_mfd; fd++) + if(FD_ISSET(fd, &o_rset)) + close(fd); + memcpy(&o_rset, &c_rset, sizeof(o_rset)); + o_mfd = c_mfd; + + /* Wait for a file descriptor to become ready */ #ifdef WIN32 { @@ -1334,8 +1466,8 @@ BYTE unitstat; /* Status after receive data */ if (dev->console && dev->connected && FD_ISSET (dev->fd, &readset) - && (dev->busy == 0 || (dev->scsw.flag3 & SCSW3_AC_SUSP)) - && dev->pending == 0 + && (!dev->busy || (dev->scsw.flag3 & SCSW3_AC_SUSP)) + && !(dev->pending || dev->pcipending) && (dev->pmcw.flag5 & PMCW5_V) // NOT S/370 && (dev->pmcw.flag5 & PMCW5_E) && (dev->scsw.flag3 & SCSW3_SC_PEND) == 0) @@ -1359,6 +1491,7 @@ BYTE unitstat; /* Status after receive data */ close (dev->fd); dev->fd = -1; dev->connected = 0; + FD_CLR(fd, &o_rset); } /* Indicate that data is available at the device */ @@ -1380,7 +1513,10 @@ BYTE unitstat; /* Status after receive data */ /* console: CCUU attention requests raised */ if (dev->devtype != 0x3287) { - rc = device_attention (dev, unitstat); + if(dev->connected) /* *ISW3274DR* - Added */ + { /* *ISW3274DR - Added */ + rc = device_attention (dev, unitstat); + } /* *ISW3274DR - Added */ /* Trace the attention request */ TNSDEBUG2("%4.4X attention request %s\n", @@ -1397,8 +1533,13 @@ BYTE unitstat; /* Status after receive data */ } /* end while */ + for(fd = 1; fd <= c_mfd; fd++) + if(FD_ISSET(fd, &c_rset)) + close(fd); + /* Close the listening socket */ close (lsock); + free(server); logmsg (_("HHCTE004I Console connection thread terminated\n")); @@ -1410,7 +1551,7 @@ BYTE unitstat; /* Status after receive data */ static int console_initialise() { - if(!(sysblk.cnslcnt++)) + if(!(console_cnslcnt++)) { if ( create_thread (&sysblk.cnsltid, &sysblk.detattr, console_connection_handler, NULL) ) @@ -1427,15 +1568,12 @@ console_initialise() static void console_remove(DEVBLK *dev) { - if(dev->fd > 2) - close (dev->fd); - dev->fd = -1; - - /* Reset device dependent flags */ dev->connected = 0; dev->console = 0; - if(!sysblk.cnslcnt--) + dev->fd = -1; + + if(!console_cnslcnt--) logmsg(_("console_remove() error\n")); signal_thread (sysblk.cnsltid, SIGUSR2); @@ -1463,6 +1601,9 @@ loc3270_init_handler ( DEVBLK *dev, int argc, BYTE *argv[] ) /* Set the size of the device buffer */ dev->bufsize = BUFLEN_3270; + if(!sscanf(dev->typname,"%hx",&(dev->devtype))) + dev->devtype = 0x3270; + /* Initialize the device identifier bytes */ dev->devid[0] = 0xFF; dev->devid[1] = 0x32; /* Control unit type is 3274-1D */ @@ -1546,6 +1687,9 @@ constty_init_handler ( DEVBLK *dev, int argc, BYTE *argv[] ) dev->prompt1052 = 0; } + if(!sscanf(dev->typname,"%hx",&(dev->devtype))) + dev->devtype = 0x1052; + /* Initialize the device identifier bytes */ dev->devid[0] = 0xFF; dev->devid[1] = dev->devtype >> 8; @@ -1798,7 +1942,8 @@ BYTE buf[BUFLEN_3270]; /* tn3270 write buffer */ if (!dev->connected && !IS_CCW_SENSE(code)) { dev->sense[0] = SENSE_IR; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + /* *unitstat = CSW_CE | CSW_DE | CSW_UC; */ + *unitstat = CSW_UC; /* *ISW3274DR* (as per GA23-0218-11 3.1.3.2.2 Table 5-5) */ return; } @@ -2284,8 +2429,8 @@ BYTE stat; /* Unit status */ if (dev->prompt1052 == 1) { len = sprintf (dev->buf, - "HHCTE006A Enter input for console device %4.4X\r\n", - dev->devnum); + _("HHCTE006A Enter input for console device %4.4X%c\n"), + dev->devnum,'\r'); rc = send_packet (dev->fd, dev->buf, len, NULL); if (rc < 0) { @@ -2396,20 +2541,68 @@ BYTE stat; /* Unit status */ } /* end function constty_execute_ccw */ - +#if defined(OPTION_DYNAMIC_LOAD) +static +#endif DEVHND constty_device_hndinfo = { &constty_init_handler, &constty_execute_ccw, &constty_close_device, &constty_query_device, - NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; +/* Libtool static name colision resolution */ +/* note : lt_dlopen will look for symbol & modulename_LTX_symbol */ +#if !defined(HDL_BUILD_SHARED) && defined(HDL_USE_LIBTOOL) +#define hdl_ddev hdt3270_LTX_hdl_ddev +#define hdl_depc hdt3270_LTX_hdl_depc +#define hdl_reso hdt3270_LTX_hdl_reso +#define hdl_init hdt3270_LTX_hdl_init +#define hdl_fini hdt3270_LTX_hdl_fini +#endif + +#if defined(OPTION_DYNAMIC_LOAD) +static +#endif DEVHND loc3270_device_hndinfo = { &loc3270_init_handler, &loc3270_execute_ccw, &loc3270_close_device, &loc3270_query_device, - NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + + +#if defined(OPTION_DYNAMIC_LOAD) +HDL_DEPENDENCY_SECTION; +{ + HDL_DEPENDENCY(HERCULES); + HDL_DEPENDENCY(DEVBLK); + HDL_DEPENDENCY(SYSBLK); +} +END_DEPENDENCY_SECTION; + + +#if defined(WIN32) && !defined(HDL_USE_LIBTOOL) +#undef sysblk +#undef config_cnslport +HDL_RESOLVER_SECTION; +{ + HDL_RESOLVE_PTRVAR( psysblk, sysblk ); + HDL_RESOLVE( config_cnslport ); +} +END_RESOLVER_SECTION; +#endif + + +HDL_DEVICE_SECTION; +{ + HDL_DEVICE(1052, constty_device_hndinfo ); + HDL_DEVICE(3215, constty_device_hndinfo ); + HDL_DEVICE(3270, loc3270_device_hndinfo ); + HDL_DEVICE(3287, loc3270_device_hndinfo ); +} +END_DEVICE_SECTION; +#endif diff --git a/control.c b/control.c index 8275d3d..d249141 100644 --- a/control.c +++ b/control.c @@ -278,7 +278,7 @@ CREG newcr12 = 0; /* CR12 upon completion */ #endif /*FEATURE_TRACING*/ #if defined(FEATURE_PER) - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(regs->psw.IA,regs->CR(10),regs->CR(11)) ) @@ -552,7 +552,7 @@ CREG newcr12 = 0; /* CR12 upon completion */ INVALIDATE_AEA_ALL(regs); #if defined(FEATURE_PER) - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(regs->psw.IA,regs->CR(10),regs->CR(11)) ) @@ -652,7 +652,7 @@ VADR n = 0; /* Work area */ { regs->psw.IA = regs->GR(r2) & ADDRESS_MAXWRAP(regs); #if defined(FEATURE_PER) - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(regs->psw.IA,regs->CR(10),regs->CR(11)) ) @@ -675,6 +675,7 @@ DEF_INST(compare_and_swap_and_purge) int r1, r2; /* Values of R fields */ U64 n2; /* virtual address of op2 */ RADR abs2; /* absolute address of op2 */ +U32 old; /* old value */ RRE(inst, execflag, regs, r1, r2); @@ -703,11 +704,13 @@ RADR abs2; /* absolute address of op2 */ n2 = regs->GR(r2) & 0xFFFFFFFFFFFFFFFCULL & ADDRESS_MAXWRAP(regs); abs2 = LOGICAL_TO_ABS (n2, r2, regs, ACCTYPE_WRITE, regs->psw.pkey); + old = CSWAP32 (regs->GR_L(r1)); + /* Obtain main-storage access lock */ OBTAIN_MAINLOCK(regs); /* Attempt to exchange the values */ - regs->psw.cc = cmpxchg4 (®s->GR_L(r1), regs->GR_L(r1+1), regs->mainstor + abs2); + regs->psw.cc = cmpxchg4 (&old, CSWAP32(regs->GR_L(r1+1)), regs->mainstor + abs2); /* Release main-storage access lock */ RELEASE_MAINLOCK(regs); @@ -721,6 +724,7 @@ RADR abs2; /* absolute address of op2 */ else { /* Otherwise yield */ + regs->GR_L(r1) = CSWAP32(old); if (sysblk.numcpu > 1) sched_yield(); } @@ -743,6 +747,13 @@ VADR effective_addr2; /* Effective address */ RS(inst, execflag, regs, r1, r3, b2, effective_addr2); +#if defined(FEATURE_ECPSVM) + if(ecpsvm_dodiag(regs,r1,r3,b2,effective_addr2)==0) + { + return; + } +#endif + #ifdef FEATURE_HERCULES_DIAGCALLS if ( #if defined(_FEATURE_SIE) @@ -756,7 +767,7 @@ VADR effective_addr2; /* Effective address */ SIE_INTERCEPT(regs); /* Process diagnose instruction */ - ARCH_DEP(diagnose_call) (effective_addr2, r1, r3, regs); + ARCH_DEP(diagnose_call) (effective_addr2, b2, r1, r3, regs); /* Perform serialization and checkpoint-synchronization */ PERFORM_SERIALIZATION (regs); @@ -847,7 +858,10 @@ VADR lsea; /* Linkage stack entry addr */ /* Load registers from the stack entry */ ARCH_DEP(unstack_registers) (0, lsea, r1, r2, regs); - INVALIDATE_AEA_ALL(regs); + if (r1 == r2) + INVALIDATE_AEA_AR(r1, regs); + else + INVALIDATE_AEA_ARALL(regs); } #endif /*defined(FEATURE_LINKAGE_STACK)*/ @@ -1045,7 +1059,7 @@ BYTE storkey; /* Convert real address to absolute address */ rcpa = APPLY_PREFIXING (rcpa, regs->hostregs->PX); - /* The reference and change byte is located directly + /* The reference and change byte is located directly beyond the page table and is located at offset 1 in the entry. S/370 mode cannot be emulated in ESAME mode, so no provision is made for ESAME mode tables */ @@ -1056,7 +1070,7 @@ BYTE storkey; { /* Obtain address of the RCP area from the state desc */ rcpa = regs->sie_rcpo &= 0x7FFFF000; - + /* frame index as byte offset to 4K keys in RCP area */ rcpa += n >> 12; @@ -1190,7 +1204,7 @@ BYTE storkey; stid; RADR rcpa; BYTE rcpkey; - + #if defined(_FEATURE_STORAGE_KEY_ASSIST) if((regs->siebk->rcpo[0] & SIE_RCPO0_SKA) #if defined(_FEATURE_ZSIE) @@ -1207,7 +1221,7 @@ BYTE storkey; /* Convert real address to absolute address */ rcpa = APPLY_PREFIXING (rcpa, regs->hostregs->PX); - /* For ESA/390 the RCP byte entry is at offset 1 in a + /* For ESA/390 the RCP byte entry is at offset 1 in a four byte entry directly beyond the page table, for ESAME mode, this entry is eight bytes long */ rcpa += regs->hostregs->arch_mode == ARCH_900 ? 2049 : 1025; @@ -1336,7 +1350,7 @@ int sr; /* SIE_TRANSLATE_ADDR rc */ #if defined(_FEATURE_STORAGE_KEY_ASSIST) /* When running under SIE, and the guest absolute address - is paged out, then obtain the storage key from the + is paged out, then obtain the storage key from the SPGTE rather then causing a host page fault. */ if(regs->sie_state && !regs->sie_pref @@ -1355,10 +1369,10 @@ int sr; /* SIE_TRANSLATE_ADDR rc */ if(sr != 0 && sr != 2) ARCH_DEP(program_interrupt) (regs->hostregs, xcode); - + if(sr == 2) { - /* For ESA/390 the RCP byte entry is at offset 0 in a + /* For ESA/390 the RCP byte entry is at offset 0 in a four byte entry directly beyond the page table, for ESAME mode, this entry is eight bytes long */ n += regs->hostregs->arch_mode == ARCH_900 ? 2048 : 1024; @@ -1639,8 +1653,15 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ int i, d; /* Integer work areas */ BYTE rwork[64]; /* Register work areas */ +int inval = 0; /* Invalidation flag */ RS(inst, execflag, regs, r1, r3, b2, effective_addr2); +#if defined(FEATURE_ECPSVM) + if(ecpsvm_dolctl(regs,r1,r3,b2,effective_addr2)==0) + { + return; + } +#endif PRIV_CHECK(regs); @@ -1668,13 +1689,40 @@ BYTE rwork[64]; /* Register work areas */ /* Fetch new control register contents from operand address */ ARCH_DEP(vfetchc) ( rwork, d-1, effective_addr2, b2, regs ); - INVALIDATE_AIA(regs); - - INVALIDATE_AEA_ALL(regs); - /* Load control registers from work area */ for ( i = r1, d = 0; ; ) { + /* Check for invalidation */ + if (!inval) { + switch (i) { + case 0: + if ((fetch_fw(rwork + d) & CR0_TRAN_FMT) != (regs->CR_L(0) & CR0_TRAN_FMT)) + inval = 1; + break; + case 1: + case 2: + case 3: + case 4: + case 5: + case 7: + case 13: + if (fetch_fw(rwork + d) != regs->CR_L(i)) + inval = 1; + break; + case 8: + if ((fetch_fw(rwork + d) & CR8_EAX) != (regs->CR_L(8) & CR8_EAX)) + inval = 1; + break; + case 14: + if ((fetch_fw(rwork + d) & (CR14_ASN_TRAN|CR14_AFTO)) + != (regs->CR_L(14) & (CR14_ASN_TRAN|CR14_AFTO))) + inval = 1; + break; + default: + break; + } + } + /* Load control register bits 32-63 from work area */ FETCH_FW(regs->CR_L(i), rwork + d); d += 4; @@ -1685,6 +1733,13 @@ BYTE rwork[64]; /* Register work areas */ i++; i &= 15; } + /* Conditionally invalidate the AIA and AEA buffers */ + if (inval) + { + INVALIDATE_AIA(regs); + INVALIDATE_AEA_ALL(regs); + } + SET_IC_EXTERNAL_MASK(regs); SET_IC_MCK_MASK(regs); SET_IC_PER_MASK(regs); @@ -1709,6 +1764,13 @@ int amode64; #endif /*defined(FEATURE_ESAME)*/ S(inst, execflag, regs, b2, effective_addr2); +#if defined(FEATURE_ECPSVM) + if(ecpsvm_dolpsw(regs,b2,effective_addr2)==0) + { + return; + } +#endif + PRIV_CHECK(regs); @@ -1727,18 +1789,27 @@ int amode64; STORE_DW ( dword, ARCH_DEP(vfetch8) ( effective_addr2, b2, regs ) ); /* Load updated PSW (ESA/390 Format in ESAME mode) */ - obtain_lock(&sysblk.intlock); #if defined(FEATURE_ESAME) /* save amode64 flag */ amode64 = dword[3] & 0x01; /* make psw valid for esa390 mode */ dword[3] &= ~0x01; rc = s390_load_psw ( regs, dword ); - if (rc) regs->psw.notesame = 0; + /* Set the notesame bit to zero as it has been set, + and set the amode64 bit according to byte 3 */ + regs->psw.notesame = regs->psw.notesame ? 0 : 1; + regs->psw.amode64 = amode64; + /* s390_load_psw will not have set the AMASK correctly for amode64 */ + if(amode64) + { + regs->psw.AMASK = AMASK64; + /* amode31 bit must be set when amode64 is set */ + if(!regs->psw.amode) + rc = PGM_SPECIFICATION_EXCEPTION; + } #else /*!defined(FEATURE_ESAME)*/ rc = ARCH_DEP(load_psw) ( regs, dword ); #endif /*!defined(FEATURE_ESAME)*/ - release_lock(&sysblk.intlock); if (rc) { ARCH_DEP(program_interrupt) (regs, rc); @@ -1749,11 +1820,8 @@ int amode64; regs->psw.ilc = 4; #if defined(FEATURE_ESAME) - /* Set the notesame bit to zero as it has been set, - and clear the high word of the instruction address, + /* Clear the high word of the instruction address, as it has not been touched by s390_load_psw */ - regs->psw.notesame = 0; - regs->psw.amode64 = amode64; regs->psw.IA_H = 0; #endif /*defined(FEATURE_ESAME)*/ @@ -1774,6 +1842,20 @@ DEF_INST(load_real_address) int r1; /* Register number */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ + + RX(inst, execflag, regs, r1, b2, effective_addr2); + + ARCH_DEP(load_real_address_proc) (regs, r1, b2, effective_addr2); + +} /* end DEF_INST(load_real_address) */ + + +/*-------------------------------------------------------------------*/ +/* Common processing routine for the LRA and LRAY instructions */ +/*-------------------------------------------------------------------*/ +void ARCH_DEP(load_real_address_proc) (REGS *regs, + int r1, int b2, VADR effective_addr2) +{ U16 xcode; /* Exception code */ int private; /* 1=Private address space */ int protect; /* 1=ALE or page protection */ @@ -1781,8 +1863,6 @@ int stid; /* Segment table indication */ int cc; /* Condition code */ RADR n; /* 32-bit operand values */ - RX(inst, execflag, regs, r1, b2, effective_addr2); - SIE_MODE_XC_OPEX(regs); PRIV_CHECK(regs); @@ -1839,7 +1919,7 @@ RADR n; /* 32-bit operand values */ regs->psw.cc = cc; -} /* end DEF_INST(load_real_address) */ +} /* end ARCH_DEP(load_real_address_proc) */ /*-------------------------------------------------------------------*/ @@ -2726,7 +2806,7 @@ CREG newcr12 = 0; /* CR12 upon completion */ #endif /*FEATURE_TRACING*/ #if defined(FEATURE_PER) - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(regs->psw.IA,regs->CR(10),regs->CR(11)) ) @@ -2741,7 +2821,7 @@ CREG newcr12 = 0; /* CR12 upon completion */ /* [6.5.2.34] Set the translation exception address equal to the old primary ASN, with the high-order bit set if the old primary space-switch-event control bit is one */ - regs->TEA = oldpasn; + regs->TEA = oldpasn; if (oldpstd & SSEVENT_BIT) regs->TEA |= TEA_SSEVENT; @@ -2942,7 +3022,7 @@ int rc; /* return code from load_psw */ regs->perc = newregs.perc; } - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(regs->psw.IA,regs->CR(10),regs->CR(11)) ) @@ -3184,7 +3264,7 @@ CREG newcr12 = 0; /* CR12 upon completion */ #endif /*FEATURE_TRACING*/ #if defined(FEATURE_PER) - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(ia,regs->CR(10),regs->CR(11)) ) @@ -3376,7 +3456,7 @@ BYTE storkey; /* Storage key */ /* Convert real address to absolute address */ rcpa = APPLY_PREFIXING (rcpa, regs->hostregs->PX); - /* The reference and change byte is located directly + /* The reference and change byte is located directly beyond the page table and is located at offset 1 in the entry. S/370 mode cannot be emulated in ESAME mode, so no provision is made for ESAME mode tables */ @@ -3387,7 +3467,7 @@ BYTE storkey; /* Storage key */ { /* Obtain address of the RCP area from the state desc */ rcpa = regs->sie_rcpo &= 0x7FFFF000; - + /* frame index as byte offset to 4K keys in RCP area */ rcpa += n >> 12; @@ -3561,7 +3641,7 @@ BYTE storkey; /* Storage key */ /* Convert real address to absolute address */ rcpa = APPLY_PREFIXING (rcpa, regs->hostregs->PX); - /* For ESA/390 the RCP byte entry is at offset 1 in a + /* For ESA/390 the RCP byte entry is at offset 1 in a four byte entry directly beyond the page table, for ESAME mode, this entry is eight bytes long */ rcpa += regs->hostregs->arch_mode == ARCH_900 ? 2049 : 1025; @@ -3687,8 +3767,6 @@ int ssevent = 0; /* 1=space switch event */ S(inst, execflag, regs, b2, effective_addr2); - INVALIDATE_AEA_ALL(regs); - if(inst[1] == 0x19) { /* Perform serialization and checkpoint-synchronization */ @@ -3737,7 +3815,17 @@ int ssevent = 0; /* 1=space switch event */ regs->psw.space = mode & 1; regs->psw.armode = mode >> 1; - INVALIDATE_AIA(regs); + /* Invalidate if space mode changed */ + if (mode != oldmode) + { + if ( (mode & 1) || (oldmode & 1) ) + { + INVALIDATE_AIA(regs); + INVALIDATE_AEA_ALL(regs); + } + else + SET_AENOARN(regs); + } /* If switching into or out of home-space mode, and also: primary space-switch-event control bit is set; or @@ -4010,8 +4098,6 @@ int n; /* Storage key workarea */ INVALIDATE_AIA(regs); - INVALIDATE_AEA_ALL(regs); - /* Set PSW key */ regs->psw.pkey = n; @@ -4158,6 +4244,10 @@ RADR n; /* Absolute storage addr */ #if defined(_FEATURE_SIE) if(regs->sie_state) { + /* Perform aia and aea invalidation */ + INVALIDATE_AIA(regs); + INVALIDATE_AEA_ALL(regs); + if(regs->siebk->ic[2] & SIE_IC2_SSKE) longjmp(regs->progjmp, SIE_INTERCEPT_INST); @@ -4191,7 +4281,7 @@ RADR n; /* Absolute storage addr */ /* Convert real address to absolute address */ rcpa = APPLY_PREFIXING (rcpa, regs->hostregs->PX); - /* The reference and change byte is located directly + /* The reference and change byte is located directly beyond the page table and is located at offset 1 in the entry. S/370 mode cannot be emulated in ESAME mode, so no provision is made for ESAME mode tables */ @@ -4231,7 +4321,7 @@ RADR n; /* Absolute storage addr */ { /* host real to host absolute */ n = APPLY_PREFIXING(n, regs->hostregs->PX); - + realkey = #if !defined(_FEATURE_2K_STORAGE_KEYS) STORAGE_KEY(n, regs) @@ -4301,6 +4391,9 @@ RADR n; /* Absolute storage addr */ STORAGE_KEY2(n, regs) &= STORKEY_BADFRM; STORAGE_KEY2(n, regs) |= regs->GR_LHLCL(r1) & ~(STORKEY_BADFRM); #endif + /* Perform aia and aea invalidation */ + INVALIDATE_AIA_ABS(n, regs); + INVALIDATE_AEA_ABS(n, regs); } // /*debug*/logmsg("SSK storage block %8.8X key %2.2X\n", @@ -4323,10 +4416,6 @@ RADR n; /* Abs frame addr stor key */ PRIV_CHECK(regs); - INVALIDATE_AIA(regs); - - INVALIDATE_AEA_ALL(regs); - /* Load 4K block address from R2 register */ n = regs->GR(r2) & ADDRESS_MAXWRAP_E(regs); @@ -4344,6 +4433,9 @@ RADR n; /* Abs frame addr stor key */ #if defined(_FEATURE_SIE) if(regs->sie_state) { + INVALIDATE_AIA(regs); + INVALIDATE_AEA_ALL(regs); + if(regs->siebk->ic[2] & SIE_IC2_SSKE) longjmp(regs->progjmp, SIE_INTERCEPT_INST); @@ -4384,7 +4476,7 @@ RADR n; /* Abs frame addr stor key */ /* Convert real address to absolute address */ rcpa = APPLY_PREFIXING (rcpa, regs->hostregs->PX); - /* For ESA/390 the RCP byte entry is at offset 1 in a + /* For ESA/390 the RCP byte entry is at offset 1 in a four byte entry directly beyond the page table, for ESAME mode, this entry is eight bytes long */ rcpa += regs->hostregs->arch_mode == ARCH_900 ? 2049 : 1025; @@ -4423,7 +4515,7 @@ RADR n; /* Abs frame addr stor key */ #endif /*defined(_FEATURE_STORAGE_KEY_ASSIST)*/ ) longjmp(regs->progjmp, SIE_INTERCEPT_INST); - + #if defined(_FEATURE_STORAGE_KEY_ASSIST) if(sr) realkey = 0; @@ -4432,7 +4524,7 @@ RADR n; /* Abs frame addr stor key */ { /* host real to host absolute */ n = APPLY_PREFIXING(n, regs->hostregs->PX); - + realkey = #if !defined(_FEATURE_2K_STORAGE_KEYS) STORAGE_KEY(n, regs) @@ -4506,6 +4598,9 @@ RADR n; /* Abs frame addr stor key */ STORAGE_KEY2(n, regs) &= STORKEY_BADFRM; STORAGE_KEY2(n, regs) |= regs->GR_LHLCL(r1) & ~(STORKEY_BADFRM); #endif + /* Perform aia and aea invalidation */ + INVALIDATE_AIA_ABS(n, regs); + INVALIDATE_AEA_ABS(n, regs); } /* Perform serialization and checkpoint-synchronization */ @@ -4523,21 +4618,29 @@ DEF_INST(set_system_mask) { int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ -#if defined(OPTION_REDUCED_INVAL) int realmode; int space; int armode; -#endif S(inst, execflag, regs, b2, effective_addr2); + /* + * ECPS:VM - Before checking for prob/priv + * Check CR6 to see if S-ASSIST is requested + * + * If we can process it, then do it + */ +#if defined(FEATURE_ECPSVM) + if(ecpsvm_dossm(regs,b2,effective_addr2)==0) + { + return; + } +#endif PRIV_CHECK(regs); -#if defined(OPTION_REDUCED_INVAL) realmode = REAL_MODE(®s->psw); armode = (regs->psw.armode == 1); space = (regs->psw.space == 1); -#endif /* Special operation exception if SSM-suppression is active */ if ( (regs->CR(0) & CR0_SSM_SUPP) @@ -4570,7 +4673,10 @@ int armode; regs->psw.ecmode && #endif /*defined(FEATURE_BCMODE)*/ (regs->psw.sysmask & 0xB8) != 0) + { + logmsg("SSM Specification\n"); ARCH_DEP(program_interrupt) (regs, PGM_SPECIFICATION_EXCEPTION); + } SET_IC_EXTERNAL_MASK(regs); SET_IC_MCK_MASK(regs); @@ -4578,7 +4684,6 @@ int armode; SET_IC_PER_MASK(regs); INVALIDATE_AIA(regs); -#if defined(OPTION_REDUCED_INVAL) if ((realmode != REAL_MODE(®s->psw)) || (armode != (regs->psw.armode == 1)) || (space != (regs->psw.space == 1)) @@ -4587,9 +4692,6 @@ int armode; #endif /*defined(FEATURE_PER)*/ ) INVALIDATE_AEA_ALL(regs); -#else - INVALIDATE_AEA_ALL(regs); -#endif RETURN_INTCHECK(regs); @@ -5168,6 +5270,12 @@ int i, d; /* Integer work areas */ BYTE rwork[64]; /* Register work areas */ RS(inst, execflag, regs, r1, r3, b2, effective_addr2); +#if defined(FEATURE_ECPSVM) + if(ecpsvm_dostctl(regs,r1,r3,b2,effective_addr2)==0) + { + return; + } +#endif PRIV_CHECK(regs); @@ -5502,47 +5610,43 @@ DEF_INST(store_then_and_system_mask) BYTE i2; /* Immediate byte of opcode */ int b1; /* Base of effective addr */ VADR effective_addr1; /* Effective address */ -#if defined(OPTION_REDUCED_INVAL) int realmode; -int space; -int armode; -#endif +int permode; SI(inst, execflag, regs, i2, b1, effective_addr1); +#ifdef FEATURE_ECPSVM + if(ecpsvm_dostnsm(regs,b1,effective_addr1,i2)==0) + { + return; + } +#endif PRIV_CHECK(regs); -#if defined(OPTION_REDUCED_INVAL) - realmode = REAL_MODE(®s->psw); - armode = (regs->psw.armode == 1); - space = (regs->psw.space == 1); -#endif - #if defined(_FEATURE_SIE) if(regs->sie_state && (regs->siebk->ic[1] & SIE_IC1_STNSM)) longjmp(regs->progjmp, SIE_INTERCEPT_INST); #endif /*defined(_FEATURE_SIE)*/ + realmode = REAL_MODE(®s->psw); + permode = PER_MODE(regs); + /* Store current system mask value into storage operand */ ARCH_DEP(vstoreb) ( regs->psw.sysmask, effective_addr1, b1, regs ); - INVALIDATE_AIA(regs); -#if !defined(OPTION_REDUCED_INVAL) - INVALIDATE_AEA_ALL(regs); -#endif - /* AND system mask with immediate operand */ regs->psw.sysmask &= i2; -#if defined(OPTION_REDUCED_INVAL) - if ((realmode != REAL_MODE(®s->psw)) || - (armode != (regs->psw.armode == 1)) || - (space != (regs->psw.space == 1))) + /* Check for invalidation */ + if (realmode != REAL_MODE(®s->psw) + || permode != PER_MODE(regs)) + { + INVALIDATE_AIA(regs); INVALIDATE_AEA_ALL(regs); -#endif + } SET_IC_EXTERNAL_MASK(regs); - SET_IC_MCK_MASK(regs); +// SET_IC_MCK_MASK(regs); machine check is bit 13 SET_IC_IO_MASK(regs); SET_IC_PER_MASK(regs); @@ -5559,9 +5663,18 @@ DEF_INST(store_then_or_system_mask) BYTE i2; /* Immediate byte of opcode */ int b1; /* Base of effective addr */ VADR effective_addr1; /* Effective address */ +int realmode; +int permode; SI(inst, execflag, regs, i2, b1, effective_addr1); +#ifdef FEATURE_ECPSVM + if(ecpsvm_dostosm(regs,b1,effective_addr1,i2)==0) + { + return; + } +#endif + PRIV_CHECK(regs); #if defined(_FEATURE_SIE) @@ -5569,6 +5682,9 @@ VADR effective_addr1; /* Effective address */ longjmp(regs->progjmp, SIE_INTERCEPT_INST); #endif /*defined(_FEATURE_SIE)*/ + realmode = REAL_MODE(®s->psw); + permode = PER_MODE(regs); + /* Store current system mask value into storage operand */ ARCH_DEP(vstoreb) ( regs->psw.sysmask, effective_addr1, b1, regs ); @@ -5591,14 +5707,19 @@ VADR effective_addr1; /* Effective address */ (regs->psw.sysmask & 0xB8) != 0) ARCH_DEP(program_interrupt) (regs, PGM_SPECIFICATION_EXCEPTION); + /* Check for invalidation */ + if (realmode != REAL_MODE(®s->psw) + || permode != PER_MODE(regs)) + { + INVALIDATE_AIA(regs); + INVALIDATE_AEA_ALL(regs); + } + SET_IC_EXTERNAL_MASK(regs); - SET_IC_MCK_MASK(regs); +// SET_IC_MCK_MASK(regs); machine check is bit 13 SET_IC_IO_MASK(regs); SET_IC_PER_MASK(regs); - INVALIDATE_AIA(regs); - INVALIDATE_AEA_ALL(regs); - RETURN_INTCHECK(regs); } diff --git a/cpu.c b/cpu.c index 53bf50a..a795653 100644 --- a/cpu.c +++ b/cpu.c @@ -81,20 +81,11 @@ void ARCH_DEP(store_psw) (REGS *regs, BYTE *addr) /*-------------------------------------------------------------------*/ int ARCH_DEP(load_psw) (REGS *regs, BYTE *addr) { -#if defined(OPTION_REDUCED_INVAL) int realmode; int space; -int armode; -#endif - INVALIDATE_AIA(regs); -#if defined(OPTION_REDUCED_INVAL) realmode = REAL_MODE(®s->psw); - armode = (regs->psw.armode == 1); space = (regs->psw.space == 1); -#else - INVALIDATE_AEA_ALL(regs); -#endif regs->psw.sysmask = addr[0]; regs->psw.pkey = addr[1] & 0xF0; @@ -105,7 +96,7 @@ int armode; SET_IC_EXTERNAL_MASK(regs); SET_IC_MCK_MASK(regs); - SET_IC_PSW_WAIT(regs); + SET_IC_PSW_WAIT_MASK(regs); SET_IC_PER_MASK(regs); regs->psw.zerobyte = addr[3]; @@ -130,16 +121,16 @@ int armode; regs->psw.amode = (addr[4] & 0x80) >> 7; regs->psw.AMASK = regs->psw.amode ? AMASK31 : AMASK24; -#if defined(OPTION_REDUCED_INVAL) + INVALIDATE_AIA(regs); if ((realmode != REAL_MODE(®s->psw)) || - (armode != (regs->psw.armode == 1)) || (space != (regs->psw.space == 1)) #if defined (FEATURE_PER) || PER_MODE(regs) #endif /* defined (FEATURE_PER) */ ) INVALIDATE_AEA_ALL(regs); -#endif + SET_AENOARN(regs); + #if defined(FEATURE_ESAME) FETCH_DW(regs->psw.IA, addr + 8); regs->psw.amode64 = (addr[3] & 0x01); @@ -231,12 +222,13 @@ int armode; regs->psw.sgmask = addr[4] & 0x01; regs->psw.amode = 0; regs->psw.AMASK = AMASK24; -#if defined(OPTION_REDUCED_INVAL) + + INVALIDATE_AIA(regs); if ((realmode != REAL_MODE(®s->psw)) || - (armode != (regs->psw.armode == 1)) || (space != (regs->psw.space == 1))) INVALIDATE_AEA_ALL(regs); -#endif + SET_AENOARN(regs); + FETCH_FW(regs->psw.IA, addr + 4); regs->psw.IA &= 0x00FFFFFF; } @@ -358,7 +350,6 @@ static char *pgmintname[] = { realregs = sysblk.regs + regs->cpuad; #endif /*!defined(_FEATURE_SIE)*/ -#if MAX_CPU_ENGINES > 1 /* Unlock the main storage lock if held */ if (realregs->mainlock) RELEASE_MAINLOCK(realregs); @@ -366,7 +357,6 @@ static char *pgmintname[] = { if(realregs->sie_active && realregs->guestregs->mainlock) RELEASE_MAINLOCK(realregs->guestregs); #endif /*defined(FEATURE_INTERPRETIVE_EXECUTION)*/ -#endif /*MAX_CPU_ENGINES > 1*/ /* Remove PER indication from program interrupt code such that interrupt code specific tests may be done. @@ -468,6 +458,9 @@ static char *pgmintname[] = { /* Store the interrupt code in the PSW */ realregs->psw.intcode = pcode; + /* Call debugger if active */ + HDC(debug_program_interrupt, regs, pcode); + /* Trace program checks other then PER event */ if(code && (sysblk.insttrace || sysblk.inststep || sysblk.pgminttr & ((U64)1 << ((code - 1) & 0x3F)))) @@ -1003,7 +996,6 @@ static void (* run_cpu[GEN_MAXARCH]) (REGS *regs) = void *cpu_thread (REGS *regs) { -#ifndef WIN32 /* Set root mode in order to set priority */ SETMODE(ROOT); @@ -1021,7 +1013,6 @@ void *cpu_thread (REGS *regs) "priority=%d\n"), regs->cpuad, thread_id(), getpid(), getpriority(PRIO_PROCESS,0)); -#endif logmsg (_("HHCCP003I CPU%4.4X architecture mode %s\n"), regs->cpuad,get_arch_mode_string(regs)); @@ -1045,25 +1036,31 @@ void *cpu_thread (REGS *regs) return NULL; } + /* Increment number of CPUs online */ if(!sysblk.numcpu) { sysblk.numcpu++; /* Start the TOD clock and CPU timer thread */ if ( create_thread (&sysblk.todtid, &sysblk.detattr, - timer_update_thread, NULL) ) + timer_update_thread, NULL) ) { - logmsg (_("HHCCP006E Cannot create timer thread: %s\n"), - strerror(errno)); + logmsg (_("HHCCP006S Cannot create timer thread: %s\n"), + strerror(errno)); release_lock(&sysblk.intlock); return NULL; } } else + { sysblk.numcpu++; + } /* Perform initial cpu reset */ initial_cpu_reset (regs); + /* Signal cpu is started */ + signal_condition (®s->intcond); + /* release the intlock */ release_lock(&sysblk.intlock); @@ -1078,8 +1075,6 @@ void *cpu_thread (REGS *regs) regs->cpuad,get_arch_mode_string(regs)); } - initdone = 1; /* now safe for panel_display function to proceed */ - /* Execute the program in specified mode */ run_cpu[regs->arch_mode] (regs); @@ -1101,325 +1096,259 @@ void *cpu_thread (REGS *regs) #endif /*!defined(_GEN_ARCH)*/ +/*-------------------------------------------------------------------*/ +/* Process interrupt */ +/*-------------------------------------------------------------------*/ void ARCH_DEP(process_interrupt)(REGS *regs) { - if( OPEN_IC_DEBUG(regs) ) - { - U32 prevmask; - prevmask = regs->ints_mask; - SET_IC_EXTERNAL_MASK(regs); - SET_IC_IO_MASK(regs); - SET_IC_MCK_MASK(regs); - SET_IC_PER_MASK(regs); - if(prevmask != regs->ints_mask) - { - logmsg(_("HHCCP009E CPU MASK MISMATCH: %8.8X - %8.8X. " - "Last instruction:\n"), - prevmask, regs->ints_mask); - ARCH_DEP(display_inst) (regs, regs->ip); - } - } - - /* Process PER program interrupts */ - if( OPEN_IC_PERINT(regs) ) - ARCH_DEP(program_interrupt) (regs, PGM_PER_EVENT); - - /* Obtain the interrupt lock */ - obtain_lock (&sysblk.intlock); + if( OPEN_IC_DEBUG(regs) ) + { + U32 prevmask = regs->ints_mask; + SET_IC_EXTERNAL_MASK(regs); + SET_IC_IO_MASK(regs); + SET_IC_MCK_MASK(regs); + SET_IC_PER_MASK(regs); + if(prevmask != regs->ints_mask) + { + logmsg(_("HHCCP009E CPU MASK MISMATCH: %8.8X - %8.8X. " + "Last instruction:\n"), prevmask, regs->ints_mask); + ARCH_DEP(display_inst) (regs, regs->ip); + } + } -#if MAX_CPU_ENGINES > 1 - /* Perform broadcasted purge of ALB and TLB if requested - synchronize_broadcast() must be called until there are - no more broadcast pending because synchronize_broadcast() - releases and reacquires the mainlock. */ - while (IS_IC_BROADCAST(regs)) - ARCH_DEP(synchronize_broadcast)(regs, 0, 0); -#endif /*MAX_CPU_ENGINES > 1*/ - - /* Take interrupts if CPU is not stopped */ - if (regs->cpustate == CPUSTATE_STARTED) - { + /* Process PER program interrupts */ + if( OPEN_IC_PERINT(regs) ) + ARCH_DEP(program_interrupt) (regs, PGM_PER_EVENT); - /* If a machine check is pending and we are enabled for - machine checks then take the interrupt */ - if (OPEN_IC_MCKPENDING(regs)) - { - PERFORM_SERIALIZATION (regs); - PERFORM_CHKPT_SYNC (regs); - ARCH_DEP (perform_mck_interrupt) (regs); - } - - /* If enabled for external interrupts, invite the - service processor to present a pending interrupt */ - if ( OPEN_IC_EXTPENDING(regs) ) - { - PERFORM_SERIALIZATION (regs); - PERFORM_CHKPT_SYNC (regs); - ARCH_DEP (perform_external_interrupt) (regs); - } - - /* If an I/O interrupt is pending, and this CPU is - enabled for I/O interrupts, invite the channel - subsystem to present a pending interrupt */ - if( OPEN_IC_IOPENDING(regs) ) - { - PERFORM_SERIALIZATION (regs); - PERFORM_CHKPT_SYNC (regs); - ARCH_DEP (perform_io_interrupt) (regs); - } -#if MAX_CPU_ENGINES > 1 - else if (IS_IC_IOPENDING) - WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); -#endif + /* Obtain the interrupt lock */ + obtain_lock (&sysblk.intlock); - } /*if(cpustate == CPU_STARTED)*/ + /* Perform broadcasted purge of ALB and TLB if requested + synchronize_broadcast() must be called until there are + no more broadcast pending because synchronize_broadcast() + releases and reacquires the mainlock. */ + while (IS_IC_BROADCAST(regs)) + ARCH_DEP(synchronize_broadcast)(regs, 0, 0); - /* If CPU is stopping, change status to stopped */ - if (regs->cpustate == CPUSTATE_STOPPING) - { - /* Change CPU status to stopped */ - regs->cpustate = CPUSTATE_STOPPED; - sysblk.started_mask &= ~regs->cpumask; + /* Take interrupts if CPU is not stopped */ + if (regs->cpustate == CPUSTATE_STARTED) + { + /* If a machine check is pending and we are enabled for + machine checks then take the interrupt */ + if ( OPEN_IC_MCKPENDING(regs) ) + { + PERFORM_SERIALIZATION (regs); + PERFORM_CHKPT_SYNC (regs); + ARCH_DEP (perform_mck_interrupt) (regs); + } - if (!regs->cpuonline) - { - /* Remove this CPU from the configuration. Only do this - when no synchronization is in progress as the - synchronization process relies on the number of CPU's - in the configuration to accurate. The first thing - we do during interrupt processing is synchronize - the broadcast functions so we are safe to manipulate - the number of CPU's in the configuration. */ + /* If enabled for external interrupts, invite the + service processor to present a pending interrupt */ + if ( OPEN_IC_EXTPENDING(regs) ) + { + PERFORM_SERIALIZATION (regs); + PERFORM_CHKPT_SYNC (regs); + ARCH_DEP (perform_external_interrupt) (regs); + } - sysblk.numcpu--; + /* If an I/O interrupt is pending, and this CPU is + enabled for I/O interrupts, invite the channel + subsystem to present a pending interrupt */ + if ( OPEN_IC_IOPENDING(regs) ) + { + PERFORM_SERIALIZATION (regs); + PERFORM_CHKPT_SYNC (regs); + ARCH_DEP (perform_io_interrupt) (regs); + } + else if (IS_IC_IOPENDING) + WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); + + } /*if(cpustate == CPU_STARTED)*/ + + /* If CPU is stopping, change status to stopped */ + if (regs->cpustate == CPUSTATE_STOPPING) + { + /* Change CPU status to stopped */ + regs->cpustate = CPUSTATE_STOPPED; + sysblk.started_mask &= ~regs->cpumask; + + if (!regs->cpuonline) + { + /* Remove this CPU from the configuration */ + sysblk.numcpu--; #ifdef FEATURE_VECTOR_FACILITY - /* Mark Vector Facility offline */ - regs->vf->online = 0; + /* Mark Vector Facility offline */ + regs->vf->online = 0; #endif /*FEATURE_VECTOR_FACILITY*/ - release_lock(&sysblk.intlock); + release_lock(&sysblk.intlock); - /* Thread exit */ - return; - } + /* Thread exit */ + return; + } - /* If initial CPU reset pending then perform reset */ - if (regs->sigpireset) - { - PERFORM_SERIALIZATION (regs); - PERFORM_CHKPT_SYNC (regs); - ARCH_DEP (initial_cpu_reset) (regs); -#ifdef OPTION_CPU_UNROLL - release_lock(&sysblk.intlock); - longjmp(regs->progjmp, SIE_NO_INTERCEPT); -#endif - } + /* If initial CPU reset pending then perform reset */ + if (regs->sigpireset) + { + PERFORM_SERIALIZATION (regs); + PERFORM_CHKPT_SYNC (regs); + ARCH_DEP (initial_cpu_reset) (regs); + release_lock(&sysblk.intlock); + longjmp(regs->progjmp, SIE_NO_INTERCEPT); + } - /* If a CPU reset is pending then perform the reset */ - if (regs->sigpreset) - { - PERFORM_SERIALIZATION (regs); - PERFORM_CHKPT_SYNC (regs); - ARCH_DEP(cpu_reset) (regs); -#ifdef OPTION_CPU_UNROLL - release_lock(&sysblk.intlock); - longjmp(regs->progjmp, SIE_NO_INTERCEPT); -#endif - } + /* If a CPU reset is pending then perform the reset */ + if (regs->sigpreset) + { + PERFORM_SERIALIZATION (regs); + PERFORM_CHKPT_SYNC (regs); + ARCH_DEP(cpu_reset) (regs); + release_lock(&sysblk.intlock); + longjmp(regs->progjmp, SIE_NO_INTERCEPT); + } - /* Store status at absolute location 0 if requested */ - if (IS_IC_STORSTAT(regs)) - { - OFF_IC_STORSTAT(regs); - ARCH_DEP(store_status) (regs, 0); - logmsg (_("HHCCP010I CPU%4.4X store status completed.\n"), - regs->cpuad); - -#ifdef OPTION_CPU_UNROLL - release_lock(&sysblk.intlock); - longjmp(regs->progjmp, SIE_NO_INTERCEPT); -#endif - } - } /* end if(cpustate == STOPPING) */ + /* Store status at absolute location 0 if requested */ + if (IS_IC_STORSTAT(regs)) + { + OFF_IC_STORSTAT(regs); + ARCH_DEP(store_status) (regs, 0); + logmsg (_("HHCCP010I CPU%4.4X store status completed.\n"), + regs->cpuad); + release_lock(&sysblk.intlock); + longjmp(regs->progjmp, SIE_NO_INTERCEPT); + } + } /* end if(cpustate == STOPPING) */ - /* Perform restart interrupt if pending */ - if (IS_IC_RESTART(regs)) - { - PERFORM_SERIALIZATION (regs); - PERFORM_CHKPT_SYNC (regs); - OFF_IC_RESTART(regs); - sysblk.started_mask |= regs->cpumask; - ARCH_DEP(restart_interrupt) (regs); - } /* end if(restart) */ - - /* This is where a stopped CPU will wait */ - if (regs->cpustate == CPUSTATE_STOPPED) - { + /* Perform restart interrupt if pending */ + if ( IS_IC_RESTART(regs) ) + { + PERFORM_SERIALIZATION (regs); + PERFORM_CHKPT_SYNC (regs); + OFF_IC_RESTART(regs); + sysblk.started_mask |= regs->cpumask; + ARCH_DEP(restart_interrupt) (regs); + } /* end if(restart) */ + + /* This is where a stopped CPU will wait */ + if (regs->cpustate == CPUSTATE_STOPPED) + { #ifdef OPTION_MIPS_COUNTING struct timeval tv; - gettimeofday (&tv, NULL); ADJUST_TOD (tv, regs->lasttod); regs->waittod = (U64)tv.tv_sec; regs->waittod = regs->waittod * 1000000 + tv.tv_usec; #endif - /* Wait until there is work to do */ - sysblk.waitmask |= regs->cpumask; - sysblk.started_mask &= ~regs->cpumask; -#ifdef EXTERNALGUI - if (extgui && regs == (sysblk.regs + sysblk.pcpu)) - logmsg("MAN=1\n"); -#endif /*EXTERNALGUI*/ - while (regs->cpustate == CPUSTATE_STOPPED) - { - wait_condition (&INTCOND, &sysblk.intlock); - } -#ifdef EXTERNALGUI - if (extgui && regs == (sysblk.regs + sysblk.pcpu)) - logmsg("MAN=0\n"); -#endif /*EXTERNALGUI*/ - sysblk.started_mask |= regs->cpumask; - sysblk.waitmask &= ~regs->cpumask; - /* Purge the lookaside buffers */ - ARCH_DEP(purge_tlb) (regs); + + /* Wait until there is work to do */ + sysblk.waitmask |= regs->cpumask; + sysblk.started_mask &= ~regs->cpumask; + + HDC(debug_cpu_state, regs); + + while (regs->cpustate == CPUSTATE_STOPPED) + { + wait_condition (®s->intcond, &sysblk.intlock); + } + + HDC(debug_cpu_state, regs); + + sysblk.started_mask |= regs->cpumask; + sysblk.waitmask &= ~regs->cpumask; + + /* Purge the lookaside buffers */ + ARCH_DEP(purge_tlb) (regs); #if defined(FEATURE_ACCESS_REGISTERS) - ARCH_DEP(purge_alb) (regs); + ARCH_DEP(purge_alb) (regs); #endif /*defined(FEATURE_ACCESS_REGISTERS)*/ - release_lock (&sysblk.intlock); - /* If the architecture mode has changed we must adapt */ - if(sysblk.arch_mode != regs->arch_mode) - longjmp(regs->archjmp,SIE_NO_INTERCEPT); - longjmp(regs->progjmp, SIE_NO_INTERCEPT); - } /* end if(cpustate == STOPPED) */ - - /* Test for wait state */ - if (regs->psw.wait) - { - /* Test for disabled wait PSW and issue message */ - if( IS_IC_DISABLED_WAIT_PSW(regs) ) - { - logmsg (_("HHCCP011I CPU%4.4X: Disabled wait state\n" - " "), - regs->cpuad); - display_psw (regs); - regs->cpustate = CPUSTATE_STOPPING; - ON_IC_CPU_NOT_STARTED(regs); - INVALIDATE_AIA(regs); - INVALIDATE_AEA_ALL(regs); - release_lock (&sysblk.intlock); - longjmp(regs->progjmp, SIE_NO_INTERCEPT); - } - - INVALIDATE_AIA(regs); - - INVALIDATE_AEA_ALL(regs); - - /* Wait for I/O, external or restart interrupt */ - sysblk.waitmask |= regs->cpumask; - wait_condition (&INTCOND, &sysblk.intlock); - sysblk.waitmask &= ~regs->cpumask; - release_lock (&sysblk.intlock); - longjmp(regs->progjmp, SIE_NO_INTERCEPT); - } /* end if(wait) */ - - /* Release the interrupt lock */ + release_lock (&sysblk.intlock); + + /* If the architecture mode has changed we must adapt */ + if(sysblk.arch_mode != regs->arch_mode) + longjmp(regs->archjmp,SIE_NO_INTERCEPT); + longjmp(regs->progjmp, SIE_NO_INTERCEPT); + } /* end if(cpustate == STOPPED) */ + + /* Test for wait state */ + if (regs->psw.wait) + { + /* Test for disabled wait PSW and issue message */ + if( IS_IC_DISABLED_WAIT_PSW(regs) ) + { + logmsg (_("HHCCP011I CPU%4.4X: Disabled wait state\n" + " "), + regs->cpuad); + display_psw (regs); + regs->cpustate = CPUSTATE_STOPPING; + ON_IC_CPU_NOT_STARTED(regs); + INVALIDATE_AIA(regs); + INVALIDATE_AEA_ALL(regs); release_lock (&sysblk.intlock); -} + longjmp(regs->progjmp, SIE_NO_INTERCEPT); + } + + INVALIDATE_AIA(regs); + INVALIDATE_AEA_ALL(regs); + /* Wait for I/O, external or restart interrupt */ + sysblk.waitmask |= regs->cpumask; + wait_condition (®s->intcond, &sysblk.intlock); + sysblk.waitmask &= ~regs->cpumask; + release_lock (&sysblk.intlock); + longjmp(regs->progjmp, SIE_NO_INTERCEPT); + } /* end if(wait) */ + + /* Release the interrupt lock */ + release_lock (&sysblk.intlock); +} /* process_interrupt */ + +/*-------------------------------------------------------------------*/ +/* Process Trace */ +/*-------------------------------------------------------------------*/ void ARCH_DEP(process_trace)(REGS *regs, int tracethis, int stepthis) { int shouldbreak; /* 1=Stop at breakpoint */ + /* Test for breakpoint */ + shouldbreak = sysblk.instbreak + && (regs->psw.IA == sysblk.breakaddr); - /* Test for breakpoint */ - shouldbreak = sysblk.instbreak - && (regs->psw.IA == sysblk.breakaddr); - - /* Display the instruction */ - if (sysblk.insttrace || sysblk.inststep || shouldbreak - || tracethis || stepthis) - { - ARCH_DEP(display_inst) (regs, regs->ip); - if (sysblk.inststep || stepthis || shouldbreak) - { - /* Put CPU into stopped state */ - regs->cpustate = CPUSTATE_STOPPED; - ON_IC_CPU_NOT_STARTED(regs); + /* Display the instruction */ + if (sysblk.insttrace || sysblk.inststep || shouldbreak + || tracethis || stepthis) + { + ARCH_DEP(display_inst) (regs, regs->ip); + if (sysblk.inststep || stepthis || shouldbreak) + { + /* Put CPU into stopped state */ + regs->cpustate = CPUSTATE_STOPPED; + ON_IC_CPU_NOT_STARTED(regs); - /* Wait for start command from panel */ - obtain_lock (&sysblk.intlock); - sysblk.waitmask |= regs->cpumask; -#ifdef EXTERNALGUI - if (extgui && regs == (sysblk.regs + sysblk.pcpu)) - logmsg("MAN=1\n"); -#endif /*EXTERNALGUI*/ - while (regs->cpustate == CPUSTATE_STOPPED) - { - wait_condition (&INTCOND, &sysblk.intlock); - } -#ifdef EXTERNALGUI - if (extgui && regs == (sysblk.regs + sysblk.pcpu)) - logmsg("MAN=0\n"); -#endif /*EXTERNALGUI*/ - sysblk.waitmask &= ~regs->cpumask; - release_lock (&sysblk.intlock); - } - } -} + /* Wait for start command from panel */ + obtain_lock (&sysblk.intlock); + sysblk.waitmask |= regs->cpumask; + HDC(debug_cpu_state, regs); -#ifdef OPTION_FAST_INSTFETCH -#define FAST_INSTRUCTION_FETCH(_dest, _addr, _regs, _pe, _if) \ - { \ - if ( (_regs)->VI == ((_addr) & (PAGEFRAME_PAGEMASK | 0x01)) \ - && ((_addr) <= (_pe))) \ - (_dest) = pagestart + ((_addr) & PAGEFRAME_BYTEMASK); \ - else goto _if; \ -} + while (regs->cpustate == CPUSTATE_STOPPED) + { + wait_condition (®s->intcond, &sysblk.intlock); + } -#if !defined(OPTION_FOOTPRINT_BUFFER) -#define FAST_EXECUTE_INSTRUCTION(_inst, _execflag, _regs) \ - { \ - COUNT_INST ((_inst), (_regs)); \ - (_regs)->ip = (_inst); \ - (ARCH_DEP(opcode_table)[_inst[0]]) ((_inst), 0, (_regs)); \ -} -#else -#define FAST_EXECUTE_INSTRUCTION(_inst, _execflag, _regs) \ -do { \ - sysblk.footprregs[(_regs)->cpuad][sysblk.footprptr[(_regs)->cpuad]] = *(_regs); \ - memcpy(&sysblk.footprregs[(_regs)->cpuad][sysblk.footprptr[(_regs)->cpuad]++].inst,(_inst),6); \ - sysblk.footprptr[(_regs)->cpuad] &= OPTION_FOOTPRINT_BUFFER - 1; \ - COUNT_INST((_inst), (_regs)); \ - (_regs)->ip = (_inst); \ - opcode_table[((_inst)[0])][ARCH_MODE]((_inst), 0, (_regs)); \ -} while(0) + HDC(debug_cpu_state, regs); -#endif + sysblk.waitmask &= ~regs->cpumask; + release_lock (&sysblk.intlock); + } + } +} /* process_trace */ -#define FAST_IFETCH(_regs, _pe, _ip, _if, _ex) \ - { \ -_if: \ - (_regs)->instvalid = 0; \ - (_ip) = (_regs)->inst; \ - (_regs)->ip = (_ip); \ - ARCH_DEP(instfetch) ((_regs)->inst, (_regs)->psw.IA, (_regs)); \ - (regs)->instvalid = 1; \ - (_pe) = ((_regs)->psw.IA & ~0x7FF) + (0x800 - 6); \ - pagestart = (_regs)->mainstor + (_regs)->AI; \ - goto _ex; \ -} - -#define FAST_UNROLLED_EXECUTE(_regs, _pe, _ip, _if, _ex) \ - { \ - FAST_INSTRUCTION_FETCH((_ip), (_regs)->psw.IA, (_regs), \ - (_pe), _if); \ - _ex: \ - FAST_EXECUTE_INSTRUCTION((_ip), 0, (_regs)); \ -} +/*-------------------------------------------------------------------*/ +/* Run CPU */ +/*-------------------------------------------------------------------*/ void ARCH_DEP(run_cpu) (REGS *regs) { int tracethis; /* Trace this instruction */ @@ -1469,43 +1398,26 @@ BYTE *ip, *pagestart = NULL; { regs->ip = ip; ARCH_DEP(process_trace)(regs, tracethis, stepthis); - /* Reset instruction trace indicators */ tracethis = 0; stepthis = 0; -#ifdef OPTION_CPU_UNROLL regs->instcount++; FAST_EXECUTE_INSTRUCTION (ip, 0, regs); longjmp(regs->progjmp, SIE_NO_INTERCEPT); -#endif } /* Execute the instruction */ -#ifdef OPTION_CPU_UNROLL regs->instcount += 8; -#else - regs->instcount++; -#endif FAST_EXECUTE_INSTRUCTION (ip, 0, regs); -#ifdef OPTION_CPU_UNROLL - FAST_UNROLLED_EXECUTE(regs, pageend, ip, - ifetch1, exec1); - FAST_UNROLLED_EXECUTE(regs, pageend, ip, - ifetch2, exec2); - FAST_UNROLLED_EXECUTE(regs, pageend, ip, - ifetch3, exec3); - FAST_UNROLLED_EXECUTE(regs, pageend, ip, - ifetch4, exec4); - FAST_UNROLLED_EXECUTE(regs, pageend, ip, - ifetch5, exec5); - FAST_UNROLLED_EXECUTE(regs, pageend, ip, - ifetch6, exec6); - FAST_UNROLLED_EXECUTE(regs, pageend, ip, - ifetch7, exec7); -#endif - + FAST_UNROLLED_EXECUTE(regs, pageend, ip, ifetch1, exec1); + FAST_UNROLLED_EXECUTE(regs, pageend, ip, ifetch2, exec2); + FAST_UNROLLED_EXECUTE(regs, pageend, ip, ifetch3, exec3); + FAST_UNROLLED_EXECUTE(regs, pageend, ip, ifetch4, exec4); + FAST_UNROLLED_EXECUTE(regs, pageend, ip, ifetch5, exec5); + FAST_UNROLLED_EXECUTE(regs, pageend, ip, ifetch6, exec6); + FAST_UNROLLED_EXECUTE(regs, pageend, ip, ifetch7, exec7); } FAST_IFETCH(regs, pageend, ip, ifetch0, exec0); @@ -1544,126 +1456,6 @@ FAST_IFETCH(regs, pageend, ip, ifetch7, exec7); regs->ip = ip; ARCH_DEP(process_trace)(regs, tracethis, stepthis); - - /* Reset instruction trace indicators */ - tracethis = 0; - stepthis = 0; - } - - /* Execute the instruction */ - regs->instcount++; - EXECUTE_INSTRUCTION (regs->ip, 0, regs); -} -#endif - -} /* end function cpu_thread */ -#else -void ARCH_DEP(run_cpu) (REGS *regs) -{ -int tracethis; /* Trace this instruction */ -int stepthis; /* Stop on this instruction */ - - /* Set started bit on and wait bit off for this CPU */ - obtain_lock (&sysblk.intlock); - sysblk.started_mask |= regs->cpumask; - sysblk.waitmask &= ~regs->cpumask; - release_lock (&sysblk.intlock); - - /* Establish longjmp destination for program check */ - setjmp(regs->progjmp); - - /* Reset instruction trace indicators */ - tracethis = 0; - stepthis = 0; - -#ifdef FEATURE_PER - if (PER_MODE(regs)) - goto slowloop; -#endif - - while (1) - { - - /* Test for interrupts if it appears that one may be pending */ - if( IC_INTERRUPT_CPU(regs) ) - { - ARCH_DEP(process_interrupt)(regs); - if (!regs->cpuonline) - return; - } /* end if(interrupt) */ - - /* Clear the instruction validity flag in case an access - error occurs while attempting to fetch next instruction */ - regs->instvalid = 0; - - /* Fetch the next sequential instruction */ - INSTRUCTION_FETCH(regs->inst, regs->psw.IA, regs); - - /* Set the instruction validity flag */ - regs->instvalid = 1; - - if( IS_IC_TRACE ) - { - ARCH_DEP(process_trace)(regs, tracethis, stepthis); - - - /* Reset instruction trace indicators */ - tracethis = 0; - stepthis = 0; -#ifdef OPTION_CPU_UNROLL - regs->instcount++; - EXECUTE_INSTRUCTION (regs->ip, 0, regs); - longjmp(regs->progjmp, SIE_NO_INTERCEPT); -#endif - } - - /* Execute the instruction */ -#ifdef OPTION_CPU_UNROLL - regs->instcount += 8; -#else - regs->instcount++; -#endif - EXECUTE_INSTRUCTION (regs->ip, 0, regs); - -#ifdef OPTION_CPU_UNROLL - UNROLLED_EXECUTE(regs); - UNROLLED_EXECUTE(regs); - UNROLLED_EXECUTE(regs); - UNROLLED_EXECUTE(regs); - UNROLLED_EXECUTE(regs); - UNROLLED_EXECUTE(regs); - UNROLLED_EXECUTE(regs); -#endif - - } - -#ifdef FEATURE_PER -slowloop: - while (1) -{ - /* Test for interrupts if it appears that one may be pending */ - if( IC_INTERRUPT_CPU(regs) ) -{ - ARCH_DEP(process_interrupt)(regs); - if (!regs->cpuonline) - return; - } - - /* Clear the instruction validity flag in case an access - error occurs while attempting to fetch next instruction */ - regs->instvalid = 0; - - /* Fetch the next sequential instruction */ - INSTRUCTION_FETCH(regs->inst, regs->psw.IA, regs); - - /* Set the instruction validity flag */ - regs->instvalid = 1; - - if( IS_IC_TRACE ) - { - ARCH_DEP(process_trace)(regs, tracethis, stepthis); - - /* Reset instruction trace indicators */ tracethis = 0; stepthis = 0; @@ -1676,7 +1468,6 @@ int stepthis; /* Stop on this instruction */ #endif } /* end function cpu_thread */ -#endif #if !defined(_GEN_ARCH) diff --git a/cpuint.h b/cpuint.h index a05d27a..02b185b 100644 --- a/cpuint.h +++ b/cpuint.h @@ -1,27 +1,25 @@ -#define INTERRUPTS_FAST_CHECK - -#ifdef INTERRUPTS_FAST_CHECK /********************************************************************** - Interrupts_State & Interrupts_Mask bits definition (Initial_Mask=400F) + Interrupts_State & Interrupts_Mask bits definition (Initial_Mask=C00E) Machine check, PER and external interrupt subclass bit positions are fixed by the architecture and cannot be changed Floating interrupts are made pending to all CPUs, and are recorded in the sysblk structure, CPU specific interrupts are recorded in the regs structure. - dhim mmmm pppp p000 xxxx xxx0 xxxx hhhh : type U32 - |||| |||| |||| |--- |||| |||- |||| |||| h:mask is always '1' - |||| |||| |||| | |||| ||| |||| |||+--> '1' : (regs)->psw.wait == 1 + hhim mmmm pppp p000 xxxx xxx0 xxxx hhhs : type U32 + |||| |||| |||| |--- |||| |||- |||| |||| h:mask is always '1' + |||| |||| |||| | |||| ||| |||| |||| s:state is always '1' + |||| |||| |||| | |||| ||| |||| |||+--> '1' : PSW_WAIT |||| |||| |||| | |||| ||| |||| ||+---> '1' : RESTART - |||| |||| |||| | |||| ||| |||| |+----> '1' : sysblk.broadcast + |||| |||| |||| | |||| ||| |||| |+----> '1' : BROADCAST |||| |||| |||| | |||| ||| |||| +-----> '1' : STORSTAT |||| |||| |||| | |||| ||| |||| - |||| |||| |||| | |||| ||| |||+-------> '1' : ETR timer - |||| |||| |||| | |||| ||| ||+--------> '1' : External Signal - |||| |||| |||| | |||| ||| |+---------> '1' : INTKEY (floating) + |||| |||| |||| | |||| ||| |||+-------> '1' : ETR + |||| |||| |||| | |||| ||| ||+--------> '1' : EXTSIG + |||| |||| |||| | |||| ||| |+---------> '1' : INTKEY |||| |||| |||| | |||| ||| +----------> '1' : ITIMER |||| |||| |||| | |||| ||| |||| |||| |||| | |||| ||| - |||| |||| |||| | |||| ||+-------------> '1' : SERVSIG (floating) + |||| |||| |||| | |||| ||+-------------> '1' : SERVSIG |||| |||| |||| | |||| |+--------------> '1' : PTIMER |||| |||| |||| | |||| +---------------> '1' : CLKC |||| |||| |||| | |||| @@ -39,34 +37,36 @@ |||| |||| |+-----------------------------> '1' : PER IF |||| |||| +------------------------------> '1' : PER SB |||| |||| - |||| |||+--------------------------------> '1' : WARNING (floating) - |||| ||+---------------------------------> '1' : XDMGRPT (floating) - |||| |+----------------------------------> '1' : DGRDRPT (floating) - |||| +-----------------------------------> '1' : RCVYRPT (floating) + |||| |||+--------------------------------> '1' : WARNING + |||| ||+---------------------------------> '1' : XDMGRPT + |||| |+----------------------------------> '1' : DGRDRPT + |||| +-----------------------------------> '1' : RCVYRPT |||| - |||+-------------------------------------> '1' : CHANRPT (floating) - ||+--------------------------------------> '1' : IOPENDING (floating) + |||+-------------------------------------> '1' : CHANRPT + ||+--------------------------------------> '1' : IOPENDING |+---------------------------------------> '1' : CPUSTATE!=STARTED - +----------------------------------------> '1' : IC Debug Mode + +----------------------------------------> '1' : DEBUG or TRACE **********************************************************************/ +/* Initial values */ +#define IC_INITIAL_STATE IC_PSW_WAIT +#define IC_INITIAL_MASK ( IC_DEBUG_BIT \ + | IC_CPU_NOT_STARTED \ + | IC_RESTART \ + | IC_BROADCAST \ + | IC_STORSTAT ) + +#define SET_IC_INITIAL_MASK(_regs) (_regs)->ints_mask = IC_INITIAL_MASK +#define SET_IC_INITIAL_STATE sysblk.ints_state = IC_INITIAL_STATE + /* Hercules related or nonmaskable interrupts */ #define IC_DEBUG_BIT 0x80000000 #define IC_CPU_NOT_STARTED 0x40000000 #define IC_IOPENDING 0x20000000 #define IC_STORSTAT 0x00000008 -#if MAX_CPU_ENGINES > 1 #define IC_BROADCAST 0x00000004 -#else -#define IC_BROADCAST 0x00000000 -#endif #define IC_RESTART 0x00000002 #define IC_PSW_WAIT 0x00000001 -#define IC_INITIAL_MASK ( IC_CPU_NOT_STARTED \ - | IC_PSW_WAIT \ - | IC_RESTART \ - | IC_BROADCAST \ - | IC_STORSTAT ) /* External interrupt subclasses */ #define IC_EXTPENDING ( CR0_XM_MALFALT \ @@ -93,248 +93,225 @@ | IC_EXTPENDING \ | IC_IOPENDING ) -#define IC_CR9_SHIFT 8 -#define IC_PER_SB (CR9_SB >> IC_CR9_SHIFT) -#define IC_PER_IF (CR9_IF >> IC_CR9_SHIFT) -#define IC_PER_SA (CR9_SA >> IC_CR9_SHIFT) -#define IC_PER_GRA (CR9_GRA >> IC_CR9_SHIFT) -#define IC_PER_STURA (CR9_STURA >> IC_CR9_SHIFT) +#define IC_CR9_SHIFT 8 +#define IC_PER_SB (CR9_SB >> IC_CR9_SHIFT) +#define IC_PER_IF (CR9_IF >> IC_CR9_SHIFT) +#define IC_PER_SA (CR9_SA >> IC_CR9_SHIFT) +#define IC_PER_GRA (CR9_GRA >> IC_CR9_SHIFT) +#define IC_PER_STURA (CR9_STURA >> IC_CR9_SHIFT) -#define IC_PER_MASK ( IC_PER_SB \ - | IC_PER_IF \ - | IC_PER_SA \ - | IC_PER_GRA \ - | IC_PER_STURA ) +#define IC_PER_MASK ( IC_PER_SB \ + | IC_PER_IF \ + | IC_PER_SA \ + | IC_PER_GRA \ + | IC_PER_STURA ) /* SIE & Assist supported events */ -#define IC_SIE_INT ( IC_BROADCAST \ - | IC_IOPENDING \ - | CR0_XM_CLKC \ - | CR0_XM_PTIMER \ - | CR0_XM_ITIMER ) - -/* Bit manipulation macros */ -#define SET_IC_INITIAL_MASK(_regs) (_regs)->ints_mask= \ - (IC_INITIAL_MASK|((_regs)->ints_state&IC_DEBUG_BIT)) +#define IC_SIE_INT ( IC_BROADCAST \ + | IC_IOPENDING \ + | CR0_XM_CLKC \ + | CR0_XM_PTIMER \ + | CR0_XM_ITIMER ) +/* Conditionally turn bits on or off */ #define SET_IC_PER_MASK(_regs) \ do { \ + (_regs)->ints_mask &= ~IC_PER_MASK; \ if( PER_MODE((_regs)) ) \ - (_regs)->ints_mask = (((_regs)->ints_mask&~IC_PER_MASK) \ - | (((_regs)->CR(9) >> IC_CR9_SHIFT)&IC_PER_MASK)); \ - else \ - (_regs)->ints_mask &= ~IC_PER_MASK; \ + (_regs)->ints_mask |= ((_regs)->CR(9) >> IC_CR9_SHIFT) & IC_PER_MASK; \ } while (0) #define SET_IC_EXTERNAL_MASK(_regs) \ +do { \ + (_regs)->ints_mask &= ~IC_EXTPENDING; \ if( (_regs)->psw.sysmask & PSW_EXTMASK ) \ - (_regs)->ints_mask = (((_regs)->ints_mask&~IC_EXTPENDING) \ - | ((_regs)->CR(0)&IC_EXTPENDING)); \ - else \ - (_regs)->ints_mask &= ~IC_EXTPENDING + (_regs)->ints_mask |= (_regs)->CR(0) & IC_EXTPENDING; \ +} while (0) #undef SET_IC_IO_MASK #ifdef FEATURE_BCMODE #define SET_IC_IO_MASK(_regs) \ +do { \ + (_regs)->ints_mask &= ~IC_IOPENDING; \ if( ((_regs)->psw.ecmode ? ((_regs)->psw.sysmask&PSW_IOMASK) : \ ((_regs)->psw.sysmask&0xFE)) ) \ - (_regs)->ints_mask |= IC_IOPENDING; \ - else \ - (_regs)->ints_mask &= ~IC_IOPENDING + (_regs)->ints_mask |= IC_IOPENDING; \ +} while (0) #else /*!FEATURE_BCMODE*/ #define SET_IC_IO_MASK(_regs) SET_IC_ECIO_MASK(_regs) #endif /*FEATURE_BCMODE*/ #define SET_IC_ECIO_MASK(_regs) \ +do { \ + (_regs)->ints_mask &= ~IC_IOPENDING; \ if( (_regs)->psw.sysmask & PSW_IOMASK ) \ - (_regs)->ints_mask |= IC_IOPENDING; \ - else \ - (_regs)->ints_mask &= ~IC_IOPENDING + (_regs)->ints_mask |= IC_IOPENDING; \ +} while (0) #define SET_IC_BCIO_MASK(_regs) \ +do { \ + (_regs)->ints_mask &= ~IC_IOPENDING; \ if( (_regs)->psw.sysmask & 0xFE ) \ - (_regs)->ints_mask |= IC_IOPENDING; \ - else \ - (_regs)->ints_mask &= ~IC_IOPENDING + (_regs)->ints_mask |= IC_IOPENDING; \ +} while (0) #define SET_IC_MCK_MASK(_regs) \ +do { \ + (_regs)->ints_mask &= ~IC_MCKPENDING; \ if( (_regs)->psw.mach ) \ - (_regs)->ints_mask = (((_regs)->ints_mask&~IC_MCKPENDING) \ - | ((_regs)->CR(14)&IC_MCKPENDING)); \ - else \ - (_regs)->ints_mask &= ~IC_MCKPENDING - -/* Set('1') or Reset('0') bit according to condition */ + (_regs)->ints_mask |= (_regs)->CR(14) & IC_MCKPENDING; \ +} while (0) -#define SET_IC_PSW_WAIT(_regs) \ +#define SET_IC_PSW_WAIT_MASK(_regs) \ +do { \ + (_regs)->ints_mask &= ~IC_PSW_WAIT; \ if((_regs)->psw.wait) \ - (_regs)->ints_state|=IC_PSW_WAIT; \ - else \ - (_regs)->ints_state&=~IC_PSW_WAIT + (_regs)->ints_mask |= IC_PSW_WAIT; \ +} while (0) #define SET_IC_TRACE \ +do { \ if(sysblk.instbreak || sysblk.inststep || sysblk.insttrace) \ - sysblk.ints_state|=IC_DEBUG_BIT; \ + or_bits( &sysblk.ints_state, IC_DEBUG_BIT); \ else \ - sysblk.ints_state&=~IC_DEBUG_BIT; + and_bits(&sysblk.ints_state,~IC_DEBUG_BIT); \ +} while (0) -#define RESET_IC_CPUINT(_regs) +#define OFF_IC_CPUINT(_regs) +#define RESET_IC_CPUINT(_regs) -/* Set bit to '1' */ +/* Set state bit to '1' */ #define ON_IC_CPU_NOT_STARTED(_regs) \ - ((_regs)->ints_state|=IC_CPU_NOT_STARTED) -#define ON_IC_RESTART(_regs) ((_regs)->ints_state|=IC_RESTART) -#define ON_IC_BROADCAST (sysblk.ints_state|=IC_BROADCAST) -#define ON_IC_STORSTAT(_regs) ((_regs)->ints_state|=IC_STORSTAT) -#define ON_IC_IOPENDING (sysblk.ints_state|=IC_IOPENDING) -#define ON_IC_CHANRPT (sysblk.ints_state|=CR14_CHANRPT) -#define ON_IC_INTKEY (sysblk.ints_state|=CR0_XM_INTKEY) -#define ON_IC_SERVSIG (sysblk.ints_state|=CR0_XM_SERVSIG) -#define ON_IC_ITIMER(_regs) ((_regs)->ints_state|=CR0_XM_ITIMER) -#define ON_IC_PTIMER(_regs) ((_regs)->ints_state|=CR0_XM_PTIMER) -#define ON_IC_CLKC(_regs) ((_regs)->ints_state|=CR0_XM_CLKC) -#define ON_IC_EXTCALL(_regs) ((_regs)->ints_state|=CR0_XM_EXTCALL) -#define ON_IC_MALFALT(_regs) ((_regs)->ints_state|=CR0_XM_MALFALT) -#define ON_IC_EMERSIG(_regs) ((_regs)->ints_state|=CR0_XM_EMERSIG) -#define ON_IC_TRACE (sysblk.ints_state|=IC_DEBUG_BIT) -#define ON_IC_DEBUG(_regs) \ - { (_regs)->ints_mask|=IC_DEBUG_BIT; (_regs)->ints_state|=IC_DEBUG_BIT; } - -#define ON_IC_PER_SB(_regs) ((_regs)->ints_state|=(IC_PER_SB)&(_regs)->ints_mask) -#define ON_IC_PER_IF(_regs) ((_regs)->ints_state|=(IC_PER_IF)&(_regs)->ints_mask) -#define ON_IC_PER_SA(_regs) ((_regs)->ints_state|=(IC_PER_SA)&(_regs)->ints_mask) -#define ON_IC_PER_GRA(_regs) ((_regs)->ints_state|=(IC_PER_GRA)&(_regs)->ints_mask) -#define ON_IC_PER_STURA(_regs) ((_regs)->ints_state|=(IC_PER_STURA)&(_regs)->ints_mask) - -/* Re-Set bit to '0' */ + or_bits( &(_regs)->ints_state, IC_CPU_NOT_STARTED) +#define ON_IC_RESTART(_regs) or_bits( &(_regs)->ints_state, IC_RESTART) +#define ON_IC_BROADCAST(_regs) or_bits( &(_regs)->ints_state, IC_BROADCAST) +#define ON_IC_STORSTAT(_regs) or_bits( &(_regs)->ints_state, IC_STORSTAT) +#define ON_IC_IOPENDING or_bits( &sysblk.ints_state, IC_IOPENDING) +#define ON_IC_CHANRPT or_bits( &sysblk.ints_state, CR14_CHANRPT) +#define ON_IC_INTKEY or_bits( &sysblk.ints_state, CR0_XM_INTKEY) +#define ON_IC_SERVSIG or_bits( &sysblk.ints_state, CR0_XM_SERVSIG) +#define ON_IC_ITIMER(_regs) or_bits( &(_regs)->ints_state, CR0_XM_ITIMER) +#define ON_IC_PTIMER(_regs) or_bits( &(_regs)->ints_state, CR0_XM_PTIMER) +#define ON_IC_CLKC(_regs) or_bits( &(_regs)->ints_state, CR0_XM_CLKC) +#define ON_IC_EXTCALL(_regs) or_bits( &(_regs)->ints_state, CR0_XM_EXTCALL) +#define ON_IC_MALFALT(_regs) or_bits( &(_regs)->ints_state, CR0_XM_MALFALT) +#define ON_IC_EMERSIG(_regs) or_bits( &(_regs)->ints_state, CR0_XM_EMERSIG) +#define ON_IC_TRACE or_bits( &sysblk.ints_state, IC_DEBUG_BIT) +#define ON_IC_DEBUG(_regs) or_bits( &(_regs)->ints_state, IC_DEBUG_BIT) +#define ON_IC_PER_SB(_regs) or_bits( &(_regs)->ints_state, IC_PER_SB&(_regs)->ints_mask) +#define ON_IC_PER_IF(_regs) or_bits( &(_regs)->ints_state, IC_PER_IF&(_regs)->ints_mask) +#define ON_IC_PER_SA(_regs) or_bits( &(_regs)->ints_state, IC_PER_SA&(_regs)->ints_mask) +#define ON_IC_PER_GRA(_regs) or_bits( &(_regs)->ints_state, IC_PER_GRA&(_regs)->ints_mask) +#define ON_IC_PER_STURA(_regs) or_bits( &(_regs)->ints_state, IC_PER_STURA&(_regs)->ints_mask) + +/* Set state bit to '0' */ #define OFF_IC_CPU_NOT_STARTED(_regs) \ - ((_regs)->ints_state&=~IC_CPU_NOT_STARTED) -#define OFF_IC_RESTART(_regs) ((_regs)->ints_state&=~IC_RESTART) -#define OFF_IC_BROADCAST (sysblk.ints_state&=~IC_BROADCAST) -#define OFF_IC_STORSTAT(_regs) ((_regs)->ints_state&=~IC_STORSTAT) -#define OFF_IC_IOPENDING (sysblk.ints_state&=~IC_IOPENDING) -#define OFF_IC_CHANRPT (sysblk.ints_state&=~CR14_CHANRPT) -#define OFF_IC_INTKEY (sysblk.ints_state&=~CR0_XM_INTKEY) -#define OFF_IC_SERVSIG (sysblk.ints_state&=~CR0_XM_SERVSIG) -#define OFF_IC_ITIMER(_regs) ((_regs)->ints_state&=~CR0_XM_ITIMER) -#define OFF_IC_PTIMER(_regs) ((_regs)->ints_state&=~CR0_XM_PTIMER) -#define OFF_IC_CLKC(_regs) ((_regs)->ints_state&=~CR0_XM_CLKC) -#define OFF_IC_EXTCALL(_regs) ((_regs)->ints_state&=~CR0_XM_EXTCALL) -#define OFF_IC_MALFALT(_regs) ((_regs)->ints_state&=~CR0_XM_MALFALT) -#define OFF_IC_EMERSIG(_regs) ((_regs)->ints_state&=~CR0_XM_EMERSIG) -//#define OFF_IC_TRACE (sysblk.ints_state&=~IC_DEBUG_BIT) -#define OFF_IC_DEBUG(_regs) \ - { (_regs)->ints_mask&=~IC_DEBUG_BIT; (_regs)->ints_state&=~IC_DEBUG_BIT; } -#define OFF_IC_CPUINT(_regs) - -#define OFF_IC_PER(_regs) ((_regs)->ints_state&=~IC_PER_MASK) -#define OFF_IC_PER_SB(_regs) ((_regs)->ints_state&=~IC_PER_SB) -#define OFF_IC_PER_IF(_regs) ((_regs)->ints_state&=~IC_PER_IF) -#define OFF_IC_PER_SA(_regs) ((_regs)->ints_state&=~IC_PER_SA) -#define OFF_IC_PER_GRA(_regs) ((_regs)->ints_state&=~IC_PER_GRA) -#define OFF_IC_PER_STURA(_regs) ((_regs)->ints_state&=~IC_PER_STURA) + and_bits(&(_regs)->ints_state,~IC_CPU_NOT_STARTED) +#define OFF_IC_RESTART(_regs) and_bits(&(_regs)->ints_state,~IC_RESTART) +#define OFF_IC_BROADCAST(_regs) and_bits(&(_regs)->ints_state,~IC_BROADCAST) +#define OFF_IC_STORSTAT(_regs) and_bits(&(_regs)->ints_state,~IC_STORSTAT) +#define OFF_IC_IOPENDING and_bits( &sysblk.ints_state,~IC_IOPENDING) +#define OFF_IC_CHANRPT and_bits( &sysblk.ints_state,~CR14_CHANRPT) +#define OFF_IC_INTKEY and_bits( &sysblk.ints_state,~CR0_XM_INTKEY) +#define OFF_IC_SERVSIG and_bits( &sysblk.ints_state,~CR0_XM_SERVSIG) +#define OFF_IC_ITIMER(_regs) and_bits(&(_regs)->ints_state,~CR0_XM_ITIMER) +#define OFF_IC_PTIMER(_regs) and_bits(&(_regs)->ints_state,~CR0_XM_PTIMER) +#define OFF_IC_CLKC(_regs) and_bits(&(_regs)->ints_state,~CR0_XM_CLKC) +#define OFF_IC_EXTCALL(_regs) and_bits(&(_regs)->ints_state,~CR0_XM_EXTCALL) +#define OFF_IC_MALFALT(_regs) and_bits(&(_regs)->ints_state,~CR0_XM_MALFALT) +#define OFF_IC_EMERSIG(_regs) and_bits(&(_regs)->ints_state,~CR0_XM_EMERSIG) +#define OFF_IC_TRACE and_bits( &sysblk.ints_state,~IC_DEBUG_BIT) +#define OFF_IC_DEBUG(_regs) and_bits(&(_regs)->ints_state,~IC_DEBUG_BIT) +#define OFF_IC_PER(_regs) and_bits(&(_regs)->ints_state,~IC_PER_MASK) +#define OFF_IC_PER_SB(_regs) and_bits(&(_regs)->ints_state,~IC_PER_SB) +#define OFF_IC_PER_IF(_regs) and_bits(&(_regs)->ints_state,~IC_PER_IF) +#define OFF_IC_PER_SA(_regs) and_bits(&(_regs)->ints_state,~IC_PER_SA) +#define OFF_IC_PER_GRA(_regs) and_bits(&(_regs)->ints_state,~IC_PER_GRA) +#define OFF_IC_PER_STURA(_regs) and_bits(&(_regs)->ints_state,~IC_PER_STURA) /* Check Interrupt State */ -//#define IS_IC_PSW_WAIT(_regs) ((_regs)->ints_state&IC_PSW_WAIT) #define IS_IC_DISABLED_WAIT_PSW(_regs) \ ( ((_regs)->ints_mask & IC_OPEN_MASK) == 0 ) -#define IS_IC_RESTART(_regs) ((_regs)->ints_state&IC_RESTART) -#if MAX_CPU_ENGINES > 1 -#define IS_IC_BROADCAST_ON (sysblk.ints_state&IC_BROADCAST) -#define IS_IC_BROADCAST(_regs) ((sysblk.ints_state&IC_BROADCAST) && \ - (sysblk.broadcast_mask&(_regs)->cpumask)) -#else -#define IS_IC_BROADCAST_ON 0 -#endif -#define IS_IC_STORSTAT(_regs) ((_regs)->ints_state&IC_STORSTAT) -#define IS_IC_IOPENDING (sysblk.ints_state&IC_IOPENDING) -#define IS_IC_MCKPENDING (sysblk.ints_state&IC_MCKPENDING) -#define IS_IC_CHANRPT (sysblk.ints_state&CR14_CHANRPT) +#define IS_IC_RESTART(_regs) ((_regs)->ints_state&IC_RESTART) +#define IS_IC_BROADCAST(_regs) ((_regs)->ints_state&IC_BROADCAST) +#define IS_IC_STORSTAT(_regs) ((_regs)->ints_state&IC_STORSTAT) +#define IS_IC_IOPENDING (sysblk.ints_state&IC_IOPENDING) +#define IS_IC_MCKPENDING (sysblk.ints_state&IC_MCKPENDING) +#define IS_IC_CHANRPT (sysblk.ints_state&CR14_CHANRPT) #define IS_IC_EXTPENDING(_regs) \ - ( ((_regs)->ints_state|sysblk.ints_state) & IC_EXTPENDING ) -//#define IS_IC_INTKEY (sysblk.ints_state&CR0_XM_INTKEY) -#define IS_IC_SERVSIG (sysblk.ints_state&CR0_XM_SERVSIG) -#define IS_IC_ITIMER(_regs) ((_regs)->ints_state&CR0_XM_ITIMER) -#define IS_IC_PTIMER(_regs) ((_regs)->ints_state&CR0_XM_PTIMER) -#define IS_IC_CLKC(_regs) ((_regs)->ints_state&CR0_XM_CLKC) -#define IS_IC_EXTCALL(_regs) ((_regs)->ints_state&CR0_XM_EXTCALL) -#define IS_IC_MALFALT(_regs) ((_regs)->ints_state&CR0_XM_MALFALT) -#define IS_IC_EMERSIG(_regs) ((_regs)->ints_state&CR0_XM_EMERSIG) -#define IS_IC_TRACE (sysblk.ints_state&IC_DEBUG_BIT) - -#define IS_IC_PER(_regs) ((_regs)->ints_state&IC_PER_MASK) -#define IS_IC_PER_SB(_regs) ((_regs)->ints_state&IC_PER_SB) -#define IS_IC_PER_IF(_regs) ((_regs)->ints_state&IC_PER_IF) -#define IS_IC_PER_SA(_regs) ((_regs)->ints_state&IC_PER_SA) -#define IS_IC_PER_GRA(_regs) ((_regs)->ints_state&IC_PER_GRA) -#define IS_IC_PER_STURA(_regs) ((_regs)->ints_state&IC_PER_STURA) - -#define EN_IC_PER(_regs) ((_regs)->ints_mask&IC_PER_MASK) -#define EN_IC_PER_SB(_regs) ((_regs)->ints_mask&IC_PER_SB) -#define EN_IC_PER_IF(_regs) ((_regs)->ints_mask&IC_PER_IF) -#define EN_IC_PER_SA(_regs) ((_regs)->ints_mask&IC_PER_SA) -#define EN_IC_PER_GRA(_regs) ((_regs)->ints_mask&IC_PER_GRA) -#define EN_IC_PER_STURA(_regs) ((_regs)->ints_mask&IC_PER_STURA) + (((_regs)->ints_state|sysblk.ints_state)&IC_EXTPENDING ) +#define IS_IC_INTKEY (sysblk.ints_state&CR0_XM_INTKEY) +#define IS_IC_SERVSIG (sysblk.ints_state&CR0_XM_SERVSIG) +#define IS_IC_ITIMER(_regs) ((_regs)->ints_state&CR0_XM_ITIMER) +#define IS_IC_PTIMER(_regs) ((_regs)->ints_state&CR0_XM_PTIMER) +#define IS_IC_CLKC(_regs) ((_regs)->ints_state&CR0_XM_CLKC) +#define IS_IC_EXTCALL(_regs) ((_regs)->ints_state&CR0_XM_EXTCALL) +#define IS_IC_MALFALT(_regs) ((_regs)->ints_state&CR0_XM_MALFALT) +#define IS_IC_EMERSIG(_regs) ((_regs)->ints_state&CR0_XM_EMERSIG) +#define IS_IC_TRACE (sysblk.ints_state&IC_DEBUG_BIT) +#define IS_IC_PER(_regs) ((_regs)->ints_state&IC_PER_MASK) +#define IS_IC_PER_SB(_regs) ((_regs)->ints_state&IC_PER_SB) +#define IS_IC_PER_IF(_regs) ((_regs)->ints_state&IC_PER_IF) +#define IS_IC_PER_SA(_regs) ((_regs)->ints_state&IC_PER_SA) +#define IS_IC_PER_GRA(_regs) ((_regs)->ints_state&IC_PER_GRA) +#define IS_IC_PER_STURA(_regs) ((_regs)->ints_state&IC_PER_STURA) + +#define EN_IC_PER(_regs) ((_regs)->ints_mask&IC_PER_MASK) +#define EN_IC_PER_SB(_regs) ((_regs)->ints_mask&IC_PER_SB) +#define EN_IC_PER_IF(_regs) ((_regs)->ints_mask&IC_PER_IF) +#define EN_IC_PER_SA(_regs) ((_regs)->ints_mask&IC_PER_SA) +#define EN_IC_PER_GRA(_regs) ((_regs)->ints_mask&IC_PER_GRA) +#define EN_IC_PER_STURA(_regs) ((_regs)->ints_mask&IC_PER_STURA) /* Advanced checks macros */ #define OPEN_IC_MCKPENDING(_regs) \ - ((sysblk.ints_state&IC_MCKPENDING)&(_regs)->ints_mask) + (sysblk.ints_state&(_regs)->ints_mask&IC_MCKPENDING) #define OPEN_IC_IOPENDING(_regs) \ - ((sysblk.ints_state&IC_IOPENDING)&(_regs)->ints_mask) + (sysblk.ints_state&(_regs)->ints_mask&IC_IOPENDING) #define OPEN_IC_CHANRPT(_regs) \ - ((sysblk.ints_state&CR14_CHANRPT)&(_regs)->ints_mask) + (sysblk.ints_state&(_regs)->ints_mask&CR14_CHANRPT) #define OPEN_IC_EXTPENDING(_regs) \ - ( ((_regs)->ints_state|sysblk.ints_state) \ - & ((_regs)->ints_mask&IC_EXTPENDING) ) + ((sysblk.ints_state|(_regs)->ints_state) \ + &(_regs)->ints_mask&IC_EXTPENDING) #define OPEN_IC_ITIMER(_regs) \ - (((_regs)->ints_state&CR0_XM_ITIMER)&(_regs)->ints_mask) + ((_regs)->ints_state&(_regs)->ints_mask&CR0_XM_ITIMER) #define OPEN_IC_PTIMER(_regs) \ - (((_regs)->ints_state&CR0_XM_PTIMER)&(_regs)->ints_mask) + ((_regs)->ints_state&(_regs)->ints_mask&CR0_XM_PTIMER) #define OPEN_IC_CLKC(_regs) \ - (((_regs)->ints_state&CR0_XM_CLKC)&(_regs)->ints_mask) + ((_regs)->ints_state&(_regs)->ints_mask&CR0_XM_CLKC) -#define OPEN_IC_INTKEY(_regs) ((sysblk.ints_state&CR0_XM_INTKEY) \ - & (_regs)->ints_mask) +#define OPEN_IC_INTKEY(_regs) \ + (sysblk.ints_state&(_regs)->ints_mask&CR0_XM_INTKEY) -#define OPEN_IC_SERVSIG(_regs) ((sysblk.ints_state&CR0_XM_SERVSIG) \ - & (_regs)->ints_mask) +#define OPEN_IC_SERVSIG(_regs) \ + (sysblk.ints_state&(_regs)->ints_mask&CR0_XM_SERVSIG) -#define OPEN_IC_EXTCALL(_regs) (((_regs)->ints_state&CR0_XM_EXTCALL) \ - & (_regs)->ints_mask) +#define OPEN_IC_EXTCALL(_regs) \ + ((_regs)->ints_state&(_regs)->ints_mask&CR0_XM_EXTCALL) -#define OPEN_IC_MALFALT(_regs) (((_regs)->ints_state&CR0_XM_MALFALT) \ - & (_regs)->ints_mask) +#define OPEN_IC_MALFALT(_regs) \ + ((_regs)->ints_state&(_regs)->ints_mask&CR0_XM_MALFALT) -#define OPEN_IC_EMERSIG(_regs) (((_regs)->ints_state&CR0_XM_EMERSIG) \ - & (_regs)->ints_mask) +#define OPEN_IC_EMERSIG(_regs) \ + ((_regs)->ints_state&(_regs)->ints_mask&CR0_XM_EMERSIG) -#define OPEN_IC_DEBUG(_regs) \ - ((_regs)->ints_state & IC_DEBUG_BIT & (_regs)->ints_mask) +#define OPEN_IC_TRACE(_regs) \ + (sysblk.ints_state&(_regs)->ints_mask&IC_DEBUG_BIT) -#define IC_EXT_BUT_IT_OR_STORSTAT \ - (IC_PER_MASK | IC_STORSTAT | (IC_EXTPENDING & ~CR0_XM_ITIMER)) +#define OPEN_IC_DEBUG(_regs) \ + ((_regs)->ints_state&(_regs)->ints_mask&IC_DEBUG_BIT) #define OPEN_IC_PERINT(_regs) \ - ((_regs)->ints_state&IC_PER_MASK) - -#define OPEN_IC_CPUINT(_regs) \ - ( ((_regs)->ints_state&IC_EXT_BUT_IT_OR_STORSTAT&((_regs)->ints_mask|IC_PER_MASK)) \ - || OPEN_IC_ITIMER(_regs) ) + ((_regs)->ints_state&IC_PER_MASK) #define IC_INTERRUPT_CPU(_regs) \ (((_regs)->ints_state|sysblk.ints_state) & ((_regs)->ints_mask|IC_PER_MASK)) #define SIE_IC_INTERRUPT_CPU(_regs) \ (((_regs)->ints_state|(sysblk.ints_state&IC_SIE_INT)) & ((_regs)->ints_mask|IC_PER_MASK)) - -#else /*!INTERRUPTS_FAST_CHECK*/ - -#error INTERRUPTS_FAST_CHECK must be defined - -#endif /*!INTERRUPTS_FAST_CHECK*/ diff --git a/crypto.c b/crypto.c new file mode 100644 index 0000000..fe2447b --- /dev/null +++ b/crypto.c @@ -0,0 +1,120 @@ +/* CRYPTO.C (c) Copyright Jan Jaeger, 2000-2003 */ +/* Cryptographic instructions */ + +#include "hercules.h" + + +#if defined(FEATURE_MESSAGE_SECURITY_ASSIST) + +#include "opcode.h" + +#define CRYPTO_EXTERN +#include "crypto.h" + + +/*-------------------------------------------------------------------*/ +/* B92E KM - Cipher Message [RRE] */ +/*-------------------------------------------------------------------*/ +DEF_INST(cipher_message_r) +{ + if( ARCH_DEP(cipher_message) ) + ARCH_DEP(cipher_message) (inst, execflag, regs); + else + { + int r1, r2; /* register values */ + + RRE(inst, execflag, regs, r1, r2); + + ARCH_DEP(program_interrupt) (regs, PGM_OPERATION_EXCEPTION); + } +} + + +/*-------------------------------------------------------------------*/ +/* B92F KMC - Cipher Message with Chaining [RRE] */ +/*-------------------------------------------------------------------*/ +DEF_INST(cipher_message_with_chaining_r) +{ + if( ARCH_DEP(cipher_message_with_chaining) ) + ARCH_DEP(cipher_message_with_chaining) (inst, execflag, regs); + else + { + int r1, r2; /* register values */ + + RRE(inst, execflag, regs, r1, r2); + + ARCH_DEP(program_interrupt) (regs, PGM_OPERATION_EXCEPTION); + } +} + + +/*-------------------------------------------------------------------*/ +/* B93E KIMD - Compute Intermediate Message Digest [RRE] */ +/*-------------------------------------------------------------------*/ +DEF_INST(compute_intermediate_message_digest_r) +{ + if( ARCH_DEP(compute_intermediate_message_digest) ) + ARCH_DEP(compute_intermediate_message_digest) (inst, execflag, regs); + else + { + int r1, r2; /* register values */ + + RRE(inst, execflag, regs, r1, r2); + + ARCH_DEP(program_interrupt) (regs, PGM_OPERATION_EXCEPTION); + } +} + + +/*-------------------------------------------------------------------*/ +/* B93F KLMD - Compute Last Message Digest [RRE] */ +/*-------------------------------------------------------------------*/ +DEF_INST(compute_last_message_digest_r) +{ + if( ARCH_DEP(compute_last_message_digest) ) + ARCH_DEP(compute_last_message_digest) (inst, execflag, regs); + else + { + int r1, r2; /* register values */ + + RRE(inst, execflag, regs, r1, r2); + + ARCH_DEP(program_interrupt) (regs, PGM_OPERATION_EXCEPTION); + } +} + + +/*-------------------------------------------------------------------*/ +/* B91E KMAC - Compute Message Authentication Code [RRE] */ +/*-------------------------------------------------------------------*/ +DEF_INST(compute_message_authentication_code_r) +{ + if( ARCH_DEP(compute_message_authentication_code) ) + ARCH_DEP(compute_message_authentication_code) (inst, execflag, regs); + else + { + int r1, r2; /* register values */ + + RRE(inst, execflag, regs, r1, r2); + + ARCH_DEP(program_interrupt) (regs, PGM_OPERATION_EXCEPTION); + } +} + +#endif /*defined(FEATURE_MESSAGE_SECURITY_ASSIST)*/ + + +#if !defined(_GEN_ARCH) + +#if defined(_ARCHMODE2) + #define _GEN_ARCH _ARCHMODE2 + #include "crypto.c" +#endif + +#if defined(_ARCHMODE3) + #undef _GEN_ARCH + #define _GEN_ARCH _ARCHMODE3 + #include "crypto.c" +#endif + +#endif /*!defined(_GEN_ARCH)*/ diff --git a/crypto.h b/crypto.h new file mode 100644 index 0000000..b2ae5a5 --- /dev/null +++ b/crypto.h @@ -0,0 +1,14 @@ +/* CRYPTO.H (c) Copyright Jan Jaeger, 2000-2003 */ +/* Cryptographic instructions */ + +#if defined(_FEATURE_MESSAGE_SECURITY_ASSIST) + + +CRYPTO_EXTERN void (ATTR_REGPARM(3) (*ARCH_DEP(cipher_message))) (BYTE *, int, REGS *); +CRYPTO_EXTERN void (ATTR_REGPARM(3) (*ARCH_DEP(cipher_message_with_chaining))) (BYTE *, int, REGS *); +CRYPTO_EXTERN void (ATTR_REGPARM(3) (*ARCH_DEP(compute_intermediate_message_digest))) (BYTE *, int, REGS *); +CRYPTO_EXTERN void (ATTR_REGPARM(3) (*ARCH_DEP(compute_last_message_digest))) (BYTE *, int, REGS *); +CRYPTO_EXTERN void (ATTR_REGPARM(3) (*ARCH_DEP(compute_message_authentication_code))) (BYTE *, int, REGS *); + + +#endif /*defined(_FEATURE_MESSAGE_SECURITY_ASSIST)*/ diff --git a/ctc_ctci.c b/ctc_ctci.c index e8d1cfd..a11ce2c 100644 --- a/ctc_ctci.c +++ b/ctc_ctci.c @@ -19,7 +19,14 @@ #include "hercifc.h" #include "opcode.h" + +#if defined(HAVE_GETOPT_LONG) #include +#endif /* defined(HAVE_GETOPT_LONG) */ + +/* getopt dynamic linking kludge */ +#include "herc_getopt.h" + // ==================================================================== // Declarations @@ -43,7 +50,7 @@ DEVHND ctci_device_hndinfo = &CTCI_ExecuteCCW, &CTCI_Close, &CTCI_Query, - NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; // ==================================================================== @@ -61,6 +68,8 @@ int CTCI_Init( DEVBLK* pDEVBLK, int argc, BYTE *argv[] ) DEVBLK* pDevPair = NULL; // Paired DEVBLK int rc = 0; // Return code + pDEVBLK->devtype = 0x3088; + // Housekeeping pWrkCTCBLK = malloc( sizeof( CTCBLK ) ); @@ -103,10 +112,10 @@ int CTCI_Init( DEVBLK* pDEVBLK, int argc, BYTE *argv[] ) pDevCTCBLK->pDEVBLK[1] = pDEVBLK; AddDevice( &pDevCTCBLK->pDEVBLK[0], pDEVBLK->devnum, - "CTCI", &ctci_device_hndinfo ); + pDEVBLK ); AddDevice( &pDevCTCBLK->pDEVBLK[1], pDEVBLK->devnum + 1, - "CTCI", &ctci_device_hndinfo ); + pDEVBLK ); pDevCTCBLK->pDEVBLK[0]->dev_data = pDevCTCBLK; pDevCTCBLK->pDEVBLK[1]->dev_data = pDevCTCBLK; @@ -114,8 +123,11 @@ int CTCI_Init( DEVBLK* pDEVBLK, int argc, BYTE *argv[] ) SetSIDInfo( pDevCTCBLK->pDEVBLK[0], 0x3088, 0x08, 0x3088, 0x01 ); SetSIDInfo( pDevCTCBLK->pDEVBLK[1], 0x3088, 0x08, 0x3088, 0x01 ); - pDEVBLK->ctctype = CTC_CTCI; - pDEVBLK->ctcxmode = 1; + pDevCTCBLK->pDEVBLK[0]->ctctype = CTC_CTCI; + pDevCTCBLK->pDEVBLK[0]->ctcxmode = 1; + + pDevCTCBLK->pDEVBLK[1]->ctctype = CTC_CTCI; + pDevCTCBLK->pDEVBLK[1]->ctcxmode = 1; pDevPair = pDEVBLK; } @@ -451,6 +463,8 @@ int CTCI_Close( DEVBLK* pDEVBLK ) // Close the device file (if not already closed) if( pCTCBLK->fd >= 0 ) { + pCTCBLK->fCloseInProgress = 1; + TUNTAP_Close( pCTCBLK->fd ); pCTCBLK->fd = -1; @@ -458,6 +472,8 @@ int CTCI_Close( DEVBLK* pDEVBLK ) if( pDevPair ) // if paired device exists, pDevPair->fd = -1; // then it's now closed too. + + pCTCBLK->fCloseInProgress = 0; } return 0; @@ -808,11 +824,22 @@ static void* CTCI_ReadThread( PCTCBLK pCTCBLK ) // Check for error condition if( iLength < 0 ) { - if( pCTCBLK->fd != -1 ) + if( pCTCBLK->fd != -1 && !pCTCBLK->fCloseInProgress ) + { logmsg( _("HHCCT048E %4.4X: Error reading from %s: %s\n"), pDEVBLK->devnum, pCTCBLK->szTUNDevName, strerror( errno ) ); + sleep(1); + continue; + } + + // Wait for close to complete + while( pCTCBLK->fCloseInProgress ) + { + usleep(10000); // (give it time to complete) + } + ASSERT( pCTCBLK->fd == -1 ); // (sanity check) break; } @@ -936,25 +963,54 @@ static int ParseArgs( DEVBLK* pDEVBLK, PCTCBLK pCTCBLK, // Initialize getopt's counter. This is necessary in the case // that getopt was used previously for another device. - optind = 0; + OPTRESET(); + optind = 0; + // Check for correct number of arguments + if( argc < 2 ) + { + logmsg( _("HHCCT056E %4.4X: Incorrect number of parameters\n"), + pDEVBLK->devnum ); + return -1; + } // Compatability with old format configuration files needs to be // maintained. Old format statements have the tun character device // name as the second argument on Linux, or CTCI-W32 as the first // argument on Windows. - if( ( strncasecmp( argv[1], "/", 1 ) == 0 ) || - ( strncasecmp( argv[0], "ctci-w32", 8 ) == 0 ) ) + if( ( strncasecmp( argv[0], "/", 1 ) == 0 ) || + ( strncasecmp( pDEVBLK->typname, "CTCI-W32", 8 ) == 0 ) ) { pCTCBLK->fOldFormat = 1; - argc--; argv++; } - + else + { + // Build new argv list. + // getopt_long used to work on old format configuration statements + // because LCS was the first argument passed to the device + // initialization routine (and was interpreted by getopt* + // as the program name and ignored). Now that argv[0] is a valid + // argument, we need to shift the arguments and insert a dummy + // argv[0]; + + // Don't allow us to exceed the allocated storage (sanity check) + if( argc > (MAX_ARGS-1) ) + argc = (MAX_ARGS-1); + + for( i = argc; i > 0; i-- ) + argv[i] = argv[i - 1]; + + argc++; + argv[0] = pDEVBLK->typname; + } + // Parse any optional arguments if not old format while( !pCTCBLK->fOldFormat ) { - int iOpt; int c; +#if defined(HAVE_GETOPT_LONG) + int iOpt; + static struct option options[] = { { "dev", 1, NULL, 'n' }, @@ -970,6 +1026,9 @@ static int ParseArgs( DEVBLK* pDEVBLK, PCTCBLK pCTCBLK, c = getopt_long( argc, argv, "n:k:i:t:s:m:d", options, &iOpt ); +#else /* defined(HAVE_GETOPT_LONG) */ + c = getopt( argc, argv, "n:k:i:t:s:m:d"); +#endif /* defined(HAVE_GETOPT_LONG) */ if( c == -1 ) // No more options found break; @@ -990,7 +1049,7 @@ static int ParseArgs( DEVBLK* pDEVBLK, PCTCBLK pCTCBLK, return -1; } } -#else // !defined( WIN32 ) +#endif // defined( WIN32 ) // This is the file name of the special TUN/TAP character device if( strlen( optarg ) > sizeof( pCTCBLK->szTUNCharName ) - 1 ) { @@ -998,7 +1057,6 @@ static int ParseArgs( DEVBLK* pDEVBLK, PCTCBLK pCTCBLK, pDEVBLK->devnum, optarg ); return -1; } -#endif // defined( WIN32 ) strcpy( pCTCBLK->szTUNCharName, optarg ); break; @@ -1054,7 +1112,7 @@ static int ParseArgs( DEVBLK* pDEVBLK, PCTCBLK pCTCBLK, strcpy( pCTCBLK->szNetMask, optarg ); break; - case 'm': + case 'm': // (ignored if not Windows) if( ParseMAC( optarg, mac ) != 0 ) { logmsg( _("HHCCT056E %4.4X: Invalid MAC address %s\n"), @@ -1240,17 +1298,17 @@ static int ParseArgs( DEVBLK* pDEVBLK, PCTCBLK pCTCBLK, strcpy( pCTCBLK->szTUNCharName, *argv ); - // Kludge: This may look strange at first, but with - // TunTap32, only the last byte of the "driver IP - // address" is actually used. It's purpose is to - // generate a unique MAC for the virtual interface. - // Thus, having the same address for the adapter and - // destination is not an issue. This used to be - // generated from the guest IP address, I screwed up + // Kludge: This may look strange at first, but with + // TunTap32, only the last 3 bytes of the "driver IP + // address" is actually used. It's purpose is to + // generate a unique MAC for the virtual interface. + // Thus, having the same address for the adapter and + // destination is not an issue. This used to be + // generated from the guest IP address, I screwed up // TunTap32 V2. (JAP) // This also fixes the confusing error messages from // TunTap.c when a MAC is given for this argument. - + strcpy( pCTCBLK->szDriveIPAddr, pCTCBLK->szGuestIPAddr ); diff --git a/ctc_lcs.c b/ctc_lcs.c index 9d4634c..a2f1091 100644 --- a/ctc_lcs.c +++ b/ctc_lcs.c @@ -16,9 +16,10 @@ //#include "css_sdc.h" #include "opcode.h" +#if defined(HAVE_GETOPT_LONG) #include - -#include "if_tun.h" +#endif /* defined(HAVE_GETOPT_LONG) */ +#include "herc_getopt.h" // ==================================================================== // Declarations @@ -45,19 +46,6 @@ static char* ReadOAT( char* pszOATName, FILE* fp, char* pszBuff ); static int ParseArgs( DEVBLK* pDEVBLK, PLCSBLK pLCSBLK, int argc, char** argv ); -// -------------------------------------------------------------------- -// Device Handler Information Block -// -------------------------------------------------------------------- - -DEVHND lcs_device_hndinfo = -{ - &LCS_Init, - &LCS_ExecuteCCW, - &LCS_Close, - &LCS_Query, - NULL, NULL, NULL, NULL -}; - // ==================================================================== // // ==================================================================== @@ -69,11 +57,13 @@ DEVHND lcs_device_hndinfo = int LCS_Init( DEVBLK* pDEVBLK, int argc, BYTE *argv[] ) { PLCSBLK pLCSBLK; - PLCSDEV pDev; + PLCSDEV pLCSDev; int i; struct in_addr addr; // Work area for addresses + pDEVBLK->devtype = 0x3088; + // Housekeeping pLCSBLK = malloc( sizeof( LCSBLK ) ); if( !pLCSBLK ) @@ -142,7 +132,7 @@ int LCS_Init( DEVBLK* pDEVBLK, int argc, BYTE *argv[] ) // puke if a subsequent device number is specified in the config file // that already exists because of the OAT. - for( pDev = pLCSBLK->pDevices; pDev; pDev = pDev->pNext ) + for( pLCSDev = pLCSBLK->pDevices; pLCSDev; pLCSDev = pLCSDev->pNext ) { // The DEVBLK that was passed as an argument needs to be used last // to maintain the proper order in the device list. Each slot in the @@ -151,104 +141,102 @@ int LCS_Init( DEVBLK* pDEVBLK, int argc, BYTE *argv[] ) // the original DEVBLK is used (a non-NULL pointer telling AddDevice // to use the existing DEVBLK). - if( !pDev->pNext && pDev->bMode != LCSDEV_MODE_IP ) - pDev->pDEVBLK[0] = pDEVBLK; + if( !pLCSDev->pNext && pLCSDev->bMode != LCSDEV_MODE_IP ) + pLCSDev->pDEVBLK[0] = pDEVBLK; - AddDevice( &pDev->pDEVBLK[0], pDev->sAddr, "LCS", &lcs_device_hndinfo ); + AddDevice( &pLCSDev->pDEVBLK[0], pLCSDev->sAddr, pDEVBLK ); - if( !pDev->pDEVBLK[0] ) - // FIXME! - Need to emit an error message here. + if( !pLCSDev->pDEVBLK[0] ) + { + logmsg( _("HHCLC040E %4.4X AddDevice failed for LCSDEV %4.4X\n"), + pDEVBLK->devnum, pLCSDev->sAddr ); continue; + } // Establish SENSE ID and Command Information Word data. - SetSIDInfo( pDev->pDEVBLK[0], 0x3088, 0x60, 0x3088, 0x01 ); -// SetCIWInfo( pDev->pDEVBLK[0], 0, 0, 0x72, 0x0080 ); -// SetCIWInfo( pDev->pDEVBLK[0], 1, 1, 0x83, 0x0004 ); -// SetCIWInfo( pDev->pDEVBLK[0], 2, 2, 0x82, 0x0040 ); + SetSIDInfo( pLCSDev->pDEVBLK[0], 0x3088, 0x60, 0x3088, 0x01 ); +// SetCIWInfo( pLCSDev->pDEVBLK[0], 0, 0, 0x72, 0x0080 ); +// SetCIWInfo( pLCSDev->pDEVBLK[0], 1, 1, 0x83, 0x0004 ); +// SetCIWInfo( pLCSDev->pDEVBLK[0], 2, 2, 0x82, 0x0040 ); - pDev->pDEVBLK[0]->ctctype = CTC_LCS; - pDev->pDEVBLK[0]->ctcxmode = 1; - pDev->pDEVBLK[0]->dev_data = pDev; - pDev->pLCSBLK = pLCSBLK; - strcpy( pDev->pDEVBLK[0]->filename, pLCSBLK->pszTUNDevice ); + pLCSDev->pDEVBLK[0]->ctctype = CTC_LCS; + pLCSDev->pDEVBLK[0]->ctcxmode = 1; + pLCSDev->pDEVBLK[0]->dev_data = pLCSDev; + pLCSDev->pLCSBLK = pLCSBLK; + strcpy( pLCSDev->pDEVBLK[0]->filename, pLCSBLK->pszTUNDevice ); // If this is an IP Passthru address, we need a write address - if( pDev->bMode == LCSDEV_MODE_IP ) + if( pLCSDev->bMode == LCSDEV_MODE_IP ) { - if( !pDev->pNext ) - pDev->pDEVBLK[1] = pDEVBLK; + if( !pLCSDev->pNext ) + pLCSDev->pDEVBLK[1] = pDEVBLK; - AddDevice( &pDev->pDEVBLK[1], pDev->sAddr + 1, - "LCS", &lcs_device_hndinfo ); + AddDevice( &pLCSDev->pDEVBLK[1], pLCSDev->sAddr + 1, pDEVBLK ); - if( !pDev->pDEVBLK[1] ) + if( !pLCSDev->pDEVBLK[1] ) { // FIXME! - Need to emit an error message here. // Cant have one without the other, // so back out the previous device - // Mark device invalid - pDev->pDEVBLK[0]->pmcw.flag5 &= ~PMCW5_V; + obtain_lock(&pLCSDev->pDEVBLK[0]->lock); -#ifdef _FEATURE_CHANNEL_SUBSYSTEM - // Remove indication of CRW is pending for this device - pDev->pDEVBLK[0]->crwpending = 0; -#endif // _FEATURE_CHANNEL_SUBSYSTEM + ret_devblk(pLCSDev->pDEVBLK[0]); continue; } // Establish SENSE ID and Command Information Word data. - SetSIDInfo( pDev->pDEVBLK[1], 0x3088, 0x60, 0x3088, 0x01 ); -// SetCIWInfo( pDev->pDEVBLK[1], 0, 0, 0x72, 0x0080 ); -// SetCIWInfo( pDev->pDEVBLK[1], 1, 1, 0x83, 0x0004 ); -// SetCIWInfo( pDev->pDEVBLK[1], 2, 2, 0x82, 0x0040 ); + SetSIDInfo( pLCSDev->pDEVBLK[1], 0x3088, 0x60, 0x3088, 0x01 ); +// SetCIWInfo( pLCSDev->pDEVBLK[1], 0, 0, 0x72, 0x0080 ); +// SetCIWInfo( pLCSDev->pDEVBLK[1], 1, 1, 0x83, 0x0004 ); +// SetCIWInfo( pLCSDev->pDEVBLK[1], 2, 2, 0x82, 0x0040 ); - pDev->pDEVBLK[1]->ctctype = CTC_LCS; - pDev->pDEVBLK[1]->ctcxmode = 1; - pDev->pDEVBLK[1]->dev_data = pDev; - pDev->pLCSBLK = pLCSBLK; + pLCSDev->pDEVBLK[1]->ctctype = CTC_LCS; + pLCSDev->pDEVBLK[1]->ctcxmode = 1; + pLCSDev->pDEVBLK[1]->dev_data = pLCSDev; + pLCSDev->pLCSBLK = pLCSBLK; - strcpy( pDev->pDEVBLK[1]->filename, pLCSBLK->pszTUNDevice ); + strcpy( pLCSDev->pDEVBLK[1]->filename, pLCSBLK->pszTUNDevice ); } // Indicate that the DEVBLK(s) have been create sucessfully - pDev->fCreated = 1; + pLCSDev->fCreated = 1; // Initialize locking and event mechanisms - initialize_lock( &pDev->Lock ); - initialize_lock( &pDev->EventLock ); - initialize_condition( &pDev->Event ); + initialize_lock( &pLCSDev->Lock ); + initialize_lock( &pLCSDev->EventLock ); + initialize_condition( &pLCSDev->Event ); // Create the TAP interface (if not already created by a // previous pass. More than one interface can exist on a port. - if( !pLCSBLK->Port[pDev->bPort].fCreated ) + if( !pLCSBLK->Port[pLCSDev->bPort].fCreated ) { int rc; rc = TUNTAP_CreateInterface( pLCSBLK->pszTUNDevice, IFF_TAP | IFF_NO_PI, - &pLCSBLK->Port[pDev->bPort].fd, - pLCSBLK->Port[pDev->bPort].szNetDevName ); + &pLCSBLK->Port[pLCSDev->bPort].fd, + pLCSBLK->Port[pLCSDev->bPort].szNetDevName ); // Indicate that the port is used. - pLCSBLK->Port[pDev->bPort].fUsed = 1; - pLCSBLK->Port[pDev->bPort].fCreated = 1; + pLCSBLK->Port[pLCSDev->bPort].fUsed = 1; + pLCSBLK->Port[pLCSDev->bPort].fCreated = 1; - create_thread( &pLCSBLK->Port[pDev->bPort].tid, + create_thread( &pLCSBLK->Port[pLCSDev->bPort].tid, NULL, LCS_PortThread, - &pLCSBLK->Port[pDev->bPort] ); + &pLCSBLK->Port[pLCSDev->bPort] ); } // Add these devices to the ports device list. - pLCSBLK->Port[pDev->bPort].icDevices++; - pDev->pDEVBLK[0]->fd = pLCSBLK->Port[pDev->bPort].fd; + pLCSBLK->Port[pLCSDev->bPort].icDevices++; + pLCSDev->pDEVBLK[0]->fd = pLCSBLK->Port[pLCSDev->bPort].fd; - if( pDev->pDEVBLK[1] ) + if( pLCSDev->pDEVBLK[1] ) { - pLCSBLK->Port[pDev->bPort].icDevices++; - pDev->pDEVBLK[1]->fd = pLCSBLK->Port[pDev->bPort].fd; + pLCSBLK->Port[pLCSDev->bPort].icDevices++; + pLCSDev->pDEVBLK[1]->fd = pLCSBLK->Port[pLCSDev->bPort].fd; } } @@ -572,13 +560,13 @@ int LCS_Close( DEVBLK* pDEVBLK ) if( !pLCSBLK->pDevices ) { - if( pLCSBLK->pszTUNDevice ) + if( pLCSBLK->pszTUNDevice ) free( pLCSBLK->pszTUNDevice ); - if( pLCSBLK->pszOATFilename ) + if( pLCSBLK->pszOATFilename ) free( pLCSBLK->pszOATFilename ); - if( pLCSBLK->pszIPAddress ) + if( pLCSBLK->pszIPAddress ) free( pLCSBLK->pszIPAddress ); - if( pLCSBLK->pszMACAddress ) + if( pLCSBLK->pszMACAddress ) free( pLCSBLK->pszMACAddress ); free( pLCSBLK ); @@ -1123,6 +1111,8 @@ static void LCS_LanStats( PLCSDEV pLCSDEV, PLCSHDR pHeader ) strcpy( ifr.ifr_name, pPort->szNetDevName ); + /* Not all systems can return the hardware address of an interface. */ +#if defined(SIOCGIFHWADDR) if( TUNTAP_IOCtl( fd, SIOCGIFHWADDR, (char*)&ifr ) != 0 ) { logmsg( _("HHCLC008E ioctl error on device %s: %s.\n"), @@ -1132,6 +1122,7 @@ static void LCS_LanStats( PLCSDEV pLCSDEV, PLCSHDR pHeader ) } memcpy( pReply->MAC_Address, ifr.ifr_hwaddr.sa_data, IFHWADDRLEN ); +#endif /* defined(SIOCGIFHWADDR) */ // FIXME: Really should read /proc/net/dev and report the stats } @@ -1509,21 +1500,26 @@ int ParseArgs( DEVBLK* pDEVBLK, PLCSBLK pLCSBLK, // argv[0]; // Don't allow us to exceed the allocated storage (sanity check) - if( argc > 11 ) - argc = 11; + if( argc > (MAX_ARGS-1)) + argc = (MAX_ARGS-1); for( i = argc; i > 0; i-- ) argv[i] = argv[i - 1]; argc++; - argv[0] = "LCS"; + argv[0] = pDEVBLK->typname; // Parse the optional arguments + + OPTRESET(); + optind=0; while( 1 ) { - int iOpt; int c; +#if defined(HAVE_GETOPT_LONG) + int iOpt; + static struct option options[] = { { "dev", 1, NULL, 'n' }, @@ -1535,6 +1531,9 @@ int ParseArgs( DEVBLK* pDEVBLK, PLCSBLK pLCSBLK, c = getopt_long( argc, argv, "n:o:m:d", options, &iOpt ); +#else /* defined(HAVE_GETOPT_LONG) */ + c = getopt( argc, argv, "n:o:m:d" ); +#endif /* defined(HAVE_GETOPT_LONG) */ if( c == -1 ) break; @@ -1595,7 +1594,7 @@ int ParseArgs( DEVBLK* pDEVBLK, PLCSBLK pLCSBLK, if( inet_aton( *argv, &addr ) == 0 ) { logmsg( _("HHCLC020E %4.4X invalid IP address %s\n"), - pDEVBLK->devnum, argv[optind] ); + pDEVBLK->devnum, *argv ); return -1; } @@ -1620,7 +1619,7 @@ static int BuildOAT( char* pszOATName, PLCSBLK pLCSBLK ) char* pszKeyword; // -> Statement keyword char* pszOperand; // -> Statement operand int argc; // Number of args - char* argv[12]; // Argument array + char* argv[MAX_ARGS]; // Argument array PLCSPORT pPort; PLCSDEV pDev; @@ -1675,13 +1674,13 @@ static int BuildOAT( char* pszOATName, PLCSBLK pLCSBLK ) // Extract any arguments for( argc = 0; - argc < 12 && + argc < MAX_ARGS && ( argv[argc] = strtok( NULL, " \t" ) ) != NULL && argv[argc][0] != '#'; argc++ ); // Clear any unused argument pointers - for( i = argc; i < 12; i++ ) + for( i = argc; i < MAX_ARGS; i++ ) argv[i] = NULL; if( strcasecmp( pszKeyword, "HWADD" ) == 0 ) @@ -1976,4 +1975,74 @@ static char* ReadOAT( char* pszOATName, FILE* fp, char* pszBuff ) return pszBuff; } + + +// -------------------------------------------------------------------- +// Device Handler Information Block +// -------------------------------------------------------------------- + + +#if defined(OPTION_DYNAMIC_LOAD) +static +#endif +DEVHND lcs_device_hndinfo = +{ + &LCS_Init, + &LCS_ExecuteCCW, + &LCS_Close, + &LCS_Query, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL +}; + + +/* Libtool static name colision resolution */ +/* note : lt_dlopen will look for symbol & modulename_LTX_symbol */ +#if !defined(HDL_BUILD_SHARED) && defined(HDL_USE_LIBTOOL) +#define hdl_ddev hdt3088_LTX_hdl_ddev +#define hdl_depc hdt3088_LTX_hdl_depc +#define hdl_reso hdt3088_LTX_hdl_reso +#define hdl_init hdt3088_LTX_hdl_init +#define hdl_fini hdt3088_LTX_hdl_fini +#endif + +#if defined(OPTION_DYNAMIC_LOAD) +HDL_DEPENDENCY_SECTION; +{ + HDL_DEPENDENCY(HERCULES); + HDL_DEPENDENCY(DEVBLK); +} +END_DEPENDENCY_SECTION; + +HDL_REGISTER_SECTION; // ("Register" our entry-points) + +// Hercules's Our +// registered overriding +// entry-point entry-point +// name value + +#if defined( WIN32 ) +HDL_REGISTER ( debug_tt32_stats, display_tt32_stats ); +#endif + +END_REGISTER_SECTION; + + +HDL_DEVICE_SECTION; +{ + HDL_DEVICE(LCS, lcs_device_hndinfo ); + +// ZZ the following device types should be moved to +// ZZ their own loadable modules + HDL_DEVICE(3088, ctcadpt_device_hndinfo ); + HDL_DEVICE(CTCI, ctci_device_hndinfo ); +#if defined( WIN32 ) + HDL_DEVICE(CTCI-W32, ctci_device_hndinfo); +#endif + HDL_DEVICE(CTCT, ctct_device_hndinfo ); + HDL_DEVICE(VMNET,vmnet_device_hndinfo ); +} +END_DEVICE_SECTION; +#endif + + #endif /* !defined(__APPLE__) */ diff --git a/ctcadpt.c b/ctcadpt.c index 4b1da9d..13ae763 100644 --- a/ctcadpt.c +++ b/ctcadpt.c @@ -1,4 +1,3 @@ -// ==================================================================== // Hercules Channel-to-Channel Emulation Support // ==================================================================== // @@ -72,7 +71,7 @@ DEVHND ctcadpt_device_hndinfo = &CTCX_ExecuteCCW, &CTCX_Close, &CTCX_Query, - NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; DEVHND ctct_device_hndinfo = @@ -81,7 +80,7 @@ DEVHND ctct_device_hndinfo = &CTCX_ExecuteCCW, &CTCX_Close, &CTCX_Query, - NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; DEVHND vmnet_device_hndinfo = @@ -90,12 +89,11 @@ DEVHND vmnet_device_hndinfo = &CTCX_ExecuteCCW, &CTCX_Close, &CTCX_Query, - NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; extern DEVHND ctci_device_hndinfo; extern DEVHND lcs_device_hndinfo; -extern DEVENT device_handler_table[]; // ==================================================================== // Primary Module Entry Points @@ -107,49 +105,25 @@ extern DEVENT device_handler_table[]; int CTCX_Init( DEVBLK* pDEVBLK, int argc, BYTE *argv[] ) { - // Allow for depreciated 3088 device type - if( strcasecmp( pDEVBLK->typname, "3088" ) == 0 ) - { - // The first argument is the device emulation type - if( argc < 1 ) - { - logmsg( _("HHCCT001E %4.4X: Incorrect number of parameters\n"), - pDEVBLK->devnum ); - return -1; - } - - // Replace typname in DEVBLK with actual type. - if( strcasecmp( argv[0], "CTCI" ) == 0 || - strcasecmp( argv[0], "CTCI-W32" ) == 0 ) - pDEVBLK->typname = "CTCI"; - else if( strcasecmp( argv[0], "CTCT" ) == 0 ) - pDEVBLK->typname = "CTCT"; - else if( strcasecmp( argv[0], "LCS" ) == 0 ) - pDEVBLK->typname = "LCS"; - else - pDEVBLK->typname = "VMNET"; - } + pDEVBLK->devtype = 0x3088; - // A little slight of hand here... - // - // The table in devtype.c points all CTC emulation types - // to ctcadpt_device_hndinfo. Based on the typnam member - // of DEVBLK, substitute the proper handler entries for - // this device. - - if ( strcasecmp( pDEVBLK->typname, "CTCI" ) == 0 ) - pDEVBLK->hnd = &ctci_device_hndinfo; - else if( strcasecmp( pDEVBLK->typname, "CTCT" ) == 0 ) - pDEVBLK->hnd = &ctct_device_hndinfo; - else if( strcasecmp( pDEVBLK->typname, "LCS" ) == 0 ) - pDEVBLK->hnd = &lcs_device_hndinfo; - else if( strcasecmp( pDEVBLK->typname, "VMNET" ) == 0 ) - pDEVBLK->hnd = &vmnet_device_hndinfo; - else + // The first argument is the device emulation type + if( argc < 1 ) + { + logmsg( _("HHCCT001E %4.4X: Incorrect number of parameters\n"), + pDEVBLK->devnum ); return -1; + } - // Now call the proper device init function - return (pDEVBLK->hnd->init)( pDEVBLK, argc, argv ); + if((pDEVBLK->hnd = hdl_ghnd(argv[0]))) + { + if(pDEVBLK->hnd->init == &CTCX_Init) + return -1; + free(pDEVBLK->typname); + pDEVBLK->typname = strdup(argv[0]); + return (pDEVBLK->hnd->init)( pDEVBLK, --argc, ++argv ); + } + return -1; } // ------------------------------------------------------------------- @@ -442,16 +416,12 @@ static int CTCT_Init( DEVBLK *dev, int argc, BYTE *argv[] ) CTCG_PARMBLK parm; // Parameters for the server BYTE address[20]=""; // temp space for IP address + dev->devtype = 0x3088; + dev->ctctype = CTC_CTCT; SetSIDInfo( dev, 0x3088, 0x08, 0x3088, 0x01 ); - if( strcasecmp( argv[0], "CTCT" ) == 0 ) - { - // Shift past emulation type - argc--; argv++; - } - // Check for correct number of arguments if (argc != 4) { @@ -885,7 +855,8 @@ static void CTCT_Read( DEVBLK* pDEVBLK, U16 sCount, memset( pSegment, 0, iLength + sizeof( CTCISEG ) ); // Update next frame offset - STORE_HW( pFrame->hwOffset, iLength + sizeof( CTCIHDR ) ); + STORE_HW( pFrame->hwOffset, + iLength + sizeof( CTCIHDR ) + sizeof( CTCISEG ) ); // Store segment length STORE_HW( pSegment->hwLength, iLength + sizeof( CTCISEG ) ); @@ -897,7 +868,8 @@ static void CTCT_Read( DEVBLK* pDEVBLK, U16 sCount, memcpy( pSegment->bData, pDEVBLK->buf, iLength ); // Fix-up frame pointer and terminate block - pFrame = (PCTCIHDR)( pIOBuf + sizeof( CTCIHDR ) + iLength ); + pFrame = (PCTCIHDR)( pIOBuf + sizeof( CTCIHDR ) + + sizeof( CTCISEG ) + iLength ); STORE_HW( pFrame->hwOffset, 0x0000 ); // Calculate #of bytes returned including two slack bytes @@ -950,9 +922,9 @@ static void* CTCT_ListenThread( void* argp ) if( strcmp( str, parm.dev->filename ) != 0 ) { - logmsg( _("HHCCT023E %4.4X: Incorrect client or config error\n"), - parm.dev->devnum ); - logmsg( _(" Config=%s, connecting client=%s\n"), + logmsg( _("HHCCT023E %4.4X: Incorrect client or config error\n" + " Config=%s, connecting client=%s\n"), + parm.dev->devnum, parm.dev->filename, str); close( connfd ); } @@ -968,6 +940,8 @@ static void* CTCT_ListenThread( void* argp ) // see the possibility for bad things to occur (eg if another // Hercules tries to connect). This will also be fixed RSN. } + + return NULL; // make compiler happy } // ==================================================================== @@ -992,7 +966,7 @@ int r, i; BYTE *ipaddress; if (argc < 2) { - logmsg (_("HHCCT024E 4.4X: Not enough arguments to start vmnet\n"), + logmsg (_("HHCCT024E %4.4X: Not enough arguments to start vmnet\n"), dev->devnum); return -1; } @@ -1049,6 +1023,8 @@ U16 xdevnum; /* Pair device devnum */ BYTE c; /* tmp for scanf */ DEVBLK *xdev; /* Pair device */ + dev->devtype = 0x3088; + /* parameters for network CTC are: * devnum of the other CTC device of the pair * ipaddress @@ -1316,137 +1292,32 @@ int lastlen = 2; /* block length at last pckt */ void AddDevice( DEVBLK** ppDEVBLK, U16 sDevNum, - const char* szDevType, - DEVHND* pDevHnd ) + DEVBLK* pDevBlk ) { - DEVBLK* pDev; // -> Device block - DEVBLK** ppDev; // -> Device block address - DEVENT* pDevEntry = NULL; - int fNewDEVBLK = 0; // 1=Newly created devblk // Check whether device number has already been defined - if( find_device_by_devnum( sDevNum ) != NULL ) + if( *ppDEVBLK != NULL && find_device_by_devnum( sDevNum ) != NULL ) { logmsg( _("HHCCT034E device %4.4X already exists\n"), sDevNum ); return; } - for( pDevEntry = device_handler_table; pDevEntry->hnd; pDevEntry++ ) - if( !strcasecmp( pDevEntry->name, szDevType ) ) - break; - - if( !pDevEntry ) - { - logmsg ( _("HHCCT035E AddDevice internal error (%s).\n" ), - szDevType ); - return; - } - if( *ppDEVBLK == NULL ) { - // Attempt to reuse an existing device block - pDev = find_unused_device(); - - // If no device block is available, create a new one - if( pDev == NULL ) - { - // Obtain a device block - pDev = (DEVBLK*)malloc( sizeof( DEVBLK ) ); - - if( pDev == NULL ) - { - logmsg( _("HHCCT036E Cannot obtain device block " - "for device %4.4X: %s\n"), - sDevNum, strerror( errno ) ); - return; - } - - memset( pDev, 0, sizeof( DEVBLK ) ); - - // Indicate a newly allocated devblk - fNewDEVBLK = 1; - - // Initialize the device lock and conditions - initialize_lock( &pDev->lock ); - initialize_condition( &pDev->resumecond ); - - // Assign new subchannel number - pDev->subchan = sysblk.highsubchan++; - } - - // Obtain the device lock - obtain_lock( &pDev->lock ); + (*ppDEVBLK) = get_devblk(sDevNum); + (*ppDEVBLK)->hnd = pDevBlk->hnd; + (*ppDEVBLK)->devtype = pDevBlk->devtype; + (*ppDEVBLK)->typname = strdup(pDevBlk->typname); + // Release the just aquired devblk + release_lock( &(*ppDEVBLK)->lock ); } else - pDev = *ppDEVBLK; - - // Initialize the device block - if( pDevHnd != NULL ) - pDev->hnd = pDevHnd; - else - pDev->hnd = pDevEntry->hnd; - - pDev->msgpipew = sysblk.msgpipew; - pDev->cpuprio = sysblk.cpuprio; - pDev->devnum = sDevNum; - pDev->chanset = sDevNum >> 12; - - if( pDev->chanset >= MAX_CPU_ENGINES ) - pDev->chanset = MAX_CPU_ENGINES - 1; - - pDev->devtype = pDevEntry->type; - pDev->typname = pDevEntry->name; - - pDev->fd = -1; - - // Initialize storage view - pDev->mainstor = sysblk.mainstor; - pDev->storkeys = sysblk.storkeys; - pDev->mainlim = sysblk.mainsize - 1; - - // Initialize the path management control word - pDev->pmcw.devnum[0] = pDev->devnum >> 8; - pDev->pmcw.devnum[1] = pDev->devnum & 0xFF; - pDev->pmcw.lpm = 0x80; - pDev->pmcw.pim = 0x80; - pDev->pmcw.pom = 0xFF; - pDev->pmcw.pam = 0x80; - pDev->pmcw.chpid[0] = pDev->devnum >> 8; - - // If we acquired a new device block, add it to the chain - if( fNewDEVBLK ) { - // Search for the last device block on the chain - for( ppDev = &(sysblk.firstdev); - *ppDev != NULL; - ppDev = &((*ppDev)->nextdev) ); - - // Add the new device block to the end of the chain - *ppDev = pDev; - pDev->nextdev = NULL; + release_lock( &(*ppDEVBLK)->lock ); + if((*ppDEVBLK)->devnum != sDevNum) + define_device((*ppDEVBLK)->devnum, sDevNum); } - // Mark device valid - pDev->pmcw.flag5 |= PMCW5_V; - -#ifdef _FEATURE_CHANNEL_SUBSYSTEM - // Indicate a CRW is pending for this device - pDev->crwpending = 1; -#endif // _FEATURE_CHANNEL_SUBSYSTEM - - if( *ppDEVBLK == NULL ) - { - // Release device lock - release_lock( &pDev->lock ); - } - -#ifdef _FEATURE_CHANNEL_SUBSYSTEM - // Signal machine check - machine_check_crwpend(); -#endif // _FEATURE_CHANNEL_SUBSYSTEM - - *ppDEVBLK = pDev; - return; } diff --git a/ctcadpt.h b/ctcadpt.h index 1aad459..08ee335 100644 --- a/ctcadpt.h +++ b/ctcadpt.h @@ -80,8 +80,7 @@ extern void LCS_SDC( DEVBLK* pDEVBLK, BYTE bOpCode, extern void AddDevice( DEVBLK** ppDEVBLK, U16 sDevNum, - const char* szDevType, - DEVHND* pDevHnd ); + DEVBLK* pDevBlk ); extern int ParseMAC( char* pszMACAddr, BYTE* pbMACAddr ); extern void packet_trace( BYTE *addr, int len ); @@ -94,6 +93,10 @@ extern void packet_trace( BYTE *addr, int len ); #define FRAME_TYPE_ARP 0x0806 #define FRAME_TYPE_SNA 0x80D5 +#if !(defined(IFHWADDRLEN)) // Only predefined on Linux +#define IFHWADDRLEN 6 // Ethernet MAC address length +#endif /* !(defined(IFHWADDRLEN)) */ + typedef uint8_t MAC[IFHWADDRLEN]; // Data Type for MAC Addresses // --------------------------------------------------------------------- @@ -199,8 +202,9 @@ struct _CTCBLK fOldFormat:1, // Old Config Format fCreated:1, // Interface Created fStarted:1, // Startup Received - fDataPending:1; // Data is pending for + fDataPending:1, // Data is pending for // read device + fCloseInProgress:1; // Close in progress int iKernBuff; // Kernel buffer in K bytes. int iIOBuff; // I/O buffer in K bytes. diff --git a/dasdcat.c b/dasdcat.c index 2dde4ce..0f3a744 100644 --- a/dasdcat.c +++ b/dasdcat.c @@ -14,9 +14,11 @@ #define OPT_PDS_LISTONLY 0x8 #ifdef EXTERNALGUI +#if 0 /* Special flag to indicate whether or not we're being run under the control of the external GUI facility. */ int extgui = 0; +#endif #endif /*EXTERNALGUI*/ int end_of_track(char *ptr) @@ -55,18 +57,8 @@ int process_member(CIFBLK *cif, int noext, DSXTENT extent[], { int rc, trk, len, cyl, head, rec; BYTE *buf; - char *scodepage; - - /* set_codepage() uses the logmsg macro which requires msgpipew */ - sysblk.msgpipew = stdout; - if(!sysblk.codepage) - { - if((scodepage = getenv("HERCULES_CP"))) - set_codepage(scodepage); - else - set_codepage("default"); - } + set_codepage(NULL); trk = (ttr[0] << 8) | ttr[1]; rec = ttr[2]; diff --git a/dasdcopy.c b/dasdcopy.c index 67c48d6..1b757d8 100644 --- a/dasdcopy.c +++ b/dasdcopy.c @@ -7,21 +7,27 @@ #include "hercules.h" #include "dasdblks.h" +#include "devtype.h" + +#define FBA_BLKGRP_SIZE (120 * 512) /* Size of block group */ +#define FBA_BLKS_PER_GRP 120 /* Blocks per group */ int syntax (char *); void status (int, int); int nulltrk(BYTE *, int, int); #ifdef EXTERNALGUI +#if 0 /* Special flag to indicate whether or not we're being run under the control of the external GUI facility. */ int extgui = 0; +#endif #endif /*EXTERNALGUI*/ #define CKD 0x01 #define CCKD 0x02 #define FBA 0x04 -#define CFBA 0x06 +#define CFBA 0x08 #define CKDMASK 0x03 #define FBAMASK 0x0c #define COMPMASK 0x0a @@ -50,7 +56,8 @@ CKDDEV *ckd=NULL; /* -> CKD device table entry */ FBADEV *fba=NULL; /* -> FBA device table entry */ int i, n, max; /* Loop index, limits */ BYTE unitstat; /* Device unit status */ -char buf[512]; /* FBA i/o buffer */ +BYTE msgbuf[512]; /* Message buffer */ +size_t fba_bytes_remaining; /* FBA bytes to be copied */ #if defined(ENABLE_NLS) setlocale(LC_ALL, ""); @@ -98,8 +105,8 @@ char buf[512]; /* FBA i/o buffer */ if (argv[0][0] != '-') break; if (strcmp(argv[0], "-v") == 0) { - snprintf (buf, 512, _("Hercules %s copy program "), pgm); - display_version (stderr, buf); + snprintf (msgbuf, 512, _("Hercules %s copy program "), pgm); + display_version (stderr, msgbuf); return 0; } else if (strcmp(argv[0], "-h") == 0) @@ -109,7 +116,7 @@ char buf[512]; /* FBA i/o buffer */ } else if (strcmp(argv[0], "-q") == 0 || strcmp(argv[0], "-quiet") == 0) - quiet = 1; + quiet = 1; else if (strcmp(argv[0], "-r") == 0) r = 1; #ifdef CCKD_COMPRESS_ZLIB @@ -178,6 +185,7 @@ char buf[512]; /* FBA i/o buffer */ /* If we don't know what the input file is then find out */ if (in == 0) { + BYTE buf[8]; fd = open (ifile, O_RDONLY|O_BINARY); if (fd < 0) { @@ -233,7 +241,7 @@ char buf[512]; /* FBA i/o buffer */ /* Perform sanity checks on the options */ if ((in & CKDMASK) && !(out & CKDMASK)) return syntax(pgm); - if ((in & FBAMASK) && !(out & FBAMASK)) return syntax(pgm); + if ((in & FBAMASK) && !(out & FBAMASK)) return syntax(pgm); if (sfile && !(in & COMPMASK)) return syntax(pgm); if (comp != 255 && !(out & COMPMASK)) return syntax(pgm); if (lfs && (out & COMPMASK)) return syntax(pgm); @@ -260,7 +268,7 @@ char buf[512]; /* FBA i/o buffer */ if (ckddasd) { if (cyls < 0) cyls = idev->ckdcyls; - else if (cyls == 0) cyls = (idev->ckdused)(idev); + else if (cyls == 0) cyls = (idev->hnd->used)(idev); ckd = dasd_lookup (DASD_CKDDEV, NULL, idev->devtype, cyls); if (ckd == NULL) { @@ -278,8 +286,9 @@ char buf[512]; /* FBA i/o buffer */ } else { + fba_bytes_remaining = idev->fbanumblk * idev->fbablksiz; if (blks < 0) blks = idev->fbanumblk; - else if (blks == 0) blks = (idev->fbaused)(idev); + else if (blks == 0) blks = (idev->hnd->used)(idev); fba = dasd_lookup (DASD_FBADEV, NULL, idev->devtype, blks); if (fba == NULL) { @@ -291,6 +300,8 @@ char buf[512]; /* FBA i/o buffer */ n = blks; max = idev->fbanumblk; if (max < n && out == CFBA) n = max; + n = (n + FBA_BLKS_PER_GRP - 1) / FBA_BLKS_PER_GRP; + max = (max + FBA_BLKS_PER_GRP - 1) / FBA_BLKS_PER_GRP; } /* Create the output file */ @@ -321,6 +332,12 @@ char buf[512]; /* FBA i/o buffer */ odev = &ocif->devblk; /* Copy the files */ +#ifdef EXTERNALGUI + if (extgui) + /* Notify GUI of total #of tracks or blocks being copied... */ + fprintf (stderr, "TRKS=%d\n", n); + else +#endif /*EXTERNALGUI*/ if (!quiet) printf (_(" %3d%% %7d of %d"), 0, 0, n); for (i = 0; i < n; i++) { @@ -328,16 +345,15 @@ char buf[512]; /* FBA i/o buffer */ if (ckddasd) { if (i < max) - rc = (idev->ckdrdtrk)(idev, i / idev->ckdheads, - i % idev->ckdheads, &unitstat); - else rc = nulltrk(&idev->buf[idev->bufoff], i, idev->ckdheads); + rc = (idev->hnd->read)(idev, i, &unitstat); + else rc = nulltrk(idev->buf, i, idev->ckdheads); } else { if (i < max) - rc = (idev->fbardblk)(idev, buf, fba->size, &unitstat); + rc = (idev->hnd->read)(idev, i, &unitstat); else - memset (buf, 0, 512); + memset (idev->buf, 0, FBA_BLKGRP_SIZE); rc = 0; } if (rc < 0) @@ -352,14 +368,25 @@ char buf[512]; /* FBA i/o buffer */ /* Write the track or block just read */ if (ckddasd) { - rc = (odev->ckdrdtrk)(odev, i / idev->ckdheads, - i % idev->ckdheads, &unitstat); - if (rc == 0) - rc = (odev->ckdupdtrk)(odev, &idev->buf[idev->bufoff], + rc = (odev->hnd->write)(odev, i, 0, idev->buf, idev->ckdtrksz, &unitstat); } else - rc = (odev->fbawrblk)(odev, buf, fba->size, &unitstat); + { + if (fba_bytes_remaining >= (size_t)idev->buflen) + { + rc = (odev->hnd->write)(odev, i, 0, idev->buf, + idev->buflen, &unitstat); + fba_bytes_remaining -= (size_t)idev->buflen; + } + else + { + ASSERT(fba_bytes_remaining > 0 && (i+1) >= n); + rc = (odev->hnd->write)(odev, i, 0, idev->buf, + (int)fba_bytes_remaining, &unitstat); + fba_bytes_remaining = 0; + } + } if (rc < 0) { fprintf (stderr, _("HHCDC009E %s: %s write error %s %d " @@ -375,7 +402,6 @@ char buf[512]; /* FBA i/o buffer */ if (!quiet) printf (_("\nHHCDC010I Copy successful !!! \n")); close_image_file(icif); close_image_file(ocif); - return 0; } @@ -578,8 +604,8 @@ static char indic[] = "|/-\\"; { if (i % 100) return; fprintf (stderr, "TRK=%d\n", i); - return; - } + return; + } #endif /*EXTERNALGUI*/ // if (i % 101 != 1) return; printf ("\r%c %3d%% %7d", indic[i%4], (int)((i*100.0)/n), i); diff --git a/dasdinit.c b/dasdinit.c index 13b58bc..87666de 100644 --- a/dasdinit.c +++ b/dasdinit.c @@ -40,18 +40,50 @@ #include "dasdblks.h" #ifdef EXTERNALGUI +#if 0 /* Special flag to indicate whether or not we're being run under the control of the external GUI facility. */ int extgui = 0; +#endif #endif /*EXTERNALGUI*/ /*-------------------------------------------------------------------*/ /* Subroutine to display command syntax and exit */ /*-------------------------------------------------------------------*/ static void -argexit ( int code ) +argexit ( int code, char *m ) { - fprintf (stderr, + + switch (code) { + case 0: + fprintf (stderr, "Invalid or supported option: %s\n", + m ? m : "(null)"); + break; + case 1: + fprintf (stderr, "Invalid or missing filename: %s\n", + m ? m : "(null)"); + break; + case 2: + fprintf (stderr, "Invalid or missing device type: %s\n", + m ? m : "(null)"); + break; + case 3: + fprintf (stderr, "Invalid or missing volser: %s\n", + m ? m : "(null)"); + break; + case 4: + fprintf (stderr, "Invalid or missing size: %s\n", + m ? m : "(null)"); + break; + case 5: + fprintf (stderr, "Invalid number of arguments\n"); + break; + default: + + display_version (stderr, + "Hercules DASD image file creation program\n"); + + fprintf (stderr, "Builds an empty dasd image file:\n\n" @@ -59,10 +91,11 @@ argexit ( int code ) "where:\n\n" -#ifdef CCKD_COMPRESS_ZLIB +" -v display version info and help\n" +#ifdef HAVE_LIBZ " -z build compressed dasd image file using zlib\n" #endif -#ifdef CCKD_COMPRESS_BZIP2 +#ifdef CCKD_BZIP2 " -bz2 build compressed dasd image file using bzip2\n" #endif " -0 build compressed dasd image file with no compression\n" @@ -85,6 +118,8 @@ argexit ( int code ) " (required if model not specified else optional)\n" ); + break; + } exit(code); } /* end function argexit */ @@ -117,20 +152,20 @@ int lfs = 0; /* 1 = Build large file */ } #endif /*EXTERNALGUI*/ - /* Display the program identification message */ - display_version (stderr, - "Hercules DASD image file creation program\n"); + /* Display program identification and help */ + if (argc <= 1 || (argc == 2 && !strcmp(argv[1], "-v"))) + argexit(-1, NULL); /* Process optional arguments */ for ( ; argc > 1 && argv[1][0] == '-'; argv++, argc--) { if (strcmp("0", &argv[1][1]) == 0) comp = CCKD_COMPRESS_NONE; -#ifdef CCKD_COMPRESS_ZLIB +#ifdef HAVE_LIBZ else if (strcmp("z", &argv[1][1]) == 0) comp = CCKD_COMPRESS_ZLIB; #endif -#ifdef CCKD_COMPRESS_BZIP2 +#ifdef CCKD_BZIP2 else if (strcmp("bz2", &argv[1][1]) == 0) comp = CCKD_COMPRESS_BZIP2; #endif @@ -140,19 +175,19 @@ int lfs = 0; /* 1 = Build large file */ else if (strcmp("lfs", &argv[1][1]) == 0) lfs = 1; #endif - else argexit(0); + else argexit(0, argv[1]); } /* Check remaining number of arguments */ if (argc < 4 || argc > 5) - argexit(5); + argexit(5, NULL); /* The first argument is the file name */ if (!argv[1] || strlen(argv[1]) == 0 || strlen(argv[1]) > sizeof(fname)-1) - argexit(1); + argexit(1, argv[1]); strcpy (fname, argv[1]); @@ -160,7 +195,7 @@ int lfs = 0; /* 1 = Build large file */ with or without the model number. */ if (!argv[2]) - argexit(2); + argexit(2, argv[2]); ckd = dasd_lookup (DASD_CKDDEV, argv[2], 0, 0); if (ckd != NULL) { @@ -186,12 +221,12 @@ int lfs = 0; /* 1 = Build large file */ if (!type) /* Specified model not found */ - argexit(2); + argexit(2, argv[2]); /* The third argument is the volume serial number */ if (!argv[3] || strlen(argv[3]) == 0 || strlen(argv[3]) > sizeof(volser)-1) - argexit(3); + argexit(3, argv[3]); strcpy (volser, argv[3]); string_to_upper (volser); @@ -199,17 +234,12 @@ int lfs = 0; /* 1 = Build large file */ /* The fourth argument is the volume size */ if (argc > 4) { - U32 requested_size = 0; - if (argc > 5) - argexit(5); + argexit(5, NULL); if (!argv[4] || strlen(argv[4]) == 0 - || sscanf(argv[4], "%u%c", &requested_size, &c) != 1) - argexit(4); - - /* Use requested size only if no compression or FBA */ - if (0xff == comp || type == 'F') size = requested_size; + || sscanf(argv[4], "%u%c", &size, &c) != 1) + argexit(4, argv[4]); altcylflag = 0; } diff --git a/dasdisup.c b/dasdisup.c index 8381dd0..e2031a4 100644 --- a/dasdisup.c +++ b/dasdisup.c @@ -75,9 +75,11 @@ static BYTE *secondload[] = { static BYTE eighthexFF[] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; #ifdef EXTERNALGUI +#if 0 /* Special flag to indicate whether or not we're being run under the control of the external GUI facility. */ int extgui = 0; +#endif #endif /*EXTERNALGUI*/ #if 0 @@ -241,7 +243,7 @@ BYTE memnama[9]; /* Member name (ASCIIZ) */ dirrem = (dirptr[0] << 8) | dirptr[1]; if (dirrem < 2 || dirrem > 256) { - fprintf (stdout, "HHCDS003E Directory block byte count is invalid\n"); + fprintf (stdout, _("HHCDS003E Directory block byte count is invalid\n")); return -1; } @@ -286,7 +288,7 @@ BYTE memnama[9]; /* Member name (ASCIIZ) */ if (secondload[i] == NULL) { fprintf (stdout, - "HHCDS018I %s %s skipped\n", + _("HHCDS018I %s %s skipped\n"), memnama, ((dirent->pds2indc & PDS2INDC_ALIAS) ? "Alias" : "Member")); @@ -299,7 +301,7 @@ BYTE memnama[9]; /* Member name (ASCIIZ) */ if (n >= MAX_MEMBERS) { fprintf (stdout, - "HHCDS004E Number of members exceeds MAX_MEMBERS\n"); + _("HHCDS004E Number of members exceeds MAX_MEMBERS\n")); return -1; } @@ -308,7 +310,7 @@ BYTE memnama[9]; /* Member name (ASCIIZ) */ < 1) { fprintf (stdout, - "HHCDS005E Member %s TTR count is zero\n", memnama); + _("HHCDS005E Member %s TTR count is zero\n"), memnama); return -1; } @@ -337,7 +339,7 @@ BYTE memnama[9]; /* Member name (ASCIIZ) */ if ((dirent->pds2usrd[8] & 0x01) == 0 || totlen != txtlen) { fprintf (stdout, - "HHCDS006W Member %s is not single text record\n", + _("HHCDS006W Member %s is not single text record\n"), memnama); memtab[n].multitxt = 1; } @@ -346,8 +348,8 @@ BYTE memnama[9]; /* Member name (ASCIIZ) */ if (totlen > 255*8) { fprintf (stdout, - "HHCDS007W Member %s size %4.4X " - "exceeds X\'7F8\' bytes\n", + _("HHCDS007W Member %s size %4.4X " + "exceeds X\'7F8\' bytes\n"), memnama, totlen); } @@ -355,8 +357,8 @@ BYTE memnama[9]; /* Member name (ASCIIZ) */ if (totlen & 0x7) { fprintf (stdout, - "HHCDS008W Member %s size %4.4X " - "is not a multiple of 8\n", + _("HHCDS008W Member %s size %4.4X " + "is not a multiple of 8\n"), memnama, totlen); } @@ -409,14 +411,14 @@ BYTE refnama[9]; /* Referred name (ASCIIZ) */ /* Skip the member if it is an alias */ if (memp->alias) { - fprintf (stdout, "HHCDS009I Alias %s skipped\n", memnama); + fprintf (stdout, _("HHCDS009I Alias %s skipped\n"), memnama); return 0; } /* Skip the member if it has no XCTL table */ if (memp->notable) { - fprintf (stdout, "HHCDS010I Member %s skipped\n", memnama); + fprintf (stdout, _("HHCDS010I Member %s skipped\n"), memnama); return 0; } @@ -424,7 +426,7 @@ BYTE refnama[9]; /* Referred name (ASCIIZ) */ if (memp->multitxt) { fprintf (stdout, - "HHCDS011E Member %s has multiple text records\n", + _("HHCDS011E Member %s has multiple text records\n"), memnama); return -1; } @@ -436,14 +438,14 @@ BYTE refnama[9]; /* Referred name (ASCIIZ) */ if (rc < 0) { fprintf (stdout, - "HHCDS012E Member %s has invalid TTR %4.4X%2.2X\n", + _("HHCDS012E Member %s has invalid TTR %4.4X%2.2X\n"), memnama, trk, rec); return -1; } fprintf (stdout, - "HHCDS013I Processing member %s text record TTR=%4.4X%2.2X " - "CCHHR=%4.4X%4.4X%2.2X\n", + _("HHCDS013I Processing member %s text record TTR=%4.4X%2.2X " + "CCHHR=%4.4X%4.4X%2.2X\n"), memnama, trk, rec, cyl, head, rec); /* Read the text record */ @@ -452,7 +454,7 @@ BYTE refnama[9]; /* Referred name (ASCIIZ) */ if (rc != 0) { fprintf (stdout, - "HHCDS014E Member %s error reading TTR %4.4X%2.2X\n", + _("HHCDS014E Member %s error reading TTR %4.4X%2.2X\n"), memnama, trk, rec); return -1; } @@ -461,8 +463,8 @@ BYTE refnama[9]; /* Referred name (ASCIIZ) */ if (len < 8 || len > 1024 || (len & 0x7)) { fprintf (stdout, - "HHCDS015E Member %s TTR %4.4X%2.2X " - "text record length %4.4X is not valid\n", + _("HHCDS015E Member %s TTR %4.4X%2.2X " + "text record length %4.4X is not valid\n"), memnama, trk, rec, len); return -1; } @@ -471,9 +473,9 @@ BYTE refnama[9]; /* Referred name (ASCIIZ) */ if (len != memp->dwdsize * 8) { fprintf (stdout, - "HHCDS016E Member %s TTR %4.4X%2.2X " + _("HHCDS016E Member %s TTR %4.4X%2.2X " "text record length %4.4X does not match " - "length %4.4X in directory\n", + "length %4.4X in directory\n"), memnama, trk, rec, len, memp->dwdsize * 8); return -1; } @@ -516,8 +518,8 @@ BYTE refnama[9]; /* Referred name (ASCIIZ) */ if (xctloff >= len - 10) { fprintf (stdout, - "HHCDS017E Member %s TTR %4.4X%2.2X " - "XCTL table improperly terminated\n", + _("HHCDS017E Member %s TTR %4.4X%2.2X " + "XCTL table improperly terminated\n"), memnama, trk, rec); return -1; } @@ -538,7 +540,7 @@ BYTE refnama[9]; /* Referred name (ASCIIZ) */ /* Display XCTL table entry */ fprintf (stdout, - "HHCDS019I In member %s: %s TTRL=%2.2X%2.2X%2.2X%2.2X", + _("HHCDS019I In member %s: %s TTRL=%2.2X%2.2X%2.2X%2.2X"), memnama, refnama, blkptr[xctloff+2], blkptr[xctloff+3], blkptr[xctloff+4], blkptr[xctloff+5]); @@ -615,6 +617,12 @@ CIFBLK *cif; /* CKD image file descriptor */ MEMINFO *memtab; /* -> Member info array */ int nmem = 0; /* Number of array entries */ +#if defined(ENABLE_NLS) + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); +#endif + #ifdef EXTERNALGUI if (argc >= 1 && strncmp(argv[argc-1],"EXTERNALGUI",11) == 0) { @@ -648,7 +656,7 @@ int nmem = 0; /* Number of array entries */ if (memtab == NULL) { fprintf (stdout, - "HHCDS001E Cannot obtain storage for member array: %s\n", + _("HHCDS001E Cannot obtain storage for member array: %s\n"), strerror(errno)); return -1; } @@ -700,7 +708,7 @@ int nmem = 0; /* Number of array entries */ } /* end while */ fprintf (stdout, - "HHCDS002I End of directory: %d members selected\n", + _("HHCDS002I End of directory: %d members selected\n"), nmem); #ifdef EXTERNALGUI diff --git a/dasdload.c b/dasdload.c index 5ff6ea2..b1fbb69 100644 --- a/dasdload.c +++ b/dasdload.c @@ -129,9 +129,11 @@ BYTE noiplccw2[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; int infolvl = 1; #ifdef EXTERNALGUI +#if 0 /* Special flag to indicate whether or not we're being run under the control of the external GUI facility. */ int extgui = 0; +#endif #endif /*EXTERNALGUI*/ /*-------------------------------------------------------------------*/ @@ -143,10 +145,23 @@ argexit ( int code ) fprintf (stderr, "dasdload creates a DASD image file from a list " "of TSO XMIT files\n" - "Syntax:\tdasdload ctlfile outfile [msglevel]\n" + "Syntax:\tdasdload [options] ctlfile outfile [msglevel]\n" "where:\tctlfile = name of input control file\n" "\toutfile = name of DASD image file to be created\n" - "\tmsglevel = Value 0-5 controls output verbosity\n"); + "\tmsglevel = Value 0-5 controls output verbosity\n" + "\noptions:\n" + "\t-0: no compression (default)\n" + "\t-a: output disk will include alternate cylinders\n" +#ifdef CCKD_COMPRESS_ZLIB + "\t-z: compress using zlib\n" +#endif +#ifdef CCKD_COMPRESS_BZIP2 + "\t-bz2: compress using bzip2\n" +#endif +#if _FILE_OFFSET_BITS == 64 || defined(_LARGE_FILES) + "\t-lfs: create single large output file\n" +#endif + ); exit(code); } /* end function argexit */ @@ -502,6 +517,10 @@ int rc; /* Return code */ UNREFERENCED(ofname); UNREFERENCED(trklen); + /* Don't overwrite HA */ + if (*usedv == 0) + *usedv = CKDDASD_TRKHDR_SIZE; + /* Build end of track marker at end of buffer */ memcpy (cif->trkbuf + *usedv, eighthexFF, 8); cif->trkmodif = 1; @@ -1519,17 +1538,8 @@ int offset; /* Offset into text unit */ U16 len; /* Field length */ BYTE *name; /* Text unit name */ BYTE c, hex[17], chars[9]; /* Character work areas */ -char *scodepage; - /* set_codepage() uses the logmsg macro which requires msgpipew */ - sysblk.msgpipew = stdout; - if(!sysblk.codepage) - { - if((scodepage = getenv("HERCULES_CP"))) - set_codepage(scodepage); - else - set_codepage("default"); - } + set_codepage(NULL); /* Error if remaining length is insufficient for header */ if (bufrem < 4) @@ -2152,17 +2162,8 @@ int dirrem; /* Number of bytes remaining */ PDSDIR *dirent; /* -> Directory entry */ BYTE memname[9]; /* Member name (ASCIIZ) */ BYTE c, hex[49], chars[25]; /* Character work areas */ -char *scodepage; - /* set_codepage() uses the logmsg macro which requires msgpipew */ - sysblk.msgpipew = stdout; - if(!sysblk.codepage) - { - if((scodepage = getenv("HERCULES_CP"))) - set_codepage(scodepage); - else - set_codepage("default"); - } + set_codepage(NULL); /* Check for end of directory */ @@ -2895,6 +2896,13 @@ COPYR1 *copyr1; /* -> header record 1 */ } /* end while(1) */ + /* Check for unsupported xmit utility */ + if (method == METHOD_XMIT && copyfiln == 0) + { + XMERRF ("HHCDL130W WARNING -- XMIT file utility is not IEBCOPY;" + " file %s not loaded\n", xfname); + } + /* Return the last record number and track balance */ *lastrec = outrec; *trkbal = outtrkbr; diff --git a/dasdls.c b/dasdls.c index db88d71..a39f382 100644 --- a/dasdls.c +++ b/dasdls.c @@ -10,9 +10,11 @@ static int needsep = 0; /* Write newline separator next time */ #ifdef EXTERNALGUI +#if 0 /* Special flag to indicate whether or not we're being run under the control of the external GUI facility. */ int extgui = 0; +#endif #endif /*EXTERNALGUI*/ int end_of_track(char *ptr) diff --git a/dasdpdsu.c b/dasdpdsu.c index 8c64595..49d851e 100644 --- a/dasdpdsu.c +++ b/dasdpdsu.c @@ -26,9 +26,11 @@ static BYTE asciiflag = 0; /* 1=Translate to ASCII */ static BYTE eighthexFF[] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; #ifdef EXTERNALGUI +#if 0 /* Special flag to indicate whether or not we're being run under the control of the external GUI facility. */ int extgui = 0; +#endif #endif /*EXTERNALGUI*/ /*-------------------------------------------------------------------*/ diff --git a/dasdseq.c b/dasdseq.c new file mode 100644 index 0000000..1a21fdb --- /dev/null +++ b/dasdseq.c @@ -0,0 +1,1188 @@ +/* Code borrowed from dasdpdsu Copyright 1999-2003 Roger Bowler */ +/* Changes and additions Copyright 2001-2003, James M. Morrison */ + +/*-------------------------------------------------------------------*/ +/* */ +/* dasdseq */ +/* */ +/* This program retrieves a sequential (DSORG=PS) dataset from */ +/* a Hercules CKD/CCKD volume. The input file is assumed to be */ +/* encoded in the EBCDIC character set. */ +/* */ +/*-------------------------------------------------------------------*/ + +// We don't use some of the regular Hercules dasd routines because +// we want the DSCB as read from dasd so we can check some of the +// file attributes (such as DSORG, RECFM, LRECL). + +// Dasdseq now uses the same case for the output dataset as the +// user specifies on the command line. Prior versions always +// used upper case, which seems unnecessarily loud. + +#include "hercules.h" + +typedef struct _DASD_VOL_LABEL { + + /* dasd cyl 0 trk 0 record 3 */ + /* identifies volser, owner, and VTOC location */ + /* recorded in EBCDIC; 80 bytes in length */ + + BYTE vollabi[3]; // c'VOL' + BYTE volno; // volume label sequence # + BYTE volserno[6]; // volume serial + BYTE resv1; // reserved; must be recorded + // as EBCDIC c'0' 0xF0 + BYTE volvtoc[5]; // CCHHR of VTOC's F4DSCB + BYTE resv2[5]; // reserved; must be recorded + // as EBCDIC blanks 0x40 + BYTE resv3[20]; // reserved; must be recorded + // as EBCDIC blanks 0x40 + BYTE volowner[10]; // volume owner + BYTE resv4[29]; // reserved; must be recorded + // as EBCDIC blanks 0x40 +} DASD_VOL_LABEL; + +#include "dasdblks.h" + +#ifndef MAX_EXTENTS // see getF3dscb for notes +#define MAX_EXTENTS 123 // maximum supported dataset extents +#endif + +typedef struct _DADSM { + DASD_VOL_LABEL volrec; // volume label record + FORMAT4_DSCB f4buf; // F4 DSCB + DSXTENT f4ext; // VTOC extent info + FORMAT3_DSCB f3buf; // F3 DSCB + FORMAT1_DSCB f1buf; // F1 DSCB + int f1numx; // # valid dataset extents + DSXTENT f1ext[MAX_EXTENTS]; // dsn extent info +} DADSM; + +//---------------------------------------------------------------------------------- +// Globals +//---------------------------------------------------------------------------------- +// ISW - Added extgui for EXTERNALGUI to allow for Windows build +#ifdef EXTERNALGUI +#if 0 + int extgui; // extgui flag for GUI support +#endif +#endif + int local_verbose = 0; // verbose setting + int copy_verbose = 0; // verbose setting for copyfile + char *din; // dasd image filename + char *sfn; // shadow file parm + int absvalid = 0; // 1 = -abs specified, use CCHH not dsn + char *argdsn; // MVS dataset name + int expert = 0; // enable -abs help + int tran_ascii = 0; // 1 = ascii output + +#ifdef DEBUG + int debug = 1; // enable debug code +#else + int debug = 0; // disable debug code +#endif + +void sayext(int max, DSXTENT *extent) { + int i; + fprintf(stderr, " EXTENT --begin-- ---end---\n"); + fprintf(stderr, "TYPE NUMBER CCCC HHHH CCCC HHHH\n"); + for (i = 0; i < max; i++) { + int bcyl = (extent[i].xtbcyl[0] << 8) | extent[i].xtbcyl[1]; + int btrk = (extent[i].xtbtrk[0] << 8) | extent[i].xtbtrk[1]; + int ecyl = (extent[i].xtecyl[0] << 8) | extent[i].xtecyl[1]; + int etrk = (extent[i].xtetrk[0] << 8) | extent[i].xtetrk[1]; + fprintf(stderr, " %2.2X %2.2X %4.4X %4.4X %4.4X %4.4X\n", + extent[i].xttype, extent[i].xtseqn, bcyl, btrk, ecyl, etrk); + } +} /* sayext */ + +//---------------------------------------------------------------------------------- +// Display selected F1 DSCB information +//---------------------------------------------------------------------------------- + +void showf1( FILE *fmsg, + FORMAT1_DSCB *f1dscb, + DSXTENT extent[], + int verbose) { + + int i, dsorg, lrecl, blksize, volseq, x, y, num_extents; + BYTE volser[sizeof(f1dscb->ds1dssn) + 1]; + BYTE dsn[sizeof(f1dscb->ds1dsnam) + 1]; + BYTE txtcredt[9]; // creation date + BYTE txtexpdt[9] = "(n/a)"; // expiration date + BYTE txtscr[20]; + BYTE txtsyscd[14]; + BYTE txtdsorg[5] = ""; // dsorg text + BYTE txtrecfm[5] = ""; // recfm text + + if (verbose > 2) { + fprintf(fmsg, "showf1 F1 DSCB\n"); + data_dump(f1dscb, sizeof(FORMAT1_DSCB)); + } + make_asciiz(dsn, sizeof(dsn), + f1dscb->ds1dsnam, sizeof(f1dscb->ds1dsnam)); + make_asciiz(volser, sizeof(volser), + f1dscb->ds1dssn, sizeof(f1dscb->ds1dssn)); + volseq = (f1dscb->ds1volsq[0] << 8) | (f1dscb->ds1volsq[1]); + x = f1dscb->ds1credt[0] + 1900; + y = (f1dscb->ds1credt[1] << 8) | f1dscb->ds1credt[2]; + sprintf(txtcredt, "%4.4d", x); + strcat(txtcredt, "."); + sprintf(txtscr, "%3.3d", y); + strcat(txtcredt, txtscr); + if (f1dscb->ds1expdt[0] || f1dscb->ds1expdt[1] || f1dscb->ds1expdt[2]) { + x = f1dscb->ds1expdt[0] + 1900; + y = (f1dscb->ds1expdt[1] << 8) | f1dscb->ds1expdt[2]; + sprintf(txtexpdt, "%4.4d", x); + strcat(txtexpdt, "."); + sprintf(txtscr, ".%3.3d", y); + strcat(txtexpdt, txtscr); + } + num_extents = f1dscb->ds1noepv; +// Field ignored: ds1nobdb (# bytes used in last PDS dir blk) + make_asciiz(txtsyscd, sizeof(txtsyscd), + f1dscb->ds1syscd, sizeof(f1dscb->ds1syscd)); + + dsorg = (f1dscb->ds1dsorg[0] << 8) | (f1dscb->ds1dsorg[1]); + if (dsorg & (DSORG_IS * 256)) strcpy(txtdsorg, "ISAM"); + if (dsorg & (DSORG_PS * 256)) strcpy(txtdsorg, "PS"); + if (dsorg & (DSORG_DA * 256)) strcpy(txtdsorg, "DA"); + if (dsorg & (DSORG_PO * 256)) strcpy(txtdsorg, "PO"); + if (dsorg & DSORG_AM) strcpy(txtdsorg, "VSAM"); + if (txtdsorg[0] == '\0') strcpy(txtdsorg, "?"); + if (dsorg & (DSORG_U * 256)) strcat(txtdsorg, "-Unmovable"); + + if (f1dscb->ds1recfm & RECFM_FORMAT_F) strcpy(txtrecfm, "F"); + if (f1dscb->ds1recfm & RECFM_FORMAT_V) strcpy(txtrecfm, "V"); + if ((f1dscb->ds1recfm & RECFM_FORMAT_U) == RECFM_FORMAT_U) + strcpy(txtrecfm, "U"); + if (f1dscb->ds1recfm & RECFM_BLOCKED) strcat(txtrecfm, "B"); + if (f1dscb->ds1recfm & RECFM_SPANNED) strcat(txtrecfm, "S"); + if (f1dscb->ds1recfm & RECFM_CTLCHAR_A) strcat(txtrecfm, "A"); + if (f1dscb->ds1recfm & RECFM_CTLCHAR_M) strcat(txtrecfm, "M"); + if (f1dscb->ds1recfm & RECFM_TRKOFLOW) strcat(txtrecfm, "-Track overflow"); +// Field ignored: ds1optcd (option codes, same as in DCB) + blksize = (f1dscb->ds1blkl[0] << 8) | f1dscb->ds1blkl[1]; + lrecl = (f1dscb->ds1lrecl[0] << 8) | f1dscb->ds1lrecl[1]; +// Field ignored: ds1keyl (key length) +// Field ignored: ds1rkp (relative key position) +// Field ignored: ds1dsind (data set indicators) +// Field ignored: ds1scalo (secondary allocation) +// Field ignored: ds1lstar (pointer to last written block; ttr) +// Field ignored: ds1trbal (bytes remaining on last track used) +// Extent information was passed to us, so we ignore what's in F1DSCB + + fprintf(fmsg, "Dataset %s on volume %s sequence %d\n", dsn, volser, volseq); + fprintf(fmsg, "Created %s expires %s\n", txtcredt, txtexpdt); + fprintf(fmsg, "Dsorg=%s recfm=%s lrecl=%d blksize=%d\n", + txtdsorg, txtrecfm, lrecl, blksize); + fprintf(fmsg, "System code %s\n", txtsyscd); + if (verbose > 1) { + fprintf(stderr, "Dataset has %d extent(s)\n", num_extents); + if (verbose > 2) + data_dump((void *)extent, sizeof(extent) * MAX_EXTENTS); + fprintf(stderr, "Extent Information:\n"); + fprintf(stderr, " EXTENT --begin-- ---end---\n"); + fprintf(stderr, "TYPE NUMBER CCCC HHHH CCCC HHHH\n"); + for (i = 0; i < num_extents; i++) { + int bcyl = (extent[i].xtbcyl[0] << 8) | extent[i].xtbcyl[1]; + int btrk = (extent[i].xtbtrk[0] << 8) | extent[i].xtbtrk[1]; + int ecyl = (extent[i].xtecyl[0] << 8) | extent[i].xtecyl[1]; + int etrk = (extent[i].xtetrk[0] << 8) | extent[i].xtetrk[1]; + fprintf(stderr, " %2.2X %2.2X %4.4X %4.4X %4.4X %4.4X\n", + extent[i].xttype, extent[i].xtseqn, bcyl, btrk, ecyl, etrk); + } + } + return; +} /* showf1 */ + +//---------------------------------------------------------------------------------- +// Copy DSORG=PS RECFM=F[B] dataset to output file +// +// Input: +// fout FILE * (opened "w" for ascii, "wb" for ebcdic) +// cif dasdutil control block +// f1dscb F1 DSCB +// extent dataset extent array +// tran 0 = ebcdic output, 1 = ascii output +// ascii output will have trailing blanks removed +// verbose 0 = no status messages +// 1 = status messages +// > 1 debugging messages +// > 2 dump read record +// > 3 dump written record +// > 4 dump read record from input buffer +// Output: +// File written, messages displayed on stderr +// Returns -1 on error, else returns # records written +// Notes: +// Caller is responsible for opening and closing fout. +// +// The F1 DSCB's DS1LSTAR field is used to determine EOF (absent a prior +// EOF being encountered), since some datasets don't have an EOF marker +// present. On my MVSRES, for instance, SYS1.BRODCAST has no EOF marker. +// +// 2003-01-14 jmm DS1LSTAR may be zero; if so, ignore DS1LSTAR and +// hope for valid EOF. +//---------------------------------------------------------------------------------- + +int fbcopy( FILE *fout, + CIFBLK *cif, + DADSM *dadsm, + int tran, + int verbose) { + + FORMAT1_DSCB *f1dscb = &dadsm->f1buf; + DSXTENT extent[MAX_EXTENTS]; + int rc, trk = 0, trkconv = 999, rec = 1; + int cyl = 0, head = 0, rc_rb, len, offset; + int rc_copy = 0; + int recs_written = 0, lrecl, num_extents; + int lstartrack = 0, lstarrec = 0, lstarvalid = 0; + BYTE *buffer, *pascii = NULL; + BYTE zdsn[sizeof(f1dscb->ds1dsnam) + 1]; // ascii dsn + + // Kludge to avoid rewriting this code (for now): + memcpy(&extent, (void *)&(dadsm->f1ext), sizeof(extent)); + + num_extents = f1dscb->ds1noepv; + lrecl = (f1dscb->ds1lrecl[0] << 8) | (f1dscb->ds1lrecl[1]); + if (absvalid) { + strcpy(zdsn, argdsn); + if (debug) fprintf(stderr, "fbcopy absvalid\n"); + } else { + make_asciiz(zdsn, sizeof(zdsn), + f1dscb->ds1dsnam, sizeof(f1dscb->ds1dsnam)); + if ((f1dscb->ds1lstar[0] !=0) || + (f1dscb->ds1lstar[1] != 0) || + (f1dscb->ds1lstar[2] != 0)) { + lstartrack = (f1dscb->ds1lstar[0] << 8) | (f1dscb->ds1lstar[1]); + lstarrec = f1dscb->ds1lstar[2]; + lstarvalid = 1; // DS1LSTAR valid + } + } + if (debug) { + fprintf(stderr, "fbcopy zdsn %s\n", zdsn); + fprintf(stderr, "fbcopy num_extents %d\n", num_extents); + fprintf(stderr, "fbcopy lrecl %d\n", lrecl); + fprintf(stderr, "fbcopy F1 DSCB\n"); + data_dump(f1dscb, sizeof(FORMAT1_DSCB)); + sayext(num_extents, (void *)&extent); + } + if (verbose) // DS1LSTAR = last block written TTR + fprintf(stderr, + "fbcopy DS1LSTAR %2.2X%2.2X%2.2X lstartrack %d " + "lstarrec %d lstarvalid %d\n", + f1dscb->ds1lstar[0], f1dscb->ds1lstar[1], f1dscb->ds1lstar[2], + lstartrack, lstarrec, lstarvalid); + + if (tran) { // need ASCII translation buffer? + pascii = malloc(lrecl + 1); + if (pascii == NULL) { + fprintf(stderr, "fbcopy unable to allocate ascii buffer\n"); + return -1; + } + } + + while (1) { // output records until something stops us + +// Honor DS1LSTAR when valid + + if ((lstarvalid) && (trk == lstartrack) && (rec > lstarrec)) { + if (verbose) + fprintf(stderr, "fbcopy DS1LSTAR indicates EOF\n" + "fbcopy DS1LSTAR %2.2X%2.2X%2.2X " + "track %d record %d\n", + f1dscb->ds1lstar[0], f1dscb->ds1lstar[1], + f1dscb->ds1lstar[2], trk, rec); + rc_copy = recs_written; + break; + } + +// Convert TT to CCHH for upcoming read_block call + + if (trkconv != trk) { // avoid converting for each block + trkconv = trk; // current track converted + rc = convert_tt(trk, num_extents, extent, cif->heads, &cyl, &head); + if (rc < 0) { + fprintf(stderr, + "fbcopy convert_tt track %5.5d, rc %d\n", trk, rc); + if (absvalid) + rc_copy = recs_written; + else + rc_copy = -1; + break; + } + if (verbose > 1) + fprintf(stderr, "fbcopy convert TT %5.5d CCHH %4.4X %4.4X\n", + trk, cyl, head); + } + +// Read block from dasd + + if (verbose > 2) + fprintf(stderr, "fbcopy reading track %d " + "record %d CCHHR = %4.4X %4.4X %2.2X\n", + trk, rec, cyl, head, rec); + rc_rb = read_block(cif, cyl, head, rec, NULL, NULL, &buffer, &len); + if (rc_rb < 0) { // error + fprintf(stderr, "fbcopy error reading %s, rc %d\n", zdsn, rc_rb); + rc_copy = -1; + break; + } + +// Handle end of track return from read_block + + if (rc_rb > 0) { // end of track + if (verbose > 2) + fprintf(stderr, "fbcopy End Of Track %d rec %d\n", trk, rec); + trk++; // next track + rec = 1; // record 1 on new track + continue; + } + +// Check for dataset EOF + + if (len == 0) { // EOF + if (verbose) + fprintf(stderr, "fbcopy EOF track %5.5d rec %d\n", trk, rec); + if (absvalid) { // capture as much -abs data as possible + if (verbose) fprintf(stderr, "fbcopy ignoring -abs EOF\n"); + } else { + rc_copy = recs_written; + break; + } + } + if (verbose > 3) + fprintf(stderr, "fbcopy read %d bytes\n", len); + if (verbose > 2) { + data_dump(buffer, len); + fprintf(stderr, "\n"); + } + +// Deblock input dasd block, write records to output dataset + + for (offset = 0; offset < len; offset += lrecl) { + if (verbose > 3) { + fprintf(stderr, "fbcopy offset %d length %d rec %d\n", + offset, lrecl, recs_written); + } + + if (tran) { // ASCII output + memset(pascii, 0, lrecl + 1); + make_asciiz(pascii, lrecl + 1, buffer + offset, lrecl); + if (verbose > 4) { + fprintf(stderr, "fbcopy buffer offset %d rec %d\n", + offset, rec); + data_dump(buffer + offset, lrecl); + } + if (verbose > 3) { + fprintf(stderr, "->%s<-\n", pascii); + data_dump(pascii, lrecl); + } + fprintf(fout, "%s\n", pascii); + + } else { // EBCDIC output + if (verbose > 3) { + fprintf(stderr, "fbcopy EBCDIC buffer\n"); + data_dump(buffer + offset, lrecl); + } + fwrite(buffer + offset, lrecl, 1, fout); + } + if (ferror(fout)) { + fprintf(stderr, "fbcopy error writing %s\n", zdsn); + fprintf(stderr, "%s\n", strerror(errno)); + rc_copy = -1; + } + recs_written++; + } + if (rc_copy != 0) + break; + else + rec++; // next record on track + } /* while (1) */ + if (pascii) + free(pascii); // release ASCII conversion buffer + return rc_copy; + +} /* fbcopy */ + +//---------------------------------------------------------------------------------- +// Given extent information, place it into appropriate extent table entry +//---------------------------------------------------------------------------------- + +void makext( + int i, // extent # + int heads, // # heads per cylinder on device + DSXTENT *extent, // extent table entry + int startcyl, // start cylinder + int starttrk, // start track + int size) { // extent size in tracks + + int endcyl = ((startcyl * heads) + starttrk + size - 1) / heads; + int endtrk = ((startcyl * heads) + starttrk + size - 1) % heads; + + if (i > (MAX_EXTENTS - 1)) { + fprintf(stderr, + "makext extent # parm invalid %d, abort\n", i); + exit(4); + } + + extent[i].xttype = 1; // extent type + extent[i].xtseqn = i; // extent # (relative zero) + + extent[i].xtbcyl[0] = startcyl >> 8; // begin cyl + extent[i].xtbcyl[1] = startcyl - ((startcyl / 256) * 256); + extent[i].xtbtrk[0] = starttrk >> 8; + extent[i].xtbtrk[1] = starttrk - ((starttrk / 256) * 256); + + extent[i].xtecyl[0] = endcyl >> 8; // end cyl + extent[i].xtecyl[1] = endcyl - ((endcyl / 256) * 256); + extent[i].xtetrk[0] = endtrk >> 8; + extent[i].xtetrk[1] = endtrk - ((endtrk / 256) * 256); // end track + return; +} /* makext */ + +//---------------------------------------------------------------------------------- +// showhelp - display syntax help +//---------------------------------------------------------------------------------- + +void showhelp() { + + fprintf(stderr, (expert) ? + "Usage: dasdseq [-debug] [-expert] [-ascii] image [sf=shadow] [attr] filespec\n" + " -debug optional - Enables debug mode, additional debug help appears\n" + : + "Usage: dasdseq [-expert] [-ascii] image [sf=shadow] filespec\n"); + fprintf(stderr, + " -expert optional - Additional help describes expert operands\n" + " -ascii optional - translate output file to ascii, trim trailing blanks\n" + " image required - [path/]filename of dasd image file (dasd volume)\n" + " shadow optional - [path/]filename of shadow file (note sf=)\n"); + if (expert) + fprintf(stderr, + " ALL EXPERT FACILITIES ARE EXPERIMENTAL\n" + " attr optional - dataset attributes (only useful with -abs)\n" + " attr syntax: [-recfm fb] [-lrecl aa]\n" + " -recfm designates RECFM, reserved for future support\n" + " fb - fixed, blocked (only RECFM currently supported)\n" + " -lrecl designates dataset LRECL\n" + " aa - decimal logical record length (default 80)\n" + " Blocksize need not be specified; dasdseq handles whatever\n" + " block size comes off the volume.\n" + " filespec required (optional sub-operands in the following order):\n" + " [-heads xx]\n" + " [-abs cc hh tt] [...] [-abs cc hh tt ]\n" + " filename\n" + " When -abs is -not- specified,\n" + " Filename specifies the MVS DSORG=PS dataset on the volume.\n" + " The dasd image volume containing the dataset must have a valid VTOC\n" + " structure, and a F1 DSCB describing the dataset.\n" + " Specifying -debug will (eventually) display extent information.\n" + " When -abs is specified, each -abs group specifies one dataset extent.\n" + " For multi-extent datasets, -abs groups may be repeated as needed,\n" + " in the order in which the dataset's extents occur.\n" + " A maximum of %d extents are supported.\n" + " No VTOC structure is implied, a F1 DSCB will not be sought.\n" + " Dasdseq will frequently report 'track not found in extent table'\n" + " (along with a message from fbcopy about rc -1 from convert_tt)\n" + " due to potentially missing EOF markers in the extent, and the\n" + " fact that the F1 DSCB DS1LSTAR field is not valid.\n" + " Check your output file before you panic.\n" + " Fbcopy ignores EOF, in case you are attempting to recovery PDS\n" + " member(s) from a damaged dasd volume, preferring to wait until\n" + " all tracks in the extent have been processed.\n" + " Tracks containing PDS members may have more than one EOF per track.\n" + " Expect a lot of associated manual effort with -abs.\n" + " -heads defines # tracks per cylinder on device;\n" + " xx - decimal number of heads per cylinder on device\n" + " default xx = 15 (valid for 3380s, 3390s)\n" + " -abs indicates the beginning of each extent's location in terms of\n" + " absolute dasd image location.\n" + " cc - decimal cylinder number (relative zero)\n" + " hh - decimal head number (relative zero)\n" + " tt - decimal number of tracks in extent\n" + " filename will be the filename of the output file in the current directory;\n" + " output filename in the same case as the command line filename.\n", + MAX_EXTENTS); + else fprintf(stderr, + " filespec required - MVS dataset name of DSORG=PS dataset, output filename\n"); + if (debug) + fprintf(stderr, "\n" + "Debugging options (at end of dasdseq command)\n" + " [verbose [x [y [z]]]]\n\n" + " verbose debug output level (default = 0 when not specified)\n" + " x main program (default = 1 when verbose specified)\n" + " y copyfile + showf1\n" + " z dasdutil\n" + " Higher numbers produces more output\n"); + return; +} /* showhelp */ + +//---------------------------------------------------------------------------------- +// parsecmd - parse command line; results stored in program globals +//---------------------------------------------------------------------------------- + +int parsecmd(int argc, char **argv, DADSM *dadsm) { + + int util_verbose = 0; // Hercules dasdutil.c diagnostic level + int heads = 15; // # heads per cylinder on device + int extnum = 0; // extent number for makext() + int abscyl = 0; // absolute CC (default 0) + int abshead = 0; // absolute HH (default 0) + int abstrk = 1; // absolute tracks (default 1) + int lrecl = 80; // default F1 DSCB lrecl + +// Usage: dasdseq [-debug] [-expert] [-ascii] image [sf=shadow] [attr] filespec + + argv++; // skip dasdseq command argv[0] + if ((*argv) && (strcasecmp(*argv, "-debug") == 0)) { + argv++; + debug = 1; + fprintf(stderr, "Command line DEBUG specified\n"); + } + if ((*argv) && (strcasecmp(*argv, "-expert") == 0)) { + argv++; + expert = 1; + if (debug) fprintf(stderr, "EXPERT mode\n"); + } + if ((*argv) && (strcasecmp(*argv, "-ascii") == 0)) { + argv++; + tran_ascii = 1; + if (debug) fprintf(stderr, "ASCII translation enabled\n"); + } + if (*argv) din = *argv++; // dasd image filename + if (debug) fprintf(stderr, "IMAGE %s\n", din); + if (*argv && strlen(*argv) > 3 && !memcmp(*argv, "sf=", 3)) { + sfn = *argv++; // shadow file parm + } else + sfn = NULL; + if (debug) fprintf(stderr, "SHADOW %s\n", sfn); + dadsm->f1buf.ds1recfm = + RECFM_FORMAT_F | RECFM_BLOCKED; // recfm FB for fbcopy + if ((*argv) && (strcasecmp(*argv, "-recfm") == 0)) { + argv++; // skip -recfm + if ((*argv) && (strcasecmp(*argv, "fb") == 0)) { + argv++; // skip fb + if (debug) fprintf(stderr, "RECFM fb\n"); + } else { + argv++; // skip bad recfm + fprintf(stderr, "Unsupported -recfm value %s\n", *argv); + } + } + if ((*argv) && (strcasecmp(*argv, "-lrecl") == 0)) { + argv++; // skip -lrecl + if (*argv) lrecl = atoi(*argv++); // lrecl value + if (debug) fprintf(stderr, "LRECL %d\n", lrecl); + } + dadsm->f1buf.ds1lrecl[0] = lrecl >> 8; // for fbcopy + dadsm->f1buf.ds1lrecl[1] = lrecl - ((lrecl >> 8) << 8); + if ((*argv) && (strcasecmp(*argv, "-heads") == 0)) { + argv++; // skip -heads + if (*argv) heads = atoi(*argv++); // heads value + } + if (debug) fprintf(stderr, "HEADS %d\n", heads); + if ((*argv) && + (strcasecmp(*argv, "-abs") == 0)) { + absvalid = 1; // CCHH valid + while ((*argv) && (strcasecmp(*argv, "-abs") == 0)) { + argv++; // skip -abs + abscyl = 0; abshead = 0; abstrk = 1; // defaults + if (*argv) abscyl = atoi(*argv++); // abs cc + if (*argv) abshead = atoi(*argv++); // abs hh + if (*argv) abstrk = atoi(*argv++); // abs tracks + // Build extent entry for -abs group + makext(extnum, heads, + (DSXTENT *) &dadsm->f1ext, abscyl, abshead, abstrk); + extnum++; + dadsm->f1buf.ds1noepv = extnum; // for fbcopy + if (debug) fprintf(stderr, "Absolute CC %d HH %d tracks %d\n", + abscyl, abshead, abstrk); + if (extnum > MAX_EXTENTS) { + fprintf(stderr, "Too many extents, abort\n"); + exit(3); + } + + } +// if (debug) sayext(MAX_EXTENTS, dadsm->f1ext);// show extent table + } + if (debug) { + fprintf(stderr, "parsecmd completed F1 DSCB\n"); + data_dump(&dadsm->f1buf, sizeof(FORMAT1_DSCB)); + } + if (*argv) argdsn = *argv++; // [MVS dataset name/]output filename + if (debug) fprintf(stderr, "DSN %s\n", argdsn); + if ((*argv) && ( // support deprecated 'ascii' operand + (strcasecmp(*argv, "ascii") == 0) || + (strcasecmp(*argv, "-ascii") == 0) + ) + ) { + argv++; + tran_ascii = 1; + if (debug) fprintf(stderr, "ASCII translation enabled\n"); + } + set_verbose_util(0); // default util verbosity + if ((*argv) && (strcasecmp(*argv, "verbose") == 0)) { + local_verbose = 1; + argv++; + if (*argv) local_verbose = atoi(*argv++); + if (*argv) copy_verbose = atoi(*argv++); + if (*argv) { + util_verbose = atoi(*argv++); + set_verbose_util(util_verbose); + if (debug) fprintf(stderr, "Utility verbose %d\n", util_verbose); + } + } + +// If the user specified expert mode without -abs, give help & exit +// Additionally, if the user has "extra" parms, show help & exit +// No "extraneous parms" message is issued, since some of the code +// above forces *argv to be true when it wants help displayed + + if ((argc < 3) || (*argv) || ((expert) && (!absvalid))) { + showhelp(); // show syntax before bailing + exit(2); + } + return 0; + +} /* parsecmd */ + +//---------------------------------------------------------------------------------- +// getlabel - retrieve label record from dasd volume image +//---------------------------------------------------------------------------------- +// +// Input: +// cif ptr to opened CIFBLK of dasd image +// glbuf ptr to 80 byte buffer provided by caller +// verbose 0 = no status messages +// 1 = status messages +// > 1 debugging messages +// +// Output: +// glbuf dasd volume label record +// +// Returns: 0 OK, else error +// +// Notes: +// The volume label record always resides at CCHHR 0000 0000 03. +// The dasd volume label record contains the CCHHR of the VTOC. +// The volume label record is copied to the caller's buffer. +//---------------------------------------------------------------------------------- + +int getlabel( + CIFBLK *cif, + DASD_VOL_LABEL *glbuf, + int verbose) { + + int len, rc; + void *plabel; + + if (verbose) fprintf(stderr, "getlabel reading volume label\n"); + rc = read_block(cif, 0, 0, 3, NULL, NULL, (BYTE **) &plabel, &len); + if (rc) { + fprintf(stderr, "getlabel error reading volume label, rc %d\n", rc); + return 1; + } + if (len != sizeof(DASD_VOL_LABEL)) { + fprintf(stderr, "getlabel error: volume label %d, not 80 bytes long\n", len); + return 2; + } + memcpy((void *)glbuf, plabel, sizeof(DASD_VOL_LABEL)); + if (verbose > 1) { + fprintf(stderr, "getlabel volume label\n"); + data_dump(glbuf, len); + } + return 0; + +} /* getlabel */ + +//---------------------------------------------------------------------------------- +// getF4dscb - retrieve Format 4 DSCB - VTOC self-descriptor record +//---------------------------------------------------------------------------------- +// +// Input: +// cif ptr to opened CIFBLK of dasd image containing dataset +// f4dscb ptr to F4 DSCB buffer (key & data) +// volrec ptr to buffer containing volume label rec +// vtocx ptr to VTOC extent array (one extent only) +// verbose 0 = no status messages +// 1 = status messages +// > 1 debugging messages +// +// Output: +// f4buf F4 DSCB in buffer (44 byte key, 96 bytes of data) +// vtocx VTOC extent array updated +// +// Returns: 0 OK, else error +// +// Notes: +// There should only be one F4 DSCB in the VTOC, and it should always be +// the first record in the VTOC. The F4 provides VTOC extent information, +// anchors free space DSCBs, and provides information about the device on +// which the VTOC resides. +//---------------------------------------------------------------------------------- + +int getF4dscb( + CIFBLK *cif, + FORMAT4_DSCB *f4dscb, + DASD_VOL_LABEL *volrec, + DSXTENT *vtocx, + int verbose) { + + char vtockey[sizeof(f4dscb->ds4keyid)]; + void *f4key, *f4data; + int f4kl, f4dl; + int cyl, head, rec, rc; + +// Extract VTOC's CCHHR from volume label + + cyl = (volrec->volvtoc[0] << 8) | volrec->volvtoc[1]; + head = (volrec->volvtoc[2] << 8) | volrec->volvtoc[3]; + rec = volrec->volvtoc[4]; + if (verbose > 1) + fprintf(stderr, "getF4dscb VTOC F4 at cyl %d head %d rec %d\n", cyl, head, rec); + +// Read VTOC's Format 4 DSCB (VTOC self-descriptor) + + if (verbose) + fprintf(stderr, "getF4dscb reading VTOC F4 DSCB\n"); + rc = read_block(cif, cyl, head, rec, (BYTE **) &f4key, &f4kl, (BYTE **) &f4data, &f4dl); + if (rc) { + fprintf(stderr, "getF4dscb error reading F4 DSCB, rc %d\n", rc); + return 1; + } + +// Verify correct key and data length + + if ((f4kl != sizeof(f4dscb->ds4keyid)) || + (f4dl != (sizeof(FORMAT4_DSCB) - sizeof(f4dscb->ds4keyid)))) { + fprintf(stderr, "getF4dscb erroneous key length %d or data length %d\n", + f4kl, f4dl); + return 2; + } + +// Return data to caller + + memcpy((void *) &f4dscb->ds4keyid, f4key, f4kl); // copy F4 key into buffer + memcpy((void *) &f4dscb->ds4fmtid, f4data, f4dl); // copy F4 data into buffer + memcpy((void *) vtocx, (void *)&f4dscb->ds4vtoce, + sizeof(f4dscb->ds4vtoce)); // copy VTOC extent entry + if (verbose > 1) { + fprintf(stderr, "getF4dscb F4 DSCB\n"); + data_dump((void *) f4dscb, sizeof(FORMAT4_DSCB)); + } + +// Verify DS4FMTID byte = x'F4', DS4KEYID key = x'04', and DS4NOEXT = x'01' +// Do this after copying data to caller's buffer so we can use struct fields +// rather than having to calculate offset to verified data; little harm done +// if it doesn't verify since we're toast if they're bad. + + memset(vtockey, 0x04, sizeof(vtockey)); + if ((f4dscb->ds4fmtid != 0xf4) || + (f4dscb->ds4noext != 0x01) || + (memcmp(&f4dscb->ds4keyid, vtockey, sizeof(vtockey)))) { + fprintf(stderr, "getF4dscb " + "VTOC format id byte invalid (DS4IDFMT) %2.2X, \n" + "VTOC key invalid, or multi-extent VTOC\n", + f4dscb->ds4fmtid); + return 3; + } + +// Display VTOC extent info (always one extent, never more) + + if (verbose > 1) { + fprintf (stderr, "getF4dscb " + "VTOC start CCHH=%2.2X%2.2X %2.2X%2.2X " + "end CCHH=%2.2X%2.2X %2.2X%2.2X\n", + vtocx->xtbcyl[0], vtocx->xtbcyl[1], + vtocx->xtbtrk[0], vtocx->xtbtrk[1], + vtocx->xtecyl[0], vtocx->xtecyl[1], + vtocx->xtetrk[0], vtocx->xtetrk[1]); + } + return 0; +} /* getF4dscb */ + +//---------------------------------------------------------------------------------- +// getF1dscb - retrieve Format 1 DSCB +//---------------------------------------------------------------------------------- +// +// Input: +// cif ptr to opened CIFBLK of dasd image containing dataset +// zdsn ASCII null-terminated dataset name +// f1dscb ptr to F1 DSCB buffer (key & data) +// vtocext ptr to VTOC's extent info +// verbose 0 = no status messages +// 1 = status messages +// > 1 debugging messages +// +// Output: +// f1buf F1 DSCB (44 byte key, 96 byte data) +// +// Returns: 0 OK, else error +// +// Notes: The F1 DSCB describes the MVS dataset's physical and logical attributes +// such as RECFM, LRECL, BLKSIZE, and where on the volume the dataset +// resides (the extent information). The first 3 possible extents are +// described in the F1 DSCB. If additional extents are allocated, they +// are described by F3 DSCBs referred to by the F1 DSCB. +//---------------------------------------------------------------------------------- + +int getF1dscb( + CIFBLK *cif, + char *pdsn[], + FORMAT1_DSCB *f1dscb, + DSXTENT *vtocext[], + int verbose) { + + BYTE zdsn[sizeof(f1dscb->ds1dsnam) + 1]; // zASCII dsn + BYTE edsn[sizeof(f1dscb->ds1dsnam)]; // EBCDIC dsn + void *f1key, *f1data; + int f1kl, f1dl; + int cyl, head, rec, rc; + int vtocextents = 1; // VTOC has only one extent + +// Locate dataset's F1 DSCB + + memset(zdsn, 0, sizeof(zdsn)); + strncpy(zdsn, *pdsn, sizeof(zdsn) - 1); + string_to_upper(zdsn); + convert_to_ebcdic(edsn, sizeof(edsn), zdsn); + if (verbose) + fprintf(stderr, "getF1dscb searching VTOC for %s\n", zdsn); + rc = search_key_equal(cif, edsn, sizeof(edsn), + vtocextents, (DSXTENT *)vtocext, + &cyl, &head, &rec); + if (rc) { + fprintf(stderr, "getF1dscb search_key_equal rc %d\n", rc); + if (verbose) { + fprintf(stderr, "getF1dscb key\n"); + data_dump(edsn, sizeof(edsn)); + } + if (rc == 1) + fprintf(stderr, "getF1dscb no DSCB found for %s\n", zdsn); + return 1; + } + +// Read F1 DSCB describing dataset + + if (verbose) + fprintf(stderr, "getF1dscb reading F1 DSCB\n"); + rc = read_block(cif, cyl, head, rec, + (BYTE **)&f1key, &f1kl, + (BYTE **) &f1data, &f1dl); + if (rc) { + fprintf(stderr, "getF1dscb error reading F1 DSCB, rc %d\n", rc); + return 2; + } + +// Return data to caller + + if ((f1kl == sizeof(f1dscb->ds1dsnam)) && + (f1dl == (sizeof(FORMAT1_DSCB) - sizeof(f1dscb->ds1dsnam)))) { + memcpy((void *) &f1dscb->ds1dsnam, + f1key, f1kl); // copy F1 key to buffer + memcpy((void *) &f1dscb->ds1fmtid, + f1data, f1dl); // copy F1 data to buffer + } else { + fprintf(stderr, "getF1dscb bad key %d or data length %d\n", + f1kl, f1dl); + return 3; + } + if (verbose > 1) { + fprintf(stderr, "getF1dscb F1 DSCB\n"); + data_dump((void *) f1dscb, sizeof(FORMAT1_DSCB)); + } + +// Verify DS1FMTID byte = x'F1' +// Do this after copying data to caller's buffer so we can use struct fields +// rather than having to calculate offset to verified data; little harm done +// if it doesn't verify since we're toast if it's bad. + + if (f1dscb->ds1fmtid != 0xf1) { + fprintf(stderr, "getF1dscb " + "F1 DSCB format id byte invalid (DS1IDFMT) %2.2X\n", + f1dscb->ds1fmtid); + return 4; + } + return 0; +} /* getF1dscb */ + +//---------------------------------------------------------------------------------- +// getF3dscb - Retrieve Format 3 DSCB +//---------------------------------------------------------------------------------- +// +// Input: +// cif ptr to opened CIFBLK of dasd image containing dataset +// f3cchhr CCHHR of F3 DSCB to be read (key & data) +// f3dscb ptr to F3 DSCB buffer +// verbose 0 = no status messages +// 1 = status messages +// > 1 debugging messages +// +// Output: +// f3buf F3 DSCB (44 byte key, 96 byte data) +// +// Returns: 0 OK, else error +// +// Notes: The F3 DSCB describes additional dataset extents beyond those +// described by the F1 DSCB. Each F3 DSCB describes 13 extents. +// Physical sequential datasets are limited to 16 extents on each +// volume, extended format datasets are limited to 123 extents on +// each volume. Dasdseq doesn't provide explicit support for +// multi-volume datasets. +// +// Note there is extent information embedded in the key. +// +// If you want support for > 16 extents, you will have to recompile +// dasdseq after changing MAX_EXTENTS. +// +// Warning: I haven't tested the "chase the F3 chain" code, as I have no +// reasonable way to do so. The highest level of MVS I can run under +// Hercules is MVS38j. +//---------------------------------------------------------------------------------- + +int getF3dscb( + CIFBLK *cif, + BYTE *f3cchhr, + FORMAT3_DSCB *f3dscb, + int verbose) { + + int cyl, head, rec, rc; + void *f3key, *f3data; + int f3kl, f3dl; + + cyl = (f3cchhr[0] << 8) | f3cchhr[1]; + head = (f3cchhr[2] << 8) | f3cchhr[3]; + rec = f3cchhr[4]; + if (verbose) + fprintf(stderr, "getF3dscb reading F3 DSCB " + "cyl %d head %d rec %d\n", cyl, head, rec); + rc = read_block (cif, cyl, head, rec, + (BYTE **)&f3key, &f3kl, + (BYTE **)&f3data, &f3dl); + if (rc) { + fprintf(stderr, + "getF3dscb error reading F3 DSCB, rc %d\n", rc); + return 1; + } + if ((f3kl != 44) || (f3dl != 96)) { + fprintf(stderr, "getF3dscb bad key %d or data %d length\n", + f3kl, f3dl); + return 2; + } + memcpy((void *) &f3dscb->ds3keyid, + f3key, f3kl); // copy F3 key to buffer + memcpy((void *)f3dscb + f3kl, + f3data, f3dl); // copy F3 data to buffer + if (verbose > 1) { + fprintf(stderr, "getF3dscb F3 DSCB\n"); + data_dump((void *) f3dscb, sizeof(FORMAT3_DSCB)); + } + +// Verify DS3FMTID byte = x'F3' +// Do this after copying data to caller's buffer so we can use struct fields +// rather than having to calculate offset to verified data; little harm done +// if it doesn't verify since we're toast if it's bad. + + if (f3dscb->ds3fmtid != 0xf3) { + fprintf(stderr, "getF3dscb " + "F3 DSCB format id byte invalid (DS3IDFMT) %2.2X\n", + f3dscb->ds3fmtid); + return 2; + } + return 0; +} /* getF3dscb */ + +//---------------------------------------------------------------------------------- +// dadsm_setup - retrieve volume label & DSCBs sufficient to describe dataset +//---------------------------------------------------------------------------------- +// +// This routine reads the volume label rec, the VTOC F4 DSCB, the F1 DSCB +// for the dataset, and any F3 DSCB(s) associated with the dataset. +// Constructs extent array describing space allocated to the dataset. +// +// Input: +// cif ptr to opened CIFBLK of dasd image containing dataset +// pdsn ptr to ASCII null-terminated dataset name +// dadsm ptr to DADSM workarea +// verbose 0 = no status messages +// 1 = status messages +// > 1 debugging messages +// +// Output: +// dadsm DADSM workarea +// +// Returns: 0 OK, else error +// +// Notes: +//---------------------------------------------------------------------------------- + +int dadsm_setup( + CIFBLK *cif, + char *pdsn[], + DADSM *dadsm, + int verbose) { + + DSXTENT *f1x; + BYTE *pcchhr; + int numx = MAX_EXTENTS; // # extent slots available + int rc; + + +// Read dasd volume label record + + rc = getlabel(cif, &dadsm->volrec, verbose); + if (rc) return rc; + +// Read F4 DSCB, save VTOC extent info + + rc = getF4dscb(cif, &dadsm->f4buf, &dadsm->volrec, &dadsm->f4ext, verbose); + if (rc) return rc; + +// Read F1 DSCB, save first three extents from F1 DSCB + + rc = getF1dscb(cif, pdsn, &dadsm->f1buf, (void *)&dadsm->f4ext, verbose); + if (rc) return rc; + + f1x = &dadsm->f1ext[0]; // @ extent # 0 + numx -= 3; // will use 3 slots (if available) + if (numx < 0) { + fprintf(stderr, "dadsm_setup exhausted extent slots\n"); + return 1; + } + memcpy(f1x, &dadsm->f1buf.ds1ext1, sizeof(DSXTENT) * 3); + f1x += 3; // @ extent # 3 + dadsm->f1numx = dadsm->f1buf.ds1noepv; // # extents alloc'd to dataset + if (dadsm->f1numx < 4) { + if (verbose > 1) + fprintf(stderr, "dadsm_setup " + "no F3 DSCB required, only %d extent(s); all in F1\n", + dadsm->f1numx); + return 0; + } + +// When more than 3 extents, get additional extent info from F3 DSCB(s). +// Chase the F3 chain starting with the CCHHR in the F1, accumulating +// extent information for the dataset as we progress. + + pcchhr = (BYTE *)&dadsm->f1buf.ds1ptrds; // @ F1 ptr to F3 + while (pcchhr[0] || pcchhr[1] || pcchhr[2] || pcchhr[3] || pcchhr[4]) { + rc = getF3dscb(cif, pcchhr, &dadsm->f3buf, verbose); + if (rc) return rc; + numx -= 4; // use extent slots + if (numx < 0) { + fprintf(stderr, "dadsm_setup exhausted extent slots\n"); + return 2; + } + memcpy(f1x, &dadsm->f3buf.ds3extnt[0], sizeof(DSXTENT) * 4); + f1x += 4; + numx -= 9; // use extent slots + if (numx < 0) { + fprintf(stderr, "dadsm_setup exhausted extent slots\n"); + fprintf(stderr, "Maximum supported extents %d\n", MAX_EXTENTS); + return 3; + } + memcpy(f1x, &dadsm->f3buf.ds3adext[0], sizeof(DSXTENT) * 9); + f1x += 9; + pcchhr = (BYTE *)&dadsm->f3buf.ds3ptrds; // @ next F3 CCHHR + } + return 0; +} /* dadsm_setup */ + +//---------------------------------------------------------------------------------- +// Main +//---------------------------------------------------------------------------------- + +int main(int argc, char **argv) { + + DADSM dadsm; // DADSM workarea + FILE *fout = NULL; // output file + CIFBLK *cif; + int dsn_recs_written = 0, bail, dsorg, rc; + + fprintf(stderr, "dasdseq %s Copyright 1999-2003 Roger Bowler\n" + "Portions Copyright 2001-2003 James M. Morrison\n", VERSION); + if (debug) fprintf(stderr, "DEBUG enabled\n"); + +// Parse command line + + memset(&dadsm, 0, sizeof(dadsm)); // init DADSM workarea + rc = parsecmd(argc, argv, &dadsm); + if (rc) exit(rc); + +// Open CKD image + + cif = open_ckd_image(din, sfn, O_RDONLY | O_BINARY, 0); + if (!cif) { + fprintf(stderr, "dasdseq unable to open image file %s\n", din); + exit(20); + } + +// Unless -abs specified (in which case trust the expert user): +// Retrieve extent information for the dataset +// Display dataset attributes +// Verify dataset has acceptable attributes + + if (!absvalid) { + rc = dadsm_setup(cif, &argdsn, &dadsm, local_verbose); + if (rc) { + close_ckd_image(cif); + exit(rc); + } + if (local_verbose) { + fprintf(stderr, "\n"); + showf1(stderr, &dadsm.f1buf, dadsm.f1ext, copy_verbose); + fprintf(stderr, "\n"); + } + bail = 1; + dsorg = (dadsm.f1buf.ds1dsorg[0] << 8) | (dadsm.f1buf.ds1dsorg[1]); + if (dsorg & (DSORG_PS * 256)) { + if ((dadsm.f1buf.ds1recfm & RECFM_FORMAT) == RECFM_FORMAT_F) + bail = 0; + if ((dadsm.f1buf.ds1recfm & RECFM_FORMAT) == RECFM_FORMAT_V) { + bail = 1; // not yet + fprintf(stderr, "dasdseq only supports RECFM=F[B]\n"); + } + } else + fprintf(stderr, "dasdseq only supports DSORG=PS datasets\n"); + if (bail) { + close_ckd_image(cif); + exit(21); + } + } + +// Open output dataset (EBCDIC requires binary open) + + fout = fopen(argdsn, (tran_ascii) ? "wb" : "w"); + if (fout == NULL) { + fprintf(stderr, "dasdseq unable to open output file %s, %s\n", + argdsn, strerror(errno)); + close_ckd_image(cif); + exit(22); + } + if (local_verbose) + fprintf(stderr, "dasdseq writing %s\n", argdsn); + +// Write dasd data to output dataset + + dsn_recs_written = fbcopy(fout, cif, &dadsm, tran_ascii, copy_verbose); + if (dsn_recs_written == -1) + fprintf(stderr, "dasdseq error processing %s\n", argdsn); + else + fprintf(stderr, "dasdseq wrote %d records to %s\n", + dsn_recs_written, argdsn); + +// Close output dataset, dasd image and return to caller + + fclose(fout); + if (local_verbose > 2) fprintf(stderr, "CLOSED %s\n", argdsn); + if (local_verbose > 3) { + fprintf(stderr, "CIFBLK\n"); + data_dump((void *) cif, sizeof(CIFBLK)); + } + close_ckd_image(cif); + if (local_verbose > 2) fprintf(stderr, "CLOSED image\n"); + return rc; + +} /* main */ + diff --git a/dasdtab.c b/dasdtab.c index 65c7ad8..cc670b7 100644 --- a/dasdtab.c +++ b/dasdtab.c @@ -6,6 +6,10 @@ /* each DASD device and control unit supported by Hercules. */ /* Routines are also provided to perform table lookup and to build */ /* to build the device identifier and characteristics areas. */ +/* */ +/* Note: source for most CKD/FBA device capacities take from SDI's */ +/* device capacity page at: http://www.sdisw.com/dasd_capacity.html */ +/* (used with permission) */ /*-------------------------------------------------------------------*/ #include "hercules.h" @@ -15,8 +19,8 @@ /*-------------------------------------------------------------------*/ static CKDDEV ckdtab[] = { /* name type model clas code prime a hd r0 r1 har0 len sec rps f f1 f2 f3 f4 f5 f6 cu */ - {"2311", 0x2311,0x00,0x20,0x00, 200,2,10, 0, 3625, 0, 3625, 0,0x0000,-2,20, 61, 537, 512, 0,0,"2841"}, - {"2311-1", 0x2311,0x00,0x20,0x00, 200,2,10, 0, 3625, 0, 3625, 0,0x0000,-2,20, 61, 537, 512, 0,0,"2841"}, + {"2311", 0x2311,0x00,0x20,0x00, 200,3,10, 0, 3625, 0, 3625, 0,0x0000,-2,20, 61, 537, 512, 0,0,"2841"}, + {"2311-1", 0x2311,0x00,0x20,0x00, 200,3,10, 0, 3625, 0, 3625, 0,0x0000,-2,20, 61, 537, 512, 0,0,"2841"}, {"2314", 0x2314,0x00,0x20,0x00, 200,3,20, 0, 7294, 0, 7294, 0,0x0000,-2,45,101,2137,2048, 0,0,"2841"}, {"2314-1", 0x2314,0x00,0x20,0x00, 200,3,20, 0, 7294, 0, 7294, 0,0x0000,-2,45,101,2137,2048, 0,0,"2841"}, @@ -26,36 +30,38 @@ static CKDDEV ckdtab[] = { {"3330-2", 0x3330,0x11,0x20,0x00, 808,7,19,13165,13030, 135,13165,128,0x0000,-1,56,135, 0, 0, 0,0,"3830"}, {"3330-11", 0x3330,0x11,0x20,0x00, 808,7,19,13165,13030, 135,13165,128,0x0000,-1,56,135, 0, 0, 0,0,"3830"}, - {"3340", 0x3340,0x00,0x20,0x00, 348,1,12, 8535, 8368, 167, 8535, 64,0x0000,-1,75,167, 0, 0, 0,0,"3830"}, - {"3340-1", 0x3340,0x00,0x20,0x00, 348,1,12, 8535, 8368, 167, 8535, 64,0x0000,-1,75,167, 0, 0, 0,0,"3830"}, - {"3340-35", 0x3340,0x00,0x20,0x00, 348,1,12, 8535, 8368, 167, 8535, 64,0x0000,-1,75,167, 0, 0, 0,0,"3830"}, - {"3340-2", 0x3340,0x00,0x20,0x00, 696,2,12, 8535, 8368, 167, 8535, 64,0x0000,-1,75,167, 0, 0, 0,0,"3830"}, - {"3340-70", 0x3340,0x00,0x20,0x00, 696,2,12, 8535, 8368, 167, 8535, 64,0x0000,-1,75,167, 0, 0, 0,0,"3830"}, + {"3340", 0x3340,0x01,0x20,0x00, 348,1,12, 8535, 8368, 167, 8535, 64,0x0000,-1,75,167, 0, 0, 0,0,"3830"}, + {"3340-1", 0x3340,0x01,0x20,0x00, 348,1,12, 8535, 8368, 167, 8535, 64,0x0000,-1,75,167, 0, 0, 0,0,"3830"}, + {"3340-35", 0x3340,0x01,0x20,0x00, 348,1,12, 8535, 8368, 167, 8535, 64,0x0000,-1,75,167, 0, 0, 0,0,"3830"}, + {"3340-2", 0x3340,0x02,0x20,0x00, 696,2,12, 8535, 8368, 167, 8535, 64,0x0000,-1,75,167, 0, 0, 0,0,"3830"}, + {"3340-70", 0x3340,0x02,0x20,0x00, 696,2,12, 8535, 8368, 167, 8535, 64,0x0000,-1,75,167, 0, 0, 0,0,"3830"}, {"3350", 0x3350,0x00,0x20,0x00, 555,5,30,19254,19069, 185,19254,128,0x0000,-1,82,185, 0, 0, 0,0,"3830"}, {"3350-1", 0x3350,0x00,0x20,0x00, 555,5,30,19254,19069, 185,19254,128,0x0000,-1,82,185, 0, 0, 0,0,"3830"}, - {"3375", 0x3375,0x02,0x20,0x0e, 959,3,12,36000,35616, 832,36000,196,0x5007, 1, 32,384,160, 0, 0,0,"3880"}, - {"3375-1", 0x3375,0x02,0x20,0x0e, 959,3,12,36000,35616, 832,36000,196,0x5007, 1, 32,384,160, 0, 0,0,"3880"}, - - {"3380", 0x3380,0x02,0x20,0x0e, 885,1,15,47988,47476,1088,47968,222,0x5007, 1, 32,492,236, 0, 0,0,"3880"}, - {"3380-1", 0x3380,0x02,0x20,0x0e, 885,1,15,47988,47476,1088,47968,222,0x5007, 1, 32,492,236, 0, 0,0,"3880"}, - {"3380-A", 0x3380,0x02,0x20,0x0e, 885,1,15,47988,47476,1088,47968,222,0x5007, 1, 32,492,236, 0, 0,0,"3880"}, - {"3380-B", 0x3380,0x02,0x20,0x0e, 885,1,15,47988,47476,1088,47968,222,0x5007, 1, 32,492,236, 0, 0,0,"3880"}, - {"3380-D", 0x3380,0x02,0x20,0x0e, 885,1,15,47988,47476,1088,47968,222,0x5007, 1, 32,492,236, 0, 0,0,"3880"}, - {"3380-J", 0x3380,0x02,0x20,0x0e, 885,1,15,47988,47476,1088,47968,222,0x5007, 1, 32,492,236, 0, 0,0,"3880"}, - {"3380-2", 0x3380,0x0a,0x20,0x0e, 1770,2,15,47988,47476,1088,47968,222,0x5007, 1, 32,492,236, 0, 0,0,"3880"}, - {"3380-E", 0x3380,0x0a,0x20,0x0e, 1770,2,15,47988,47476,1088,47968,222,0x5007, 1, 32,492,236, 0, 0,0,"3880"}, - {"3380-3", 0x3380,0x1e,0x20,0x0e, 2655,3,15,47988,47476,1088,47968,222,0x5007, 1, 32,492,236, 0, 0,0,"3880"}, - {"3380-K", 0x3380,0x1e,0x20,0x0e, 2655,3,15,47988,47476,1088,47968,222,0x5007, 1, 32,492,236, 0, 0,0,"3880"}, - {"EMC3380K+", 0x3380,0x1e,0x20,0x0e, 3339,3,15,47988,47476,1088,47968,222,0x5007, 1, 32,492,236, 0, 0,0,"3880"}, - {"EMC3380K++",0x3380,0x1e,0x20,0x0e, 3993,3,15,47988,47476,1088,47968,222,0x5007, 1, 32,492,236, 0, 0,0,"3880"}, + {"3375", 0x3375,0x02,0x20,0x0e, 959,3,12,36000,35616, 832,36000,196,0x5007, 1, 0x20,0x01,0x08,0x00,0x0a,0x00,"3880"}, + {"3375-1", 0x3375,0x02,0x20,0x0e, 959,3,12,36000,35616, 832,36000,196,0x5007, 1, 0x20,0x01,0x08,0x00,0x0a,0x00,"3880"}, + + {"3380", 0x3380,0x16,0x20,0x0e, 885,1,15,47988,47476,1088,47968,222,0x0000, 1, 0x20,0x01,0xec,0x00,0xec,0x00,"3880"}, + {"3380-1", 0x3380,0x16,0x20,0x0e, 885,1,15,47988,47476,1088,47968,222,0x0000, 1, 0x20,0x01,0xec,0x00,0xec,0x00,"3880"}, + {"3380-A", 0x3380,0x16,0x20,0x0e, 885,1,15,47988,47476,1088,47968,222,0x0000, 1, 0x20,0x01,0xec,0x00,0xec,0x00,"3880"}, + {"3380-B", 0x3380,0x16,0x20,0x0e, 885,1,15,47988,47476,1088,47968,222,0x0000, 1, 0x20,0x01,0xec,0x00,0xec,0x00,"3880"}, + {"3380-D", 0x3380,0x16,0x20,0x0e, 885,1,15,47988,47476,1088,47968,222,0x0000, 1, 0x20,0x01,0xec,0x00,0xec,0x00,"3880"}, + {"3380-J", 0x3380,0x16,0x20,0x0e, 885,1,15,47988,47476,1088,47968,222,0x0000, 1, 0x20,0x01,0xec,0x00,0xec,0x00,"3880"}, + {"3380-2", 0x3380,0x0a,0x20,0x0e, 1770,2,15,47988,47476,1088,47968,222,0x0000, 1, 0x20,0x01,0xec,0x00,0xec,0x00,"3880"}, + {"3380-E", 0x3380,0x0a,0x20,0x0e, 1770,2,15,47988,47476,1088,47968,222,0x0000, 1, 0x20,0x01,0xec,0x00,0xec,0x00,"3880"}, + {"3380-3", 0x3380,0x1e,0x20,0x0e, 2655,3,15,47988,47476,1088,47968,222,0x0000, 1, 0x20,0x01,0xec,0x00,0xec,0x00,"3880"}, + {"3380-K", 0x3380,0x1e,0x20,0x0e, 2655,3,15,47988,47476,1088,47968,222,0x0000, 1, 0x20,0x01,0xec,0x00,0xec,0x00,"3880"}, + {"EMC3380K+", 0x3380,0x1e,0x20,0x0e, 3339,3,15,47988,47476,1088,47968,222,0x0000, 1, 0x20,0x01,0xec,0x00,0xec,0x00,"3880"}, + {"EMC3380K++",0x3380,0x1e,0x20,0x0e, 3993,3,15,47988,47476,1088,47968,222,0x0000, 1, 0x20,0x01,0xec,0x00,0xec,0x00,"3880"}, {"3390", 0x3390,0x02,0x20,0x26, 1113,1,15,57326,56664,1428,58786,224,0x7708, 2, 34,19, 9, 6,116,6,"3990"}, {"3390-1", 0x3390,0x02,0x20,0x26, 1113,1,15,57326,56664,1428,58786,224,0x7708, 2, 34,19, 9, 6,116,6,"3990"}, {"3390-2", 0x3390,0x06,0x20,0x27, 2226,1,15,57326,56664,1428,58786,224,0x7708, 2, 34,19, 9, 6,116,6,"3990"}, {"3390-3", 0x3390,0x0a,0x20,0x24, 3339,1,15,57326,56664,1428,58786,224,0x7708, 2, 34,19, 9, 6,116,6,"3990"}, {"3390-9", 0x3390,0x0c,0x20,0x32,10017,3,15,57326,56664,1428,58786,224,0x7708, 2, 34,19, 9, 6,116,6,"3990"}, + {"3390-27", 0x3390,0x0c,0x20,0x32,32760,3,15,57326,56664,1428,58786,224,0x7708, 2, 34,19, 9, 6,116,6,"3990"}, + {"3390-J", 0x3390,0x0c,0x20,0x32,32760,3,15,57326,56664,1428,58786,224,0x7708, 2, 34,19, 9, 6,116,6,"3990"}, {"9345", 0x9345,0x04,0x20,0x04, 1440,0,15,48174,46456,1184,48280,213,0x8b07, 2, 34,18, 7, 6,116,6,"9343"}, {"9345-1", 0x9345,0x04,0x20,0x04, 1440,0,15,48174,46456,1184,48280,213,0x8b07, 2, 34,18, 7, 6,116,6,"9343"}, @@ -70,7 +76,7 @@ static CKDCU ckdcutab[] = { /* name type model code features ciws -------- */ {"2841", 0x2841,0x00,0x00,0x50000103,0,0,0,0,0,0,0,0}, {"3830", 0x3830,0x02,0x00,0x50000103,0,0,0,0,0,0,0,0}, - {"3880", 0x3880,0x03,0x10,0x50000003,0,0,0,0,0,0,0,0}, + {"3880", 0x3880,0x05,0x09,0x80000000,0,0,0,0,0,0,0,0}, {"3990", 0x3990,0xc2,0x10,0xd0000002,0x40fa0100,0,0,0,0,0,0,0}, {"9343", 0x9343,0xe0,0x11,0x80000000,0,0,0,0,0,0,0,0} } ; @@ -81,8 +87,8 @@ static CKDCU ckdcutab[] = { /*-------------------------------------------------------------------*/ static FBADEV fbatab[] = { /* name devt class type mdl bpg bpp size blks cu */ - {"3310", 0x3310,0x21,0x01,0x01, 32,352,512, 126016,0x4331}, - {"3310-1", 0x3310,0x21,0x01,0x01, 32,352,512, 126016,0x4331}, + {"3310", 0x3310,0x21,0x01,0x01, 32,352,512, 125664,0x4331}, + {"3310-1", 0x3310,0x21,0x01,0x01, 32,352,512, 125664,0x4331}, {"3310-x", 0x3310,0x21,0x01,0x01, 32,352,512, 0,0x4331}, {"3370", 0x3370,0x21,0x02,0x00, 62,744,512, 558000,0x3880}, diff --git a/dasdutil.c b/dasdutil.c index 77c3153..4bea2ad 100644 --- a/dasdutil.c +++ b/dasdutil.c @@ -27,8 +27,11 @@ static BYTE eighthexFF[] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; static BYTE iplpsw[8] = {0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x0F}; static BYTE iplccw1[8] = {0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x01}; static BYTE iplccw2[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +static int nextnum = 0; -SYSBLK sysblk; /* Currently only used for codepage mapping */ +#if 0 +SYSBLK sysblk; /* Currently required for shared.c */ +#endif /*-------------------------------------------------------------------*/ /* Subroutine to convert a null-terminated string to upper case */ @@ -59,18 +62,9 @@ int i; /* Array subscript */ /*-------------------------------------------------------------------*/ void convert_to_ebcdic (BYTE *dest, int len, BYTE *source) { -char *scodepage; int i; /* Array subscript */ - /* set_codepage() uses the logmsg macro which requires msgpipew */ - sysblk.msgpipew = stdout; - if(!sysblk.codepage) - { - if((scodepage = getenv("HERCULES_CP"))) - set_codepage(scodepage); - else - set_codepage("default"); - } + set_codepage(NULL); for (i = 0; i < len && source[i] != '\0'; i++) dest[i] = host_to_guest(source[i]); @@ -88,17 +82,8 @@ int i; /* Array subscript */ int make_asciiz (BYTE *dest, int destlen, BYTE *src, int srclen) { int len; /* Result length */ -char *scodepage; - /* set_codepage() uses the logmsg macro which requires msgpipew */ - sysblk.msgpipew = stdout; - if(!sysblk.codepage) - { - if((scodepage = getenv("HERCULES_CP"))) - set_codepage(scodepage); - else - set_codepage("default"); - } + set_codepage(NULL); for (len=0; len < srclen && len < destlen-1; len++) @@ -124,18 +109,8 @@ BYTE hex_chars[64]; BYTE prev_hex[64] = ""; int firstsame = 0; int lastsame = 0; -char *scodepage; - - /* set_codepage() uses the logmsg macro which requires msgpipew */ - sysblk.msgpipew = stdout; - if(!sysblk.codepage) - { - if((scodepage = getenv("HERCULES_CP"))) - set_codepage(scodepage); - else - set_codepage("default"); - } + set_codepage(NULL); pchar = (unsigned char*)addr; @@ -214,6 +189,7 @@ char *scodepage; int read_track (CIFBLK *cif, int cyl, int head) { int rc; /* Return code */ +int trk; /* Track number */ DEVBLK *dev; /* -> CKD device block */ BYTE unitstat; /* Unit status */ @@ -227,24 +203,26 @@ BYTE unitstat; /* Unit status */ { cif->trkmodif = 0; if (verbose) /* Issue progress message */ - fprintf (stdout, "HHCDU001I Updating cyl %d head %d\n", + fprintf (stdout, _("HHCDU001I Updating cyl %d head %d\n"), cif->curcyl, cif->curhead); - rc = (dev->ckdupdtrk)(dev, NULL, cif->trksz, &unitstat); + trk = (cif->curcyl * cif->heads) + cif->curhead; + rc = (dev->hnd->write)(dev, trk, 0, NULL, cif->trksz, &unitstat); if (rc < 0) { - fprintf (stderr, "HHCDU002E %s write track error: stat=%2.2X\n", + fprintf (stderr, _("HHCDU002E %s write track error: stat=%2.2X\n"), cif->fname, unitstat); return -1; } } if (verbose) /* Issue progress message */ - fprintf (stdout, "HHCDU003I Reading cyl %d head %d\n", cyl, head); + fprintf (stdout, _("HHCDU003I Reading cyl %d head %d\n"), cyl, head); - rc = (dev->ckdrdtrk)(dev, cyl, head, &unitstat); + trk = (cyl * cif->heads) + head; + rc = (dev->hnd->read)(dev, trk, &unitstat); if (rc < 0) { - fprintf (stderr, "HHCDU004E %s read track error: stat=%2.2X\n", + fprintf (stderr, _("HHCDU004E %s read track error: stat=%2.2X\n"), cif->fname, unitstat); return -1; } @@ -365,7 +343,7 @@ int dl; /* Data length */ if (verbose) { fprintf (stdout, - "HHCDU005I Searching extent %d begin (%d,%d) end (%d,%d)\n", + _("HHCDU005I Searching extent %d begin (%d,%d) end (%d,%d)\n"), cext, ccyl, chead, ecyl, ehead); } @@ -437,7 +415,7 @@ int dl; /* Data length */ if (verbose) { fprintf (stdout, - "HHCDU006I Searching extent %d begin (%d,%d) end (%d,%d)\n", + _("HHCDU006I Searching extent %d begin (%d,%d) end (%d,%d)\n"), cext, ccyl, chead, ecyl, ehead); } @@ -498,7 +476,7 @@ int extsize; /* Extent size in tracks */ } /* end for(i) */ fprintf (stderr, - "HHCDU007E Track %d not found in extent table\n", + _("HHCDU007E Track %d not found in extent table\n"), tt); return -1; @@ -525,31 +503,32 @@ CKDDASD_DEVHDR devhdr; /* CKD device header */ CIFBLK *cif; /* CKD image file descriptor */ DEVBLK *dev; /* CKD device block */ CKDDEV *ckd; /* CKD DASD table entry */ -BYTE *sfxptr; /* -> Last char of file name */ -U16 devnum; /* Device number */ -BYTE c; /* Work area for sscanf */ +BYTE *rmtdev; /* Possible remote device */ BYTE *argv[2]; /* Arguments to */ int argc=0; /* */ BYTE sfxname[1024]; /* Suffixed file name */ +BYTE typname[64]; /* Obtain storage for the file descriptor structure */ cif = (CIFBLK*) calloc (sizeof(CIFBLK), 1); if (cif == NULL) { fprintf (stderr, - "HHCDU008E Cannot obtain storage for device descriptor " - "buffer: %s\n", + _("HHCDU008E Cannot obtain storage for device descriptor " + "buffer: %s\n"), strerror(errno)); return NULL; } /* Initialize the devblk */ dev = &cif->devblk; - dev->msgpipew = stderr; if ((omode & O_RDWR) == 0) dev->ckdrdonly = 1; dev->batch = 1; dev->dasdcopy = dasdcopy; + /* If the filename has a `:' then it may be a remote device */ + rmtdev = strchr(fname, ':'); + /* Read the device header so we can determine the device type */ strcpy (sfxname, fname); fd = open (sfxname, omode); @@ -585,63 +564,66 @@ BYTE sfxname[1024]; /* Suffixed file name */ } else { - if (strlen(sfxname) < 2 || sfname[strlen(sfxname)-2] == '_') + if (strlen(sfxname) < 2 || sfxname[strlen(sfxname)-2] != '_') strcat (sfxname, "_1"); suffix = sfxname + strlen(sfxname) - 1; } *suffix = '1'; fd = open (sfxname, omode); } - if (fd<0) + if (fd < 0 && rmtdev == NULL) { - fprintf (stderr, "HHCDU009E Cannot open %s: %s\n", + fprintf (stderr, _("HHCDU009E Cannot open %s: %s\n"), fname, strerror(errno)); free (cif); return NULL; } + else if (fd < 0) strcpy (sfxname, fname); } - len = read (fd, &devhdr, CKDDASD_DEVHDR_SIZE); - if (len < 0) + + /* If not a possible remote devic, check the dasd header + and set the device type */ + if (fd >= 0) { - fprintf (stderr, "HHCDU010E %s read error: %s\n", - fname, strerror(errno)); + len = read (fd, &devhdr, CKDDASD_DEVHDR_SIZE); + if (len < 0) + { + fprintf (stderr, _("HHCDU010E %s read error: %s\n"), + fname, strerror(errno)); + close (fd); + free (cif); + return NULL; + } close (fd); - free (cif); - return NULL; - } - close (fd); - if (len < (int)CKDDASD_DEVHDR_SIZE - || (memcmp(devhdr.devid, "CKD_P370", 8) - && memcmp(devhdr.devid, "CKD_C370", 8))) - { - fprintf (stderr, "HHCDU011E %s CKD header invalid\n", fname); - free (cif); - return NULL; - } + if (len < (int)CKDDASD_DEVHDR_SIZE + || (memcmp(devhdr.devid, "CKD_P370", 8) + && memcmp(devhdr.devid, "CKD_C370", 8))) + { + fprintf (stderr, _("HHCDU011E %s CKD header invalid\n"), fname); + free (cif); + return NULL; + } - /* Set the device type */ - ckd = dasd_lookup (DASD_CKDDEV, NULL, devhdr.devtype, 0); - if (ckd == NULL) - { - fprintf(stderr, "HHCDU012E DASD table entry not found for " - "devtype 0x%2.2X\n", - devhdr.devtype); - free (cif); - return NULL; + /* Set the device type */ + ckd = dasd_lookup (DASD_CKDDEV, NULL, devhdr.devtype, 0); + if (ckd == NULL) + { + fprintf(stderr, _("HHCDU012E DASD table entry not found for " + "devtype 0x%2.2X\n"), + devhdr.devtype); + free (cif); + return NULL; + } + dev->devtype = ckd->devt; + snprintf(typname,64,"%4.4X",dev->devtype); + dev->typname=typname; /* Makes HDL Happy */ } - dev->devtype = ckd->devt; /* Set the device handlers */ dev->hnd = &ckddasd_device_hndinfo; - /* If the end of the filename is a valid device address then - use that as the device number, otherwise default to 0x0000 */ - sfxptr = strrchr (fname, '/'); - if (sfxptr == NULL) sfxptr = fname + 1; - sfxptr = strchr (sfxptr, '.'); - if (sfxptr != NULL) - if (sscanf(sfxptr+1, "%hx%c", &devnum, &c) == 1) - dev->devnum = devnum; + /* Set the device number */ + dev->devnum = ++nextnum; /* Build arguments for ckddasd_init_handler */ argv[0] = sfxname; @@ -656,12 +638,15 @@ BYTE sfxname[1024]; /* Suffixed file name */ rc = (dev->hnd->init)(dev, argc, argv); if (rc < 0) { - fprintf (stderr, "HHCDU013E CKD initialization failed for %s\n", + fprintf (stderr, _("HHCDU013E CKD initialization failed for %s\n"), fname); free (cif); return NULL; } + /* Call the device start exit */ + if (dev->hnd->start) (dev->hnd->start) (dev); + /* Set CIF fields */ cif->fname = fname; cif->fd = dev->fd; @@ -675,7 +660,7 @@ BYTE sfxname[1024]; /* Suffixed file name */ if (verbose) { fprintf (stderr, - "HHCDU014I %s heads=%d trklen=%d\n", + _("HHCDU014I %s heads=%d trklen=%d\n"), cif->fname, cif->heads, cif->trksz); } @@ -699,6 +684,7 @@ BYTE sfxname[1024]; /* Suffixed file name */ int close_ckd_image (CIFBLK *cif) { int rc; /* Return code */ +int trk; /* Track number */ DEVBLK *dev; /* -> CKD device block */ BYTE unitstat; /* Unit status */ @@ -708,16 +694,20 @@ BYTE unitstat; /* Unit status */ if (cif->trkmodif) { if (verbose) /* Issue progress message */ - fprintf (stdout, "HHCDU015I Updating cyl %d head %d\n", + fprintf (stdout, _("HHCDU015I Updating cyl %d head %d\n"), cif->curcyl, cif->curhead); - rc = (dev->ckdupdtrk)(dev, NULL, cif->trksz, &unitstat); + trk = (cif->curcyl * cif->heads) + cif->curhead; + rc = (dev->hnd->write)(dev, trk, 0, NULL, cif->trksz, &unitstat); if (rc < 0) { - fprintf (stderr, "HHCDU016E %s write track error: stat=%2.2X\n", + fprintf (stderr, _("HHCDU016E %s write track error: stat=%2.2X\n"), cif->fname, unitstat); } } + /* Call the END exit */ + if (dev->hnd->end) (dev->hnd->end) (dev); + /* Close the CKD image file */ (dev->hnd->close)(dev); @@ -745,9 +735,6 @@ int rc; /* Return code */ CIFBLK *cif; /* FBA image file descriptor */ DEVBLK *dev; /* FBA device block */ FBADEV *fba; /* FBA DASD table entry */ -BYTE *sfxptr; /* -> Last char of file name */ -U16 devnum; /* Device number */ -BYTE c; /* Work area for sscanf */ BYTE *argv[2]; /* Arguments to */ int argc=0; /* device open */ @@ -756,15 +743,14 @@ int argc=0; /* device open */ if (cif == NULL) { fprintf (stderr, - "HHCDU017E Cannot obtain storage for device descriptor " - "buffer: %s\n", + _("HHCDU017E Cannot obtain storage for device descriptor " + "buffer: %s\n"), strerror(errno)); return NULL; } /* Initialize the devblk */ dev = &cif->devblk; - dev->msgpipew = stderr; if ((omode & O_RDWR) == 0) dev->ckdrdonly = 1; dev->batch = 1; dev->dasdcopy = dasdcopy; @@ -773,8 +759,8 @@ int argc=0; /* device open */ fba = dasd_lookup (DASD_FBADEV, NULL, DEFAULT_FBA_TYPE, 0); if (fba == NULL) { - fprintf(stderr, "HHCDU018E DASD table entry not found for " - "devtype 0x%2.2X\n", + fprintf(stderr, _("HHCDU018E DASD table entry not found for " + "devtype 0x%2.2X\n"), DEFAULT_FBA_TYPE); free (cif); return NULL; @@ -784,14 +770,8 @@ int argc=0; /* device open */ /* Set the device handlers */ dev->hnd = &fbadasd_device_hndinfo; - /* If the end of the filename is a valid device address then - use that as the device number, otherwise default to 0x0000 */ - sfxptr = strrchr (fname, '/'); - if (sfxptr == NULL) sfxptr = fname + 1; - sfxptr = strchr (sfxptr, '.'); - if (sfxptr != NULL) - if (sscanf(sfxptr+1, "%hx%c", &devnum, &c) == 1) - dev->devnum = devnum; + /* Set the device number */ + dev->devnum = ++nextnum; /* Build arguments for fbadasd_init_handler */ argv[0] = fname; @@ -806,7 +786,7 @@ int argc=0; /* device open */ rc = (dev->hnd->init)(dev, argc, argv); if (rc < 0) { - fprintf (stderr, "HHCDU019E FBA initialization failed for %s\n", + fprintf (stderr, _("HHCDU019E FBA initialization failed for %s\n"), fname); free (cif); return NULL; @@ -822,7 +802,7 @@ int argc=0; /* device open */ if (verbose) { fprintf (stderr, - "HHCDU020I %s sectors=%d size=%d\n", + _("HHCDU020I %s sectors=%d size=%d\n"), cif->fname, cif->heads, cif->trksz); } @@ -868,7 +848,7 @@ BYTE volser[7]; /* Volume serial (ASCIIZ) */ if (rc < 0) return -1; if (rc > 0) { - fprintf (stderr, "HHCDU021E VOL1 record not found\n"); + fprintf (stderr, _("HHCDU021E VOL1 record not found\n")); return -1; } @@ -881,7 +861,7 @@ BYTE volser[7]; /* Volume serial (ASCIIZ) */ if (verbose) { fprintf (stdout, - "HHCDU022I VOLSER=%s VTOC=%4.4X%4.4X%2.2X\n", + _("HHCDU022I VOLSER=%s VTOC=%4.4X%4.4X%2.2X\n"), volser, cyl, head, rec); } @@ -891,15 +871,15 @@ BYTE volser[7]; /* Volume serial (ASCIIZ) */ if (rc < 0) return -1; if (rc > 0) { - fprintf (stderr, "HHCDU023E F4DSCB record not found\n"); + fprintf (stderr, _("HHCDU023E F4DSCB record not found\n")); return -1; } if (verbose) { fprintf (stdout, - "HHCDU023I VTOC start %2.2X%2.2X%2.2X%2.2X " - "end %2.2X%2.2X%2.2X%2.2X\n", + _("HHCDU023I VTOC start %2.2X%2.2X%2.2X%2.2X " + "end %2.2X%2.2X%2.2X%2.2X\n"), f4dscb->ds4vtoce.xtbcyl[0], f4dscb->ds4vtoce.xtbcyl[1], f4dscb->ds4vtoce.xtbtrk[0], f4dscb->ds4vtoce.xtbtrk[1], f4dscb->ds4vtoce.xtecyl[0], f4dscb->ds4vtoce.xtecyl[1], @@ -914,7 +894,7 @@ BYTE volser[7]; /* Volume serial (ASCIIZ) */ if (rc > 0) { fprintf (stderr, - "HHCDU024E Dataset %s not found in VTOC\n", + _("HHCDU024E Dataset %s not found in VTOC\n"), dsnama); return -1; } @@ -922,7 +902,7 @@ BYTE volser[7]; /* Volume serial (ASCIIZ) */ if (verbose) { fprintf (stdout, - "HHCDU025I DSNAME=%s F1DSCB CCHHR=%4.4X%4.4X%2.2X\n", + _("HHCDU025I DSNAME=%s F1DSCB CCHHR=%4.4X%4.4X%2.2X\n"), dsnama, cyl, head, rec); } @@ -932,7 +912,7 @@ BYTE volser[7]; /* Volume serial (ASCIIZ) */ if (rc < 0) return -1; if (rc > 0) { - fprintf (stderr, "HHCDU026E F1DSCB record not found\n"); + fprintf (stderr, _("HHCDU026E F1DSCB record not found\n")); return -1; } @@ -954,7 +934,7 @@ BYTE volser[7]; /* Volume serial (ASCIIZ) */ if (rc < 0) return -1; if (rc > 0) { - fprintf (stderr, "HHCDU027E F3DSCB record not found\n"); + fprintf (stderr, _("HHCDU027E F3DSCB record not found\n")); return -1; } @@ -1177,7 +1157,7 @@ int x=O_EXCL; /* Open option */ S_IRUSR | S_IWUSR | S_IRGRP); if (fd < 0) { - fprintf (stderr, "HHCDU028E %s open error: %s\n", + fprintf (stderr, _("HHCDU028E %s open error: %s\n"), fname, strerror(errno)); return -1; } @@ -1205,7 +1185,7 @@ int x=O_EXCL; /* Open option */ rc = write (fd, &devhdr, CKDDASD_DEVHDR_SIZE); if (rc < (int)CKDDASD_DEVHDR_SIZE) { - fprintf (stderr, "HHCDU029E %s device header write error: %s\n", + fprintf (stderr, _("HHCDU029E %s device header write error: %s\n"), fname, errno ? strerror(errno) : "incomplete"); return -1; } @@ -1233,8 +1213,8 @@ int x=O_EXCL; /* Open option */ rc = write (fd, &cdevhdr, CCKDDASD_DEVHDR_SIZE); if (rc < (int)CCKDDASD_DEVHDR_SIZE) { - fprintf (stderr, "HHCDU030E %s compressed device header " - "write error: %s\n", + fprintf (stderr, _("HHCDU030E %s compressed device header " + "write error: %s\n"), fname, errno ? strerror(errno) : "incomplete"); return -1; } @@ -1243,7 +1223,7 @@ int x=O_EXCL; /* Open option */ l1 = calloc (cdevhdr.numl1tab, CCKD_L1ENT_SIZE); if (l1 == NULL) { - fprintf (stderr, "HHCDU031E Cannot obtain l1tab buffer: %s\n", + fprintf (stderr, _("HHCDU031E Cannot obtain l1tab buffer: %s\n"), strerror(errno)); return -1; } @@ -1253,8 +1233,8 @@ int x=O_EXCL; /* Open option */ rc = write (fd, l1, cdevhdr.numl1tab * CCKD_L1ENT_SIZE); if (rc < (int)(cdevhdr.numl1tab * CCKD_L1ENT_SIZE)) { - fprintf (stderr, "HHCDU032E %s primary lookup table " - "write error: %s\n", + fprintf (stderr, _("HHCDU032E %s primary lookup table " + "write error: %s\n"), fname, errno ? strerror(errno) : "incomplete"); return -1; } @@ -1268,8 +1248,8 @@ int x=O_EXCL; /* Open option */ rc = write (fd, &l2, CCKD_L2TAB_SIZE); if (rc < (int)CCKD_L2TAB_SIZE) { - fprintf (stderr, "HHCDU033E %s secondary lookup table " - "write error: %s\n", + fprintf (stderr, _("HHCDU033E %s secondary lookup table " + "write error: %s\n"), fname, errno ? strerror(errno) : "incomplete"); return -1; } @@ -1282,7 +1262,7 @@ int x=O_EXCL; /* Open option */ rc = ftruncate (fd, sz); if (rc < 0) { - fprintf (stderr, "HHCDU034E %s dasdcopy ftruncate error: %s\n", + fprintf (stderr, _("HHCDU034E %s dasdcopy ftruncate error: %s\n"), fname, strerror(errno)); return -1; } @@ -1398,8 +1378,8 @@ int x=O_EXCL; /* Open option */ if (rc != len) { fprintf (stderr, - "HHCDU035E %s cylinder %u head %u " - "write error: %s\n", + _("HHCDU035E %s cylinder %u head %u " + "write error: %s\n"), fname, cyl, head, errno ? strerror(errno) : "incomplete"); return -1; @@ -1416,22 +1396,22 @@ int x=O_EXCL; /* Open option */ { cdevhdr.size = cdevhdr.used = CCKD_L1TAB_POS + cdevhdr.numl1tab * CCKD_L1ENT_SIZE + - CCKD_L2TAB_SIZE + trksize; + CCKD_L2TAB_SIZE + len; /* Rewrite the compressed device header */ rc = lseek (fd, CKDDASD_DEVHDR_SIZE, SEEK_SET); if (rc == -1) { - fprintf (stderr, "HHCDU036E %s compressed device header " - "lseek error: %s\n", + fprintf (stderr, _("HHCDU036E %s compressed device header " + "lseek error: %s\n"), fname, strerror(errno)); return -1; } rc = write (fd, &cdevhdr, CCKDDASD_DEVHDR_SIZE); if (rc < (int)CCKDDASD_DEVHDR_SIZE) { - fprintf (stderr, "HHCDU037E %s compressed device header " - "write error: %s\n", + fprintf (stderr, _("HHCDU037E %s compressed device header " + "write error: %s\n"), fname, errno ? strerror(errno) : "incomplete"); return -1; } @@ -1442,16 +1422,16 @@ int x=O_EXCL; /* Open option */ rc = lseek (fd, CCKD_L1TAB_POS + cdevhdr.numl1tab * CCKD_L1ENT_SIZE, SEEK_SET); if (rc == -1) { - fprintf (stderr, "HHCDU038E %s secondary lookup table " - "lseek error: %s\n", + fprintf (stderr, _("HHCDU038E %s secondary lookup table " + "lseek error: %s\n"), fname, strerror(errno)); return -1; } rc = write (fd, &l2, CCKD_L2TAB_SIZE); if (rc < (int)CCKD_L2TAB_SIZE) { - fprintf (stderr, "HHCDU039E %s secondary lookup table " - "write error: %s\n", + fprintf (stderr, _("HHCDU039E %s secondary lookup table " + "write error: %s\n"), fname, errno ? strerror(errno) : "incomplete"); return -1; } @@ -1465,14 +1445,14 @@ int x=O_EXCL; /* Open option */ rc = close (fd); if (rc < 0) { - fprintf (stderr, "HHCDU040E %s close error: %s\n", + fprintf (stderr, _("HHCDU040E %s close error: %s\n"), fname, strerror(errno)); return -1; } /* Display completion message */ fprintf (stderr, - "HHCDU041I %u cylinders successfully written to file %s\n", + _("HHCDU041I %u cylinders successfully written to file %s\n"), cyl - start, fname); return 0; @@ -1539,7 +1519,7 @@ U32 trksize; /* DASD image track length */ if (volcyls < mincyls || volcyls > maxcyls) { fprintf (stderr, - "HHCDU042E Cylinder count %u is outside range %u-%u\n", + _("HHCDU042E Cylinder count %u is outside range %u-%u\n"), volcyls, mincyls, maxcyls); return -1; } @@ -1548,15 +1528,15 @@ U32 trksize; /* DASD image track length */ buf = malloc(trksize); if (buf == NULL) { - fprintf (stderr, "HHCDU043E Cannot obtain track buffer: %s\n", + fprintf (stderr, _("HHCDU043E Cannot obtain track buffer: %s\n"), strerror(errno)); return -1; } /* Display progress message */ fprintf (stderr, - "HHCDU044I Creating %4.4X volume %s: %u cyls, " - "%u trks/cyl, %u bytes/track\n", + _("HHCDU044I Creating %4.4X volume %s: %u cyls, " + "%u trks/cyl, %u bytes/track\n"), devtype, volser, volcyls, heads, trksize); /* Copy the unsuffixed DASD image file name */ @@ -1660,7 +1640,7 @@ int x=O_EXCL; /* Open option */ if (sectors < minsect || (!lfs && sectors > maxsect)) { fprintf (stderr, - "HHCDU045E Sector count %u is outside range %u-%u\n", + _("HHCDU045E Sector count %u is outside range %u-%u\n"), sectors, minsect, maxsect); return -1; } @@ -1669,15 +1649,15 @@ int x=O_EXCL; /* Open option */ buf = malloc(sectsz); if (buf == NULL) { - fprintf (stderr, "HHCDU046E Cannot obtain sector buffer: %s\n", + fprintf (stderr, _("HHCDU046E Cannot obtain sector buffer: %s\n"), strerror(errno)); return -1; } /* Display progress message */ fprintf (stderr, - "HHCDU047I Creating %4.4X volume %s: " - "%u sectors, %u bytes/sector\n", + _("HHCDU047I Creating %4.4X volume %s: " + "%u sectors, %u bytes/sector\n"), devtype, volser, sectors, sectsz); /* if `dasdcopy' > 1 then we can replace the existing file */ @@ -1688,7 +1668,7 @@ int x=O_EXCL; /* Open option */ S_IRUSR | S_IWUSR | S_IRGRP); if (fd < 0) { - fprintf (stderr, "HHCDU048I %s open error: %s\n", + fprintf (stderr, _("HHCDU048I %s open error: %s\n"), fname, strerror(errno)); return -1; } @@ -1700,11 +1680,10 @@ int x=O_EXCL; /* Open option */ rc = ftruncate (fd, sz); if (rc < 0) { - fprintf (stderr, "HHCDU049E %s dasdcopy ftruncate error: %s\n", + fprintf (stderr, _("HHCDU049E %s dasdcopy ftruncate error: %s\n"), fname, strerror(errno)); return -1; } - sectnum = sectors + 1; } /* Write each sector */ else @@ -1736,7 +1715,7 @@ int x=O_EXCL; /* Open option */ rc = write (fd, buf, sectsz); if (rc < (int)sectsz) { - fprintf (stderr, "HHCDU050E %s sector %u write error: %s\n", + fprintf (stderr, _("HHCDU050E %s sector %u write error: %s\n"), fname, sectnum, errno ? strerror(errno) : "incomplete"); return -1; @@ -1748,7 +1727,7 @@ int x=O_EXCL; /* Open option */ rc = close (fd); if (rc < 0) { - fprintf (stderr, "HHCDU051E %s close error: %s\n", + fprintf (stderr, _("HHCDU051E %s close error: %s\n"), fname, strerror(errno)); return -1; } @@ -1758,8 +1737,8 @@ int x=O_EXCL; /* Open option */ /* Display completion message */ fprintf (stderr, - "HHCDU052I %u sectors successfully written to file %s\n", - sectnum, fname); + _("HHCDU052I %u sectors successfully written to file %s\n"), + sectors, fname); return 0; } /* end function create_fba */ @@ -1800,7 +1779,7 @@ int x=O_EXCL; /* Open option */ l1tabsz = numl1tab * CCKD_L1ENT_SIZE; if (l1tabsz > 65536) { - fprintf (stderr, "HHCDU053E File size too large: %lld [%d]\n", + fprintf (stderr, _("HHCDU053E File size too large: %lld [%d]\n"), (long long)(sectors * sectsz), numl1tab); return -1; } @@ -1813,15 +1792,15 @@ int x=O_EXCL; /* Open option */ S_IRUSR | S_IWUSR | S_IRGRP); if (fd < 0) { - fprintf (stderr, "HHCDU054E %s open error: %s\n", + fprintf (stderr, _("HHCDU054E %s open error: %s\n"), fname, strerror(errno)); return -1; } /* Display progress message */ fprintf (stderr, - "HHCDU055I Creating %4.4X compressed volume %s: " - "%u sectors, %u bytes/sector\n", + _("HHCDU055I Creating %4.4X compressed volume %s: " + "%u sectors, %u bytes/sector\n"), devtype, volser, sectors, sectsz); /* Write the device header */ @@ -1830,7 +1809,7 @@ int x=O_EXCL; /* Open option */ rc = write (fd, &devhdr, CKDDASD_DEVHDR_SIZE); if (rc < (int)CKDDASD_DEVHDR_SIZE) { - fprintf (stderr, "HHCDU056E %s devhdr write error: %s\n", + fprintf (stderr, _("HHCDU056E %s devhdr write error: %s\n"), fname, errno ? strerror(errno) : "incomplete"); return -1; } @@ -1853,7 +1832,7 @@ int x=O_EXCL; /* Open option */ rc = write (fd, &cdevhdr, CCKDDASD_DEVHDR_SIZE); if (rc < (int)CCKDDASD_DEVHDR_SIZE) { - fprintf (stderr, "HHCDU057E %s cdevhdr write error: %s\n", + fprintf (stderr, _("HHCDU057E %s cdevhdr write error: %s\n"), fname, errno ? strerror(errno) : "incomplete"); return -1; } @@ -1865,7 +1844,7 @@ int x=O_EXCL; /* Open option */ rc = write (fd, l1, l1tabsz); if (rc < l1tabsz) { - fprintf (stderr, "HHCDU058E %s l1tab write error: %s\n", + fprintf (stderr, _("HHCDU058E %s l1tab write error: %s\n"), fname, errno ? strerror(errno) : "incomplete"); return -1; } @@ -1877,7 +1856,7 @@ int x=O_EXCL; /* Open option */ rc = write (fd, &l2, CCKD_L2TAB_SIZE); if (rc < (int)CCKD_L2TAB_SIZE) { - fprintf (stderr, "HHCDU059E %s l2tab write error: %s\n", + fprintf (stderr, _("HHCDU059E %s l2tab write error: %s\n"), fname, errno ? strerror(errno) : "incomplete"); return -1; } @@ -1887,7 +1866,7 @@ int x=O_EXCL; /* Open option */ convert_to_ebcdic (&buf[CKDDASD_TRKHDR_SIZE+sectsz], 4, "VOL1"); convert_to_ebcdic (&buf[CKDDASD_TRKHDR_SIZE+sectsz+4], 6, volser); len2 = sizeof(buf2); -#ifdef CCKD_COMPRESS_ZLIB +#ifdef HAVE_LIBZ rc = compress2 (&buf2[0], &len2, &buf[CKDDASD_TRKHDR_SIZE], CFBA_BLOCK_SIZE, -1); if (comp && rc == Z_OK) @@ -1896,14 +1875,14 @@ int x=O_EXCL; /* Open option */ rc = write (fd, &buf, CKDDASD_TRKHDR_SIZE); if (rc < (int)CKDDASD_TRKHDR_SIZE) { - fprintf (stderr, "HHCDU060E %s block header write error: %s\n", + fprintf (stderr, _("HHCDU060E %s block header write error: %s\n"), fname, errno ? strerror(errno) : "incomplete"); return -1; } rc = write (fd, &buf2, len2); if (rc < (int)len2) { - fprintf (stderr, "HHCDU061E %s block write error: %s\n", + fprintf (stderr, _("HHCDU061E %s block write error: %s\n"), fname, errno ? strerror(errno) : "incomplete"); return -1; } @@ -1913,12 +1892,12 @@ int x=O_EXCL; /* Open option */ CKDDASD_TRKHDR_SIZE + len2; } else -#endif // defined(CCKD_COMPRESS_ZLIB) +#endif // defined(HAVE_LIBZ) { rc = write (fd, &buf, CKDDASD_TRKHDR_SIZE + CFBA_BLOCK_SIZE); if (rc < (int)(CKDDASD_TRKHDR_SIZE + CFBA_BLOCK_SIZE)) { - fprintf (stderr, "HHCDU062E %s block write error: %s\n", + fprintf (stderr, _("HHCDU062E %s block write error: %s\n"), fname, errno ? strerror(errno) : "incomplete"); return -1; } @@ -1932,14 +1911,14 @@ int x=O_EXCL; /* Open option */ rcoff = lseek (fd, CKDDASD_DEVHDR_SIZE, SEEK_SET); if (rcoff < 0) { - fprintf (stderr, "HHCDU063E %s cdevhdr lseek error: %s\n", + fprintf (stderr, _("HHCDU063E %s cdevhdr lseek error: %s\n"), fname, strerror(errno)); return -1; } rc = write (fd, &cdevhdr, CCKDDASD_DEVHDR_SIZE); if (rc < (int)CCKDDASD_DEVHDR_SIZE) { - fprintf (stderr, "HHCDU064E %s cdevhdr rewrite error: %s\n", + fprintf (stderr, _("HHCDU064E %s cdevhdr rewrite error: %s\n"), fname, errno ? strerror(errno) : "incomplete"); return -1; } @@ -1948,14 +1927,14 @@ int x=O_EXCL; /* Open option */ rcoff = lseek (fd, CKDDASD_DEVHDR_SIZE + CCKDDASD_DEVHDR_SIZE + l1tabsz, SEEK_SET); if (rcoff < 0) { - fprintf (stderr, "HHCDU065E %s l2tab lseek error: %s\n", + fprintf (stderr, _("HHCDU065E %s l2tab lseek error: %s\n"), fname, strerror(errno)); return -1; } rc = write (fd, &l2, CCKD_L2TAB_SIZE); if (rc < (int)CCKD_L2TAB_SIZE) { - fprintf (stderr, "HHCDU066E %s l2tab rewrite error: %s\n", + fprintf (stderr, _("HHCDU066E %s l2tab rewrite error: %s\n"), fname, errno ? strerror(errno) : "incomplete"); return -1; } @@ -1964,14 +1943,14 @@ int x=O_EXCL; /* Open option */ rc = close (fd); if (rc < 0) { - fprintf (stderr, "HHCDU067E %s close error: %s\n", + fprintf (stderr, _("HHCDU067E %s close error: %s\n"), fname, strerror(errno)); return -1; } /* Display completion message */ fprintf (stderr, - "HHCDU068I %u sectors successfully written to file %s\n", + _("HHCDU068I %u sectors successfully written to file %s\n"), sectors, fname); return 0; diff --git a/dat.h b/dat.h index 584b70e..da68e96 100644 --- a/dat.h +++ b/dat.h @@ -479,10 +479,10 @@ int code; /* Exception code */ /*-------------------------------------------------------------------*/ _DAT_C_STATIC void ARCH_DEP(purge_alb) (REGS *regs) { - INVALIDATE_AEA_ALL(regs); + INVALIDATE_AEA_ARALL(regs); #if defined(_FEATURE_SIE) if(regs->guestregs) { - INVALIDATE_AEA_ALL(regs->guestregs); + INVALIDATE_AEA_ARALL(regs->guestregs); } #endif /*defined(_FEATURE_SIE)*/ } /* end function purge_alb */ @@ -1059,6 +1059,7 @@ TLBE *tlbp; /* -> TLB entry */ else tlbp = &(regs->tlb[(vaddr >> 12) & 0xFF]); +#if 0 if (tlbp != NULL && (vaddr & 0xFFFFFFFFFFFFF000ULL) == tlbp->TLB_VADDR && tlbp->valid @@ -1068,6 +1069,7 @@ TLBE *tlbp; /* -> TLB entry */ pte = tlbp->TLB_PTE; } else +#endif { /* If ASCE indicates a real-space then real addr = virtual addr */ @@ -1705,259 +1707,6 @@ int protect = 0; /* or translation exception then a program check is generated */ /* and the function does not return. */ /*-------------------------------------------------------------------*/ -#if !defined(OPTION_FAST_LOGICAL) -_LOGICAL_C_STATIC RADR ARCH_DEP(logical_to_abs) (VADR addr, int arn, - REGS *regs, int acctype, BYTE akey) -{ -RADR raddr; /* Real address */ -RADR aaddr; /* Absolute address */ -int private = 0; /* 1=Private address space */ -int protect = 0; /* 1=Page prot, 2=ALE prot */ -#if defined(_FEATURE_SIE) -int host_protect = 0; /* 1=Page prot, 2=ALE prot */ -#endif /*defined(_FEATURE_SIE)*/ -int stid = 0; /* Address space indication */ -#ifdef FEATURE_INTERVAL_TIMER -PSA *psa; /* -> Prefixed storage area */ -S32 itimer; /* Interval timer value */ -S32 olditimer; /* Previous interval timer */ -#endif /*FEATURE_INTERVAL_TIMER*/ -U16 xcode; /* Exception code */ - - /* Convert logical address to real address */ - if ((REAL_MODE(®s->psw) || arn == USE_REAL_ADDR) -#if defined(FEATURE_INTERPRETIVE_EXECUTION) - /* Under SIE guest real is always host primary, regardless - of the DAT mode */ - && !(regs->sie_active -#if !defined(_FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE) - && arn == USE_PRIMARY_SPACE -#endif /*defined(_FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE)*/ - ) -#endif /*defined(FEATURE_INTERPRETIVE_EXECUTION)*/ - ) - raddr = addr; - else { - if (ARCH_DEP(translate_addr) (addr, arn, regs, acctype, &raddr, - &xcode, &private, &protect, &stid)) - goto vabs_prog_check; - } - - if (protect && ((acctype == ACCTYPE_WRITE) || (acctype == ACCTYPE_WRITE_SKP))) - goto vabs_prot_excp; - - /* Convert real address to absolute address */ -#if defined(OPTION_FAST_PREFIX) - if (regs->PX) - aaddr = APPLY_PREFIXING (raddr, regs->PX); - else - aaddr = raddr; -#else - aaddr = APPLY_PREFIXING (raddr, regs->PX); -#endif - - /* Program check if absolute address is outside main storage */ - if (aaddr > regs->mainlim) - goto vabs_addr_excp; - -#if defined(_FEATURE_SIE) - if(regs->sie_state && !regs->sie_pref) - { - U32 sie_stid; - U16 sie_xcode; - int sie_private; - -#if defined(FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE) - if (SIE_TRANSLATE_ADDR (regs->sie_mso + aaddr, - ((regs->siebk->mx & SIE_MX_XC) && regs->psw.armode && arn > 0) ? - arn : - USE_PRIMARY_SPACE, - regs->hostregs, ACCTYPE_SIE, &aaddr, &sie_xcode, - &sie_private, &host_protect, &sie_stid)) -#else /*!defined(FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE)*/ - if (SIE_TRANSLATE_ADDR (regs->sie_mso + aaddr, - USE_PRIMARY_SPACE, - regs->hostregs, ACCTYPE_SIE, &aaddr, &sie_xcode, - &sie_private, &host_protect, &sie_stid)) -#endif /*!defined(FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE)*/ - (regs->sie_hostpi) (regs->hostregs, sie_xcode); - - /* Convert host real address to host absolute address */ - aaddr = APPLY_PREFIXING (aaddr, regs->hostregs->PX); - } - - /* Do not apply host key access when SIE fetches/stores data */ - if(regs->sie_active) - akey = 0; -#endif /*defined(_FEATURE_SIE)*/ - - /* Check protection and set reference and change bits */ - switch (acctype) { - - case ACCTYPE_READ: - case ACCTYPE_INSTFETCH: - /* Program check if fetch protected location */ - if (ARCH_DEP(is_fetch_protected) (addr, STORAGE_KEY(aaddr, regs), akey, - private, regs)) - { - host_protect = 0; - goto vabs_prot_excp; - } - - /* Set the reference bit in the storage key */ - STORAGE_KEY(aaddr, regs) |= STORKEY_REF; - break; - - case ACCTYPE_WRITE: - /* Program check if store protected location */ - if (ARCH_DEP(is_store_protected) (addr, STORAGE_KEY(aaddr, regs), akey, - private, protect, regs)) - { - host_protect = 0; - goto vabs_prot_excp; - } - if(host_protect) - goto vabs_prot_excp; - - /* Set the reference and change bits in the storage key */ - STORAGE_KEY(aaddr, regs) |= (STORKEY_REF | STORKEY_CHANGE); - -#if defined(FEATURE_PER) - if( EN_IC_PER_SA(regs) && (arn != USE_REAL_ADDR) -#if defined(FEATURE_PER2) - && ( REAL_MODE(®s->psw) || - ARCH_DEP(check_sa_per2) (addr, arn, acctype, regs) ) -#endif /*defined(FEATURE_PER2)*/ - && PER_RANGE_CHECK(addr,regs->CR(10),regs->CR(11)) ) - ON_IC_PER_SA(regs); -#endif /*defined(FEATURE_PER)*/ - - break; - - case ACCTYPE_WRITE_SKP: - /* Program check if store protected location */ - if (ARCH_DEP(is_store_protected) (addr, STORAGE_KEY(aaddr, regs), akey, - private, protect, regs)) - { - host_protect = 0; - goto vabs_prot_excp; - } - if(host_protect) - goto vabs_prot_excp; - -#if defined(FEATURE_PER) - if( EN_IC_PER_SA(regs) && (arn != USE_REAL_ADDR) -#if defined(FEATURE_PER2) - && ( REAL_MODE(®s->psw) || - ARCH_DEP(check_sa_per2) (addr, arn, acctype, regs) ) -#endif /*defined(FEATURE_PER2)*/ - && PER_RANGE_CHECK(addr,regs->CR(10),regs->CR(11)) ) - ON_IC_PER_SA(regs); -#endif /*defined(FEATURE_PER)*/ - - break; - - case ACCTYPE_SIE_WRITE: - /* Check for host page protection */ - if(protect || host_protect) - goto vabs_prot_excp; - - break; - - } /* end switch */ - -#if defined(FEATURE_INTERVAL_TIMER) - if(raddr < 88 && raddr >= 76) - { - /* Point to PSA in main storage */ - psa = (PSA*)(regs->mainstor + (aaddr & 0x7FFFF000)); - - /* Obtain the TOD clock update lock */ - obtain_lock (&sysblk.todlock); - - /* Decrement the location 80 timer */ - FETCH_FW(itimer, psa->inttimer); - olditimer = itimer--; - STORE_FW(psa->inttimer, itimer); - - /* Set interrupt flag and interval timer interrupt pending - if the interval timer went from positive to negative */ - if (itimer < 0 && olditimer >= 0) - ON_IC_ITIMER(regs); - - /* Release the TOD clock update lock */ - release_lock (&sysblk.todlock); - - /* Check for access to interval timer at location 80 */ - if (sysblk.insttrace || sysblk.inststep) - { - logmsg (_("dat.c: Interval timer accessed: " - "%2.2X%2.2X%2.2X%2.2X\n"), - psa->inttimer[0], psa->inttimer[1], - psa->inttimer[2], psa->inttimer[3]); - } - } -#endif /*FEATURE_INTERVAL_TIMER*/ - -#if defined(OPTION_AEA_BUFFER) - if(arn >= 0 && acctype <= ACCTYPE_WRITE && !EN_IC_PER_SA(regs) ) - { - regs->AE(arn) = aaddr & STORAGE_KEY_PAGEMASK; - regs->VE(arn) = addr & STORAGE_KEY_PAGEMASK; - regs->aekey[arn] = akey; - regs->aeacc[arn] = acctype; - if((addr < PSA_SIZE) && !private) - { - if(akey == 0) - regs->aeacc[arn] = ACCTYPE_READ; - else - INVALIDATE_AEA(arn, regs); - } - } -#endif - - /* Return the absolute address */ - return aaddr; - -vabs_addr_excp: - ARCH_DEP(program_interrupt) (regs, PGM_ADDRESSING_EXCEPTION); - -vabs_prot_excp: -#ifdef FEATURE_SUPPRESSION_ON_PROTECTION - regs->TEA = addr & STORAGE_KEY_PAGEMASK; - if (protect && ((acctype == ACCTYPE_WRITE) || (acctype == ACCTYPE_WRITE_SKP))) - { - regs->TEA |= TEA_PROT_AP; - #if defined(FEATURE_ESAME) - if (protect == 2) - regs->TEA |= TEA_PROT_A; - #endif /*defined(FEATURE_ESAME)*/ - } - regs->TEA |= stid; - regs->excarid = (arn > 0 ? arn : 0); -#endif /*FEATURE_SUPPRESSION_ON_PROTECTION*/ - -#if defined(_FEATURE_PROTECTION_INTERCEPTION_CONTROL) - if(host_protect) - { -#ifdef FEATURE_SUPPRESSION_ON_PROTECTION - regs->hostregs->TEA = regs->TEA; - regs->hostregs->excarid = regs->excarid; -#endif /*FEATURE_SUPPRESSION_ON_PROTECTION*/ - (regs->sie_hostpi) (regs->hostregs, PGM_PROTECTION_EXCEPTION); - } - else -#endif /*defined(_FEATURE_PROTECTION_INTERCEPTION_CONTROL)*/ - ARCH_DEP(program_interrupt) (regs, PGM_PROTECTION_EXCEPTION); - -vabs_prog_check: - ARCH_DEP(program_interrupt) (regs, xcode); - - return -1; /* prevent warning from compiler */ -} /* end function logical_to_abs */ - -#else /* defined(OPTION_FAST_LOGICAL) */ - _LOGICAL_C_STATIC RADR ARCH_DEP(logical_to_abs) (VADR addr, int arn, REGS *regs, int acctype, BYTE akey) { @@ -1970,9 +1719,7 @@ int host_protect = 0; /* 1=Page prot, 2=ALE prot */ #endif /*defined(_FEATURE_SIE)*/ int stid = 0; /* Address space indication */ U16 xcode; /* Exception code */ -#if defined(OPTION_AEA_BUFFER) int aeind; -#endif /* Convert logical address to real address */ if ((REAL_MODE(®s->psw) || arn == USE_REAL_ADDR) @@ -2114,33 +1861,36 @@ int aeind; } /* end switch */ -#if defined(OPTION_AEA_BUFFER) + /* Update the aea tables */ if(arn >= 0 && acctype <= ACCTYPE_WRITE && !EN_IC_PER_SA(regs) ) { + SET_AENOARN(regs); #if defined(FEATURE_ACCESS_REGISTERS) - if(ACCESS_REGISTER_MODE(®s->psw)) - regs->aenoarn = 0; + if (ACCESS_REGISTER_MODE(®s->psw)) + { + if (arn > 0 && regs->AR(arn) == 0) + arn = 0; + } else - regs->aenoarn = 1; + arn = 0; #else - regs->aenoarn = 1; + arn = 0; #endif aeind = AEIND(addr); regs->AE(aeind) = aaddr & STORAGE_KEY_PAGEMASK; - regs->VE(aeind) = addr & STORAGE_KEY_PAGEMASK; + regs->VE(aeind) = (addr & STORAGE_KEY_PAGEMASK) | regs->aeID; regs->aekey[aeind] = akey; regs->aeacc[aeind] = acctype; - if (!regs->aenoarn) - regs->aearn[aeind] = arn; - if((addr < PSA_SIZE) && !private) + regs->aearn[aeind] = arn; + if (arn) regs->aearvalid = 1; + if (addr < PSA_SIZE && !private) { if(akey == 0) - regs->aeacc[arn] = ACCTYPE_READ; + regs->aeacc[aeind] = ACCTYPE_READ; else - INVALIDATE_AEA(arn, regs); + regs->VE(0) = 0; } } -#endif /* Return the absolute address */ return aaddr; @@ -2181,8 +1931,6 @@ int aeind; return -1; /* prevent warning from compiler */ } /* end function logical_to_abs */ -#endif - #endif /*!defined(OPTION_NO_INLINE_LOGICAL) | defined(_DAT_C) */ diff --git a/decimal.c b/decimal.c index 6e3ba3b..4459e93 100644 --- a/decimal.c +++ b/decimal.c @@ -18,6 +18,8 @@ /* Clear DXC on data exception - Peter Kuschnerus V209*/ /* z/Architecture support - (c) Copyright Jan Jaeger, 1999-2003 */ /* TP instruction - Roger Bowler 08/02/01 */ +/* packed_to_binary subroutine - Roger Bowler 29/06/03 */ +/* binary_to_packed subroutine - Roger Bowler 02jul2003 */ /*-------------------------------------------------------------------*/ #include "hercules.h" @@ -36,6 +38,177 @@ #define MAX_DECIMAL_LENGTH 16 #define MAX_DECIMAL_DIGITS (((MAX_DECIMAL_LENGTH)*2)-1) +/*-------------------------------------------------------------------*/ +/* Convert packed decimal number to binary */ +/* */ +/* This subroutine is called by the CVB/CVBY/CVBG instructions. */ +/* It performs the conversion of a 8-byte or 16-byte packed */ +/* decimal number into a 64-bit signed binary result. */ +/* This routine is not architecture-dependent; all of its operands */ +/* are contained in work areas passed by the architecture-dependent */ +/* instruction routines which handle all main-storage accesses and */ +/* possible program checks. */ +/* */ +/* Input: */ +/* dec An 8 or 16 byte area containing a copy of the */ +/* packed decimal storage operand. */ +/* len Length-1 (in bytes) of the packed decimal input */ +/* (7 for CVB/CVBY or 15 for CVBG). */ +/* Output: */ +/* result Points to an U64 field which will receive the */ +/* result as a 64-bit signed binary number. */ +/* ovf Points to an int field which will be set to 1 if */ +/* the result overflows 63 bits plus sign, else 0. */ +/* If overflow occurs, the result field will contain */ +/* the rightmost 64 bits of the result. */ +/* dxf Points to an int field which will be set to 1 if */ +/* invalid digits or sign were detected, else 0. */ +/* The result field is not set if the dxf is set to 1. */ +/*-------------------------------------------------------------------*/ +void packed_to_binary (BYTE *dec, int len, U64 *result, + int *ovf, int *dxf) +{ +U64 dreg; /* 64-bit result accumulator */ +int i; /* Loop counter */ +int h, d=0; /* Decimal digits */ +U64 oreg = 0; /* 64 bit overflow work reg */ + + /* Initialize result flags */ + *ovf = 0; + *dxf = 0; + + /* Initialize 64-bit result accumulator */ + dreg = 0; + + /* Convert decimal digits to binary */ + for (i = 0; i <= len; i++) + { + /* Isolate high-order and low-order digits */ + h = (dec[i] & 0xF0) >> 4; + d = dec[i] & 0x0F; + + /* Data exception if high-order digit is invalid */ + if (h > 9) + { + *dxf = 1; + return; + } + + /* Accumulate high-order digit into result */ + dreg *= 10; + dreg += h; + + /* Set overflow indicator if an overflow has occurred */ + if(dreg < oreg) + *ovf = 1; + + /* Save current value */ + oreg = dreg; + + /* Check for valid low-order digit or sign */ + if (i < len) + { + /* Data exception if low-order digit is invalid */ + if (d > 9) + { + *dxf = 1; + return; + } + + /* Accumulate low-order digit into result */ + dreg *= 10; + dreg += d; + } + else + { + /* Data exception if sign is invalid */ + if (d < 10) + { + *dxf = 1; + return; + } + } + + } /* end for(i) */ + + /* Result is negative if sign is X'B' or X'D' */ + if (d == 0x0B || d == 0x0D) + { + if( (S64)dreg == -1LL ) + *ovf = 1; + (S64)dreg = -((S64)dreg); + } + + /* Set result field and return */ + *result = dreg; + +} /* end function packed_to_binary */ + +/*-------------------------------------------------------------------*/ +/* Convert binary number to packed decimal */ +/* */ +/* This subroutine is called by the CVD/CVDY/CVDG instructions. */ +/* It performs the conversion of a 64-bit signed binary number */ +/* to a 16-byte packed decimal result. Since the maximum 63 bit */ +/* number is less than 31 decimal digits, overflow cannot occur. */ +/* Similarly, the maximum 31 bit number is less than 15 decimal */ +/* digits, therefore CVD/CVDY can safely use the rightmost eight */ +/* bytes of the packed decimal result without risk of overflow. */ +/* */ +/* This routine is not architecture-dependent; all of its operands */ +/* are contained in work areas passed by the architecture-dependent */ +/* instruction routines which handle all main-storage accesses and */ +/* possible program checks. */ +/* */ +/* Input: */ +/* bin Binary number (63 bits plus sign) */ +/* Output: */ +/* result Points to a 16-byte field which will receive the */ +/* result as a packed decimal number (31 digits + sign) */ +/*-------------------------------------------------------------------*/ +void binary_to_packed (S64 bin, BYTE *result) +{ +int i; /* Array subscript */ +int d; /* Decimal digit or sign */ + + /* Special case when input is maximum negative value */ + if ((U64)bin == 0x8000000000000000ULL) + { + memcpy (result, + "\x00\x00\x00\x00\x00\x00\x92\x23" + "\x37\x20\x36\x85\x47\x75\x80\x8D", + 16); + } + else + { + /* Load absolute value and generate sign */ + if ((U64)bin < 0x8000000000000000ULL) + { + /* Value is positive */ + d = 0x0C; + } + else + { + /* Value is negative */ + bin = -bin; + d = 0x0D; + } + + /* Store sign and decimal digits from right to left */ + memset (result, 0, 16); + for (i = 16 - 1; d != 0 || bin != 0; i--) + { + result[i] = d; + d = bin % 10; + bin /= 10; + result[i] |= (d << 4); + d = bin % 10; + bin /= 10; + } + } + +} /* end function(binary_to_packed) */ + /*-------------------------------------------------------------------*/ /* Add two decimal byte strings as unsigned decimal numbers */ /* */ diff --git a/devtype.c b/devtype.c deleted file mode 100644 index cc021ab..0000000 --- a/devtype.c +++ /dev/null @@ -1,63 +0,0 @@ -/* DEVTYPE.C (c) Copyright Jan Jaeger, 1999-2003 */ -/* Hercules Device Types definitions */ - - -#include "hercules.h" - -#include "devtype.h" - -DEVENT device_handler_table[] = { - - /* { type_name, device_type, device_handler_info } */ - - /* TTY consoles */ - { "1052", 0x1052, &constty_device_hndinfo }, - { "3215", 0x3215, &constty_device_hndinfo }, - - /* Card readers */ - { "1442", 0x1442, &cardrdr_device_hndinfo }, - { "2501", 0x2501, &cardrdr_device_hndinfo }, - { "3505", 0x3505, &cardrdr_device_hndinfo }, - - /* Card punches */ - { "3525", 0x3525, &cardpch_device_hndinfo }, - - /* Printers */ - { "1403", 0x1403, &printer_device_hndinfo }, - { "3211", 0x3211, &printer_device_hndinfo }, - - /* Tapes */ - { "3420", 0x3420, &tapedev_device_hndinfo }, - { "3480", 0x3480, &tapedev_device_hndinfo }, - - /* Count Key Data Direct Access Storage Devices */ - { "2311", 0x2311, &ckddasd_device_hndinfo }, - { "2314", 0x2314, &ckddasd_device_hndinfo }, - { "3330", 0x3330, &ckddasd_device_hndinfo }, - { "3340", 0x3340, &ckddasd_device_hndinfo }, - { "3350", 0x3350, &ckddasd_device_hndinfo }, - { "3375", 0x3375, &ckddasd_device_hndinfo }, - { "3380", 0x3380, &ckddasd_device_hndinfo }, - { "3390", 0x3390, &ckddasd_device_hndinfo }, - { "9345", 0x9345, &ckddasd_device_hndinfo }, - - /* Fixed Block Architecture Direct Access Storage Devices */ - { "0671", 0x0671, &fbadasd_device_hndinfo }, - { "3310", 0x3310, &fbadasd_device_hndinfo }, - { "3370", 0x3370, &fbadasd_device_hndinfo }, - { "9336", 0x9336, &fbadasd_device_hndinfo }, - - /* Local Non-SNA 3270 devices */ - { "3270", 0x3270, &loc3270_device_hndinfo }, - { "3287", 0x3287, &loc3270_device_hndinfo }, - -# if !defined(__APPLE__) - /* Communications devices */ - { "3088", 0x3088, &ctcadpt_device_hndinfo }, - { "CTCI", 0x3088, &ctcadpt_device_hndinfo }, - { "CTCT", 0x3088, &ctcadpt_device_hndinfo }, - { "LCS", 0x3088, &ctcadpt_device_hndinfo }, - { "VMNET", 0x3088, &ctcadpt_device_hndinfo }, -# endif /* !defined(__APPLE__) */ - - { NULL, 0, NULL } }; diff --git a/devtype.h b/devtype.h index 41e3bae..ad6f0e6 100644 --- a/devtype.h +++ b/devtype.h @@ -14,24 +14,30 @@ typedef struct _DEVHND { DEVSF *end; /* Device End channel pgm */ DEVSF *resume; /* Device Resume channel pgm */ DEVSF *suspend; /* Device Suspend channel pgm */ + DEVRF *read; /* Device Read */ + DEVWF *write; /* Device Write */ + DEVUF *used; /* Device Query used */ + DEVRR *reserve; /* Device Reserve */ + DEVRR *release; /* Device Release */ } DEVHND; -typedef struct _DEVENT { - char *name; - U16 type; - DEVHND *hnd; /* Device handlers */ -} DEVENT; - - +#if !defined(OPTION_DYNAMIC_LOAD) extern DEVHND constty_device_hndinfo; +extern DEVHND loc3270_device_hndinfo; +extern DEVHND comadpt_device_hndinfo; extern DEVHND cardrdr_device_hndinfo; extern DEVHND cardpch_device_hndinfo; extern DEVHND printer_device_hndinfo; extern DEVHND tapedev_device_hndinfo; +#endif /*!defined(OPTION_DYNAMIC_LOAD)*/ extern DEVHND ckddasd_device_hndinfo; extern DEVHND fbadasd_device_hndinfo; -extern DEVHND loc3270_device_hndinfo; extern DEVHND ctcadpt_device_hndinfo; +extern DEVHND ctci_device_hndinfo; +extern DEVHND ctct_device_hndinfo; +extern DEVHND lcs_device_hndinfo; +extern DEVHND vmnet_device_hndinfo; + #endif /*!defined(_DEVICES_H)*/ diff --git a/diagmssf.c b/diagmssf.c index c6c7dc2..f6224bd 100644 --- a/diagmssf.c +++ b/diagmssf.c @@ -373,7 +373,7 @@ static char lparname[] = "HERCULES"; static char physical[] = "PHYSICAL"; static U64 diag204tod; /* last diag204 tod */ - abs = APPLY_PREFIXING (regs->GR(r1), regs->PX); + abs = APPLY_PREFIXING (regs->GR_L(r1), regs->PX); /* Program check if RMF data is not on a page boundary */ if ( (abs & PAGEFRAME_BYTEMASK) != 0x000) diff --git a/diagnose.c b/diagnose.c index 8e8c9f5..2fc99e1 100644 --- a/diagnose.c +++ b/diagnose.c @@ -16,6 +16,8 @@ #include "opcode.h" +#include "inline.h" + #if !defined(_DIAGNOSE_H) #define _DIAGNOSE_H @@ -27,14 +29,63 @@ #endif /*!defined(_DIAGNOSE_H)*/ +#if defined(OPTION_DYNAMIC_LOAD) && defined(FEATURE_HERCULES_DIAGCALLS) + +void ARCH_DEP(diagf14_call)(int r1, int r3, REGS *regs) +{ +BYTE name[32+1]; +char entry[64]; +unsigned int i; +void (*dllcall)(int, int, REGS *); + +static char *prefix[] = { +#if defined(_370) + "s370_diagf14_", +#endif +#if defined(_390) + "s390_diagf14_", +#endif +#if defined(_900) + "z900_diagf14_" +#endif + }; + + ARCH_DEP(vfetchc) (name,sizeof(name)-2, regs->GR(r1), USE_REAL_ADDR, regs); + + for(i = 0; i < sizeof(name)-1; i++) + { + name[i] = guest_to_host(name[i]); + if(!isprint(name[i]) || isspace(name[i])) + { + name[i] = '\0'; + break; + } + } + /* Ensure string terminator */ + name[i] = '\0'; + strcpy(entry,prefix[regs->arch_mode]); + strcat(entry,name); + + if( (dllcall = HDL_FINDSYM(entry)) ) + dllcall(r1, r3, regs); + else + ARCH_DEP(program_interrupt) (regs, PGM_SPECIFICATION_EXCEPTION); + +} +#endif /*defined(OPTION_DYNAMIC_LOAD)*/ + /*-------------------------------------------------------------------*/ /* Diagnose instruction */ /*-------------------------------------------------------------------*/ -void ARCH_DEP(diagnose_call) (U32 code, int r1, int r2, REGS *regs) +void ARCH_DEP(diagnose_call) (VADR effective_addr2, int b2, + int r1, int r2, REGS *regs) { #ifdef FEATURE_HERCULES_DIAGCALLS -U32 n; /* 32-bit operand value */ +U32 n; /* 32-bit operand value */ #endif /*FEATURE_HERCULES_DIAGCALLS*/ +U32 code; + + code = effective_addr2; switch(code) { @@ -50,13 +101,14 @@ U32 n; /* 32-bit operand value */ break; #endif + case 0x01F: /*---------------------------------------------------------------*/ /* Diagnose 01F: Power Off */ /*---------------------------------------------------------------*/ /* The poweroff diagnose is only valid on the 9221 */ - if((sysblk.cpuid >> 16 & 0xFFFF) != 0x9221 + if(((sysblk.cpuid >> 16 & 0xFFFF) != 0x9221 ) /* and r1/r2 must contain C'POWEROFF' in EBCDIC */ || regs->GR_L(r1) != 0xD7D6E6C5 || regs->GR_L(r2) != 0xD9D6C6C6) @@ -297,6 +349,15 @@ U32 n; /* 32-bit operand value */ ON_IC_CPU_NOT_STARTED(regs); break; +#if defined(OPTION_DYNAMIC_LOAD) + case 0xF14: + /*---------------------------------------------------------------*/ + /* Diagnose F14: Hercules DLL interface */ + /*---------------------------------------------------------------*/ + ARCH_DEP(diagf14_call) (r1, r2, regs); + break; +#endif /*defined(OPTION_DYNAMIC_LOAD)*/ + #if !defined(NO_SIGABEND_HANDLER) /* The following diagnose calls cause a exigent (non-repressible) machine check, and are used for test purposes only *JJ */ @@ -349,10 +410,42 @@ U32 n; /* 32-bit operand value */ /*---------------------------------------------------------------*/ /* Diagnose xxx: Invalid function code */ /*---------------------------------------------------------------*/ + + if( HDC(debug_diagnose, code, r1, r2, regs) ) + return; + + /* Power Off diagnose on 4361, 9371, 9373, 9375, 9377, 9221: */ + /* */ + /* DS 0H */ + /* DC X'8302',S(SHUTDATA) MUST BE R1 AND R2 */ + /* ... */ + /* DS 0H */ + /* SHUTDATA DC X'0000FFFF' MUST BE X'0000FFFF' */ + + if (0 == r1 && 2 == r2 + && (sysblk.cpuid >> 56 & 0xFF) != 0xFF + && ((sysblk.cpuid >> 16 & 0xFFFF) == 0x4361 + || (sysblk.cpuid >> 16 & 0xFFF9) == 0x9371 /* (937X) */ + || (sysblk.cpuid >> 16 & 0xFFFF) == 0x9221) + ) + { + if (0x0000FFFF == ARCH_DEP(vfetch4)(effective_addr2, b2, regs)) + { + regs->cpustate = CPUSTATE_STOPPING; + ON_IC_CPU_NOT_STARTED(regs); + + /* Release the configuration */ + release_config(); + + /* Power Off: exit hercules */ + exit(0); + } + } + #if defined(FEATURE_S370_CHANNEL) && defined(OPTION_NOP_MODEL158_DIAGNOSE) - if((sysblk.cpuid >> 16 & 0xFFFF) != 0x0158) + if((sysblk.cpuid >> 16 & 0xFFFF) != 0x0158) #endif - ARCH_DEP(program_interrupt) (regs, PGM_SPECIFICATION_EXCEPTION); + ARCH_DEP(program_interrupt)(regs, PGM_SPECIFICATION_EXCEPTION); return; } /* end switch(code) */ diff --git a/dyngui.c b/dyngui.c new file mode 100644 index 0000000..33de56c --- /dev/null +++ b/dyngui.c @@ -0,0 +1,1014 @@ +/*********************************************************************/ +/* DYNGUI.C Hercules External GUI Interface DLL */ +/* (c) Copyright "Fish" (David B. Trout), 2003 */ +/* */ +/* Primary contact: Fish [fish@infidels.com] */ +/* */ +/*********************************************************************/ +/* */ +/* Change log: */ +/* */ +/* dd/mm/yy Description... */ +/* -------- ------------------------------------------------------- */ +/* */ +/* 22/06/03 Created. */ +/* */ +/*********************************************************************/ + +#include "hercules.h" // (#includes w/#define for VERSION) + +#if defined(OPTION_DYNAMIC_LOAD) + +#include "devtype.h" +#include "opcode.h" +#include "dynguip.h" // (product defines) +#include "dynguiv.h" // (version defines) + +/////////////////////////////////////////////////////////////////////////////// +// Some handy macros... (feel free to add these to hercules.h) + +#ifndef min +#define min(a,b) (((a) <= (b)) ? (a) : (b)) +#endif +#ifndef max +#define max(a,b) (((a) >= (b)) ? (a) : (b)) +#endif +#define MINMAX(var,low,high) ((var) = min(max((var),(low)),(high))) + +#ifndef BOOL +#define BOOL BYTE +#endif +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif + +/////////////////////////////////////////////////////////////////////////////// +// Our global variables... (initialized by our "Initialize" function) + +#define INPUT_STREAM_FILE_PTR ( stdin ) +#define STATUS_STREAM_FILE_PTR ( stderr ) +#define MAX_COMMAND_LEN ( 1024 ) + +#if defined(WIN32) && !defined(HDL_USE_LIBTOOL) +SYSBLK *psysblk; // (ptr to Herc's SYSBLK structure) +#define sysblk (*psysblk) +void *(*panel_command) (void *); +#endif +FILE* fInputStream = NULL; // (stdin stream) +FILE* fStatusStream = NULL; // (stderr stream) +int nInputStreamFileNum = -1; // (file descriptor for stdin stream) + +// The device query buffer SHOULD be the maximum device filename length +// plus the maximum descriptive length of any/all options for the device, +// but there is no #define for either so we have no choice but to impose +// our own maximum. + +#define MAX_DEVICEQUERY_LEN ( 1024 + 256 ) + +/////////////////////////////////////////////////////////////////////////////// +// Some forward references... (our own functions that we call) + +void Initialize (); +void ProcessingLoop (); +void Cleanup (); +void UpdateTargetCPU (); +void ReadInputData (size_t nTimeoutMillsecs); +void ProcessInputData (); +void* gui_panel_command (char* pszCommand); +void UpdateStatus (); +void UpdateCPUStatus (); +void UpdateRegisters (); +void UpdateDeviceStatus (); + +/////////////////////////////////////////////////////////////////////////////// +// Our main processing loop... + +BOOL bDoneProcessing = FALSE; // (set to TRUE to exit) + +void ProcessingLoop() +{ + // Our main purpose in life: read input stream and process + // any commands that may be entered, and send periodic status + // information back to the external gui via its status stream. + + // Note we only exit whenever our bDoneProcessing flag is set + // which is normally not done until just before Herc unloads + // us which is normally not done until immediately before it + // terminates. + + // Also note we re-retrieve sysblk.panrate each iteration + // since it could change from one iteration to the next as a result + // of the Hercules "panrate" command being entered and processed. + + while (!bDoneProcessing) + { + UpdateTargetCPU(); // ("cpu" command could have changed it) + UpdateStatus(); // (keep sending status back to gui...) + + ReadInputData( sysblk.panrate ); + + ProcessInputData(); // (if there even is any of course...) + } +} + +/////////////////////////////////////////////////////////////////////////////// + +REGS* pTargetCPU_REGS = NULL; // target CPU for commands and displays + +/////////////////////////////////////////////////////////////////////////////// + +void UpdateTargetCPU () +{ + // Use the requested CPU for our status information + // unless it's no longer online (enabled), in which case + // we'll default to the first one we find that's online + + // Note: sysblk.pcpu = number of online CPUs + // pTargetCPU_REGS -> first online CPU + + pTargetCPU_REGS = sysblk.regs + sysblk.pcpu; + + if (!pTargetCPU_REGS->cpuonline) // (requested CPU online/available?) + { + // Find first available CPU that's online... + + int i; // (work) + sysblk.pcpu = 0; // (no cpus currently online) + pTargetCPU_REGS = NULL; // (target CPU currently unknown) + + for (i=0; i < MAX_CPU_ENGINES; i++) + { + if (sysblk.regs[i].cpuonline) + { + sysblk.pcpu++; // (count #of online cpus) + if (!pTargetCPU_REGS) + pTargetCPU_REGS = sysblk.regs + i; + } + } + } + + // If no CPUs are online yet, we'll default to CPU0000... + // (We MUST have a CPU + registers to work with!) + + if (!pTargetCPU_REGS) + pTargetCPU_REGS = sysblk.regs; + + // If SIE is active, use the guest regs rather than the host regs... + +#if defined(_FEATURE_SIE) + if (pTargetCPU_REGS->sie_active) + pTargetCPU_REGS = pTargetCPU_REGS->guestregs; +#endif +} + +/////////////////////////////////////////////////////////////////////////////// + +BYTE* pszInputBuff = NULL; // ptr to buffer +int nInputBuffSize = (MAX_COMMAND_LEN+1); // how big the buffer is +int nInputLen = 0; // amount of data it's holding + +/////////////////////////////////////////////////////////////////////////////// + +void ReadInputData ( size_t nTimeoutMillsecs ) +{ + fd_set input_fd_set; + struct timeval wait_interval_timeval; + size_t nMaxBytesToRead; + int nBytesRead; + BYTE* pReadBuffer; + int rc; + + // Wait for keyboard input data to arrive... + + FD_ZERO ( &input_fd_set ); + FD_SET ( nInputStreamFileNum, &input_fd_set ); + + wait_interval_timeval.tv_sec = nTimeoutMillsecs / 1000; + wait_interval_timeval.tv_usec = (nTimeoutMillsecs % 1000) * 1000; + + if ((rc = select( nInputStreamFileNum+1, &input_fd_set, NULL, NULL, &wait_interval_timeval )) < 0) + { + if (EINTR == errno) + return; // (we were interrupted by a signal) + + // A bona fide error occurred; abort... + + logmsg + ( + _("HHCDG003S select failed on input stream: %s\n") + + ,strerror(errno) + ); + + bDoneProcessing = TRUE; // (force main loop to exit) + return; + } + + // Has keyboard input data indeed arrived yet? + + if (!FD_ISSET( nInputStreamFileNum, &input_fd_set )) + return; // (nothing for us to do...) + + // Ensure our buffer never overflows... (-2 because + // we need room for at least 1 byte + NULL terminator) + + MINMAX(nInputLen,0,(nInputBuffSize-2)); + + // Read input data into next available buffer location... + // (nMaxBytesToRead-1 == room for NULL terminator) + + pReadBuffer = (pszInputBuff + nInputLen); + nMaxBytesToRead = (nInputBuffSize - nInputLen) - 1; + + if ((nBytesRead = read( nInputStreamFileNum, pReadBuffer, nMaxBytesToRead )) < 0) + { + if (EINTR == errno) + return; // (we were interrupted by a signal) + + // A bona fide error occurred; abort... + + logmsg + ( + _("HHCDG004S read failed on input stream: %s\n") + + ,strerror(errno) + ); + + bDoneProcessing = TRUE; // (force main loop to exit) + return; + } + + // Update amount of input data we have and + // ensure that it's always NULL terminated... + + MINMAX(nBytesRead,0,nInputBuffSize); + nInputLen += nBytesRead; + MINMAX(nInputLen,0,(nInputBuffSize-1)); + *(pszInputBuff + nInputLen) = 0; +} + +/////////////////////////////////////////////////////////////////////////////// + +BYTE* pszCommandBuff = NULL; // ptr to buffer +int nCommandBuffSize = (MAX_COMMAND_LEN+1); // how big the buffer is +int nCommandLen = 0; // amount of data it's holding + +/////////////////////////////////////////////////////////////////////////////// +// Process the data we just read from the input stream... + +void ProcessInputData () +{ + BYTE* pNewLineChar; + + // Ensure our buffer is NULL terminated... + + MINMAX(nInputLen,0,(nInputBuffSize-1)); + *(pszInputBuff + nInputLen) = 0; + + // Input commands are delimited by newline characters... + + while (nInputLen && (pNewLineChar = strchr(pszInputBuff,'\n')) != NULL) + { + // Extract command from input buffer + // into our command processing buffer... + + nCommandLen = (pNewLineChar - pszInputBuff); + MINMAX(nCommandLen,0,(nCommandBuffSize-1)); + memcpy(pszCommandBuff, pszInputBuff, nCommandLen); + *(pszCommandBuff + nCommandLen) = 0; + + // Process the extracted command... + + // Note that we always call the registered "panel_command" function + // rather than call our "gui_panel_command" function directly. This + // is in case some other DLL has overridden OUR command handler... + + panel_command ( pszCommandBuff ); // (call registered handler) + + // Shift remaining data back to beginning of input buffer... + + nInputLen = ((pszInputBuff + nInputLen) - (pNewLineChar+1)); + MINMAX(nInputLen,0,(nInputBuffSize-1)); + memmove(pszInputBuff,pNewLineChar+1,nInputLen); + *(pszInputBuff + nInputLen) = 0; + } +} + +/////////////////////////////////////////////////////////////////////////////// +// (These are actually boolean flags..) + +BYTE gui_wants_gregs = 1; +BYTE gui_wants_cregs = 1; +BYTE gui_wants_aregs = 1; +BYTE gui_wants_fregs = 1; +BYTE gui_wants_devlist = 1; +#if defined(OPTION_MIPS_COUNTING) +BYTE gui_wants_cpupct = 0; +#endif + +/////////////////////////////////////////////////////////////////////////////// +// Our Hercules "panel_command" override... + +void* gui_panel_command (char* pszCommand) +{ + void* (*next_panel_command_handler)(char* pszCommand); + + // Special GUI commands start with ']'. At the moment, all these special + // gui commands tell us is what status information it's interested in... + + if (strncasecmp(pszCommand,"]GREGS=",7) == 0) + { + gui_wants_gregs = atoi(pszCommand+7); + return NULL; + } + + if (strncasecmp(pszCommand,"]CREGS=",7) == 0) + { + gui_wants_cregs = atoi(pszCommand+7); + return NULL; + } + + if (strncasecmp(pszCommand,"]AREGS=",7) == 0) + { + gui_wants_aregs = atoi(pszCommand+7); + return NULL; + } + + if (strncasecmp(pszCommand,"]FREGS=",7) == 0) + { + gui_wants_fregs = atoi(pszCommand+7); + return NULL; + } + + if (strncasecmp(pszCommand,"]DEVLIST=",9) == 0) + { + gui_wants_devlist = atoi(pszCommand+9); + return NULL; + } + + if (strncasecmp(pszCommand,"]MAINSTOR=",10) == 0) + { + fprintf(fStatusStream,"MAINSTOR=%d\n",(U32)pTargetCPU_REGS->mainstor); + fprintf(fStatusStream,"MAINSIZE=%d\n",(U32)sysblk.mainsize); + return NULL; + } + +#if defined(OPTION_MIPS_COUNTING) + if (strncasecmp(pszCommand,"]CPUPCT=",8) == 0) + { + gui_wants_cpupct = atoi(pszCommand+8); + return NULL; + } +#endif + + // Ignore "commands" that are actually just comments (start with '*' or '#') + + if ('*' == pszCommand[0] || '#' == pszCommand[0]) + { + logmsg("%s\n",pszCommand); // (log comment to console) + return NULL; // (and otherwise ignore it) + } + + // Otherwise it's not a command that we handle. Call the next higher + // level command handler which, under normal circumstances SHOULD be + // Hercules's "panel_command" function, but which MAY have been over- + // ridden by yet some OTHER dynamically loaded command handler... + + next_panel_command_handler = HDL_FINDNXT( gui_panel_command ); + + if (!next_panel_command_handler) // (extremely unlikely!) + return NULL; // (extremely unlikely!) + + return next_panel_command_handler( pszCommand ); +} + +/////////////////////////////////////////////////////////////////////////////// + +QWORD psw, prev_psw; +BYTE wait_bit; +BYTE prev_cpustate = 0xFF; +U64 prev_instcount = 0; + +/////////////////////////////////////////////////////////////////////////////// +// Send status information messages back to the gui... + +void UpdateStatus () +{ + BOOL bStatusChanged = FALSE; // (whether or not anything has changed) + + store_psw(pTargetCPU_REGS, psw); + wait_bit = (psw[1] & 0x02); + + // The SYS light and %CPU-Utilization + // information we send *ALL* the time... + + if (!(0 + || CPUSTATE_STOPPING == pTargetCPU_REGS->cpustate + || CPUSTATE_STOPPED == pTargetCPU_REGS->cpustate + )) + { + fprintf(fStatusStream, + + "SYS=%c\n" + + ,wait_bit ? '0' : '1' + ); + } + +#if defined(OPTION_MIPS_COUNTING) + if (gui_wants_cpupct) + { + BYTE cpupct[10]; + + if (CPUSTATE_STOPPED == pTargetCPU_REGS->cpustate) + strcpy(cpupct,"0"); + else + snprintf(cpupct,sizeof(cpupct), + "%1.0f",(100.0 * pTargetCPU_REGS->cpupct)); + + if (isdigit(cpupct[0])) + { + fprintf(fStatusStream, + + "CPUPCT=%s\n" + + ,cpupct + ); + } + } +#endif + + // Determine if we need to inform the GUI of anything... + + bStatusChanged = FALSE; // (whether or not anything has changed) + + if (0 + || memcmp(prev_psw, psw, sizeof(prev_psw)) != 0 + || prev_cpustate != pTargetCPU_REGS->cpustate + || (prev_instcount != ( +#if defined(_FEATURE_SIE) + pTargetCPU_REGS->sie_state ? pTargetCPU_REGS->hostregs->instcount : +#endif + pTargetCPU_REGS->instcount) + ) + ) + { + bStatusChanged = TRUE; // (something has indeed changed...) + + // Save new values for next time... + + memcpy(prev_psw, psw, sizeof(prev_psw)); + prev_cpustate = pTargetCPU_REGS->cpustate; + prev_instcount = ( +#if defined(_FEATURE_SIE) + pTargetCPU_REGS->sie_state ? pTargetCPU_REGS->hostregs->instcount : +#endif + pTargetCPU_REGS->instcount); + } + + // If anything has changed, inform the GUI... + + if (bStatusChanged) + { + UpdateCPUStatus(); // (update the status line info...) + UpdateRegisters(); // (update the registers display...) + } + + // We always continuously send device status information so that the GUI + // can detect devices being added or removed from the configuration or if + // the filename/etc has changed, etc, and besides, the channel subsystem + // operates completely independently from the CPU so the GUI needs to know + // if a given device is busy or interrupt pending, etc, anyway... + + if (gui_wants_devlist) // (if the device list is visible) + UpdateDeviceStatus(); // (update the list of devices...) +} + +/////////////////////////////////////////////////////////////////////////////// + +#ifdef OPTION_MIPS_COUNTING +U32 mips_rate = 0; +U32 prev_mips_rate = 0; +U32 sios_rate = 0; +U32 prev_sios_rate = 0; +#endif + +/////////////////////////////////////////////////////////////////////////////// +// Send status information messages back to the gui... + +void UpdateCPUStatus () +{ + size_t i; + + // CPU status line... (PSW, status indicators, and instruction count) + + fprintf(fStatusStream, "STATUS=" + + "CPU%4.4X " + + "PSW=%2.2X%2.2X%2.2X%2.2X " + "%2.2X%2.2X%2.2X%2.2X " + "%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X " + + "%c%c%c%c%c%c%c%c " + + "instcount=%llu\n" + + ,pTargetCPU_REGS->cpuad + + ,psw[0], psw[1], psw[2], psw[3] + ,psw[4], psw[5], psw[6], psw[7] + ,psw[8], psw[9], psw[10], psw[11], psw[12], psw[13], psw[14], psw[15] + + ,CPUSTATE_STOPPED == pTargetCPU_REGS->cpustate ? 'M' : '.' + ,sysblk.inststep ? 'T' : '.' + ,wait_bit ? 'W' : '.' + ,pTargetCPU_REGS->loadstate ? 'L' : '.' + ,pTargetCPU_REGS->checkstop ? 'C' : '.' + ,pTargetCPU_REGS->psw.prob ? 'P' : '.' + , +#if defined(_FEATURE_SIE) + pTargetCPU_REGS->sie_state ? 'S' : '.' +#else // !defined(_FEATURE_SIE) + '.' +#endif // defined(_FEATURE_SIE) + , +#if defined(_900) + ARCH_900 == pTargetCPU_REGS->arch_mode ? 'Z' : '.' +#else // !defined(_900) + '.' +#endif // defined(_900) + ,(long long)( +#if defined(_FEATURE_SIE) + pTargetCPU_REGS->sie_state ? pTargetCPU_REGS->hostregs->instcount : +#endif // defined(_FEATURE_SIE) + pTargetCPU_REGS->instcount) + ); + + // MIPS rate and SIOS rate... + +#if defined(OPTION_MIPS_COUNTING) + + mips_rate = 0; + sios_rate = 0; + +#if !defined(FEATURE_CPU_RECONFIG) + + for (i = 0; i < sysblk.numcpu; i++) + +#else // defined(FEATURE_CPU_RECONFIG) + + for (i = 0; i < MAX_CPU_ENGINES; i++) + + if(sysblk.regs[i].cpuonline) + +#endif // !defined(FEATURE_CPU_RECONFIG) + + { + mips_rate += sysblk.regs[i].mipsrate; + sios_rate += sysblk.regs[i].siosrate; + } + +#ifdef OPTION_SHARED_DEVICES + sios_rate += sysblk.shrdrate; +#endif + + // (ignore wildly high MIPS rates...) + + if (mips_rate > 100000) // (100 MIPS?!!) + mips_rate = 0; // (Not hardly!) + + // MIPS rate... + + if (mips_rate != prev_mips_rate) + { + fprintf(fStatusStream, + + "MIPS=%2.1d.%2.2d\n" + + , mips_rate / 1000 + ,(mips_rate % 1000) / 10 + ); + + prev_mips_rate = mips_rate; + } + + // SIOS rate... + + if (sios_rate != prev_sios_rate) + { + fprintf(fStatusStream, + + "SIOS=%5d\n" + + ,sios_rate + ); + + prev_sios_rate = sios_rate; + } + +#endif // defined(OPTION_MIPS_COUNTING) +} + +/////////////////////////////////////////////////////////////////////////////// +// Send status information messages back to the gui... + +void UpdateRegisters () +{ + if (gui_wants_gregs) + { + fprintf(fStatusStream, + + "GR0-3=%8.8X %8.8X %8.8X %8.8X\n" + "GR4-7=%8.8X %8.8X %8.8X %8.8X\n" + "GR8-B=%8.8X %8.8X %8.8X %8.8X\n" + "GRC-F=%8.8X %8.8X %8.8X %8.8X\n" + + ,pTargetCPU_REGS->GR_L(0) + ,pTargetCPU_REGS->GR_L(1) + ,pTargetCPU_REGS->GR_L(2) + ,pTargetCPU_REGS->GR_L(3) + ,pTargetCPU_REGS->GR_L(4) + ,pTargetCPU_REGS->GR_L(5) + ,pTargetCPU_REGS->GR_L(6) + ,pTargetCPU_REGS->GR_L(7) + ,pTargetCPU_REGS->GR_L(8) + ,pTargetCPU_REGS->GR_L(9) + ,pTargetCPU_REGS->GR_L(10) + ,pTargetCPU_REGS->GR_L(11) + ,pTargetCPU_REGS->GR_L(12) + ,pTargetCPU_REGS->GR_L(13) + ,pTargetCPU_REGS->GR_L(14) + ,pTargetCPU_REGS->GR_L(15) + ); + } + + if (gui_wants_cregs) + { + fprintf(fStatusStream, + + "CR0-3=%8.8X %8.8X %8.8X %8.8X\n" + "CR4-7=%8.8X %8.8X %8.8X %8.8X\n" + "CR8-B=%8.8X %8.8X %8.8X %8.8X\n" + "CRC-F=%8.8X %8.8X %8.8X %8.8X\n" + + ,pTargetCPU_REGS->CR_L(0) + ,pTargetCPU_REGS->CR_L(1) + ,pTargetCPU_REGS->CR_L(2) + ,pTargetCPU_REGS->CR_L(3) + ,pTargetCPU_REGS->CR_L(4) + ,pTargetCPU_REGS->CR_L(5) + ,pTargetCPU_REGS->CR_L(6) + ,pTargetCPU_REGS->CR_L(7) + ,pTargetCPU_REGS->CR_L(8) + ,pTargetCPU_REGS->CR_L(9) + ,pTargetCPU_REGS->CR_L(10) + ,pTargetCPU_REGS->CR_L(11) + ,pTargetCPU_REGS->CR_L(12) + ,pTargetCPU_REGS->CR_L(13) + ,pTargetCPU_REGS->CR_L(14) + ,pTargetCPU_REGS->CR_L(15) + ); + } + + if (gui_wants_aregs) + { + fprintf(fStatusStream, + + "AR0-3=%8.8X %8.8X %8.8X %8.8X\n" + "AR4-7=%8.8X %8.8X %8.8X %8.8X\n" + "AR8-B=%8.8X %8.8X %8.8X %8.8X\n" + "ARC-F=%8.8X %8.8X %8.8X %8.8X\n" + + ,pTargetCPU_REGS->AR(0) + ,pTargetCPU_REGS->AR(1) + ,pTargetCPU_REGS->AR(2) + ,pTargetCPU_REGS->AR(3) + ,pTargetCPU_REGS->AR(4) + ,pTargetCPU_REGS->AR(5) + ,pTargetCPU_REGS->AR(6) + ,pTargetCPU_REGS->AR(7) + ,pTargetCPU_REGS->AR(8) + ,pTargetCPU_REGS->AR(9) + ,pTargetCPU_REGS->AR(10) + ,pTargetCPU_REGS->AR(11) + ,pTargetCPU_REGS->AR(12) + ,pTargetCPU_REGS->AR(13) + ,pTargetCPU_REGS->AR(14) + ,pTargetCPU_REGS->AR(15) + ); + } + + if (gui_wants_fregs) + { + fprintf(fStatusStream, + + "FR0-2=%8.8X %8.8X %8.8X %8.8X\n" + "FR4-6=%8.8X %8.8X %8.8X %8.8X\n" + + ,pTargetCPU_REGS->fpr[0] + ,pTargetCPU_REGS->fpr[1] + ,pTargetCPU_REGS->fpr[2] + ,pTargetCPU_REGS->fpr[3] + ,pTargetCPU_REGS->fpr[4] + ,pTargetCPU_REGS->fpr[5] + ,pTargetCPU_REGS->fpr[6] + ,pTargetCPU_REGS->fpr[7] + ); + } +} + +/////////////////////////////////////////////////////////////////////////////// + +BYTE szQueryDeviceBuff[ MAX_DEVICEQUERY_LEN + 1 ]; // (always +1 for safety!) + +/////////////////////////////////////////////////////////////////////////////// +// Send status information messages back to the gui... + +void UpdateDeviceStatus () +{ + DEVBLK* pDEVBLK; + BYTE* pDEVClass; + BYTE chOnlineStat, chBusyStat, chPendingStat, chOpenStat; + + // Process ALL the devices in the entire configuration each time... + + for (pDEVBLK = sysblk.firstdev; pDEVBLK != NULL; pDEVBLK = pDEVBLK->nextdev) + { + // Does this device actually exist in the configuration? + + if (!(pDEVBLK->pmcw.flag5 & PMCW5_V)) + continue; // (no, skip) + + // Retrieve this device's filename and optional settings parameter values... + + szQueryDeviceBuff[MAX_DEVICEQUERY_LEN] = 0; // (buffer allows room for 1 extra) + + (pDEVBLK->hnd->query)(pDEVBLK, &pDEVClass, MAX_DEVICEQUERY_LEN, szQueryDeviceBuff); + + if (0 != szQueryDeviceBuff[MAX_DEVICEQUERY_LEN]) // (buffer overflow?) + { + logmsg + ( + _("HHCDG005E Device query buffer overflow! (device=%4.4X)\n") + + ,pDEVBLK->devnum + + ); + } + + szQueryDeviceBuff[MAX_DEVICEQUERY_LEN] = 0; // (enforce NULL termination) + + // Device status flags... + chOnlineStat = + chBusyStat = + chPendingStat = + chOpenStat = '0'; + + if (pDEVBLK->filename[0] || (pDEVBLK->console && pDEVBLK->connected)) chOnlineStat = '1'; + if (pDEVBLK->busy) chBusyStat = '1'; + if (pDEVBLK->pending || pDEVBLK->pcipending) chPendingStat = '1'; + if (pDEVBLK->fd > max(STDIN_FILENO,max(STDOUT_FILENO,STDERR_FILENO))) chOpenStat = '1'; + + // Send status message back to gui... + + fprintf(fStatusStream, + + "DEV=%4.4X %4.4X %-4.4s %c%c%c%c %s\n" + + ,pDEVBLK->devnum + ,pDEVBLK->devtype + ,pDEVClass + + ,chOnlineStat + ,chBusyStat + ,chPendingStat + ,chOpenStat + + ,szQueryDeviceBuff + ); + } + + // Since the device list can be in any order and devices can be added + // and/or removed at any time, the GUI needs to know "That's all the + // devices there are" so that it can detect when devices are removed... + + fprintf(fStatusStream, "DEV=X\n"); // (indicates end of list) +} + +/////////////////////////////////////////////////////////////////////////////// +// Our Hercules "debug_cpu_state" override... + +// The following function fixes an unintentional problem caused by the new +// logger mechanism (wherein stdout and stderr now point to the same stream) +// due to a oversight (bug) on my part wherein the 'LOAD' and 'MAN' messages +// are being [mistakenly] written to stdout instead of stderr (where they +// normally should be). The current version of the gui expects both messages +// to come in on the stdout stream, but due to the recent logger changes, they +// now come in on the stderr stream instead (because stdout was duped to stderr +// by the new logger logic) thus causing the gui to miss seeing them without +// the below fix. The below fix simply corrects for this by simply writing the +// two messages to the stdout stream where the current gui expects to see them. + +void* gui_debug_cpu_state ( REGS* pREGS ) +{ +void *(*next_debug_call)(REGS *); + + static BOOL bLoading = FALSE; + static BOOL bStopped = FALSE; + + if (pTargetCPU_REGS && pREGS != pTargetCPU_REGS) + return NULL; + + if (bLoading != (pREGS->loadstate ? TRUE : FALSE)) + { + bLoading = (pREGS->loadstate ? TRUE : FALSE); + fprintf(stdout,"LOAD=%c\n", bLoading ? '1' : '0'); + } + + if (bStopped != ((CPUSTATE_STOPPED == pREGS->cpustate) ? TRUE : FALSE)) + { + bStopped = ((CPUSTATE_STOPPED == pREGS->cpustate) ? TRUE : FALSE); + fprintf(stdout,"MAN=%c\n", bStopped ? '1' : '0'); + } + + if((next_debug_call = HDL_FINDNXT( gui_debug_cpu_state ))) + return next_debug_call( pREGS ); + + return NULL; // (I have no idea why this is a void* func) +} + +/////////////////////////////////////////////////////////////////////////////// +// Acquire any resources we need in order to operate... +// (called by 'gui_panel_display' before main loop initiates...) + +void Initialize () +{ + // Initialize streams... + + fInputStream = INPUT_STREAM_FILE_PTR; + fStatusStream = STATUS_STREAM_FILE_PTR; + + nInputStreamFileNum = fileno(fInputStream); + + // Allocate input stream buffer... + + if (!(pszInputBuff = (BYTE*) malloc( nInputBuffSize ))) + { + fprintf(stderr, + _("HHCDG006S malloc pszInputBuff failed: %s\n") + ,strerror(errno)); + exit(0); + } + + memset(pszInputBuff,0,nInputBuffSize); + nInputLen = 0; + + // Allocate command processing buffer... + + if (!(pszCommandBuff = (BYTE*) malloc( nCommandBuffSize ))) + { + fprintf(stderr, + _("HHCDG007S malloc pszCommandBuff failed: %s\n") + ,strerror(errno)); + exit(0); + } + + memset(pszCommandBuff,0,nCommandBuffSize); + nCommandLen = 0; +} + +/////////////////////////////////////////////////////////////////////////////// +// Release any resources we acquired in order to operate... +// (called by 'gui_panel_display' when main loop terminates...) + +void Cleanup() +{ + if (pszInputBuff) + free(pszInputBuff); + + if (pszCommandBuff) + free(pszCommandBuff); +} + +/////////////////////////////////////////////////////////////////////////////// +// Our Hercules "panel_display" AND/OR "daemon_task" override... + +void gui_panel_display () +{ + logmsg(_("HHCDG001I dyngui.dll version " DYNGUI_VERSION "-" VERSION " initiated\n")); + Initialize(); // (allocate buffers, etc) + ProcessingLoop(); // (primary processing loop) + logmsg(_("HHCDG002I dyngui.dll terminated\n")); + Cleanup(); // (de-allocate resources) +} + +/*****************************************************************************\ + Hercules Dynamic Loader control sections... +\*****************************************************************************/ +/* + Note that ALL of the below "sections" are actually just simple functions + that Hercules's dynamic loader logic calls, thus allowing you to insert + whatever 'C' code you may need directly into any of the below sections. +*/ +/////////////////////////////////////////////////////////////////////////////// +// HDL_DEPENDENCY_SECTION +// The following are the various Hercules structures whose layout this module +// depends on. The layout of the following structures (size and version) MUST +// match the layout that was used to build Hercules with. If the size/version +// of any of the following structures changes (and a new version of Hercules +// is built using the new layout), then THIS module must also be built with +// the new layout as well. The layout (size/version) of the structure as it +// was when Hercules was built MUST MATCH the layout as it was when THIS DLL +// was built) + +/* Libtool static name colision resolution */ +/* note : lt_dlopen will look for symbol & modulename_LTX_symbol */ +#if !defined(HDL_BUILD_SHARED) && defined(HDL_USE_LIBTOOL) +#define hdl_ddev dyngui_LTX_hdl_ddev +#define hdl_depc dyngui_LTX_hdl_depc +#define hdl_reso dyngui_LTX_hdl_reso +#define hdl_init dyngui_LTX_hdl_init +#define hdl_fini dyngui_LTX_hdl_fini +#endif + +HDL_DEPENDENCY_SECTION; + +HDL_DEPENDENCY ( HERCULES ); // hercules itself +HDL_DEPENDENCY ( SYSBLK ); // master control block +HDL_DEPENDENCY ( REGS ); // cpu regs and such +HDL_DEPENDENCY ( DEVBLK ); // device info block + +END_DEPENDENCY_SECTION; + +/////////////////////////////////////////////////////////////////////////////// +// HDL_REGISTER_SECTION +// The following section defines the entry points within Hercules that THIS +// module is overriding (replacing). That is to say, THIS module's functions +// will be called by Hercules instead of the normal Hercules function (if any). +// The functions defined below thus provide additional/different functionality +// above/beyond the functionality normally provided by Hercules. (Of course, +// yet OTHER dlls may have further overridden whatever overrides we register +// here, such as would likely be the case for panel command overrides). + +HDL_REGISTER_SECTION; // ("Register" our entry-points) + +// Hercules's Our +// registered overriding +// entry-point entry-point +// name value + +HDL_REGISTER ( panel_display, gui_panel_display );// (Yep! We override EITHER!) +HDL_REGISTER ( daemon_task, gui_panel_display );// (Yep! We override EITHER!) +HDL_REGISTER ( debug_cpu_state, gui_debug_cpu_state ); +HDL_REGISTER ( panel_command, gui_panel_command ); + +END_REGISTER_SECTION; + +#if defined(WIN32) && !defined(HDL_USE_LIBTOOL) +#undef sysblk +/////////////////////////////////////////////////////////////////////////////// +// HDL_RESOLVER_SECTION +// The following section "resolves" entry-points that this module needs. The +// below HDL_RESOLVE entries define the names of Hercules's registered entry- +// points that we need "imported" to us (so that we may call those functions +// directly ourselves). The HDL_RESOLVE_PTRVAR entries set the named pointer +// variable value (i.e. the name of OUR pointer variable) to the registered +// entry-point value that was registered by Hercules or some other DLL. + +HDL_RESOLVER_SECTION; // ("Resolve" needed entry-points) + +// Registered +// entry-points +// that we call +HDL_RESOLVE ( panel_command ); + +// Our pointer- Registered entry- +// variable name point value name +HDL_RESOLVE_PTRVAR ( psysblk, sysblk ); + +END_RESOLVER_SECTION; +#endif + +/////////////////////////////////////////////////////////////////////////////// +// HDL_FINAL_SECTION +// The following section defines what should be done immediately before this +// module is unloaded. It is nothing more than a function that is called by +// Hercules just before your module is unloaded. You can do anything you want +// but the normal thing to do is release any resources that were acquired when +// your module was loaded (e.g. release memory that was malloc'ed, etc). + +HDL_FINAL_SECTION; +{ + usleep(100000); // (brief delay to give GUI time + // to display ALL shutdown msgs) + bDoneProcessing = TRUE; // (now force main loop to exit) +} +END_FINAL_SECTION; + +/////////////////////////////////////////////////////////////////////////////// + +#endif /*defined(OPTION_DYNAMIC_LOAD)*/ diff --git a/dyngui.rc b/dyngui.rc new file mode 100644 index 0000000..795ce21 --- /dev/null +++ b/dyngui.rc @@ -0,0 +1,59 @@ +///////////////////////////////////////////////////////////////////////////////////////// +// dyngui.rc -- defines the Windows resources to be linked into the product +// (c) Copyright "Fish" (David B. Trout), 2003 +///////////////////////////////////////////////////////////////////////////////////////// + +#if defined(HAVE_CONFIG_H) +#include // (needed 1st to set DEBUG flag appropriately) +#endif +#include "dynguip.h" // (product defines) +#include "dynguiv.h" // (version defines) + +///////////////////////////////////////////////////////////////////////////////////////// + +1 VERSIONINFO + +FILEVERSION DYNGUI_VERMAJOR_NUM, DYNGUI_VERINTER_NUM, DYNGUI_VERMINOR_NUM, BUILDCOUNT_NUM +PRODUCTVERSION DYNGUI_VERMAJOR_NUM, DYNGUI_VERINTER_NUM, DYNGUI_VERMINOR_NUM, BUILDCOUNT_NUM + +FILEFLAGSMASK 0x3f +FILEOS 0x4 +FILETYPE 0x2 + +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + +// Standard/Required Attributes... + + VALUE "FileDescription", DYNGUI_PRODUCT "\0" + VALUE "FileVersion", DYNGUI_VERSION "\0" + VALUE "ProductName", DYNGUI_PRODUCT "\0" + VALUE "ProductVersion", DYNGUI_VERSION "\0" + VALUE "CompanyName", DYNGUI_COMPANY "\0" + VALUE "LegalCopyright", DYNGUI_COPYRIGHT " " DYNGUI_COMPANY "\0" + VALUE "Comments", "(none)" "\0" + +// Custom Attributes... + + VALUE "Product URL", DYNGUI_PRODUCT_URL "\0" + VALUE "Product Email", DYNGUI_PRODUCT_EMAIL "\0" + VALUE "Hercules URL", HERCULES_PRODUCT_URL "\0" + VALUE "Hercules Email", HERCULES_PRODUCT_EMAIL "\0" + VALUE "Hercules Version", VERSION "\0" + +#if defined(DEBUG) || defined(_DEBUG) + VALUE "SpecialBuild", "DEBUG version" "\0" +#endif + + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +///////////////////////////////////////////////////////////////////////////////////////// diff --git a/dynguib.h b/dynguib.h new file mode 100644 index 0000000..2e9948e --- /dev/null +++ b/dynguib.h @@ -0,0 +1,6 @@ +// 1 +#ifndef AUTOBUILDCOUNT_H +#define AUTOBUILDCOUNT_H +#define BUILDCOUNT_NUM 1 +#define BUILDCOUNT_STR "1" +#endif diff --git a/dynguip.h b/dynguip.h new file mode 100644 index 0000000..0e4ec4e --- /dev/null +++ b/dynguip.h @@ -0,0 +1,21 @@ +///////////////////////////////////////////////////////////////////////////////////////// +// dynguip.h -- defines constants identifying the product itself +// (c) Copyright "Fish" (David B. Trout), 2003 +///////////////////////////////////////////////////////////////////////////////////////// + +#ifndef _DYNGUIP_H_ +#define _DYNGUIP_H_ + +/////////////////////////////////////////////////////////////////////////////////////// + +#define DYNGUI_PRODUCT "Hercules External GUI Interface DLL" +#define DYNGUI_COPYRIGHT "Copyright (c) 2003" +#define DYNGUI_COMPANY "Software Development Laboratories (aka 'Fish' (David B. Trout))" +#define DYNGUI_PRODUCT_URL "http://home.sprintmail.com/~dtrout/Hercules/index.html" +#define DYNGUI_PRODUCT_EMAIL "fish@infidels.org" +#define HERCULES_PRODUCT_URL "http://www.conmicro.cx/hercules/" +#define HERCULES_PRODUCT_EMAIL "hercules-390@yahoogroups.com" + +/////////////////////////////////////////////////////////////////////////////////////// + +#endif // _DYNGUIP_H_ diff --git a/dynguiv.h b/dynguiv.h new file mode 100644 index 0000000..7c9de38 --- /dev/null +++ b/dynguiv.h @@ -0,0 +1,32 @@ +///////////////////////////////////////////////////////////////////////////////////////// +// dynguiv.h -- defines the build version for the product itself +// (c) Copyright "Fish" (David B. Trout), 2003 +///////////////////////////////////////////////////////////////////////////////////////// + +#ifndef _DYNGUIV_H_ +#define _DYNGUIV_H_ + +/////////////////////////////////////////////////////////////////////////////////////// + +#include "dynguib.h" // (where BUILDCOUNT_STR and BUILDCOUNT_NUM are defined) + +/////////////////////////////////////////////////////////////////////////////////////// + +#define DYNGUI_VERMAJOR_NUM 1 // MAJOR Release (program radically changed) +#define DYNGUI_VERMAJOR_STR "1" + +#define DYNGUI_VERINTER_NUM 0 // Minor Enhancements (new features, etc) +#define DYNGUI_VERINTER_STR "0" + +#define DYNGUI_VERMINOR_NUM 0 // Bug Fix +#define DYNGUI_VERMINOR_STR "0" + +#if defined(DEBUG) || defined(_DEBUG) +#define DYNGUI_VERSION DYNGUI_VERMAJOR_STR "." DYNGUI_VERINTER_STR "." DYNGUI_VERMINOR_STR "." BUILDCOUNT_STR "-D" +#else +#define DYNGUI_VERSION DYNGUI_VERMAJOR_STR "." DYNGUI_VERINTER_STR "." DYNGUI_VERMINOR_STR "." BUILDCOUNT_STR +#endif + +/////////////////////////////////////////////////////////////////////////////////////// + +#endif // _DYNGUIV_H_ diff --git a/dyninst.c b/dyninst.c new file mode 100644 index 0000000..b114c0f --- /dev/null +++ b/dyninst.c @@ -0,0 +1,434 @@ +/* DYNINST.C (c) Copyright Jan Jaeger, 2003 */ +/* Hercules Dynamic Loader */ + + +/* This module dynamically loads instructions. Instruction routine */ +/* names must be registered under the name of s370_opcode_B220 for */ +/* example, where s370 may also be s390 or z900 for ESA/390 or ESAME */ +/* mode respectively. B220 is the opcode, and is depending on the */ +/* instruction 2 3 or 4 digits. */ + + +#include "hercules.h" + + +#if defined(OPTION_DYNAMIC_LOAD) + + +#if defined(WIN32) +/* We need to do some special tricks for cygwin here, since cygwin */ +/* does not support backlink and we need to resolve symbols during */ +/* dll initialisation (REGISTER/RESOLVER). Opcode tables are renamed */ +/* such that no naming conflicts occur. */ + #define opcode_table opcode_table_r + #define opcode_01xx opcode_01xx_r + #define opcode_a5xx opcode_a5xx_r + #define opcode_a4xx opcode_a4xx_r + #define opcode_a7xx opcode_a1xx_r + #define opcode_b2xx opcode_b2xx_r + #define opcode_b3xx opcode_b3xx_r + #define opcode_b9xx opcode_b9xx_r + #define opcode_c0xx opcode_c0xx_r + #define opcode_e3xx opcode_e3xx_r + #define opcode_e5xx opcode_e5xx_r + #define opcode_e6xx opcode_e6xx_r + #define opcode_ebxx opcode_ebxx_r + #define opcode_ecxx opcode_ecxx_r + #define opcode_edxx opcode_edxx_r + #define s370_opcode_table s370_opcode_table_r + #define s390_opcode_table s390_opcode_table_r + #define z900_opcode_table z900_opcode_table_r +#endif + +#include "opcode.h" + +#if defined(WIN32) + #undef opcode_table + #undef opcode_01xx + #undef opcode_a5xx + #undef opcode_a4xx + #undef opcode_a7xx + #undef opcode_b2xx + #undef opcode_b3xx + #undef opcode_b9xx + #undef opcode_c0xx + #undef opcode_e3xx + #undef opcode_e5xx + #undef opcode_e6xx + #undef opcode_ebxx + #undef opcode_ecxx + #undef opcode_edxx + #undef s370_opcode_table + #undef s390_opcode_table + #undef z900_opcode_table +#endif + +#include "inline.h" + + +#if !defined(_GEN_ARCH) + +#if defined(_ARCHMODE2) + #define _GEN_ARCH _ARCHMODE2 + #include "dyninst.c" +#endif + +#if defined(_ARCHMODE3) + #undef _GEN_ARCH + #define _GEN_ARCH _ARCHMODE3 + #include "dyninst.c" +#endif + + +static zz_func save_table[256][GEN_MAXARCH]; +static zz_func save_01xx[256][GEN_MAXARCH]; +#if defined (FEATURE_VECTOR_FACILITY) +static zz_func save_a4xx[256][GEN_MAXARCH]; +#endif +static zz_func save_a5xx[16][GEN_MAXARCH]; +static zz_func save_a7xx[16][GEN_MAXARCH]; +static zz_func save_b2xx[256][GEN_MAXARCH]; +static zz_func save_b3xx[256][GEN_MAXARCH]; +static zz_func save_b9xx[256][GEN_MAXARCH]; +static zz_func save_c0xx[16][GEN_MAXARCH]; +static zz_func save_e3xx[256][GEN_MAXARCH]; +static zz_func save_e5xx[256][GEN_MAXARCH]; +static zz_func save_e6xx[256][GEN_MAXARCH]; +static zz_func save_ebxx[256][GEN_MAXARCH]; +static zz_func save_ecxx[256][GEN_MAXARCH]; +static zz_func save_edxx[256][GEN_MAXARCH]; + +#if defined(WIN32) +static int opcodes_saved; +static void * opcode_table; +static void * opcode_01xx; +#if defined (FEATURE_VECTOR_FACILITY) +static void * opcode_a4xx; +#endif +static void * opcode_a5xx; +static void * opcode_a7xx; +static void * opcode_b2xx; +static void * opcode_b3xx; +static void * opcode_b9xx; +static void * opcode_c0xx; +static void * opcode_e3xx; +static void * opcode_e5xx; +static void * opcode_e6xx; +static void * opcode_ebxx; +static void * opcode_ecxx; +static void * opcode_edxx; +static void * s370_opcode_table; +static void * s390_opcode_table; +static void * z900_opcode_table; +#endif + +static char *prefix[] = { +#if defined(_370) + "s370_dyninst_opcode_", +#endif +#if defined(_390) + "s390_dyninst_opcode_", +#endif +#if defined(_900) + "z900_dyninst_opcode_" +#endif + }; + + +static void opcode_save() +{ + memcpy(save_table,opcode_table,sizeof(save_table)); + memcpy(save_01xx,opcode_01xx,sizeof(save_01xx)); +#if defined (FEATURE_VECTOR_FACILITY) + memcpy(save_a4xx,opcode_a4xx,sizeof(save_a4xx)); +#endif + memcpy(save_a5xx,opcode_a5xx,sizeof(save_a5xx)); + memcpy(save_a7xx,opcode_a7xx,sizeof(save_a7xx)); + memcpy(save_b2xx,opcode_b2xx,sizeof(save_b2xx)); + memcpy(save_b3xx,opcode_b3xx,sizeof(save_b3xx)); + memcpy(save_b9xx,opcode_b9xx,sizeof(save_b9xx)); + memcpy(save_c0xx,opcode_c0xx,sizeof(save_c0xx)); + memcpy(save_e3xx,opcode_e3xx,sizeof(save_e3xx)); + memcpy(save_e5xx,opcode_e5xx,sizeof(save_e5xx)); + memcpy(save_e6xx,opcode_e6xx,sizeof(save_e6xx)); + memcpy(save_ebxx,opcode_ebxx,sizeof(save_ebxx)); + memcpy(save_ecxx,opcode_ecxx,sizeof(save_ecxx)); + memcpy(save_edxx,opcode_edxx,sizeof(save_edxx)); +} + + +static void opcode_restore() +{ + memcpy(opcode_table,save_table,sizeof(save_table)); + memcpy(opcode_01xx,save_01xx,sizeof(save_01xx)); +#if defined (FEATURE_VECTOR_FACILITY) + memcpy(opcode_a4xx,save_a4xx,sizeof(save_a4xx)); +#endif + memcpy(opcode_a5xx,save_a5xx,sizeof(save_a5xx)); + memcpy(opcode_a7xx,save_a7xx,sizeof(save_a7xx)); + memcpy(opcode_b2xx,save_b2xx,sizeof(save_b2xx)); + memcpy(opcode_b3xx,save_b3xx,sizeof(save_b3xx)); + memcpy(opcode_b9xx,save_b9xx,sizeof(save_b9xx)); + memcpy(opcode_c0xx,save_c0xx,sizeof(save_c0xx)); + memcpy(opcode_e3xx,save_e3xx,sizeof(save_e3xx)); + memcpy(opcode_e5xx,save_e5xx,sizeof(save_e5xx)); + memcpy(opcode_e6xx,save_e6xx,sizeof(save_e6xx)); + memcpy(opcode_ebxx,save_ebxx,sizeof(save_ebxx)); + memcpy(opcode_ecxx,save_ecxx,sizeof(save_ecxx)); + memcpy(opcode_edxx,save_edxx,sizeof(save_edxx)); +} + + +static void assign_extop1(int opcode, int extop, zz_func table[256][GEN_MAXARCH], + zz_func saved[256][GEN_MAXARCH]) +{ +int arch; +void *tmp; + + for(arch = 0; arch < GEN_MAXARCH - 2; arch++) + { + char name[32]; + + sprintf(name,"%s%02X%1X",prefix[arch],opcode,extop); + + if((tmp = HDL_FINDSYM(name))) + table[extop][arch] = tmp; + else + table[extop][arch] = saved[extop][arch]; + + } + + +} + + +static void assign_extop(int opcode, int extop, zz_func table[256][GEN_MAXARCH], + zz_func saved[256][GEN_MAXARCH]) +{ +int arch; +void *tmp; + + for(arch = 0; arch < GEN_MAXARCH - 2; arch++) + { + char name[32]; + + sprintf(name,"%s%02X%02X",prefix[arch],opcode,extop); + + if((tmp = HDL_FINDSYM(name))) + table[extop][arch] = tmp; + else + table[extop][arch] = saved[extop][arch]; + + } + + +} + + +static void assign_opcode(int opcode, zz_func table[256][GEN_MAXARCH], + zz_func saved[256][GEN_MAXARCH]) +{ +int arch; +void *tmp; + + for(arch = 0; arch < GEN_MAXARCH - 2; arch++) + { + char name[32]; + + sprintf(name,"%s%02X",prefix[arch],opcode); + + if((tmp = HDL_FINDSYM(name))) + table[opcode][arch] = tmp; + else + table[opcode][arch] = saved[opcode][arch]; + + } + + +} + + +static inline void copy_opcode(zz_func to_table[256], zz_func from_table[256][GEN_MAXARCH], int opcode, int arch_mode) +{ + to_table[opcode] = from_table[opcode][arch_mode]; +} + +/* Libtool static name colision resolution */ +/* note : lt_dlopen will look for symbol & modulename_LTX_symbol */ +#if !defined(HDL_BUILD_SHARED) && defined(HDL_USE_LIBTOOL) +#define hdl_ddev dyninst_LTX_hdl_ddev +#define hdl_depc dyninst_LTX_hdl_depc +#define hdl_reso dyninst_LTX_hdl_reso +#define hdl_init dyninst_LTX_hdl_init +#define hdl_fini dyninst_LTX_hdl_fini +#endif + + +HDL_DEPENDENCY_SECTION; +{ + HDL_DEPENDENCY (HERCULES); + HDL_DEPENDENCY (REGS); + HDL_DEPENDENCY (DEVBLK); + HDL_DEPENDENCY (SYSBLK); + +} END_DEPENDENCY_SECTION; + + +HDL_REGISTER_SECTION; +{ + +#if defined(WIN32) + opcodes_saved = 0; +#else + opcode_save(); +#endif + +} END_REGISTER_SECTION; + + +HDL_RESOLVER_SECTION; +{ +int opcode, extop; + +#if 0 +#if defined(WIN32) + if(!opcodes_saved) + { + HDL_RESOLVE(opcode_table); + HDL_RESOLVE(opcode_01xx); +#if defined(FEATURE_VECTOR_FACILITY) + HDL_RESOLVE(opcode_a4xx); +#endif + HDL_RESOLVE(opcode_a5xx); + HDL_RESOLVE(opcode_a7xx); + HDL_RESOLVE(opcode_b2xx); + HDL_RESOLVE(opcode_b3xx); + HDL_RESOLVE(opcode_b9xx); + HDL_RESOLVE(opcode_c0xx); + HDL_RESOLVE(opcode_e3xx); + HDL_RESOLVE(opcode_e5xx); + HDL_RESOLVE(opcode_e6xx); + HDL_RESOLVE(opcode_ebxx); + HDL_RESOLVE(opcode_ecxx); + HDL_RESOLVE(opcode_edxx); + HDL_RESOLVE(s370_opcode_table); + HDL_RESOLVE(s390_opcode_table); + HDL_RESOLVE(z900_opcode_table); + + opcode_save(); + + opcodes_saved = 1; + } +#endif +#endif + + for(opcode = 0; opcode < 256; opcode++) + { + switch(opcode) + { + case 0x01: + for(extop = 0; extop < 256; extop++) + assign_extop(opcode, extop, opcode_01xx, save_01xx); + break; + +#if defined (FEATURE_VECTOR_FACILITY) + case 0xA4: + for(extop = 0; extop < 256; extop++) + assign_extop(opcode, extop, v_opcode_a4xx, save_a4xx); + break; +#endif + + case 0xA5: + for(extop = 0; extop < 16; extop++) + assign_extop1(opcode, extop, opcode_a5xx, save_a5xx); + break; + + case 0xA7: + for(extop = 0; extop < 16; extop++) + assign_extop1(opcode, extop, opcode_a7xx, save_a7xx); + break; + + case 0xB2: + for(extop = 0; extop < 256; extop++) + assign_extop(opcode, extop, opcode_b2xx, save_b2xx); + break; + + case 0xB3: + for(extop = 0; extop < 256; extop++) + assign_extop(opcode, extop, opcode_b3xx, save_b3xx); + break; + + case 0xB9: + for(extop = 0; extop < 256; extop++) + assign_extop(opcode, extop, opcode_b9xx, save_b9xx); + break; + + case 0xC0: + for(extop = 0; extop < 16; extop++) + assign_extop1(opcode, extop, opcode_c0xx, save_c0xx); + break; + + case 0xE3: + for(extop = 0; extop < 256; extop++) + assign_extop(opcode, extop, opcode_e3xx, save_e3xx); + break; + + case 0xE5: + for(extop = 0; extop < 256; extop++) + assign_extop(opcode, extop, opcode_e5xx, save_e5xx); + break; + + case 0xE6: + for(extop = 0; extop < 256; extop++) + assign_extop(opcode, extop, opcode_e6xx, save_e6xx); + break; + + case 0xEB: + for(extop = 0; extop < 256; extop++) + assign_extop(opcode, extop, opcode_ebxx, save_ebxx); + break; + + case 0xEC: + for(extop = 0; extop < 256; extop++) + assign_extop(opcode, extop, opcode_ecxx, save_ecxx); + break; + + case 0xED: + for(extop = 0; extop < 256; extop++) + assign_extop(opcode, extop, opcode_edxx, save_edxx); + break; + + default: + assign_opcode(opcode, opcode_table, save_table); + } + + } + + /* Copy opcodes to performance shadow table */ + for (opcode = 0; opcode < 256; opcode++) + { +#if defined(_370) + copy_opcode(s370_opcode_table,opcode_table,opcode,ARCH_370); +#endif +#if defined(_390) + copy_opcode(s390_opcode_table,opcode_table,opcode,ARCH_390); +#endif +#if defined(_900) + copy_opcode(z900_opcode_table,opcode_table,opcode,ARCH_900); +#endif + } + +} END_RESOLVER_SECTION; + + +HDL_FINAL_SECTION; +{ + + opcode_restore(); + +} END_FINAL_SECTION; + + +#endif /*!defined(_GEN_ARCH)*/ + +#endif /*defined(OPTION_DYNAMIC_LOAD)*/ diff --git a/ecpsvm.c b/ecpsvm.c new file mode 100644 index 0000000..dcd46e1 --- /dev/null +++ b/ecpsvm.c @@ -0,0 +1,2969 @@ +/***********************************************************/ +/* HERCULES ECPS:VM Support */ +/* (c) Copyright 2003 Roger Bowler and Others */ +/* Use of this program is governed by the QPL License */ +/* Original Author : Ivan Warren */ +/* Prime Maintainer : Ivan Warren */ +/* */ +/* General guidelines about E6XX instruction class */ +/* this is an implementation of ECPS:VM Level 20 */ +/* */ +/* General rule is : Only do what is safe to do. In doubt, */ +/* give control to CP back (and act as */ +/* a NO-OP). All instructions have this */ +/* behaviour, therefore allowing only */ +/* partial implementation, or bypassing */ +/* tricky cases */ +/* */ +/* NOTE : ECPS:VM is only available for S/370 architecture */ +/* */ +/* In order for CP ASSIST to be active, a CONFIGURATION */ +/* statement is added : ECPS:VM lvl|no */ +/* lvl is the ASSIST level (20 is recommended) */ +/* no means CP ASSIST is disabled (default) */ +/* */ +/* Currently supported CP ASSIST instructions : */ +/* +-----+-------+----------------------------------------+*/ +/* |opc | Mnemo | Function |*/ +/* +-----+-------+----------------------------------------+*/ +/* |E602 | LCKPG | Lock Page in core table |*/ +/* |E603 | ULKPG | Unlock page in core table |*/ +/* |E608 | TRBRG | LRA + Basic checks on VPAGE |*/ +/* |E609 | TRLOK | Same as TRBRG + Lock page in core |*/ +/* |E60E | SCNRU | Scan Real Unit control blocks |*/ +/* |E612 | STLVL | Store ECPS:VM Level |*/ +/* |E614 | FREEX | Allocate CP FREE Storage from subpool |*/ +/* |E615 | FRETX | Release CP FREE Storage to subpool |*/ +/* +-----+-------+----------------------------------------+*/ +/* */ +/* Currently supported VM ASSIST instructions : */ +/* +-----+-------+----------------------------------------+*/ +/* |opc | Mnemo | Function |*/ +/* +-----+-------+----------------------------------------+*/ +/* |0A | SVC | Virtual SVC Assist |*/ +/* |80 | SSM | Virtual SSM Assist |*/ +/* |82 | LPSW | Virtual LPSW Assist |*/ +/* +-----+-------+----------------------------------------+*/ +/* */ +/***********************************************************/ + +#include "hercules.h" + +#include "opcode.h" + +#include "inline.h" + +#include "ecpsvm.h" + +static ECPSVM_CMDENT ecpsvm_cmdtab[]; +ECPSVM_CMDENT *ecpsvm_getcmdent(char *cmd); + +struct _ECPSVM_CPSTATS +{ + ECPSVM_STAT_DCL(SVC); + ECPSVM_STAT_DCL(SSM); + ECPSVM_STAT_DCL(LPSW); + ECPSVM_STAT_DCL(STNSM); + ECPSVM_STAT_DCL(STOSM); + ECPSVM_STAT_DCL(SIO); + ECPSVM_STAT_DCL(VTIMER); + ECPSVM_STAT_DCL(STCTL); + ECPSVM_STAT_DCL(LCTL); + ECPSVM_STAT_DCL(DIAG); + ECPSVM_STAT_DCL(IUCV); +} ecpsvm_sastats={ + ECPSVM_STAT_DEF(SVC), + ECPSVM_STAT_DEF(SSM), + ECPSVM_STAT_DEF(LPSW), + ECPSVM_STAT_DEFU(STNSM), + ECPSVM_STAT_DEFU(STOSM), + ECPSVM_STAT_DEFU(SIO), + ECPSVM_STAT_DEF(VTIMER), + ECPSVM_STAT_DEFU(STCTL), + ECPSVM_STAT_DEF(LCTL), + ECPSVM_STAT_DEFU(DIAG), + ECPSVM_STAT_DEFU(IUCV), +}; +struct _ECPSVM_SASTATS +{ + ECPSVM_STAT_DCL(FREE); + ECPSVM_STAT_DCL(FRET); + ECPSVM_STAT_DCL(LCKPG); + ECPSVM_STAT_DCL(ULKPG); + ECPSVM_STAT_DCL(SCNRU); + ECPSVM_STAT_DCL(SCNVU); + ECPSVM_STAT_DCL(DISP0); + ECPSVM_STAT_DCL(DISP1); + ECPSVM_STAT_DCL(DISP2); + ECPSVM_STAT_DCL(DNCCW); + ECPSVM_STAT_DCL(DFCCW); + ECPSVM_STAT_DCL(FCCWS); + ECPSVM_STAT_DCL(CCWGN); + ECPSVM_STAT_DCL(UXCCW); + ECPSVM_STAT_DCL(TRBRG); + ECPSVM_STAT_DCL(TRLOK); + ECPSVM_STAT_DCL(VIST); + ECPSVM_STAT_DCL(VIPT); + ECPSVM_STAT_DCL(STEVL); + ECPSVM_STAT_DCL(FREEX); + ECPSVM_STAT_DCL(FRETX); + ECPSVM_STAT_DCL(PMASS); + ECPSVM_STAT_DCL(LCSPG); +} ecpsvm_cpstats={ + ECPSVM_STAT_DEFU(FREE), + ECPSVM_STAT_DEFU(FRET), + ECPSVM_STAT_DEF(LCKPG), + ECPSVM_STAT_DEF(ULKPG), + ECPSVM_STAT_DEF(SCNRU), + ECPSVM_STAT_DEF(SCNVU), + ECPSVM_STAT_DEF(DISP0), + ECPSVM_STAT_DEF(DISP1), + ECPSVM_STAT_DEF(DISP2), + ECPSVM_STAT_DEFU(DNCCW), + ECPSVM_STAT_DEFU(DFCCW), + ECPSVM_STAT_DEFU(FCCWS), + ECPSVM_STAT_DEFU(CCWGN), + ECPSVM_STAT_DEFU(UXCCW), + ECPSVM_STAT_DEF(TRBRG), + ECPSVM_STAT_DEF(TRLOK), + ECPSVM_STAT_DEFU(VIST), + ECPSVM_STAT_DEFU(VIPT), + ECPSVM_STAT_DEF(STEVL), + ECPSVM_STAT_DEF(FREEX), + ECPSVM_STAT_DEF(FRETX), + ECPSVM_STAT_DEFU(PMASS), + ECPSVM_STAT_DEFU(LCSPG), +}; + +#define DEBUG_CPASSIST +#define DEBUG_SASSIST + +#define DODEBUG_ASSIST(_cond,x) \ +{ \ + if((_cond)) \ + { \ + x; \ + }\ +} + +#if defined(DEBUG_SASSIST) +#define DEBUG_SASSISTX(_inst,x) \ +{ \ + DODEBUG_ASSIST(ecpsvm_sastats._inst.debug,x) \ +} +#else +#define DEBUG_SASSISTX(_cond,x) +#endif +#if defined(DEBUG_CPASSIST) +#define DEBUG_CPASSISTX(_inst,x) \ +{ \ + DODEBUG_ASSIST(ecpsvm_cpstats._inst.debug,x) \ +} +#else +#define DEBUG_CPASSISTX(_cond,x) +#endif + +/* Utility macros because I am very lazy */ +#define EVM_IC( x ) ARCH_DEP(vfetchb) ( ( ( x ) & ADDRESS_MAXWRAP(regs) ) , USE_REAL_ADDR , regs ) +#define EVM_LH( x ) ARCH_DEP(vfetch2) ( ( ( x ) & ADDRESS_MAXWRAP(regs) ) , USE_REAL_ADDR , regs ) +#define EVM_L( x ) ARCH_DEP(vfetch4) ( ( ( x ) & ADDRESS_MAXWRAP(regs) ) , USE_REAL_ADDR , regs ) +#define EVM_LD( x ) ARCH_DEP(vfetch8) ( ( ( x ) & ADDRESS_MAXWRAP(regs) ) , USE_REAL_ADDR , regs ) +#define EVM_STD( x , y ) ARCH_DEP(vstore8) ( ( x ) , ( ( y ) & ADDRESS_MAXWRAP(regs) ) , USE_REAL_ADDR , regs ) +#define EVM_ST( x , y ) ARCH_DEP(vstore4) ( ( x ) , ( ( y ) & ADDRESS_MAXWRAP(regs) ) , USE_REAL_ADDR , regs ) +#define EVM_STH( x , y ) ARCH_DEP(vstore2) ( ( x ) , ( ( y ) & ADDRESS_MAXWRAP(regs) ) , USE_REAL_ADDR , regs ) +#define EVM_STC( x , y ) ARCH_DEP(vstoreb) ( ( x ) , ( ( y ) & ADDRESS_MAXWRAP(regs) ) , USE_REAL_ADDR , regs ) +#define EVM_MVC( x , y , z ) ARCH_DEP(vfetchc) ( ( x ) , ( z ) , ( y ) , USE_REAL_ADDR , regs ) + +#define BR14 regs->psw.IA=regs->GR_L(14) & ADDRESS_MAXWRAP(regs) + +#ifdef _FEATURE_SIE +#define INITSIESTATE(x) (x).sie_state=0; +#else +#define INITSIESTATE(x) +#endif + +#define CPASSIST_HIT(_stat) ecpsvm_cpstats._stat.hit++ + +#define SASSIST_HIT(_stat) ecpsvm_sastats._stat.hit++ + +#define SASSIST_LPSW(_regs) \ + regs->psw.IA=_regs.psw.IA; \ + regs->psw.cc=_regs.psw.cc; \ + regs->psw.pkey=_regs.psw.pkey; \ + regs->psw.domask=_regs.psw.domask; \ + regs->psw.fomask=_regs.psw.fomask; \ + regs->psw.eumask=_regs.psw.eumask; \ + regs->psw.sgmask=_regs.psw.sgmask; + +#define SASSIST_PROLOG( _instname ) \ + VADR amicblok; \ + VADR vpswa; \ + REGS vpregs; \ + BYTE micpend; \ + U32 CR6; \ + ECPSVM_MICBLOK micblok; \ + BYTE micevma; \ + BYTE micevma2; \ + BYTE micevma3; \ + BYTE micevma4; \ + if(!regs->psw.prob) \ + { \ + return(1); \ + } \ + if(!sysblk.ecpsvm.available) \ + { \ + DEBUG_SASSISTX(_instname,logmsg(_("HHCEV300D : SASSIST "#_instname" ECPS:VM Disabled in configuration\n"))); \ + return(1); \ + } \ + if(!ecpsvm_sastats._instname.enabled) \ + { \ + DEBUG_SASSISTX(_instname,logmsg(_("HHCEV300D : SASSIST "#_instname" ECPS:VM Disabled by command\n"))); \ + return(1); \ + } \ + CR6=regs->CR_L(6); \ + if(!(CR6 & ECPSVM_CR6_VMASSIST)) \ + { \ + DEBUG_SASSISTX(_instname,logmsg(_("HHCEV300D : EVMA Disabled by guest\n"))); \ + return(1); \ + } \ + /* Increment call now (don't count early misses) */ \ + ecpsvm_sastats._instname.call++; \ + amicblok=CR6 & ECPSVM_CR6_MICBLOK; \ + /* Ensure MICBLOK resides on a single 2K page */ \ + /* Then set ref bit by calling LOG_TO_ABS */ \ + if((amicblok & 0x007ff) > 0x7e0) \ + { \ + DEBUG_SASSISTX(_instname,logmsg(_("HHCEV300D : SASSIST "#_instname" Micblok @ %6.6X crosses page frame\n"),amicblok)); \ + return(1); \ + } \ + amicblok=LOGICAL_TO_ABS(amicblok,USE_REAL_ADDR,regs,ACCTYPE_READ,0); \ + /* Load the micblok copy */ \ + FETCH_FW(micblok.MICRSEG,regs->mainstor+amicblok); \ + FETCH_FW(micblok.MICCREG,regs->mainstor+amicblok+4); \ + FETCH_FW(micblok.MICVPSW,regs->mainstor+amicblok+8); \ + FETCH_FW(micblok.MICWORK,regs->mainstor+amicblok+12); \ + FETCH_FW(micblok.MICVTMR,regs->mainstor+amicblok+16); \ + FETCH_FW(micblok.MICACF,regs->mainstor+amicblok+20); \ + micpend=(micblok.MICVPSW >> 24); \ + vpswa=micblok.MICVPSW & ADDRESS_MAXWRAP(regs); \ + micevma=(micblok.MICACF >> 24); \ + micevma2=((micblok.MICACF & 0x00ff0000) >> 16); \ + micevma3=((micblok.MICACF & 0x0000ff00) >> 8); \ + micevma4=(micblok.MICACF & 0x000000ff); \ + /* Set ref bit on page where Virtual PSW is stored */ \ + vpswa=LOGICAL_TO_ABS(vpswa,USE_REAL_ADDR,regs,ACCTYPE_READ,0); \ + /* Load the Virtual PSW in a temporary REGS structure */ \ + INITSIESTATE(vpregs); \ + ARCH_DEP(load_psw) (&vpregs,®s->mainstor[vpswa]); \ + DEBUG_SASSISTX(_instname,logmsg(_("HHCEV300D : SASSIST "#_instname" CR6= %8.8X\n"),CR6)); \ + DEBUG_SASSISTX(_instname,logmsg(_("HHCEV300D : SASSIST "#_instname" MICVTMR= %8.8X\n"),micblok.MICVTMR)); \ + DEBUG_SASSISTX(_instname,logmsg(_("HHCEV300D : SASSIST "#_instname" VPSWA= %8.8X Virtual "),vpswa)); \ + DEBUG_SASSISTX(_instname,display_psw(&vpregs)); \ + DEBUG_SASSISTX(_instname,logmsg(_("HHCEV300D : SASSIST "#_instname" Real "))); \ + DEBUG_SASSISTX(_instname,display_psw(regs)); + +#define ECPSVM_PROLOG(_inst) \ +int b1, b2; \ +VADR effective_addr1, \ + effective_addr2; \ + SSE(inst, execflag, regs, b1, effective_addr1, b2, effective_addr2); \ + PRIV_CHECK(regs); \ + if(!sysblk.ecpsvm.available) \ + { \ + DEBUG_CPASSISTX(_inst,logmsg(_("HHCEV300D : CPASSTS "#_inst" ECPS:VM Disabled in configuration "))); \ + ARCH_DEP(program_interrupt) (regs, PGM_OPERATION_EXCEPTION); \ + } \ + PRIV_CHECK(regs); /* No problem state please */ \ + if(!ecpsvm_cpstats._inst.enabled) \ + { \ + DEBUG_CPASSISTX(_inst,logmsg(_("HHCEV300D : CPASSTS "#_inst" Disabled by command"))); \ + return; \ + } \ + if(!(regs->CR_L(6) & 0x02000000)) \ + { \ + return; \ + } \ + ecpsvm_cpstats._inst.call++; \ + DEBUG_CPASSISTX(_inst,logmsg(_("HHCEV300D : "#_inst" called\n"))); + + +/* DISPx Utility macros */ + +#define STPT(_x) \ +{ \ + obtain_lock(&sysblk.todlock); \ + EVM_STD(regs->ptimer,_x); \ + release_lock(&sysblk.todlock); \ +} + +#define SPT(_x) \ +{ \ + obtain_lock(&sysblk.todlock); \ + regs->ptimer=EVM_LD(_x); \ + if((regs->ptimer & 0x8000000000000000ULL)) \ + { \ + ON_IC_PTIMER(regs); \ + } \ + else \ + { \ + OFF_IC_PTIMER(regs); \ + } \ + release_lock(&sysblk.todlock); \ +} + + +#define CHARGE_STOP(_x) \ +{ \ + STPT(_x+VMTTIME); \ +} + +#define CHARGE_START(_x) \ +{ \ + SPT(_x+VMTTIME); \ +} + +#define CHARGE_SWITCH(_x,_y) \ +{ \ + CHARGE_STOP(_x); \ + CHARGE_START(_y); \ + (_x)=(_y); \ +} + +#ifdef FEATURE_ECPSVM + +int ecpsvm_do_fretx(REGS *regs,VADR block,U16 numdw,VADR maxsztbl,VADR fretl); + +/* CPASSIST FREE (Basic) Not supported */ +/* This is part of ECPS:VM Level 18 and 19 */ +/* ECPS:VM Level 20 use FREEX */ +DEF_INST(ecpsvm_basic_freex) +{ + ECPSVM_PROLOG(FREE); +} +/* CPASSIST FRET (Basic) Not supported */ +/* This is part of ECPS:VM Level 18 and 19 */ +/* ECPS:VM Level 20 use FRETX */ +DEF_INST(ecpsvm_basic_fretx) +{ + ECPSVM_PROLOG(FRET); +} + +/* Lockpage common code (LCKPG/TRLOK) */ +static void ecpsvm_lockpage1(REGS *regs,RADR cortab,RADR pg) +{ + BYTE corcode; + VADR corte; + U32 lockcount; + RADR cortbl; + + DEBUG_CPASSISTX(LCKPG,logmsg(_("HHCEV300D : LKPG coreptr = "F_RADR" Frame = "F_RADR"\n"),cortab,pg)); + cortbl=EVM_L(cortab); + corte=cortbl+((pg & 0xfff000)>>8); + DEBUG_CPASSISTX(LCKPG,logmsg(_("HHCEV300D : LKPG corete = %6.6X\n"),corte)); + corcode=EVM_IC(corte+8); + if(corcode & 0x80) + { + lockcount=EVM_L(corte+4); + lockcount++; + } + else + { + lockcount=1; + corcode|=0x80; + EVM_STC(corcode,corte+8); + } + EVM_ST(lockcount,corte+4); + DEBUG_CPASSISTX(LCKPG,logmsg(_("HHCEV300D : LKPG Page locked. Count = %6.6X\n"),lockcount)); + return; +} +/* E602 LCKPG Instruction */ +/* LCKPG D1(R1,B1),D2(R2,B2) */ +/* 1st operand : PTR_PL -> Address of coretable */ +/* 2nd Operand : Page address to be locked */ +DEF_INST(ecpsvm_lock_page) +{ + VADR ptr_pl; + VADR pg; + + ECPSVM_PROLOG(LCKPG); + + ptr_pl=effective_addr1; + pg=effective_addr2; + + DEBUG_CPASSISTX(LCKPG,logmsg(_("HHCEV300D : LKPG PAGE=%6.6X, PTRPL=%6.6X\n"),pg,ptr_pl)); + + ecpsvm_lockpage1(regs,ptr_pl,pg); + regs->psw.cc=0; + BR14; + CPASSIST_HIT(LCKPG); + return; +} +/* E603 ULKPG Instruction */ +/* ULKPG D1(R1,B1),D2(R2,B2) */ +/* 1st operand : PTR_PL -> +0 - Maxsize, +4 Coretable */ +/* 2nd Operand : Page address to be unlocked */ +DEF_INST(ecpsvm_unlock_page) +{ + VADR ptr_pl; + VADR pg; + VADR corsz; + VADR cortbl; + VADR corte; + BYTE corcode; + U32 lockcount; + + ECPSVM_PROLOG(ULKPG); + + ptr_pl=effective_addr1; + pg=effective_addr2; + + DEBUG_CPASSISTX(ULKPG,logmsg(_("HHCEV300D : ULKPG PAGE=%6.6X, PTRPL=%6.6X\n"),pg,ptr_pl)); + + corsz=EVM_L(ptr_pl); + cortbl=EVM_L(ptr_pl+4); + if((pg+4095)>corsz) + { + DEBUG_CPASSISTX(ULKPG,logmsg(_("HHCEV300D : ULKPG Page beyond core size of %6.6X\n"),corsz)); + return; + } + corte=cortbl+((pg & 0xfff000)>>8); + corcode=EVM_IC(corte+8); + if(corcode & 0x80) + { + lockcount=EVM_L(corte+4); + lockcount--; + } + else + { + DEBUG_CPASSISTX(ULKPG,logmsg(_("HHCEV300D : ULKPG Attempting to unlock page that is not locked\n"))); + return; + } + if(lockcount==0) + { + corcode &= ~(0x80|0x02); + EVM_STC(corcode,corte+8); + DEBUG_CPASSISTX(ULKPG,logmsg(_("HHCEV300D : ULKPG now unlocked\n"))); + } + else + { + DEBUG_CPASSISTX(ULKPG,logmsg(_("HHCEV300D : ULKPG Page still locked. Count = %6.6X\n"),lockcount)); + } + EVM_ST(lockcount,corte+4); + CPASSIST_HIT(ULKPG); + BR14; + return; +} +/* DNCCW : Not supported */ +DEF_INST(ecpsvm_decode_next_ccw) +{ + ECPSVM_PROLOG(DNCCW); +} +/* FCCWS : Not supported */ +DEF_INST(ecpsvm_free_ccwstor) +{ + ECPSVM_PROLOG(FCCWS); +} +/* SCNVU : Scan for Virtual Device blocks */ +DEF_INST(ecpsvm_locate_vblock) +{ + U32 vdev; + U16 vchix; + U16 vcuix; + U16 vdvix; + VADR vchtbl; + VADR vch; + VADR vcu; + VADR vdv; + + ECPSVM_PROLOG(SCNVU); + vdev=regs->GR_L(1); + vchtbl=effective_addr1; + + vchix=EVM_LH(vchtbl+((vdev & 0xf00)>>7)); /* Get Index */ + if(vchix & 0x8000) + { + DEBUG_CPASSISTX(SCNVU,logmsg(_("HHCEV300D SCNVU Virtual Device %4.4X has no VCHAN block\n"),vdev)); + return; + } + vch=EVM_L(effective_addr2)+vchix; + + vcuix=EVM_LH(vch+8+((vdev & 0xf0)>>3)); + if(vcuix & 0x8000) + { + DEBUG_CPASSISTX(SCNVU,logmsg(_("HHCEV300D SCNVU Virtual Device %4.4X has no VCU block\n"),vdev)); + return; + } + vcu=EVM_L(effective_addr2+4)+vcuix; + + vdvix=EVM_LH(vcu+8+((vdev & 0xf)<<1)); + if(vdvix & 0x8000) + { + DEBUG_CPASSISTX(SCNVU,logmsg(_("HHCEV300D SCNVU Virtual Device %4.4X has no VDEV block\n"),vdev)); + return; + } + vdv=EVM_L(effective_addr2+8)+vdvix; + DEBUG_CPASSISTX(SCNVU,logmsg(_("HHCEV300D SCNVU %4.4X : VCH = %8.8X, VCU = %8.8X, VDEV = %8.8X\n"), + vdev, + vch, + vcu, + vdv)); + regs->GR_L(6)=vch; + regs->GR_L(7)=vcu; + regs->GR_L(8)=vdv; + regs->psw.cc=0; + CPASSIST_HIT(SCNVU); + BR14; + return; +} + +/* DISP1 Core */ +/* rc : 0 - Done */ +/* rc : 1 - No-op */ +/* rc : 2 - Invoke DISP2 */ +int ecpsvm_do_disp1(REGS *regs,VADR dl,VADR el) +{ + VADR vmb; + U32 F_VMFLGS; /* Aggregate for quick test */ + U32 F_SCHMASK; /* Flags to test */ + U32 F_SCHMON; /* Flags allowed on for quick dispatch */ + VADR F_ASYSVM; /* System VMBLOK */ + VADR SCHDL; /* SCHDL Exit */ + + BYTE B_VMOSTAT; + BYTE B_VMQSTAT; + BYTE B_VMRSTAT; + + vmb=regs->GR_L(11); + DEBUG_CPASSISTX(DISP1,logmsg("DISP1 Data list = %6.6X VM=%6.6X\n",dl,vmb)); + F_VMFLGS=EVM_L(vmb+VMRSTAT); + F_SCHMASK=EVM_L(dl+64); + F_SCHMON=EVM_L(dl+68); + if((F_VMFLGS & F_SCHMASK) == F_SCHMON) + { + DEBUG_CPASSISTX(DISP1,logmsg("DISP1 Quick Check complete\n")); + return(2); + } + else + { + DEBUG_CPASSISTX(DISP1,logmsg("DISP1 Quick Check failed : %8.8X != %8.8X\n",(F_VMFLGS & F_SCHMASK),F_SCHMON)); + } + + F_ASYSVM=EVM_L(ASYSVM); + if(vmb==F_ASYSVM) + { + DEBUG_CPASSISTX(DISP1,logmsg("DISP1 VMB is SYSTEM VMBLOCK\n")); + return(2); + } + SCHDL=EVM_L(el+4); + B_VMOSTAT=EVM_IC(vmb+VMOSTAT); + if(!(B_VMOSTAT & VMKILL)) + { + DEBUG_CPASSISTX(DISP1,logmsg("DISP1 Call SCHEDULE because VMKILL not set\n")); + regs->psw.IA=SCHDL; + return(0); + } + B_VMQSTAT=EVM_IC(vmb+VMQSTAT); + if(!(B_VMQSTAT & VMCFREAD)) + { + if(B_VMOSTAT & VMCF) + { + DEBUG_CPASSISTX(DISP1,logmsg("DISP1 Call SCHEDULE because VMKILL & VMCF & !VMCFREAD set\n")); + regs->psw.IA=SCHDL; + return(0); + } + } + /* At DSP - OFF */ + B_VMQSTAT &= ~VMCFREAD; + B_VMOSTAT &= ~VMKILL; + EVM_STC(B_VMQSTAT,vmb+VMQSTAT); + EVM_STC(B_VMOSTAT,vmb+VMOSTAT); + B_VMRSTAT=EVM_IC(vmb+VMRSTAT); + if(B_VMRSTAT & VMLOGOFF) + { + DEBUG_CPASSISTX(DISP1,logmsg("DISP1 Continue because already logging off\n")); + return(2); + } + B_VMRSTAT |= VMLOGOFF; + EVM_STC(B_VMRSTAT,vmb+VMRSTAT); + regs->psw.IA=EVM_L(el+0); + DEBUG_CPASSISTX(DISP1,logmsg("DISP1 : Call USOFF\n")); + return(0); +} + +/* DISP2 Core */ +int ecpsvm_do_disp2(REGS *regs,VADR dl,VADR el) +{ + VADR vmb; /* Current VMBLOK */ + VADR svmb; /* ASYSVM */ + VADR runu; /* RUNUSER */ + VADR lastu; /* LASTUSER */ + VADR F_TRQB; + VADR F_CPEXB; + VADR F,B; + U16 HW1; + U32 FW1; + U64 DW1; + U32 CPEXBKUP[15]; /* CPEXBLOK Regs backup except GPR15 which is useless */ + VADR F_ECBLOK; /* Pointer to user's EC block for extended VM */ + VADR F_CPEXADD; + U32 F_QUANTUM; + REGS wregs; /* Work REGS structure of PSW manipulation for Virtual PSW */ + REGS rregs; /* Work REGS structure of PSW manipulation for Real PSW */ + int i; + + BYTE B_VMDSTAT,B_VMRSTAT,B_VMESTAT,B_VMPSTAT,B_VMMCR6,B_MICVIP; + BYTE B_VMOSTAT,B_VMPEND; + VADR F_MICBLOK; + U32 F_VMIOINT,F_VMPXINT; + U32 F_VMVCR0; + U32 NCR0,NCR1; + + vmb=regs->GR_L(11); + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 Data list=%6.6X VM=%6.6X\n",dl,vmb)); + CHARGE_STOP(vmb); + if(EVM_IC(XTENDLOCK) == XTENDLOCKSET) + { + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 Exit 8 : System extending\n")); + /* System in Extend process */ + regs->psw.IA=EVM_L(el+8); + return(0); + } + if(EVM_IC(APSTAT2) & CPMCHLK) + { + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 Exit 8 : MCH Recovery\n")); + /* Machine Check recovery in progress */ + regs->psw.IA=EVM_L(el+8); + return(0); + } + svmb=EVM_L(ASYSVM); + /* Check IOB/TRQ for dispatch */ + F_TRQB=EVM_L(dl+8); + if(F_TRQB!=dl) + { + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 TRQ/IOB @ %6.6X Exit being routed\n",F_TRQB)); + /* We have a TRQ/IOB */ + /* Update stack */ + F=EVM_L(F_TRQB+8); + B=EVM_L(F_TRQB+12); + EVM_ST(F,B+8); + EVM_ST(B,F+12); + /* Get VMBLOK Responsible for this block */ + vmb=EVM_L(F_TRQB+0x18); + /* Update stack count for the VMBLOK */ + HW1=EVM_LH(vmb+VMSTKCNT); + HW1--; + EVM_STH(HW1,vmb+VMSTKCNT); + /* Start charging user for processor time */ + CHARGE_START(vmb); + EVM_ST(vmb,STACKVM); + /* Update registers for TRQ/IOB exit */ + regs->GR_L(10)=F_TRQB; + regs->GR_L(11)=vmb; + regs->GR_L(12)=EVM_L(F_TRQB+0x1C); + regs->psw.IA=regs->GR_L(12) & ADDRESS_MAXWRAP(regs); + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 TRQ/IOB @ %6.6X IA = %6.6X\n",F_TRQB,regs->GR_L(12))); + return(0); + } + /* Check CPEX BLOCK for dispatch */ + F_CPEXB=EVM_L(dl+0); + if(F_CPEXB!=dl) + { + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 CPEXBLOK Exit being routed CPEX=%6.6X\n",F_CPEXB)); + /* We have a CPEXBLOCK */ + /* Update stack */ + F=EVM_L(F_CPEXB+0); + B=EVM_L(F_CPEXB+4); + EVM_ST(F,B+0); + EVM_ST(B,F+4); + vmb=EVM_L(F_CPEXB+0x10+(11*4)); + HW1=EVM_LH(vmb+VMSTKCNT); + HW1--; + EVM_STH(HW1,vmb+VMSTKCNT); + CHARGE_START(vmb); + /* Copy CPEXBLOCK Contents, and attempt FRET */ + /* If fret fails, use exit #12 */ + for(i=0;i<15;i++) + { + CPEXBKUP[i]=EVM_L(F_CPEXB+0x10+(i*4)); + } + F_CPEXADD=EVM_L(F_CPEXB+0x0C); + if(ecpsvm_do_fretx(regs,F_CPEXB,10,EVM_L(dl+28),EVM_L(dl+32))!=0) + { + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 CPEXBLOK CPEX=%6.6X Fret Failed\n",F_CPEXB)); + regs->GR_L(0)=10; + regs->GR_L(1)=F_CPEXB; + for(i=2;i<12;i++) + { + regs->GR_L(i)=CPEXBKUP[i]; + } + /* Save GPRS 12-1 (wraping) in DSPSAVE (datalist +40) */ + /* So that LM 12,1,DSPSAVE in DMKDSP works after call to DMKFRET */ + EVM_ST(dl+40,CPEXBKUP[12]); + EVM_ST(dl+44,CPEXBKUP[13]); + EVM_ST(dl+48,CPEXBKUP[14]); + EVM_ST(dl+52,CPEXBKUP[15]); + EVM_ST(dl+56,CPEXBKUP[0]); + EVM_ST(dl+60,CPEXBKUP[1]); /* Note : DMKDSP Is wrong - SCHMASK is at +64 (not +60) */ + /* Upon taking this exit, GPRS 12-15 are same as entry */ + regs->psw.IA=EVM_L(el+12); + return(0); + } + for(i=0;i<15;i++) + { + regs->GR_L(i)=CPEXBKUP[i]; + } + regs->GR_L(15)=F_CPEXADD; + regs->psw.IA=F_CPEXADD & ADDRESS_MAXWRAP(regs); + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 CPEXBLOK CPEX=%6.6X IA=%6.6X\n",F_CPEXB,F_CPEXADD)); + return(0); /* CPEXBLOCK Branch taken */ + } + /* Check for a USER run */ + /* AT DMKDSP - DONE */ + if(EVM_IC(CPSTAT2) & CPSHRLK) + { + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 Exit 24 : CPSHRLK Set in CPSTAT2\n")); + regs->psw.IA=EVM_L(el+24); /* IDLEECPS */ + return(0); + } + /* Scan Scheduler IN-Q */ + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : Scanning Scheduler IN-Queue\n")); + FW1=EVM_L(dl+24); + for(vmb=EVM_L(FW1);vmb!=FW1;vmb=EVM_L(vmb)) + { + if(!(EVM_IC(vmb+VMDSTAT) & VMRUN)) + { + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : VMB @ %6.6X Not eligible : VMRUN not set\n",vmb)); + continue; + } + if(EVM_IC(vmb+VMRSTAT) & VMCPWAIT) + { + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : VMB @ %6.6X Not eligible : VMCPWAIT set\n",vmb)); + continue; + } + if(EVM_IC(vmb+VMNOECPS)) + { + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : Exit 20 : VMB @ %6.6X Has VMNOECPS Set to %2.2X\n",vmb,EVM_IC(vmb+VMNOECPS))); + regs->GR_L(1)=vmb; + regs->GR_L(11)=EVM_L(ASYSVM); + regs->psw.IA=EVM_L(el+20); /* FREELOCK */ + return(0); + } + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : VMB @ %6.6X Will now be dispatched\n",vmb)); + runu=EVM_L(RUNUSER); + F_QUANTUM=EVM_L(QUANTUM); + if(vmb!=runu) + { + /* User switching */ + /* DMKDSP - FNDUSRD */ + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : User switch from %6.6X to %6.6X\n",runu,vmb)); + runu=EVM_L(RUNUSER); + EVM_STC(EVM_IC(runu+VMDSTAT) & ~VMDSP,runu+VMDSTAT); + lastu=EVM_L(LASTUSER); + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : RUNU=%6.6X, LASTU=%6.6X\n",runu,lastu)); + if(lastu!=svmb && lastu!=vmb) + { + if(EVM_IC(lastu+VMOSTAT) & VMSHR) /* Running shared sys */ + { + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : Exit 16 : LASTU=%6.6X has shared sys & LCSHPG not impl\n",lastu)); + CHARGE_START(lastu); + /* LCSHRPG not implemented yet */ + regs->GR_L(10)=vmb; + regs->GR_L(11)=lastu; + regs->psw.IA=EVM_L(el+16); + return(0); + /* A CHARGE_STOP(runu) is due when LCSHRPG is implemented */ + } + } + } + if(vmb!=runu || (vmb==runu && (F_QUANTUM & 0x80000000))) + { + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : Restarting Time Slice\n")); + F_QUANTUM=EVM_L(dl+16); + if(EVM_IC(vmb+VMQLEVEL) & VMCOMP) + { + F_QUANTUM <<= 2; + } + } + EVM_ST(F_QUANTUM,INTTIMER); + CHARGE_START(vmb); + EVM_ST(vmb,LASTUSER); + EVM_ST(vmb,RUNUSER); + + + /*** Prepare to run a user ***/ + + /* Cache some important VMBLOK flag bytes */ + B_VMDSTAT=EVM_IC(vmb+VMDSTAT); + B_VMRSTAT=EVM_IC(vmb+VMRSTAT); + B_VMPSTAT=EVM_IC(vmb+VMPSTAT); + B_VMESTAT=EVM_IC(vmb+VMESTAT); + B_VMOSTAT=EVM_IC(vmb+VMOSTAT); + B_VMPEND =EVM_IC(vmb+VMPEND); + B_VMMCR6=EVM_IC(vmb+VMMCR6); + F_MICBLOK=EVM_L(vmb+VMMCR6) & ADDRESS_MAXWRAP(regs); + + /* LOAD FPRS */ + for(i=0;i<8;i+=2) + { + FW1=EVM_L(vmb+VMFPRS+(i*16)); + regs->fpr[i*4]=FW1; + FW1=EVM_L(vmb+VMFPRS+(i*16)+4); + regs->fpr[i*4+1]=FW1; + FW1=EVM_L(vmb+VMFPRS+(i*16)+8); + regs->fpr[i*4+2]=FW1; + FW1=EVM_L(vmb+VMFPRS+(i*16)+12); + regs->fpr[i*4+3]=FW1; + } + + memset(&wregs,0,sizeof(wregs)); + INITSIESTATE(wregs); + ARCH_DEP(load_psw) (&wregs,regs->mainstor+vmb+VMPSW); /* Load user's Virtual PSW in work structure */ + /* Clear ILC from Virtual PSW */ + wregs.psw.ilc=0; + + /* Build REAL PSW */ + memset(&rregs,0,sizeof(rregs)); + INITSIESTATE(rregs); + /* Copy IAR */ + rregs.psw.IA=wregs.psw.IA & ADDRESS_MAXWRAP(regs); + /* Copy CC, PSW KEYs and PGM Mask */ + rregs.psw.cc=wregs.psw.cc; + rregs.psw.pkey=wregs.psw.pkey; + /* Indicate Translation + I/O + Ext + Ecmode + Problem + MC */ + rregs.psw.sysmask=0x07; /* I/O + EXT + Trans */ + rregs.psw.ecmode=1; /* ECMODE */ + rregs.psw.prob=1; /* Problem state */ + rregs.psw.mach=1; /* MC Enabled */ + rregs.psw.intcode=0; /* Clear intcode */ + rregs.psw.ilc=0; + rregs.psw.domask=wregs.psw.domask; + rregs.psw.fomask=wregs.psw.fomask; + rregs.psw.eumask=wregs.psw.eumask; + rregs.psw.sgmask=wregs.psw.sgmask; + + NCR0=EVM_L(CPCREG0); /* Assume for now */ + NCR1=EVM_L(vmb+VMSEG); /* Ditto */ + + /* Disable ECPS:VM in VM-REAL CR6 For now */ + B_VMMCR6&=~(VMMSHADT|VMMPROB|VMMNOSK|VMMFE); + + /* We load VMECEXT Even if it's not a ECMODE VM */ + /* in which case F_ECBLOK is also Virtual CR0 */ + + F_ECBLOK=EVM_L(vmb+VMECEXT); + + /* ECMODE VM ? */ + if(B_VMPSTAT & VMV370R) + { + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : VMB @ %6.6X has ECMODE ON\n",vmb)); + /* Is this an ECMODE PSW Machine ? */ + if(B_VMESTAT & VMEXTCM) + { + if((B_VMESTAT & (VMINVSEG|VMNEWCR0)) == (VMINVSEG|VMNEWCR0)) + { + /* CP Say this is NOT good */ + /* Take exit 28 */ + logmsg(_("HHCEV004W : Abend condition detected in DISP2 instr\n")); + regs->psw.IA=EVM_L(el+28); + return(0); + } + /* Check 3rd level translation */ + if(wregs.psw.sysmask & 0x04) + { + NCR0=EVM_L(F_ECBLOK+EXTSHCR0); + NCR1=EVM_L(F_ECBLOK+EXTSHCR1); + B_VMMCR6|=VMMSHADT; /* re-enable Shadow Table management in CR6 */ + } + } + + } + /* Invalidate Shadow Tables if necessary */ + if(B_VMESTAT & (VMINVPAG | VMSHADT)) + { + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : VMB @ %6.6X Refusing to simulate DMKVATAB\n",vmb)); + /* Really looks like DMKVATAB is a huge thing to simulate */ + /* My belief is that the assist can't handle this one */ + /* Return to caller as a NO-OP on this one */ + return(1); + /* ecpsvm_inv_shadtab_pages(regs,vmb); */ + } + B_VMESTAT&=~VMINVPAG; + B_VMDSTAT|=VMDSP; + /* Test for CPMICON in DMKDSP useless here */ + /* if CPMICON was off, we would have never */ + /* been called anyway */ + if(F_MICBLOK!=0) /* That is SET ASSIST ON */ + { + B_MICVIP=0; + /* Check tracing (incompatible with assist) */ + if(!(EVM_IC(vmb+VMTRCTL) & (VMTRSVC|VMTRPRV|VMTRBRIN))) + { + B_VMMCR6|=VMMFE; + if(B_VMOSTAT & VMSHR) + { + /* Cannot allow ISK/SSK in shared sys VM */ + B_VMMCR6|=VMMNOSK; + } + if(wregs.psw.prob) + { + B_VMMCR6|=VMMPROB; + } + /* Set MICPEND if necessary */ + /* (assist stuff to ensure LPSW/SSM/SVC sim */ + /* does not re-enable VPSW when an interrupt */ + /* is pending) */ + while(1) + { + B_MICVIP=0; + F_VMIOINT=EVM_LH(vmb+VMIOINT); + if(EVM_LH(vmb+VMIOINT)!=0) + { + F_VMIOINT<<=16; + if(B_VMESTAT & VMEXTCM) + { + if(F_VMIOINT&=EVM_L(F_ECBLOK)) + { + B_MICVIP|=0x80; + break; + } + } + else + { + B_MICVIP|=0x80; + break; + } + } + if(B_VMESTAT & VMEXTCM) + { + if(B_VMPEND & VMPGPND) + { + B_MICVIP|=0x80; + } + } + if(B_VMPSTAT & VMV370R) + { + F_VMVCR0=EVM_L(F_ECBLOK+0); + } + else + { + F_VMVCR0=F_ECBLOK; + } + for(F_VMPXINT=EVM_L(vmb+VMPXINT);F_VMPXINT;F_VMPXINT=EVM_L(F_VMPXINT)) /* XINTNEXT at +0 */ + { + if(F_VMVCR0 & EVM_LH(F_VMPXINT+10)) + { + B_MICVIP|=0x80; + break; + } + } + break; /* Terminate dummy while loop */ + } /* While dummy loop for MICPEND */ + } /* if(Not tracing) */ + EVM_STC(B_MICVIP,F_MICBLOK+8); /* Save new MICVIP */ + } /* if(F_MICBLOCK!=0) */ + /* If an Extended VM, Load CRs 3-13 */ + /* CR6 Will be overwritten in a second */ + if(B_VMESTAT & VMV370R) + { + for(i=4;i<14;i++) + { + regs->CR_L(i)=EVM_L(F_ECBLOK+(3*4)+(i*4)); + } + } + /* Update VMMICRO */ + EVM_STC(B_VMMCR6,vmb+VMMCR6); + /* Update PER Control */ + if(EVM_IC(vmb+VMTRCTL) & VMTRPER) + { + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : PER ON\n")); + FW1=EVM_L(vmb+VMTREXT); + regs->CR_L( 9)=EVM_L(FW1+0x1C); + regs->CR_L(10)=EVM_L(FW1+0x20); + regs->CR_L(11)=EVM_L(FW1+0x24); + rregs.psw.sysmask |= 0x40; /* PER Mask in PSW */ + } + /* Update CR6 */ + regs->CR_L(6)=EVM_L(vmb+VMMCR6); + /* Insure proper re-entry */ + EVM_ST(0,STACKVM); + /* Update PROBLEM Start time */ + DW1=EVM_LD(vmb+VMTMOUTQ); + EVM_STD(DW1,PROBSTRT); + + /* Checkpoint Interval Timer */ + FW1=EVM_L(INTTIMER); + EVM_ST(FW1,QUANTUM); + + /* Update REAL CR0/CR1 */ + regs->CR_L(0)=NCR0; + regs->CR_L(1)=NCR1; + + /* Indicate RUNNING a user */ + EVM_STC(CPRUN,CPSTATUS); + + /* Update real PSW with working PSW */ + + /* Update regs */ + for(i=0;i<16;i++) + { + regs->GR_L(i)=EVM_L(vmb+VMGPRS+(i*4)); + } + /* Clear I/O Old PSW Byte 0 */ + EVM_STC(0,IOOPSW); + /* Issue PTLB if necessary */ + if(EVM_IC(APSTAT2) & CPPTLBR) + { + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : Purging TLB\n")); + ARCH_DEP(purge_tlb)(regs); + EVM_STC(EVM_IC(APSTAT2) & ~CPPTLBR,APSTAT2); + } + + /* Update cached VMBLOK flags */ + EVM_STC(B_VMDSTAT,vmb+VMDSTAT); + EVM_STC(B_VMRSTAT,vmb+VMRSTAT); + EVM_STC(B_VMESTAT,vmb+VMESTAT); + EVM_STC(B_VMPSTAT,vmb+VMPSTAT); + EVM_STC(B_VMOSTAT,vmb+VMOSTAT); + ARCH_DEP(store_psw) (&wregs,regs->mainstor+vmb+VMPSW); + + + /* Stop charging current VM Block for Supervisor time */ + CHARGE_STOP(vmb); + + /* Rest goes for problem state */ + SPT(vmb+VMTMOUTQ); + /* Save RUNCR0, RUNCR1 & RUNPSW */ + /* Might be used by later CP Modules (including DMKPRV) */ + EVM_ST(NCR0,RUNCR0); + EVM_ST(NCR1,RUNCR1); + ARCH_DEP(store_psw) (&rregs,regs->mainstor+RUNPSW); + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : Entry Real ")); + DEBUG_CPASSISTX(DISP2,display_psw(regs)); + ARCH_DEP(load_psw) (regs,regs->mainstor+RUNPSW); + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : VMB @ %6.6X Now being dispatched\n",vmb)); + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : Real ")); + DEBUG_CPASSISTX(DISP2,display_psw(regs)); + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : Virtual ")); + DEBUG_CPASSISTX(DISP2,display_psw(&wregs)); + /* TEST */ + ARCH_DEP(purge_tlb)(regs); + /* HERCULES STUFF - Invalidate AEA & AIA */ + INVALIDATE_AIA(regs); + INVALIDATE_AEA_ALL(regs); + SET_IC_EXTERNAL_MASK(regs); + SET_IC_MCK_MASK(regs); + SET_IC_PER_MASK(regs); + SET_IC_IO_MASK(regs); + /* Dispatch..... */ + DEBUG_CPASSISTX(DISP2,logmsg(_("HHCPEV300D : DISP2 - Next Instruction : %2.2X\n"),ARCH_DEP(vfetchb)(regs->psw.IA,USE_PRIMARY_SPACE,regs))); + DEBUG_CPASSISTX(DISP2,display_regs(regs)); + DEBUG_CPASSISTX(DISP2,display_cregs(regs)); + return(2); /* OK - Perform INTCHECK */ + } + /* Nothing else to do - wait state */ + DEBUG_CPASSISTX(DISP2,logmsg("DISP2 : Nothing to dispatch - IDLEECPS\n")); + regs->psw.IA=EVM_L(el+24); /* IDLEECPS */ + return(0); +} + +/* DISP1 : Early tests part 2 */ +/* DISP1 Checks if the user is OK to run */ +/* early tests part 1 already done by DISP0 */ +DEF_INST(ecpsvm_disp1) +{ + + ECPSVM_PROLOG(DISP1); + switch(ecpsvm_do_disp1(regs,effective_addr1,effective_addr2)) + { + case 0: /* Done */ + CPASSIST_HIT(DISP1); + return; + case 1: /* No-op */ + break; + case 2: /* Call DISP2 - INTCHECK NOT needed */ + switch(ecpsvm_do_disp2(regs,effective_addr1,effective_addr2)) + { + case 0: + CPASSIST_HIT(DISP1); + return; + case 1: + return; + case 2: + CPASSIST_HIT(DISP1); + RETURN_INTCHECK(regs); + default: + break; + } + return; + default: + return; + } +} +static int ecpsvm_int_lra(REGS *regs,VADR pgadd,RADR *raddr) +{ + U16 xcode; + int private; + int protect; + int stid; + return(ARCH_DEP(translate_addr) (pgadd , USE_PRIMARY_SPACE, regs, + ACCTYPE_LRA, raddr , &xcode, &private, &protect, &stid)); +} +/* TRANBRNG/TRANLOCK Common code */ +static int ecpsvm_tranbrng(REGS *regs,VADR cortabad,VADR pgadd,RADR *raddr) +{ + int cc; + int corcode; +#if defined(FEATURE_2K_STORAGE_KEYS) + RADR pg1,pg2; +#endif + VADR cortab; + cc=ecpsvm_int_lra(regs,pgadd,raddr); + if(cc!=0) + { + DEBUG_CPASSISTX(TRBRG,logmsg(_("HHCEV300D : Tranbring : LRA cc = %d\n"),cc)); + return(1); + } + /* Get the core table entry from the Real address */ + cortab=EVM_L( cortabad ); + cortab+=((*raddr) & 0xfff000) >> 8; + corcode=EVM_IC(cortab+8); + if(!(corcode & 0x08)) + { + DEBUG_CPASSISTX(TRBRG,logmsg(_("HHCEV300D : Page not shared - OK %d\n"),cc)); + return(0); /* Page is NOT shared.. All OK */ + } +#if defined(FEATURE_2K_STORAGE_KEYS) + pg1=(*raddr & 0xfff000); + pg2=pg1+0x800; + DEBUG_CPASSISTX(TRBRG,logmsg(_("HHCEV300D : Checking 2K Storage keys @"F_RADR" & "F_RADR"\n"),pg1,pg2)); + if((STORAGE_KEY(pg1,regs) & STORKEY_CHANGE) || + (STORAGE_KEY(pg2,regs) & STORKEY_CHANGE)) + { +#else + DEBUG_CPASSISTX(TRBRG,logmsg(_("HHCEV300D : Checking 4K Storage keys @"F_RADR"\n"),*raddr)); + if(STORAGE_KEY(*raddr,regs) & STORKEY_CHANGE) + { +#endif + DEBUG_CPASSISTX(TRBRG,logmsg(_("HHCEV300D : Page shared and changed\n"))); + return(1); /* Page shared AND changed */ + } + DEBUG_CPASSISTX(TRBRG,logmsg(_("HHCEV300D : Page shared but not changed\n"))); + return(0); /* All done */ +} +/* TRBRG : Translate a page address */ +/* TRBRG D1(R1,B1),D2(R2,B2) */ +/* 1st operand : Coretable address */ +/* 2nd operand : Virtual address */ +/* Note : CR1 Contains the relevant segment table */ +/* pointers */ +/* The REAL address is resolved. If the page is flagged */ +/* as shared in the core table, the page is checked for */ +/* the change bit */ +/* If no unusual condition is detected, control is returned */ +/* to the address in GPR 14. Otherwise, TRBRG is a no-op */ +DEF_INST(ecpsvm_tpage) +{ + int rc; + RADR raddr; + ECPSVM_PROLOG(TRBRG); + DEBUG_CPASSISTX(TRBRG,logmsg(_("HHCEV300D : TRANBRNG\n"))); + rc=ecpsvm_tranbrng(regs,effective_addr1,regs->GR_L(1),&raddr); + if(rc) + { + DEBUG_CPASSISTX(TRBRG,logmsg(_("HHCEV300D : TRANBRNG - Back to CP\n"))); + return; /* Something not right : NO OP */ + } + regs->psw.cc=0; + regs->GR_L(2)=raddr; + regs->psw.IA = effective_addr2 & ADDRESS_MAXWRAP(regs); + CPASSIST_HIT(TRBRG); + return; +} +/* TRLOK : Translate a page address and lock */ +/* TRLOK D1(R1,B1),D2(R2,B2) */ +/* See TRBRG. */ +/* If sucessfull, the page is also locked in the core table */ +DEF_INST(ecpsvm_tpage_lock) +{ + int rc; + RADR raddr; + ECPSVM_PROLOG(TRLOK); + DEBUG_CPASSISTX(TRLOK,logmsg(_("HHCEV300D : TRANLOCK\n"))); + rc=ecpsvm_tranbrng(regs,effective_addr1,regs->GR_L(1),&raddr); + if(rc) + { + DEBUG_CPASSISTX(TRLOK,logmsg(_("HHCEV300D : TRANLOCK - Back to CP\n"))); + return; /* Something not right : NO OP */ + } + /* + * Lock the page in Core Table + */ + ecpsvm_lockpage1(regs,effective_addr1,raddr); + regs->psw.cc=0; + regs->GR_L(2)=raddr; + regs->psw.IA = effective_addr2 & ADDRESS_MAXWRAP(regs); + CPASSIST_HIT(TRLOK); + return; +} +/* VIST : Not supported */ +DEF_INST(ecpsvm_inval_segtab) +{ + ECPSVM_PROLOG(VIST); +} +/* VIPT : Not supported */ +DEF_INST(ecpsvm_inval_ptable) +{ + ECPSVM_PROLOG(VIPT); +} +/* DFCCW : Not Supported */ +DEF_INST(ecpsvm_decode_first_ccw) +{ + ECPSVM_PROLOG(DFCCW); +} + +/* DISP0 Utility functions */ + +/* DMKDSP - INCPROBT */ + +static int ecpsvm_disp_incprobt(REGS *regs,VADR vmb) +{ + U64 tspent; + U64 DW_VMTMOUTQ; + U64 DW_PROBSTRT; + U64 DW_PROBTIME; + + DEBUG_CPASSISTX(DISP0,logmsg("INCPROBT Entry : VMBLOK @ %8.8X\n",vmb)); + DW_VMTMOUTQ=EVM_LD(vmb+VMTMOUTQ); + DW_PROBSTRT=EVM_LD(PROBSTRT); + DEBUG_CPASSISTX(DISP0,logmsg("INCPROBT Entry : VMTMOUTQ = %16.16llx\n",DW_VMTMOUTQ)); + DEBUG_CPASSISTX(DISP0,logmsg("INCPROBT Entry : PROBSTRT = %16.16llx\n",DW_PROBSTRT)); + if(DW_VMTMOUTQ==DW_PROBSTRT) + { + DEBUG_CPASSISTX(DISP0,logmsg("INCPROBT Already performed")); + return(2); /* continue */ + } + tspent=DW_PROBSTRT-DW_VMTMOUTQ; + DEBUG_CPASSISTX(DISP0,logmsg("INCPROBT TSPENT = %16.16llx\n",tspent)); + DW_PROBTIME=EVM_LD(PROBTIME); + DW_PROBTIME-=tspent; + EVM_STD(DW_PROBTIME,PROBTIME); + DEBUG_CPASSISTX(DISP0,logmsg("INCPROBT NEW PROBTIME = %16.16llx\n",DW_PROBTIME)); + return(2); +} + +/* DMKDSP +RUNTIME +*/ + +static int ecpsvm_disp_runtime(REGS *regs,VADR *vmb_p,VADR dlist,VADR exitlist) +{ + U64 DW_VMTTIME; + U64 DW_VMTMINQ; + BYTE B_VMDSTAT; + BYTE B_VMTLEVEL; + BYTE B_VMMCR6; + U32 F_QUANTUM; + U32 F_QUANTUMR; + U32 F_ITIMER; + int cc; + RADR raddr; + VADR tmraddr; + U32 oldtimer,newtimer; + VADR vmb; + VADR runu; + + vmb=*vmb_p; + DEBUG_CPASSISTX(DISP0,logmsg("RUNTIME Entry : VMBLOK @ %8.8X\n",vmb)); + runu=EVM_L(RUNUSER); + /* BAL RUNTIME Processing */ + EVM_STC(CPEX+CPSUPER,CPSTATUS); + CHARGE_STOP(vmb); + if(vmb!=runu) + { + DEBUG_CPASSISTX(DISP0,logmsg("RUNTIME Switching to RUNUSER VMBLOK @ %8.8X\n",runu)); + CHARGE_SWITCH(vmb,runu); /* Charge RUNUSER */ + F_ITIMER=EVM_L(QUANTUMR); + *vmb_p=vmb; + } + else + { + F_ITIMER=EVM_L(INTTIMER); + } + DEBUG_CPASSISTX(DISP0,logmsg("RUNTIME : VMBLOK @ %8.8X\n",vmb)); + /* vmb is now RUNUSER */ + /* Check if time slice is over */ + if(F_ITIMER & 0x80000000) + { + B_VMDSTAT=EVM_IC(vmb+VMDSTAT); + B_VMDSTAT&=~VMDSP; + B_VMDSTAT|=VMTSEND; + EVM_STC(B_VMDSTAT,vmb+VMDSTAT); + } + /* Check if still eligible for current run Q */ + DW_VMTTIME=EVM_LD(vmb+VMTTIME); + DW_VMTMINQ=EVM_LD(vmb+VMTMINQ); + /* Check 1st 5 bytes */ + if((DW_VMTTIME & 0xffffffffff000000ULL) < (DW_VMTMINQ & 0xffffffffff000000ULL)) + { + B_VMDSTAT=EVM_IC(vmb+VMDSTAT); + B_VMDSTAT&=~VMDSP; + B_VMDSTAT|=VMQSEND; + EVM_STC(B_VMDSTAT,vmb+VMDSTAT); + } + ecpsvm_disp_incprobt(regs,vmb); + F_QUANTUM=EVM_L(QUANTUM); + EVM_ST(F_ITIMER,QUANTUM); + /* Check if Virtual Timer assist is active */ + B_VMMCR6=EVM_IC(vmb+VMMCR6); + if(B_VMMCR6 & 0x01) /* Virtual Timer Flag */ + { + DEBUG_CPASSISTX(DISP0,logmsg("RUNTIME : Complete - VTIMER Assist active\n")); + return(2); /* End of "RUNTIME" here */ + } + /* Check SET TIMER ON or SET TIMER REAL */ + B_VMTLEVEL=EVM_IC(vmb+VMTLEVEL); + if(!(B_VMTLEVEL & (VMTON | VMRON))) + { + DEBUG_CPASSISTX(DISP0,logmsg("RUNTIME : Complete - SET TIMER OFF\n")); + return(2); + } + /* Update virtual interval timer */ + F_QUANTUMR=EVM_L(QUANTUMR); + F_QUANTUM-=F_QUANTUMR; + if(F_QUANTUM & 0x80000000) + { + /* Abend condition detected during virtual time update - exit at +32 */ + DEBUG_CPASSISTX(DISP0,logmsg("RUNTIME : Bad ITIMER - Taking Exist #32\n")); + regs->psw.IA=EVM_L(exitlist+32); + return(0); + } + /* Load CR1 with the vmblock's VMSEG */ + regs->CR_L(1)=EVM_L(vmb+VMSEG); + /* Do LRA - Don't access the page directly yet - Could yield a Paging fault */ + cc = ecpsvm_int_lra(regs,INTTIMER,&raddr); + if(cc!=0) + { + /* Update VMTIMER instead */ + tmraddr=vmb+VMTIMER; + } + else + { + tmraddr=(VADR)raddr; + } + oldtimer=EVM_L(tmraddr); + newtimer=oldtimer-F_QUANTUM; + EVM_ST(newtimer,tmraddr); + if((newtimer & 0x80000000) != (oldtimer & 0x80000000)) + { + /* Indicate XINT to be generated (exit + 8) */ + /* Setup a few regs 1st */ + regs->GR_L(3)=0; + regs->GR_L(4)=0x00800080; + regs->GR_L(9)=EVM_L(dlist+4); + regs->GR_L(11)=vmb; + regs->psw.IA = EVM_L(exitlist+8); + DEBUG_CPASSISTX(DISP0,logmsg("RUNTIME : Complete - Taking exit #8\n")); + return(0); + } + /* Return - Continue DISP0 Processing */ + DEBUG_CPASSISTX(DISP0,logmsg("RUNTIME : Complete - ITIMER Updated\n")); + return(2); +} + +/* DISP0 : Operand 1 : DISP0 Data list, Operand 2 : DISP0 Exit list */ +/* R11 : User to dispatch */ +DEF_INST(ecpsvm_dispatch_main) +{ + VADR dlist; + VADR elist; + VADR vmb; + /* PSA Fetched Values */ + BYTE B_CPSTATUS; + BYTE B_VMDSTAT; + BYTE B_VMPSTAT; + BYTE B_VMRSTAT; + BYTE B_VMPEND; + BYTE B_VMESTAT; + + VADR F_VMPXINT; + VADR OXINT; /* Back chain ptr for exit 20 */ + U32 F_VMPSWHI; + U32 F_VMVCR0; + U32 F_VMIOINT; + U32 F_VMVCR2; + U32 DISPCNT; + + U16 H_XINTMASK; + + U32 iomask; + BYTE extendmsk; /* Extended I/O mask */ + + ECPSVM_PROLOG(DISP0); + + dlist=effective_addr1; + elist=effective_addr2; + vmb=regs->GR_L(11); + DISPCNT=EVM_L(dlist); + DISPCNT++; + /* Question #1 : Are we currently running a user */ + B_CPSTATUS=EVM_IC(CPSTATUS); + if((B_CPSTATUS & CPRUN)) + { + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : CPRUN On\n")); + switch(ecpsvm_disp_runtime(regs,&vmb,dlist,elist)) + { + case 0: /* Exit taken - success */ + EVM_ST(DISPCNT,dlist); + CPASSIST_HIT(DISP0); + return; + case 1: /* no-op DISP0 */ + return; + default: /* Continue processing */ + break; + } + /* Load VMDSTAT */ + B_VMDSTAT=EVM_IC(vmb+VMDSTAT); + /* Check if I/O Old PSW has tranlation on */ + if(regs->mainstor[0x38] & 0x04) + { + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : I/O Old as XLATE on\n")); + /* Yes - I/O Interrupt while running a USER */ + if(B_VMDSTAT & VMDSP) + { + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : VMDSP on in VMBLOK - Clean status (Exit #36)\n")); + /* Clean status - Do exit 36 */ + regs->GR_L(11)=vmb; + regs->psw.IA=EVM_L(elist+36); + EVM_ST(DISPCNT,dlist); + CPASSIST_HIT(DISP0); + return; + } + } + } + else + { + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : CPRUN Off\n")); + /* Check if was in Wait State */ + if(B_CPSTATUS & CPWAIT) + { + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : CPWAIT On : Exit #4\n")); + /* Take exit #4 : Coming out of wait state */ + /* DMKDSPC3 */ + /* No need to update R11 */ + CPASSIST_HIT(DISP0); + regs->psw.IA=EVM_L(elist+4); + EVM_ST(DISPCNT,dlist); + return; + } + } + /* VMB is now either original GPR11 or RUNUSER */ + /* DMKDSP - UNSTACK */ + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : At UNSTACK : VMBLOK = %8.8X\n",vmb)); + B_VMRSTAT=EVM_IC(vmb+VMRSTAT); + if(B_VMRSTAT & VMCPWAIT) + { + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : VMRSTAT VMCPWAIT On (%2.2X) - Taking exit #12\n",B_VMRSTAT)); + /* Take Exit 12 */ + regs->GR_L(11)=vmb; + regs->psw.IA=EVM_L(elist+12); + CPASSIST_HIT(DISP0); + EVM_ST(DISPCNT,dlist); + return; + } + /* Check for PER/PPF (CKPEND) */ + B_VMPEND=EVM_IC(vmb+VMPEND); + if(B_VMPEND & (VMPERPND | VMPGPND)) + { + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : PER/PPF Pending - Taking exit #16\n")); + /* Take Exit 16 */ + regs->GR_L(11)=vmb; + regs->psw.IA=EVM_L(elist+16); + CPASSIST_HIT(DISP0); + EVM_ST(DISPCNT,dlist); + return; + } + /* Now, check if we should unstack an external int */ + /* 1st check if VMPXINT is NULL */ + F_VMPSWHI=EVM_L(vmb+VMPSW); /* Load top of virt PSW - Will need it */ + B_VMPSTAT=EVM_IC(vmb+VMPSTAT); /* Will need VMPSTAT for I/O ints too */ + F_VMPXINT=EVM_L(vmb+VMPXINT); + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : Checking for EXT; Base VMPXINT=%8.8X\n",F_VMPXINT)); + /* This is DMKDSP - CKEXT */ + if(F_VMPXINT!=0) + { + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : VPSW HI = %8.8X\n",F_VMPSWHI)); + OXINT=vmb+VMPXINT; + /* Check if Virtual PSW enabled for Externals */ + /* (works in both BC & EC modes) */ + if(F_VMPSWHI & 0x01000000) + { + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : PSW Enabled for EXT\n")); + /* Use VMVCR0 or CR0 in ECBLOK */ + F_VMVCR0=EVM_L(vmb+VMVCR0); /* CR0 or ECBLOK Address */ + if(B_VMPSTAT & VMV370R) /* SET ECMODE ON ?? */ + { + F_VMVCR0=EVM_L(F_VMVCR0+0); /* EXTCR0 at disp +0 in ECBLOK */ + } + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : CR0 = %8.8X\n",F_VMVCR0)); + /* scan the XINTBLOKS for a mask match */ + /* Save OXINT in the loop for exit 20 */ + for(;F_VMPXINT;OXINT=F_VMPXINT,F_VMPXINT=EVM_L(F_VMPXINT)) /* XINTNEXT @ +0 in XINTBLOK */ + { + H_XINTMASK=EVM_LH(F_VMPXINT+10); /* Get interrupt subclass in XINTBLOK */ + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : XINTMASK = %4.4X\n",H_XINTMASK)); + H_XINTMASK &= F_VMVCR0; + if(H_XINTMASK) /* Check against CR0 (External subclass mask) */ + { + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : EXT Hit - Taking exit #20\n")); + /* Enabled for this external */ + /* Take exit 20 */ + regs->GR_L(4)=H_XINTMASK; /* Enabled subclass bits */ + regs->GR_L(5)=OXINT; /* XINTBLOK Back pointer (or VMPXINT) */ + regs->GR_L(6)=F_VMPXINT; /* Current XINTBLOK */ + regs->GR_L(11)=vmb; /* RUNUSER */ + regs->psw.IA=EVM_L(elist+20); /* Exit +20 */ + EVM_ST(DISPCNT,dlist); + CPASSIST_HIT(DISP0); + return; + } + } + } + } + /* After CKEXT : No external pending/reflectable */ + + /* This is DMKDSP UNSTIO */ + /* Check for pending I/O Interrupt */ + + /* Load PIM */ + F_VMIOINT=EVM_LH(vmb+VMIOINT); + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : Checking for I/O; VMIOINT=%8.8X\n",F_VMIOINT)); + if(F_VMIOINT!=0) /* If anything in the pipe */ + { + F_VMIOINT <<=16; /* Put IOINT mask in bits 0-15 */ + /* Is V-PSW in EC Mode ? */ + iomask=0; + extendmsk=0; + B_VMESTAT=EVM_L(VMESTAT); + if(B_VMESTAT & VMEXTCM) /* Implies VMV370R on */ + { + /* Check I/O bit */ + if(F_VMPSWHI & 0x02000000) + { + iomask=0; + extendmsk=1; + } + } + else + { + /* BC Mode PSW */ + /* Isolate channel masks for channels 0-5 */ + iomask=F_VMPSWHI & 0xfc000000; + if(B_VMPSTAT & VMV370R) /* SET ECMODE ON ? */ + { + if(F_VMPSWHI & 0x02000000) + { + extendmsk=1; + } + } + } + if(extendmsk) + { + F_VMVCR2=EVM_L(vmb+VMECEXT); + F_VMVCR2=EVM_L(F_VMVCR2+8); + iomask |= F_VMVCR2; + } + if(iomask & 0xffff0000) + { + F_VMIOINT&=iomask; + if(F_VMIOINT) + { + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : I/O Hit - Taking exit #24\n")); + /* Take Exit 24 */ + regs->GR_L(7)=F_VMIOINT; + regs->GR_L(11)=vmb; + regs->psw.IA=EVM_L(elist+24); /* Exit +24 */ + EVM_ST(DISPCNT,dlist); + CPASSIST_HIT(DISP0); + return; + } + } + } + /* DMKDSP - CKWAIT */ + /* Clear Wait / Idle bits in VMRSTAT */ + B_VMRSTAT=EVM_IC(vmb+VMRSTAT); + B_VMRSTAT &= ~(VMPSWAIT | VMIDLE); + EVM_STC(B_VMRSTAT,vmb+VMRSTAT); + if(F_VMPSWHI & 0x00020000) + { + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : VWAIT - Taking exit #28\n")); + /* Take exit 28 */ + regs->GR_L(11)=vmb; + regs->psw.IA=EVM_L(elist+28); /* Exit +28 */ + CPASSIST_HIT(DISP0); + EVM_ST(DISPCNT,dlist); + return; + } + /* Take exit 0 (DISPATCH) */ + DEBUG_CPASSISTX(DISP0,logmsg("DISP0 : DISPATCH - Taking exit #0\n")); + regs->GR_L(11)=vmb; + regs->psw.IA=EVM_L(elist+0); /* Exit +0 */ + CPASSIST_HIT(DISP0); + EVM_ST(DISPCNT,dlist); + return; +} + + +/******************************************************/ +/* SCNRU Instruction : Scan Real Unit */ +/* Invoked by DMKSCN */ +/* E60D */ +/* SCNRU D1(R1,B1),D2(R2,B2) */ +/* */ +/* Operations */ +/* The Device Address specified in operand 1 is */ +/* the real device address for which control block */ +/* addresses are to be returned. The storage area */ +/* designated as the 2nd operand is a list of 4 */ +/* consecutive fullword (note : the 2nd operand is */ +/* treated as a Real Address, regardless of any */ +/* translation mode that may be in effect) */ +/* +--------------------+-------------------+ */ +/* | CHNLINDEX | RCHTABLE | */ +/* +--------------------+-------------------+ */ +/* | RCUTABLE | RDVTABLE | */ +/* +--------------------+-------------------+ */ +/* CHNLINDEX is an array of 16 halfwords, each */ +/* representing the offset of the target's device */ +/* channel's RCHBLOCK. If the channel is not defined */ +/* in the RIO table, the index has bit 0, byte 0 set */ +/* to 1 */ +/* */ +/* The RCHBLOK has at offset +X'20' a table of */ +/* 32 possible control unit indices */ +/* the device's address bit 8 to 12 are used to fetch */ +/* the index specified at the table. If it has */ +/* bit 0 byte 0 set, then the same operation is */ +/* attempted with bits 8 to 11 */ +/* The RCUBLOK then fetched from RCUTABLE + the index */ +/* fetched from the RCHBLOK has a DEVICE index table */ +/* at offset +X'28' which can be fetched by using */ +/* bits 5-7 */ +/* If the RCUBLOK designates an alternate control */ +/* unit block, (Offset +X'5' bit 1 set), then */ +/* the primary RCUBLOK is fetched from offset X'10' */ +/* */ +/* If no RCHBLOK is found, R6,R7 and R8 contain -1 */ +/* and Condition Code 3 is set */ +/* */ +/* if no RCUBLOK is found, R6 contains the RCHBLOK, */ +/* R7 and R8 contain -1, and Condition Code 2 is set */ +/* */ +/* if no RDVBLOK is found, R6 contains the RCHBLOK, */ +/* R7 contains the RCUBLOK and R8 contains -1, and */ +/* condition code 1 is set */ +/* */ +/* If all 3 control blocks are found, R6 contains the */ +/* the RCHBLOK, R7 Contains the RCUBLOK and R8 cont- */ +/* ains the RDVBLOK. Condition code 0 is set */ +/* */ +/* If the instruction is sucesfull, control is */ +/* returned at the address specified by GPR14. */ +/* Otherwise, the next sequential instruction is */ +/* executed, and no GPR or condition code is changed. */ +/* */ +/* Exceptions : */ +/* Operation Exception : ECPS:VM Disabled */ +/* Priviledged Exception : PSW in problem state */ +/* */ +/* Note : no access exception is generated for */ +/* the second operand. */ +/* */ +/* Note : as of yet, for any other situation than */ +/* finding all 3 control blocks, SCNRU acts */ +/* as a NO-OP */ +/******************************************************/ +DEF_INST(ecpsvm_locate_rblock) +{ + U16 chix; /* offset of RCH in RCH Array */ + U16 cuix; /* Offset of RCU in RCU Array */ + U16 dvix; /* Offset of RDV in RDV Array */ + VADR rchixtbl; /* RCH Index Table */ + VADR rchtbl; /* RCH Array */ + VADR rcutbl; /* RCU Array */ + VADR rdvtbl; /* RDV Array */ + VADR arioct; /* Data list for SCNRU */ + + VADR rchblk; /* Effective RCHBLOK Address */ + VADR rcublk; /* Effective RCUBLOK Address */ + VADR rdvblk; /* Effective RDVBLOK Address */ + U16 rdev; + + ECPSVM_PROLOG(SCNRU); + + /* Obtain the Device address */ + rdev=(effective_addr1 & 0xfff); + /* And the DMKRIO tables addresses */ + arioct=effective_addr2; + + DEBUG_CPASSISTX(SCNRU,logmsg(_("HHCEV300D : ECPS:VM SCNRU called; RDEV=%4.4X ARIOCT=%6.6X\n"),effective_addr1,arioct)); + + /* Get the Channel Index Table */ + rchixtbl= EVM_L(effective_addr2); + + /* Obtain the RCH offset */ + chix=EVM_LH(rchixtbl+((rdev & 0xf00) >> 7)); + + // logmsg(_("HHCEV300D : ECPS:VM SCNRU : RCH IX = %x\n"),chix); + + /* Check if Bit 0 set (no RCH) */ + if(chix & 0x8000) + { + // logmsg(_("HHCEV300D : ECPS:VM SCNRU : NO CHANNEL\n")); + /* + regs->GR_L(6)=~0; + regs->GR_L(7)=~0; + regs->GR_L(8)=~0; + regs->psw.IA=regs->GR_L(14) & ADDRESS_MAXWREP(regs); + regs->psw.cc=1; + */ + /* Right now, let CP handle the case */ + return; + } + + /* Obtain the RCH Table pointer */ + rchtbl=EVM_L(arioct+4); + + /* Add the RCH Index offset */ + rchblk=rchtbl+chix; + + /* Try to obtain RCU index with bits 8-12 of the device */ + cuix=EVM_LH(rchblk+0x20+((rdev & 0xf8)>>2)); + if(cuix & 0x8000) + { + /* Try with bits 8-11 */ + cuix=EVM_LH(rchblk+0x20+((rdev & 0xf0)>>2)); + if(cuix & 0x8000) + { + // logmsg(_("HHCEV300D : ECPS:VM SCNRU : NO CONTROL UNIT\n")); + /* + regs->GR_L(6)=rchblk; + regs->GR_L(7)=~0; + regs->GR_L(8)=~0; + regs->psw.IA=regs->GR_L(14) & ADDRESS_MAXWREP(regs); + regs->psw.cc=2; + */ + return; + } + } + // logmsg(_("HHCEV300D : ECPS:VM SCNRU : RCU IX = %x\n"),cuix); + rcutbl=EVM_L(arioct+8); + rcublk=rcutbl+cuix; + dvix=EVM_LH(rcublk+0x28+((rdev & 0x00f)<<1)); + dvix<<=3; + // logmsg(_("HHCEV300D : ECPS:VM SCNRU : RDV IX = %x\n"),dvix); + if(EVM_IC(rcublk+5)&0x40) + { + rcublk=EVM_L(rcublk+0x10); + } + if(dvix & 0x8000) + { + // logmsg(_("HHCEV300D : ECPS:VM SCNRU : NO RDEVBLOK\n")); + /* + regs->GR_L(6)=rchblk; + regs->GR_L(7)=rcublk; + regs->GR_L(8)=~0; + regs->psw.IA=regs->GR_L(14) & ADDRESS_MAXWREP(regs); + regs->psw.cc=3; + */ + return; + } + rdvtbl=EVM_L(arioct+12); + rdvblk=rdvtbl+dvix; + DEBUG_CPASSISTX(SCNRU,logmsg(_("HHCEV300D : ECPS:VM SCNRU : RCH = %6.6X, RCU = %6.6X, RDV = %6.6X\n"),rchblk,rcublk,rdvblk)); + regs->GR_L(6)=rchblk; + regs->GR_L(7)=rcublk; + regs->GR_L(8)=rdvblk; + regs->psw.cc=0; + regs->GR_L(15)=0; + BR14; + CPASSIST_HIT(SCNRU); +} +/* CCWGN : Not supported */ +DEF_INST(ecpsvm_comm_ccwproc) +{ + ECPSVM_PROLOG(CCWGN); +} +/* UXCCW : Not supported */ +DEF_INST(ecpsvm_unxlate_ccw) +{ + ECPSVM_PROLOG(UXCCW); +} +/* DISP2 : Not supported */ +DEF_INST(ecpsvm_disp2) +{ + ECPSVM_PROLOG(DISP2); + switch(ecpsvm_do_disp2(regs,effective_addr1,effective_addr2)) + { + case 0: /* Done */ + CPASSIST_HIT(DISP2); + return; + case 1: /* No-op */ + return; + case 2: /* Done */ + CPASSIST_HIT(DISP2); + RETURN_INTCHECK(regs); + } + return; +} +/* STEVL : Store ECPS:VM support level */ +/* STEVL D1(R1,B1),D2(R2,B2) */ +/* 1st operand : Fullword address in which to store ECPS:VM Support level */ +/* 2nd operand : ignored */ +DEF_INST(ecpsvm_store_level) +{ + ECPSVM_PROLOG(STEVL); + EVM_ST(sysblk.ecpsvm.level,effective_addr1); + DEBUG_CPASSISTX(STEVL,logmsg(_("HHCEV300D : ECPS:VM STORE LEVEL %d called\n"),sysblk.ecpsvm.level)); + CPASSIST_HIT(STEVL); +} +/* LCSPG : Locate Changed Shared Page */ +/* LCSPG : Not supported */ +DEF_INST(ecpsvm_loc_chgshrpg) +{ + ECPSVM_PROLOG(LCSPG); +} +/*************************************************************/ +/* FREEX : Allocate CP Storage Extended */ +/* FREEX B1(R1,B1),D2(R2,B2) */ +/* 1st operand : Address of FREEX Parameter list */ +/* +0 : Maxsize = Max number of DW allocatable */ +/* with FREEX */ +/* +4- : Subpool index table */ +/* 2nd operand : Subpool table (indexed) */ +/* GPR 0 : Number of DWs to allocate */ +/* */ +/* Each allocatable block is forward chained */ +/* if the subpool is empty, return to caller */ +/* if the subpool has an entry, allocate from the subpool */ +/* and save the next block address as the subpool chain head */ +/* return allocated block in GPR1. return at address in GPR14*/ +/* if allocation succeeded */ +/* if allocate fails, return at next sequential instruction */ +/*************************************************************/ +DEF_INST(ecpsvm_extended_freex) +{ + U32 maxdw; + U32 numdw; + U32 maxsztbl; + U32 spixtbl; + BYTE spix; + U32 freeblock; + U32 nextblk; + ECPSVM_PROLOG(FREEX); + numdw=regs->GR_L(0); + spixtbl=effective_addr2; + maxsztbl=effective_addr1; + DEBUG_CPASSISTX(FREEX,logmsg(_("HHCEV300D : ECPS:VM FREEX DW = %4.4X\n"),numdw)); + if(numdw==0) + { + return; + } + DEBUG_CPASSISTX(FREEX,logmsg(_("HHCEV300D : MAXSIZE ADDR = %6.6X, SUBPOOL INDEX TABLE = %6.6X\n"),maxsztbl,spixtbl)); + /* E1 = @ of MAXSIZE (maximum # of DW allocatable by FREEX from subpools) */ + /* followed by subpool pointers */ + /* E2 = @ of subpool indices */ + maxdw=EVM_L(maxsztbl); + if(regs->GR_L(0)>maxdw) + { + DEBUG_CPASSISTX(FREEX,logmsg(_("HHCEV300D : FREEX request beyond subpool capacity\n"))); + return; + } + /* Fetch subpool index */ + spix=EVM_IC(spixtbl+numdw); + DEBUG_CPASSISTX(FREEX,logmsg(_("HHCEV300D : Subpool index = %X\n"),spix)); + /* Fetch value */ + freeblock=EVM_L(maxsztbl+4+spix); + DEBUG_CPASSISTX(FREEX,logmsg(_("HHCEV300D : Value in subpool table = %6.6X\n"),freeblock)); + if(freeblock==0) + { + /* Can't fullfill request here */ + return; + } + nextblk=EVM_L(freeblock); + EVM_ST(nextblk,maxsztbl+4+spix); + DEBUG_CPASSISTX(FREEX,logmsg(_("HHCEV300D : New Value in subpool table = %6.6X\n"),nextblk)); + regs->GR_L(1)=freeblock; + regs->psw.cc=0; + BR14; + CPASSIST_HIT(FREEX); + return; +} +/*************************************************************/ +/* FRETX : Return CP Free storage */ +/* FRETX D1(R1,B1),R2(D2,B2) */ +/* 1st operand : Max DW for subpool free/fret */ +/* 2nd Operand : FRET PLIST */ +/* +0 Coretable address */ +/* +4 CL4'FREE' */ +/* +8 Maxsize (same as operand 1) */ +/* +12 Subpool Table Index */ +/* The block is checked VS the core table to check if it */ +/* is eligible to be returned to the subpool chains */ +/* If it is, then it is returned. Control is returned at */ +/* the address in GPR 14. Otherwise, if anything cannot */ +/* be resolved, control is returned at the next sequential */ +/* Instruction */ +/*************************************************************/ +int ecpsvm_do_fretx(REGS *regs,VADR block,U16 numdw,VADR maxsztbl,VADR fretl) +{ + U32 cortbl; + U32 maxdw; + U32 cortbe; /* Core table Page entry for fretted block */ + U32 prevblk; + BYTE spix; + DEBUG_CPASSISTX(FRETX,logmsg(_("HHCEV300D : X fretx called AREA=%6.6X, DW=%4.4X\n"),regs->GR_L(1),regs->GR_L(0))); + if(numdw==0) + { + DEBUG_CPASSISTX(FRETX,logmsg(_("HHCEV300D : ECPS:VM Cannot FRETX : DWORDS = 0\n"))); + return(1); + } + maxdw=EVM_L(maxsztbl); + if(numdw>maxdw) + { + DEBUG_CPASSISTX(FRETX,logmsg(_("HHCEV300D : ECPS:VM Cannot FRETX : DWORDS = %d > MAXDW %d\n"),numdw,maxdw)); + return(1); + } + cortbl=EVM_L(fretl); + cortbe=cortbl+((block & 0xfff000)>>8); + if(EVM_L(cortbe)!=EVM_L(fretl+4)) + { + DEBUG_CPASSISTX(FRETX,logmsg(_("HHCEV300D : ECPS:VM Cannot FRETX : Area not in Core Free area\n"))); + return(1); + } + if(EVM_IC(cortbe+8)!=0x02) + { + DEBUG_CPASSISTX(FRETX,logmsg(_("HHCEV300D : ECPS:VM Cannot FRETX : Area flag != 0x02\n"))); + return(1); + } + spix=EVM_IC(fretl+11+numdw); + prevblk=EVM_L(maxsztbl+4+spix); + if(prevblk==block) + { + DEBUG_CPASSISTX(FRETX,logmsg(_("HHCEV300D : ECPS:VM Cannot FRETX : fretted block already on subpool chain\n"))); + return(1); + } + EVM_ST(block,maxsztbl+4+spix); + EVM_ST(prevblk,block); + return(0); +} +DEF_INST(ecpsvm_extended_fretx) +{ + U32 fretl; + U32 maxsztbl; + U32 numdw; + U32 block; + + ECPSVM_PROLOG(FRETX); + + numdw=regs->GR_L(0); + block=regs->GR_L(1) & ADDRESS_MAXWRAP(regs); + maxsztbl=effective_addr1 & ADDRESS_MAXWRAP(regs); + fretl=effective_addr2 & ADDRESS_MAXWRAP(regs); + if(ecpsvm_do_fretx(regs,block,numdw,maxsztbl,fretl)==0) + { + BR14; + CPASSIST_HIT(FRETX); + } + return; +} +DEF_INST(ecpsvm_prefmach_assist) +{ + ECPSVM_PROLOG(PMASS); +} + +/**********************************/ +/* VM ASSISTS */ +/**********************************/ + +/******************************************************************/ +/* LPSW/SSM/STxSM : */ +/* Not sure about the current processing .. */ +/* *MAYBE* we need to invoke DMKDSPCH when the newly loaded PSW */ +/* does not need further checking. Now.. I wonder what the point */ +/* is to return to CP anyway, as we have entirelly validated the */ +/* new PSW (i.e. for most of it, this is essentially a BRANCH */ +/* However... */ +/* Maybe we should call DMKDSPCH (from the DMKPRVMA list) */ +/* only if re-enabling bits (and no Int pending) */ +/* */ +/* For the time being, we do THIS : */ +/* If the new PSW 'disables' bits or enables bit but MICPEND=0 */ +/* we just update the VPSW and continue */ +/* Same for LPSW.. But we also update the IA */ +/* If we encounter ANY issue, we just return to caller (which will*/ +/* generate a PRIVOP) thus invoking CP like for non-EVMA */ +/******************************************************************/ + +/******************************************************************/ +/* Check psw Transition validity */ +/******************************************************************/ +/* NOTE : oldr/newr Only have the PSW field valid (the rest is not initialised) */ +int ecpsvm_check_pswtrans(REGS *regs,ECPSVM_MICBLOK *micblok, BYTE micpend, REGS *oldr, REGS *newr) +{ + UNREFERENCED(micblok); + UNREFERENCED(regs); + /* Check for a switch from BC->EC or EC->BC */ + if(oldr->psw.ecmode!=newr->psw.ecmode) + { + DEBUG_SASSISTX(LPSW,logmsg(_("HHCEV300D : New and Old PSW have a EC/BC transition\n"))); + return(1); + } + /* Check if PER or DAT is being changed */ + if(newr->psw.ecmode) + { + if((newr->psw.sysmask & 0x44) != (oldr->psw.sysmask & 0x44)) + { + DEBUG_SASSISTX(LPSW,logmsg(_("HHCEV300D : New PSW Enables DAT or PER\n"))); + return(1); + } + } + /* Check if a Virtual interrupt is pending and new interrupts are being enabled */ + if(micpend & 0x80) + { + if(newr->psw.ecmode) + { + if(((~oldr->psw.sysmask) & 0x03) & newr->psw.sysmask) + { + DEBUG_SASSISTX(LPSW,logmsg(_("HHCEV300D : New PSW Enables interrupts and MICPEND (EC)\n"))); + return(1); + } + } + else + { + if(~oldr->psw.sysmask & newr->psw.sysmask) + { + DEBUG_SASSISTX(LPSW,logmsg(_("HHCEV300D : New PSW Enables interrupts and MICPEND (BC)\n"))); + return(1); + } + } + } + if(newr->psw.wait) + { + DEBUG_SASSISTX(LPSW,logmsg(_("HHCEV300D : New PSW is a WAIT PSW\n"))); + return(1); + } + if(newr->psw.ecmode) + { + if(newr->psw.sysmask & 0xb8) + { + DEBUG_SASSISTX(LPSW,logmsg(_("HHCEV300D : New PSW sysmask incorrect\n"))); + return(1); + } + } + if(newr->psw.IA & 0x01) + { + DEBUG_SASSISTX(LPSW,logmsg(_("HHCEV300D : New PSW has ODD IA\n"))); + return(1); + } + return(0); +} +int ecpsvm_dossm(REGS *regs,int b2,VADR effective_addr2) +{ + BYTE reqmask; + RADR cregs; + U32 creg0; + REGS npregs; + + SASSIST_PROLOG(SSM); + + + /* Reject if V PSW is in problem state */ + if(CR6 & ECPSVM_CR6_VIRTPROB) + { + DEBUG_SASSISTX(SSM,logmsg("HHCEV300D : SASSIST SSM reject : V PB State\n")); + return(1); + } + /* + if(!(micevma & MICSTSM)) + { + DEBUG_SASSISTX(SSM,logmsg("HHCEV300D : SASSIST SSM reject : SSM Disabled in MICEVMA; EVMA=%2.2X\n",micevma)); + return(1); + } + */ + /* Get CR0 - set ref bit on fetched CR0 (already done in prolog for MICBLOK) */ + cregs=LOGICAL_TO_ABS(micblok.MICCREG,USE_REAL_ADDR,regs,ACCTYPE_READ,0); + FETCH_FW(creg0,®s->mainstor[cregs]); + + /* Reject if V CR0 specifies SSM Suppression */ + if(creg0 & 0x40000000) + { + DEBUG_SASSISTX(SSM,logmsg("HHCEV300D : SASSIST SSM reject : V SSM Suppr\n")); + return(1); + } + /* Load the requested SSM Mask */ + /* USE Normal vfetchb here ! not only do we want tranlsation */ + /* but also fetch protection control, ref bit, etc.. */ + reqmask=ARCH_DEP(vfetchb) (effective_addr2,b2,regs); + + INITSIESTATE(npregs); + /* Load the virtual PSW AGAIN in a new structure */ + + ARCH_DEP(load_psw) (&npregs,®s->mainstor[vpswa]); + + npregs.psw.sysmask=reqmask; + + if(ecpsvm_check_pswtrans(regs,&micblok,micpend,&vpregs,&npregs)) /* Check PSW transition capability */ + { + DEBUG_SASSISTX(SSM,logmsg("HHCEV300D : SASSIST SSM Reject : New PSW too complex\n")); + return(1); /* Something in the NEW PSW we can't handle.. let CP do it */ + } + + /* While we are at it, set the IA in the V PSW */ + npregs.psw.IA=regs->psw.IA & ADDRESS_MAXWRAP(regs); + + /* Set the change bit */ + LOGICAL_TO_ABS(vpswa,USE_REAL_ADDR,regs,ACCTYPE_WRITE,0); + /* store the new PSW */ + ARCH_DEP(store_psw) (&npregs,®s->mainstor[vpswa]); + DEBUG_SASSISTX(SSM,logmsg("HHCEV300D : SASSIST SSM Complete : new SM = %2.2X\n",reqmask)); + DEBUG_SASSISTX(LPSW,logmsg("HHCEV300D : SASSIST SSM New VIRT ")); + DEBUG_SASSISTX(LPSW,display_psw(&npregs)); + DEBUG_SASSISTX(LPSW,logmsg("HHCEV300D : SASSIST SSM New REAL ")); + DEBUG_SASSISTX(LPSW,display_psw(regs)); + SASSIST_HIT(SSM); + return(0); +} + +int ecpsvm_dosvc(REGS *regs,int svccode) +{ + PSA_3XX *psa; + REGS newr; + + SASSIST_PROLOG(SVC); + + if(svccode==76) /* NEVER trap SVC 76 */ + { + DEBUG_SASSISTX(SVC,logmsg("HHCEV300D : SASSIST SVC Reject : SVC 76\n")); + return(1); + } + if(CR6 & ECPSVM_CR6_SVCINHIB) + { + DEBUG_SASSISTX(SVC,logmsg("HHCEV300D : SASSIST SVC Reject : SVC Assist Inhibit\n")); + return(1); /* SVC SASSIST INHIBIT ON */ + } + /* Get what the NEW PSW should be */ + + psa=(PSA_3XX *)®s->mainstor[LOGICAL_TO_ABS((VADR)0 , USE_PRIMARY_SPACE, regs, ACCTYPE_READ, 0)]; + /* Use all around access key 0 */ + /* Also sets reference bit */ + INITSIESTATE(newr); + ARCH_DEP(load_psw) (&newr, (BYTE *)&psa->svcnew); /* Ref bit set above */ + DEBUG_SASSISTX(SVC,logmsg("HHCEV300D : SASSIST SVC NEW VIRT ")); + DEBUG_SASSISTX(SVC,display_psw(&newr)); + /* Get some stuff from the REAL Running PSW to put in OLD SVC PSW */ + vpregs.psw.IA=regs->psw.IA; /* Instruction Address */ + vpregs.psw.cc=regs->psw.cc; /* Condition Code */ + vpregs.psw.pkey=regs->psw.pkey; /* Protection Key */ + vpregs.psw.domask=regs->psw.domask; /* Dec Overflow */ + vpregs.psw.fomask=regs->psw.fomask; /* Fixed Pt Overflow */ + vpregs.psw.eumask=regs->psw.eumask; /* Exponent Underflow */ + vpregs.psw.sgmask=regs->psw.sgmask; /* Significance */ + vpregs.psw.intcode=svccode; /* SVC Interrupt code */ + DEBUG_SASSISTX(SVC,logmsg("HHCEV300D : SASSIST SVC OLD VIRT ")); + DEBUG_SASSISTX(SVC,display_psw(&vpregs)); + + if(ecpsvm_check_pswtrans(regs,&micblok,micpend,&vpregs,&newr)) /* Check PSW transition capability */ + { + DEBUG_SASSISTX(SVC,logmsg("HHCEV300D : SASSIST SVC Reject : Cannot make transition to new PSW\n")); + return(1); /* Something in the NEW PSW we can't handle.. let CP do it */ + } + /* Store the OLD SVC PSW */ + psa=(PSA_3XX *)®s->mainstor[LOGICAL_TO_ABS((VADR)0, USE_PRIMARY_SPACE, regs, ACCTYPE_WRITE, 0)]; + /* Use all around access key 0 */ + /* Also sets change bit */ + /* Set intcode in PSW (for BC mode) */ + + + ARCH_DEP(store_psw) (&vpregs, (BYTE *)&psa->svcold); + + if(vpregs.psw.ecmode) + { + /* Also set SVC interrupt code */ + /* and ILC */ + STORE_FW((BYTE *)&psa->svcint,0x00020000 | svccode); + } + /* + * Now, update some stuff in the REAL PSW + */ + SASSIST_LPSW(newr); + /* + * Now store the new PSW in the area pointed by the MICBLOK + */ + ARCH_DEP(store_psw) (&newr,regs->mainstor+vpswa); + DEBUG_SASSISTX(SVC,logmsg("HHCEV300D : SASSIST SVC Done\n")); + SASSIST_HIT(SVC); + return(0); +} +/* LPSW Assist */ +int ecpsvm_dolpsw(REGS *regs,int b2,VADR e2) +{ + VADR nlpsw; + REGS nregs; + + SASSIST_PROLOG(LPSW); + /* Reject if V PSW is in problem state */ + if(CR6 & ECPSVM_CR6_VIRTPROB) + { + DEBUG_SASSISTX(LPSW,logmsg("HHCEV300D : SASSIST LPSW reject : V PB State\n")); + return(1); + } + /* Reject if MICEVMA says not to do LPSW sim */ + if(!(micevma & MICLPSW)) + { + DEBUG_SASSISTX(LPSW,logmsg("HHCEV300D : SASSIST LPSW reject : LPSW disabled in MICEVMA\n")); + return(1); + } + if(e2&0x03) + { + DEBUG_SASSISTX(LPSW,logmsg("HHCEV300D : SASSIST LPSW %6.6X - Alignement error\n",e2)); + return(1); + + } + nlpsw=LOGICAL_TO_ABS(e2,b2,regs,ACCTYPE_READ,regs->psw.pkey); + INITSIESTATE(nregs); + ARCH_DEP(load_psw) (&nregs,regs->mainstor+nlpsw); + if(ecpsvm_check_pswtrans(regs,&micblok,micpend,&vpregs,&nregs)) + { + DEBUG_SASSISTX(LPSW,logmsg("HHCEV300D : SASSIST LPSW Rejected - Cannot make PSW transition\n")); + return(1); + + } + SASSIST_LPSW(nregs); + LOGICAL_TO_ABS(vpswa,USE_REAL_ADDR,regs,ACCTYPE_WRITE,0); + /* Set ref bit in address pointed by MICBLOK */ + ARCH_DEP(store_psw) (&nregs,regs->mainstor+vpswa); + DEBUG_SASSISTX(LPSW,logmsg("HHCEV300D : SASSIST LPSW New VIRT ")); + DEBUG_SASSISTX(LPSW,display_psw(&nregs)); + DEBUG_SASSISTX(LPSW,logmsg("HHCEV300D : SASSIST LPSW New REAL ")); + DEBUG_SASSISTX(LPSW,display_psw(regs)); + SASSIST_HIT(LPSW); + return(0); +} + +int ecpsvm_testvtimer(REGS *regs,int td) +{ + U32 vtmr; + U32 ovtmr; + int doint=0; + SASSIST_PROLOG(VTIMER); + if(!(CR6 & ECPSVM_CR6_VIRTTIMR)) + { + DEBUG_SASSISTX(VTIMER,logmsg("HHCEV300D : SASSIST VTIMER reject : Disabled by CR6\n")); + return(1); + } + /* Update the Virt timer */ + /* Do not set ref/change bit there */ + /* this is a hardware timer update */ + /* ALSO ! Not subject to fetch/store protection */ + FETCH_FW(vtmr,regs->mainstor+micblok.MICVTMR); + ovtmr=vtmr; + vtmr-=td; + DEBUG_SASSISTX(VTIMER,logmsg("HHCEV300D : SASSIST VTIMER old=%8.8X, New=%8.8X\n",ovtmr,vtmr)); + STORE_FW(regs->mainstor+micblok.MICVTMR,vtmr); + if( (vtmr & 0x80000000) != (ovtmr & 0x80000000) ) + { + doint=1; + DEBUG_SASSISTX(VTIMER,logmsg("HHCEV300D : SASSIST VTIMER Need to reflect INT\n")); + } + SASSIST_HIT(VTIMER); + if(doint) + { + regs->vtimerint=1; + } + if(regs->vtimerint) + { + ON_IC_ITIMER(regs); + } + return(regs->vtimerint?0:1); /* Also say yes if vtimerint was set before */ +} + + +int ecpsvm_virttmr_ext(REGS *regs) +{ + DEBUG_SASSISTX(VTIMER,logmsg("HHCEV300D : SASSIST VTIMER Checking if we can IRPT\n")); + DEBUG_SASSISTX(VTIMER,logmsg("HHCEV300D : SASSIST VTIMER Virtual")); + DEBUG_SASSISTX(VTIMER,display_psw(regs)); + if(!regs->vtimerint) + { + DEBUG_SASSISTX(VTIMER,logmsg("HHCEV300D : SASSIST VTIMER Not pending\n")); + return(1); + } + if(!(regs->psw.prob)) + { + DEBUG_SASSISTX(VTIMER,logmsg("HHCEV300D : SASSIST VTIMER Not dispatching a VM\n")); + return(1); + } + if(!(regs->psw.sysmask & PSW_EXTMASK)) + { + DEBUG_SASSISTX(VTIMER,logmsg("HHCEV300D : SASSIST VTIMER Test int : Not enabled for EXT\n")); + return(1); + } + if(!(regs->CR_L(6) & ECPSVM_CR6_VIRTTIMR)) + { + DEBUG_SASSISTX(VTIMER,logmsg("HHCEV300D : SASSIST VTIMER Test int : Not enabled for VTIMER\n")); + return(1); + } + DEBUG_SASSISTX(VTIMER,logmsg("HHCEV300D : SASSIST VTIMER Please, do\n")); + return(0); +} + +/* SIO/SIOF Assist */ +int ecpsvm_dosio(REGS *regs,int b2,VADR e2) +{ + SASSIST_PROLOG(SIO); + UNREFERENCED(b2); + UNREFERENCED(e2); + return(1); +} +int ecpsvm_dostnsm(REGS *regs,int b1,VADR effective_addr1,int imm2) +{ + SASSIST_PROLOG(STNSM); + UNREFERENCED(b1); + UNREFERENCED(effective_addr1); + UNREFERENCED(imm2); + return(1); +} +int ecpsvm_dostosm(REGS *regs,int b1,VADR effective_addr1,int imm2) +{ + SASSIST_PROLOG(STOSM); + UNREFERENCED(b1); + UNREFERENCED(effective_addr1); + UNREFERENCED(imm2); + return(1); +} + +int ecpsvm_dostctl(REGS *regs,int r1,int r3,int b2,VADR effective_addr2) +{ + SASSIST_PROLOG(STCTL); + + UNREFERENCED(r1); + UNREFERENCED(r3); + UNREFERENCED(b2); + UNREFERENCED(effective_addr2); + return(1); +} +int ecpsvm_dolctl(REGS *regs,int r1,int r3,int b2,VADR effective_addr2) +{ + U32 crs[16]; /* New CRs */ + U32 rcrs[16]; /* REAL CRs */ + U32 ocrs[16]; /* Old CRs */ + VADR F_ECBLOK,vmb; + BYTE B_VMPSTAT; + + int i,j,numcrs; + + SASSIST_PROLOG(LCTL); + + if(effective_addr2 & 0x03) + { + DEBUG_SASSISTX(LCTL,logmsg("HHCEV300D : SASSIST LCTL Reject : Not aligned\n")); + return(1); + } + + vmb=vpswa-0xA8; + B_VMPSTAT=regs->mainstor[vmb+VMPSTAT]; + + if((!(B_VMPSTAT & VMV370R)) && ((r1!=r3) || (r1!=0))) + { + DEBUG_SASSISTX(LCTL,logmsg("HHCEV300D : SASSIST LCTL Reject : BC Mode VM & LCTL != 0,0\n")); + return(1); + } + /* Determine the range of CRs to be loaded */ + if(r1>r3) + { + numcrs=(r3+16)-r1; + } + else + { + numcrs=r3-r1; + } + numcrs++; + for(j=r1,i=0;i15) + { + j-=16; + } + crs[j]=ARCH_DEP(vfetch4)((effective_addr2+(i*4)) & ADDRESS_MAXWRAP(regs),b2,regs); + } + if(B_VMPSTAT & VMV370R) + { + F_ECBLOK=EVM_L(vmb+VMECEXT); + /* Ensure ref bit set */ + LOGICAL_TO_ABS(F_ECBLOK,USE_REAL_ADDR,regs,ACCTYPE_READ,0); + if((F_ECBLOK & 0x7FF) != ((F_ECBLOK+((numcrs-1)*4)) & 0x7FF)) + { + /* set ref bit in 2nd 2K Page is necessary */ + LOGICAL_TO_ABS(F_ECBLOK+((numcrs-1)*4),USE_REAL_ADDR,regs,ACCTYPE_READ,0); + } + /* Load OLD Crs from ECBLOK */ + for(i=0;i<16;i++) + { + FETCH_FW(ocrs[i],regs->mainstor+F_ECBLOK+(i*4)); + } + } + else + { + F_ECBLOK=vmb+VMECEXT; /* Update ECBLOK ADDRESS for VCR0 Update */ + /* Load OLD CR0 From VMBLOK */ + /* Note : ref bit already set in proglog */ + FETCH_FW(ocrs[0],regs->mainstor+F_ECBLOK); + } + for(i=0;i<16;i++) + { + rcrs[i]=regs->CR_L(i); + } + /* Source safely loaded into "crs" array */ + /* Load the CRS - exit from loop if it's not possible */ + DEBUG_SASSISTX(LCTL,logmsg("HHCEV300D : SASSIST LCTL %d,%d : Modifying %d cregs\n",r1,r3,numcrs)); + for(j=r1,i=0;i15) + { + j-=16; + } + switch(j) + { + case 0: /* CR0 Case */ + /* Check 1st 2 bytes of CR0 - No change allowed */ + if((ocrs[0] & 0xffff0000) != (crs[0] & 0xffff0000)) + { + DEBUG_SASSISTX(LCTL,logmsg("HHCEV300D : SASSIST LCTL Reject : CR0 High changed\n")); + return 1; + } + /* Not allowed if : NEW mask is being enabled AND MICPEND AND PSW has EXT enabled */ + if(vpregs.psw.sysmask & 0x01) + { + if(micpend & 0x80) + { + if((~(ocrs[0] & 0xffff)) & (crs[0] & 0xffff)) + { + DEBUG_SASSISTX(LCTL,logmsg("HHCEV300D : SASSIST LCTL Reject : CR0 EXTSM Enables new EXTS\n")); + return 1; + } + } + } + ocrs[0]=crs[0]; + break; + case 1: + if(ocrs[1] != crs[1]) + { + DEBUG_SASSISTX(LCTL,logmsg("HHCEV300D : SASSIST LCTL Reject : CR1 Updates shadow table\n")); + return 1; + } + break; + case 2: + /* Not allowed if : NEW Channel mask is turned on AND micpend AND PSW Extended I/O Mask is on */ + if(vpregs.psw.sysmask & 0x02) + { + if((~ocrs[2]) & crs[2]) + { + if(micpend & 0x80) + { + DEBUG_SASSISTX(LCTL,logmsg("HHCEV300D : SASSIST LCTL Reject : CR2 IOCSM Enables I/O Ints\n")); + return(1); + } + } + } + ocrs[2]=crs[2]; + break; + case 3: /* DAS Control regs (not used under VM/370) */ + case 4: + case 5: + case 7: + ocrs[j]=crs[j]; + rcrs[j]=crs[j]; + break; + case 6: /* VCR6 Ignored on real machine */ + ocrs[j]=crs[j]; + break; + case 8: /* Monitor Calls */ + DEBUG_SASSISTX(LCTL,logmsg("HHCEV300D : SASSIST LCTL Reject : MC CR8 Update\n")); + return(1); + case 9: /* PER Control Regs */ + case 10: + case 11: + DEBUG_SASSISTX(LCTL,logmsg("HHCEV300D : SASSIST LCTL Reject : PER CR%d Update\n",j)); + return(1); + case 12: + case 13: /* 12-13 : Unused */ + ocrs[j]=crs[j]; + rcrs[j]=crs[j]; + break; + case 14: + case 15: /* 14-15 Machine Check & I/O Logout control (plus DAS) */ + ocrs[j]=crs[j]; + break; + default: + break; + } + } + /* Update REAL Control regs */ + for(i=0;i<16;i++) + { + regs->CR_L(i)=rcrs[i]; + } + /* Update ECBLOK/VMBLOK Control regs */ + /* Set change bit in ECBLOCK (or VMBLOCK) */ + /* Note : if F_ECBLOK addresses VMVCR0 in the VMBLOCK */ + /* check has already been done to make sure */ + /* r1=0 and numcrs=1 */ + LOGICAL_TO_ABS(F_ECBLOK,USE_REAL_ADDR,regs,ACCTYPE_WRITE,0); + if((F_ECBLOK & 0x7FF) != ((F_ECBLOK+((numcrs-1)*4)) & 0x7FF)) + { + /* set change bit in 2nd 2K Page is necessary */ + LOGICAL_TO_ABS(F_ECBLOK+((numcrs-1)*4),USE_REAL_ADDR,regs,ACCTYPE_WRITE,0); + } + for(j=r1,i=0;i15) + { + j-=16; + } + STORE_FW(regs->mainstor+F_ECBLOK+(j*4),ocrs[j]); + } + DEBUG_SASSISTX(LCTL,logmsg("HHCEV300D : SASSIST LCTL %d,%d Done\n",r1,r3)); + SASSIST_HIT(LCTL); + return 0; +} +int ecpsvm_doiucv(REGS *regs,int b2,VADR effective_addr2) +{ + SASSIST_PROLOG(IUCV); + + UNREFERENCED(b2); + UNREFERENCED(effective_addr2); + return(1); +} +int ecpsvm_dodiag(REGS *regs,int r1,int r3,int b2,VADR effective_addr2) +{ + SASSIST_PROLOG(DIAG); + UNREFERENCED(r1); + UNREFERENCED(r3); + UNREFERENCED(b2); + UNREFERENCED(effective_addr2); + return(1); +} +static char *ecpsvm_stat_sep="HHCEV003I +-----------+----------+----------+-------+\n"; + +static int ecpsvm_sortstats(const void *a,const void *b) +{ + ECPSVM_STAT *ea,*eb; + ea=(ECPSVM_STAT *)a; + eb=(ECPSVM_STAT *)b; + return(eb->call-ea->call); +} + +static void ecpsvm_showstats2(ECPSVM_STAT *ar,size_t count) +{ + char *sep=ecpsvm_stat_sep; + char nname[32]; + int havedisp=0; + int notshown=0; + size_t unsupcc=0; + int haveunsup=0; + int callt=0; + int hitt=0; + size_t i; + for(i=0;iname,ce->expl); + } + return; +} +void ecpsvm_helpcmd(int ac,char **av) +{ + ECPSVM_CMDENT *ce; + if(ac==1) + { + ecpsvm_helpcmdlist(); + return; + } + ce=ecpsvm_getcmdent(av[1]); + if(ce==NULL) + { + logmsg(_("HHCEV011E Unknown subcommand %s - valid subcommands are :\n"),av[1]); + ecpsvm_helpcmdlist(); + return; + } + logmsg(_("HHCEV012I : %s : %s"),ce->name,ce->help); + return; +} + +ECPSVM_STAT *ecpsvm_findstat(char *feature,char **fclass) +{ + ECPSVM_STAT *es; + ECPSVM_STAT *esl; + int i; + int fcount; + fcount=sizeof(ecpsvm_sastats)/sizeof(ECPSVM_STAT); + esl=(ECPSVM_STAT *)&ecpsvm_sastats; + for(i=0;iname)==0) + { + *fclass="VM ASSIST"; + return(es); + } + } + esl=(ECPSVM_STAT *)&ecpsvm_cpstats; + fcount=sizeof(ecpsvm_cpstats)/sizeof(ECPSVM_STAT); + for(i=0;iname)==0) + { + *fclass="CP ASSIST"; + return(es); + } + } + return(NULL); +} + +void ecpsvm_enadisaall(char *fclass,ECPSVM_STAT *tbl,size_t count,int onoff,int debug) +{ + ECPSVM_STAT *es; + size_t i; + char *enadisa,*debugonoff; + enadisa=onoff?"Enabled":"Disabled"; + debugonoff=debug?"On":"Off"; + for(i=0;i=0) + { + es->enabled=onoff; + logmsg(_("HHCEV015I ECPS:VM %s feature %s %s\n"),fclass,es->name,enadisa); + } + if(debug>=0) + { + es->debug=debug; + logmsg(_("HHCEV015I ECPS:VM %s feature %s Debug %s\n"),fclass,es->name,debugonoff); + } + } + if(onoff>=0) + { + logmsg(_("HHCEV016I All ECPS:VM %s features %s\n"),fclass,enadisa); + } + if(debug>=0) + { + logmsg(_("HHCEV016I All ECPS:VM %s features Debug %s\n"),fclass,debugonoff); + } +} + +void ecpsvm_enable_disable(int ac,char **av,int onoff,int debug) +{ + char *fclass; + char *enadisa,*debugonoff; + int i; + + size_t sacount,cpcount; + ECPSVM_STAT *es; + ECPSVM_STAT *sal,*cpl; + + sal=(ECPSVM_STAT *)&ecpsvm_sastats; + cpl=(ECPSVM_STAT *)&ecpsvm_cpstats; + sacount=sizeof(ecpsvm_sastats)/sizeof(ECPSVM_STAT); + cpcount=sizeof(ecpsvm_cpstats)/sizeof(ECPSVM_STAT); + + enadisa=onoff?"Enabled":"Disabled"; + debugonoff=debug?"On":"Off"; + if(ac==1) + { + ecpsvm_enadisaall("VM ASSIST",sal,sacount,onoff,debug); + ecpsvm_enadisaall("CP ASSIST",cpl,cpcount,onoff,debug); + if(debug>=0) + { + sysblk.ecpsvm.debug=debug; + logmsg(_("HHCEV013I ECPS:VM Global Debug %s\n"),debugonoff); + } + return; + } + for(i=1;i=0) + { + es->enabled=onoff; + logmsg(_("HHCEV014I ECPS:VM %s feature %s %s\n"),fclass,es->name,enadisa); + } + if(debug>=0) + { + es->debug=onoff; + logmsg(_("HHCEV014I ECPS:VM %s feature %s Debug %s\n"),fclass,es->name,debugonoff); + } + } + else + { + logmsg(_("HHCEV014I Unknown ECPS:VM feature %s; Ignored\n"),av[i]); + } + } +} + +void ecpsvm_disable(int ac,char **av) +{ + ecpsvm_enable_disable(ac,av,0,-1); +} +void ecpsvm_enable(int ac,char **av) +{ + ecpsvm_enable_disable(ac,av,1,-1); +} +void ecpsvm_debug(int ac,char **av) +{ + ecpsvm_enable_disable(ac,av,-1,1); +} +void ecpsvm_nodebug(int ac,char **av) +{ + ecpsvm_enable_disable(ac,av,-1,0); +} + +void ecpsvm_level(int ac,char **av) +{ + int lvl; + if(sysblk.ecpsvm.available) + { + logmsg(_("HHCEV016I Current reported ECPS:VM Level is %d\n"),sysblk.ecpsvm.level); + } + else + { + logmsg(_("HHCEV016I Current reported ECPS:VM Level is %d\n"),sysblk.ecpsvm.level); + logmsg(_("HHCEV017I But ECPS:VM is currently disabled\n")); + } + if(ac>1) + { + lvl=atoi(av[1]); + logmsg(_("HHCEV016I Level reported to guest program is now %d\n"),lvl); + sysblk.ecpsvm.level=lvl; + } + if(sysblk.ecpsvm.level!=20) + { + logmsg(_("HHCEV017W WARNING ! current level (%d) is not supported\n"),sysblk.ecpsvm.level); + logmsg(_("HHCEV018W WARNING ! Unpredictable results may occur\n")); + logmsg(_("HHCEV019I The microcode support level is 20\n")); + } +} + +static ECPSVM_CMDENT ecpsvm_cmdtab[]={ + {"Help",1,ecpsvm_helpcmd,"Show help","format : \"evm help [cmd]\" Shows help on the specified\n" + " ECPSVM subcommand\n"}, + {"STats",2,ecpsvm_showstats,"Show statistical counters","format : evm stats : Shows various ECPS:VM Counters\n"}, + {"DIsable",2,ecpsvm_disable,"Disable ECPS:VM Features","format : evm disable [ALL|feat1[ feat2|...]\n"}, + {"ENable",2,ecpsvm_enable,"Enable ECPS:VM Features","format : evm enable [ALL|feat1[ feat2|...]\n"}, +#if defined(DEBUG_SASSIST) || defined(DEBUG_CPASSIST) + {"DEBUG",5,ecpsvm_debug,"Debug ECPS:VM Features","format : evm debug [ALL|feat1[ feat2|...]\n"}, + {"NODebug",3,ecpsvm_nodebug,"Turn Debug off for ECPS:VM Features","format : evm NODebug [ALL|feat1[ feat2|...]\n"}, +#endif + {"Level",1,ecpsvm_level,"Set/Show ECPS:VM level","format : evm Level [nn]\n"}, + {NULL,0,NULL,NULL,NULL}}; + +ECPSVM_CMDENT *ecpsvm_getcmdent(char *cmd) +{ + ECPSVM_CMDENT *ce; + int i; + int clen; + for(i=0;ecpsvm_cmdtab[i].name;i++) + { + ce=&ecpsvm_cmdtab[i]; + if(strlen(cmd)<=strlen(ce->name) && strlen(cmd)>=(size_t)ce->abbrev) + { + clen=strlen(cmd); + if(strncasecmp(cmd,ce->name,clen)==0) + { + return(ce); + } + } + } + return(NULL); +} +void ecpsvm_command(int ac,char **av) +{ + ECPSVM_CMDENT *ce; + logmsg(_("HHCEV011I ECPS:VM Command processor invoked\n")); + if(ac==1) + { + logmsg(_("HHCEV008E NO EVM subcommand. Type \"evm help\" for a list of valid subcommands\n")); + return; + } + ce=ecpsvm_getcmdent(av[1]); + if(ce==NULL) + { + logmsg(_("HHCEV008E Unknown EVM subcommand %s\n"),av[1]); + return; + } + ce->fun(ac-1,av+1); + logmsg(_("HHCEV011I ECPS:VM Command processor complete\n")); +} +/* NOTE : THE FOLLOWING 2 ROUTINES ARE ONLY DEFINED TO ELEVIATE A COMPILER WARNING */ +/* DO NOT INVOKE THEM. IF IT IS NECESSARY TO PERFORM S/390 OR z/Arch DAT */ +/* THEN IT WILL BE NECESSARY TO PERFORM ARCH_DEP AUTO INCLUSION */ +/* AND THE NECESSARY ROUTINES WILL BE AUTOMATICALLY DEFINED */ + +static int s390_translate_addr (U32 vaddr, int arn, REGS *regs, + int acctype, RADR *raddr, U16 *xcode, int *priv, + int *prot, int *pstid) +{ + abort(); + UNREFERENCED(vaddr); + UNREFERENCED(arn); + UNREFERENCED(regs); + UNREFERENCED(acctype); + UNREFERENCED(raddr); + UNREFERENCED(xcode); + UNREFERENCED(priv); + UNREFERENCED(prot); + UNREFERENCED(pstid); + return(0); +} +static int z900_translate_addr (U64 vaddr, int arn, REGS *regs, + int acctype, RADR *raddr, U16 *xcode, int *priv, + int *prot, int *pstid) +{ + abort(); + UNREFERENCED(vaddr); + UNREFERENCED(arn); + UNREFERENCED(regs); + UNREFERENCED(acctype); + UNREFERENCED(raddr); + UNREFERENCED(xcode); + UNREFERENCED(priv); + UNREFERENCED(prot); + UNREFERENCED(pstid); + return(0); +} + + +#endif /* ifdef FEATURE_ECPSVM */ diff --git a/ecpsvm.h b/ecpsvm.h new file mode 100644 index 0000000..db37c86 --- /dev/null +++ b/ecpsvm.h @@ -0,0 +1,377 @@ +#ifndef __ECPSVM_H__ +#define __ECPSVM_H__ + +/* CR6 Definitions */ +#define ECPSVM_CR6_VMASSIST 0x80000000 /* DO Privop Sim */ +#define ECPSVM_CR6_VIRTPROB 0x40000000 /* Running user in Problem State */ +#define ECPSVM_CR6_ISKINHIB 0x20000000 /* Inhibit ISK/SSK Sim */ +#define ECPSVM_CR6_S360ONLY 0x10000000 /* Only S/360 Operations */ +#define ECPSVM_CR6_SVCINHIB 0x08000000 /* No SVC sim */ +#define ECPSVM_CR6_STVINHIB 0x04000000 /* No Shadow Table Validation */ +#define ECPSVM_CR6_ECPSVM 0x02000000 /* ECPS:VM Enable */ +#define ECPSVM_CR6_VIRTTIMR 0x01000000 /* Virtual Interval Timer update */ +#define ECPSVM_CR6_MICBLOK 0x00FFFFF8 /* MICBLOK Address mask */ +#define ECPSVM_CR6_VMMVSAS 0x00000004 /* VM Assists for MVS Enable (370E) */ + +/* CR6 Definitions (VMBLOK style) */ +#define VMMFE 0x80 +#define VMMPROB 0x40 +#define VMMNOSK 0x20 +#define VMM360 0x10 +#define VMMSVC 0x08 +#define VMMSHADT 0x04 +#define VMMCPAST 0x02 +#define VMMVTMR 0x01 + +/* MICBLOK */ +typedef struct _ECPSVM_MICBLOK +{ + U32 MICRSEG; + U32 MICCREG; + U32 MICVPSW; +#define MICVIP MICVPSW +#define MICPEND 0x80 + U32 MICWORK; + U32 MICVTMR; + U32 MICACF; + U32 RESERVED1; + U32 RESERVED2; + U32 MICCREG0; + U32 RESERVED3; + /* Bits defined in MICEVMA */ +#define MICLPSW 0x80 /* LPSW SIM */ +#define MICPTLB 0x40 /* PTLB SIM */ +#define MICSCSP 0x20 /* SCKC, SPT SIM */ +#define MICSIO 0x10 /* SIO, SIOF SIM */ +#define MICSTSM 0x08 /* SSM, STNSM, STOSM SIM */ +#define MICSTPT 0x04 /* STPT SIM */ +#define MICTCH 0x02 /* TCH SIM */ +#define MICDIAG 0x01 /* DIAG SIM */ + /* Hint : The following bits may be irrelevant for ECPS:VM Level 20 */ + /* Bits defined in MICEVMA2 */ + /* V=R Shadow Table Bypass assists */ +#define MICSTBVR 0x80 /* V=R STBYPASS Assist active */ +#define MICPTLB2 0x40 /* VRSTBYPASS PTLB Simulation */ +#define MICIPTP2 0x20 /* VRSTBYPASS IPTE/TPRT Simulation */ +#define MICVPFR2 0x10 /* Virtual Page Fault reflection Assists */ +#define MICLRA2 0x08 /* VRSTBYPASS LRA Simulation */ +#define MICSTSM2 0x02 /* VRSTBYPASS SSM/STxSM Sim */ +#define MICLCTL2 0x01 /* VRSTBYPASS LCTL Sim */ + /* Bits define in MICEVMA3 */ +#define MICSKYMD 0x20 /* Unknown */ +#define MICISKE 0x10 /* PTLB Sim */ +#define MICRRBE 0x08 /* IPTE/TPRT Sim */ +#define MICSSKE 0x04 /* V Page Fault Sim */ + /* Bits defined in MICEVMA4 */ +#define MICSVC4 0x40 /* SVC/LPSW/LCTL Assists Extentions */ +#define MICSPT4 0x20 /* SPT Assist Extension */ +#define MICIUCV 0x10 /* IUCV ASSIST */ +} ECPSVM_MICBLOK; + +/* PSA Usefull Values */ +#define IOOPSW 0x038 + +#define QUANTUMR 0x04C /* Usefull little unused space for MVCing NEW ITIMER */ +#define INTTIMER 0x050 +#define QUANTUM 0x054 /* Usefull little unused space for MVCing OLD ITIMER */ + +/* PSA Displacements used by ECPS:VM */ +/* PSA Entries used by DISPx Instructions */ +#define CPSTATUS 0x348 +/* PSA + 348 : CPSTATUS */ +#define CPWAIT 0x80 /* CP IN WAIT STATE */ +#define CPRUN 0x40 /* RUNUSER is use running */ +#define CPEX 0x20 /* CPEXBLOK RUNNING */ +#define CPSUPER 0x08 /* Supervisor State */ + +/* PSA + 349 : SYSTEM EXTENDING FREE STORAGE BYTE */ +/* Note : PSA+0X349 = 0xFF if storage extending */ +#define XTENDLOCK 0x349 +#define XTENDLOCKSET 0xff + +/* PSA + 34A : CPSTAT2 */ +#define CPSTAT2 0x34A +#define CPMICAVL 0x80 +#define CPMICON 0x40 +#define CPSHRLK 0x20 +#define CPASTAVL 0x08 +#define CPASTON 0x04 + +/* RUNPSW */ +/* PSW used during dispatch */ +#define RUNPSW 0x330 + +/* RUNUSER PSA+338 */ +#define RUNUSER 0x338 + +/* RUNCR0, RUNCR1 */ +/* CR0 & CR1 used during dispatch */ +#define RUNCR0 0x340 +#define RUNCR1 0x344 + +/* ASYSVM : PSA+37C */ +#define ASYSVM 0x37C + +/* PSA + X'3D4' - ASSISTS STUFF */ +#define CPCREG0 0x3D4 +#define CPCREG6 0x3D8 +#define CPCREG8 0x3DC +#define TIMEDISP 0x3E0 +#define ASVCLIST 0x3E4 +#define AVMALIST 0x3E8 +#define LASTUSER 0x3EC + +/* PSA + 328 : PROBTIME */ +/* Total time spent in problem state (2's complement) */ +#define PROBTIME 0x328 + +/* PSA + 69D : APSTAT2 - Machine check recov & PTLB Required */ +#define APSTAT2 0x69D +#define CPMCHLK 0x10 +#define CPPTLBR 0x02 + +/* PSA + 6A8 : PROBSTRT */ +/* TOD Clock at Proble state entry */ +#define PROBSTRT 0x6A8 + +/* PSA + 6D0 : STACKVM - GPR11 Backup for dispatcher */ +#define STACKVM 0x6D0 + +/* CP ASSIST SVC (Not VM Assist SVC) LIST */ +/* ASSISTS FOR CP LINK/RETURN SVCs */ +/* DMKSVCNS */ +/* Address found @ PSA+3E4 */ +typedef struct _ECPSVM_SVCLIST +{ + DW NEXTSAVE; /* Pointer to next Save Area + 8 */ + DW SLCADDR; /* V=R Start */ + DW DMKSVCHI; /* DMKFREHI */ + DW DMKSVCLO; /* DMKFRELO + SAVEAREA LENGTH */ +} ECPSVM_SVCLIST; + +/* VM ASSIST LISTS */ +/* ENTRYPOINT TO VARIOUS PRIVOP SIM FASTPATH */ +/* (DMKPRVMA) */ +/* Address found @ PSA+3E8 */ + +typedef struct _ECPSVM_VMALIST +{ + DW VSIVS; /* EP To DMKVSIVS (Fastpath SIO/SIOF) */ + DW VSIEX; /* Base addr for VSIVS */ + DW DSPCH; /* Scheduler - Fast path for LPSW/SSM/STNSM/STOSM */ + DW TMRCC; /* SCKC EP */ + DW TMR; /* Timer ops base */ + DW TMRSP; /* SPT EP */ + DW VATAT; /* ARCHITECT */ + DW DSPB; /* Slow Path Dispatcher - PSW Revalidate required */ + DW PRVVS; /* VSIVS COUNT */ + DW PRVVL; /* LPSW Count */ + DW PRVVM; /* SSM/STxSM COUNT */ + DW PRVVC; /* SCKC COUNT */ + DW RESERVED; + DW PRVVP; /* SPT COUNT */ +} ECPSVM_VMALIST; + +/* VMBLOK Displacements */ +#define VMQFPNT 0x000 +#define VMQBPNT 0x004 +#define VMPNT 0x008 +#define VMECEXT 0x00C +#define VMVCR0 VMECEXT +#define VMSEG 0x010 +#define VMSIZE 0x014 +#define VMCHSTRT 0x018 +#define VMCUSTRT 0x01C +#define VMDVSTRT 0x020 +#define VMTERM 0x024 +#define VMVTERM 0x028 +#define VMTRMID 0x02A +#define VMTLEND 0x02C +#define VMTLDEL 0x02D +#define VMTCDEL 0x02E +#define VMTESCP 0x02F +#define VMCHCNT 0x030 +#define VMCUCNT 0x032 +#define VMDVCNT 0x034 +#define VMIOACTV 0x036 +#define VMCHTBL 0x038 +#define VMRSTAT 0x058 + /* Flags defined in VMRSTAT */ +#define VMCFWAIT 0x80 +#define VMPGWAIT 0x40 +#define VMIOWAIT 0x20 +#define VMPSWAIT 0x10 +#define VMEXWAIT 0x08 +#define VMLOGON 0x04 +#define VMLOGOFF 0x02 +#define VMIDLE 0x01 +#define VMCPWAIT (VMCFWAIT|VMPGWAIT|VMIOWAIT|VMEXWAIT|VMLOGOFF|VMLOGON) +#define VMNORUN (VMCPWAIT|VMPSWAIT) +#define VMLONGWT (VMCFWAIT|VMLOGON|VMLOGOFF|VMIDLE) + +#define VMDSTAT 0x059 + /* Flags defined in VMDSTAT */ +#define VMDSP 0x80 +#define VMTSEND 0x40 +#define VMQSEND 0x20 +#define VMTIO 0x10 +#define VMRUN 0x08 +#define VMINQ 0x04 +#define VMELIG 0x02 +#define VMDSPCH 0x01 + +#define VMOSTAT 0x05A + /* Flags defined in VMOSTAT */ +#define VMSYSOP 0x80 +#define VMSHR 0x40 +#define VMSLEEP 0x20 +#define VMDISC 0x10 +#define VMCFRUN 0x08 +#define VMVIRCF 0x04 +#define VMCF 0x02 +#define VMKILL 0x01 + +#define VMQSTAT 0x05B + /* Flags defined in VMQSTAT */ +#define VMPRIDSP 0x80 +#define VMAUTOLOG 0x40 +#define VMWSERNG 0x20 +#define VMDLDRP 0x10 +#define VMWSCHG 0x08 +#define VMINHMIG 0x04 +#define VMCFREAD 0x02 +#define VMPA2APL 0x01 + +#define VMPSTAT 0x05C + /* Flags defined in VMPSTAT */ +#define VMISAM 0x80 +#define VMV370R 0x40 +#define VMRPAGE 0x20 +#define VMREAL 0x10 +#define VMNOTRAN 0x08 +#define VMNSHR 0x04 +#define VMACCOUN 0x02 +#define VMPAGEX 0x01 + +#define VMESTAT 0x05D + /* Flags defined in VMESTAT */ +#define VMSHADT 0x80 +#define VMPERCM 0x40 +#define VMBADCR0 0x20 +#define VMMICSVC 0x10 +#define VMEXTCM 0x08 +#define VMNEWCR0 0x04 +#define VMINVSEG 0x02 +#define VMINVPAG 0x01 +#define VMECZAP ~VMMICSVC + +#define VMTRCTL 0x05E + /* Bits defined in VMTRCTL */ +#define VMTRPER 0x80 +#define VMTRSVC 0x40 +#define VMTRPRG 0x20 +#define VMTRIO 0x10 +#define VMTREX 0x08 +#define VMTRPRV 0x04 +#define VMTRSIO 0x02 +#define VMTRBRIN 0x01 +#define VMTRINT (VMTRSVC|VMTRPRG|VMTRIO|VMTREX) + +#define VMMLEVEL 0x05F +#define VMQLEVEL 0x060 + /* Bits defined in VMQLEVEL */ +#define VMQ1 0x80 +#define VMCOMP 0x40 +#define VMHIPRI 0x20 +#define VMLOPRI 0x10 +#define VMAEX 0x08 +#define VMAEXP 0x04 +#define VMAQ3 0x02 +#define VMDROP1 0x02 +#define VMFS 0x01 + +#define VM_RESERVED1 0x061 +#define VMTLEVEL 0x062 + /* Flags defined for VMTLEVEL */ +#define VMTON 0x80 +#define VMRON 0x40 +#define VMCPUTMR 0x20 +#define VMSTMPI 0x08 +#define VMSTMPT 0x04 +#define VMTMRINT 0x01 + +#define VMPEND 0x063 + /* Flags defined in VMPEND */ +#define VMDEFSTK 0x80 +#define VMPERPND 0x40 +#define VMPRGPND 0x20 +#define VMSVCPND 0x10 +#define VMPGPND 0x08 +#define VMIOPND 0x02 +#define VMEXTPND 0x01 + +#define VMLOCKER 0x064 +#define VMFSTAT 0x068 +#define VMMLVL2 0x069 +#define VMIOINT 0x06A +#define VMTIMER 0x06C +#define VMVTIME 0x070 +#define VMTMOUTQ 0x078 +#define VMTTIME 0x080 +#define VMTMINQ 0x088 +#define VMTSOUTQ VMTMINQ +#define VMTODINQ 0x090 +#define VMINST 0x098 +#define VMUPRIOR 0x09E +#define VMPSWCT 0x09F +#define VMTREXT 0x0A0 +#define VMADSTOP 0x0A4 +#define VMPSW 0x0A8 +#define VMGPRS 0x0B0 +#define VMFPRS 0x0F0 +#define VMUSER 0x110 +#define VMACCNT 0x118 +#define VMDIST 0x120 + + +#define VMMICRO 0x17C +#define VMMCR6 VMMICRO +#define VMMADDR VMMICRO+1 + +#define VMPXINT 0x184 + +#define VMNOECPS 0x1A7 + +#define VMSTKCNT 0x1CC + + +/* ECBLOK Specifics */ +#define EXTSHCR0 0x40 +#define EXTSHCR1 0x44 + +typedef struct _ECPSVM_STAT +{ + char *name; + U32 call; + U32 hit; + U16 support:1, + enabled:1, + debug:1, + total:1; +} ECPSVM_STAT; + +#define ECPSVM_STAT_DCL(_name) ECPSVM_STAT _name +#define ECPSVM_STAT_DEF(_name) ._name = { .name = ""#_name"" ,.call=0,.hit=0,.support=1,.total=0,.enabled=1,.debug=0} +#define ECPSVM_STAT_DEFU(_name) ._name = { .name = ""#_name"" ,.call=0,.hit=0,.support=0,.total=0,.enabled=1,.debug=0} +#define ECPSVM_STAT_DEFM(_name) ._name = { .name = ""#_name"" ,.call=0,.hit=0,.support=1,.total=1,.enabled=1,.debug=0} + +typedef struct _ECPSVM_CMDENT +{ + char *name; + int abbrev; + void (*fun)(int argc,char **av); + char *expl; + char *help; +} ECPSVM_CMDENT; + +#endif diff --git a/esa390.h b/esa390.h index 307b56a..f15924d 100644 --- a/esa390.h +++ b/esa390.h @@ -1,5 +1,5 @@ -/* ESA390.H (c) Copyright Roger Bowler, 1994-2003 */ -/* ESA/390 Data Areas */ +/* ESA390.H (c) Copyright Roger Bowler, 1994-2003 */ +/* ESA/390 Data Areas */ /* Interpretive Execution - (c) Copyright Jan Jaeger, 1999-2003 */ /* z/Architecture support - (c) Copyright Jan Jaeger, 1999-2003 */ @@ -11,166 +11,167 @@ #include "htypes.h" /*-------------------------------------------------------------------*/ -/* Header file containing ESA/390 structure definitions */ +/* Header file containing ESA/390 structure definitions */ /*-------------------------------------------------------------------*/ /* Platform-independent storage operand definitions */ -typedef uint8_t BYTE; -typedef uint8_t HWORD[2]; -typedef uint8_t FWORD[4]; -typedef uint8_t DWORD[8]; -typedef uint8_t QWORD[16]; -typedef uint16_t U16; -typedef int16_t S16; -typedef uint32_t U32; -typedef int32_t S32; -typedef uint64_t U64; -typedef int64_t S64; +typedef uint8_t BYTE; +typedef uint8_t HWORD[2]; +typedef uint8_t FWORD[4]; +typedef uint8_t DWORD[8]; +typedef uint8_t QWORD[16]; +typedef int8_t S8; +typedef uint16_t U16; +typedef int16_t S16; +typedef uint32_t U32; +typedef int32_t S32; +typedef uint64_t U64; +typedef int64_t S64; #ifdef WORDS_BIGENDIAN typedef union { - U16 H; - struct { BYTE H; BYTE L; } B; - } HW; + U16 H; + struct { BYTE H; BYTE L; } B; + } HW; typedef union { - U32 F; - struct { HW H; HW L; } H; - struct { BYTE B; U32 A:24; } A; - } FW; + U32 F; + struct { HW H; HW L; } H; + struct { BYTE B; U32 A:24; } A; + } FW; typedef union { - U64 D; - struct { FW H; FW L; } F; - } DW; + U64 D; + struct { FW H; FW L; } F; + } DW; #else typedef union { - U16 H; - struct { BYTE L; BYTE H; } B; - } HW; + U16 H; + struct { BYTE L; BYTE H; } B; + } HW; typedef union { - U32 F; - struct { HW L; HW H; } H; - struct { U32 A:24; BYTE B; } A; - } FW; + U32 F; + struct { HW L; HW H; } H; + struct { U32 A:24; BYTE B; } A; + } FW; typedef union { - U64 D; - struct { FW L; FW H; } F; - } DW; + U64 D; + struct { FW L; FW H; } F; + } DW; #endif typedef union { HWORD H; struct { BYTE H; BYTE L; } B; - } HWORD_U; + } HWORD_U; typedef union { - FWORD F; - struct { HWORD_U H; HWORD_U L; } H; - } FWORD_U; + FWORD F; + struct { HWORD_U H; HWORD_U L; } H; + } FWORD_U; typedef union { - DWORD D; - struct { FWORD_U H; FWORD_U L; } F; - } DWORD_U; + DWORD D; + struct { FWORD_U H; FWORD_U L; } F; + } DWORD_U; /* Internal-format PSW structure definition */ typedef struct _PSW { - unsigned int - prob:1, /* 1=Problem state */ - wait:1, /* 1=Wait state */ - mach:1, /* 1=Machine check enabled */ - ecmode:1, /* 1=ECMODE, 0=BCMODE */ + unsigned int + prob:1, /* 1=Problem state */ + wait:1, /* 1=Wait state */ + mach:1, /* 1=Machine check enabled */ + ecmode:1, /* 1=ECMODE, 0=BCMODE */ #define notesame ecmode - sgmask:1, /* Significance mask */ - eumask:1, /* Exponent underflow mask */ - domask:1, /* Decimal overflow mask */ - fomask:1, /* Fixed-point overflow mask */ - armode:1, /* Access-register mode */ - space:1, /* Secondary-space mode */ - amode:1, /* Addressing mode 31 */ - amode64:1; /* Addressing mode 64 */ - BYTE sysmask; /* System mask */ - BYTE pkey; /* Bits 0-3=key, 4-7=zeroes */ - BYTE ilc; /* Instruction length code */ - BYTE cc; /* Condition code */ - U16 intcode; /* Interruption code */ - DW ia; /* Instruction addrress */ - BYTE zerobyte; /* bits 24-31 */ -#define IA_G ia.D -#define IA_H ia.F.H.F -#define IA_L ia.F.L.F + sgmask:1, /* Significance mask */ + eumask:1, /* Exponent underflow mask */ + domask:1, /* Decimal overflow mask */ + fomask:1, /* Fixed-point overflow mask */ + armode:1, /* Access-register mode */ + space:1, /* Secondary-space mode */ + amode:1, /* Addressing mode 31 */ + amode64:1; /* Addressing mode 64 */ + BYTE sysmask; /* System mask */ + BYTE pkey; /* Bits 0-3=key, 4-7=zeroes */ + BYTE ilc; /* Instruction length code */ + BYTE cc; /* Condition code */ + U16 intcode; /* Interruption code */ + DW ia; /* Instruction addrress */ + BYTE zerobyte; /* bits 24-31 */ +#define IA_G ia.D +#define IA_H ia.F.H.F +#define IA_L ia.F.L.F #define IA_LA24 ia.F.L.A.A DW amask; /* Address wraparound mask */ -#define AMASK_G amask.D -#define AMASK_L amask.F.L.F +#define AMASK_G amask.D +#define AMASK_L amask.F.L.F #define AMASK24 0x00FFFFFF #define AMASK31 0x7FFFFFFF #define AMASK64 0xFFFFFFFFFFFFFFFFULL } PSW; /* Bit definitions for ECMODE PSW system mask */ -#define PSW_PERMODE 0x40 /* Program event recording */ -#define PSW_DATMODE 0x04 /* Dynamic addr translation */ -#define PSW_IOMASK 0x02 /* I/O interrupt mask */ -#define PSW_EXTMASK 0x01 /* External interrupt mask */ +#define PSW_PERMODE 0x40 /* Program event recording */ +#define PSW_DATMODE 0x04 /* Dynamic addr translation */ +#define PSW_IOMASK 0x02 /* I/O interrupt mask */ +#define PSW_EXTMASK 0x01 /* External interrupt mask */ /* Macros for testing addressing mode */ #define PRIMARY_SPACE_MODE(p) \ - ((p)->space==0 && (p)->armode==0) + ((p)->space==0 && (p)->armode==0) #define SECONDARY_SPACE_MODE(p) \ - ((p)->space==1 && (p)->armode==0) + ((p)->space==1 && (p)->armode==0) #define ACCESS_REGISTER_MODE(p) \ - ((p)->space==0 && (p)->armode==1) + ((p)->space==0 && (p)->armode==1) #define HOME_SPACE_MODE(p) \ - ((p)->space==1 && (p)->armode==1) + ((p)->space==1 && (p)->armode==1) /* Structure definition for translation-lookaside buffer entry */ typedef struct _TLBE { - DW std; /* Segment table designation */ -#define TLB_STD_G std.D -#define TLB_STD_L std.F.L.F - DW vaddr; /* Virtual page address */ -#define TLB_VADDR_G vaddr.D -#define TLB_VADDR_L vaddr.F.L.F - DW pte; /* Copy of page table entry */ -#define TLB_PTE_G pte.D -#define TLB_PTE_L pte.F.L.F - BYTE valid; /* 1=TLB entry is valid */ - BYTE common; /* 1=Page in common segment */ - BYTE protect; /* 1=Page in protected segmnt*/ - BYTE resv[1]; /* Padding for alignment */ + DW std; /* Segment table designation */ +#define TLB_STD_G std.D +#define TLB_STD_L std.F.L.F + DW vaddr; /* Virtual page address */ +#define TLB_VADDR_G vaddr.D +#define TLB_VADDR_L vaddr.F.L.F + DW pte; /* Copy of page table entry */ +#define TLB_PTE_G pte.D +#define TLB_PTE_L pte.F.L.F + BYTE valid; /* 1=TLB entry is valid */ + BYTE common; /* 1=Page in common segment */ + BYTE protect; /* 1=Page in protected segmnt*/ + BYTE resv[1]; /* Padding for alignment */ } TLBE; /* Bit definitions for control register 0 */ -#define CR0_BMPX 0x80000000 /* Block multiplex ctl S/370*/ -#define CR0_SSM_SUPP 0x40000000 /* SSM suppression control */ -#define CR0_TOD_SYNC 0x20000000 /* TOD clock sync control */ -#define CR0_LOW_PROT 0x10000000 /* Low-address protection */ -#define CR0_EXT_AUTH 0x08000000 /* Extraction auth control */ -#define CR0_SEC_SPACE 0x04000000 /* Secondary space control */ -#define CR0_FETCH_OVRD 0x02000000 /* Fetch protection override */ -#define CR0_STORE_OVRD 0x01000000 /* Store protection override */ -#define CR0_STORKEY_4K 0x01000000 /* Storkey exception control */ -#define CR0_TRAN_FMT 0x00F80000 /* Translation format bits...*/ -#define CR0_TRAN_ESA390 0x00B00000 /* ...1M/4K ESA/390 format */ -#define CR0_PAGE_SIZE 0x00C00000 /* Page size for S/370... */ -#define CR0_PAGE_SZ_2K 0x00400000 /* ...2K pages */ -#define CR0_PAGE_SZ_4K 0x00800000 /* ...4K pages */ -#define CR0_SEG_SIZE 0x00380000 /* Segment size for S/370... */ -#define CR0_SEG_SZ_64K 0x00000000 /* ...64K segments */ -#define CR0_SEG_SZ_1M 0x00100000 /* ...1M segments */ -#define CR0_AFP 0x00040000 /* AFP register control */ -#define CR0_VOP 0x00020000 /* Vector control 390*/ -#define CR0_ASF 0x00010000 /* AS function control 390*/ -#define CR0_XM_MALFALT 0x00008000 /* Malfunction alert mask */ -#define CR0_XM_EMERSIG 0x00004000 /* Emergency signal mask */ -#define CR0_XM_EXTCALL 0x00002000 /* External call mask */ -#define CR0_XM_TODSYNC 0x00001000 /* TOD clock sync mask */ -#define CR0_XM_CLKC 0x00000800 /* Clock comparator mask */ -#define CR0_XM_PTIMER 0x00000400 /* CPU timer mask */ -#define CR0_XM_SERVSIG 0x00000200 /* Service signal mask */ -#define CR0_XM_ITIMER 0x00000080 /* Interval timer mask S/370*/ -#define CR0_XM_INTKEY 0x00000040 /* Interrupt key mask */ -#define CR0_XM_EXTSIG 0x00000020 /* External signal mask S/370*/ -#define CR0_XM_ETR 0x00000010 /* External timer mask */ -#define CR0_PC_FAST 0x00000008 /* PC fast control 390*/ -#define CR0_CRYPTO 0x00000004 /* Crypto control ESAME*/ +#define CR0_BMPX 0x80000000 /* Block multiplex ctl S/370*/ +#define CR0_SSM_SUPP 0x40000000 /* SSM suppression control */ +#define CR0_TOD_SYNC 0x20000000 /* TOD clock sync control */ +#define CR0_LOW_PROT 0x10000000 /* Low-address protection */ +#define CR0_EXT_AUTH 0x08000000 /* Extraction auth control */ +#define CR0_SEC_SPACE 0x04000000 /* Secondary space control */ +#define CR0_FETCH_OVRD 0x02000000 /* Fetch protection override */ +#define CR0_STORE_OVRD 0x01000000 /* Store protection override */ +#define CR0_STORKEY_4K 0x01000000 /* Storkey exception control */ +#define CR0_TRAN_FMT 0x00F80000 /* Translation format bits...*/ +#define CR0_TRAN_ESA390 0x00B00000 /* ...1M/4K ESA/390 format */ +#define CR0_PAGE_SIZE 0x00C00000 /* Page size for S/370... */ +#define CR0_PAGE_SZ_2K 0x00400000 /* ...2K pages */ +#define CR0_PAGE_SZ_4K 0x00800000 /* ...4K pages */ +#define CR0_SEG_SIZE 0x00380000 /* Segment size for S/370... */ +#define CR0_SEG_SZ_64K 0x00000000 /* ...64K segments */ +#define CR0_SEG_SZ_1M 0x00100000 /* ...1M segments */ +#define CR0_AFP 0x00040000 /* AFP register control */ +#define CR0_VOP 0x00020000 /* Vector control 390*/ +#define CR0_ASF 0x00010000 /* AS function control 390*/ +#define CR0_XM_MALFALT 0x00008000 /* Malfunction alert mask */ +#define CR0_XM_EMERSIG 0x00004000 /* Emergency signal mask */ +#define CR0_XM_EXTCALL 0x00002000 /* External call mask */ +#define CR0_XM_TODSYNC 0x00001000 /* TOD clock sync mask */ +#define CR0_XM_CLKC 0x00000800 /* Clock comparator mask */ +#define CR0_XM_PTIMER 0x00000400 /* CPU timer mask */ +#define CR0_XM_SERVSIG 0x00000200 /* Service signal mask */ +#define CR0_XM_ITIMER 0x00000080 /* Interval timer mask S/370*/ +#define CR0_XM_INTKEY 0x00000040 /* Interrupt key mask */ +#define CR0_XM_EXTSIG 0x00000020 /* External signal mask S/370*/ +#define CR0_XM_ETR 0x00000010 /* External timer mask */ +#define CR0_PC_FAST 0x00000008 /* PC fast control 390*/ +#define CR0_CRYPTO 0x00000004 /* Crypto control ESAME*/ #define SERVSIG_PEND 0x00000001 /* Event buffer pending */ #define SERVSIG_ADDR 0xFFFFFFF8 /* Parameter address */ @@ -179,24 +180,24 @@ typedef struct _TLBE { /* CR1 is the primary segment table descriptor or primary ASCE */ /* Bit definitions for control register 2 */ -#define CR2_DUCTO 0x7FFFFFC0 /* DUCT origin */ +#define CR2_DUCTO 0x7FFFFFC0 /* DUCT origin */ /* For S/370, CR2 contains channel masks for channels 0-31 */ /* Bit definitions for control register 3 */ -#define CR3_KEYMASK 0xFFFF0000 /* PSW key mask */ -#define CR3_SASN 0x0000FFFF /* Secondary ASN */ +#define CR3_KEYMASK 0xFFFF0000 /* PSW key mask */ +#define CR3_SASN 0x0000FFFF /* Secondary ASN */ /* Bit definitions for control register 4 */ -#define CR4_AX 0xFFFF0000 /* Authorization index */ -#define CR4_PASN 0x0000FFFF /* Primary ASN */ +#define CR4_AX 0xFFFF0000 /* Authorization index */ +#define CR4_PASN 0x0000FFFF /* Primary ASN */ /* Bit definitions for control register 5 */ - /* When CR0_ASF=0 (ESA/390): */ -#define CR5_SSLINK 0x80000000 /* Subsystem-Linkage control */ -#define CR5_LTO 0x7FFFFF80 /* Linkage-Table origin */ -#define CR5_LTL 0x0000007F /* Linkage-Table length */ - /* When CR0_ASF=1 or ESAME: */ -#define CR5_PASTEO 0x7FFFFFC0 /* Primary-ASTE origin */ + /* When CR0_ASF=0 (ESA/390): */ +#define CR5_SSLINK 0x80000000 /* Subsystem-Linkage control */ +#define CR5_LTO 0x7FFFFF80 /* Linkage-Table origin */ +#define CR5_LTL 0x0000007F /* Linkage-Table length */ + /* When CR0_ASF=1 or ESAME: */ +#define CR5_PASTEO 0x7FFFFFC0 /* Primary-ASTE origin */ /* Bit definitions for control register 6 */ /* CR6 is the I/O interruption subclass mask */ @@ -205,216 +206,216 @@ typedef struct _TLBE { /* CR7 is the secondary segment table descriptor or secondary ASCE */ /* Bit definitions for control register 8 */ -#define CR8_EAX 0xFFFF0000 /* Extended auth index */ -#define CR8_MCMASK 0x0000FFFF /* Monitor masks */ +#define CR8_EAX 0xFFFF0000 /* Extended auth index */ +#define CR8_MCMASK 0x0000FFFF /* Monitor masks */ /* Bit definitions for PER */ -#define CR9_SB 0x80000000 /* Successfull Branching */ -#define CR9_IF 0x40000000 /* Instruction Fetch */ -#define CR9_SA 0x20000000 /* Storage Alteration */ -#define CR9_GRA 0x10000000 /* General Register Alt. */ -#define CR9_STURA 0x08000000 /* Store using real addr */ -#define CR9_GRMASK 0x0000FFFF /* GR mask bits */ +#define CR9_SB 0x80000000 /* Successful Branching */ +#define CR9_IF 0x40000000 /* Instruction Fetch */ +#define CR9_SA 0x20000000 /* Storage Alteration */ +#define CR9_GRA 0x10000000 /* General Register Alt. */ +#define CR9_STURA 0x08000000 /* Store using real addr */ +#define CR9_GRMASK 0x0000FFFF /* GR mask bits */ #define CR9_BAC 0x00800000 /* Br addr control PER2 only */ #define CR9_SAC 0x00200000 /* Stor. alter. c. PER2 only */ /* Bit definitions for control register 12 */ -#define S_CR12_BRTRACE 0x80000000 /* Branch trace control */ +#define S_CR12_BRTRACE 0x80000000 /* Branch trace control */ #define Z_CR12_BRTRACE 0x8000000000000000ULL /* Branch trace control*/ #define CR12_MTRACE 0x4000000000000000ULL /* Mode trace control */ -#define S_CR12_TRACEEA 0x7FFFFFFC /* Trace entry address */ +#define S_CR12_TRACEEA 0x7FFFFFFC /* Trace entry address */ #define Z_CR12_TRACEEA 0x3FFFFFFFFFFFFFFCULL /* Trace entry address */ -#define CR12_ASNTRACE 0x00000002 /* ASN trace control */ -#define CR12_EXTRACE 0x00000001 /* Explicit trace control */ +#define CR12_ASNTRACE 0x00000002 /* ASN trace control */ +#define CR12_EXTRACE 0x00000001 /* Explicit trace control */ /* Bit definitions for control register 13 */ /* CR13 is the home segment table descriptor or home ASCE */ /* Bit definitions for control register 14 */ -#define CR14_CHKSTOP 0x80000000 /* Check-stop control S/370*/ -#define CR14_SYNCMCEL 0x40000000 /* Synchronous MCEL S/370*/ -#define CR14_IOEXTLOG 0x20000000 /* I/O extended logout S/370*/ -#define CR14_CHANRPT 0x10000000 /* Channel report mask */ -#define CR14_RCVYRPT 0x08000000 /* Recovery report mask */ -#define CR14_DGRDRPT 0x04000000 /* Degradation report mask */ -#define CR14_XDMGRPT 0x02000000 /* External damage mask */ -#define CR14_WARNING 0x01000000 /* Warning mask */ -#define CR14_ASYNMCEL 0x00800000 /* Asynchronous MCEL S/370*/ -#define CR14_ASYNFIXL 0x00400000 /* Asynch fixed log S/370*/ -#define CR14_TODCTLOV 0x00200000 /* TOD clock control override*/ -#define CR14_ASN_TRAN 0x00080000 /* ASN translation control */ -#define CR14_AFTO 0x0007FFFF /* ASN first table origin */ +#define CR14_CHKSTOP 0x80000000 /* Check-stop control S/370*/ +#define CR14_SYNCMCEL 0x40000000 /* Synchronous MCEL S/370*/ +#define CR14_IOEXTLOG 0x20000000 /* I/O extended logout S/370*/ +#define CR14_CHANRPT 0x10000000 /* Channel report mask */ +#define CR14_RCVYRPT 0x08000000 /* Recovery report mask */ +#define CR14_DGRDRPT 0x04000000 /* Degradation report mask */ +#define CR14_XDMGRPT 0x02000000 /* External damage mask */ +#define CR14_WARNING 0x01000000 /* Warning mask */ +#define CR14_ASYNMCEL 0x00800000 /* Asynchronous MCEL S/370*/ +#define CR14_ASYNFIXL 0x00400000 /* Asynch fixed log S/370*/ +#define CR14_TODCTLOV 0x00200000 /* TOD clock control override*/ +#define CR14_ASN_TRAN 0x00080000 /* ASN translation control */ +#define CR14_AFTO 0x0007FFFF /* ASN first table origin */ /* Bit definitions for control register 15 */ -#define CR15_LSEA_390 0x7FFFFFF8 /* Linkage stack address 390*/ +#define CR15_LSEA_390 0x7FFFFFF8 /* Linkage stack address 390*/ #define CR15_LSEA_900 0xFFFFFFFFFFFFFFF8ULL /* Linkage stack ESAME*/ -#define CR15_MCEL 0x00FFFFF8 /* MCEL address S/370*/ +#define CR15_MCEL 0x00FFFFF8 /* MCEL address S/370*/ /* Linkage table designation bit definitions */ -#define LTD_SSLINK 0x80000000 /* Subsystem-Linkage control */ -#define LTD_LTO 0x7FFFFF80 /* Linkage-Table origin */ -#define LTD_LTL 0x0000007F /* Linkage-Table length */ +#define LTD_SSLINK 0x80000000 /* Subsystem-Linkage control */ +#define LTD_LTO 0x7FFFFF80 /* Linkage-Table origin */ +#define LTD_LTL 0x0000007F /* Linkage-Table length */ /* Values for designation type and table type (ESAME mode) */ -#define TT_R1TABL 0xC /* Region first table */ -#define TT_R2TABL 0x8 /* Region second table */ -#define TT_R3TABL 0x4 /* Region third table */ -#define TT_SEGTAB 0x0 /* Segment table */ +#define TT_R1TABL 0xC /* Region first table */ +#define TT_R2TABL 0x8 /* Region second table */ +#define TT_R3TABL 0x4 /* Region third table */ +#define TT_SEGTAB 0x0 /* Segment table */ /* Address space control element bit definitions (ESAME mode) */ -#define ASCE_TO 0xFFFFFFFFFFFFF000ULL /* Table origin */ -#define ASCE_G 0x200 /* Subspace group indicator */ -#define ASCE_P 0x100 /* Private space indicator */ -#define ASCE_S 0x080 /* Storage alteration event */ -#define ASCE_X 0x040 /* Space switch event */ -#define ASCE_R 0x020 /* Real space */ -#define ASCE_DT 0x00C /* Designation type */ -#define ASCE_TL 0x003 /* Table length */ -#define ASCE_RESV 0xC10 /* Reserved bits - ignored */ +#define ASCE_TO 0xFFFFFFFFFFFFF000ULL /* Table origin */ +#define ASCE_G 0x200 /* Subspace group indicator */ +#define ASCE_P 0x100 /* Private space indicator */ +#define ASCE_S 0x080 /* Storage alteration event */ +#define ASCE_X 0x040 /* Space switch event */ +#define ASCE_R 0x020 /* Real space */ +#define ASCE_DT 0x00C /* Designation type */ +#define ASCE_TL 0x003 /* Table length */ +#define ASCE_RESV 0xC10 /* Reserved bits - ignored */ /* Region table entry bit definitions (ESAME mode) */ -#define REGTAB_TO 0xFFFFFFFFFFFFF000ULL /* Table origin */ -#define REGTAB_TF 0x0C0 /* Table offset */ -#define REGTAB_I 0x020 /* Region invalid */ -#define REGTAB_TT 0x00C /* Table type */ -#define REGTAB_TL 0x003 /* Table length */ -#define REGTAB_RESV 0xF10 /* Reserved bits - ignored */ +#define REGTAB_TO 0xFFFFFFFFFFFFF000ULL /* Table origin */ +#define REGTAB_TF 0x0C0 /* Table offset */ +#define REGTAB_I 0x020 /* Region invalid */ +#define REGTAB_TT 0x00C /* Table type */ +#define REGTAB_TL 0x003 /* Table length */ +#define REGTAB_RESV 0xF10 /* Reserved bits - ignored */ /* Segment table entry bit definitions (ESAME mode) */ -#define ZSEGTAB_PTO 0xFFFFFFFFFFFFF800ULL /* Page table origin */ -#define ZSEGTAB_P 0x200 /* Page protection bit */ -#define ZSEGTAB_I 0x020 /* Invalid segment */ -#define ZSEGTAB_C 0x010 /* Common segment */ -#define ZSEGTAB_TT 0x00C /* Table type */ -#define ZSEGTAB_RESV 0x5C3 /* Reserved bits - ignored */ +#define ZSEGTAB_PTO 0xFFFFFFFFFFFFF800ULL /* Page table origin */ +#define ZSEGTAB_P 0x200 /* Page protection bit */ +#define ZSEGTAB_I 0x020 /* Invalid segment */ +#define ZSEGTAB_C 0x010 /* Common segment */ +#define ZSEGTAB_TT 0x00C /* Table type */ +#define ZSEGTAB_RESV 0x5C3 /* Reserved bits - ignored */ /* Page table entry bit definitions (ESAME mode) */ #define ZPGETAB_PFRA 0xFFFFFFFFFFFFF000ULL /* Page frame real addr*/ -#define ZPGETAB_I 0x400 /* Invalid page */ -#define ZPGETAB_P 0x200 /* Protected page */ +#define ZPGETAB_I 0x400 /* Invalid page */ +#define ZPGETAB_P 0x200 /* Protected page */ #define ZPGETAB_ESVALID 0x100 /* Valid in expanded storage */ #define ZPGETAB_ESREF 0x080 /* ES Referenced */ #define ZPGETAB_ESCHA 0x040 /* ES Changed */ #define ZPGETAB_ESLCK 0x020 /* ES Locked */ -#define ZPGETAB_RESV 0x900 /* Reserved bits - must be 0 */ +#define ZPGETAB_RESV 0x900 /* Reserved bits - must be 0 */ /* Segment table designation bit definitions (ESA/390 mode) */ -#define STD_SSEVENT 0x80000000 /* Space switch event */ -#define STD_STO 0x7FFFF000 /* Segment table origin */ -#define STD_RESV 0x00000C00 /* Reserved bits - must be 0 */ -#define STD_GROUP 0x00000200 /* Subspace group indicator */ -#define STD_PRIVATE 0x00000100 /* Private space indicator */ -#define STD_SAEVENT 0x00000080 /* Storage alteration event */ -#define STD_STL 0x0000007F /* Segment table length */ +#define STD_SSEVENT 0x80000000 /* Space switch event */ +#define STD_STO 0x7FFFF000 /* Segment table origin */ +#define STD_RESV 0x00000C00 /* Reserved bits - must be 0 */ +#define STD_GROUP 0x00000200 /* Subspace group indicator */ +#define STD_PRIVATE 0x00000100 /* Private space indicator */ +#define STD_SAEVENT 0x00000080 /* Storage alteration event */ +#define STD_STL 0x0000007F /* Segment table length */ /* Segment table entry bit definitions (ESA/390 mode) */ -#define SEGTAB_PTO 0x7FFFFFC0 /* Page table origin */ -#define SEGTAB_INVALID 0x00000020 /* Invalid segment */ -#define SEGTAB_COMMON 0x00000010 /* Common segment */ -#define SEGTAB_PTL 0x0000000F /* Page table length */ -#define SEGTAB_RESV 0x80000000 /* Reserved bits - must be 0 */ +#define SEGTAB_PTO 0x7FFFFFC0 /* Page table origin */ +#define SEGTAB_INVALID 0x00000020 /* Invalid segment */ +#define SEGTAB_COMMON 0x00000010 /* Common segment */ +#define SEGTAB_PTL 0x0000000F /* Page table length */ +#define SEGTAB_RESV 0x80000000 /* Reserved bits - must be 0 */ /* Page table entry bit definitions (ESA/390 mode) */ -#define PAGETAB_PFRA 0x7FFFF000 /* Page frame real address */ +#define PAGETAB_PFRA 0x7FFFF000 /* Page frame real address */ #define PAGETAB_ESNK 0x00000800 /* ES NK bit */ -#define PAGETAB_INVALID 0x00000400 /* Invalid page */ -#define PAGETAB_PROT 0x00000200 /* Protected page */ -#define PAGETAB_ESVALID 0x00000100 /* Valid in expanded storage */ +#define PAGETAB_INVALID 0x00000400 /* Invalid page */ +#define PAGETAB_PROT 0x00000200 /* Protected page */ +#define PAGETAB_ESVALID 0x00000100 /* Valid in expanded storage */ #define PAGETAB_ESREF 0x00000004 /* ES Referenced */ #define PAGETAB_ESCHA 0x00000002 /* ES Changed */ -#define PAGETAB_PGLOCK 0x00000001 /* Page lock (LKPG) */ -#define PAGETAB_RESV 0x80000900 /* Reserved bits - must be 0 */ +#define PAGETAB_PGLOCK 0x00000001 /* Page lock (LKPG) */ +#define PAGETAB_RESV 0x80000900 /* Reserved bits - must be 0 */ /* Segment table designation bit definitions (S/370 mode) */ -#define STD_370_STL 0xFF000000 /* 370 segment table length */ -#define STD_370_STO 0x00FFFFC0 /* 370 segment table origin */ -#define STD_370_SSEVENT 0x00000001 /* 370 space switch event */ +#define STD_370_STL 0xFF000000 /* 370 segment table length */ +#define STD_370_STO 0x00FFFFC0 /* 370 segment table origin */ +#define STD_370_SSEVENT 0x00000001 /* 370 space switch event */ /* Segment table entry bit definitions (S/370 mode) */ -#define SEGTAB_370_PTL 0xF0000000 /* Page table length */ -#define SEGTAB_370_PTO 0x00FFFFF8 /* Page table origin */ -#define SEGTAB_370_PROT 0x00000004 /* Protected segment */ -#define SEGTAB_370_CMN 0x00000002 /* Common segment */ -#define SEGTAB_370_INVL 0x00000001 /* Invalid segment */ -#define SEGTAB_370_RSV 0x0F000000 /* Reserved bits - must be 0 */ +#define SEGTAB_370_PTL 0xF0000000 /* Page table length */ +#define SEGTAB_370_PTO 0x00FFFFF8 /* Page table origin */ +#define SEGTAB_370_PROT 0x00000004 /* Protected segment */ +#define SEGTAB_370_CMN 0x00000002 /* Common segment */ +#define SEGTAB_370_INVL 0x00000001 /* Invalid segment */ +#define SEGTAB_370_RSV 0x0F000000 /* Reserved bits - must be 0 */ /* Page table entry bit definitions (S/370 mode) */ -#define PAGETAB_PFRA_4K 0xFFF0 /* Page frame real address */ -#define PAGETAB_INV_4K 0x0008 /* Invalid page */ -#define PAGETAB_EA_4K 0x0006 /* Extended physical address */ -#define PAGETAB_PFRA_2K 0xFFF8 /* Page frame real address */ -#define PAGETAB_INV_2K 0x0004 /* Invalid page */ -#define PAGETAB_RSV_2K 0x0002 /* Reserved bit - must be 0 */ +#define PAGETAB_PFRA_4K 0xFFF0 /* Page frame real address */ +#define PAGETAB_INV_4K 0x0008 /* Invalid page */ +#define PAGETAB_EA_4K 0x0006 /* Extended physical address */ +#define PAGETAB_PFRA_2K 0xFFF8 /* Page frame real address */ +#define PAGETAB_INV_2K 0x0004 /* Invalid page */ +#define PAGETAB_RSV_2K 0x0002 /* Reserved bit - must be 0 */ /* Access-list entry token special value definitions */ -#define ALET_PRIMARY 0 /* Primary address-space */ -#define ALET_SECONDARY 1 /* Secondary address-space */ -#define ALET_HOME 2 /* Home address-space */ +#define ALET_PRIMARY 0 /* Primary address-space */ +#define ALET_SECONDARY 1 /* Secondary address-space */ +#define ALET_HOME 2 /* Home address-space */ /* Access-list entry token bit definitions */ -#define ALET_RESV 0xFE000000 /* Reserved bits - must be 0 */ -#define ALET_PRI_LIST 0x01000000 /* Primary space access-list */ -#define ALET_ALESN 0x00FF0000 /* ALE sequence number */ -#define ALET_ALEN 0x0000FFFF /* Access-list entry number */ +#define ALET_RESV 0xFE000000 /* Reserved bits - must be 0 */ +#define ALET_PRI_LIST 0x01000000 /* Primary space access-list */ +#define ALET_ALESN 0x00FF0000 /* ALE sequence number */ +#define ALET_ALEN 0x0000FFFF /* Access-list entry number */ /* Access-list designation bit definitions */ #if FEATURE_ALD_FORMAT == 0 || defined(_900) -#define ALD_ALO 0x7FFFFF80 /* Access-list origin (fmt0) */ -#define ALD_ALL 0x0000007F /* Access-list length (fmt0) */ -#define ALD_ALL_SHIFT 3 /* Length units are 2**3 */ +#define ALD_ALO 0x7FFFFF80 /* Access-list origin (fmt0) */ +#define ALD_ALL 0x0000007F /* Access-list length (fmt0) */ +#define ALD_ALL_SHIFT 3 /* Length units are 2**3 */ #else -#define ALD_ALO 0x7FFFFF00 /* Access-list origin (fmt1) */ -#define ALD_ALL 0x000000FF /* Access-list length (fmt1) */ -#define ALD_ALL_SHIFT 4 /* Length units are 2**4 */ +#define ALD_ALO 0x7FFFFF00 /* Access-list origin (fmt1) */ +#define ALD_ALL 0x000000FF /* Access-list length (fmt1) */ +#define ALD_ALL_SHIFT 4 /* Length units are 2**4 */ #endif /* Access-list entry bit definitions */ -#define ALE0_INVALID 0x80000000 /* ALEN invalid */ -#define ALE0_FETCHONLY 0x02000000 /* Fetch only address space */ -#define ALE0_PRIVATE 0x01000000 /* Private address space */ -#define ALE0_ALESN 0x00FF0000 /* ALE sequence number */ -#define ALE0_ALEAX 0x0000FFFF /* ALE authorization index */ -#define ALE2_ASTE 0x7FFFFFC0 /* ASTE address */ -#define ALE3_ASTESN 0xFFFFFFFF /* ASTE sequence number */ +#define ALE0_INVALID 0x80000000 /* ALEN invalid */ +#define ALE0_FETCHONLY 0x02000000 /* Fetch only address space */ +#define ALE0_PRIVATE 0x01000000 /* Private address space */ +#define ALE0_ALESN 0x00FF0000 /* ALE sequence number */ +#define ALE0_ALEAX 0x0000FFFF /* ALE authorization index */ +#define ALE2_ASTE 0x7FFFFFC0 /* ASTE address */ +#define ALE3_ASTESN 0xFFFFFFFF /* ASTE sequence number */ /* Address-space number (ASN) bit definitions */ -#define ASN_AFX 0xFFC0 /* ASN first table index */ -#define ASN_ASX 0x003F /* ASN second table index */ +#define ASN_AFX 0xFFC0 /* ASN first table index */ +#define ASN_ASX 0x003F /* ASN second table index */ /* ASN first table entry bit definitions */ -#define AFTE_INVALID 0x80000000 /* ASN invalid */ -#define AFTE_ASTO_0 0x7FFFFFF0 /* ASTE origin (CR0_ASF=0) */ -#define AFTE_RESV_0 0x0000000F /* Reserved bits (CR0_ASF=0) */ -#define AFTE_ASTO_1 0x7FFFFFC0 /* ASTE origin (CR0_ASF=1) */ -#define AFTE_RESV_1 0x0000003F /* Reserved bits (CR0_ASF=1) */ +#define AFTE_INVALID 0x80000000 /* ASN invalid */ +#define AFTE_ASTO_0 0x7FFFFFF0 /* ASTE origin (CR0_ASF=0) */ +#define AFTE_RESV_0 0x0000000F /* Reserved bits (CR0_ASF=0) */ +#define AFTE_ASTO_1 0x7FFFFFC0 /* ASTE origin (CR0_ASF=1) */ +#define AFTE_RESV_1 0x0000003F /* Reserved bits (CR0_ASF=1) */ /* ASN second table entry bit definitions */ -#define ASTE0_INVALID 0x80000000 /* ASX invalid */ -#define ASTE0_ATO 0x7FFFFFFC /* Authority-table origin */ -#define ASTE0_RESV 0x00000002 /* Reserved bits - must be 0 */ -#define ASTE0_BASE 0x00000001 /* Base space of group */ -#define ASTE1_AX 0xFFFF0000 /* Authorization index */ -#define ASTE1_ATL 0x0000FFF0 /* Authority-table length */ -#define ASTE1_RESV 0x0000000F /* Reserved bits - must be 0 */ +#define ASTE0_INVALID 0x80000000 /* ASX invalid */ +#define ASTE0_ATO 0x7FFFFFFC /* Authority-table origin */ +#define ASTE0_RESV 0x00000002 /* Reserved bits - must be 0 */ +#define ASTE0_BASE 0x00000001 /* Base space of group */ +#define ASTE1_AX 0xFFFF0000 /* Authorization index */ +#define ASTE1_ATL 0x0000FFF0 /* Authority-table length */ +#define ASTE1_RESV 0x0000000F /* Reserved bits - must be 0 */ /* ASTE word 2 is the segment table designation for ESA/390 */ /* ASTE word 3 is the linkage-table designation for ESA/390 */ /* ASTE words 2 and 3 are the ASCE (RTD, STD, or RSD) for ESAME */ /* ASTE word 4 is the access-list designation */ -#define ASTE5_ASTESN 0xFFFFFFFF /* ASTE sequence number */ -#define ASTE6_RESV 0xFFFFFFFF /* Must be zero for ESA/390 */ +#define ASTE5_ASTESN 0xFFFFFFFF /* ASTE sequence number */ +#define ASTE6_RESV 0xFFFFFFFF /* Must be zero for ESA/390 */ /* ASTE word 6 is the linkage-table designation for ESAME */ /* ASTE word 7 is unused */ /* Authority table entry bit definitions */ -#define ATE_PRIMARY 0x80 /* Primary authority bit */ -#define ATE_SECONDARY 0x40 /* Secondary authority bit */ +#define ATE_PRIMARY 0x80 /* Primary authority bit */ +#define ATE_SECONDARY 0x40 /* Secondary authority bit */ /* Dispatchable unit control table bit definitions */ -#define DUCT0_BASTEO 0x7FFFFFC0 /* Base ASTE origin */ -#define DUCT1_SA 0x80000000 /* Subspace active */ -#define DUCT1_SSASTEO 0x7FFFFFC0 /* Subspace ASTE origin */ +#define DUCT0_BASTEO 0x7FFFFFC0 /* Base ASTE origin */ +#define DUCT1_SA 0x80000000 /* Subspace active */ +#define DUCT1_SSASTEO 0x7FFFFFC0 /* Subspace ASTE origin */ /* DUCT word 2 is unused */ -#define DUCT3_SSASTESN 0xFFFFFFFF /* Subspace ASTE seq number */ +#define DUCT3_SSASTESN 0xFFFFFFFF /* Subspace ASTE seq number */ /* DUCT word 4 is the access-list designation */ /* DUCT word 5 is unused for ESA/390 */ /* DUCT word 5 contains PKM/KEY/RA/PROB for ESAME */ @@ -425,8 +426,8 @@ typedef struct _TLBE { /* DUCT word 8 contains AM31/IA31 for ESA/390 */ /* DUCT word 9 contains PKM/KEY/RA/PROB for ESA/390 */ /* DUCT word 10 is unused */ -#define DUCT11_TCBA 0x7FFFFFF8 /* Trap control block address*/ -#define DUCT11_TE 0x00000001 /* Trap enabled */ +#define DUCT11_TCBA 0x7FFFFFF8 /* Trap control block address*/ +#define DUCT11_TE 0x00000001 /* Trap enabled */ /* DUCT word 12 is unused */ /* DUCT word 13 is unused */ /* DUCT word 14 is unused */ @@ -448,218 +449,218 @@ typedef struct _TLBE { /* Linkage stack entry descriptor structure definition */ typedef struct _LSED { - BYTE uet; /* U-bit and entry type */ - BYTE si; /* Section identification */ - HWORD rfs; /* Remaining free space */ - HWORD nes; /* Next entry size */ - HWORD resv; /* Reserved bits - must be 0 */ + BYTE uet; /* U-bit and entry type */ + BYTE si; /* Section identification */ + HWORD rfs; /* Remaining free space */ + HWORD nes; /* Next entry size */ + HWORD resv; /* Reserved bits - must be 0 */ } LSED; -/* Stack type definitions */ -#define LSED_UET_U 0x80 /* Unstack suppression bit */ -#define LSED_UET_ET 0x7F /* Entry type... */ +/* Stack type definitions */ +#define LSED_UET_U 0x80 /* Unstack suppression bit */ +#define LSED_UET_ET 0x7F /* Entry type... */ -#define S_LSED_UET_HDR 0x01 /* ...header entry */ -#define S_LSED_UET_TLR 0x02 /* ...trailer entry */ -#define S_LSED_UET_BAKR 0x04 /* ...branch state entry */ -#define S_LSED_UET_PC 0x05 /* ...call state entry */ +#define S_LSED_UET_HDR 0x01 /* ...header entry */ +#define S_LSED_UET_TLR 0x02 /* ...trailer entry */ +#define S_LSED_UET_BAKR 0x04 /* ...branch state entry */ +#define S_LSED_UET_PC 0x05 /* ...call state entry */ -#define Z_LSED_UET_HDR 0x09 /* ...header entry */ -#define Z_LSED_UET_TLR 0x0A /* ...trailer entry */ -#define Z_LSED_UET_BAKR 0x0C /* ...branch state entry */ -#define Z_LSED_UET_PC 0x0D /* ...call state entry */ +#define Z_LSED_UET_HDR 0x09 /* ...header entry */ +#define Z_LSED_UET_TLR 0x0A /* ...trailer entry */ +#define Z_LSED_UET_BAKR 0x0C /* ...branch state entry */ +#define Z_LSED_UET_PC 0x0D /* ...call state entry */ /* Program call number bit definitions */ -#define PC_LX 0x000FFF00 /* Linkage index */ -#define PC_EX 0x000000FF /* Entry index */ +#define PC_LX 0x000FFF00 /* Linkage index */ +#define PC_EX 0x000000FF /* Entry index */ /* Linkage table entry bit definitions */ -#define LTE_INVALID 0x80000000 /* LX invalid */ -#define LTE_ETO 0x7FFFFFC0 /* Entry table origin */ -#define LTE_ETL 0x0000003F /* Entry table length */ +#define LTE_INVALID 0x80000000 /* LX invalid */ +#define LTE_ETO 0x7FFFFFC0 /* Entry table origin */ +#define LTE_ETL 0x0000003F /* Entry table length */ /* Entry table bit entry definitions */ /* ETE word 0 is the left half of the EIA for ESAME if ETE4_G is set */ -#define ETE0_AKM 0xFFFF0000 /* Authorization key mask 390*/ -#define ETE0_ASN 0x0000FFFF /* Address space number 390*/ -#define ETE1_AMODE 0x80000000 /* Addressing mode */ -#define ETE1_EIA 0x7FFFFFFE /* Instruction address */ -#define ETE1_PROB 0x00000001 /* Problem state bit */ +#define ETE0_AKM 0xFFFF0000 /* Authorization key mask 390*/ +#define ETE0_ASN 0x0000FFFF /* Address space number 390*/ +#define ETE1_AMODE 0x80000000 /* Addressing mode */ +#define ETE1_EIA 0x7FFFFFFE /* Instruction address */ +#define ETE1_PROB 0x00000001 /* Problem state bit */ /* ETE word 2 is the entry parameter for ESA/390 */ -#define ETE2_AKM 0xFFFF0000 /* Auth.key mask ESAME*/ -#define ETE2_ASN 0x0000FFFF /* Address space number ESAME*/ -#define ETE3_EKM 0xFFFF0000 /* Entry key mask */ -#define ETE4_T 0x80000000 /* 0=Basic PC, 1=Stacking PC */ -#define ETE4_G 0x40000000 /* 1=64-bit EIA/EPARM ESAME*/ -#define ETE4_K 0x10000000 /* 1=Replace PSW key by EK */ -#define ETE4_M 0x08000000 /* 1=Replace PKM by EKM, 0=or*/ -#define ETE4_E 0x04000000 /* 1=Replace EAX by EEAX */ -#define ETE4_C 0x02000000 /* 0=Primary mode, 1=AR mode */ -#define ETE4_S 0x01000000 /* SASN:0=old PASN,1=new PASN*/ -#define ETE4_EK 0x00F00000 /* Entry key */ -#define ETE4_EEAX 0x0000FFFF /* Entry extended AX */ -#define ETE5_ASTE 0x7FFFFFC0 /* ASTE address */ +#define ETE2_AKM 0xFFFF0000 /* Auth.key mask ESAME*/ +#define ETE2_ASN 0x0000FFFF /* Address space number ESAME*/ +#define ETE3_EKM 0xFFFF0000 /* Entry key mask */ +#define ETE4_T 0x80000000 /* 0=Basic PC, 1=Stacking PC */ +#define ETE4_G 0x40000000 /* 1=64-bit EIA/EPARM ESAME*/ +#define ETE4_K 0x10000000 /* 1=Replace PSW key by EK */ +#define ETE4_M 0x08000000 /* 1=Replace PKM by EKM, 0=or*/ +#define ETE4_E 0x04000000 /* 1=Replace EAX by EEAX */ +#define ETE4_C 0x02000000 /* 0=Primary mode, 1=AR mode */ +#define ETE4_S 0x01000000 /* SASN:0=old PASN,1=new PASN*/ +#define ETE4_EK 0x00F00000 /* Entry key */ +#define ETE4_EEAX 0x0000FFFF /* Entry extended AX */ +#define ETE5_ASTE 0x7FFFFFC0 /* ASTE address */ /* ETE words 6 and 7 are unused for ESA/390 */ /* ETE words 6 and 7 are the entry parameter for ESAME */ /* SIGP order codes */ -#define SIGP_SENSE 0x01 /* Sense */ -#define SIGP_EXTCALL 0x02 /* External call */ -#define SIGP_EMERGENCY 0x03 /* Emergency signal */ +#define SIGP_SENSE 0x01 /* Sense */ +#define SIGP_EXTCALL 0x02 /* External call */ +#define SIGP_EMERGENCY 0x03 /* Emergency signal */ #define LOG_SIGPORDER 0x03 -#define SIGP_START 0x04 /* Start */ -#define SIGP_STOP 0x05 /* Stop */ -#define SIGP_RESTART 0x06 /* Restart */ -#define SIGP_IPR 0x07 /* Initial program reset 370 */ -#define SIGP_PR 0x08 /* Program reset 370 */ -#define SIGP_STOPSTORE 0x09 /* Stop and store status */ -#define SIGP_IMPL 0x0A /* Initial uprogram load 370 */ -#define SIGP_INITRESET 0x0B /* Initial CPU reset */ -#define SIGP_RESET 0x0C /* CPU reset */ -#define SIGP_SETPREFIX 0x0D /* Set prefix */ -#define SIGP_STORE 0x0E /* Store status at address */ -#define SIGP_STOREX 0x11 /* Store ext status at addr */ -#define SIGP_SETARCH 0x12 /* Set architecture mode */ +#define SIGP_START 0x04 /* Start */ +#define SIGP_STOP 0x05 /* Stop */ +#define SIGP_RESTART 0x06 /* Restart */ +#define SIGP_IPR 0x07 /* Initial program reset 370 */ +#define SIGP_PR 0x08 /* Program reset 370 */ +#define SIGP_STOPSTORE 0x09 /* Stop and store status */ +#define SIGP_IMPL 0x0A /* Initial uprogram load 370 */ +#define SIGP_INITRESET 0x0B /* Initial CPU reset */ +#define SIGP_RESET 0x0C /* CPU reset */ +#define SIGP_SETPREFIX 0x0D /* Set prefix */ +#define SIGP_STORE 0x0E /* Store status at address */ +#define SIGP_STOREX 0x11 /* Store ext status at addr */ +#define SIGP_SETARCH 0x12 /* Set architecture mode */ #define MAX_SIGPORDER 0x12 /* SIGP status codes */ -#define SIGP_STATUS_EQUIPMENT_CHECK 0x80000000 -#define SIGP_STATUS_INCORRECT_STATE 0x00000200 -#define SIGP_STATUS_INVALID_PARAMETER 0x00000100 -#define SIGP_STATUS_EXTERNAL_CALL_PENDING 0x00000080 -#define SIGP_STATUS_STOPPED 0x00000040 -#define SIGP_STATUS_OPERATOR_INTERVENING 0x00000020 -#define SIGP_STATUS_CHECK_STOP 0x00000010 -#define SIGP_STATUS_INOPERATIVE 0x00000004 -#define SIGP_STATUS_INVALID_ORDER 0x00000002 -#define SIGP_STATUS_RECEIVER_CHECK 0x00000001 +#define SIGP_STATUS_EQUIPMENT_CHECK 0x80000000 +#define SIGP_STATUS_INCORRECT_STATE 0x00000200 +#define SIGP_STATUS_INVALID_PARAMETER 0x00000100 +#define SIGP_STATUS_EXTERNAL_CALL_PENDING 0x00000080 +#define SIGP_STATUS_STOPPED 0x00000040 +#define SIGP_STATUS_OPERATOR_INTERVENING 0x00000020 +#define SIGP_STATUS_CHECK_STOP 0x00000010 +#define SIGP_STATUS_INOPERATIVE 0x00000004 +#define SIGP_STATUS_INVALID_ORDER 0x00000002 +#define SIGP_STATUS_RECEIVER_CHECK 0x00000001 /* Storage key bit definitions */ -#define STORKEY_KEY 0xF0 /* Storage key */ -#define STORKEY_FETCH 0x08 /* Fetch protect bit */ -#define STORKEY_REF 0x04 /* Reference bit */ -#define STORKEY_CHANGE 0x02 /* Change bit */ -#define STORKEY_BADFRM 0x01 /* Unusable frame */ +#define STORKEY_KEY 0xF0 /* Storage key */ +#define STORKEY_FETCH 0x08 /* Fetch protect bit */ +#define STORKEY_REF 0x04 /* Reference bit */ +#define STORKEY_CHANGE 0x02 /* Change bit */ +#define STORKEY_BADFRM 0x01 /* Unusable frame */ /* Prefixed storage area structure definition */ -typedef struct _PSA_3XX { /* Prefixed storage area */ -/*000*/ DWORD iplpsw; /* IPL PSW, Restart new PSW */ -/*008*/ DWORD iplccw1; /* IPL CCW1, Restart old PSW */ -/*010*/ DWORD iplccw2; /* IPL CCW2 */ -/*018*/ DWORD extold; /* External old PSW */ -/*020*/ DWORD svcold; /* SVC old PSW */ -/*028*/ DWORD pgmold; /* Program check old PSW */ -/*030*/ DWORD mckold; /* Machine check old PSW */ -/*038*/ DWORD iopold; /* I/O old PSW */ -/*040*/ DWORD csw; /* Channel status word (S370)*/ -/*048*/ FWORD caw; /* Channel address word(S370)*/ -/*04C*/ FWORD resv04C; /* Reserved */ -/*050*/ FWORD inttimer; /* Interval timer */ -/*054*/ FWORD resv054; /* Reserved */ -/*058*/ DWORD extnew; /* External new PSW */ -/*060*/ DWORD svcnew; /* SVC new PSW */ -/*068*/ DWORD pgmnew; /* Program check new PSW */ -/*070*/ DWORD mcknew; /* Machine check new PSW */ -/*078*/ DWORD iopnew; /* I/O new PSW */ -/*080*/ FWORD extparm; /* External interrupt param */ -/*084*/ HWORD extcpad; /* External interrupt CPU# */ -/*086*/ HWORD extint; /* External interrupt code */ -/*088*/ FWORD svcint; /* SVC interrupt code */ -/*08C*/ FWORD pgmint; /* Program interrupt code */ -/*090*/ FWORD tea; /* Translation exception addr*/ -/*094*/ HWORD monclass; /* Monitor class */ -/*096*/ HWORD perint; /* PER interrupt code */ -/*098*/ FWORD peradr; /* PER address */ -/*09C*/ FWORD moncode; /* Monitor code */ -/*0A0*/ BYTE excarid; /* Exception access id */ -/*0A1*/ BYTE perarid; /* PER access id */ -/*0A2*/ BYTE opndrid; /* Operand access id */ -/*0A3*/ BYTE arch; /* Architecture mode ID */ -/*0A4*/ FWORD resv0A4; /* Reserved */ -/*0A8*/ FWORD chanid; /* Channel id (S370) */ -/*0AC*/ FWORD ioelptr; /* I/O extended logout (S370)*/ -/*0B0*/ FWORD lcl; /* Limited chan logout (S370)*/ -/*0B4*/ FWORD resv0B0; /* Reserved */ -/*0B8*/ FWORD ioid; /* I/O interrupt device id */ -/*0BC*/ FWORD ioparm; /* I/O interrupt parameter */ -/*0C0*/ FWORD iointid; /* I/O interrupt ID */ -/*0C4*/ FWORD resv0C4; /* Reserved */ -/*0C8*/ FWORD stfl; /* Facilities list (STFL) */ -/*0CC*/ FWORD resv0CC; /* Reserved */ -/*0D0*/ DWORD resv0D0; /* Reserved */ -/*0D8*/ DWORD storeptmr; /* CPU timer save area */ -/*0E0*/ DWORD storeclkc; /* Clock comparator save area*/ -/*0E8*/ DWORD mckint; /* Machine check int code */ -/*0F0*/ FWORD resv0F0; /* Reserved */ -/*0F4*/ FWORD xdmgcode; /* External damage code */ -/*0F8*/ FWORD mcstorad; /* Failing storage address */ -/*0FC*/ FWORD resv0FC; /* Reserved */ -/*100*/ DWORD storepsw; /* Store status PSW save area*/ -/*108*/ FWORD storepfx; /* Prefix register save area */ -/*10C*/ FWORD resv10C; /* Reserved */ -/*110*/ DWORD resv110; /* Reserved */ -/*118*/ DWORD resv118; /* Reserved */ -/*120*/ FWORD storear[16]; /* Access register save area */ -/*160*/ FWORD storefpr[8]; /* FP register save area */ -/*180*/ FWORD storegpr[16]; /* General register save area*/ -/*1C0*/ FWORD storecr[16]; /* Control register save area*/ +typedef struct _PSA_3XX { /* Prefixed storage area */ +/*000*/ DWORD iplpsw; /* IPL PSW, Restart new PSW */ +/*008*/ DWORD iplccw1; /* IPL CCW1, Restart old PSW */ +/*010*/ DWORD iplccw2; /* IPL CCW2 */ +/*018*/ DWORD extold; /* External old PSW */ +/*020*/ DWORD svcold; /* SVC old PSW */ +/*028*/ DWORD pgmold; /* Program check old PSW */ +/*030*/ DWORD mckold; /* Machine check old PSW */ +/*038*/ DWORD iopold; /* I/O old PSW */ +/*040*/ DWORD csw; /* Channel status word (S370)*/ +/*048*/ FWORD caw; /* Channel address word(S370)*/ +/*04C*/ FWORD resv04C; /* Reserved */ +/*050*/ FWORD inttimer; /* Interval timer */ +/*054*/ FWORD resv054; /* Reserved */ +/*058*/ DWORD extnew; /* External new PSW */ +/*060*/ DWORD svcnew; /* SVC new PSW */ +/*068*/ DWORD pgmnew; /* Program check new PSW */ +/*070*/ DWORD mcknew; /* Machine check new PSW */ +/*078*/ DWORD iopnew; /* I/O new PSW */ +/*080*/ FWORD extparm; /* External interrupt param */ +/*084*/ HWORD extcpad; /* External interrupt CPU# */ +/*086*/ HWORD extint; /* External interrupt code */ +/*088*/ FWORD svcint; /* SVC interrupt code */ +/*08C*/ FWORD pgmint; /* Program interrupt code */ +/*090*/ FWORD tea; /* Translation exception addr*/ +/*094*/ HWORD monclass; /* Monitor class */ +/*096*/ HWORD perint; /* PER interrupt code */ +/*098*/ FWORD peradr; /* PER address */ +/*09C*/ FWORD moncode; /* Monitor code */ +/*0A0*/ BYTE excarid; /* Exception access id */ +/*0A1*/ BYTE perarid; /* PER access id */ +/*0A2*/ BYTE opndrid; /* Operand access id */ +/*0A3*/ BYTE arch; /* Architecture mode ID */ +/*0A4*/ FWORD resv0A4; /* Reserved */ +/*0A8*/ FWORD chanid; /* Channel id (S370) */ +/*0AC*/ FWORD ioelptr; /* I/O extended logout (S370)*/ +/*0B0*/ FWORD lcl; /* Limited chan logout (S370)*/ +/*0B4*/ FWORD resv0B0; /* Reserved */ +/*0B8*/ FWORD ioid; /* I/O interrupt device id */ +/*0BC*/ FWORD ioparm; /* I/O interrupt parameter */ +/*0C0*/ FWORD iointid; /* I/O interrupt ID */ +/*0C4*/ FWORD resv0C4; /* Reserved */ +/*0C8*/ FWORD stfl; /* Facilities list (STFL) */ +/*0CC*/ FWORD resv0CC; /* Reserved */ +/*0D0*/ DWORD resv0D0; /* Reserved */ +/*0D8*/ DWORD storeptmr; /* CPU timer save area */ +/*0E0*/ DWORD storeclkc; /* Clock comparator save area*/ +/*0E8*/ DWORD mckint; /* Machine check int code */ +/*0F0*/ FWORD resv0F0; /* Reserved */ +/*0F4*/ FWORD xdmgcode; /* External damage code */ +/*0F8*/ FWORD mcstorad; /* Failing storage address */ +/*0FC*/ FWORD resv0FC; /* Reserved */ +/*100*/ DWORD storepsw; /* Store status PSW save area*/ +/*108*/ FWORD storepfx; /* Prefix register save area */ +/*10C*/ FWORD resv10C; /* Reserved */ +/*110*/ DWORD resv110; /* Reserved */ +/*118*/ DWORD resv118; /* Reserved */ +/*120*/ FWORD storear[16]; /* Access register save area */ +/*160*/ FWORD storefpr[8]; /* FP register save area */ +/*180*/ FWORD storegpr[16]; /* General register save area*/ +/*1C0*/ FWORD storecr[16]; /* Control register save area*/ } PSA_3XX; /* ESAME Prefixed storage area structure definition */ -typedef struct _PSA_900 { /* Prefixed storage area */ -/*0000*/ DWORD iplpsw; /* IPL PSW */ -/*0008*/ DWORD iplccw1; /* IPL CCW1 */ -/*0010*/ DWORD iplccw2; /* IPL CCW2 */ +typedef struct _PSA_900 { /* Prefixed storage area */ +/*0000*/ DWORD iplpsw; /* IPL PSW */ +/*0008*/ DWORD iplccw1; /* IPL CCW1 */ +/*0010*/ DWORD iplccw2; /* IPL CCW2 */ /*0018*/ BYTE resv0018[104]; /* Reserved */ -/*0080*/ FWORD extparm; /* External interrupt param */ -/*0084*/ HWORD extcpad; /* External interrupt CPU# */ -/*0086*/ HWORD extint; /* External interrupt code */ -/*0088*/ FWORD svcint; /* SVC interrupt code */ -/*008C*/ FWORD pgmint; /* Program interrupt code */ -/*0090*/ FWORD dataexc; /* Data exception code */ -/*0094*/ HWORD monclass; /* Monitor class */ -/*0096*/ HWORD perint; /* PER interrupt code */ -/*0098*/ DWORD peradr; /* PER address */ -/*00A0*/ BYTE excarid; /* Exception access id */ -/*00A1*/ BYTE perarid; /* PER access id */ -/*00A2*/ BYTE opndrid; /* Operand access id */ -/*00A3*/ BYTE arch; /* Architecture mode ID */ -/*00A4*/ FWORD mpladdr; /* MPL addr */ -/*00A8*/ DWORD_U tea; /* Translation exception addr*/ +/*0080*/ FWORD extparm; /* External interrupt param */ +/*0084*/ HWORD extcpad; /* External interrupt CPU# */ +/*0086*/ HWORD extint; /* External interrupt code */ +/*0088*/ FWORD svcint; /* SVC interrupt code */ +/*008C*/ FWORD pgmint; /* Program interrupt code */ +/*0090*/ FWORD dataexc; /* Data exception code */ +/*0094*/ HWORD monclass; /* Monitor class */ +/*0096*/ HWORD perint; /* PER interrupt code */ +/*0098*/ DWORD peradr; /* PER address */ +/*00A0*/ BYTE excarid; /* Exception access id */ +/*00A1*/ BYTE perarid; /* PER access id */ +/*00A2*/ BYTE opndrid; /* Operand access id */ +/*00A3*/ BYTE arch; /* Architecture mode ID */ +/*00A4*/ FWORD mpladdr; /* MPL addr */ +/*00A8*/ DWORD_U tea; /* Translation exception addr*/ #define TEA_G tea.D #define TEA_L tea.F.L.F #define TEA_H tea.F.H.F -/*00B0*/ DWORD moncode; /* Monitor code */ -/*00B8*/ FWORD ioid; /* I/O interrupt subsys id */ -/*00BC*/ FWORD ioparm; /* I/O interrupt parameter */ -/*00C0*/ FWORD iointid; /* I/O interrupt ID */ -/*00C4*/ FWORD resv00C0; /* Reserved */ -/*00C8*/ FWORD stfl; /* Facilities list (STFL) */ -/*00CC*/ FWORD resv00CC; /* Reserved */ -/*00D0*/ DWORD resv00D0; /* Reserved */ -/*00D8*/ DWORD resv00D8; /* Reserved */ -/*00E0*/ DWORD resv00E0; /* Reserved */ -/*00E8*/ DWORD mckint; /* Machine check int code */ -/*00F0*/ FWORD mckext; /* Machine check int code ext*/ -/*00F4*/ FWORD xdmgcode; /* External damage code */ -/*00F8*/ DWORD mcstorad; /* Failing storage address */ -/*0100*/ BYTE resv0100[32]; /* Reserved */ -/*0120*/ QWORD rstold; /* Restart old PSW */ -/*0130*/ QWORD extold; /* External old PSW */ -/*0140*/ QWORD svcold; /* SVC old PSW */ -/*0150*/ QWORD pgmold; /* Program check old PSW */ -/*0160*/ QWORD mckold; /* Machine check old PSW */ -/*0170*/ QWORD iopold; /* I/O old PSW */ -/*0180*/ BYTE resv0180[32]; /* Reserved */ -/*01A0*/ QWORD rstnew; /* Restart new PSW */ -/*01B0*/ QWORD extnew; /* External new PSW */ -/*01C0*/ QWORD svcnew; /* SVC new PSW */ -/*01D0*/ QWORD pgmnew; /* Program check new PSW */ -/*01E0*/ QWORD mcknew; /* Machine check new PSW */ -/*01F0*/ QWORD iopnew; /* I/O new PSW */ +/*00B0*/ DWORD moncode; /* Monitor code */ +/*00B8*/ FWORD ioid; /* I/O interrupt subsys id */ +/*00BC*/ FWORD ioparm; /* I/O interrupt parameter */ +/*00C0*/ FWORD iointid; /* I/O interrupt ID */ +/*00C4*/ FWORD resv00C0; /* Reserved */ +/*00C8*/ FWORD stfl; /* Facilities list (STFL) */ +/*00CC*/ FWORD resv00CC; /* Reserved */ +/*00D0*/ DWORD resv00D0; /* Reserved */ +/*00D8*/ DWORD resv00D8; /* Reserved */ +/*00E0*/ DWORD resv00E0; /* Reserved */ +/*00E8*/ DWORD mckint; /* Machine check int code */ +/*00F0*/ FWORD mckext; /* Machine check int code ext*/ +/*00F4*/ FWORD xdmgcode; /* External damage code */ +/*00F8*/ DWORD mcstorad; /* Failing storage address */ +/*0100*/ BYTE resv0100[32]; /* Reserved */ +/*0120*/ QWORD rstold; /* Restart old PSW */ +/*0130*/ QWORD extold; /* External old PSW */ +/*0140*/ QWORD svcold; /* SVC old PSW */ +/*0150*/ QWORD pgmold; /* Program check old PSW */ +/*0160*/ QWORD mckold; /* Machine check old PSW */ +/*0170*/ QWORD iopold; /* I/O old PSW */ +/*0180*/ BYTE resv0180[32]; /* Reserved */ +/*01A0*/ QWORD rstnew; /* Restart new PSW */ +/*01B0*/ QWORD extnew; /* External new PSW */ +/*01C0*/ QWORD svcnew; /* SVC new PSW */ +/*01D0*/ QWORD pgmnew; /* Program check new PSW */ +/*01E0*/ QWORD mcknew; /* Machine check new PSW */ +/*01F0*/ QWORD iopnew; /* I/O new PSW */ /*0200*/ BYTE resv0200[4096]; /* Reserved */ -/*1200*/ FWORD storefpr[32]; /* FP register save area */ -/*1280*/ DWORD storegpr[16]; /* General register save area*/ +/*1200*/ FWORD storefpr[32]; /* FP register save area */ +/*1280*/ DWORD storegpr[16]; /* General register save area*/ /*1300*/ QWORD storepsw; /* Store status PSW save area*/ /*1310*/ DWORD resv1310; /* Reserved */ /*1318*/ FWORD storepfx; /* Prefix register save area */ @@ -669,48 +670,48 @@ typedef struct _PSA_900 { /* Prefixed storage area */ /*1328*/ DWORD storeptmr; /* CPU timer save area */ /*1330*/ DWORD storeclkc; /* Clock comparator save area*/ /*1338*/ DWORD resv1338; /* Reserved */ -/*1340*/ FWORD storear[16]; /* Access register save area */ -/*1380*/ DWORD storecr[16]; /* Control register save area*/ +/*1340*/ FWORD storear[16]; /* Access register save area */ +/*1380*/ DWORD storecr[16]; /* Control register save area*/ } PSA_900; /* Bit settings for translation exception address */ -#define TEA_SECADDR 0x80000000 /* Secondary addr (370,390) */ -#define TEA_PROT_A 0x008 /* Access-list prot (ESAME) */ -#define TEA_PROT_AP 0x004 /* Access-list/page protected*/ -#define TEA_MVPG 0x004 /* MVPG exception (ESAME) */ -#define TEA_ST 0x003 /* Address space indication..*/ -#define TEA_ST_PRIMARY 0x000 /* ..primary STO/ASCE used */ -#define TEA_ST_ARMODE 0x001 /* ..access register mode */ -#define TEA_ST_SECNDRY 0x002 /* ..secondary STO/ASCE used */ -#define TEA_ST_HOME 0x003 /* ..home STO/ASCE used */ -#define TEA_SSEVENT 0x80000000 /* Space switch event bit */ -#define TEA_ASN 0x0000FFFF /* Address space number */ -#define TEA_PCN 0x000FFFFF /* Program call number */ +#define TEA_SECADDR 0x80000000 /* Secondary addr (370,390) */ +#define TEA_PROT_A 0x008 /* Access-list prot (ESAME) */ +#define TEA_PROT_AP 0x004 /* Access-list/page protected*/ +#define TEA_MVPG 0x004 /* MVPG exception (ESAME) */ +#define TEA_ST 0x003 /* Address space indication..*/ +#define TEA_ST_PRIMARY 0x000 /* ..primary STO/ASCE used */ +#define TEA_ST_ARMODE 0x001 /* ..access register mode */ +#define TEA_ST_SECNDRY 0x002 /* ..secondary STO/ASCE used */ +#define TEA_ST_HOME 0x003 /* ..home STO/ASCE used */ +#define TEA_SSEVENT 0x80000000 /* Space switch event bit */ +#define TEA_ASN 0x0000FFFF /* Address space number */ +#define TEA_PCN 0x000FFFFF /* Program call number */ /* Bit settings for machine check interruption code */ -#define MCIC_SD 0x8000000000000000ULL /* System damage */ +#define MCIC_SD 0x8000000000000000ULL /* System damage */ #define MCIC_P 0x4000000000000000ULL /* Instruction proc damage */ -#define MCIC_SR 0x2000000000000000ULL /* System recovery */ +#define MCIC_SR 0x2000000000000000ULL /* System recovery */ #define MCIC_CD 0x0800000000000000ULL /* Timing facility damage */ -#define MCIC_ED 0x0400000000000000ULL /* External damage */ +#define MCIC_ED 0x0400000000000000ULL /* External damage */ #define MCIC_VF 0x0200000000000000ULL /* Vector facility failure */ -#define MCIC_DG 0x0100000000000000ULL /* Degradation */ +#define MCIC_DG 0x0100000000000000ULL /* Degradation */ -#define MCIC_W 0x0080000000000000ULL /* Warning */ +#define MCIC_W 0x0080000000000000ULL /* Warning */ #define MCIC_CP 0x0040000000000000ULL /* Channel report pending */ #define MCIC_SP 0x0020000000000000ULL /* Service processor damage */ #define MCIC_CK 0x0010000000000000ULL /* Channel subsystem damage */ #define MCIC_VS 0x0004000000000000ULL /* Vector facility source */ -#define MCIC_B 0x0002000000000000ULL /* Backed up */ +#define MCIC_B 0x0002000000000000ULL /* Backed up */ #define MCIC_SE 0x0000800000000000ULL /* Storage error uncorrected */ #define MCIC_SC 0x0000400000000000ULL /* Storage error corrected */ #define MCIC_KE 0x0000200000000000ULL /* Storkey error uncorrected */ #define MCIC_DS 0x0000100000000000ULL /* Storage degradation */ -#define MCIC_WP 0x0000080000000000ULL /* PSW-MWP validity */ +#define MCIC_WP 0x0000080000000000ULL /* PSW-MWP validity */ #define MCIC_MS 0x0000040000000000ULL /* PSW mask and key validity */ #define MCIC_PM 0x0000020000000000ULL /* PSW pm and cc validity */ -#define MCIC_IA 0x0000010000000000ULL /* PSW ia validity */ +#define MCIC_IA 0x0000010000000000ULL /* PSW ia validity */ #define MCIC_FA 0x0000008000000000ULL /* Failing stor addr validity*/ #define MCIC_EC 0x0000002000000000ULL /* External damage code val. */ @@ -725,104 +726,107 @@ typedef struct _PSA_900 { /* Prefixed storage area */ #define MCIC_PR 0x0000000000200000ULL /* TOD prog. reg. validity */ #define MCIC_XF 0x0000000000100000ULL /* Extended float reg val. */ -#define MCIC_AP 0x0000000000080000ULL /* Ancillary report */ +#define MCIC_AP 0x0000000000080000ULL /* Ancillary report */ #define MCIC_CT 0x0000000000020000ULL /* CPU timer validity */ #define MCIC_CC 0x0000000000010000ULL /* Clock comparator validity */ /* Channel Report Word definitions */ -#define CRW_SOL 0x40000000 /* Solicited CRW */ -#define CRW_OVER 0x20000000 /* Overflow, CRW's lost */ -#define CRW_CHAIN 0x10000000 /* More CRW's describe event */ -#define CRW_RSC 0x0F000000 /* Reporting resource mask */ -#define CRW_MONIT 0x02000000 /* Channel monitor is source */ -#define CRW_SUBCH 0x03000000 /* Subchannel is source */ -#define CRW_CHPID 0x04000000 /* Channel path is source */ -#define CRW_CAF 0x09000000 /* Configuration alert */ -#define CRW_CSS 0x0B000000 /* Channel subsys is source */ -#define CRW_AR 0x00800000 /* Ancillary report indicator*/ -#define CRW_ERC 0x003F0000 /* Error recovery code */ -#define CRW_AVAIL 0x00010000 /* Available */ -#define CRW_INIT 0x00020000 /* Initialized no parm. chg. */ -#define CRW_TEMP 0x00030000 /* Temporary error */ -#define CRW_ALERT 0x00040000 /* Installed, subch changed */ -#define CRW_TERM 0x00050000 /* Terminal */ -#define CRW_PERM 0x00060000 /* Permanent error / not init*/ -#define CRW_PERMI 0x00070000 /* Permanent, initialized */ -#define CRW_IPM 0x00080000 /* PIM / PAM / CHPIDs changed*/ -#define CRW_RSID 0x0000FFFF /* Resource identifier */ +#define CRW_SOL 0x40000000 /* Solicited CRW */ +#define CRW_OVER 0x20000000 /* Overflow, CRW's lost */ +#define CRW_CHAIN 0x10000000 /* More CRW's describe event */ +#define CRW_RSC 0x0F000000 /* Reporting resource mask */ +#define CRW_MONIT 0x02000000 /* Channel monitor is source */ +#define CRW_SUBCH 0x03000000 /* Subchannel is source */ +#define CRW_CHPID 0x04000000 /* Channel path is source */ +#define CRW_CAF 0x09000000 /* Configuration alert */ +#define CRW_CSS 0x0B000000 /* Channel subsys is source */ +#define CRW_AR 0x00800000 /* Ancillary report indicator*/ +#define CRW_ERC 0x003F0000 /* Error recovery code */ +#define CRW_AVAIL 0x00010000 /* Available */ +#define CRW_INIT 0x00020000 /* Initialized no parm. chg. */ +#define CRW_TEMP 0x00030000 /* Temporary error */ +#define CRW_ALERT 0x00040000 /* Installed, subch changed */ +#define CRW_TERM 0x00050000 /* Terminal */ +#define CRW_PERM 0x00060000 /* Permanent error / not init*/ +#define CRW_PERMI 0x00070000 /* Permanent, initialized */ +#define CRW_IPM 0x00080000 /* PIM / PAM / CHPIDs changed*/ +#define CRW_RSID 0x0000FFFF /* Resource identifier */ /* Bit settings for channel id */ -#define CHANNEL_TYPE 0xF0000000 /* Bits 0-3=Channel type... */ -#define CHANNEL_SEL 0x00000000 /* ...selector channel */ -#define CHANNEL_MPX 0x10000000 /* ...byte multiplexor */ -#define CHANNEL_BMX 0x20000000 /* ...block multiplexor */ -#define CHANNEL_MODEL 0x0FFF0000 /* Bits 4-15=Channel model */ -#define CHANNEL_MAXIOEL 0x0000FFFF /* Bits 16-31=Max.IOEL length*/ +#define CHANNEL_TYPE 0xF0000000 /* Bits 0-3=Channel type... */ +#define CHANNEL_SEL 0x00000000 /* ...selector channel */ +#define CHANNEL_MPX 0x10000000 /* ...byte multiplexor */ +#define CHANNEL_BMX 0x20000000 /* ...block multiplexor */ +#define CHANNEL_MODEL 0x0FFF0000 /* Bits 4-15=Channel model */ +#define CHANNEL_MAXIOEL 0x0000FFFF /* Bits 16-31=Max.IOEL length*/ /* Program interruption codes */ -#define PGM_OPERATION_EXCEPTION 0x0001 -#define PGM_PRIVILEGED_OPERATION_EXCEPTION 0x0002 -#define PGM_EXECUTE_EXCEPTION 0x0003 -#define PGM_PROTECTION_EXCEPTION 0x0004 -#define PGM_ADDRESSING_EXCEPTION 0x0005 -#define PGM_SPECIFICATION_EXCEPTION 0x0006 -#define PGM_DATA_EXCEPTION 0x0007 -#define PGM_FIXED_POINT_OVERFLOW_EXCEPTION 0x0008 -#define PGM_FIXED_POINT_DIVIDE_EXCEPTION 0x0009 -#define PGM_DECIMAL_OVERFLOW_EXCEPTION 0x000A -#define PGM_DECIMAL_DIVIDE_EXCEPTION 0x000B -#define PGM_EXPONENT_OVERFLOW_EXCEPTION 0x000C -#define PGM_EXPONENT_UNDERFLOW_EXCEPTION 0x000D -#define PGM_SIGNIFICANCE_EXCEPTION 0x000E -#define PGM_FLOATING_POINT_DIVIDE_EXCEPTION 0x000F -#define PGM_SEGMENT_TRANSLATION_EXCEPTION 0x0010 -#define PGM_PAGE_TRANSLATION_EXCEPTION 0x0011 -#define PGM_TRANSLATION_SPECIFICATION_EXCEPTION 0x0012 -#define PGM_SPECIAL_OPERATION_EXCEPTION 0x0013 -#define PGM_OPERAND_EXCEPTION 0x0015 -#define PGM_TRACE_TABLE_EXCEPTION 0x0016 -#define PGM_ASN_TRANSLATION_SPECIFICATION_EXCEPTION 0x0017 -#define PGM_VECTOR_OPERATION_EXCEPTION 0x0019 -#define PGM_SPACE_SWITCH_EVENT 0x001C -#define PGM_SQUARE_ROOT_EXCEPTION 0x001D -#define PGM_UNNORMALIZED_OPERAND_EXCEPTION 0x001E -#define PGM_PC_TRANSLATION_SPECIFICATION_EXCEPTION 0x001F -#define PGM_AFX_TRANSLATION_EXCEPTION 0x0020 -#define PGM_ASX_TRANSLATION_EXCEPTION 0x0021 -#define PGM_LX_TRANSLATION_EXCEPTION 0x0022 -#define PGM_EX_TRANSLATION_EXCEPTION 0x0023 -#define PGM_PRIMARY_AUTHORITY_EXCEPTION 0x0024 -#define PGM_SECONDARY_AUTHORITY_EXCEPTION 0x0025 -#define PGM_ALET_SPECIFICATION_EXCEPTION 0x0028 -#define PGM_ALEN_TRANSLATION_EXCEPTION 0x0029 -#define PGM_ALE_SEQUENCE_EXCEPTION 0x002A -#define PGM_ASTE_VALIDITY_EXCEPTION 0x002B -#define PGM_ASTE_SEQUENCE_EXCEPTION 0x002C -#define PGM_EXTENDED_AUTHORITY_EXCEPTION 0x002D -#define PGM_STACK_FULL_EXCEPTION 0x0030 -#define PGM_STACK_EMPTY_EXCEPTION 0x0031 -#define PGM_STACK_SPECIFICATION_EXCEPTION 0x0032 -#define PGM_STACK_TYPE_EXCEPTION 0x0033 -#define PGM_STACK_OPERATION_EXCEPTION 0x0034 -#define PGM_ASCE_TYPE_EXCEPTION 0x0038 -#define PGM_REGION_FIRST_TRANSLATION_EXCEPTION 0x0039 -#define PGM_REGION_SECOND_TRANSLATION_EXCEPTION 0x003A -#define PGM_REGION_THIRD_TRANSLATION_EXCEPTION 0x003B -#define PGM_MONITOR_EVENT 0x0040 -#define PGM_PER_EVENT 0x0080 -#define PGM_CRYPTO_OPERATION_EXCEPTION 0x0119 +#define PGM_OPERATION_EXCEPTION 0x0001 +#define PGM_PRIVILEGED_OPERATION_EXCEPTION 0x0002 +#define PGM_EXECUTE_EXCEPTION 0x0003 +#define PGM_PROTECTION_EXCEPTION 0x0004 +#define PGM_ADDRESSING_EXCEPTION 0x0005 +#define PGM_SPECIFICATION_EXCEPTION 0x0006 +#define PGM_DATA_EXCEPTION 0x0007 +#define PGM_FIXED_POINT_OVERFLOW_EXCEPTION 0x0008 +#define PGM_FIXED_POINT_DIVIDE_EXCEPTION 0x0009 +#define PGM_DECIMAL_OVERFLOW_EXCEPTION 0x000A +#define PGM_DECIMAL_DIVIDE_EXCEPTION 0x000B +#define PGM_EXPONENT_OVERFLOW_EXCEPTION 0x000C +#define PGM_EXPONENT_UNDERFLOW_EXCEPTION 0x000D +#define PGM_SIGNIFICANCE_EXCEPTION 0x000E +#define PGM_FLOATING_POINT_DIVIDE_EXCEPTION 0x000F +#define PGM_SEGMENT_TRANSLATION_EXCEPTION 0x0010 +#define PGM_PAGE_TRANSLATION_EXCEPTION 0x0011 +#define PGM_TRANSLATION_SPECIFICATION_EXCEPTION 0x0012 +#define PGM_SPECIAL_OPERATION_EXCEPTION 0x0013 +#define PGM_OPERAND_EXCEPTION 0x0015 +#define PGM_TRACE_TABLE_EXCEPTION 0x0016 +#define PGM_ASN_TRANSLATION_SPECIFICATION_EXCEPTION 0x0017 +#define PGM_VECTOR_OPERATION_EXCEPTION 0x0019 +#define PGM_SPACE_SWITCH_EVENT 0x001C +#define PGM_SQUARE_ROOT_EXCEPTION 0x001D +#define PGM_UNNORMALIZED_OPERAND_EXCEPTION 0x001E +#define PGM_PC_TRANSLATION_SPECIFICATION_EXCEPTION 0x001F +#define PGM_AFX_TRANSLATION_EXCEPTION 0x0020 +#define PGM_ASX_TRANSLATION_EXCEPTION 0x0021 +#define PGM_LX_TRANSLATION_EXCEPTION 0x0022 +#define PGM_EX_TRANSLATION_EXCEPTION 0x0023 +#define PGM_PRIMARY_AUTHORITY_EXCEPTION 0x0024 +#define PGM_SECONDARY_AUTHORITY_EXCEPTION 0x0025 +#define PGM_ALET_SPECIFICATION_EXCEPTION 0x0028 +#define PGM_ALEN_TRANSLATION_EXCEPTION 0x0029 +#define PGM_ALE_SEQUENCE_EXCEPTION 0x002A +#define PGM_ASTE_VALIDITY_EXCEPTION 0x002B +#define PGM_ASTE_SEQUENCE_EXCEPTION 0x002C +#define PGM_EXTENDED_AUTHORITY_EXCEPTION 0x002D +#define PGM_STACK_FULL_EXCEPTION 0x0030 +#define PGM_STACK_EMPTY_EXCEPTION 0x0031 +#define PGM_STACK_SPECIFICATION_EXCEPTION 0x0032 +#define PGM_STACK_TYPE_EXCEPTION 0x0033 +#define PGM_STACK_OPERATION_EXCEPTION 0x0034 +#define PGM_ASCE_TYPE_EXCEPTION 0x0038 +#define PGM_REGION_FIRST_TRANSLATION_EXCEPTION 0x0039 +#define PGM_REGION_SECOND_TRANSLATION_EXCEPTION 0x003A +#define PGM_REGION_THIRD_TRANSLATION_EXCEPTION 0x003B +#define PGM_MONITOR_EVENT 0x0040 +#define PGM_PER_EVENT 0x0080 +#define PGM_CRYPTO_OPERATION_EXCEPTION 0x0119 /* External interrupt codes */ -#define EXT_INTERRUPT_KEY_INTERRUPT 0x0040 -#define EXT_INTERVAL_TIMER_INTERRUPT 0x0080 -#define EXT_TOD_CLOCK_SYNC_CHECK_INTERRUPT 0x1003 -#define EXT_CLOCK_COMPARATOR_INTERRUPT 0x1004 -#define EXT_CPU_TIMER_INTERRUPT 0x1005 -#define EXT_MALFUNCTION_ALERT_INTERRUPT 0x1200 -#define EXT_EMERGENCY_SIGNAL_INTERRUPT 0x1201 -#define EXT_EXTERNAL_CALL_INTERRUPT 0x1202 -#define EXT_ETR_INTERRUPT 0x1406 -#define EXT_SERVICE_SIGNAL_INTERRUPT 0x2401 +#define EXT_INTERRUPT_KEY_INTERRUPT 0x0040 +#define EXT_INTERVAL_TIMER_INTERRUPT 0x0080 +#define EXT_TOD_CLOCK_SYNC_CHECK_INTERRUPT 0x1003 +#define EXT_CLOCK_COMPARATOR_INTERRUPT 0x1004 +#define EXT_CPU_TIMER_INTERRUPT 0x1005 +#define EXT_MALFUNCTION_ALERT_INTERRUPT 0x1200 +#define EXT_EMERGENCY_SIGNAL_INTERRUPT 0x1201 +#define EXT_EXTERNAL_CALL_INTERRUPT 0x1202 +#define EXT_ETR_INTERRUPT 0x1406 +#define EXT_SERVICE_SIGNAL_INTERRUPT 0x2401 +#if defined(FEATURE_ECPSVM) +#define EXT_VINTERVAL_TIMER_INTERRUPT 0x0100 +#endif /* Macros for classifying CCW operation codes */ #define IS_CCW_WRITE(c) (((c)&0x03)==0x01) @@ -836,341 +840,355 @@ typedef struct _PSA_900 { /* Prefixed storage area */ /* Operation request block structure definition */ typedef struct _ORB { - FWORD intparm; /* Interruption parameter */ - BYTE flag4; /* Flag byte 4 */ - BYTE flag5; /* Flag byte 5 */ - BYTE lpm; /* Logical path mask */ - BYTE flag7; /* Flag byte 7 */ - FWORD ccwaddr; /* CCW address */ + FWORD intparm; /* Interruption parameter */ + BYTE flag4; /* Flag byte 4 */ + BYTE flag5; /* Flag byte 5 */ + BYTE lpm; /* Logical path mask */ + BYTE flag7; /* Flag byte 7 */ + FWORD ccwaddr; /* CCW address */ } ORB; /* Bit definitions for ORB flag byte 4 */ -#define ORB4_KEY 0xF0 /* Subchannel protection key */ -#define ORB4_S 0x08 /* Suspend control */ -#define ORB4_C 0x04 /* Streaming mode (FICON) */ -#define ORB4_M 0x02 /* Modification (FICON) */ -#define ORB4_Y 0x01 /* Synchronization (FICON) */ +#define ORB4_KEY 0xF0 /* Subchannel protection key */ +#define ORB4_S 0x08 /* Suspend control */ +#define ORB4_C 0x04 /* Streaming mode (FICON) */ +#define ORB4_M 0x02 /* Modification (FICON) */ +#define ORB4_Y 0x01 /* Synchronization (FICON) */ /* Bit definitions for ORB flag byte 5 */ -#define ORB5_F 0x80 /* CCW format */ -#define ORB5_P 0x40 /* Prefetch */ -#define ORB5_I 0x20 /* Initial status interrupt */ -#define ORB5_A 0x10 /* Address limit checking */ -#define ORB5_U 0x08 /* Suppress susp interrupt */ -#define ORB5_RESV 0x04 /* Reserved bit - must be 0 */ -#define ORB5_H 0x02 /* Format-2 IDAW control */ -#define ORB5_T 0x01 /* 2K format-2 IDAW control */ +#define ORB5_F 0x80 /* CCW format */ +#define ORB5_P 0x40 /* Prefetch */ +#define ORB5_I 0x20 /* Initial status interrupt */ +#define ORB5_A 0x10 /* Address limit checking */ +#define ORB5_U 0x08 /* Suppress susp interrupt */ +#define ORB5_RESV 0x04 /* Reserved bit - must be 0 */ +#define ORB5_H 0x02 /* Format-2 IDAW control */ +#define ORB5_T 0x01 /* 2K format-2 IDAW control */ /* Bit definitions for ORB flag byte 7 */ -#define ORB7_L 0x80 /* Suppress incorrect length */ -#define ORB7_RESV 0x7E /* Reserved bits - must be 0 */ -#define ORB7_X 0x01 /* ORB extension control */ +#define ORB7_L 0x80 /* Suppress incorrect length */ +#define ORB7_RESV 0x7E /* Reserved bits - must be 0 */ +#define ORB7_X 0x01 /* ORB extension control */ /* Path management control word structure definition */ typedef struct _PMCW { - FWORD intparm; /* Interruption parameter */ - BYTE flag4; /* Flag byte 4 */ - BYTE flag5; /* Flag byte 5 */ - HWORD devnum; /* Device number */ - BYTE lpm; /* Logical path mask */ - BYTE pnom; /* Path not operational mask */ - BYTE lpum; /* Last path used mask */ - BYTE pim; /* Path installed mask */ - HWORD mbi; /* Measurement block index */ - BYTE pom; /* Path operational mask */ - BYTE pam; /* Path available mask */ - BYTE chpid[8]; /* Channel path identifiers */ - BYTE zone; /* SIE zone */ - BYTE flag25; /* Flag byte 25 */ - BYTE flag26; /* Reserved byte - must be 0 */ - BYTE flag27; /* Flag byte 27 */ + FWORD intparm; /* Interruption parameter */ + BYTE flag4; /* Flag byte 4 */ + BYTE flag5; /* Flag byte 5 */ + HWORD devnum; /* Device number */ + BYTE lpm; /* Logical path mask */ + BYTE pnom; /* Path not operational mask */ + BYTE lpum; /* Last path used mask */ + BYTE pim; /* Path installed mask */ + HWORD mbi; /* Measurement block index */ + BYTE pom; /* Path operational mask */ + BYTE pam; /* Path available mask */ + BYTE chpid[8]; /* Channel path identifiers */ + BYTE zone; /* SIE zone */ + BYTE flag25; /* Flag byte 25 */ + BYTE flag26; /* Reserved byte - must be 0 */ + BYTE flag27; /* Flag byte 27 */ } PMCW; /* Bit definitions for PMCW flag byte 4 */ -#define PMCW4_ISC 0x38 /* Interruption subclass */ -#define PMCW4_A 0x01 /* Alternate Block Control */ -#define PMCW4_RESV 0xC6 /* Reserved bits - must be 0 */ +#define PMCW4_Q 0x80 /* QDIO available */ +#define PMCW4_ISC 0x38 /* Interruption subclass */ +#define PMCW4_A 0x01 /* Alternate Block Control */ +#define PMCW4_RESV 0xC6 /* Reserved bits - must be 0 */ /* Bit definitions for PMCW flag byte 5 */ -#define PMCW5_E 0x80 /* Subchannel enabled */ -#define PMCW5_LM 0x60 /* Limit mode... */ -#define PMCW5_LM_NONE 0x00 /* ...no limit checking */ -#define PMCW5_LM_LOW 0x20 /* ...lower limit specified */ -#define PMCW5_LM_HIGH 0x40 /* ...upper limit specified */ -#define PMCW5_LM_RESV 0x60 /* ...reserved value */ -#define PMCW5_MM 0x18 /* Measurement mode enable...*/ -#define PMCW5_MM_MBU 0x10 /* ...meas.block.upd enabled */ -#define PMCW5_MM_DCTM 0x08 /* Dev.conn.time.meas enabled*/ -#define PMCW5_D 0x04 /* Multipath mode enabled */ -#define PMCW5_T 0x02 /* Timing facility available */ -#define PMCW5_V 0x01 /* Subchannel valid */ +#define PMCW5_E 0x80 /* Subchannel enabled */ +#define PMCW5_LM 0x60 /* Limit mode... */ +#define PMCW5_LM_NONE 0x00 /* ...no limit checking */ +#define PMCW5_LM_LOW 0x20 /* ...lower limit specified */ +#define PMCW5_LM_HIGH 0x40 /* ...upper limit specified */ +#define PMCW5_LM_RESV 0x60 /* ...reserved value */ +#define PMCW5_MM 0x18 /* Measurement mode enable...*/ +#define PMCW5_MM_MBU 0x10 /* ...meas.block.upd enabled */ +#define PMCW5_MM_DCTM 0x08 /* Dev.conn.time.meas enabled*/ +#define PMCW5_D 0x04 /* Multipath mode enabled */ +#define PMCW5_T 0x02 /* Timing facility available */ +#define PMCW5_V 0x01 /* Subchannel valid */ /* Bit definitions for PMCW flag byte 25 */ -#define PMCW25_VISC 0x1F /* Guest ISC */ -#define PMCW25_RESV 0xE0 /* Reserved bits - must be 0 */ +#define PMCW25_VISC 0x1F /* Guest ISC */ +#define PMCW25_RESV 0xE0 /* Reserved bits - must be 0 */ /* Bit definitions for PMCW flag byte 27 */ -#define PMCW27_I 0x80 /* Interrupt Interlock Cntl */ -#define PMCW27_S 0x01 /* Concurrent sense mode */ -#define PMCW27_RESV 0x7E /* Reserved bits - must be 0 */ +#define PMCW27_I 0x80 /* Interrupt Interlock Cntl */ +#define PMCW27_S 0x01 /* Concurrent sense mode */ +#define PMCW27_RESV 0x7E /* Reserved bits - must be 0 */ /* Extended status word structure definition */ typedef struct _ESW { - BYTE scl0; /* Subchannel logout byte 0 */ - BYTE lpum; /* Last path used mask */ - BYTE scl2; /* Subchannel logout byte 2 */ - BYTE scl3; /* Subchannel logout byte 3 */ - BYTE erw0; /* Extended report word byte0*/ - BYTE erw1; /* Extended report word byte1*/ - BYTE erw2; /* Extended report word byte2*/ - BYTE erw3; /* Extended report word byte3*/ - FWORD failaddr; /* Failing storage address */ - FWORD resv2; /* Reserved word - must be 0 */ - FWORD resv3; /* Reserved word - must be 0 */ + BYTE scl0; /* Subchannel logout byte 0 */ + BYTE lpum; /* Last path used mask */ + BYTE scl2; /* Subchannel logout byte 2 */ + BYTE scl3; /* Subchannel logout byte 3 */ + BYTE erw0; /* Extended report word byte0*/ + BYTE erw1; /* Extended report word byte1*/ + BYTE erw2; /* Extended report word byte2*/ + BYTE erw3; /* Extended report word byte3*/ + FWORD failaddr; /* Failing storage address */ + FWORD resv2; /* Reserved word - must be 0 */ + FWORD resv3; /* Reserved word - must be 0 */ } ESW; /* Bit definitions for subchannel logout byte 0 */ -#define SCL0_ESF 0x7F /* Extended status flags... */ -#define SCL0_ESF_KEY 0x40 /* ...key check */ -#define SCL0_ESF_MBPGK 0x20 /* ...meas.block prog.check */ -#define SCL0_ESF_MBDCK 0x10 /* ...meas.block data check */ -#define SCL0_ESF_MBPTK 0x08 /* ...meas.block prot.check */ -#define SCL0_ESF_CCWCK 0x04 /* ...CCW check */ -#define SCL0_ESF_IDACK 0x02 /* ...IDAW check */ +#define SCL0_ESF 0x7F /* Extended status flags... */ +#define SCL0_ESF_KEY 0x40 /* ...key check */ +#define SCL0_ESF_MBPGK 0x20 /* ...meas.block prog.check */ +#define SCL0_ESF_MBDCK 0x10 /* ...meas.block data check */ +#define SCL0_ESF_MBPTK 0x08 /* ...meas.block prot.check */ +#define SCL0_ESF_CCWCK 0x04 /* ...CCW check */ +#define SCL0_ESF_IDACK 0x02 /* ...IDAW check */ /* Bit definitions for subchannel logout byte 2 */ -#define SCL2_R 0x80 /* Ancillary report bit */ -#define SCL2_FVF 0x7C /* Field validity flags... */ -#define SCL2_FVF_LPUM 0x40 /* ...LPUM valid */ -#define SCL2_FVF_TC 0x20 /* ...termination code valid */ -#define SCL2_FVF_SC 0x10 /* ...sequence code valid */ -#define SCL2_FVF_USTAT 0x08 /* ...device status valid */ -#define SCL2_FVF_CCWAD 0x04 /* ...CCW address valid */ -#define SCL2_SA 0x03 /* Storage access code... */ -#define SCL2_SA_UNK 0x00 /* ...access type unknown */ -#define SCL2_SA_RD 0x01 /* ...read */ -#define SCL2_SA_WRT 0x02 /* ...write */ -#define SCL2_SA_RDBK 0x03 /* ...read backward */ +#define SCL2_R 0x80 /* Ancillary report bit */ +#define SCL2_FVF 0x7C /* Field validity flags... */ +#define SCL2_FVF_LPUM 0x40 /* ...LPUM valid */ +#define SCL2_FVF_TC 0x20 /* ...termination code valid */ +#define SCL2_FVF_SC 0x10 /* ...sequence code valid */ +#define SCL2_FVF_USTAT 0x08 /* ...device status valid */ +#define SCL2_FVF_CCWAD 0x04 /* ...CCW address valid */ +#define SCL2_SA 0x03 /* Storage access code... */ +#define SCL2_SA_UNK 0x00 /* ...access type unknown */ +#define SCL2_SA_RD 0x01 /* ...read */ +#define SCL2_SA_WRT 0x02 /* ...write */ +#define SCL2_SA_RDBK 0x03 /* ...read backward */ /* Bit definitions for subchannel logout byte 3 */ -#define SCL3_TC 0xC0 /* Termination code... */ -#define SCL3_TC_HALT 0x00 /* ...halt signal issued */ -#define SCL3_TC_NORM 0x40 /* ...stop, stack, or normal */ -#define SCL3_TC_CLEAR 0x80 /* ...clear signal issued */ -#define SCL3_TC_RESV 0xC0 /* ...reserved */ -#define SCL3_D 0x20 /* Device status check */ -#define SCL3_E 0x10 /* Secondary error */ -#define SCL3_A 0x08 /* I/O error alert */ -#define SCL3_SC 0x07 /* Sequence code */ +#define SCL3_TC 0xC0 /* Termination code... */ +#define SCL3_TC_HALT 0x00 /* ...halt signal issued */ +#define SCL3_TC_NORM 0x40 /* ...stop, stack, or normal */ +#define SCL3_TC_CLEAR 0x80 /* ...clear signal issued */ +#define SCL3_TC_RESV 0xC0 /* ...reserved */ +#define SCL3_D 0x20 /* Device status check */ +#define SCL3_E 0x10 /* Secondary error */ +#define SCL3_A 0x08 /* I/O error alert */ +#define SCL3_SC 0x07 /* Sequence code */ /* Bit definitions for extended report word byte 0 */ -#define ERW0_A 0x10 /* Authorization check */ -#define ERW0_P 0x08 /* Path verification required*/ -#define ERW0_T 0x04 /* Channel path timeout */ -#define ERW0_F 0x02 /* Failing storage addr valid*/ -#define ERW0_S 0x01 /* Concurrent sense */ +#define ERW0_A 0x10 /* Authorization check */ +#define ERW0_P 0x08 /* Path verification required*/ +#define ERW0_T 0x04 /* Channel path timeout */ +#define ERW0_F 0x02 /* Failing storage addr valid*/ +#define ERW0_S 0x01 /* Concurrent sense */ /* Bit definitions for extended report word byte 1 */ -#define ERW1_SCNT 0x3F /* Concurrent sense count */ +#define ERW1_SCNT 0x3F /* Concurrent sense count */ /* Subchannel status word structure definition */ typedef struct _SCSW { - BYTE flag0; /* Flag byte 0 */ - BYTE flag1; /* Flag byte 1 */ - BYTE flag2; /* Flag byte 2 */ - BYTE flag3; /* Flag byte 3 */ - FWORD ccwaddr; /* CCW address */ - BYTE unitstat; /* Device status */ - BYTE chanstat; /* Subchannel status */ - HWORD count; /* Residual byte count */ + BYTE flag0; /* Flag byte 0 */ + BYTE flag1; /* Flag byte 1 */ + BYTE flag2; /* Flag byte 2 */ + BYTE flag3; /* Flag byte 3 */ + FWORD ccwaddr; /* CCW address */ + BYTE unitstat; /* Device status */ + BYTE chanstat; /* Subchannel status */ + HWORD count; /* Residual byte count */ } SCSW; /* Bit definitions for SCSW flag byte 0 */ -#define SCSW0_KEY 0xF0 /* Subchannel protection key */ -#define SCSW0_S 0x08 /* Suspend control */ -#define SCSW0_L 0x04 /* ESW format (logout stored)*/ -#define SCSW0_CC 0x03 /* Deferred condition code...*/ -#define SCSW0_CC_0 0x00 /* ...condition code 0 */ -#define SCSW0_CC_1 0x01 /* ...condition code 1 */ -#define SCSW0_CC_3 0x03 /* ...condition code 3 */ +#define SCSW0_KEY 0xF0 /* Subchannel protection key */ +#define SCSW0_S 0x08 /* Suspend control */ +#define SCSW0_L 0x04 /* ESW format (logout stored)*/ +#define SCSW0_CC 0x03 /* Deferred condition code...*/ +#define SCSW0_CC_0 0x00 /* ...condition code 0 */ +#define SCSW0_CC_1 0x01 /* ...condition code 1 */ +#define SCSW0_CC_3 0x03 /* ...condition code 3 */ /* Bit definitions for SCSW flag byte 1 */ -#define SCSW1_F 0x80 /* CCW format */ -#define SCSW1_P 0x40 /* Prefetch */ -#define SCSW1_I 0x20 /* Initial status interrupt */ -#define SCSW1_A 0x10 /* Address limit checking */ -#define SCSW1_U 0x08 /* Suppress susp interrupt */ -#define SCSW1_Z 0x04 /* Zero condition code */ -#define SCSW1_E 0x02 /* Extended control */ -#define SCSW1_N 0x01 /* Path not operational */ +#define SCSW1_F 0x80 /* CCW format */ +#define SCSW1_P 0x40 /* Prefetch */ +#define SCSW1_I 0x20 /* Initial status interrupt */ +#define SCSW1_A 0x10 /* Address limit checking */ +#define SCSW1_U 0x08 /* Suppress susp interrupt */ +#define SCSW1_Z 0x04 /* Zero condition code */ +#define SCSW1_E 0x02 /* Extended control */ +#define SCSW1_N 0x01 /* Path not operational */ /* Bit definitions for SCSW flag byte 2 */ -#define SCSW2_RESV 0x80 /* Reserved bit - must be 0 */ -#define SCSW2_FC 0x70 /* Function control bits... */ -#define SCSW2_FC_START 0x40 /* ...start function */ -#define SCSW2_FC_HALT 0x20 /* ...halt function */ -#define SCSW2_FC_CLEAR 0x10 /* ...clear function */ -#define SCSW2_AC 0x0F /* Activity control bits... */ -#define SCSW2_AC_RESUM 0x08 /* ...resume pending */ -#define SCSW2_AC_START 0x04 /* ...start pending */ -#define SCSW2_AC_HALT 0x02 /* ...halt pending */ -#define SCSW2_AC_CLEAR 0x01 /* ...clear pending */ +#define SCSW2_Q 0x80 /* QDIO active */ +#define SCSW2_FC 0x70 /* Function control bits... */ +#define SCSW2_FC_START 0x40 /* ...start function */ +#define SCSW2_FC_HALT 0x20 /* ...halt function */ +#define SCSW2_FC_CLEAR 0x10 /* ...clear function */ +#define SCSW2_AC 0x0F /* Activity control bits... */ +#define SCSW2_AC_RESUM 0x08 /* ...resume pending */ +#define SCSW2_AC_START 0x04 /* ...start pending */ +#define SCSW2_AC_HALT 0x02 /* ...halt pending */ +#define SCSW2_AC_CLEAR 0x01 /* ...clear pending */ /* Bit definitions for SCSW flag byte 3 */ -#define SCSW3_AC 0xE0 /* Activity control bits... */ -#define SCSW3_AC_SCHAC 0x80 /* ...subchannel active */ -#define SCSW3_AC_DEVAC 0x40 /* ...device active */ -#define SCSW3_AC_SUSP 0x20 /* ...suspended */ -#define SCSW3_SC 0x1F /* Status control bits... */ -#define SCSW3_SC_ALERT 0x10 /* ...alert status */ -#define SCSW3_SC_INTER 0x08 /* ...intermediate status */ -#define SCSW3_SC_PRI 0x04 /* ...primary status */ -#define SCSW3_SC_SEC 0x02 /* ...secondary status */ -#define SCSW3_SC_PEND 0x01 /* ...status pending */ +#define SCSW3_AC 0xE0 /* Activity control bits... */ +#define SCSW3_AC_SCHAC 0x80 /* ...subchannel active */ +#define SCSW3_AC_DEVAC 0x40 /* ...device active */ +#define SCSW3_AC_SUSP 0x20 /* ...suspended */ +#define SCSW3_SC 0x1F /* Status control bits... */ +#define SCSW3_SC_ALERT 0x10 /* ...alert status */ +#define SCSW3_SC_INTER 0x08 /* ...intermediate status */ +#define SCSW3_SC_PRI 0x04 /* ...primary status */ +#define SCSW3_SC_SEC 0x02 /* ...secondary status */ +#define SCSW3_SC_PEND 0x01 /* ...status pending */ /* CSW unit status flags */ -#define CSW_ATTN 0x80 /* Attention */ -#define CSW_SM 0x40 /* Status modifier */ -#define CSW_CUE 0x20 /* Control unit end */ -#define CSW_BUSY 0x10 /* Busy */ -#define CSW_CE 0x08 /* Channel end */ -#define CSW_DE 0x04 /* Device end */ -#define CSW_UC 0x02 /* Unit check */ -#define CSW_UX 0x01 /* Unit exception */ +#define CSW_ATTN 0x80 /* Attention */ +#define CSW_SM 0x40 /* Status modifier */ +#define CSW_CUE 0x20 /* Control unit end */ +#define CSW_BUSY 0x10 /* Busy */ +#define CSW_CE 0x08 /* Channel end */ +#define CSW_DE 0x04 /* Device end */ +#define CSW_UC 0x02 /* Unit check */ +#define CSW_UX 0x01 /* Unit exception */ /* CSW channel status flags */ -#define CSW_PCI 0x80 /* Program control interrupt */ -#define CSW_IL 0x40 /* Incorrect length */ -#define CSW_PROGC 0x20 /* Program check */ -#define CSW_PROTC 0x10 /* Protection check */ -#define CSW_CDC 0x08 /* Channel data check */ -#define CSW_CCC 0x04 /* Channel control check */ -#define CSW_ICC 0x02 /* Interface control check */ -#define CSW_CHC 0x01 /* Chaining check */ +#define CSW_PCI 0x80 /* Program control interrupt */ +#define CSW_IL 0x40 /* Incorrect length */ +#define CSW_PROGC 0x20 /* Program check */ +#define CSW_PROTC 0x10 /* Protection check */ +#define CSW_CDC 0x08 /* Channel data check */ +#define CSW_CCC 0x04 /* Channel control check */ +#define CSW_ICC 0x02 /* Interface control check */ +#define CSW_CHC 0x01 /* Chaining check */ /* CCW flags */ -#define CCW_FLAGS_CD 0x80 /* Chain data flag */ -#define CCW_FLAGS_CC 0x40 /* Chain command flag */ -#define CCW_FLAGS_SLI 0x20 /* Suppress incorrect length - indication flag */ -#define CCW_FLAGS_SKIP 0x10 /* Skip flag */ -#define CCW_FLAGS_PCI 0x08 /* Program controlled - interrupt flag */ -#define CCW_FLAGS_IDA 0x04 /* Indirect data address flag*/ -#define CCW_FLAGS_SUSP 0x02 /* Suspend flag */ -#define CCW_FLAGS_RESV 0x01 /* Reserved bit - must be 0 */ +#define CCW_FLAGS_CD 0x80 /* Chain data flag */ +#define CCW_FLAGS_CC 0x40 /* Chain command flag */ +#define CCW_FLAGS_SLI 0x20 /* Suppress incorrect length + indication flag */ +#define CCW_FLAGS_SKIP 0x10 /* Skip flag */ +#define CCW_FLAGS_PCI 0x08 /* Program controlled + interrupt flag */ +#define CCW_FLAGS_IDA 0x04 /* Indirect data address flag*/ +#define CCW_FLAGS_SUSP 0x02 /* Suspend flag */ +#define CCW_FLAGS_RESV 0x01 /* Reserved bit - must be 0 */ /* Device independent bit settings for sense byte 0 */ -#define SENSE_CR 0x80 /* Command reject */ -#define SENSE_IR 0x40 /* Intervention required */ -#define SENSE_BOC 0x20 /* Bus-out check */ -#define SENSE_EC 0x10 /* Equipment check */ -#define SENSE_DC 0x08 /* Data check */ -#define SENSE_OR 0x04 /* Overrun */ -#define SENSE_US 0x04 /* Unit specify */ -#define SENSE_CC 0x02 /* Control check */ -#define SENSE_OC 0x01 /* Operation check */ +#define SENSE_CR 0x80 /* Command reject */ +#define SENSE_IR 0x40 /* Intervention required */ +#define SENSE_BOC 0x20 /* Bus-out check */ +#define SENSE_EC 0x10 /* Equipment check */ +#define SENSE_DC 0x08 /* Data check */ +#define SENSE_OR 0x04 /* Overrun */ +#define SENSE_US 0x04 /* Unit specify */ +#define SENSE_CC 0x02 /* Control check */ +#define SENSE_OC 0x01 /* Operation check */ /* Device dependent bit settings for sense byte 1 */ -#define SENSE1_PER 0x80 /* Permanent Error */ -#define SENSE1_ITF 0x40 /* Invalid Track Format */ -#define SENSE1_EOC 0x20 /* End of Cylinder */ -#define SENSE1_MTO 0x10 /* Message to Operator */ -#define SENSE1_NRF 0x08 /* No Record Found */ -#define SENSE1_FP 0x04 /* File Protected */ -#define SENSE1_WRI 0x02 /* Write Inhibited */ -#define SENSE1_IE 0x01 /* Imprecise Ending */ +#define SENSE1_PER 0x80 /* Permanent Error */ +#define SENSE1_ITF 0x40 /* Invalid Track Format */ +#define SENSE1_EOC 0x20 /* End of Cylinder */ +#define SENSE1_MTO 0x10 /* Message to Operator */ +#define SENSE1_NRF 0x08 /* No Record Found */ +#define SENSE1_FP 0x04 /* File Protected */ +#define SENSE1_WRI 0x02 /* Write Inhibited */ +#define SENSE1_IE 0x01 /* Imprecise Ending */ /* Subchannel information block structure definition */ typedef struct _SCHIB { - PMCW pmcw; /* Path management ctl word */ - SCSW scsw; /* Subchannel status word */ - BYTE moddep[12]; /* Model dependent area */ + PMCW pmcw; /* Path management ctl word */ + SCSW scsw; /* Subchannel status word */ + BYTE moddep[12]; /* Model dependent area */ } SCHIB; /* Interruption response block structure definition */ typedef struct _IRB { - SCSW scsw; /* Subchannel status word */ - ESW esw; /* Extended status word */ - BYTE ecw[32]; /* Extended control word */ + SCSW scsw; /* Subchannel status word */ + ESW esw; /* Extended status word */ + BYTE ecw[32]; /* Extended control word */ } IRB; /* Measurement Block */ typedef struct _MBK { - HWORD srcount; /* SSCH + RSCH count */ - HWORD samplecnt; /* Sample count */ - FWORD dct; /* Device connect time */ - FWORD fpt; /* Function pending time */ - FWORD ddt; /* Device disconnect time */ - FWORD cuqt; /* Control unit queueing time*/ - FWORD resv[3]; /* Reserved */ + HWORD srcount; /* SSCH + RSCH count */ + HWORD samplecnt; /* Sample count */ + FWORD dct; /* Device connect time */ + FWORD fpt; /* Function pending time */ + FWORD ddt; /* Device disconnect time */ + FWORD cuqt; /* Control unit queueing time*/ + FWORD resv[3]; /* Reserved */ } MBK; /* Bit definitions for SCHM instruction */ -#define CHM_GPR1_MBK 0xF0000000 /* Measurement Block Key */ -#define CHM_GPR1_M 0x00000002 /* Measurement mode control */ -#define CHM_GPR1_D 0x00000001 /* Block update Mode */ -#define CHM_GPR1_A 0x01000000 /* Alternate mode */ -#define CHM_GPR1_ZONE 0x00FF0000 /* Zone */ -#define CHM_GPR1_RESV 0x0E00FFFC /* Reserved, must be zero */ +#define CHM_GPR1_MBK 0xF0000000 /* Measurement Block Key */ +#define CHM_GPR1_M 0x00000002 /* Measurement mode control */ +#define CHM_GPR1_D 0x00000001 /* Block update Mode */ +#define CHM_GPR1_A 0x01000000 /* Alternate mode */ +#define CHM_GPR1_ZONE 0x00FF0000 /* Zone */ +#define CHM_GPR1_RESV 0x0E00FFFC /* Reserved, must be zero */ /* Measurement Block Origin */ -#define S_CHM_GPR2_RESV 0x8000001F /* Reserved, must be zero */ -#define Z_CHM_GPR2_RESV 0x0000001F /* Reserved, must be zero */ +#define S_CHM_GPR2_RESV 0x8000001F /* Reserved, must be zero */ +#define Z_CHM_GPR2_RESV 0x0000001F /* Reserved, must be zero */ /* Definitions for PLO instruction */ -#define PLO_GPR0_FC 0x000000FF /* Function code mask */ -#define PLO_GPR0_T 0x00000100 /* Function test mask */ -#define PLO_GPR0_RESV 0xFFFFFE00 /* Reserved bits */ -#define PLO_CL 0 /* Compare and load */ -#define PLO_CLG 1 /* Compare and load */ +#define PLO_GPR0_FC 0x000000FF /* Function code mask */ +#define PLO_GPR0_T 0x00000100 /* Function test mask */ +#define PLO_GPR0_RESV 0xFFFFFE00 /* Reserved bits */ +#define PLO_CL 0 /* Compare and load */ +#define PLO_CLG 1 /* Compare and load */ #define PLO_CLGR 2 /* Compare and load ESAME */ #define PLO_CLX 3 /* Compare and load ESAME */ -#define PLO_CS 4 /* Compare and swap */ -#define PLO_CSG 5 /* Compare and swap */ +#define PLO_CS 4 /* Compare and swap */ +#define PLO_CSG 5 /* Compare and swap */ #define PLO_CSGR 6 /* Compare and swap ESAME */ #define PLO_CSX 7 /* Compare and swap ESAME */ -#define PLO_DCS 8 /* Double compare and swap */ -#define PLO_DCSG 9 /* Double compare and swap */ -#define PLO_DCSGR 10 /* Double c and s ESAME */ -#define PLO_DCSX 11 /* Double c and s ESAME */ -#define PLO_CSST 12 /* Compare and swap and store*/ -#define PLO_CSSTG 13 /* Compare and swap and store*/ -#define PLO_CSSTGR 14 /* C/S/S ESAME */ -#define PLO_CSSTX 15 /* C/S/S ESAME */ -#define PLO_CSDST 16 /* C/S and double store */ -#define PLO_CSDSTG 17 /* C/S and double store */ -#define PLO_CSDSTGR 18 /* C/S/DS ESAME */ -#define PLO_CSDSTX 19 /* C/S/DS ESAME */ -#define PLO_CSTST 20 /* C/S and triple store */ -#define PLO_CSTSTG 21 /* C/S and triple store */ -#define PLO_CSTSTGR 22 /* C/S/TS ESAME */ -#define PLO_CSTSTX 23 /* C/S/TS ESAME */ +#define PLO_DCS 8 /* Double compare and swap */ +#define PLO_DCSG 9 /* Double compare and swap */ +#define PLO_DCSGR 10 /* Double c and s ESAME */ +#define PLO_DCSX 11 /* Double c and s ESAME */ +#define PLO_CSST 12 /* Compare and swap and store*/ +#define PLO_CSSTG 13 /* Compare and swap and store*/ +#define PLO_CSSTGR 14 /* C/S/S ESAME */ +#define PLO_CSSTX 15 /* C/S/S ESAME */ +#define PLO_CSDST 16 /* C/S and double store */ +#define PLO_CSDSTG 17 /* C/S and double store */ +#define PLO_CSDSTGR 18 /* C/S/DS ESAME */ +#define PLO_CSDSTX 19 /* C/S/DS ESAME */ +#define PLO_CSTST 20 /* C/S and triple store */ +#define PLO_CSTSTG 21 /* C/S and triple store */ +#define PLO_CSTSTGR 22 /* C/S/TS ESAME */ +#define PLO_CSTSTX 23 /* C/S/TS ESAME */ /* Bit definitions for Store Facilities List instruction */ -#define STFL_0_N3 0x80 /* Instructions marked N3 in - the reference summary are - available in ESA/390 mode */ +#define STFL_0_N3 0x80 /* Instructions marked N3 in + the reference summary are + available in ESA/390 mode */ #define STFL_0_ESAME_INSTALLED 0x40 /* ESAME mode is available on - this processor */ -#define STFL_0_ESAME_ACTIVE 0x20 /* ESAME mode is active on - this processor */ -#define STFL_2_TRAN_FAC2 0x80 /* Extended translation - facility 2 is installed */ + this processor */ +#define STFL_0_ESAME_ACTIVE 0x20 /* ESAME mode is active on + this processor */ +#define STFL_0_IDTE_INSTALLED 0x10 /* IDTE installed ESAME mode */ +#define STFL_0_IDTE_SC_SEGTAB 0x08 /* IDTE selective clearing + when segtab invalidated */ +#define STFL_0_IDTE_SC_REGTAB 0x04 /* IDTE selective clearing + when regtab invalidated */ +#define STFL_2_TRAN_FAC2 0x80 /* Extended translation + facility 2 is installed */ +#define STFL_2_MSG_SECURITY 0x40 /* Message security assist + feature 2 is installed */ +#define STFL_2_LONG_DISPL_INST 0x20 /* Long displacement facility + is installed */ +#define STFL_2_LONG_DISPL_HPERF 0x10 /* Long displacement facility + has high performance */ +#define STFL_2_HFP_MULT_ADD_SUB 0x08 /* HFP multiply-add/subtract + facility is installed */ /* Bit definitions for the Vector Facility */ #define VSR_M 0x0001000000000000ULL /* Vector mask mode bit */ -#define VSR_VCT 0x0000FFFF00000000ULL /* Vector count */ +#define VSR_VCT 0x0000FFFF00000000ULL /* Vector count */ #define VSR_VIX 0x00000000FFFF0000ULL /* Vector interruption index */ #define VSR_VIU 0x000000000000FF00ULL /* Vector in-use bits */ #define VSR_VIU0 0x0000000000008000ULL /* Vector in-use bit vr0 */ #define VSR_VCH 0x00000000000000FFULL /* Vector change bits */ #define VSR_VCH0 0x0000000000000080ULL /* Vector change bit vr0 */ -#define VSR_RESV 0xFFFE000000000000ULL /* Reserved bits */ +#define VSR_RESV 0xFFFE000000000000ULL /* Reserved bits */ #define VAC_MASK 0x00FFFFFFFFFFFFFFULL /* Vector Activity Count mask*/ -/* SIE Format 1 State Descriptor Block */ +/* SIE Format 1 State Descriptor Block */ typedef struct _SIE1BK { /* SIE State Descriptor */ /*000*/ BYTE v; /* Intervention requests */ #define SIE_V_WAIT 0x10 /* Wait/Run bit */ @@ -1314,8 +1332,8 @@ typedef struct _SIE1BK { /* SIE State Descriptor */ /*0C0*/ BYTE ip[34]; /* Interruption parameters */ #define SIE_IP_PSA_OFFSET 0x40 /* Offset of the IP field relative to the ipfields - in the PSA */ -#define SIE_II_PSA_OFFSET 0x30 /* Offset of the IP field + in the PSA */ +#define SIE_II_PSA_OFFSET 0x30 /* Offset of the IP field relative to the I/O fields in the PSA for ESAME guest*/ /*0E2*/ BYTE xso[3]; /* Expanded storage origin */ @@ -1323,8 +1341,7 @@ typedef struct _SIE1BK { /* SIE State Descriptor */ /*0E8*/ BYTE resvE8b[24]; } SIE1BK; - -/* SIE Format 2 State Descriptor Block */ +/* SIE Format 2 State Descriptor Block */ typedef struct _SIE2BK { /* SIE State Descriptor */ /*000*/ BYTE v; /* Intervention requests */ #define SIE_V_WAIT 0x10 /* Wait/Run bit */ @@ -1476,10 +1493,10 @@ typedef struct _SIE2BK { /* SIE State Descriptor */ /*0BA*/ BYTE xso[3]; /* Expanded storage origin */ /*0BD*/ BYTE xsl[3]; /* Expanded storage limit */ /*0C0*/ BYTE ip[52]; /* Interruption parameters */ -#define SIE_IP_PSA_OFFSET 0x40 /* Offset of the IP field +#define SIE_IP_PSA_OFFSET 0x40 /* Offset of the IP field relative to the ipfields in the PSA for ESAME guest*/ -#define SIE_II_PSA_OFFSET 0x30 /* Offset of the IP field +#define SIE_II_PSA_OFFSET 0x30 /* Offset of the IP field relative to the I/O fields in the PSA for ESAME guest*/ /*0F4*/ BYTE resv0f4b[6]; @@ -1553,7 +1570,7 @@ typedef struct _SIE2BK { /* SIE State Descriptor */ #define SIE_VI_WHY_SCBDY 0x003B /* SCA crosses 4KB boundary */ #define SIE_VI_WHY_APBDY 0x003C /* APCB crosses 4KB boundary */ #define SIE_VI_WHY_MSLEX 0x003D /* MSL exceeds maximum host - address supported for guest + address supported for guest storage (ESAME SIE only) */ #define SIE_VI_WHY_MSDEF 0x0041 /* MSO exceeds MSL (ESAME SIE only) */ #define SIE_VI_WHY_MSDF2 0x0042 /* Alternate for MSDEF detected @@ -1614,98 +1631,104 @@ typedef struct _ZPB2 { bits 0-19 must be 0 */ DWORD msl; /* Main Storage Limit bits 0-19 must be 0 */ -#define ZPB2_MS_VALID 0x00000FFFFFFFFFFF +#define ZPB2_MS_VALID 0x00000FFFFFFFFFFFULL DWORD eso; /* Expanded Storage Origin bits 0-7 must be 0 */ DWORD esl; /* Expanded Storage Limit bits 0-7 must be 0 */ -#define ZPB2_ES_VALID 0x00FFFFFFFFFFFFFF +#define ZPB2_ES_VALID 0x00FFFFFFFFFFFFFFULL } ZPB2; -#define LKPG_GPR0_LOCKBIT 0x00000200 -#define LKPG_GPR0_RESV 0x0000FD00 +#define LKPG_GPR0_LOCKBIT 0x00000200 +#define LKPG_GPR0_RESV 0x0000FD00 -#define STSI_GPR0_FC_MASK 0xF0000000 +#define STSI_GPR0_FC_MASK 0xF0000000 #define STSI_GPR0_FC_CURRENT 0x00000000 -#define STSI_GPR0_FC_BASIC 0x10000000 -#define STSI_GPR0_FC_LPAR 0x20000000 -#define STSI_GPR0_FC_VM 0x30000000 -#define STSI_GPR0_SEL1_MASK 0x000000FF -#define STSI_GPR0_RESERVED 0x0FFFFF00 - -#define STSI_GPR1_SEL2_MASK 0x0000FFFF -#define STSI_GPR1_RESERVED 0xFFFF0000 - -typedef struct _SYSIB111 { /* Basic Machine Configuration */ - BYTE resv1[4*8]; /* Reserved */ - BYTE manufact[4*4]; /* Manufacturer */ - BYTE type[4*1]; /* Type */ - BYTE resv2[4*3]; /* Reserved */ - BYTE model[4*4]; /* Model */ - BYTE seqc[4*4]; /* Sequence Code */ - BYTE plant[4*1]; /* Plant of manufacture */ +#define STSI_GPR0_FC_BASIC 0x10000000 +#define STSI_GPR0_FC_LPAR 0x20000000 +#define STSI_GPR0_FC_VM 0x30000000 +#define STSI_GPR0_SEL1_MASK 0x000000FF +#define STSI_GPR0_RESERVED 0x0FFFFF00 + +#define STSI_GPR1_SEL2_MASK 0x0000FFFF +#define STSI_GPR1_RESERVED 0xFFFF0000 + +#define SIGA_FC_W 0 /* Initiate Output */ +#define SIGA_FC_R 1 /* Initiate Input */ +#define SIGA_FC_S 2 /* Synchronize */ + +#define SIGA_FC_MAX SIGA_FC_S + +typedef struct _SYSIB111 { /* Basic Machine Config */ + BYTE resv1[4*8]; /* Reserved */ + BYTE manufact[4*4]; /* Manufacturer */ + BYTE type[4*1]; /* Type */ + BYTE resv2[4*3]; /* Reserved */ + BYTE model[4*4]; /* Model */ + BYTE seqc[4*4]; /* Sequence Code */ + BYTE plant[4*1]; /* Plant of manufacture */ } SYSIB111; -typedef struct _SYSIB121 { /* Basic Machine CPU */ - BYTE resv1[4*20]; /* Reserved */ - BYTE seqc[4*4]; /* Sequence Code */ - BYTE plant[4*1]; /* Plant of manufacture */ - BYTE resv2[2*1]; /* Reserved */ - BYTE cpuad[2*1]; /* CPU address */ +typedef struct _SYSIB121 { /* Basic Machine CPU */ + BYTE resv1[4*20]; /* Reserved */ + BYTE seqc[4*4]; /* Sequence Code */ + BYTE plant[4*1]; /* Plant of manufacture */ + BYTE resv2[2*1]; /* Reserved */ + BYTE cpuad[2*1]; /* CPU address */ } SYSIB121; -typedef struct _SYSIB122 { /* Basic Machine CPUs */ - BYTE resv1[4*8]; /* Reserved */ - BYTE cap[4*1]; /* CPU capacity */ - BYTE totcpu[2*1]; /* Total CPU count */ - BYTE confcpu[2*1]; /* Configured CPU count */ - BYTE sbcpu[2*1]; /* Standby CPU count */ - BYTE resvcpu[2*1]; /* Reserved CPU count */ - BYTE mpfact[2*MAX_CPU_ENGINES]; /* MP factors */ +typedef struct _SYSIB122 { /* Basic Machine CPUs */ + BYTE resv1[4*8]; /* Reserved */ + BYTE cap[4*1]; /* CPU capacity */ + BYTE totcpu[2*1]; /* Total CPU count */ + BYTE confcpu[2*1]; /* Configured CPU count */ + BYTE sbcpu[2*1]; /* Standby CPU count */ + BYTE resvcpu[2*1]; /* Reserved CPU count */ + BYTE mpfact[2*MAX_CPU_ENGINES]; /* MP factors */ } SYSIB122; -typedef struct _SYSIB221 { /* Logical partition CPU */ - BYTE resv1[4*20]; /* Reserved */ - BYTE seqc[4*4]; /* Logical CPU Sequence Code */ - BYTE lcpuid[2*1]; /* Logical CPU ID */ - BYTE cpuad[2*1]; /* CPU address */ +typedef struct _SYSIB221 { /* Logical partition CPU */ + BYTE resv1[4*20]; /* Reserved */ + BYTE seqc[4*4]; /* Logical CPU Sequence Code */ + BYTE lcpuid[2*1]; /* Logical CPU ID */ + BYTE cpuad[2*1]; /* CPU address */ } SYSIB221; -typedef struct _SYSIB222 { /* Logical partition CPUs */ - BYTE resv1[4*8]; /* Reserved */ - BYTE lparnum[2*1]; /* LPAR number */ - BYTE resv2[1*1]; /* Reserved */ - BYTE lcpuc[1*1]; /* Logical CPU characteristics */ +typedef struct _SYSIB222 { /* Logical partition CPUs */ + BYTE resv1[4*8]; /* Reserved */ + BYTE lparnum[2*1]; /* LPAR number */ + BYTE resv2[1*1]; /* Reserved */ + BYTE lcpuc[1*1]; /* Logical CPU characteristic*/ #define SYSIB222_LCPUC_DEDICATED 0x80 #define SYSIB222_LCPUC_SHARED 0x40 #define SYSIB222_LCPUC_CAPPED 0x20 - BYTE totcpu[2*1]; /* Total CPU count */ - BYTE confcpu[2*1]; /* Configured CPU count */ - BYTE sbcpu[2*1]; /* Standby CPU count */ - BYTE resvcpu[2*1]; /* Reserved CPU count */ - BYTE lparname[4*2]; /* LPAR name */ - BYTE lparcaf[4*1]; /* LPAR capability adjustment */ - BYTE resv3[4*4]; /* Reserved */ - BYTE dedcpu[2*1]; /* Dedicated CPU count */ - BYTE shrcpu[2*1]; /* Shared CPU count */ + BYTE totcpu[2*1]; /* Total CPU count */ + BYTE confcpu[2*1]; /* Configured CPU count */ + BYTE sbcpu[2*1]; /* Standby CPU count */ + BYTE resvcpu[2*1]; /* Reserved CPU count */ + BYTE lparname[4*2]; /* LPAR name */ + BYTE lparcaf[4*1]; /* LPAR capability adjustment*/ + BYTE resv3[4*4]; /* Reserved */ + BYTE dedcpu[2*1]; /* Dedicated CPU count */ + BYTE shrcpu[2*1]; /* Shared CPU count */ } SYSIB222; -typedef struct _SYSIB322 { /* Virtual Machines CPUs */ - BYTE resv1[4*7]; /* Reserved */ - BYTE resv2[3*1]; /* Reserved */ - BYTE dbct; /* Four bit desc block count */ - BYTE vmdb[4*16]; /* Virtual Machine desc block */ +typedef struct _SYSIB322 { /* Virtual Machines CPUs */ + BYTE resv1[4*7]; /* Reserved */ + BYTE resv2[3*1]; /* Reserved */ + BYTE dbct; /* Four bit desc block count */ + BYTE vmdb[4*16]; /* Virtual Machine desc block*/ } SYSIB322; -typedef struct _SYSIBVMDB { /* Virtual Machine Desc Block */ - BYTE resv1[4*1]; /* Reserved */ - BYTE totcpu[2*1]; /* Total CPU count */ - BYTE confcpu[2*1]; /* Configured CPU count */ - BYTE sbcpu[2*1]; /* Standby CPU count */ - BYTE resvcpu[2*1]; /* Reserved CPU count */ - BYTE vmname[4*2]; /* VM userid */ - BYTE vmcaf[4*1]; /* VM capability adjustment */ - BYTE cpid[4*4]; /* Control Program ID */ +typedef struct _SYSIBVMDB { /* Virtual Machine Desc Block*/ + BYTE resv1[4*1]; /* Reserved */ + BYTE totcpu[2*1]; /* Total CPU count */ + BYTE confcpu[2*1]; /* Configured CPU count */ + BYTE sbcpu[2*1]; /* Standby CPU count */ + BYTE resvcpu[2*1]; /* Reserved CPU count */ + BYTE vmname[4*2]; /* VM userid */ + BYTE vmcaf[4*1]; /* VM capability adjustment */ + BYTE cpid[4*4]; /* Control Program ID */ } SYSIBVMDB; /* Bit definitions for floating-point-control register */ diff --git a/esame.c b/esame.c index 0d9a91a..ab17fd6 100644 --- a/esame.c +++ b/esame.c @@ -12,6 +12,7 @@ /* EPSW/EREGG/LMD instructions - Roger Bowler */ /* PKA/PKU/UNPKA/UNPKU instructions - Roger Bowler */ /* Divide logical instructions - Vic Cross */ +/* Long displacement facility - Roger Bowler June2003*/ /*-------------------------------------------------------------------*/ #include "hercules.h" @@ -20,6 +21,9 @@ #include "inline.h" +#define CRYPTO_EXTERN extern +#include "crypto.h" + #if !defined(_LONG_MATH) #define _LONG_MATH /* These routines need to go into inline.h *JJ */ @@ -29,7 +33,7 @@ static inline int add_logical_long(U64 *result, U64 op1, U64 op2) return (*result == 0 ? 0 : 1) | (op1 > *result ? 2 : 0); } /* end add_logical_long() */ - + static inline int sub_logical_long(U64 *result, U64 op1, U64 op2) { @@ -37,7 +41,7 @@ static inline int sub_logical_long(U64 *result, U64 op1, U64 op2) return (*result == 0 ? 0 : 1) | (op1 < *result ? 0 : 2); } /* end sub_logical_long() */ - + static inline int add_signed_long(U64 *result, U64 op1, U64 op2) { @@ -48,7 +52,7 @@ static inline int add_signed_long(U64 *result, U64 op1, U64 op2) (S64)*result < 0 ? 1 : (S64)*result > 0 ? 2 : 0; } /* end add_signed_long() */ - + static inline int sub_signed_long(U64 *result, U64 op1, U64 op2) { @@ -290,7 +294,7 @@ CREG newcr12 = 0; /* CR12 upon completion */ /* Determine the address of the parameter list */ pl_addr = !execflag ? regs->psw.IA : (regs->ET + 4); - + /* Fetch flags from the instruction address space */ abs = LOGICAL_TO_ABS (pl_addr, 0, regs, ACCTYPE_INSTFETCH, regs->psw.pkey); @@ -396,23 +400,20 @@ CREG newcr12 = 0; /* CR12 upon completion */ #endif /*defined(FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE)*/ - /* Privileged Operation exception when setting home + /* Privileged Operation exception when setting home space mode in problem state */ if(!REAL_MODE(®s->psw) && regs->psw.prob && ((psw[2] & 0xC0) == 0xC0) ) ARCH_DEP(program_interrupt) (regs, PGM_PRIVILEGED_OPERATION_EXCEPTION); - obtain_lock(&sysblk.intlock); - #if defined(FEATURE_ESAME) - if(flags & 0x0004) + if(flags & 0x0004) { /* Do not check esame bit (force to zero) */ psw[1] &= ~0x08; if( ARCH_DEP(load_psw) (regs, psw) )/* only check invalid IA not odd */ { - release_lock(&sysblk.intlock); /* restore the psw */ regs->psw = save_psw; /* And generate a program interrupt */ @@ -428,7 +429,6 @@ CREG newcr12 = 0; /* CR12 upon completion */ #endif /*defined(FEATURE_ESAME)*/ if( s390_load_psw(regs, psw) ) { - release_lock(&sysblk.intlock); /* restore the psw */ regs->psw = save_psw; /* And generate a program interrupt */ @@ -439,8 +439,6 @@ CREG newcr12 = 0; /* CR12 upon completion */ #endif /*defined(FEATURE_ESAME)*/ } - release_lock(&sysblk.intlock); - /* load_psw() has set the ILC to zero. This needs to be reset to 4 for an eventual PER event */ regs->psw.ilc = 4; @@ -457,11 +455,11 @@ CREG newcr12 = 0; /* CR12 upon completion */ SET_IC_EXTERNAL_MASK(regs); SET_IC_MCK_MASK(regs); SET_IC_ECIO_MASK(regs); - SET_IC_PSW_WAIT(regs); + SET_IC_PSW_WAIT_MASK(regs); /* Update access register b2 */ regs->AR(b2) = ar; - INVALIDATE_AEA(b2, regs); + INVALIDATE_AEA_AR(b2, regs); /* Update general register b2 */ #if defined(FEATURE_ESAME) @@ -478,7 +476,7 @@ CREG newcr12 = 0; /* CR12 upon completion */ #endif /*FEATURE_TRACING*/ #if defined(FEATURE_PER) - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(regs->psw.IA,regs->CR(10),regs->CR(11)) ) @@ -526,7 +524,7 @@ CREG newcr12 = 0; /* CR12 upon completion */ #if defined(FEATURE_ESAME) && defined(FEATURE_TRACING) /*-------------------------------------------------------------------*/ -/* EB0F TRACG - Trace Long [RSE] */ +/* EB0F TRACG - Trace Long [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(trace_long) { @@ -537,7 +535,7 @@ VADR effective_addr2; /* effective address */ U32 op; /* Operand */ #endif /*defined(FEATURE_TRACING)*/ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); PRIV_CHECK(regs); @@ -570,157 +568,66 @@ U32 op; /* Operand */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E30E CVBG - Convert to Binary Long [RXE] */ +/* E30E CVBG - Convert to Binary Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(convert_to_binary_long) { -int r1; /* Values of R fields */ +U64 dreg; /* 64-bit result accumulator */ +int r1; /* Value of R1 field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ -U64 dreg; /* 64-bit result accumulator */ -int i; /* Loop counter */ -int h, d; /* Decimal digits */ -BYTE sbyte; /* Source operand byte */ -int ovf = 0; /* Overflow indicator */ -U64 oreg = 0; /* 64 bit overflow work reg */ - - RXE(inst, execflag, regs, r1, b2, effective_addr2); - - /* Initialize binary result */ - dreg = 0; - - /* Convert digits to binary */ - for (i = 0; i < 16; i++) - { - /* Load next byte of operand */ - sbyte = ARCH_DEP(vfetchb) ( effective_addr2, b2, regs ); - - /* Isolate high-order and low-order digits */ - h = (sbyte & 0xF0) >> 4; - d = sbyte & 0x0F; +int ovf; /* 1=overflow */ +int dxf; /* 1=data exception */ +BYTE dec[16]; /* Packed decimal operand */ - /* Check for valid high-order digit */ - if (h > 9) - { - regs->dxc = DXC_DECIMAL; - ARCH_DEP(program_interrupt) (regs, PGM_DATA_EXCEPTION); - } - - /* Accumulate high-order digit into result */ - dreg *= 10; - dreg += h; - - /* Set overflow indicator if an overflow has occurred */ - if(dreg < oreg) - ovf = 1; - - /* Save current value */ - oreg = dreg; - - /* Check for valid low-order digit or sign */ - if (i < 15) - { - /* Check for valid low-order digit */ - if (d > 9) - { - regs->dxc = DXC_DECIMAL; - ARCH_DEP(program_interrupt) (regs, PGM_DATA_EXCEPTION); - } - - /* Accumulate low-order digit into result */ - dreg *= 10; - dreg += d; - } - else - { - /* Check for valid sign */ - if (d < 10) - { - regs->dxc = DXC_DECIMAL; - ARCH_DEP(program_interrupt) (regs, PGM_DATA_EXCEPTION); - } - } + RXY(inst, execflag, regs, r1, b2, effective_addr2); - /* Increment operand address */ - effective_addr2++; - effective_addr2 &= ADDRESS_MAXWRAP(regs); + /* Fetch 16-byte packed decimal operand */ + ARCH_DEP(vfetchc) ( dec, 16-1, effective_addr2, b2, regs ); - } /* end for(i) */ + /* Convert 16-byte packed decimal to 64-bit signed binary */ + packed_to_binary (dec, 16-1, &dreg, &ovf, &dxf); - /* Result is negative if sign is X'B' or X'D' */ - if (d == 0x0B || d == 0x0D) + /* Data exception if invalid digits or sign */ + if (dxf) { - if( (S64)dreg == -1LL ) - ovf = 1; - (S64)dreg = -((S64)dreg); + regs->dxc = DXC_DECIMAL; + ARCH_DEP(program_interrupt) (regs, PGM_DATA_EXCEPTION); } - /* Store result into R1 register */ - regs->GR_G(r1) = dreg; - - /* Program check if overflow */ - if ( ovf ) + /* Exception if overflow (operation suppressed, R1 unchanged) */ + if (ovf) ARCH_DEP(program_interrupt) (regs, PGM_FIXED_POINT_DIVIDE_EXCEPTION); + /* Store 64-bit result into R1 register */ + regs->GR_G(r1) = dreg; + } /* end DEF_INST(convert_to_binary_long) */ #endif /*defined(FEATURE_ESAME)*/ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E32E CVDG - Convert to Decimal Long [RXE] */ +/* E32E CVDG - Convert to Decimal Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(convert_to_decimal_long) { -int r1; /* Values of R fields */ +S64 bin; /* Signed value to convert */ +int r1; /* Value of R1 field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ -U64 n; /* Absolute value to convert */ -BYTE result[16]; /* 31-digit signed result */ -int i; /* Array subscript */ -int d; /* Decimal digit or sign */ +BYTE dec[16]; /* Packed decimal result */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); - /* Special case when R1 is maximum negative value */ - if (regs->GR_G(r1) == 0x8000000000000000ULL) - { - memcpy (result, - "\x00\x00\x00\x00\x00\x00\x92\x23" - "\x37\x20\x36\x85\x47\x75\x80\x8D", - sizeof(result)); - } - else - { - /* Load absolute value and generate sign */ - if (regs->GR_G(r1) < 0x8000000000000000ULL) - { - /* Value is positive */ - n = regs->GR_G(r1); - d = 0x0C; - } - else - { - /* Value is negative */ - n = -((S64)(regs->GR_G(r1))); - d = 0x0D; - } + /* Load signed value of register */ + bin = (S64)(regs->GR_G(r1)); - /* Store sign and decimal digits from right to left */ - memset (result, 0, 16); - for (i = 16 - 1; d != 0 || n != 0; i--) - { - result[i] = d; - d = n % 10; - n /= 10; - result[i] |= (d << 4); - d = n % 10; - n /= 10; - } - } + /* Convert to 16-byte packed decimal number */ + binary_to_packed (bin, dec); /* Store 16-byte packed decimal result at operand address */ - ARCH_DEP(vstorec) ( result, 16-1, effective_addr2, b2, regs ); + ARCH_DEP(vstorec) ( dec, 16-1, effective_addr2, b2, regs ); } /* end DEF_INST(convert_to_decimal_long) */ #endif /*defined(FEATURE_ESAME)*/ @@ -728,7 +635,7 @@ int d; /* Decimal digit or sign */ #if defined(FEATURE_ESAME_N3_ESA390) || defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E396 ML - Multiply Logical [RXE] */ +/* E396 ML - Multiply Logical [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(multiply_logical) { @@ -738,7 +645,7 @@ VADR effective_addr2; /* Effective Address */ U32 m; U64 p; - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); ODD_CHECK(r1, regs); @@ -758,7 +665,7 @@ U64 p; #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E386 MLG - Multiply Logical Long [RXE] */ +/* E386 MLG - Multiply Logical Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(multiply_logical_long) { @@ -767,7 +674,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective Address */ U64 m, ph, pl; - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); ODD_CHECK(r1, regs); @@ -835,21 +742,21 @@ U64 ph, pl; #if defined(FEATURE_ESAME_N3_ESA390) || defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E397 DL - Divide Logical [RXE] */ +/* E397 DL - Divide Logical [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(divide_logical) { int r1; /* Values of R fields */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective Address */ -U32 d; +U32 d; U64 n; - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); ODD_CHECK(r1, regs); - n = ((U64)regs->GR_L(r1) << 32) | (U32)regs->GR_L(r1 + 1); + n = ((U64)regs->GR_L(r1) << 32) | (U32)regs->GR_L(r1 + 1); /* Load second operand from operand address */ d = ARCH_DEP(vfetch4) (effective_addr2, b2, regs); @@ -868,7 +775,7 @@ U64 n; #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E387 DLG - Divide Logical Long [RXE] */ +/* E387 DLG - Divide Logical Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(divide_logical_long) { @@ -877,7 +784,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective Address */ U64 d, r, q; - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); ODD_CHECK(r1, regs); @@ -897,7 +804,7 @@ U64 d, r, q; { if (div_logical_long(&r, &q, regs->GR_G(r1), regs->GR_G(r1 + 1), d) ) ARCH_DEP(program_interrupt) (regs, PGM_FIXED_POINT_DIVIDE_EXCEPTION); - else + else { regs->GR_G(r1) = r; regs->GR_G(r1 + 1) = q; @@ -966,7 +873,7 @@ U64 r, q, d; { if (div_logical_long(&r, &q, regs->GR_G(r1), regs->GR_G(r1 + 1), d) ) ARCH_DEP(program_interrupt) (regs, PGM_FIXED_POINT_DIVIDE_EXCEPTION); - else + else { regs->GR_G(r1) = r; regs->GR_G(r1 + 1) = q; @@ -1035,7 +942,7 @@ U64 n; #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E388 ALCG - Add Logical with Carry Long [RXE] */ +/* E388 ALCG - Add Logical with Carry Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(add_logical_carry_long) { @@ -1045,7 +952,7 @@ VADR effective_addr2; /* Effective address */ U64 n; /* 64-bit operand values */ int carry = 0; - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch8) ( effective_addr2, b2, regs ); @@ -1066,7 +973,7 @@ int carry = 0; #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E389 SLBG - Subtract Logical with Borrow Long [RXE] */ +/* E389 SLBG - Subtract Logical with Borrow Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(subtract_logical_borrow_long) { @@ -1076,7 +983,7 @@ VADR effective_addr2; /* Effective address */ U64 n; /* 64-bit operand values */ int borrow = 2; - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch8) ( effective_addr2, b2, regs ); @@ -1155,7 +1062,7 @@ U32 n; #if defined(FEATURE_ESAME_N3_ESA390) || defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E398 ALC - Add Logical with Carry [RXE] */ +/* E398 ALC - Add Logical with Carry [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(add_logical_carry) { @@ -1165,7 +1072,7 @@ VADR effective_addr2; /* Effective address */ U32 n; /* 32-bit operand values */ int carry = 0; - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); @@ -1186,7 +1093,7 @@ int carry = 0; #if defined(FEATURE_ESAME_N3_ESA390) || defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E399 SLB - Subtract Logical with Borrow [RXE] */ +/* E399 SLB - Subtract Logical with Borrow [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(subtract_logical_borrow) { @@ -1196,7 +1103,7 @@ VADR effective_addr2; /* Effective address */ U32 n; /* 32-bit operand values */ int borrow = 2; - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); @@ -1218,7 +1125,7 @@ int borrow = 2; #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E30D DSG - Divide Single Long [RXE] */ +/* E30D DSG - Divide Single Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(divide_single_long) { @@ -1227,7 +1134,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U64 n; /* 64-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); ODD_CHECK(r1, regs); @@ -1248,7 +1155,7 @@ U64 n; /* 64-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E31D DSGF - Divide Single Long Fullword [RXE] */ +/* E31D DSGF - Divide Single Long Fullword [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(divide_single_long_fullword) { @@ -1257,7 +1164,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U32 n; /* 64-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); ODD_CHECK(r1, regs); @@ -1334,7 +1241,7 @@ U32 n; #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E390 LLGC - Load Logical Character [RXE] */ +/* E390 LLGC - Load Logical Character [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(load_logical_character) { @@ -1342,7 +1249,7 @@ int r1; /* Value of R field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); regs->GR_G(r1) = ARCH_DEP(vfetchb) ( effective_addr2, b2, regs ); @@ -1352,7 +1259,7 @@ VADR effective_addr2; /* Effective address */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E391 LLGH - Load Logical Halfword [RXE] */ +/* E391 LLGH - Load Logical Halfword [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(load_logical_halfword) { @@ -1360,7 +1267,7 @@ int r1; /* Value of R field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); regs->GR_G(r1) = ARCH_DEP(vfetch2) ( effective_addr2, b2, regs ); @@ -1370,7 +1277,7 @@ VADR effective_addr2; /* Effective address */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E38E STPQ - Store Pair to Quadword [RXE] */ +/* E38E STPQ - Store Pair to Quadword [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(store_pair_to_quadword) { @@ -1379,7 +1286,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ QWORD qwork; /* Quadword work area */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); ODD_CHECK(r1, regs); @@ -1390,7 +1297,7 @@ QWORD qwork; /* Quadword work area */ STORE_DW(qwork+8, regs->GR_G(r1+1)); /* Store R1 and R1+1 registers to second operand - Provide storage consistancy by means of obtaining + Provide storage consistancy by means of obtaining the main storage access lock */ OBTAIN_MAINLOCK(regs); ARCH_DEP(vstorec) ( qwork, 16-1, effective_addr2, b2, regs ); @@ -1402,7 +1309,7 @@ QWORD qwork; /* Quadword work area */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E38F LPQ - Load Pair from Quadword [RXE] */ +/* E38F LPQ - Load Pair from Quadword [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(load_pair_from_quadword) { @@ -1411,14 +1318,14 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ QWORD qwork; /* Quadword work area */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); ODD_CHECK(r1, regs); QW_CHECK(effective_addr2, regs); /* Load R1 and R1+1 registers contents from second operand - Provide storage consistancy by means of obtaining + Provide storage consistancy by means of obtaining the main storage access lock */ OBTAIN_MAINLOCK(regs); ARCH_DEP(vfetchc) ( qwork, 16-1, effective_addr2, b2, regs ); @@ -1453,7 +1360,11 @@ VADR lsea; /* Linkage stack entry addr */ /* Load registers from the stack entry */ ARCH_DEP(unstack_registers) (1, lsea, r1, r2, regs); - INVALIDATE_AEA_ALL(regs); + if (r1 == r2) + INVALIDATE_AEA_AR(r1, regs); + else + INVALIDATE_AEA_ARALL(regs); + } /* end DEF_INST(extract_stacked_registers_long) */ #endif /*defined(FEATURE_ESAME)*/ @@ -1869,7 +1780,7 @@ U32 i2; /* 32-bit operand values */ regs->psw.IA = ((!execflag ? (regs->psw.IA - 6) : regs->ET) + 2LL*(S32)i2) & ADDRESS_MAXWRAP(regs); #if defined(FEATURE_PER) - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(regs->psw.IA,regs->CR(10),regs->CR(11)) ) @@ -1878,6 +1789,7 @@ U32 i2; /* 32-bit operand values */ ON_IC_PER_SB(regs); #endif /*defined(FEATURE_PER)*/ } + } /* end DEF_INST(branch_relative_on_condition_long) */ #endif /*defined(FEATURE_ESAME_N3_ESA390) || defined(FEATURE_ESAME)*/ @@ -1909,7 +1821,7 @@ U32 i2; /* 32-bit operand values */ + 2LL*(S32)i2) & ADDRESS_MAXWRAP(regs); #if defined(FEATURE_PER) - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(regs->psw.IA,regs->CR(10),regs->CR(11)) ) @@ -1917,13 +1829,14 @@ U32 i2; /* 32-bit operand values */ ) ON_IC_PER_SB(regs); #endif /*defined(FEATURE_PER)*/ + } /* end DEF_INST(branch_relative_and_save_long) */ #endif /*defined(FEATURE_ESAME_N3_ESA390) || defined(FEATURE_ESAME)*/ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB20 CLMH - Compare Logical Characters under Mask High [RSE] */ +/* EB20 CLMH - Compare Logical Characters under Mask High [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(compare_logical_characters_under_mask_high) { @@ -1936,7 +1849,7 @@ BYTE sbyte, dbyte; /* Byte work areas */ int i; /* Integer work areas */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); /* Load value from register */ n = regs->GR_H(r1); @@ -1944,7 +1857,7 @@ int i; /* Integer work areas */ /* if mask is zero, access rupts recognized for 1 byte */ if (r3 == 0) sbyte = ARCH_DEP(vfetchb) ( effective_addr2, b2, regs ); - + /* Compare characters in register with operand characters */ for ( i = 0; i < 4; i++ ) { @@ -1978,7 +1891,7 @@ int i; /* Integer work areas */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB2C STCMH - Store Characters under Mask High [RSE] */ +/* EB2C STCMH - Store Characters under Mask High [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(store_characters_under_mask_high) { @@ -1989,7 +1902,7 @@ U32 n; /* 32-bit operand values */ int i, j; /* Integer work areas */ BYTE cwork[4]; /* Character work areas */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); /* Load value from register */ n = regs->GR_H(r1); @@ -2030,7 +1943,7 @@ BYTE cwork[4]; /* Character work areas */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB80 ICMH - Insert Characters under Mask High [RSE] */ +/* EB80 ICMH - Insert Characters under Mask High [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(insert_characters_under_mask_high) { @@ -2042,7 +1955,7 @@ BYTE tbyte; /* Byte work areas */ int h, i; /* Integer work areas */ U64 dreg; /* Double register work area */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); /* If the mask is all zero, we must nevertheless load one byte from the storage operand, because POP requires us @@ -2127,7 +2040,7 @@ S64 i,j; /* Integer workareas */ regs->psw.IA = ((!execflag ? (regs->psw.IA - 6) : regs->ET) + 2LL*(S32)i2) & ADDRESS_MAXWRAP(regs); #if defined(FEATURE_PER) - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(regs->psw.IA,regs->CR(10),regs->CR(11)) ) @@ -2168,7 +2081,7 @@ S64 i,j; /* Integer workareas */ regs->psw.IA = ((!execflag ? (regs->psw.IA - 6) : regs->ET) + 2LL*(S32)i2) & ADDRESS_MAXWRAP(regs); #if defined(FEATURE_PER) - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(regs->psw.IA,regs->CR(10),regs->CR(11)) ) @@ -2184,7 +2097,7 @@ S64 i,j; /* Integer workareas */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB44 BXHG - Branch on Index High Long [RSE] */ +/* EB44 BXHG - Branch on Index High Long [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(branch_on_index_high_long) { @@ -2193,7 +2106,7 @@ int b2; /* effective address base */ VADR effective_addr2; /* effective address */ S64 i, j; /* Integer work areas */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); /* Load the increment value from the R3 register */ i = (S64)regs->GR_G(r3); @@ -2209,7 +2122,7 @@ S64 i, j; /* Integer work areas */ { regs->psw.IA = effective_addr2; #if defined(FEATURE_PER) - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(effective_addr2,regs->CR(10),regs->CR(11)) ) @@ -2225,7 +2138,7 @@ S64 i, j; /* Integer work areas */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB45 BXLEG - Branch on Index Low or Equal Long [RSE] */ +/* EB45 BXLEG - Branch on Index Low or Equal Long [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(branch_on_index_low_or_equal_long) { @@ -2234,7 +2147,7 @@ int b2; /* effective address base */ VADR effective_addr2; /* effective address */ S64 i, j; /* Integer work areas */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); /* Load the increment value from the R3 register */ i = regs->GR_G(r3); @@ -2250,7 +2163,7 @@ S64 i, j; /* Integer work areas */ { regs->psw.IA = effective_addr2; #if defined(FEATURE_PER) - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(effective_addr2,regs->CR(10),regs->CR(11)) ) @@ -2266,7 +2179,7 @@ S64 i, j; /* Integer work areas */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB30 CSG - Compare and Swap Long [RSE] */ +/* EB30 CSG - Compare and Swap Long [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(compare_and_swap_long) { @@ -2274,8 +2187,9 @@ int r1, r3; /* Register numbers */ int b2; /* effective address base */ VADR effective_addr2; /* effective address */ RADR abs2; /* absolute address */ +U64 old; /* old value */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); DW_CHECK(effective_addr2, regs); @@ -2286,11 +2200,14 @@ RADR abs2; /* absolute address */ abs2 = LOGICAL_TO_ABS (effective_addr2, b2, regs, ACCTYPE_WRITE, regs->psw.pkey); + /* Get old value */ + old = CSWAP64(regs->GR_G(r1)); + /* Obtain main-storage access lock */ OBTAIN_MAINLOCK(regs); /* Attempt to exchange the values */ - regs->psw.cc = cmpxchg8 (®s->GR_G(r1), regs->GR_G(r3), regs->mainstor + abs2); + regs->psw.cc = cmpxchg8 (&old, CSWAP64(regs->GR_G(r3)), regs->mainstor + abs2); /* Release main-storage access lock */ RELEASE_MAINLOCK(regs); @@ -2300,6 +2217,7 @@ RADR abs2; /* absolute address */ if (regs->psw.cc == 1) { + regs->GR_G(r1) = CSWAP64(old); #if defined(_FEATURE_ZSIE) if((regs->sie_state && (regs->siebk->ic[0] & SIE_IC0_CS1))) { @@ -2320,7 +2238,7 @@ RADR abs2; /* absolute address */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB3E CDSG - Compare Double and Swap Long [RSE] */ +/* EB3E CDSG - Compare Double and Swap Long [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(compare_double_and_swap_long) { @@ -2328,8 +2246,9 @@ int r1, r3; /* Register numbers */ int b2; /* effective address base */ VADR effective_addr2; /* effective address */ RADR abs2; /* absolute address */ +U64 old1, old2; /* old value */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); ODD2_CHECK(r1, r3, regs); @@ -2342,13 +2261,16 @@ RADR abs2; /* absolute address */ abs2 = LOGICAL_TO_ABS (effective_addr2, b2, regs, ACCTYPE_WRITE, regs->psw.pkey); + /* Get old values */ + old1 = CSWAP64(regs->GR_G(r1)); + old2 = CSWAP64(regs->GR_G(r1+1)); + /* Obtain main-storage access lock */ OBTAIN_MAINLOCK(regs); - /* Attempt to exchange the values */ - regs->psw.cc = cmpxchg16 (®s->GR_G(r1), ®s->GR_G(r1+1), - regs->GR_G(r3), regs->GR_G(r3+1), + regs->psw.cc = cmpxchg16 (&old1, &old2, + CSWAP64(regs->GR_G(r3)), CSWAP64(regs->GR_G(r3+1)), regs->mainstor + abs2); /* Release main-storage access lock */ @@ -2359,6 +2281,8 @@ RADR abs2; /* absolute address */ if (regs->psw.cc == 1) { + regs->GR_G(r1) = CSWAP64(old1); + regs->GR_G(r1+1) = CSWAP64(old2); #if defined(_FEATURE_ZSIE) if(regs->sie_state && (regs->siebk->ic[0] & SIE_IC0_CS1)) { @@ -2379,7 +2303,7 @@ RADR abs2; /* absolute address */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E346 BCTG - Branch on Count Long [RXE] */ +/* E346 BCTG - Branch on Count Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(branch_on_count_long) { @@ -2387,14 +2311,14 @@ int r1; /* Value of R field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Subtract 1 from the R1 operand and branch if non-zero */ if ( --(regs->GR_G(r1)) ) { regs->psw.IA = effective_addr2; #if defined(FEATURE_PER) - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(effective_addr2,regs->CR(10),regs->CR(11)) ) @@ -2428,7 +2352,7 @@ VADR newia; /* New instruction address */ { regs->psw.IA = newia; #if defined(FEATURE_PER) - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(newia,regs->CR(10),regs->CR(11)) ) @@ -2482,7 +2406,7 @@ int r1, r2; /* Values of R fields */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E320 CG - Compare Long [RXE] */ +/* E320 CG - Compare Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(compare_long) { @@ -2491,7 +2415,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U64 n; /* 64-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch8) ( effective_addr2, b2, regs ); @@ -2507,7 +2431,7 @@ U64 n; /* 64-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E330 CGF - Compare Long Fullword [RXE] */ +/* E330 CGF - Compare Long Fullword [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(compare_long_fullword) { @@ -2516,7 +2440,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U32 n; /* 32-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); @@ -2532,7 +2456,7 @@ U32 n; /* 32-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E30A ALG - Add Logical Long [RXE] */ +/* E30A ALG - Add Logical Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(add_logical_long) { @@ -2541,7 +2465,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U64 n; /* 64-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch8) ( effective_addr2, b2, regs ); @@ -2557,7 +2481,7 @@ U64 n; /* 64-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E31A ALGF - Add Logical Long Fullword [RXE] */ +/* E31A ALGF - Add Logical Long Fullword [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(add_logical_long_fullword) { @@ -2566,7 +2490,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U32 n; /* 32-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); @@ -2582,7 +2506,7 @@ U32 n; /* 32-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E318 AGF - Add Long Fullword [RXE] */ +/* E318 AGF - Add Long Fullword [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(add_long_fullword) { @@ -2591,7 +2515,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U32 n; /* 32-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); @@ -2611,7 +2535,7 @@ U32 n; /* 32-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E308 AG - Add Long [RXE] */ +/* E308 AG - Add Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(add_long) { @@ -2620,7 +2544,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U64 n; /* 64-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch8) ( effective_addr2, b2, regs ); @@ -2640,7 +2564,7 @@ U64 n; /* 64-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E30B SLG - Subtract Logical Long [RXE] */ +/* E30B SLG - Subtract Logical Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(subtract_logical_long) { @@ -2649,7 +2573,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U64 n; /* 64-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch8) ( effective_addr2, b2, regs ); @@ -2665,7 +2589,7 @@ U64 n; /* 64-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E31B SLGF - Subtract Logical Long Fullword [RXE] */ +/* E31B SLGF - Subtract Logical Long Fullword [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(subtract_logical_long_fullword) { @@ -2674,7 +2598,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U32 n; /* 32-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); @@ -2690,7 +2614,7 @@ U32 n; /* 32-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E319 SGF - Subtract Long Fullword [RXE] */ +/* E319 SGF - Subtract Long Fullword [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(subtract_long_fullword) { @@ -2699,7 +2623,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U32 n; /* 32-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); @@ -2719,7 +2643,7 @@ U32 n; /* 32-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E309 SG - Subtract Long [RXE] */ +/* E309 SG - Subtract Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(subtract_long) { @@ -2728,7 +2652,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U64 n; /* 64-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch8) ( effective_addr2, b2, regs ); @@ -3107,7 +3031,7 @@ U16 i2; /* 16-bit operand values */ regs->psw.IA = ((!execflag ? (regs->psw.IA - 4) : regs->ET) + 2*(S16)i2) & ADDRESS_MAXWRAP(regs); #if defined(FEATURE_PER) - if( EN_IC_PER_SB(regs) + if( EN_IC_PER_SB(regs) #if defined(FEATURE_PER2) && ( !(regs->CR(9) & CR9_BAC) || PER_RANGE_CHECK(regs->psw.IA,regs->CR(10),regs->CR(11)) ) @@ -3122,7 +3046,7 @@ U16 i2; /* 16-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E321 CLG - Compare Logical long [RXE] */ +/* E321 CLG - Compare Logical long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(compare_logical_long) { @@ -3131,7 +3055,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U64 n; /* 64-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch8) ( effective_addr2, b2, regs ); @@ -3146,7 +3070,7 @@ U64 n; /* 64-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E331 CLGF - Compare Logical long fullword [RXE] */ +/* E331 CLGF - Compare Logical long fullword [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(compare_logical_long_fullword) { @@ -3155,7 +3079,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U32 n; /* 32-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); @@ -3222,7 +3146,7 @@ int r1, r2; /* Values of R fields */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB1C RLLG - Rotate Left Single Logical Long [RSE] */ +/* EB1C RLLG - Rotate Left Single Logical Long [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(rotate_left_single_logical_long) { @@ -3231,7 +3155,7 @@ int b2; /* effective address base */ VADR effective_addr2; /* effective address */ U64 n; /* Integer work areas */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); /* Use rightmost six bits of operand address as shift count */ n = effective_addr2 & 0x3F; @@ -3246,16 +3170,16 @@ U64 n; /* Integer work areas */ #if defined(FEATURE_ESAME_N3_ESA390) || defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB1D RLL - Rotate Left Single Logical [RSE] */ +/* EB1D RLL - Rotate Left Single Logical [RSY] */ /*-------------------------------------------------------------------*/ -DEF_INST(rotate_left_single_logical) +DEF_INST(rotate_left_single_logical) { int r1, r3; /* Register numbers */ int b2; /* effective address base */ VADR effective_addr2; /* effective address */ U64 n; /* Integer work areas */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); /* Use rightmost five bits of operand address as shift count */ n = effective_addr2 & 0x1F; @@ -3270,7 +3194,7 @@ U64 n; /* Integer work areas */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB0D SLLG - Shift Left Single Logical Long [RSE] */ +/* EB0D SLLG - Shift Left Single Logical Long [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(shift_left_single_logical_long) { @@ -3279,7 +3203,7 @@ int b2; /* effective address base */ VADR effective_addr2; /* effective address */ U64 n; /* Integer work areas */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); /* Use rightmost six bits of operand address as shift count */ n = effective_addr2 & 0x3F; @@ -3293,7 +3217,7 @@ U64 n; /* Integer work areas */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB0C SRLG - Shift Right Single Logical Long [RSE] */ +/* EB0C SRLG - Shift Right Single Logical Long [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(shift_right_single_logical_long) { @@ -3302,7 +3226,7 @@ int b2; /* effective address base */ VADR effective_addr2; /* effective address */ U64 n; /* Integer work areas */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); /* Use rightmost six bits of operand address as shift count */ n = effective_addr2 & 0x3F; @@ -3316,7 +3240,7 @@ U64 n; /* Integer work areas */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB0B SLAG - Shift Left Single Long [RSE] */ +/* EB0B SLAG - Shift Left Single Long [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(shift_left_single_long) { @@ -3326,7 +3250,7 @@ VADR effective_addr2; /* effective address */ U64 n, n1, n2; /* 64-bit operand values */ U32 i, j; /* Integer work areas */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); /* Use rightmost six bits of operand address as shift count */ n = effective_addr2 & 0x3F; @@ -3368,7 +3292,7 @@ U32 i, j; /* Integer work areas */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB0A SRAG - Shift Right single Long [RSE] */ +/* EB0A SRAG - Shift Right single Long [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(shift_right_single_long) { @@ -3377,7 +3301,7 @@ int b2; /* effective address base */ VADR effective_addr2; /* effective address */ U64 n; /* Integer work areas */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); /* Use rightmost six bits of operand address as shift count */ n = effective_addr2 & 0x3F; @@ -3397,7 +3321,7 @@ U64 n; /* Integer work areas */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E31C MSGF - Multiply Single Long Fullword [RXE] */ +/* E31C MSGF - Multiply Single Long Fullword [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(multiply_single_long_fullword) { @@ -3406,7 +3330,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U32 n; /* 32-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); @@ -3420,7 +3344,7 @@ U32 n; /* 32-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E30C MSG - Multiply Single Long [RXE] */ +/* E30C MSG - Multiply Single Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(multiply_single_long) { @@ -3429,7 +3353,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U64 n; /* 64-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch8) ( effective_addr2, b2, regs ); @@ -3612,7 +3536,7 @@ int r1, r2; /* Values of R fields */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E380 NG - And Long [RXE] */ +/* E380 NG - And Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(and_long) { @@ -3621,7 +3545,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U64 n; /* 64-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch8) ( effective_addr2, b2, regs ); @@ -3635,7 +3559,7 @@ U64 n; /* 64-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E381 OG - Or Long [RXE] */ +/* E381 OG - Or Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(or_long) { @@ -3644,7 +3568,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U64 n; /* 64-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch8) ( effective_addr2, b2, regs ); @@ -3658,7 +3582,7 @@ U64 n; /* 64-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E382 XG - Exclusive Or Long [RXE] */ +/* E382 XG - Exclusive Or Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(exclusive_or_long) { @@ -3667,7 +3591,7 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ U64 n; /* 64-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load second operand from operand address */ n = ARCH_DEP(vfetch8) ( effective_addr2, b2, regs ); @@ -3853,7 +3777,7 @@ BYTE rworkh[64], rworkl[64]; /* High and low halves of new #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB96 LMH - Load Multiple High [RSE] */ +/* EB96 LMH - Load Multiple High [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(load_multiple_high) { @@ -3863,7 +3787,7 @@ VADR effective_addr2; /* effective address */ int i, d; /* Integer work areas */ BYTE rwork[64]; /* Character work areas */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); /* Calculate the number of bytes to be loaded */ d = (((r3 < r1) ? r3 + 16 - r1 : r3 - r1) + 1) * 4; @@ -3890,7 +3814,7 @@ BYTE rwork[64]; /* Character work areas */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB04 LMG - Load Multiple Long [RSE] */ +/* EB04 LMG - Load Multiple Long [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(load_multiple_long) { @@ -3900,7 +3824,7 @@ VADR effective_addr2; /* Effective address */ int i, d; /* Integer work areas */ BYTE rwork[128]; /* Register work areas */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); /* Calculate the number of bytes to be loaded */ d = (((r3 < r1) ? r3 + 16 - r1 : r3 - r1) + 1) * 8; @@ -3927,7 +3851,7 @@ BYTE rwork[128]; /* Register work areas */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB25 STCTG - Store Control Long [RSE] */ +/* EB25 STCTG - Store Control Long [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(store_control_long) { @@ -3937,7 +3861,7 @@ VADR effective_addr2; /* Effective address */ int i, d; /* Integer work areas */ BYTE rwork[128]; /* Register work areas */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); PRIV_CHECK(regs); @@ -3970,7 +3894,7 @@ BYTE rwork[128]; /* Register work areas */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB2F LCTLG - Load Control Long [RSE] */ +/* EB2F LCTLG - Load Control Long [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(load_control_long) { @@ -3979,8 +3903,9 @@ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ int i, d; /* Integer work areas */ BYTE rwork[128]; /* Register work areas */ +int inval = 0; /* Invalidation flag */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); PRIV_CHECK(regs); @@ -4008,13 +3933,40 @@ BYTE rwork[128]; /* Register work areas */ /* Fetch new control register contents from operand address */ ARCH_DEP(vfetchc) ( rwork, d-1, effective_addr2, b2, regs ); - INVALIDATE_AIA(regs); - - INVALIDATE_AEA_ALL(regs); - /* Load control registers from work area */ for ( i = r1, d = 0; ; ) { + /* Check for invalidation */ + if (!inval) { + switch (i) { + case 0: + if ((fetch_dw(rwork + d) & CR0_TRAN_FMT) != (regs->CR(0) & CR0_TRAN_FMT)) + inval = 1; + break; + case 1: + case 2: + case 3: + case 4: + case 5: + case 7: + case 13: + if (fetch_dw(rwork + d) != regs->CR(i)) + inval = 1; + break; + case 8: + if ((fetch_dw(rwork + d) & CR8_EAX) != (regs->CR(8) & CR8_EAX)) + inval = 1; + break; + case 14: + if ((fetch_dw(rwork + d) & (CR14_ASN_TRAN|CR14_AFTO)) + != (regs->CR(14) & (CR14_ASN_TRAN|CR14_AFTO))) + inval = 1; + break; + default: + break; + } + } + /* Load one control register from work area */ FETCH_DW(regs->CR_G(i), rwork + d); d += 8; @@ -4025,6 +3977,13 @@ BYTE rwork[128]; /* Register work areas */ i++; i &= 15; } + /* Conditionally invalidate the AIA and AEA buffers */ + if (inval) + { + INVALIDATE_AIA(regs); + INVALIDATE_AEA_ALL(regs); + } + SET_IC_EXTERNAL_MASK(regs); SET_IC_MCK_MASK(regs); SET_IC_PER_MASK(regs); @@ -4038,7 +3997,7 @@ BYTE rwork[128]; /* Register work areas */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB24 STMG - Store Multiple Long [RSE] */ +/* EB24 STMG - Store Multiple Long [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(store_multiple_long) { @@ -4048,7 +4007,7 @@ VADR effective_addr2; /* Effective address */ int i, d; /* Integer work areas */ BYTE rwork[128]; /* Register work areas */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); /* Copy control registers into work area */ for ( i = r1, d = 0; ; ) @@ -4072,7 +4031,7 @@ BYTE rwork[128]; /* Register work areas */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* EB26 STMH - Store Multiple High [RSE] */ +/* EB26 STMH - Store Multiple High [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(store_multiple_high) { @@ -4082,7 +4041,7 @@ VADR effective_addr2; /* effective address */ int i, d; /* Integer work area */ BYTE rwork[64]; /* Register work area */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); /* Copy register contents into work area */ for ( i = r1, d = 0; ; ) @@ -4274,7 +4233,7 @@ DEF_INST(set_addressing_mode_64) #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E324 STG - Store Long [RXE] */ +/* E324 STG - Store Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(store_long) { @@ -4282,7 +4241,7 @@ int r1; /* Values of R fields */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Store register contents at operand address */ ARCH_DEP(vstore8) ( regs->GR_G(r1), effective_addr2, b2, regs ); @@ -4326,7 +4285,7 @@ RADR n; /* 64-bit operand values */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E304 LG - Load Long [RXE] */ +/* E304 LG - Load Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(load_long) { @@ -4334,7 +4293,7 @@ int r1; /* Value of R field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load R1 register from second operand */ regs->GR_G(r1) = ARCH_DEP(vfetch8) ( effective_addr2, b2, regs ); @@ -4345,7 +4304,7 @@ VADR effective_addr2; /* Effective address */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E314 LGF - Load Long Fullword [RXE] */ +/* E314 LGF - Load Long Fullword [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(load_long_fullword) { @@ -4353,7 +4312,7 @@ int r1; /* Value of R field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load R1 register from second operand */ (S64)regs->GR_G(r1) = (S32)ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); @@ -4364,7 +4323,7 @@ VADR effective_addr2; /* Effective address */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E315 LGH - Load Long Halfword [RXE] */ +/* E315 LGH - Load Long Halfword [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(load_long_halfword) { @@ -4372,7 +4331,7 @@ int r1; /* Value of R field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load R1 register from second operand */ (S64)regs->GR_G(r1) = (S16)ARCH_DEP(vfetch2) ( effective_addr2, b2, regs ); @@ -4383,7 +4342,7 @@ VADR effective_addr2; /* Effective address */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E316 LLGF - Load Logical Long Fullword [RXE] */ +/* E316 LLGF - Load Logical Long Fullword [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(load_logical_long_fullword) { @@ -4391,7 +4350,7 @@ int r1; /* Value of R field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load R1 register from second operand */ regs->GR_G(r1) = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); @@ -4402,7 +4361,7 @@ VADR effective_addr2; /* Effective address */ #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E317 LLGT - Load Logical Long Thirtyone [RXE] */ +/* E317 LLGT - Load Logical Long Thirtyone [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(load_logical_long_thirtyone) { @@ -4410,7 +4369,7 @@ int r1; /* Value of R field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load R1 register from second operand */ regs->GR_G(r1) = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ) @@ -4450,10 +4409,7 @@ int rc; ARCH_DEP(vfetchc) ( qword, 16-1, effective_addr2, b2, regs ); /* Load updated PSW */ - obtain_lock(&sysblk.intlock); - rc = ARCH_DEP(load_psw) ( regs, qword ); - release_lock(&sysblk.intlock); - if ( rc ) + if ( ( rc = ARCH_DEP(load_psw) ( regs, qword ) ) ) ARCH_DEP(program_interrupt) (regs, rc); /* load_psw() has set the ILC to zero. This needs to @@ -4472,7 +4428,7 @@ int rc; #if defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E303 LRAG - Load Real Address Long [RXE] */ +/* E303 LRAG - Load Real Address Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(load_real_address_long) { @@ -4486,7 +4442,7 @@ int stid; /* Segment table indication */ int cc; /* Condition code */ RADR n; /* 64-bit operand values */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); SIE_MODE_XC_OPEX(regs); @@ -4526,7 +4482,41 @@ RADR n; /* 64-bit operand values */ #endif /*defined(FEATURE_ESAME)*/ -#if defined(_900) || defined(FEATURE_ESAME) || defined(FEATURE_ESAME_N3_ESA390) +#if defined(FEATURE_ESAME) || defined(FEATURE_ESAME_N3_ESA390) +BYTE ARCH_DEP(stfl_data)[4] = { + 0 +#if defined(FEATURE_ESAME_N3_ESA390) || defined(FEATURE_ESAME) + | STFL_0_N3 +#endif /*defined(FEATURE_ESAME_N3_ESA390) || defined(FEATURE_ESAME)*/ +#if defined(FEATURE_ESAME) + | STFL_0_ESAME_ACTIVE +#endif /*defined(FEATURE_ESAME)*/ +#if defined(FEATURE_ESAME) + | STFL_0_ESAME_INSTALLED +#endif /*defined(_900) || defined(FEATURE_ESAME)*/ +#if defined(FEATURE_DAT_ENHANCEMENT) + | STFL_0_IDTE_INSTALLED +#endif /*defined(FEATURE_DAT_ENHANCEMENT)*/ + , + 0 + , + 0 +#if defined(FEATURE_EXTENDED_TRANSLATION_FACILITY_2) + | STFL_2_TRAN_FAC2 +#endif /*defined(FEATURE_EXTENDED_TRANSLATION_FACILITY_2)*/ +#if defined(FEATURE_MESSAGE_SECURITY_ASSIST) +// | STFL_2_MSG_SECURITY +#endif /*defined(FEATURE_MESSAGE_SECURITY_ASSIST)*/ +#if defined(FEATURE_LONG_DISPLACEMENT) + | STFL_2_LONG_DISPL_INST + | STFL_2_LONG_DISPL_HPERF +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ +#if defined(FEATURE_HFP_MULTIPLY_ADD_SUBTRACT) + | STFL_2_HFP_MULT_ADD_SUB +#endif /*defined(FEATURE_HFP_MULTIPLY_ADD_SUBTRACT)*/ + , + 0 }; + /*-------------------------------------------------------------------*/ /* B2B1 STFL - Store Facilities List [S] */ /*-------------------------------------------------------------------*/ @@ -4548,24 +4538,17 @@ PSA *psa; /* -> Prefixed storage area */ /* Point to PSA in main storage */ psa = (void*)(regs->mainstor + regs->PX); - psa->stfl[0] = 0 -#if defined(FEATURE_ESAME_N3_ESA390) || defined(FEATURE_ESAME) - | STFL_0_N3 -#endif /*defined(FEATURE_ESAME_N3_ESA390) || defined(FEATURE_ESAME)*/ + memcpy(psa->stfl, ARCH_DEP(stfl_data), sizeof(psa->stfl)); + #if defined(_900) || defined(FEATURE_ESAME) - | (sysblk.arch_z900 ? STFL_0_ESAME_INSTALLED : 0) + if(sysblk.arch_z900) + psa->stfl[0] |= STFL_0_ESAME_INSTALLED; #endif /*defined(_900) || defined(FEATURE_ESAME)*/ -#if defined(FEATURE_ESAME) - | STFL_0_ESAME_ACTIVE -#endif /*defined(FEATURE_ESAME)*/ - ; - psa->stfl[1] = 0; - psa->stfl[2] = 0 -#if defined(FEATURE_EXTENDED_TRANSLATION_FACILITY_2) - | STFL_2_TRAN_FAC2 -#endif /*defined(FEATURE_EXTENDED_TRANSLATION_FACILITY_2)*/ - ; - psa->stfl[3] = 0; + +#if defined(FEATURE_MESSAGE_SECURITY_ASSIST) + if(ARCH_DEP(cipher_message)) + psa->stfl[2] |= STFL_2_MSG_SECURITY; +#endif /*defined(FEATURE_MESSAGE_SECURITY_ASSIST)*/ } /* end DEF_INST(store_facilities_list) */ #endif /*defined(_900) || defined(FEATURE_ESAME)*/ @@ -4607,7 +4590,7 @@ int r1, r2; /* Values of R fields */ #if defined(FEATURE_LOAD_REVERSED) && defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E30F LRVG - Load Reversed Long [RXE] */ +/* E30F LRVG - Load Reversed Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(load_reversed_long) { @@ -4615,7 +4598,7 @@ int r1; /* Value of R field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load R1 register from second operand */ regs->GR_G(r1) = bswap_64(ARCH_DEP(vfetch8) ( effective_addr2, b2, regs )); @@ -4626,7 +4609,7 @@ VADR effective_addr2; /* Effective address */ #if defined(FEATURE_ESAME_N3_ESA390) || defined(FEATURE_LOAD_REVERSED) /*-------------------------------------------------------------------*/ -/* E31E LRV - Load Reversed [RXE] */ +/* E31E LRV - Load Reversed [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(load_reversed) { @@ -4634,7 +4617,7 @@ int r1; /* Value of R field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load R1 register from second operand */ regs->GR_L(r1) = bswap_32(ARCH_DEP(vfetch4) ( effective_addr2, b2, regs )); @@ -4645,7 +4628,7 @@ VADR effective_addr2; /* Effective address */ #if defined(FEATURE_ESAME_N3_ESA390) || defined(FEATURE_LOAD_REVERSED) /*-------------------------------------------------------------------*/ -/* E31F LRVH - Load Reversed Half [RXE] */ +/* E31F LRVH - Load Reversed Half [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(load_reversed_half) { @@ -4653,7 +4636,7 @@ int r1; /* Value of R field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Load R1 register from second operand */ regs->GR_LHL(r1) = bswap_16(ARCH_DEP(vfetch2) ( effective_addr2, b2, regs )); @@ -4663,7 +4646,7 @@ VADR effective_addr2; /* Effective address */ #if defined(FEATURE_LOAD_REVERSED) && defined(FEATURE_ESAME) /*-------------------------------------------------------------------*/ -/* E32F STRVG - Store Reversed Long [RXE] */ +/* E32F STRVG - Store Reversed Long [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(store_reversed_long) { @@ -4671,7 +4654,7 @@ int r1; /* Values of R fields */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Store register contents at operand address */ ARCH_DEP(vstore8) ( bswap_64(regs->GR_G(r1)), effective_addr2, b2, regs ); @@ -4682,7 +4665,7 @@ VADR effective_addr2; /* Effective address */ #if defined(FEATURE_ESAME_N3_ESA390) || defined(FEATURE_LOAD_REVERSED) /*-------------------------------------------------------------------*/ -/* E33E STRV - Store Reversed [RXE] */ +/* E33E STRV - Store Reversed [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(store_reversed) { @@ -4690,7 +4673,7 @@ int r1; /* Values of R fields */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Store register contents at operand address */ ARCH_DEP(vstore4) ( bswap_32(regs->GR_L(r1)), effective_addr2, b2, regs ); @@ -4701,7 +4684,7 @@ VADR effective_addr2; /* Effective address */ #if defined(FEATURE_ESAME_N3_ESA390) || defined(FEATURE_LOAD_REVERSED) /*-------------------------------------------------------------------*/ -/* E33F STRVH - Store Reversed Half [RXE] */ +/* E33F STRVH - Store Reversed Half [RXY] */ /*-------------------------------------------------------------------*/ DEF_INST(store_reversed_half) { @@ -4709,7 +4692,7 @@ int r1; /* Values of R fields */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - RXE(inst, execflag, regs, r1, b2, effective_addr2); + RXY(inst, execflag, regs, r1, b2, effective_addr2); /* Store register contents at operand address */ ARCH_DEP(vstore2) ( bswap_16(regs->GR_LHL(r1)), effective_addr2, b2, regs ); @@ -4912,7 +4895,7 @@ DEF_INST(translate_one_to_one) { int r1, r2; /* Values of R fields */ VADR addr1, addr2, trtab; /* Effective addresses */ -GREG len; +GREG len; BYTE svalue, dvalue, tvalue; RRE(inst, execflag, regs, r1, r2); @@ -4983,7 +4966,7 @@ DEF_INST(translate_one_to_two) { int r1, r2; /* Values of R fields */ VADR addr1, addr2, trtab; /* Effective addresses */ -GREG len; +GREG len; BYTE svalue; BYTE dvalue, tvalue; @@ -5055,7 +5038,7 @@ DEF_INST(translate_two_to_one) { int r1, r2; /* Values of R fields */ VADR addr1, addr2, trtab; /* Effective addresses */ -GREG len; +GREG len; U16 svalue; BYTE dvalue, tvalue; @@ -5129,8 +5112,8 @@ DEF_INST(translate_two_to_two) { int r1, r2; /* Values of R fields */ VADR addr1, addr2, trtab; /* Effective addresses */ -GREG len; -U16 svalue, dvalue, tvalue; +GREG len; +U16 svalue, dvalue, tvalue; RRE(inst, execflag, regs, r1, r2); @@ -5196,7 +5179,7 @@ U16 svalue, dvalue, tvalue; #if defined(FEATURE_EXTENDED_TRANSLATION_FACILITY_2) /*-------------------------------------------------------------------*/ -/* EB8E MVCLU - Move Long Unicode [RSE] */ +/* EB8E MVCLU - Move Long Unicode [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(move_long_unicode) { @@ -5211,7 +5194,7 @@ U16 odbyte; /* Operand double byte */ U16 pad; /* Padding double byte */ int cpu_length; /* cpu determined length */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); ODD2_CHECK(r1, r3, regs); @@ -5274,13 +5257,13 @@ int cpu_length; /* cpu determined length */ regs->psw.cc = cc; -} +} /* end DEF_INST(move_long_unicode) */ #endif /*defined(FEATURE_EXTENDED_TRANSLATION_FACILITY_2)*/ #if defined(FEATURE_EXTENDED_TRANSLATION_FACILITY_2) /*-------------------------------------------------------------------*/ -/* EB8F CLCLU - Compare Logical Long Unicode [RSE] */ +/* EB8F CLCLU - Compare Logical Long Unicode [RSY] */ /*-------------------------------------------------------------------*/ DEF_INST(compare_logical_long_unicode) { @@ -5295,7 +5278,7 @@ U16 dbyte1, dbyte3; /* Operand double bytes */ U16 pad; /* Padding double byte */ int cpu_length; /* cpu determined length */ - RSE(inst, execflag, regs, r1, r3, b2, effective_addr2); + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); ODD2_CHECK(r1, r3, regs); @@ -5365,10 +5348,1224 @@ int cpu_length; /* cpu determined length */ regs->psw.cc = cc; -} +} /* end DEF_INST(compare_logical_long_unicode) */ #endif /*defined(FEATURE_EXTENDED_TRANSLATION_FACILITY_2)*/ +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E376 LB - Load Byte [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(load_byte) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load sign-extended byte from operand address */ + (S32)regs->GR_L(r1) = (S8)ARCH_DEP(vfetchb) ( effective_addr2, b2, regs ); + +} /* end DEF_INST(load_byte) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E377 LGB - Load Byte Long [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(load_byte_long) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load sign-extended byte from operand address */ + (S64)regs->GR_G(r1) = (S8)ARCH_DEP(vfetchb) ( effective_addr2, b2, regs ); + +} /* end DEF_INST(load_byte_long) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E35A AY - Add (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(add_y) +{ +int r1; /* Values of R fields */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +U32 n; /* 32-bit operand values */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load second operand from operand address */ + n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); + + /* Add signed operands and set condition code */ + regs->psw.cc = + add_signed (&(regs->GR_L(r1)), + regs->GR_L(r1), + n); + + /* Program check if fixed-point overflow */ + if ( regs->psw.cc == 3 && regs->psw.fomask ) + ARCH_DEP(program_interrupt) (regs, PGM_FIXED_POINT_OVERFLOW_EXCEPTION); + +} /* end DEF_INST(add_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E37A AHY - Add Halfword (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(add_halfword_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +U32 n; /* 32-bit operand values */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load 2 bytes from operand address */ + (S32)n = (S16)ARCH_DEP(vfetch2) ( effective_addr2, b2, regs ); + + /* Add signed operands and set condition code */ + regs->psw.cc = + add_signed (&(regs->GR_L(r1)), + regs->GR_L(r1), + n); + + /* Program check if fixed-point overflow */ + if ( regs->psw.cc == 3 && regs->psw.fomask ) + ARCH_DEP(program_interrupt) (regs, PGM_FIXED_POINT_OVERFLOW_EXCEPTION); + +} /* end DEF_INST(add_halfword_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E35E ALY - Add Logical (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(add_logical_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +U32 n; /* 32-bit operand values */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load second operand from operand address */ + n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); + + /* Add signed operands and set condition code */ + regs->psw.cc = + add_logical (&(regs->GR_L(r1)), + regs->GR_L(r1), + n); + +} /* end DEF_INST(add_logical_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* EB54 NIY - And Immediate (Long Displacement) [SIY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(and_immediate_y) +{ +BYTE i2; /* Immediate byte of opcode */ +int b1; /* Base of effective addr */ +VADR effective_addr1; /* Effective address */ +BYTE rbyte; /* Result byte */ + + SIY(inst, execflag, regs, i2, b1, effective_addr1); + + /* Fetch byte from operand address */ + rbyte = ARCH_DEP(vfetchb) ( effective_addr1, b1, regs ); + + /* AND with immediate operand */ + rbyte &= i2; + + /* Store result at operand address */ + ARCH_DEP(vstoreb) ( rbyte, effective_addr1, b1, regs ); + + /* Set condition code */ + regs->psw.cc = rbyte ? 1 : 0; + +} /* end DEF_INST(and_immediate_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E354 NY - And (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(and_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +U32 n; /* 32-bit operand values */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load second operand from operand address */ + n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); + + /* AND second operand with first and set condition code */ + regs->psw.cc = ( regs->GR_L(r1) &= n ) ? 1 : 0; + +} /* end DEF_INST(and_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E359 CY - Compare (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(compare_y) +{ +int r1; /* Values of R fields */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +U32 n; /* 32-bit operand values */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load second operand from operand address */ + n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); + + /* Compare signed operands and set condition code */ + regs->psw.cc = + (S32)regs->GR_L(r1) < (S32)n ? 1 : + (S32)regs->GR_L(r1) > (S32)n ? 2 : 0; + +} /* end DEF_INST(compare_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E379 CHY - Compare Halfword (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(compare_halfword_y) +{ +int r1; /* Values of R fields */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +U32 n; /* 32-bit operand values */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load rightmost 2 bytes of comparand from operand address */ + (S32)n = (S16)ARCH_DEP(vfetch2) ( effective_addr2, b2, regs ); + + /* Compare signed operands and set condition code */ + regs->psw.cc = + (S32)regs->GR_L(r1) < (S32)n ? 1 : + (S32)regs->GR_L(r1) > (S32)n ? 2 : 0; + +} /* end DEF_INST(compare_halfword_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E355 CLY - Compare Logical (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(compare_logical_y) +{ +int r1; /* Values of R fields */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +U32 n; /* 32-bit operand values */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load second operand from operand address */ + n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); + + /* Compare unsigned operands and set condition code */ + regs->psw.cc = regs->GR_L(r1) < n ? 1 : + regs->GR_L(r1) > n ? 2 : 0; + +} /* end DEF_INST(compare_logical_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* EB55 CLIY - Compare Logical Immediate (Long Displacement) [SIY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(compare_logical_immediate_y) +{ +BYTE i2; /* Immediate byte */ +int b1; /* Base of effective addr */ +VADR effective_addr1; /* Effective address */ +BYTE cbyte; /* Compare byte */ + + SIY(inst, execflag, regs, i2, b1, effective_addr1); + + /* Fetch byte from operand address */ + cbyte = ARCH_DEP(vfetchb) ( effective_addr1, b1, regs ); + + /* Compare with immediate operand and set condition code */ + regs->psw.cc = (cbyte < i2) ? 1 : + (cbyte > i2) ? 2 : 0; + +} /* end DEF_INST(compare_logical_immediate_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* EB21 CLMY - Compare Logical Characters under Mask Long Disp[RSY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(compare_logical_characters_under_mask_y) +{ +int r1, r3; /* Register numbers */ +int b2; /* effective address base */ +VADR effective_addr2; /* effective address */ +U32 n; /* 32-bit operand values */ +int cc = 0; /* Condition code */ +BYTE sbyte, + dbyte; /* Byte work areas */ +int i; /* Integer work areas */ + + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); + + /* Load value from register */ + n = regs->GR_L(r1); + + /* if mask is zero, access rupts recognized for 1 byte */ + if (r3 == 0) + sbyte = ARCH_DEP(vfetchb) ( effective_addr2, b2, regs ); + + /* Compare characters in register with operand characters */ + for ( i = 0; i < 4; i++ ) + { + /* Test mask bit corresponding to this character */ + if ( r3 & 0x08 ) + { + /* Fetch character from register and operand */ + dbyte = n >> 24; + sbyte = ARCH_DEP(vfetchb) ( effective_addr2++, b2, regs ); + + /* Compare bytes, set condition code if unequal */ + if ( dbyte != sbyte ) + { + cc = (dbyte < sbyte) ? 1 : 2; + break; + } /* end if */ + } + + /* Shift mask and register for next byte */ + r3 <<= 1; + n <<= 8; + + } /* end for(i) */ + + /* Update the condition code */ + regs->psw.cc = cc; + +} /* end DEF_INST(compare_logical_characters_under_mask_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* EB14 CSY - Compare and Swap (Long Displacement) [RSY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(compare_and_swap_y) +{ +int r1, r3; /* Register numbers */ +int b2; /* effective address base */ +VADR effective_addr2; /* effective address */ +RADR abs2; /* absolute address */ +U32 old; /* old value */ + + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); + + FW_CHECK(effective_addr2, regs); + + /* Perform serialization before starting operation */ + PERFORM_SERIALIZATION (regs); + + /* Get operand absolute address */ + abs2 = LOGICAL_TO_ABS (effective_addr2, b2, regs, + ACCTYPE_WRITE, regs->psw.pkey); + + /* Get old value */ + old = CSWAP32(regs->GR_L(r1)); + + /* Obtain main-storage access lock */ + OBTAIN_MAINLOCK(regs); + + /* Attempt to exchange the values */ + regs->psw.cc = cmpxchg4 (&old, CSWAP32(regs->GR_L(r3)), regs->mainstor + abs2); + + /* Release main-storage access lock */ + RELEASE_MAINLOCK(regs); + + /* Perform serialization after completing operation */ + PERFORM_SERIALIZATION (regs); + + if (regs->psw.cc == 1) + { + regs->GR_L(r1) = CSWAP32(old); +#if defined(_FEATURE_SIE) + if((regs->sie_state && (regs->siebk->ic[0] & SIE_IC0_CS1))) + { + if( !OPEN_IC_PERINT(regs) ) + longjmp(regs->progjmp, SIE_INTERCEPT_INST); + else + longjmp(regs->progjmp, SIE_INTERCEPT_INSTCOMP); + } + else +#endif /*defined(_FEATURE_SIE)*/ + if (sysblk.numcpu > 1) + sched_yield(); + } + +} /* end DEF_INST(compare_and_swap_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* EB31 CDSY - Compare Double and Swap (Long Displacement) [RSY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(compare_double_and_swap_y) +{ +int r1, r3; /* Register numbers */ +int b2; /* effective address base */ +VADR effective_addr2; /* effective address */ +RADR abs2; /* absolute address */ +U64 old, new; /* old, new values */ + + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); + + ODD2_CHECK(r1, r3, regs); + + DW_CHECK(effective_addr2, regs); + + /* Perform serialization before starting operation */ + PERFORM_SERIALIZATION (regs); + + /* Get operand absolute address */ + abs2 = LOGICAL_TO_ABS (effective_addr2, b2, regs, + ACCTYPE_WRITE, regs->psw.pkey); + + /* Get old, new values */ + old = CSWAP64(((U64)(regs->GR_L(r1)) << 32) | regs->GR_L(r1+1)); + new = CSWAP64(((U64)(regs->GR_L(r3)) << 32) | regs->GR_L(r3+1)); + + /* Obtain main-storage access lock */ + OBTAIN_MAINLOCK(regs); + + /* Attempt to exchange the values */ + regs->psw.cc = cmpxchg8 (&old, new, regs->mainstor + abs2); + + /* Release main-storage access lock */ + RELEASE_MAINLOCK(regs); + + /* Perform serialization after completing operation */ + PERFORM_SERIALIZATION (regs); + + if (regs->psw.cc == 1) + { + regs->GR_L(r1) = CSWAP64(old) >> 32; + regs->GR_L(r1+1) = CSWAP64(old) & 0xffffffff; +#if defined(_FEATURE_SIE) + if((regs->sie_state && (regs->siebk->ic[0] & SIE_IC0_CS1))) + { + if( !OPEN_IC_PERINT(regs) ) + longjmp(regs->progjmp, SIE_INTERCEPT_INST); + else + longjmp(regs->progjmp, SIE_INTERCEPT_INSTCOMP); + } + else +#endif /*defined(_FEATURE_SIE)*/ + if (sysblk.numcpu > 1) + sched_yield(); + } + +} /* end DEF_INST(compare_double_and_swap_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E306 CVBY - Convert to Binary (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(convert_to_binary_y) +{ +U64 dreg; /* 64-bit result accumulator */ +int r1; /* Value of R1 field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +int ovf; /* 1=overflow */ +int dxf; /* 1=data exception */ +BYTE dec[8]; /* Packed decimal operand */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Fetch 8-byte packed decimal operand */ + ARCH_DEP(vfetchc) (dec, 8-1, effective_addr2, b2, regs); + + /* Convert 8-byte packed decimal to 64-bit signed binary */ + packed_to_binary (dec, 8-1, &dreg, &ovf, &dxf); + + /* Data exception if invalid digits or sign */ + if (dxf) + { + regs->dxc = DXC_DECIMAL; + ARCH_DEP(program_interrupt) (regs, PGM_DATA_EXCEPTION); + } + + /* Overflow if result exceeds 31 bits plus sign */ + if ((S64)dreg < -2147483648LL || (S64)dreg > 2147483647LL) + ovf = 1; + + /* Store low-order 32 bits of result into R1 register */ + regs->GR_L(r1) = dreg & 0xFFFFFFFF; + + /* Program check if overflow (R1 contains rightmost 32 bits) */ + if (ovf) + ARCH_DEP(program_interrupt) (regs, PGM_FIXED_POINT_DIVIDE_EXCEPTION); + +} +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E326 CVDY - Convert to Decimal (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(convert_to_decimal_y) +{ +S64 bin; /* 64-bit signed binary value*/ +int r1; /* Value of R1 field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +BYTE dec[16]; /* Packed decimal result */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load value of register and sign-extend to 64 bits */ + bin = (S64)((S32)(regs->GR_L(r1))); + + /* Convert to 16-byte packed decimal number */ + binary_to_packed (bin, dec); + + /* Store low 8 bytes of result at operand address */ + ARCH_DEP(vstorec) ( dec+8, 8-1, effective_addr2, b2, regs ); + +} /* end DEF_INST(convert_to_decimal_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* EB57 XIY - Exclusive Or Immediate (Long Displacement) [SIY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(exclusive_or_immediate_y) +{ +BYTE i2; /* Immediate operand */ +int b1; /* Base of effective addr */ +VADR effective_addr1; /* Effective address */ +BYTE rbyte; /* Result byte */ + + SIY(inst, execflag, regs, i2, b1, effective_addr1); + + /* Fetch byte from operand address */ + rbyte = ARCH_DEP(vfetchb) ( effective_addr1, b1, regs ); + + /* XOR with immediate operand */ + rbyte ^= i2; + + /* Store result at operand address */ + ARCH_DEP(vstoreb) ( rbyte, effective_addr1, b1, regs ); + + /* Set condition code */ + regs->psw.cc = rbyte ? 1 : 0; + +} /* end DEF_INST(exclusive_or_immediate_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E357 XY - Exclusive Or (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(exclusive_or_y) +{ +int r1; /* Values of R fields */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +U32 n; /* 32-bit operand values */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load second operand from operand address */ + n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); + + /* XOR second operand with first and set condition code */ + regs->psw.cc = ( regs->GR_L(r1) ^= n ) ? 1 : 0; + +} /* end DEF_INST(exclusive_or_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E373 ICY - Insert Character (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(insert_character_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Insert character in r1 register */ + regs->GR_LHLCL(r1) = ARCH_DEP(vfetchb) ( effective_addr2, b2, regs ); + +} /* end DEF_INST(insert_character_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* EB81 ICMY - Insert Characters under Mask Long Displacement [RSY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(insert_characters_under_mask_y) +{ +int r1, r3; /* Register numbers */ +int b2; /* effective address base */ +VADR effective_addr2; /* effective address */ +int cc = 0; /* Condition code */ +BYTE tbyte; /* Byte work areas */ +int h, i; /* Integer work areas */ +U64 dreg; /* Double register work area */ + + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); + + /* If the mask is all zero, we must nevertheless load one + byte from the storage operand, because POP requires us + to recognize an access exception on the first byte */ + if ( r3 == 0 ) + { + tbyte = ARCH_DEP(vfetchb) ( effective_addr2, b2, regs ); + regs->psw.cc = 0; + return; + } + + /* Load existing register value into 64-bit work area */ + dreg = regs->GR_L(r1); + + /* Insert characters into register from operand address */ + for ( i = 0, h = 0; i < 4; i++ ) + { + /* Test mask bit corresponding to this character */ + if ( r3 & 0x08 ) + { + /* Fetch the source byte from the operand */ + tbyte = ARCH_DEP(vfetchb) ( effective_addr2, b2, regs ); + + /* If this is the first byte fetched then test the + high-order bit to determine the condition code */ + if ( (r3 & 0xF0) == 0 ) + h = (tbyte & 0x80) ? 1 : 2; + + /* If byte is non-zero then set the condition code */ + if ( tbyte != 0 ) + cc = h; + + /* Insert the byte into the register */ + dreg &= 0xFFFFFFFF00FFFFFFULL; + dreg |= (U32)tbyte << 24; + + /* Increment the operand address */ + effective_addr2++; + effective_addr2 &= ADDRESS_MAXWRAP(regs); + } + + /* Shift mask and register for next byte */ + r3 <<= 1; + dreg <<= 8; + + } /* end for(i) */ + + /* Load the register with the updated value */ + regs->GR_L(r1) = dreg >> 32; + + /* Set condition code */ + regs->psw.cc = cc; + +} /* end DEF_INST(insert_characters_under_mask_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E358 LY - Load (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(load_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load R1 register from second operand */ + regs->GR_L(r1) = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); + +} /* end DEF_INST(load_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +#if defined(FEATURE_ACCESS_REGISTERS) +/*-------------------------------------------------------------------*/ +/* EB9A LAMY - Load Access Multiple (Long Displacement) [RSY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(load_access_multiple_y) +{ +int r1, r3; /* Register numbers */ +int b2; /* effective address base */ +VADR effective_addr2; /* effective address */ +int n, d; /* Integer work areas */ +BYTE rwork[64]; /* Register work area */ + + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); + + FW_CHECK(effective_addr2, regs); + + /* Calculate the number of bytes to be loaded */ + d = (((r3 < r1) ? r3 + 16 - r1 : r3 - r1) + 1) * 4; + + /* Fetch new access register contents from operand address */ + ARCH_DEP(vfetchc) ( rwork, d-1, effective_addr2, b2, regs ); + + /* Load access registers from work area */ + for ( n = r1, d = 0; ; ) + { + /* Load one access register from work area */ + FETCH_FW(regs->AR(n), rwork + d); d += 4; + + /* Instruction is complete when r3 register is done */ + if ( n == r3 ) break; + + /* Update register number, wrapping from 15 to 0 */ + n++; n &= 15; + } + + if (r1 == r3) + INVALIDATE_AEA_AR(r1, regs); + else + INVALIDATE_AEA_ARALL(regs); + +} /* end DEF_INST(load_access_multiple_y) */ +#endif /*defined(FEATURE_ACCESS_REGISTERS)*/ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E371 LAY - Load Address (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(load_address_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load operand address into register */ + GR_A(r1, regs) = effective_addr2; + +} /* end DEF_INST(load_address_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E378 LHY - Load Halfword (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(load_halfword_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load rightmost 2 bytes of register from operand address */ + (S32)regs->GR_L(r1) = (S16)ARCH_DEP(vfetch2) ( effective_addr2, b2, regs ); + +} /* end DEF_INST(load_halfword_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* EB98 LMY - Load Multiple (Long Displacement) [RSY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(load_multiple_y) +{ +int r1, r3; /* Register numbers */ +int b2; /* effective address base */ +VADR effective_addr2; /* effective address */ +int i, d; /* Integer work areas */ +BYTE rwork[64]; /* Character work areas */ + + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); + + /* Calculate the number of bytes to be loaded */ + d = (((r3 < r1) ? r3 + 16 - r1 : r3 - r1) + 1) * 4; + + /* Fetch new register contents from operand address */ + ARCH_DEP(vfetchc) ( rwork, d-1, effective_addr2, b2, regs ); + + /* Load registers from work area */ + for ( i = r1, d = 0; ; ) + { + /* Load one register from work area */ + FETCH_FW(regs->GR_L(i), rwork + d); d += 4; + + /* Instruction is complete when r3 register is done */ + if ( i == r3 ) break; + + /* Update register number, wrapping from 15 to 0 */ + i++; i &= 15; + } + +} /* end DEF_INST(load_multiple_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E313 LRAY - Load Real Address (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(load_real_address_y) +{ +int r1; /* Register number */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + ARCH_DEP(load_real_address_proc) (regs, r1, b2, effective_addr2); + +} /* end DEF_INST(load_real_address_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* EB52 MVIY - Move Immediate (Long Displacement) [SIY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(move_immediate_y) +{ +BYTE i2; /* Immediate operand */ +int b1; /* Base of effective addr */ +VADR effective_addr1; /* Effective address */ + + SIY(inst, execflag, regs, i2, b1, effective_addr1); + + /* Store immediate operand at operand address */ + ARCH_DEP(vstoreb) ( i2, effective_addr1, b1, regs ); + +} /* end DEF_INST(move_immediate_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E351 MSY - Multiply Single (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(multiply_single_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +U32 n; /* 32-bit operand values */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load second operand from operand address */ + n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); + + /* Multiply signed operands ignoring overflow */ + (S32)regs->GR_L(r1) *= (S32)n; + +} /* end DEF_INST(multiply_single) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* EB56 OIY - Or Immediate (Long Displacement) [SIY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(or_immediate_y) +{ +BYTE i2; /* Immediate operand byte */ +int b1; /* Base of effective addr */ +VADR effective_addr1; /* Effective address */ +BYTE rbyte; /* Result byte */ + + SIY(inst, execflag, regs, i2, b1, effective_addr1); + + /* Fetch byte from operand address */ + rbyte = ARCH_DEP(vfetchb) ( effective_addr1, b1, regs ); + + /* OR with immediate operand */ + rbyte |= i2; + + /* Store result at operand address */ + ARCH_DEP(vstoreb) ( rbyte, effective_addr1, b1, regs ); + + /* Set condition code */ + regs->psw.cc = rbyte ? 1 : 0; + +} /* end DEF_INST(or_immediate_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E356 OY - Or (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(or_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +U32 n; /* 32-bit operand values */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load second operand from operand address */ + n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); + + /* OR second operand with first and set condition code */ + regs->psw.cc = ( regs->GR_L(r1) |= n ) ? 1 : 0; + +} /* end DEF_INST(or_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E350 STY - Store (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(store_y) +{ +int r1; /* Values of R fields */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Store register contents at operand address */ + ARCH_DEP(vstore4) ( regs->GR_L(r1), effective_addr2, b2, regs ); + +} /* end DEF_INST(store_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +#if defined(FEATURE_ACCESS_REGISTERS) +/*-------------------------------------------------------------------*/ +/* EB9B STAMY - Store Access Multiple (Long Displacement) [RSY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(store_access_multiple_y) +{ +int r1, r3; /* Register numbers */ +int b2; /* effective address base */ +VADR effective_addr2; /* effective address */ +int n, d; /* Integer work area */ +BYTE rwork[64]; /* Register work area */ + + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); + + FW_CHECK(effective_addr2, regs); + + /* Copy access registers into work area */ + for ( n = r1, d = 0; ; ) + { + /* Copy contents of one access register to work area */ + STORE_FW(rwork + d, regs->AR(n)); d += 4; + + /* Instruction is complete when r3 register is done */ + if ( n == r3 ) break; + + /* Update register number, wrapping from 15 to 0 */ + n++; n &= 15; + } + + /* Store access register contents at operand address */ + ARCH_DEP(vstorec) ( rwork, d-1, effective_addr2, b2, regs ); + +} /* end DEF_INST(store_access_multiple_y) */ +#endif /*defined(FEATURE_ACCESS_REGISTERS)*/ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E372 STCY - Store Character (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(store_character_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Store rightmost byte of R1 register at operand address */ + ARCH_DEP(vstoreb) ( regs->GR_LHLCL(r1), effective_addr2, b2, regs ); + +} /* end DEF_INST(store_character_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* EB2D STCMY - Store Characters under Mask (Long Displacement)[RSY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(store_characters_under_mask_y) +{ +int r1, r3; /* Register numbers */ +int b2; /* effective address base */ +VADR effective_addr2; /* effective address */ +U32 n; /* 32-bit operand values */ +int i, j; /* Integer work areas */ +BYTE cwork[4]; /* Character work areas */ + + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); + + /* Load value from register */ + n = regs->GR_L(r1); + + /* Copy characters from register to work area */ + for ( i = 0, j = 0; i < 4; i++ ) + { + /* Test mask bit corresponding to this character */ + if ( r3 & 0x08 ) + { + /* Copy character from register to work area */ + cwork[j++] = n >> 24; + } + + /* Shift mask and register for next byte */ + r3 <<= 1; + n <<= 8; + + } /* end for(i) */ + + /* If the mask is all zero, we nevertheless access one byte + from the storage operand, because POP states that an + access exception may be recognized on the first byte */ + if (j == 0) + { +#if defined(MODEL_DEPENDENT_STCM) +// /*debug*/logmsg ("Model dependent STCMY use\n"); + ARCH_DEP(validate_operand) (effective_addr2, b2, 0, ACCTYPE_WRITE, regs); +#endif /*defined(MODEL_DEPENDENT_STCM)*/ + return; + } + + /* Store result at operand location */ + ARCH_DEP(vstorec) ( cwork, j-1, effective_addr2, b2, regs ); + +} /* end DEF_INST(store_characters_under_mask_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E370 STHY - Store Halfword (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(store_halfword_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Store rightmost 2 bytes of R1 register at operand address */ + ARCH_DEP(vstore2) ( regs->GR_LHL(r1), effective_addr2, b2, regs ); + +} /* end DEF_INST(store_halfword_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* EB90 STMY - Store Multiple (Long Displacement) [RSY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(store_multiple_y) +{ +int r1, r3; /* Register numbers */ +int b2; /* effective address base */ +VADR effective_addr2; /* effective address */ +int n, d; /* Integer work area */ +BYTE rwork[64]; /* Register work area */ + + RSY(inst, execflag, regs, r1, r3, b2, effective_addr2); + + /* Copy register contents into work area */ + for ( n = r1, d = 0; ; ) + { + /* Copy contents of one register to work area */ + STORE_FW(rwork + d, regs->GR_L(n)); d += 4; + + /* Instruction is complete when r3 register is done */ + if ( n == r3 ) break; + + /* Update register number, wrapping from 15 to 0 */ + n++; n &= 15; + } + + /* Store register contents at operand address */ + ARCH_DEP(vstorec) ( rwork, d-1, effective_addr2, b2, regs ); + +} /* end DEF_INST(store_multiple_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E35B SY - Subtract (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(subtract_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +U32 n; /* 32-bit operand values */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load second operand from operand address */ + n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); + + /* Subtract signed operands and set condition code */ + regs->psw.cc = + sub_signed (&(regs->GR_L(r1)), + regs->GR_L(r1), + n); + + /* Program check if fixed-point overflow */ + if ( regs->psw.cc == 3 && regs->psw.fomask ) + ARCH_DEP(program_interrupt) (regs, PGM_FIXED_POINT_OVERFLOW_EXCEPTION); + +} /* end DEF_INST(subtract_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E37B SHY - Subtract Halfword (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(subtract_halfword_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +U32 n; /* 32-bit operand values */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load 2 bytes from operand address */ + (S32)n = (S16)ARCH_DEP(vfetch2) ( effective_addr2, b2, regs ); + + /* Subtract signed operands and set condition code */ + regs->psw.cc = + sub_signed (&(regs->GR_L(r1)), + regs->GR_L(r1), + n); + + /* Program check if fixed-point overflow */ + if ( regs->psw.cc == 3 && regs->psw.fomask ) + ARCH_DEP(program_interrupt) (regs, PGM_FIXED_POINT_OVERFLOW_EXCEPTION); + +} /* end DEF_INST(subtract_halfword_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* E35F SLY - Subtract Logical (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(subtract_logical_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +U32 n; /* 32-bit operand values */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + + /* Load second operand from operand address */ + n = ARCH_DEP(vfetch4) ( effective_addr2, b2, regs ); + + /* Subtract unsigned operands and set condition code */ + regs->psw.cc = + sub_logical (&(regs->GR_L(r1)), + regs->GR_L(r1), + n); + +} /* end DEF_INST(subtract_logical_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* EB51 TMY - Test under Mask (Long Displacement) [SIY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(test_under_mask_y) +{ +BYTE i2; /* Immediate operand */ +int b1; /* Base of effective addr */ +VADR effective_addr1; /* Effective address */ +BYTE tbyte; /* Work byte */ + + SIY(inst, execflag, regs, i2, b1, effective_addr1); + + /* Fetch byte from operand address */ + tbyte = ARCH_DEP(vfetchb) ( effective_addr1, b1, regs ); + + /* AND with immediate operand mask */ + tbyte &= i2; + + /* Set condition code according to result */ + regs->psw.cc = + ( tbyte == 0 ) ? 0 : /* result all zeroes */ + ((tbyte^i2) == 0) ? 3 : /* result all ones */ + 1 ; /* result mixed */ + +} /* end DEF_INST(test_under_mask_y) */ +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + #if !defined(_GEN_ARCH) #if defined(_ARCHMODE2) diff --git a/external.c b/external.c index fd72ae1..f4052e9 100644 --- a/external.c +++ b/external.c @@ -35,7 +35,8 @@ /* Input: */ /* regs A pointer to the CPU register context */ /* */ -/* The intlock MUST be held when calling synchronize_broadcast() */ +/* The intlock MUST be held when `code' is zero otherwise */ +/* the intlock MUST NOT be held */ /* */ /* Signals all other CPU's to perform a requested function */ /* synchronously, such as purging the ALB and TLB buffers. */ @@ -47,6 +48,7 @@ void ARCH_DEP(synchronize_broadcast) (REGS *regs, int code, U64 pfra) { U32 i; /* Array subscript */ REGS *realregs; /* Real REGS if guest */ +REGS *tregs; /* Target regs */ realregs = #if defined(_FEATURE_SIE) @@ -54,73 +56,77 @@ REGS *realregs; /* Real REGS if guest */ #endif /*defined(_FEATURE_SIE)*/ regs; -#if MAX_CPU_ENGINES > 1 + /* Signal the other (if any) CPU's */ if (code > 0) { obtain_lock (&sysblk.intlock); - while (IS_IC_BROADCAST_ON) - if (IS_IC_BROADCAST(realregs)) - ARCH_DEP(synchronize_broadcast)(realregs, 0, 0); - else - { - release_lock (&sysblk.intlock); - sched_yield(); - obtain_lock (&sysblk.intlock); - } - ON_IC_BROADCAST; - sysblk.broadcast_mask = sysblk.started_mask; + + /* Wait for outstanding broadcasts to complete */ + while (sysblk.broadcast_count) + ARCH_DEP(synchronize_broadcast)(realregs, 0, 0); + for (i = 0; i < MAX_CPU_ENGINES; i++) + { + tregs = sysblk.regs + i; + + if (tregs->cpuad == realregs->cpuad + || (tregs->cpumask & sysblk.started_mask) == 0) + continue; + + ON_IC_BROADCAST(tregs); + sysblk.broadcast_count++; + } sysblk.broadcast_code = code; sysblk.broadcast_pfra = pfra; + if (sysblk.broadcast_count) + WAKEUP_WAITING_CPUS(ALL_CPUS, CPUSTATE_STARTED); } -#else /* MAX_CPU_ENGINES > 1 */ - sysblk.broadcast_code = code; - sysblk.broadcast_pfra = pfra; -#endif /* MAX_CPU_ENGINES > 1 */ - /* Purge TLB */ - if (sysblk.broadcast_code & BROADCAST_PTLB) - ARCH_DEP(purge_tlb) (realregs); + /* Perform the requested functions */ + if (code != 0 || IS_IC_BROADCAST(realregs)) + { + /* Purge TLB */ + if (sysblk.broadcast_code & BROADCAST_PTLB) + ARCH_DEP(purge_tlb) (realregs); #if defined(FEATURE_ACCESS_REGISTERS) - /* Purge ALB */ - if (sysblk.broadcast_code & BROADCAST_PALB) - ARCH_DEP(purge_alb) (realregs); + /* Purge ALB */ + if (sysblk.broadcast_code & BROADCAST_PALB) + ARCH_DEP(purge_alb) (realregs); #endif /*defined(FEATURE_ACCESS_REGISTERS)*/ - /* Invalidate TLB entries */ - if (sysblk.broadcast_code & BROADCAST_ITLB) - { - for (i = 0; i < (sizeof(regs->tlb)/sizeof(TLBE)); i++) - if ((regs->tlb[i].TLB_PTE & PAGETAB_PFRA) == sysblk.broadcast_pfra - && regs->tlb[i].valid) + /* Invalidate TLB entries */ + if (sysblk.broadcast_code & BROADCAST_ITLB) + { + for (i = 0; i < (sizeof(regs->tlb)/sizeof(TLBE)); i++) + if ((regs->tlb[i].TLB_PTE & PAGETAB_PFRA) == sysblk.broadcast_pfra + && regs->tlb[i].valid) regs->tlb[i].valid = 0; - for (i = 0; i < (sizeof(regs->tlb)/sizeof(TLBE)) && realregs != regs; i++) - if ((realregs->tlb[i].TLB_PTE & PAGETAB_PFRA) == sysblk.broadcast_pfra - && realregs->tlb[i].valid) + for (i = 0; i < (sizeof(realregs->tlb)/sizeof(TLBE)) && realregs != regs; i++) + if ((realregs->tlb[i].TLB_PTE & PAGETAB_PFRA) == sysblk.broadcast_pfra + && realregs->tlb[i].valid) realregs->tlb[i].valid = 0; + } } -#if MAX_CPU_ENGINES > 1 /* Wait for the other cpus */ - sysblk.broadcast_mask &= ~realregs->cpumask; - if (code > 0) + if (code != 0) { - if (sysblk.broadcast_mask != 0) - { - WAKEUP_WAITING_CPUS(ALL_CPUS, CPUSTATE_STARTED); + if (sysblk.broadcast_count) wait_condition (&sysblk.broadcast_cond, &sysblk.intlock); - } - OFF_IC_BROADCAST; release_lock (&sysblk.intlock); } else { - if (sysblk.broadcast_mask == 0) - broadcast_condition (&sysblk.broadcast_cond); - else + if (IS_IC_BROADCAST(realregs)) + { + OFF_IC_BROADCAST(realregs); + sysblk.broadcast_count--; + } + if (sysblk.broadcast_count) wait_condition (&sysblk.broadcast_cond, &sysblk.intlock); + else + broadcast_condition (&sysblk.broadcast_cond); } -#endif /*MAX_CPU_ENGINES > 1*/ } /* end function synchronize_broadcast */ @@ -140,9 +146,9 @@ int rc; #if defined(_FEATURE_SIE) /* Set the main storage reference and change bits */ if(regs->sie_state -#if defined(FEATURE_EXPEDITED_SIE_SUBSET) +#if defined(_FEATURE_EXPEDITED_SIE_SUBSET) && !(regs->siebk->s & SIE_S_EXP_TIMER) -#endif /*defined(FEATURE_EXPEDITED_SIE_SUBSET)*/ +#endif /*defined(_FEATURE_EXPEDITED_SIE_SUBSET)*/ #if defined(_FEATURE_EXTERNAL_INTERRUPT_ASSIST) && !(regs->siebk->ec[0] & SIE_EC0_EXTA) #endif @@ -157,9 +163,9 @@ int rc; { /* Point to PSA in main storage */ pfx = regs->PX; -#if defined(FEATURE_EXPEDITED_SIE_SUBSET) +#if defined(_FEATURE_EXPEDITED_SIE_SUBSET) SIE_TRANSLATE(&pfx, ACCTYPE_SIE, regs); -#endif /*defined(FEATURE_EXPEDITED_SIE_SUBSET)*/ +#endif /*defined(_FEATURE_EXPEDITED_SIE_SUBSET)*/ psa = (void*)(regs->mainstor + pfx); STORAGE_KEY(pfx, regs) |= (STORKEY_REF | STORKEY_CHANGE); } @@ -180,9 +186,9 @@ int rc; #if defined(_FEATURE_SIE) if(!regs->sie_state -#if defined(FEATURE_EXPEDITED_SIE_SUBSET) +#if defined(_FEATURE_EXPEDITED_SIE_SUBSET) || (regs->siebk->s & SIE_S_EXP_TIMER) -#endif /*defined(FEATURE_EXPEDITED_SIE_SUBSET)*/ +#endif /*defined(_FEATURE_EXPEDITED_SIE_SUBSET)*/ #if defined(_FEATURE_EXTERNAL_INTERRUPT_ASSIST) || (regs->siebk->ec[0] & SIE_EC0_EXTA) #endif @@ -206,9 +212,9 @@ int rc; #if defined(_FEATURE_SIE) if(regs->sie_state -#if defined(FEATURE_EXPEDITED_SIE_SUBSET) +#if defined(_FEATURE_EXPEDITED_SIE_SUBSET) && !(regs->siebk->s & SIE_S_EXP_TIMER) -#endif /*defined(FEATURE_EXPEDITED_SIE_SUBSET)*/ +#endif /*defined(_FEATURE_EXPEDITED_SIE_SUBSET)*/ #if defined(_FEATURE_EXTERNAL_INTERRUPT_ASSIST) && !(regs->siebk->ec[0] & SIE_EC0_EXTA) #endif @@ -387,12 +393,39 @@ U16 cpuad; /* Originating CPU address */ #endif /*defined(_FEATURE_SIE)*/ ) { +#if defined(FEATURE_ECPSVM) + if(ecpsvm_virttmr_ext(regs)==0) + { + regs->vtimerint=0; + /* If no Real Int Timer Int pending */ + /* Otherwise, we keep the Int Timer */ + /* status on */ + if(!regs->rtimerint) + { + OFF_IC_ITIMER(regs); + } + ARCH_DEP(external_interrupt) (EXT_VINTERVAL_TIMER_INTERRUPT,regs); + } +#endif if (sysblk.insttrace || sysblk.inststep) { logmsg (_("HHCCP026I External interrupt: Interval timer\n")); } + /* NOTE : Virtual Interval Timer may still be there.. */ + /* but we will have to wait for the next timer */ + /* pass , because if regs->vtimerint is still */ + /* 1, it means the conditions were not right */ + /* to present the interrupt... */ OFF_IC_ITIMER(regs); - ARCH_DEP(external_interrupt) (EXT_INTERVAL_TIMER_INTERRUPT, regs); +#if defined(FEATURE_ECPSVM) + if(regs->rtimerint) + { + regs->rtimerint=0; +#endif + ARCH_DEP(external_interrupt) (EXT_INTERVAL_TIMER_INTERRUPT, regs); +#if defined(FEATURE_ECPSVM) + } +#endif } #endif /*FEATURE_INTERVAL_TIMER*/ @@ -437,6 +470,10 @@ U16 cpuad; /* Originating CPU address */ /* sregs Register context of CPU whose status is to be stored */ /* aaddr A valid absolute address of a 512-byte block into */ /* which status is to be stored */ +/* For an implicit store status, or an operator */ +/* initiated store status the absolute address will be */ +/* zero, for a store status at address order the */ +/* supplied address will be nonzero */ /*-------------------------------------------------------------------*/ void ARCH_DEP(store_status) (REGS *ssreg, RADR aaddr) { @@ -444,6 +481,23 @@ U64 dreg; /* Double register work area */ int i; /* Array subscript */ PSA *sspsa; /* -> Store status area */ + /* Set reference and change bits */ + STORAGE_KEY(aaddr, ssreg) |= (STORKEY_REF | STORKEY_CHANGE); +#if defined(FEATURE_ESAME) + /* The ESAME PSA is two pages in size */ + if(!aaddr) + STORAGE_KEY(aaddr + 4096, ssreg) |= (STORKEY_REF | STORKEY_CHANGE); +#endif /*defined(FEATURE_ESAME)*/ + +#if defined(FEATURE_ESAME) + /* For store status at address, we must ajust the PSA offset */ + /* ZZ THIS TEST IS NOT CONCLUSIVE */ + if(aaddr != 0 && aaddr != ssreg->PX) + aaddr -= 512 + 4096 ; +#endif + + aaddr &= 0x7FFFFE00; + /* Point to the PSA into which status is to be stored */ sspsa = (void*)(ssreg->mainstor + aaddr); @@ -452,7 +506,11 @@ PSA *sspsa; /* -> Store status area */ STORE_DW(sspsa->storeptmr, ssreg->ptimer); /* Store clock comparator in bytes 224-231 */ +#if defined(FEATURE_ESAME) + STORE_DW(sspsa->storeclkc, ssreg->clkc); +#else /*defined(FEATURE_ESAME)*/ STORE_DW(sspsa->storeclkc, ssreg->clkc << 8); +#endif /*defined(FEATURE_ESAME)*/ /* Store PSW in bytes 256-263 */ ARCH_DEP(store_psw) (ssreg, sspsa->storepsw); @@ -469,10 +527,12 @@ PSA *sspsa; /* -> Store status area */ #endif /*defined(FEATURE_ESAME)*/ #if defined(_900) + /* Only store the arch mode indicator for a PSA type store status */ + if(!aaddr) #if defined(FEATURE_ESAME) - sspsa->arch = 1; + sspsa->arch = 1; #else /*defined(FEATURE_ESAME)*/ - sspsa->arch = 0; + sspsa->arch = 0; #endif /*defined(FEATURE_ESAME)*/ #endif /*defined(_900)*/ diff --git a/fbadasd.c b/fbadasd.c index efec1ad..2488b0b 100644 --- a/fbadasd.c +++ b/fbadasd.c @@ -13,8 +13,17 @@ #include "hercules.h" +#include "dasdblks.h" // (need #define DEFAULT_FBA_TYPE) #include "devtype.h" +#if !defined(WIN32) && !defined(__APPLE__) +/* Note : "man sd" says to include 'linux/fs.h' - But including kernel + * headers in 'user space' is really a no-no.. Hopefully, it's + * duplicated somewhere else. + */ +#include +#endif + /*-------------------------------------------------------------------*/ /* Bit definitions for Define Extent file mask */ /*-------------------------------------------------------------------*/ @@ -38,9 +47,7 @@ #define FBAOPER_WRTVRFY 0x05 /* ...write data and verify */ #define FBAOPER_READ 0x06 /* ...read data */ -static int fbadasd_read_block (DEVBLK *, BYTE *, int, BYTE *); -static int fbadasd_write_block (DEVBLK *, BYTE *, int, BYTE *); -static int fbadasd_used (DEVBLK *); +#define FBA_BLKGRP_SIZE (120 * 512) /* Size of block group */ /*-------------------------------------------------------------------*/ /* Initialize the device handler */ @@ -57,25 +64,44 @@ int i; /* Loop index */ CKDDASD_DEVHDR devhdr; /* Device header */ CCKDDASD_DEVHDR cdevhdr; /* Compressed device header */ + if (!dev->typname || !sscanf(dev->typname,"%hx",&(dev->devtype))) + dev->devtype = DEFAULT_FBA_TYPE; + /* The first argument is the file name */ if (argc == 0 || strlen(argv[0]) > sizeof(dev->filename)-1) { - devmsg ("HHCDA056E File name missing or invalid\n"); + logmsg (_("HHCDA056E File name missing or invalid\n")); return -1; } /* Save the file name in the device block */ strcpy (dev->filename, argv[0]); + /* Device is shareable */ + dev->shared = 1; + + /* Check for possible remote device */ + if (stat(dev->filename, &statbuf) < 0) + { + rc = shared_fba_init ( dev, argc, argv); + if (rc < 0) + { + logmsg (_("HHCDA057E %4.4X:File not found or invalid\n"), + dev->devnum); + return -1; + } + else + return rc; + } + /* Open the device file */ - if (!dev->ckdrdonly) - dev->fd = open (dev->filename, O_RDWR|O_BINARY); - if (dev->ckdrdonly || dev->fd < 0) + dev->fd = open (dev->filename, O_RDWR|O_BINARY); + if (dev->fd < 0) { dev->fd = open (dev->filename, O_RDONLY|O_BINARY); if (dev->fd < 0) { - devmsg ("HHCDA057E File %s open error: %s\n", + logmsg (_("HHCDA058E File %s open error: %s\n"), dev->filename, strerror(errno)); return -1; } @@ -87,10 +113,10 @@ CCKDDASD_DEVHDR cdevhdr; /* Compressed device header */ { /* Handle read error condition */ if (rc < 0) - devmsg (_("HHCDA058E Read error in file %s: %s\n"), + logmsg (_("HHCDA059E Read error in file %s: %s\n"), dev->filename, strerror(errno)); else - devmsg (_("HHCDA059E Unexpected end of file in %s\n"), + logmsg (_("HHCDA060E Unexpected end of file in %s\n"), dev->filename); close (dev->fd); dev->fd = -1; @@ -108,10 +134,10 @@ CCKDDASD_DEVHDR cdevhdr; /* Compressed device header */ { /* Handle read error condition */ if (rc < 0) - devmsg (_("HHCDA060E Read error in file %s: %s\n"), + logmsg (_("HHCDA061E Read error in file %s: %s\n"), dev->filename, strerror(errno)); else - devmsg (_("HHCDA061E Unexpected end of file in %s\n"), + logmsg (_("HHCDA062E Unexpected end of file in %s\n"), dev->filename); close (dev->fd); dev->fd = -1; @@ -153,7 +179,7 @@ CCKDDASD_DEVHDR cdevhdr; /* Compressed device header */ continue; } - devmsg (_("HHCDA062E parameter %d is invalid: %s\n"), + logmsg (_("HHCDA063E parameter %d is invalid: %s\n"), i + 1, argv[i]); return -1; } @@ -166,17 +192,41 @@ CCKDDASD_DEVHDR cdevhdr; /* Compressed device header */ rc = fstat (dev->fd, &statbuf); if (rc < 0) { - devmsg ("HHCDA063E File %s fstat error: %s\n", + logmsg (_("HHCDA064E File %s fstat error: %s\n"), dev->filename, strerror(errno)); close (dev->fd); dev->fd = -1; return -1; } +#if !defined(WIN32) && !defined(__APPLE__) + if(S_ISBLK(statbuf.st_mode)) + { + rc=ioctl(dev->fd,BLKGETSIZE,&statbuf.st_size); + if(rc<0) + { + logmsg (_("HHCDA082E File %s IOCTL BLKGETSIZE error: %s\n"), + dev->filename, strerror(errno)); + close (dev->fd); + dev->fd = -1; + return -1; + } + dev->fbablksiz = 512; + dev->fbaorigin = 0; + dev->fbanumblk = statbuf.st_size; + logmsg("REAL FBA Opened\n"); + } + else + { +#endif + + /* Set block size, device origin, and device size in blocks */ + dev->fbablksiz = 512; + dev->fbaorigin = 0; + dev->fbanumblk = statbuf.st_size / dev->fbablksiz; +#if !defined(WIN32) && !defined(__APPLE__) + } +#endif - /* Set block size, device origin, and device size in blocks */ - dev->fbablksiz = 512; - dev->fbaorigin = 0; - dev->fbanumblk = statbuf.st_size / dev->fbablksiz; /* The second argument is the device origin block number */ if (argc >= 2) @@ -184,7 +234,7 @@ CCKDDASD_DEVHDR cdevhdr; /* Compressed device header */ if (sscanf(argv[1], "%u%c", &startblk, &c) != 1 || startblk >= dev->fbanumblk) { - devmsg ("HHCDA064E Invalid device origin block number %s\n", + logmsg (_("HHCDA065E Invalid device origin block number %s\n"), argv[1]); close (dev->fd); dev->fd = -1; @@ -200,7 +250,7 @@ CCKDDASD_DEVHDR cdevhdr; /* Compressed device header */ if (sscanf(argv[2], "%u%c", &numblks, &c) != 1 || numblks > dev->fbanumblk) { - devmsg ("HHCDA065E Invalid device block count %s\n", + logmsg (_("HHCDA066E Invalid device block count %s\n"), argv[2]); close (dev->fd); dev->fd = -1; @@ -209,8 +259,9 @@ CCKDDASD_DEVHDR cdevhdr; /* Compressed device header */ dev->fbanumblk = numblks; } } + dev->fbaend = (dev->fbaorigin + dev->fbanumblk) * dev->fbablksiz; - devmsg ("HHCDA066I %s origin=%d blks=%d\n", + logmsg (_("HHCDA067I %s origin=%d blks=%d\n"), dev->filename, dev->fbaorigin, dev->fbanumblk); /* Set number of sense bytes */ @@ -220,7 +271,7 @@ CCKDDASD_DEVHDR cdevhdr; /* Compressed device header */ dev->fbatab = dasd_lookup (DASD_FBADEV, NULL, dev->devtype, dev->fbanumblk); if (dev->fbatab == NULL) { - devmsg ("HHCDA067E %4.4X device type %4.4X not found in dasd table\n", + logmsg (_("HHCDA068E %4.4X device type %4.4X not found in dasd table\n"), dev->devnum, dev->devtype); close (dev->fd); dev->fd = -1; @@ -234,10 +285,8 @@ CCKDDASD_DEVHDR cdevhdr; /* Compressed device header */ dev->numdevchar = dasd_build_fba_devchar (dev->fbatab, (BYTE *)&dev->devchar,dev->fbanumblk); - /* Set the routine addresses for read_block and write_block */ - dev->fbardblk = &fbadasd_read_block; - dev->fbawrblk = &fbadasd_write_block; - dev->fbaused = &fbadasd_used; + /* Initialize current blkgrp and cache entry */ + dev->bufcur = dev->cache = -1; /* Activate I/O tracing */ // dev->ccwtrace = 1; @@ -264,100 +313,430 @@ void fbadasd_query_device (DEVBLK *dev, BYTE **class, } /* end function fbadasd_query_device */ /*-------------------------------------------------------------------*/ -/* Close the device */ +/* Calculate length of an FBA block group */ /*-------------------------------------------------------------------*/ -int fbadasd_close_device ( DEVBLK *dev ) +static int fba_blkgrp_len (DEVBLK *dev, int blkgrp) { - /* Close the device file */ - close (dev->fd); - dev->fd = -1; +off_t offset; /* Offset of block group */ - return 0; -} /* end function fbadasd_close_device */ + offset = blkgrp * FBA_BLKGRP_SIZE; + if (dev->fbaend - offset < FBA_BLKGRP_SIZE) + return (int)(dev->fbaend - offset); + else + return FBA_BLKGRP_SIZE; +} /*-------------------------------------------------------------------*/ -/* Read an fba block */ +/* Read fba block(s) */ /*-------------------------------------------------------------------*/ -static int fbadasd_read_block (DEVBLK *dev, BYTE *buf, int len, - BYTE *unitstat) +static int fba_read (DEVBLK *dev, BYTE *buf, int len, BYTE *unitstat) { int rc; /* Return code */ -off_t rcoff; /* Return value from lseek() */ +int blkgrp; /* Block group number */ +int blklen; /* Length left in block group*/ +int off; /* Device buffer offset */ +int bufoff; /* Buffer offset */ +int copylen; /* Length left to copy */ + + /* Command reject if referencing outside the volume */ + if (dev->fbarba < dev->fbaorigin * dev->fbablksiz + || dev->fbarba + len > dev->fbaend) + { + dev->sense[0] = SENSE_CR; + *unitstat = CSW_CE | CSW_DE | CSW_UC; + return -1; + } + + /* Read the block group */ + blkgrp = dev->fbarba / FBA_BLKGRP_SIZE; + rc = (dev->hnd->read) (dev, blkgrp, unitstat); + if (rc < 0) + return -1; - rcoff = lseek (dev->fd, dev->fbarba, SEEK_SET); - if (rcoff < 0) + off = dev->fbarba % FBA_BLKGRP_SIZE; + blklen = dev->buflen - off; + + /* Initialize target buffer offset and length to copy */ + bufoff = 0; + copylen = len; + + /* Access multiple block groups asynchronously */ + if (dev->syncio_active && copylen > blklen) { - /* Handle seek error condition */ - devmsg (_("HHCDA068E Seek error in file %s: %s\n"), - dev->filename, strerror(errno)); + dev->syncio_retry = 1; + return -1; + } - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; + /* Copy from the device buffer to the target buffer */ + while (copylen > 0) + { + int len = copylen < blklen ? copylen : blklen; + + /* Copy to the target buffer */ + if (buf) memcpy (buf + bufoff, dev->buf + off, len); + + /* Update offsets and lengths */ + bufoff += len; + copylen -= blklen; + + /* Read the next block group if still more to copy */ + if (copylen > 0) + { + blkgrp++; + off = 0; + rc = (dev->hnd->read) (dev, blkgrp, unitstat); + if (rc < 0) + return -1; + blklen = fba_blkgrp_len (dev, blkgrp); + } + } + + /* Update the rba */ + dev->fbarba += len; + + return len; +} /* end function fba_read */ + +/*-------------------------------------------------------------------*/ +/* Write fba block(s) */ +/*-------------------------------------------------------------------*/ +static int fba_write (DEVBLK *dev, BYTE *buf, int len, BYTE *unitstat) +{ +int rc; /* Return code */ +int blkgrp; /* Block group number */ +int blklen; /* Length left in block group*/ +int off; /* Target buffer offset */ +int bufoff; /* Source buffer offset */ +int copylen; /* Length left to copy */ + + /* Command reject if referencing outside the volume */ + if (dev->fbarba < dev->fbaorigin * dev->fbablksiz + || dev->fbarba + len > dev->fbaend) + { + dev->sense[0] = SENSE_CR; *unitstat = CSW_CE | CSW_DE | CSW_UC; return -1; } - rc = read (dev->fd, buf, len); - if (rc < len) + /* Read the block group */ + blkgrp = dev->fbarba / FBA_BLKGRP_SIZE; + rc = (dev->hnd->read) (dev, blkgrp, unitstat); + if (rc < 0) + return -1; + + off = dev->fbarba % FBA_BLKGRP_SIZE; + blklen = dev->buflen - off; + + /* Initialize source buffer offset and length to copy */ + bufoff = 0; + copylen = len; + + /* Access multiple block groups asynchronously */ + if (dev->syncio_active && copylen > blklen) { - /* Handle read error condition */ + dev->syncio_retry = 1; + return -1; + } + + /* Copy to the device buffer from the target buffer */ + while (copylen > 0) + { + int len = copylen < blklen ? copylen : blklen; + + /* Write to the block group */ + rc = (dev->hnd->write) (dev, blkgrp, off, buf + bufoff, + len, unitstat); if (rc < 0) - devmsg (_("HHCDA069E Read error in file %s: %s\n"), - dev->filename, strerror(errno)); - else - devmsg (_("HHCDA070E Unexpected end of file in %s\n"), - dev->filename); + return -1; - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; - return -1; + /* Update offsets and lengths */ + bufoff += len; + copylen -= len; + blkgrp++; + off = 0; + blklen = fba_blkgrp_len (dev, blkgrp); } + /* Update the rba */ dev->fbarba += len; return len; -} /* end function fbadasd_read_block */ +} /* end function fba_write */ /*-------------------------------------------------------------------*/ -/* Write an fba block */ +/* FBA read block group exit */ /*-------------------------------------------------------------------*/ -static int fbadasd_write_block (DEVBLK *dev, BYTE *buf, int len, - BYTE *unitstat) +static +int fbadasd_read_blkgrp (DEVBLK *dev, int blkgrp, BYTE *unitstat) { -int rc; /* Return code */ -off_t rcoff; /* Return value from lseek() */ +int rc; /* Return code */ +int i, o; /* Cache indexes */ +int len; /* Length to read */ +off_t offset; /* File offsets */ + + /* Return if reading the same block group */ + if (blkgrp >= 0 && blkgrp == dev->bufcur) + return 0; - rcoff = lseek (dev->fd, dev->fbarba, SEEK_SET); - if (rcoff < 0) + /* Write the previous block group if modified */ + if (dev->bufupd) { - /* Handle seek error condition */ - devmsg (_("HHCDA071E Seek error in file %s: %s\n"), - dev->filename, strerror(errno)); + /* Retry if synchronous I/O */ + if (dev->syncio_active) + { + dev->syncio_retry = 1; + return -1; + } + + dev->bufupd = 0; + + /* Seek to the old block group offset */ + offset = (off_t)((dev->bufcur * FBA_BLKGRP_SIZE) + dev->bufupdlo); + offset = lseek (dev->fd, offset, SEEK_SET); + if (offset < 0) + { + /* Handle seek error condition */ + logmsg (_("HHCDA069E error writing blkgrp %d: lseek error: %s\n"), + dev->bufcur, strerror(errno)); + dev->sense[0] = SENSE_EC; + *unitstat = CSW_CE | CSW_DE | CSW_UC; + cache_lock(CACHE_DEVBUF); + cache_setflag(CACHE_DEVBUF, dev->cache, ~FBA_CACHE_ACTIVE, 0); + cache_unlock(CACHE_DEVBUF); + dev->bufupdlo = dev->bufupdhi = 0; + dev->bufcur = dev->cache = -1; + return -1; + } + + /* Write the portion of the block group that was modified */ + rc = write (dev->fd, dev->buf + dev->bufupdlo, + dev->bufupdhi - dev->bufupdlo); + if (rc < dev->bufupdhi - dev->bufupdlo) + { + /* Handle write error condition */ + logmsg (_("HHCDA070E error writing blkgrp %d: write error: %s\n"), + dev->bufcur, strerror(errno)); + dev->sense[0] = SENSE_EC; + *unitstat = CSW_CE | CSW_DE | CSW_UC; + cache_lock(CACHE_DEVBUF); + cache_setflag(CACHE_DEVBUF, dev->cache, ~FBA_CACHE_ACTIVE, 0); + cache_unlock(CACHE_DEVBUF); + dev->bufupdlo = dev->bufupdhi = 0; + dev->bufcur = dev->cache = -1; + return -1; + } + + dev->bufupdlo = dev->bufupdhi = 0; + } + + cache_lock (CACHE_DEVBUF); + + /* Make the previous cache entry inactive */ + if (dev->cache >= 0) + cache_setflag(CACHE_DEVBUF, dev->cache, ~FBA_CACHE_ACTIVE, 0); + dev->bufcur = dev->cache = -1; + + /* Return on special case when called by the close handler */ + if (blkgrp < 0) + { + cache_unlock (CACHE_DEVBUF); + return 0; + } + +fba_read_blkgrp_retry: + + /* Search the cache */ + i = cache_lookup (CACHE_DEVBUF, FBA_CACHE_SETKEY(dev->devnum, blkgrp), &o); + + /* Cache hit */ + if (i >= 0) + { + cache_setflag(CACHE_DEVBUF, dev->cache, ~0, FBA_CACHE_ACTIVE); + cache_setage(CACHE_DEVBUF, dev->cache); + cache_unlock(CACHE_DEVBUF); + + DEVTRACE (_("HHCDA071I read blkgrp %d cache hit, using cache[%d]\n"), + blkgrp, i); + + dev->cachehits++; + dev->cache = i; + dev->buf = cache_getbuf(CACHE_DEVBUF, dev->cache, 0); + dev->bufcur = blkgrp; + dev->bufoff = 0; + dev->bufoffhi = fba_blkgrp_len (dev, blkgrp); + dev->buflen = fba_blkgrp_len (dev, blkgrp); + dev->bufsize = cache_getlen(CACHE_DEVBUF, dev->cache); + return 0; + } + + /* Retry if synchronous I/O */ + if (dev->syncio_active) + { + cache_unlock(CACHE_DEVBUF); + dev->syncio_retry = 1; + return -1; + } + + /* Wait if no available cache entry */ + if (o < 0) + { + DEVTRACE (_("HHCDA072I read blkgrp %d no available cache entry, waiting\n"), + blkgrp); + dev->cachewaits++; + cache_wait(CACHE_DEVBUF); + goto fba_read_blkgrp_retry; + } + + /* Cache miss */ + DEVTRACE (_("HHCDA073I read blkgrp %d cache miss, using cache[%d]\n"), + blkgrp, o); + + dev->cachemisses++; - /* Set unit check with equipment check */ + /* Make this cache entry active */ + cache_setkey (CACHE_DEVBUF, o, FBA_CACHE_SETKEY(dev->devnum, blkgrp)); + cache_setflag(CACHE_DEVBUF, o, 0, FBA_CACHE_ACTIVE|DEVBUF_TYPE_FBA); + cache_setage (CACHE_DEVBUF, o); + dev->buf = cache_getbuf(CACHE_DEVBUF, o, FBA_BLKGRP_SIZE); + cache_unlock (CACHE_DEVBUF); + + /* Get offset and length */ + offset = (off_t)(blkgrp * FBA_BLKGRP_SIZE); + len = fba_blkgrp_len (dev, blkgrp); + + DEVTRACE (_("HHCDA074I read blkgrp %d offset %lld len %d\n"), + blkgrp, (long long)offset, fba_blkgrp_len(dev, blkgrp)); + + /* Seek to the block group offset */ + offset = lseek (dev->fd, offset, SEEK_SET); + if (offset < 0) + { + /* Handle seek error condition */ + logmsg (_("HHCDA075E error reading blkgrp %d: lseek error: %s\n"), + blkgrp, strerror(errno)); dev->sense[0] = SENSE_EC; *unitstat = CSW_CE | CSW_DE | CSW_UC; + cache_lock(CACHE_DEVBUF); + cache_release(CACHE_DEVBUF, o, 0); + cache_unlock(CACHE_DEVBUF); return -1; } - rc = write (dev->fd, buf, len); + /* Read the block group */ + rc = read (dev->fd, dev->buf, len); if (rc < len) { - /* Handle write error condition */ - devmsg (_("HHCDA072E Write error in file %s: %s\n"), - dev->filename, strerror(errno)); - - /* Set unit check with equipment check */ + /* Handle read error condition */ + logmsg (_("HHCDA076E error reading blkgrp %d: read error: %s\n"), + blkgrp, rc < 0 ? strerror(errno) : "end of file"); dev->sense[0] = SENSE_EC; *unitstat = CSW_CE | CSW_DE | CSW_UC; + cache_lock(CACHE_DEVBUF); + cache_release(CACHE_DEVBUF, o, 0); + cache_unlock(CACHE_DEVBUF); return -1; } - dev->fbarba += len; + dev->cache = o; + dev->buf = cache_getbuf(CACHE_DEVBUF, dev->cache, 0); + dev->bufcur = blkgrp; + dev->bufoff = 0; + dev->bufoffhi = fba_blkgrp_len (dev, blkgrp); + dev->buflen = fba_blkgrp_len (dev, blkgrp); + dev->bufsize = cache_getlen(CACHE_DEVBUF, dev->cache); + + return 0; + +} /* end function fbadasd_read_blkgrp */ + +/*-------------------------------------------------------------------*/ +/* FBA update block group exit */ +/*-------------------------------------------------------------------*/ +static +int fbadasd_update_blkgrp (DEVBLK *dev, int blkgrp, int off, + BYTE *buf, int len, BYTE *unitstat) +{ +int rc; /* Return code */ + + /* Read the block group */ + if (blkgrp != dev->bufcur) + { + rc = (dev->hnd->read) (dev, blkgrp, unitstat); + if (rc < 0) + { + dev->bufcur = dev->cache = -1; + return -1; + } + } + + /* Copy to the device buffer */ + if (buf) memcpy (dev->buf + off, buf, len); + + /* Update high/low offsets */ + if (!dev->bufupd || off < dev->bufupdlo) + dev->bufupdlo = off; + if (off + len > dev-> bufupdhi) + dev->bufupdhi = off + len; + + /* Indicate block group has been modified */ + if (!dev->bufupd) + { + dev->bufupd = 1; + shared_update_notify (dev, blkgrp); + } return len; -} /* end function fbadasd_write_block */ +} /* end function fbadasd_update_blkgrp */ + +/*-------------------------------------------------------------------*/ +/* Channel program end exit */ +/*-------------------------------------------------------------------*/ +static +void fbadasd_end (DEVBLK *dev) +{ +BYTE unitstat; + + /* Forces updated buffer to be written */ + fbadasd_read_blkgrp (dev, -1, &unitstat); +} + +/*-------------------------------------------------------------------*/ +/* Release cache entries */ +/*-------------------------------------------------------------------*/ +int fbadasd_purge_cache (int *answer, int ix, int i, void *data) +{ +U16 devnum; /* Cached device number */ +int blkgrp; /* Cached block group */ +DEVBLK *dev = data; /* -> device block */ + + UNREFERENCED(answer); + FBA_CACHE_GETKEY(i, devnum, blkgrp); + if (dev->devnum == devnum) + cache_release (ix, i, CACHE_FREEBUF); + return 0; +} + +/*-------------------------------------------------------------------*/ +/* Close the device */ +/*-------------------------------------------------------------------*/ +int fbadasd_close_device ( DEVBLK *dev ) +{ +BYTE unitstat; + + /* Forces updated buffer to be written */ + fbadasd_read_blkgrp (dev, -1, &unitstat); + + /* Free the cache */ + cache_lock(CACHE_DEVBUF); + cache_scan(CACHE_DEVBUF, fbadasd_purge_cache, dev); + cache_unlock(CACHE_DEVBUF); + + /* Close the device file */ + close (dev->fd); + dev->fd = -1; + + return 0; +} /* end function fbadasd_close_device */ /*-------------------------------------------------------------------*/ /* Return used blocks */ @@ -423,7 +802,7 @@ int repcnt; /* Replication count */ if (count < dev->fbablksiz) *more = 1; /* Read physical block into channel buffer */ - rc = (dev->fbardblk) (dev, iobuf, num, unitstat); + rc = fba_read (dev, iobuf, num, unitstat); if (rc < num) break; /* Set extent defined flag */ @@ -486,7 +865,7 @@ int repcnt; /* Replication count */ /* Write physical block from channel buffer */ if (num > 0) { - rc = (dev->fbawrblk) (dev, iobuf, num, unitstat); + rc = fba_write (dev, iobuf, num, unitstat); if (rc < num) break; } @@ -494,7 +873,7 @@ int repcnt; /* Replication count */ if (num < dev->fbablksiz) { rem = dev->fbablksiz - num; - rc = (dev->fbawrblk) (dev, hexzeroes, rem, unitstat); + rc = fba_write (dev, hexzeroes, rem, unitstat); if (rc < rem) break; } @@ -551,7 +930,7 @@ int repcnt; /* Replication count */ if (num < dev->fbablksiz) *more = 1; /* Read physical block into channel buffer */ - rc = (dev->fbardblk) (dev, iobuf, num, unitstat); + rc = fba_read (dev, iobuf, num, unitstat); if (rc < num) break; /* Prepare to read next block */ @@ -676,7 +1055,7 @@ int repcnt; /* Replication count */ + dev->fbaorigin + dev->fbaxblkn) * dev->fbablksiz; - DEVTRACE("HHCDA073I Positioning to %8.8llX (%llu)\n", + DEVTRACE(_("HHCDA077I Positioning to %8.8llX (%llu)\n"), (long long unsigned int)dev->fbarba, (long long unsigned int)dev->fbarba); /* Return normal status */ @@ -694,7 +1073,7 @@ int repcnt; /* Replication count */ /* Control information length must be at least 16 bytes */ if (count < 16) { - devmsg(_("HHCDA074E define extent data too short: %d bytes\n"), + logmsg(_("HHCDA078E define extent data too short: %d bytes\n"), count); dev->sense[0] = SENSE_CR; *unitstat = CSW_CE | CSW_DE | CSW_UC; @@ -704,7 +1083,7 @@ int repcnt; /* Replication count */ /* Reject if extent previously defined in this CCW chain */ if (dev->fbaxtdef) { - devmsg(_("HHCDA075E second define extent in chain\n")); + logmsg(_("HHCDA079E second define extent in chain\n")); dev->sense[0] = SENSE_CR; *unitstat = CSW_CE | CSW_DE | CSW_UC; break; @@ -715,7 +1094,7 @@ int repcnt; /* Replication count */ if ((dev->fbamask & (FBAMASK_RESV | FBAMASK_CE)) || (dev->fbamask & FBAMASK_CTL) == FBAMASK_CTL_RESV) { - devmsg(_("HHCDA076E invalid file mask %2.2X\n"), + logmsg(_("HHCDA080E invalid file mask %2.2X\n"), dev->fbamask); dev->sense[0] = SENSE_CR; *unitstat = CSW_CE | CSW_DE | CSW_UC; @@ -726,7 +1105,7 @@ int repcnt; /* Replication count */ // /* Verify that bytes 1-3 are zeroes */ // if (iobuf[1] != 0 || iobuf[2] != 0 || iobuf[3] != 0) // { -// devmsg(_("fbadasd: invalid reserved bytes %2.2X %2.2X %2.2X\n"), +// logmsg(_("fbadasd: invalid reserved bytes %2.2X %2.2X %2.2X\n"), // iobuf[1], iobuf[2], iobuf[3]); // dev->sense[0] = SENSE_CR; // *unitstat = CSW_CE | CSW_DE | CSW_UC; @@ -756,9 +1135,9 @@ int repcnt; /* Replication count */ || dev->fbaxlast - dev->fbaxfirst >= dev->fbanumblk - dev->fbaxblkn) { - devmsg(_("HHCDA077E invalid extent: first block %d, last block %d,\n"), + logmsg(_("HHCDA081E invalid extent: first block %d, last block %d,\n"), dev->fbaxfirst, dev->fbaxlast); - devmsg(_(" numblks %d, device size %d\n"), + logmsg(_(" numblks %d, device size %d\n"), dev->fbaxblkn, dev->fbanumblk); dev->sense[0] = SENSE_CR; *unitstat = CSW_CE | CSW_DE | CSW_UC; @@ -797,6 +1176,12 @@ int repcnt; /* Replication count */ break; } + if (dev->hnd->release) (dev->hnd->release) (dev); + + obtain_lock (&dev->lock); + dev->reserved = 0; + release_lock (&dev->lock); + /* Return sense information */ goto sense; @@ -812,6 +1197,14 @@ int repcnt; /* Replication count */ break; } + /* Reserve device to the ID of the active channel program */ + + obtain_lock (&dev->lock); + dev->reserved = 1; + release_lock (&dev->lock); + + if (dev->hnd->reserve) (dev->hnd->reserve) (dev); + /* Return sense information */ goto sense; @@ -827,6 +1220,14 @@ int repcnt; /* Replication count */ break; } + /* Reserve device to the ID of the active channel program */ + + obtain_lock (&dev->lock); + dev->reserved = 1; + release_lock (&dev->lock); + + if (dev->hnd->reserve) (dev->hnd->reserve) (dev); + /* Return sense information */ goto sense; @@ -917,21 +1318,20 @@ int blkfactor; /* Number of device blocks /* Seek to start of desired block */ dev->fbarba = dev->fbaorigin * dev->fbablksiz; - dev->fbarba += blknum * blksize; /* Process depending on operation type */ switch (type) { case 0x01: /* Write block from I/O buffer */ - rc = (dev->fbawrblk) (dev, iobuf, blksize, unitstat); - if (rc < (int)blksize) return; + rc = fba_write (dev, iobuf, blksize, unitstat); + if (rc < blksize) return; break; case 0x02: /* Read block into I/O buffer */ - rc = (dev->fbardblk) (dev, iobuf, blksize, unitstat); - if (rc < (int)blksize) return; + rc = fba_read (dev, iobuf, blksize, unitstat); + if (rc < blksize) return; break; } /* end switch(type) */ @@ -942,11 +1342,18 @@ int blkfactor; /* Number of device blocks } /* end function fbadasd_syncblk_io */ - DEVHND fbadasd_device_hndinfo = { - &fbadasd_init_handler, - &fbadasd_execute_ccw, - &fbadasd_close_device, - &fbadasd_query_device, - NULL, NULL, NULL, NULL + &fbadasd_init_handler, /* Device Initialisation */ + &fbadasd_execute_ccw, /* Device CCW execute */ + &fbadasd_close_device, /* Device Close */ + &fbadasd_query_device, /* Device Query */ + NULL, /* Device Start channel pgm */ + &fbadasd_end, /* Device End channel pgm */ + NULL, /* Device Resume channel pgm */ + &fbadasd_end, /* Device Suspend channel pgm */ + &fbadasd_read_blkgrp, /* Device Read */ + &fbadasd_update_blkgrp, /* Device Write */ + &fbadasd_used, /* Device Query used */ + NULL, /* Device Reserve */ + NULL /* Device Release */ }; diff --git a/feat370.h b/feat370.h index c1944e8..0f4b0f8 100644 --- a/feat370.h +++ b/feat370.h @@ -19,6 +19,7 @@ #define FEATURE_CHANNEL_SWITCHING #define FEATURE_S370E_EXTENDED_ADDRESSING #define FEATURE_TEST_BLOCK +#define FEATURE_ECPSVM #endif /*defined(OPTION_370_MODE)*/ /* end of FEAT370.H */ diff --git a/feat390.h b/feat390.h index 61bc933..d126f13 100644 --- a/feat390.h +++ b/feat390.h @@ -23,14 +23,14 @@ #define FEATURE_DUAL_ADDRESS_SPACE #define FEATURE_EMULATE_VM #define FEATURE_EXPANDED_STORAGE -#define FEATURE_EXPEDITED_SIE_SUBSET +#define FEATURE_EXPEDITED_SIE_SUBSET #define FEATURE_EXTENDED_STORAGE_KEYS #define FEATURE_EXTENDED_TOD_CLOCK #define FEATURE_EXTENDED_TRANSLATION #define FEATURE_EXTENDED_TRANSLATION_FACILITY_2 #define FEATURE_EXTERNAL_INTERRUPT_ASSIST #define FEATURE_FETCH_PROTECTION_OVERRIDE -// #define FEATURE_FPS_EXTENSIONS +#define FEATURE_FPS_EXTENSIONS #define FEATURE_HERCULES_DIAGCALLS #define FEATURE_HEXADECIMAL_FLOATING_POINT #define FEATURE_HFP_EXTENSIONS @@ -41,6 +41,7 @@ #define FEATURE_INTERPRETIVE_EXECUTION #define FEATURE_LOCK_PAGE #define FEATURE_LINKAGE_STACK +#define FEATURE_MESSAGE_SECURITY_ASSIST #define FEATURE_MOVE_PAGE_FACILITY_2 #define FEATURE_MSSF_CALL #define FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE @@ -51,6 +52,7 @@ #define FEATURE_PER2 #define FEATURE_PRIVATE_SPACE #define FEATURE_PROTECTION_INTERCEPTION_CONTROL +#define FEATURE_QUEUED_DIRECT_IO #define FEATURE_REGION_RELOCATE #define FEATURE_RESUME_PROGRAM #define FEATURE_S390_DAT diff --git a/feat900.h b/feat900.h index b3f51d1..58869f1 100644 --- a/feat900.h +++ b/feat900.h @@ -19,29 +19,33 @@ #define FEATURE_COMPARE_AND_MOVE_EXTENDED #define FEATURE_COMPRESSION #define FEATURE_CPU_RECONFIG +// #define FEATURE_DAT_ENHANCEMENT #define FEATURE_DUAL_ADDRESS_SPACE #define FEATURE_EMULATE_VM #define FEATURE_ESAME #define FEATURE_EXPANDED_STORAGE -#define FEATURE_EXPEDITED_SIE_SUBSET +#define FEATURE_EXPEDITED_SIE_SUBSET #define FEATURE_EXTENDED_STORAGE_KEYS #define FEATURE_EXTENDED_TOD_CLOCK #define FEATURE_EXTENDED_TRANSLATION #define FEATURE_EXTENDED_TRANSLATION_FACILITY_2 #define FEATURE_EXTERNAL_INTERRUPT_ASSIST #define FEATURE_FETCH_PROTECTION_OVERRIDE -// #define FEATURE_FPS_EXTENSIONS +#define FEATURE_FPS_EXTENSIONS #define FEATURE_HERCULES_DIAGCALLS #define FEATURE_HEXADECIMAL_FLOATING_POINT #define FEATURE_HFP_EXTENSIONS +#define FEATURE_HFP_MULTIPLY_ADD_SUBTRACT #define FEATURE_HYPERVISOR #define FEATURE_IMMEDIATE_AND_RELATIVE #define FEATURE_INCORRECT_LENGTH_INDICATION_SUPPRESSION #define FEATURE_INTERPRETIVE_EXECUTION #define FEATURE_IO_ASSIST +#define FEATURE_LINKAGE_STACK #define FEATURE_LOAD_REVERSED #define FEATURE_LOCK_PAGE -#define FEATURE_LINKAGE_STACK +#define FEATURE_LONG_DISPLACEMENT +#define FEATURE_MESSAGE_SECURITY_ASSIST #define FEATURE_MOVE_PAGE_FACILITY_2 #define FEATURE_MVS_ASSIST #define FEATURE_PAGE_PROTECTION @@ -50,6 +54,7 @@ #define FEATURE_PER2 #define FEATURE_PRIVATE_SPACE #define FEATURE_PROTECTION_INTERCEPTION_CONTROL +#define FEATURE_QUEUED_DIRECT_IO #define FEATURE_RESUME_PROGRAM #define FEATURE_REGION_RELOCATE #define FEATURE_SERVICE_PROCESSOR diff --git a/featall.h b/featall.h index de74bf5..10282e9 100644 --- a/featall.h +++ b/featall.h @@ -5,8 +5,6 @@ /* Default features */ /* All existing features MUST be #undef-ed here. */ /*-------------------------------------------------------------------*/ -#define MAX_CPU_ENGINES 2 /* Maximum number of engines */ -#undef SMP_SERIALIZATION /* Serialize storage for SMP */ #define OPTION_370_MODE /* Generate S/370 support */ #define OPTION_390_MODE /* Generate ESA/390 support */ #define OPTION_900_MODE /* Generate ESAME support */ @@ -20,21 +18,14 @@ #define PANEL_REFRESH_RATE_FAST 50 /* Fast refresh rate */ #define PANEL_REFRESH_RATE_SLOW 500 /* Slow refresh rate */ #define MAX_DEVICE_THREAD_IDLE_SECS 300 /* 5 Minute thread timeout */ -#define OPTION_AIA_BUFFER /* Instruction addr cache */ -#define OPTION_AEA_BUFFER /* Effective addr cache */ #undef OPTION_NO_INLINE_DAT /* Performance option */ #define OPTION_NO_INLINE_LOGICAL /* Performance option */ #undef OPTION_NO_INLINE_VSTORE /* Performance option */ #define OPTION_NO_INLINE_IFETCH /* Performance option */ -#define OPTION_CPU_UNROLL /* Performance option */ #define OPTION_FAST_MOVECHAR /* Performance option */ #define OPTION_FAST_MOVELONG /* Performance option */ -#define OPTION_FAST_INSTFETCH /* Performance option */ -#define OPTION_FAST_LOGICAL /* Performance option */ #define OPTION_FAST_PREFIX /* Performance option */ -#define OPTION_REDUCED_INVAL /* Performance option */ -#define OPTION_FAST_INTCOND /* Ea CPU has intcond COND */ -#define OPTION_SYNCIO /* Synchronous I/O option */ +#define OPTION_FAST_DEVLOOKUP /* Fast devnum/subchan lookup*/ #define OPTION_IODELAY_KLUDGE /* IODELAY kludge for linux */ #define OPTION_IODELAY_LINUX_DEFAULT 800/* Default if OSTAILOR LINUX */ #undef OPTION_FOOTPRINT_BUFFER /* 2048 ** Size must be a power of 2 */ @@ -52,6 +43,14 @@ #define OPTION_HTTP_SERVER /* HTTP server support */ +// (handled automatically in configure.ac) +// #define OPTION_DYNAMIC_LOAD + +#if !defined(MAX_CPU_ENGINES) +#define MAX_CPU_ENGINES 2 +#endif + + /* Allow for compiler command line overrides */ #if defined(OPTION_370_MODE) && defined(NO_370_MODE) #undef OPTION_370_MODE @@ -96,12 +95,13 @@ #undef FEATURE_COMPARE_AND_MOVE_EXTENDED #undef FEATURE_COMPRESSION #undef FEATURE_CPU_RECONFIG +#undef FEATURE_DAT_ENHANCEMENT #undef FEATURE_DUAL_ADDRESS_SPACE #undef FEATURE_EMULATE_VM #undef FEATURE_ESAME #undef FEATURE_ESAME_N3_ESA390 #undef FEATURE_EXPANDED_STORAGE -#undef FEATURE_EXPEDITED_SIE_SUBSET +#undef FEATURE_EXPEDITED_SIE_SUBSET #undef FEATURE_EXTENDED_STORAGE_KEYS #undef FEATURE_EXTENDED_TOD_CLOCK #undef FEATURE_EXTENDED_TRANSLATION @@ -112,6 +112,7 @@ #undef FEATURE_HERCULES_DIAGCALLS #undef FEATURE_HEXADECIMAL_FLOATING_POINT #undef FEATURE_HFP_EXTENSIONS +#undef FEATURE_HFP_MULTIPLY_ADD_SUBTRACT #undef FEATURE_HYPERVISOR #undef FEATURE_IMMEDIATE_AND_RELATIVE #undef FEATURE_INCORRECT_LENGTH_INDICATION_SUPPRESSION @@ -121,6 +122,8 @@ #undef FEATURE_LINKAGE_STACK #undef FEATURE_LOAD_REVERSED #undef FEATURE_LOCK_PAGE +#undef FEATURE_LONG_DISPLACEMENT +#undef FEATURE_MESSAGE_SECURITY_ASSIST #undef FEATURE_MOVE_PAGE_FACILITY_2 #undef FEATURE_MSSF_CALL #undef FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE @@ -131,6 +134,7 @@ #undef FEATURE_PER2 #undef FEATURE_PRIVATE_SPACE #undef FEATURE_PROTECTION_INTERCEPTION_CONTROL +#undef FEATURE_QUEUED_DIRECT_IO #undef FEATURE_REGION_RELOCATE #undef FEATURE_RESUME_PROGRAM #undef FEATURE_S370_CHANNEL @@ -151,5 +155,6 @@ #undef FEATURE_TRACING #undef FEATURE_VECTOR_FACILITY #undef FEATURE_WAITSTATE_ASSIST +#undef FEATURE_ECPSVM /* end of FEATALL.H */ diff --git a/featchk.h b/featchk.h index 2432dfb..b6f42f8 100644 --- a/featchk.h +++ b/featchk.h @@ -25,7 +25,7 @@ #endif #endif -/* _FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE is used for host +/* _FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE is used for host related processing issues, FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE is defined only in ESA/390 mode. MCDS is an ESA/390 feature that is supported under z/Architecture SIE */ @@ -57,6 +57,10 @@ #define _FEATURE_EXPANDED_STORAGE #endif +#if defined(FEATURE_ECPSVM) + #define _FEATURE_ECPSVM +#endif + #if defined(_FEATURE_SIE) && defined(FEATURE_STORAGE_KEY_ASSIST) #define _FEATURE_STORAGE_KEY_ASSIST #endif @@ -93,6 +97,10 @@ #define _FEATURE_EXTERNAL_INTERRUPT_ASSIST #endif +#if defined(FEATURE_MESSAGE_SECURITY_ASSIST) + #define _FEATURE_MESSAGE_SECURITY_ASSIST +#endif + #undef _VSTORE_C_STATIC #if !defined(OPTION_NO_INLINE_VSTORE) #define _VSTORE_C_STATIC static inline @@ -168,7 +176,7 @@ #define GEN_MAXARCH 3+2 #elif defined(_ARCHMODE2) #define GEN_MAXARCH 2+2 -#else +#else #define GEN_MAXARCH 1+2 #endif @@ -176,14 +184,15 @@ #error OPTION_390_MODE must be enabled for OPTION_900_MODE #endif + #else /*!defined(FEATCHK_CHECK_ALL)*/ /* When ESAME is installed then all instructions marked N3 in the reference are also available in ESA/390 mode */ -#if defined(_900) +#if defined(_900) && (__GEN_ARCH == 390) #define FEATURE_ESAME_N3_ESA390 -#endif /*defined(_900)*/ +#endif #if !defined(FEATURE_2K_STORAGE_KEYS) \ && !defined(FEATURE_4K_STORAGE_KEYS) @@ -204,7 +213,7 @@ #if defined(_900) && defined(FEATURE_VECTOR_FACILITY) #error Vector Facility not supported on ESAME capable processors #endif - + #if defined(FEATURE_MOVE_PAGE_FACILITY_2) \ && !defined(FEATURE_4K_STORAGE_KEYS) #error Move page facility cannot be defined with 2K storage keys @@ -251,6 +260,11 @@ #error I/O Assist Feature only supported with SIE #endif +#if defined(FEATURE_IO_ASSIST) \ + && !defined(_FEATURE_REGION_RELOCATE) + #error Region Relocate Facility required for IO Assist +#endif + #if defined(FEATURE_EXTERNAL_INTERRUPT_ASSIST) \ && !defined(_FEATURE_SIE) #error External Interruption assist only supported with SIE @@ -284,11 +298,34 @@ #endif #endif +#if defined(FEATURE_FPS_EXTENSIONS) \ + && !defined(FEATURE_BINARY_FLOATING_POINT) + #error FP support extensions requires binary floating point +#endif + +#if defined(FEATURE_HFP_MULTIPLY_ADD_SUBTRACT) \ + && !defined(FEATURE_HEXADECIMAL_FLOATING_POINT) + #error HFP multiply add/subtract requires hexadecimal floating point +#endif + #if defined(FEATURE_PER2) && !defined(FEATURE_PER) #error FEATURE_PER must be defined when using FEATURE_PER2 #endif +#if defined(FEATURE_MESSAGE_SECURITY_ASSIST) + #if defined(_370) + #define _370_FEATURE_MESSAGE_SECURITY_ASSIST + #endif + #if defined(_390) + #define _390_FEATURE_MESSAGE_SECURITY_ASSIST + #endif + #if defined(_900) + #define _900_FEATURE_MESSAGE_SECURITY_ASSIST + #endif +#endif /*defined(FEATURE_MESSAGE_SECURITY_ASSIST)*/ + + #endif /*!defined(FEATALL_CHECKALL)*/ /* end of FEATCHK.H */ diff --git a/feature.h b/feature.h index ed3accd..0e71c51 100644 --- a/feature.h +++ b/feature.h @@ -89,21 +89,17 @@ #undef F_AREG #undef STORE_W #undef FETCH_W -#if defined(OPTION_AIA_BUFFER) #undef VI #undef AI -#endif /*defined(OPTION_AIA_BUFFER)*/ -#if defined(OPTION_AEA_BUFFER) #undef AE #undef VE -#endif /*defined(OPTION_AEA_BUFFER)*/ #undef SIEBK #undef ZPB #undef TLB_STD #undef TLB_VADDR #undef TLB_PTE -#if !defined(NO_ATTR_REGPARM) && !defined(PROFILE_CPU) +#if !defined(NO_ATTR_REGPARM) #define ATTR_REGPARM(n) __attribute__ ((regparm(n))) #else #define ATTR_REGPARM(n) /* nothing */ @@ -129,7 +125,7 @@ s370_ ## _name (AMASK24) #define ADDRESS_MAXWRAP_E(_register_context) \ - (AMASK31) + (AMASK31) #define REAL_MODE(p) \ ((p)->ecmode==0 || ((p)->sysmask & PSW_DATMODE)==0) @@ -143,57 +139,53 @@ s370_ ## _name ((_regs)->psw.ecmode && ((_regs)->psw.sysmask & PSW_PERMODE)) #endif -#define ASF_ENABLED(_regs) 0 /* ASF is never enabled for S/370 */ +#define ASF_ENABLED(_regs) 0 /* ASF is never enabled for S/370 */ #define ASTE_AS_DESIGNATOR(_aste) \ - ((_aste)[2]) + ((_aste)[2]) #define ASTE_LT_DESIGNATOR(_aste) \ - ((_aste)[3]) + ((_aste)[3]) -#define SAEVENT_BIT STD_SAEVENT -#define SSEVENT_BIT STD_SSEVENT -#define SSGROUP_BIT STD_GROUP +#define SAEVENT_BIT STD_SAEVENT +#define SSEVENT_BIT STD_SSEVENT +#define SSGROUP_BIT STD_GROUP -#define PSA PSA_3XX +#define PSA PSA_3XX #define PSA_SIZE 4096 -#define IA IA_L -#define PX PX_L -#define CR(_r) CR_L(_r) -#define GR(_r) GR_L(_r) +#define IA IA_L +#define PX PX_L +#define CR(_r) CR_L(_r) +#define GR(_r) GR_L(_r) #define GR_A(_r, _regs) ((_regs)->GR_L((_r))) #define MONCODE MC_L -#define TEA EA_L +#define TEA EA_L #define DXC tea -#define ET ET_L +#define ET ET_L #define PX_MASK 0x7FFFF000 #define RSTOLD iplccw1 #define RSTNEW iplpsw #if !defined(_FEATURE_ZSIE) -#define RADR U32 +#define RADR U32 #define F_RADR "%8.8X" #else -#define RADR U64 -#define F_RADR "%16.16llX" +#define RADR U64 +#define F_RADR "%8.8llX" #endif -#define VADR U32 +#define VADR U32 #define F_VADR "%8.8X" -#define GREG U32 +#define GREG U32 #define F_GREG "%8.8X" -#define CREG U32 +#define CREG U32 #define F_CREG "%8.8X" -#define AREG U32 +#define AREG U32 #define F_AREG "%8.8X" #define STORE_W STORE_FW #define FETCH_W FETCH_FW -#if defined(OPTION_AIA_BUFFER) -#define VI VI_L -#define AI AI_L -#endif /*defined(OPTION_AIA_BUFFER)*/ -#if defined(OPTION_AEA_BUFFER) -#define AE(_r) AE_L(_r) -#define VE(_r) VE_L(_r) -#endif /*defined(OPTION_AEA_BUFFER)*/ +#define VI VI_L +#define AI AI_L +#define AE(_r) AE_L(_r) +#define VE(_r) VE_L(_r) #define SIEBK SIE1BK #define ZPB ZPB1 #define TLB_STD TLB_STD_L @@ -211,8 +203,8 @@ void (ATTR_REGPARM(3) s390_ ## _name) (BYTE inst[], int execflag, REGS *regs) s390_ ## _name #define APPLY_PREFIXING(addr,pfx) \ - ((((addr)&0x7FFFF000)==0)?((addr)&0xFFF)|pfx:\ - (((addr)&0x7FFFF000)==pfx)?(addr)&0xFFF:(addr)) + (((U32)((addr)&0x7FFFF000)==(U32)0) ?((addr)&0xFFF)|(pfx):\ + ((U32)((addr)&0x7FFFF000)==(U32)(pfx))?((addr)&0xFFF):(addr)) #define AMASK AMASK_L @@ -220,7 +212,7 @@ s390_ ## _name ((_register_context)->psw.AMASK) #define ADDRESS_MAXWRAP_E(_register_context) \ - ((_register_context)->psw.AMASK) + ((_register_context)->psw.AMASK) #define REAL_MODE(p) \ (((p)->sysmask & PSW_DATMODE)==0) @@ -234,66 +226,62 @@ s390_ ## _name ((_regs)->psw.sysmask & PSW_PERMODE) #endif -#define ASF_ENABLED(_regs) ((_regs)->CR(0) & CR0_ASF) +#define ASF_ENABLED(_regs) ((_regs)->CR(0) & CR0_ASF) #define ASTE_AS_DESIGNATOR(_aste) \ - ((_aste)[2]) + ((_aste)[2]) #define ASTE_LT_DESIGNATOR(_aste) \ - ((_aste)[3]) + ((_aste)[3]) -#define SAEVENT_BIT STD_SAEVENT -#define SSEVENT_BIT STD_SSEVENT -#define SSGROUP_BIT STD_GROUP +#define SAEVENT_BIT STD_SAEVENT +#define SSEVENT_BIT STD_SSEVENT +#define SSGROUP_BIT STD_GROUP -#define LSED_UET_HDR S_LSED_UET_HDR -#define LSED_UET_TLR S_LSED_UET_TLR -#define LSED_UET_BAKR S_LSED_UET_BAKR -#define LSED_UET_PC S_LSED_UET_PC +#define LSED_UET_HDR S_LSED_UET_HDR +#define LSED_UET_TLR S_LSED_UET_TLR +#define LSED_UET_BAKR S_LSED_UET_BAKR +#define LSED_UET_PC S_LSED_UET_PC #define CR12_BRTRACE S_CR12_BRTRACE #define CR12_TRACEEA S_CR12_TRACEEA #define CHM_GPR2_RESV S_CHM_GPR2_RESV -#define PSA PSA_3XX +#define PSA PSA_3XX #define PSA_SIZE 4096 -#define IA IA_L -#define PX PX_L -#define CR(_r) CR_L(_r) -#define GR(_r) GR_L(_r) +#define IA IA_L +#define PX PX_L +#define CR(_r) CR_L(_r) +#define GR(_r) GR_L(_r) #define GR_A(_r, _regs) ((_regs)->GR_L((_r))) #define MONCODE MC_L -#define TEA EA_L +#define TEA EA_L #define DXC tea -#define ET ET_L +#define ET ET_L #define PX_MASK 0x7FFFF000 #define RSTNEW iplpsw #define RSTOLD iplccw1 #if !defined(_FEATURE_ZSIE) -#define RADR U32 +#define RADR U32 #define F_RADR "%8.8X" #else -#define RADR U64 -#define F_RADR "%16.16llX" +#define RADR U64 +#define F_RADR "%8.8llX" #endif -#define VADR U32 +#define VADR U32 #define F_VADR "%8.8X" -#define GREG U32 +#define GREG U32 #define F_GREG "%8.8X" -#define CREG U32 +#define CREG U32 #define F_CREG "%8.8X" -#define AREG U32 +#define AREG U32 #define F_AREG "%8.8X" #define STORE_W STORE_FW #define FETCH_W FETCH_FW -#if defined(OPTION_AIA_BUFFER) -#define VI VI_L -#define AI AI_L -#endif /*defined(OPTION_AIA_BUFFER)*/ -#if defined(OPTION_AEA_BUFFER) -#define AE(_r) AE_L(_r) -#define VE(_r) VE_L(_r) -#endif /*defined(OPTION_AEA_BUFFER)*/ +#define VI VI_L +#define AI AI_L +#define AE(_r) AE_L(_r) +#define VE(_r) VE_L(_r) #define SIEBK SIE1BK #define ZPB ZPB1 #define TLB_STD TLB_STD_L @@ -305,8 +293,8 @@ s390_ ## _name #define ARCH_MODE ARCH_900 #define APPLY_PREFIXING(addr,pfx) \ - ((((addr)&0xFFFFFFFFFFFFE000ULL)==0)?((addr)&0x1FFF)|pfx:\ - (((addr)&0xFFFFFFFFFFFFE000ULL)==pfx)?(addr)&0x1FFF:(addr)) + (((U64)((addr)&0xFFFFFFFFFFFFE000ULL)==(U64)0)?((addr)&0x1FFF)|(pfx):\ + ((U64)((addr)&0xFFFFFFFFFFFFE000ULL)==(U64)(pfx))?(addr)&0x1FFF:(addr)) #define AMASK AMASK_G @@ -314,7 +302,7 @@ s390_ ## _name ((_register_context)->psw.AMASK) #define ADDRESS_MAXWRAP_E(_register_context) \ - ((_register_context)->psw.AMASK) + ((_register_context)->psw.AMASK) #define REAL_MODE(p) \ (((p)->sysmask & PSW_DATMODE)==0) @@ -355,40 +343,36 @@ void (ATTR_REGPARM(3) z900_ ## _name) (BYTE inst[], int execflag, REGS *regs) #define ARCH_DEP(_name) \ z900_ ## _name -#define PSA PSA_900 +#define PSA PSA_900 #define PSA_SIZE 8192 -#define IA IA_G -#define PX PX_L -#define CR(_r) CR_G(_r) -#define GR(_r) GR_G(_r) +#define IA IA_G +#define PX PX_L +#define CR(_r) CR_G(_r) +#define GR(_r) GR_G(_r) #define GR_A(_r, _regs) ((_regs)->psw.amode64 ? (_regs)->GR_G((_r)) : (_regs)->GR_L((_r))) #define MONCODE MC_G -#define TEA EA_G +#define TEA EA_G #define DXC dataexc -#define ET ET_G +#define ET ET_G #define PX_MASK 0x7FFFE000 #define RSTOLD rstold #define RSTNEW rstnew -#define RADR U64 +#define RADR U64 #define F_RADR "%16.16llX" -#define VADR U64 +#define VADR U64 #define F_VADR "%16.16llX" -#define GREG U64 +#define GREG U64 #define F_GREG "%16.16llX" -#define CREG U64 +#define CREG U64 #define F_CREG "%16.16llX" -#define AREG U32 +#define AREG U32 #define F_AREG "%8.8X" #define STORE_W STORE_DW #define FETCH_W FETCH_DW -#if defined(OPTION_AIA_BUFFER) -#define VI VI_G -#define AI AI_G -#endif /*defined(OPTION_AIA_BUFFER)*/ -#if defined(OPTION_AEA_BUFFER) -#define AE(_r) AE_G(_r) -#define VE(_r) VE_G(_r) -#endif /*defined(OPTION_AEA_BUFFER)*/ +#define VI VI_G +#define AI AI_G +#define AE(_r) AE_G(_r) +#define VE(_r) VE_G(_r) #define SIEBK SIE2BK #define ZPB ZPB2 #define TLB_STD TLB_STD_G diff --git a/float.c b/float.c index e4fc885..6388d81 100644 --- a/float.c +++ b/float.c @@ -22,6 +22,9 @@ /* Added the HFP-extension-facility (26 additional instructions). */ /* Added the AFP-Registers-facility (additional float registers). */ /* Peter Kuschnerus 13/12/00 */ +/* Long Displacement Facility: LDY,LEY,STDY,STEY R.Bowler 29/06/03 */ +/* FPS Extensions Facility: LXR,LZER,LZDR,LZXR R.Bowler 06juil03 */ +/* HFP Multiply and Add/Subtract Facility R.Bowler 10juil03 */ /*-------------------------------------------------------------------*/ @@ -216,6 +219,13 @@ #define NEG 1 /* Negative value of sign */ #define UNNORMAL 0 /* Without normalisation */ #define NORMAL 1 /* With normalisation */ +#define OVUNF 1 /* Check for over/underflow */ +#define NOOVUNF 0 /* Leave exponent as is (for + multiply-add/subtrace) */ +#define SIGEX 1 /* Significance exception if + result fraction is zero */ +#define NOSIGEX 0 /* Do not raise significance + exception, use true zero */ /*-------------------------------------------------------------------*/ @@ -920,14 +930,16 @@ static inline int over_under_flow_ef( EXTENDED_FLOAT *fl, REGS *regs ) /* */ /* Input: */ /* fl Internal float */ +/* sigex Allow significance exception if true */ /* regs CPU register context */ /* Value: */ /* exeption */ /*-------------------------------------------------------------------*/ -static inline int significance_sf( SHORT_FLOAT *fl, REGS *regs ) +static inline int significance_sf( SHORT_FLOAT *fl, BYTE sigex, + REGS *regs ) { fl->sign = POS; - if (regs->psw.sgmask) { + if (sigex && regs->psw.sgmask) { return(PGM_SIGNIFICANCE_EXCEPTION); } /* set true 0 */ @@ -944,14 +956,16 @@ static inline int significance_sf( SHORT_FLOAT *fl, REGS *regs ) /* */ /* Input: */ /* fl Internal float */ +/* sigex Allow significance exception if true */ /* regs CPU register context */ /* Value: */ /* exeption */ /*-------------------------------------------------------------------*/ -static inline int significance_lf( LONG_FLOAT *fl, REGS *regs ) +static inline int significance_lf( LONG_FLOAT *fl, BYTE sigex, + REGS *regs ) { fl->sign = POS; - if (regs->psw.sgmask) { + if (sigex && regs->psw.sgmask) { return(PGM_SIGNIFICANCE_EXCEPTION); } /* set true 0 */ @@ -1004,12 +1018,13 @@ static inline int significance_ef( EXTENDED_FLOAT *fl, U32 *fpr, /* fl Float */ /* add_fl Float to be added */ /* normal Normalize if true */ +/* sigex Allow significance exception if true */ /* regs CPU register context */ /* Value: */ /* exeption */ /*-------------------------------------------------------------------*/ -static int add_sf( SHORT_FLOAT *fl, SHORT_FLOAT *add_fl, BYTE normal, - REGS *regs ) +static int add_sf( SHORT_FLOAT *fl, SHORT_FLOAT *add_fl, + BYTE normal, BYTE sigex, REGS *regs ) { int pgm_check; BYTE shift; @@ -1044,7 +1059,7 @@ BYTE shift; fl->short_fract = add_fl->short_fract; if (fl->short_fract == 0) { - pgm_check = significance_sf(fl, regs); + pgm_check = significance_sf(fl, sigex, regs); } else { if (normal == NORMAL) { normal_sf(fl); @@ -1066,7 +1081,7 @@ BYTE shift; /* 0, nothing to add */ if (fl->short_fract == 0) { - pgm_check = significance_sf(fl, regs); + pgm_check = significance_sf(fl, sigex, regs); } else { if (normal == NORMAL) { normal_sf(fl); @@ -1089,7 +1104,7 @@ BYTE shift; /* true 0 */ fl->short_fract = 0; - return( significance_sf(fl, regs) ); + return( significance_sf(fl, sigex, regs) ); } else if (fl->short_fract > add_fl->short_fract) { fl->short_fract -= add_fl->short_fract; @@ -1122,13 +1137,13 @@ BYTE shift; } else { /* true 0 */ - pgm_check = significance_sf(fl, regs); + pgm_check = significance_sf(fl, sigex, regs); } } else { /* not normalize, just guard digit */ fl->short_fract >>= 4; if (fl->short_fract == 0) { - pgm_check = significance_sf(fl, regs); + pgm_check = significance_sf(fl, sigex, regs); } } } @@ -1140,14 +1155,14 @@ BYTE shift; fl->sign = add_fl->sign; fl->short_fract = add_fl->short_fract; if (fl->short_fract == 0) { - return( significance_sf(fl, regs) ); + return( significance_sf(fl, sigex, regs) ); } } } else { /* add_fl 0 */ if (fl->short_fract == 0) { /* fl 0 */ /* both 0 */ - return( significance_sf(fl, regs) ); + return( significance_sf(fl, sigex, regs) ); } } if (normal == NORMAL) { @@ -1166,12 +1181,13 @@ BYTE shift; /* fl Float */ /* add_fl Float to be added */ /* normal Normalize if true */ +/* sigex Allow significance exception if true */ /* regs CPU register context */ /* Value: */ /* exeption */ /*-------------------------------------------------------------------*/ -static int add_lf( LONG_FLOAT *fl, LONG_FLOAT *add_fl, BYTE normal, - REGS *regs ) +static int add_lf( LONG_FLOAT *fl, LONG_FLOAT *add_fl, + BYTE normal, BYTE sigex, REGS *regs ) { int pgm_check; BYTE shift; @@ -1206,7 +1222,7 @@ BYTE shift; fl->long_fract = add_fl->long_fract; if (fl->long_fract == 0) { - pgm_check = significance_lf(fl, regs); + pgm_check = significance_lf(fl, sigex, regs); } else { if (normal == NORMAL) { normal_lf(fl); @@ -1228,7 +1244,7 @@ BYTE shift; /* 0, nothing to add */ if (fl->long_fract == 0) { - pgm_check = significance_lf(fl, regs); + pgm_check = significance_lf(fl, sigex, regs); } else { if (normal == NORMAL) { normal_lf(fl); @@ -1251,7 +1267,7 @@ BYTE shift; /* true 0 */ fl->long_fract = 0; - return( significance_lf(fl, regs) ); + return( significance_lf(fl, sigex, regs) ); } else if (fl->long_fract > add_fl->long_fract) { fl->long_fract -= add_fl->long_fract; @@ -1284,13 +1300,13 @@ BYTE shift; } else { /* true 0 */ - pgm_check = significance_lf(fl, regs); + pgm_check = significance_lf(fl, sigex, regs); } } else { /* not normalize, just guard digit */ fl->long_fract >>= 4; if (fl->long_fract == 0) { - pgm_check = significance_lf(fl, regs); + pgm_check = significance_lf(fl, sigex, regs); } } } @@ -1302,14 +1318,14 @@ BYTE shift; fl->sign = add_fl->sign; fl->long_fract = add_fl->long_fract; if (fl->long_fract == 0) { - return( significance_lf(fl, regs) ); + return( significance_lf(fl, sigex, regs) ); } } } else { /* add_fl 0 */ if (fl->long_fract == 0) { /* fl 0 */ /* both 0 */ - return( significance_lf(fl, regs) ); + return( significance_lf(fl, sigex, regs) ); } } if (normal == NORMAL) { @@ -1876,18 +1892,21 @@ U64 wk; } /* end function mul_lf_to_ef */ -#if defined (FEATURE_HFP_EXTENSIONS) +#if defined(FEATURE_HFP_EXTENSIONS) \ + || defined(FEATURE_HFP_MULTIPLY_ADD_SUBTRACT) /*-------------------------------------------------------------------*/ /* Multiply short float */ /* */ /* Input: */ /* fl Multiplicand short float */ /* mul_fl Multiplicator short float */ +/* ovunf Handle overflow/underflow if true */ /* regs CPU register context */ /* Value: */ /* exeption */ /*-------------------------------------------------------------------*/ -static int mul_sf( SHORT_FLOAT *fl, SHORT_FLOAT *mul_fl, REGS *regs ) +static int mul_sf( SHORT_FLOAT *fl, SHORT_FLOAT *mul_fl, + BYTE ovunf, REGS *regs ) { U64 wk; @@ -1912,8 +1931,12 @@ U64 wk; /* determine sign */ fl->sign = (fl->sign == mul_fl->sign) ? POS : NEG; - /* handle overflow and underflow */ - return( over_under_flow_sf(fl, regs) ); + /* handle overflow and underflow if required */ + if (ovunf == OVUNF) + return( over_under_flow_sf(fl, regs) ); + + /* otherwise leave exponent as is */ + return(0); } else { /* set true 0 */ @@ -1924,7 +1947,7 @@ U64 wk; } } /* end function mul_sf */ -#endif /* FEATURE_HFP_EXTENSIONS */ +#endif /*FEATURE_HFP_EXTENSIONS || FEATURE_HFP_MULTIPLY_ADD_SUBTRACT*/ /*-------------------------------------------------------------------*/ @@ -1933,11 +1956,13 @@ U64 wk; /* Input: */ /* fl Multiplicand long float */ /* mul_fl Multiplicator long float */ +/* ovunf Handle overflow/underflow if true */ /* regs CPU register context */ /* Value: */ /* exeption */ /*-------------------------------------------------------------------*/ -static int mul_lf( LONG_FLOAT *fl, LONG_FLOAT *mul_fl, REGS *regs ) +static int mul_lf( LONG_FLOAT *fl, LONG_FLOAT *mul_fl, + BYTE ovunf, REGS *regs ) { U64 wk; U32 v; @@ -1971,8 +1996,12 @@ U32 v; /* determine sign */ fl->sign = (fl->sign == mul_fl->sign) ? POS : NEG; - /* handle overflow and underflow */ - return( over_under_flow_lf(fl, regs) ); + /* handle overflow and underflow if required */ + if (ovunf == OVUNF) + return( over_under_flow_lf(fl, regs) ); + + /* otherwise leave exponent as is */ + return(0); } else { /* set true 0 */ @@ -3140,7 +3169,7 @@ LONG_FLOAT cmp_fl; DEF_INST(add_float_long_reg) { int r1, r2; /* Values of R fields */ -int i1; +int i1; /* Index of R1 in fpr array */ LONG_FLOAT fl; LONG_FLOAT add_fl; int pgm_check; @@ -3154,7 +3183,7 @@ int pgm_check; get_lf(&add_fl, regs->fpr + FPR2I(r2)); /* Add long with normalization */ - pgm_check = add_lf(&fl, &add_fl, NORMAL, regs); + pgm_check = add_lf(&fl, &add_fl, NORMAL, SIGEX, regs); /* Set condition code */ if (fl.long_fract) { @@ -3170,7 +3199,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(add_float_long_reg) */ /*-------------------------------------------------------------------*/ @@ -3179,7 +3209,7 @@ int pgm_check; DEF_INST(subtract_float_long_reg) { int r1, r2; /* Values of R fields */ -int i1; +int i1; /* Index of R1 in fpr array */ LONG_FLOAT fl; LONG_FLOAT sub_fl; int pgm_check; @@ -3196,7 +3226,7 @@ int pgm_check; sub_fl.sign = ! (sub_fl.sign); /* Add long with normalization */ - pgm_check = add_lf(&fl, &sub_fl, NORMAL, regs); + pgm_check = add_lf(&fl, &sub_fl, NORMAL, SIGEX, regs); /* Set condition code */ if (fl.long_fract) { @@ -3212,7 +3242,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(subtract_float_long_reg) */ /*-------------------------------------------------------------------*/ @@ -3221,7 +3252,7 @@ int pgm_check; DEF_INST(multiply_float_long_reg) { int r1, r2; /* Values of R fields */ -int i1; +int i1; /* Index of R1 in fpr array */ LONG_FLOAT fl; LONG_FLOAT mul_fl; int pgm_check; @@ -3235,7 +3266,7 @@ int pgm_check; get_lf(&mul_fl, regs->fpr + FPR2I(r2)); /* multiply long */ - pgm_check = mul_lf(&fl, &mul_fl, regs); + pgm_check = mul_lf(&fl, &mul_fl, OVUNF, regs); /* Back to register */ store_lf(&fl, regs->fpr + i1); @@ -3244,7 +3275,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(multiply_float_long_reg) */ /*-------------------------------------------------------------------*/ @@ -3285,7 +3317,7 @@ int pgm_check; DEF_INST(add_unnormal_float_long_reg) { int r1, r2; /* Values of R fields */ -int i1; +int i1; /* Index of R1 in fpr array */ LONG_FLOAT fl; LONG_FLOAT add_fl; int pgm_check; @@ -3299,7 +3331,7 @@ int pgm_check; get_lf(&add_fl, regs->fpr + FPR2I(r2)); /* Add long without normalization */ - pgm_check = add_lf(&fl, &add_fl, UNNORMAL, regs); + pgm_check = add_lf(&fl, &add_fl, UNNORMAL, SIGEX, regs); /* Set condition code */ if (fl.long_fract) { @@ -3315,7 +3347,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(add_unnormal_float_long_reg) */ /*-------------------------------------------------------------------*/ @@ -3324,7 +3357,7 @@ int pgm_check; DEF_INST(subtract_unnormal_float_long_reg) { int r1, r2; /* Values of R fields */ -int i1; +int i1; /* Index of R1 in fpr array */ LONG_FLOAT fl; LONG_FLOAT sub_fl; int pgm_check; @@ -3341,7 +3374,7 @@ int pgm_check; sub_fl.sign = ! (sub_fl.sign); /* Add long without normalization */ - pgm_check = add_lf(&fl, &sub_fl, UNNORMAL, regs); + pgm_check = add_lf(&fl, &sub_fl, UNNORMAL, SIGEX, regs); /* Set condition code */ if (fl.long_fract) { @@ -3357,7 +3390,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(subtract_unnormal_float_long_reg) */ /*-------------------------------------------------------------------*/ @@ -3645,7 +3679,7 @@ SHORT_FLOAT cmp_fl; DEF_INST(add_float_short_reg) { int r1, r2; /* Values of R fields */ -int i1; +int i1; /* Index of R1 in fpr array */ SHORT_FLOAT fl; SHORT_FLOAT add_fl; int pgm_check; @@ -3659,7 +3693,7 @@ int pgm_check; get_sf(&add_fl, regs->fpr + FPR2I(r2)); /* Add short with normalization */ - pgm_check = add_sf(&fl, &add_fl, NORMAL, regs); + pgm_check = add_sf(&fl, &add_fl, NORMAL, SIGEX, regs); /* Set condition code */ if (fl.short_fract) { @@ -3675,7 +3709,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(add_float_short_reg) */ /*-------------------------------------------------------------------*/ @@ -3684,7 +3719,7 @@ int pgm_check; DEF_INST(subtract_float_short_reg) { int r1, r2; /* Values of R fields */ -int i1; +int i1; /* Index of R1 in fpr array */ SHORT_FLOAT fl; SHORT_FLOAT sub_fl; int pgm_check; @@ -3701,7 +3736,7 @@ int pgm_check; sub_fl.sign = ! (sub_fl.sign); /* Subtract short with normalization */ - pgm_check = add_sf(&fl, &sub_fl, NORMAL, regs); + pgm_check = add_sf(&fl, &sub_fl, NORMAL, SIGEX, regs); /* Set condition code */ if (fl.short_fract) { @@ -3717,11 +3752,13 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(subtract_float_short_reg) */ /*-------------------------------------------------------------------*/ -/* 3C MER - Multiply Short to Long Floating Point Register [RR] */ +/* 3C MDER - Multiply Short to Long Floating Point Register [RR] */ +/* Older mnemonic of this instruction is MER */ /*-------------------------------------------------------------------*/ DEF_INST(multiply_float_short_to_long_reg) { @@ -3791,7 +3828,7 @@ int pgm_check; DEF_INST(add_unnormal_float_short_reg) { int r1, r2; /* Values of R fields */ -int i1; +int i1; /* Index of R1 in fpr array */ SHORT_FLOAT fl; SHORT_FLOAT add_fl; int pgm_check; @@ -3805,7 +3842,7 @@ int pgm_check; get_sf(&add_fl, regs->fpr + FPR2I(r2)); /* Add short without normalization */ - pgm_check = add_sf(&fl, &add_fl, UNNORMAL, regs); + pgm_check = add_sf(&fl, &add_fl, UNNORMAL, SIGEX, regs); /* Set condition code */ if (fl.short_fract) { @@ -3821,7 +3858,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(add_unnormal_float_short_reg) */ /*-------------------------------------------------------------------*/ @@ -3830,7 +3868,7 @@ int pgm_check; DEF_INST(subtract_unnormal_float_short_reg) { int r1, r2; /* Values of R fields */ -int i1; +int i1; /* Index of R1 in fpr array */ SHORT_FLOAT fl; SHORT_FLOAT sub_fl; int pgm_check; @@ -3847,7 +3885,7 @@ int pgm_check; sub_fl.sign = ! (sub_fl.sign); /* Add short without normalization */ - pgm_check = add_sf(&fl, &sub_fl, UNNORMAL, regs); + pgm_check = add_sf(&fl, &sub_fl, UNNORMAL, SIGEX, regs); /* Set condition code */ if (fl.short_fract) { @@ -3863,7 +3901,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(subtract_unnormal_float_short_reg) */ /*-------------------------------------------------------------------*/ @@ -3976,7 +4015,7 @@ LONG_FLOAT cmp_fl; DEF_INST(add_float_long) { int r1; /* Value of R field */ -int i1; +int i1; /* Index of R1 in fpr array */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ LONG_FLOAT fl; @@ -3992,7 +4031,7 @@ int pgm_check; vfetch_lf(&add_fl, effective_addr2, b2, regs ); /* Add long with normalization */ - pgm_check = add_lf(&fl, &add_fl, NORMAL, regs); + pgm_check = add_lf(&fl, &add_fl, NORMAL, SIGEX, regs); /* Set condition code */ if (fl.long_fract) { @@ -4008,7 +4047,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(add_float_long) */ /*-------------------------------------------------------------------*/ @@ -4017,7 +4057,7 @@ int pgm_check; DEF_INST(subtract_float_long) { int r1; /* Value of R field */ -int i1; +int i1; /* Index of R1 in fpr array */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ LONG_FLOAT fl; @@ -4036,7 +4076,7 @@ int pgm_check; sub_fl.sign = ! (sub_fl.sign); /* Add long with normalization */ - pgm_check = add_lf(&fl, &sub_fl, NORMAL, regs); + pgm_check = add_lf(&fl, &sub_fl, NORMAL, SIGEX, regs); /* Set condition code */ if (fl.long_fract) { @@ -4052,7 +4092,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(subtract_float_long) */ /*-------------------------------------------------------------------*/ @@ -4061,7 +4102,7 @@ int pgm_check; DEF_INST(multiply_float_long) { int r1; /* Value of R field */ -int i1; +int i1; /* Index of R1 in fpr array */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ LONG_FLOAT fl; @@ -4077,7 +4118,7 @@ int pgm_check; vfetch_lf(&mul_fl, effective_addr2, b2, regs ); /* multiply long */ - pgm_check = mul_lf(&fl, &mul_fl, regs); + pgm_check = mul_lf(&fl, &mul_fl, OVUNF, regs); /* Back to register */ store_lf(&fl, regs->fpr + i1); @@ -4086,7 +4127,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(multiply_float_long) */ /*-------------------------------------------------------------------*/ @@ -4129,7 +4171,7 @@ int pgm_check; DEF_INST(add_unnormal_float_long) { int r1; /* Value of R field */ -int i1; +int i1; /* Index of R1 in fpr array */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ LONG_FLOAT fl; @@ -4145,7 +4187,7 @@ int pgm_check; vfetch_lf(&add_fl, effective_addr2, b2, regs ); /* Add long without normalization */ - pgm_check = add_lf(&fl, &add_fl, UNNORMAL, regs); + pgm_check = add_lf(&fl, &add_fl, UNNORMAL, SIGEX, regs); /* Set condition code */ if (fl.long_fract) { @@ -4161,7 +4203,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(add_unnormal_float_long) */ /*-------------------------------------------------------------------*/ @@ -4170,7 +4213,7 @@ int pgm_check; DEF_INST(subtract_unnormal_float_long) { int r1; /* Value of R field */ -int i1; +int i1; /* Index of R1 in fpr array */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ LONG_FLOAT fl; @@ -4189,7 +4232,7 @@ int pgm_check; sub_fl.sign = ! (sub_fl.sign); /* Add long without normalization */ - pgm_check = add_lf(&fl, &sub_fl, UNNORMAL, regs); + pgm_check = add_lf(&fl, &sub_fl, UNNORMAL, SIGEX, regs); /* Set condition code */ if (fl.long_fract) { @@ -4205,7 +4248,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(subtract_unnormal_float_long) */ /*-------------------------------------------------------------------*/ @@ -4271,7 +4315,7 @@ SHORT_FLOAT cmp_fl; DEF_INST(add_float_short) { int r1; /* Value of R field */ -int i1; +int i1; /* Index of R1 in fpr array */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ SHORT_FLOAT fl; @@ -4287,7 +4331,7 @@ int pgm_check; vfetch_sf(&add_fl, effective_addr2, b2, regs ); /* Add short with normalization */ - pgm_check = add_sf(&fl, &add_fl, NORMAL, regs); + pgm_check = add_sf(&fl, &add_fl, NORMAL, SIGEX, regs); /* Set condition code */ if (fl.short_fract) { @@ -4303,7 +4347,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(add_float_short) */ /*-------------------------------------------------------------------*/ @@ -4312,7 +4357,7 @@ int pgm_check; DEF_INST(subtract_float_short) { int r1; /* Value of R field */ -int i1; +int i1; /* Index of R1 in fpr array */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ SHORT_FLOAT fl; @@ -4331,7 +4376,7 @@ int pgm_check; sub_fl.sign = ! (sub_fl.sign); /* Add short with normalization */ - pgm_check = add_sf(&fl, &sub_fl, NORMAL, regs); + pgm_check = add_sf(&fl, &sub_fl, NORMAL, SIGEX, regs); /* Set condition code */ if (fl.short_fract) { @@ -4347,12 +4392,13 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(subtract_float_short) */ /*-------------------------------------------------------------------*/ /* 7C MDE - Multiply Floating Point Short to Long [RX] */ -/* Older mnemonic of this instruction ME */ +/* Older mnemonic of this instruction is ME */ /*-------------------------------------------------------------------*/ DEF_INST(multiply_float_short_to_long) { @@ -4426,7 +4472,7 @@ int pgm_check; DEF_INST(add_unnormal_float_short) { int r1; /* Value of R field */ -int i1; +int i1; /* Index of R1 in fpr array */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ SHORT_FLOAT fl; @@ -4442,7 +4488,7 @@ int pgm_check; vfetch_sf(&add_fl, effective_addr2, b2, regs ); /* Add short without normalization */ - pgm_check = add_sf(&fl, &add_fl, UNNORMAL, regs); + pgm_check = add_sf(&fl, &add_fl, UNNORMAL, SIGEX, regs); /* Set condition code */ if (fl.short_fract) { @@ -4458,7 +4504,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(add_unnormal_float_short) */ /*-------------------------------------------------------------------*/ @@ -4467,7 +4514,7 @@ int pgm_check; DEF_INST(subtract_unnormal_float_short) { int r1; /* Value of R field */ -int i1; +int i1; /* Index of R1 in fpr array */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ SHORT_FLOAT fl; @@ -4486,7 +4533,7 @@ int pgm_check; sub_fl.sign = ! (sub_fl.sign); /* Add short without normalization */ - pgm_check = add_sf(&fl, &sub_fl, UNNORMAL, regs); + pgm_check = add_sf(&fl, &sub_fl, UNNORMAL, SIGEX, regs); /* Set condition code */ if (fl.short_fract) { @@ -4502,7 +4549,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(subtract_unnormal_float_short) */ /*-------------------------------------------------------------------*/ @@ -4738,7 +4786,7 @@ U64 msj, lsj; /* done iteration when xi, xj equal or differ by 1 */ for (;;) { xj = (div_U128(mmsa, msa, xi) + xi) >> 1; - + if ((xj == xi) || (abs(xj - xi) == 1)) { break; } @@ -4788,7 +4836,7 @@ U64 msj, lsj; DEF_INST(multiply_float_short_reg) { int r1, r2; /* Values of R fields */ -int i1; +int i1; /* Index of R1 in fpr array */ SHORT_FLOAT fl; SHORT_FLOAT mul_fl; int pgm_check; @@ -4802,7 +4850,7 @@ int pgm_check; get_sf(&mul_fl, regs->fpr + FPR2I(r2)); /* multiply short to long */ - pgm_check = mul_sf(&fl, &mul_fl, regs); + pgm_check = mul_sf(&fl, &mul_fl, OVUNF, regs); /* Back to register */ store_sf(&fl, regs->fpr + i1); @@ -4811,7 +4859,8 @@ int pgm_check; if (pgm_check) { ARCH_DEP(program_interrupt) (regs, pgm_check); } -} + +} /* end DEF_INST(multiply_float_short_reg) */ /*-------------------------------------------------------------------*/ @@ -6024,7 +6073,7 @@ int pgm_check; vfetch_sf(&mul_fl, effective_addr2, b2, regs ); /* multiply short to long */ - pgm_check = mul_sf(&fl, &mul_fl, regs); + pgm_check = mul_sf(&fl, &mul_fl, OVUNF, regs); /* Back to register */ store_sf(&fl, regs->fpr + i1); @@ -6036,6 +6085,487 @@ int pgm_check; } #endif /* FEATURE_HFP_EXTENSIONS */ + +#if defined(FEATURE_FPS_EXTENSIONS) +/*-------------------------------------------------------------------*/ +/* B365 LXR - Load Floating Point Extended Register [RRE] */ +/*-------------------------------------------------------------------*/ +DEF_INST(load_float_ext_reg) +{ +int r1, r2; /* Values of R fields */ +int i1, i2; /* Index into fpr array */ + + RRE(inst, execflag, regs, r1, r2); + + HFPODD2_CHECK(r1, r2, regs); + i1 = FPR2I(r1); + i2 = FPR2I(r2); + + /* Copy register R2 contents to register R1 */ + regs->fpr[i1] = regs->fpr[i2]; + regs->fpr[i1+1] = regs->fpr[i2+1]; + regs->fpr[i1+FPREX] = regs->fpr[i2+FPREX]; + regs->fpr[i1+FPREX+1] = regs->fpr[i2+FPREX+1]; + +} /* end DEF_INST(load_float_ext_reg) */ + + +/*-------------------------------------------------------------------*/ +/* B374 LZER - Load Zero Floating Point Short Register [RRE] */ +/*-------------------------------------------------------------------*/ +DEF_INST(load_zero_float_short_reg) +{ +int r1, r2; /* Values of R fields */ +int i1; /* Index of R1 in fpr array */ + + RRE(inst, execflag, regs, r1, r2); + HFPREG_CHECK(r1, regs); + i1 = FPR2I(r1); + + /* Set all bits of register R1 to zeros */ + regs->fpr[i1] = 0; + +} /* end DEF_INST(load_zero_float_short_reg) */ + + +/*-------------------------------------------------------------------*/ +/* B375 LZDR - Load Zero Floating Point Long Register [RRE] */ +/*-------------------------------------------------------------------*/ +DEF_INST(load_zero_float_long_reg) +{ +int r1, r2; /* Values of R fields */ +int i1; /* Index of R1 in fpr array */ + + RRE(inst, execflag, regs, r1, r2); + HFPREG_CHECK(r1, regs); + i1 = FPR2I(r1); + + /* Set all bits of register R1 to zeros */ + regs->fpr[i1] = 0; + regs->fpr[i1+1] = 0; + +} /* end DEF_INST(load_zero_float_long_reg) */ + + +/*-------------------------------------------------------------------*/ +/* B376 LZXR - Load Zero Floating Point Extended Register [RRE] */ +/*-------------------------------------------------------------------*/ +DEF_INST(load_zero_float_ext_reg) +{ +int r1, r2; /* Values of R fields */ +int i1; /* Index of R1 in fpr array */ + + RRE(inst, execflag, regs, r1, r2); + + HFPODD_CHECK(r1, regs); + i1 = FPR2I(r1); + + /* Set all bits of register R1 to zeros */ + regs->fpr[i1] = 0; + regs->fpr[i1+1] = 0; + regs->fpr[i1+FPREX] = 0; + regs->fpr[i1+FPREX+1] = 0; + +} /* end DEF_INST(load_zero_float_ext_reg) */ +#endif /*defined(FEATURE_FPS_EXTENSIONS)*/ + + +#if defined(FEATURE_HFP_MULTIPLY_ADD_SUBTRACT) +/*-------------------------------------------------------------------*/ +/* B32E MAER - Multiply and Add Floating Point Short Register [RRF] */ +/*-------------------------------------------------------------------*/ +DEF_INST(multiply_add_float_short_reg) +{ +int r1, r2, r3; /* Values of R fields */ +int i1; /* Index of R1 in fpr array */ +SHORT_FLOAT fl1, fl2, fl3; +int pgm_check; + + RRF_R(inst, execflag, regs, r1, r2, r3); + HFPREG2_CHECK(r1, r2, regs); + HFPREG_CHECK(r3, regs); + i1 = FPR2I(r1); + + /* Get the operands */ + get_sf(&fl1, regs->fpr + i1); + get_sf(&fl2, regs->fpr + FPR2I(r2)); + get_sf(&fl3, regs->fpr + FPR2I(r3)); + + /* Multiply third and second operands */ + mul_sf(&fl2, &fl3, NOOVUNF, regs); + + /* Add the first operand with normalization */ + pgm_check = add_sf(&fl1, &fl2, NORMAL, NOSIGEX, regs); + + /* Store result back to first operand register */ + store_sf(&fl1, regs->fpr + i1); + + /* Program check ? */ + if (pgm_check) { + ARCH_DEP(program_interrupt) (regs, pgm_check); + } + +} /* end DEF_INST(multiply_add_float_short_reg) */ + + +/*-------------------------------------------------------------------*/ +/* B32F MSER - Multiply and Subtract Floating Point Short Reg [RRF] */ +/*-------------------------------------------------------------------*/ +DEF_INST(multiply_subtract_float_short_reg) +{ +int r1, r2, r3; /* Values of R fields */ +int i1; /* Index of R1 in fpr array */ +SHORT_FLOAT fl1, fl2, fl3; +int pgm_check; + + RRF_R(inst, execflag, regs, r1, r2, r3); + HFPREG2_CHECK(r1, r2, regs); + HFPREG_CHECK(r3, regs); + i1 = FPR2I(r1); + + /* Get the operands */ + get_sf(&fl1, regs->fpr + i1); + get_sf(&fl2, regs->fpr + FPR2I(r2)); + get_sf(&fl3, regs->fpr + FPR2I(r3)); + + /* Multiply third and second operands */ + mul_sf(&fl2, &fl3, NOOVUNF, regs); + + /* Invert the sign of the first operand */ + fl1.sign = ! (fl1.sign); + + /* Subtract the first operand with normalization */ + pgm_check = add_sf(&fl1, &fl2, NORMAL, NOSIGEX, regs); + + /* Store result back to first operand register */ + store_sf(&fl1, regs->fpr + i1); + + /* Program check ? */ + if (pgm_check) { + ARCH_DEP(program_interrupt) (regs, pgm_check); + } + +} /* end DEF_INST(multiply_subtract_float_short_reg) */ + + +/*-------------------------------------------------------------------*/ +/* B33E MADR - Multiply and Add Floating Point Long Register [RRF] */ +/*-------------------------------------------------------------------*/ +DEF_INST(multiply_add_float_long_reg) +{ +int r1, r2, r3; /* Values of R fields */ +int i1; /* Index of R1 in fpr array */ +LONG_FLOAT fl1, fl2, fl3; +int pgm_check; + + RRF_R(inst, execflag, regs, r1, r2, r3); + HFPREG2_CHECK(r1, r2, regs); + HFPREG_CHECK(r3, regs); + i1 = FPR2I(r1); + + /* Get the operands */ + get_lf(&fl1, regs->fpr + i1); + get_lf(&fl2, regs->fpr + FPR2I(r2)); + get_lf(&fl3, regs->fpr + FPR2I(r3)); + + /* Multiply long third and second operands */ + mul_lf(&fl2, &fl3, NOOVUNF, regs); + + /* Add the first operand with normalization */ + pgm_check = add_lf(&fl1, &fl2, NORMAL, NOSIGEX, regs); + + /* Store result back to first operand register */ + store_lf(&fl1, regs->fpr + i1); + + /* Program check ? */ + if (pgm_check) { + ARCH_DEP(program_interrupt) (regs, pgm_check); + } + +} /* end DEF_INST(multiply_add_float_long_reg) */ + + +/*-------------------------------------------------------------------*/ +/* B33F MSDR - Multiply and Subtract Floating Point Long Reg [RRF] */ +/*-------------------------------------------------------------------*/ +DEF_INST(multiply_subtract_float_long_reg) +{ +int r1, r2, r3; /* Values of R fields */ +int i1; /* Index of R1 in fpr array */ +LONG_FLOAT fl1, fl2, fl3; +int pgm_check; + + RRF_R(inst, execflag, regs, r1, r2, r3); + HFPREG2_CHECK(r1, r2, regs); + HFPREG_CHECK(r3, regs); + i1 = FPR2I(r1); + + /* Get the operands */ + get_lf(&fl1, regs->fpr + i1); + get_lf(&fl2, regs->fpr + FPR2I(r2)); + get_lf(&fl3, regs->fpr + FPR2I(r3)); + + /* Multiply long third and second operands */ + mul_lf(&fl2, &fl3, NOOVUNF, regs); + + /* Invert the sign of the first operand */ + fl1.sign = ! (fl1.sign); + + /* Subtract the first operand with normalization */ + pgm_check = add_lf(&fl1, &fl2, NORMAL, NOSIGEX, regs); + + /* Store result back to first operand register */ + store_lf(&fl1, regs->fpr + i1); + + /* Program check ? */ + if (pgm_check) { + ARCH_DEP(program_interrupt) (regs, pgm_check); + } + +} /* end DEF_INST(multiply_subtract_float_long_reg) */ + + +/*-------------------------------------------------------------------*/ +/* ED2E MAE - Multiply and Add Floating Point Short [RXF] */ +/*-------------------------------------------------------------------*/ +DEF_INST(multiply_add_float_short) +{ +int r1, r3; /* Values of R fields */ +int i1; /* Index of R1 in fpr array */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +SHORT_FLOAT fl1, fl2, fl3; +int pgm_check; + + RXF(inst, execflag, regs, r1, r3, b2, effective_addr2); + HFPREG2_CHECK(r1, r3, regs); + i1 = FPR2I(r1); + + /* Get the operands */ + get_sf(&fl1, regs->fpr + i1); + vfetch_sf(&fl2, effective_addr2, b2, regs ); + get_sf(&fl3, regs->fpr + FPR2I(r3)); + + /* Multiply third and second operands */ + mul_sf(&fl2, &fl3, NOOVUNF, regs); + + /* Add the first operand with normalization */ + pgm_check = add_sf(&fl1, &fl2, NORMAL, NOSIGEX, regs); + + /* Back to register */ + store_sf(&fl1, regs->fpr + i1); + + /* Program check ? */ + if (pgm_check) { + ARCH_DEP(program_interrupt) (regs, pgm_check); + } + +} /* end DEF_INST(multiply_add_float_short) */ + + +/*-------------------------------------------------------------------*/ +/* ED2F MSE - Multiply and Subtract Floating Point Short [RXF] */ +/*-------------------------------------------------------------------*/ +DEF_INST(multiply_subtract_float_short) +{ +int r1, r3; /* Values of R fields */ +int i1; /* Index of R1 in fpr array */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +SHORT_FLOAT fl1, fl2, fl3; +int pgm_check; + + RXF(inst, execflag, regs, r1, r3, b2, effective_addr2); + HFPREG2_CHECK(r1, r3, regs); + i1 = FPR2I(r1); + + /* Get the operands */ + get_sf(&fl1, regs->fpr + i1); + vfetch_sf(&fl2, effective_addr2, b2, regs ); + get_sf(&fl3, regs->fpr + FPR2I(r3)); + + /* Multiply third and second operands */ + mul_sf(&fl2, &fl3, NOOVUNF, regs); + + /* Invert the sign of the first operand */ + fl1.sign = ! (fl1.sign); + + /* Subtract the first operand with normalization */ + pgm_check = add_sf(&fl1, &fl2, NORMAL, NOSIGEX, regs); + + /* Back to register */ + store_sf(&fl1, regs->fpr + i1); + + /* Program check ? */ + if (pgm_check) { + ARCH_DEP(program_interrupt) (regs, pgm_check); + } + +} /* end DEF_INST(multiply_subtract_float_short) */ + + +/*-------------------------------------------------------------------*/ +/* ED3E MAD - Multiply and Add Floating Point Long [RXF] */ +/*-------------------------------------------------------------------*/ +DEF_INST(multiply_add_float_long) +{ +int r1, r3; /* Values of R fields */ +int i1; /* Index of R1 in fpr array */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +LONG_FLOAT fl1, fl2, fl3; +int pgm_check; + + RXF(inst, execflag, regs, r1, r3, b2, effective_addr2); + HFPREG2_CHECK(r1, r3, regs); + i1 = FPR2I(r1); + + /* Get the operands */ + get_lf(&fl1, regs->fpr + i1); + vfetch_lf(&fl2, effective_addr2, b2, regs ); + get_lf(&fl3, regs->fpr + FPR2I(r3)); + + /* Multiply long third and second operands */ + mul_lf(&fl2, &fl3, NOOVUNF, regs); + + /* Add long first operand with normalization */ + pgm_check = add_lf(&fl1, &fl2, NORMAL, NOSIGEX, regs); + + /* Back to register */ + store_lf(&fl1, regs->fpr + i1); + + /* Program check ? */ + if (pgm_check) { + ARCH_DEP(program_interrupt) (regs, pgm_check); + } + +} /* end DEF_INST(multiply_add_float_long) */ + + +/*-------------------------------------------------------------------*/ +/* ED3F MSD - Multiply and Subtract Floating Point Long [RXF] */ +/*-------------------------------------------------------------------*/ +DEF_INST(multiply_subtract_float_long) +{ +int r1, r3; /* Values of R fields */ +int i1; /* Index of R1 in fpr array */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +LONG_FLOAT fl1, fl2, fl3; +int pgm_check; + + RXF(inst, execflag, regs, r1, r3, b2, effective_addr2); + HFPREG2_CHECK(r1, r3, regs); + i1 = FPR2I(r1); + + /* Get the operands */ + get_lf(&fl1, regs->fpr + i1); + vfetch_lf(&fl2, effective_addr2, b2, regs ); + get_lf(&fl3, regs->fpr + FPR2I(r3)); + + /* Multiply long third and second operands */ + mul_lf(&fl2, &fl3, NOOVUNF, regs); + + /* Invert the sign of the first operand */ + fl1.sign = ! (fl1.sign); + + /* Subtract long with normalization */ + pgm_check = add_lf(&fl1, &fl2, NORMAL, NOSIGEX, regs); + + /* Back to register */ + store_lf(&fl1, regs->fpr + i1); + + /* Program check ? */ + if (pgm_check) { + ARCH_DEP(program_interrupt) (regs, pgm_check); + } + +} /* end DEF_INST(multiply_subtract_float_long) */ +#endif /*defined(FEATURE_HFP_MULTIPLY_ADD_SUBTRACT)*/ + + +#if defined(FEATURE_LONG_DISPLACEMENT) +/*-------------------------------------------------------------------*/ +/* ED64 LEY - Load Floating Point Short (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(load_float_short_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + HFPREG_CHECK(r1, regs); + + /* Update first 32 bits of register from operand address */ + regs->fpr[FPR2I(r1)] = ARCH_DEP(vfetch4) (effective_addr2, b2, regs); +} + + +/*-------------------------------------------------------------------*/ +/* ED65 LDY - Load Floating Point Long (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(load_float_long_y) +{ +int r1; /* Value of R field */ +int i1; /* Index of r1 in fpr array */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +U64 dreg; /* Double word workarea */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + HFPREG_CHECK(r1, regs); + i1 = FPR2I(r1); + + /* Fetch value from operand address */ + dreg = ARCH_DEP(vfetch8) (effective_addr2, b2, regs); + + /* Update register contents */ + regs->fpr[i1] = dreg >> 32; + regs->fpr[i1+1] = dreg; +} + + +/*-------------------------------------------------------------------*/ +/* ED66 STEY - Store Floating Point Short (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(store_float_short_y) +{ +int r1; /* Value of R field */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + HFPREG_CHECK(r1, regs); + + /* Store register contents at operand address */ + ARCH_DEP(vstore4) (regs->fpr[FPR2I(r1)], effective_addr2, b2, regs); +} + + +/*-------------------------------------------------------------------*/ +/* ED67 STDY - Store Floating Point Long (Long Displacement) [RXY] */ +/*-------------------------------------------------------------------*/ +DEF_INST(store_float_long_y) +{ +int r1; /* Value of R field */ +int i1; /* Index of r1 in fpr array */ +int b2; /* Base of effective addr */ +VADR effective_addr2; /* Effective address */ +U64 dreg; /* Double word workarea */ + + RXY(inst, execflag, regs, r1, b2, effective_addr2); + HFPREG_CHECK(r1, regs); + i1 = FPR2I(r1); + + /* Store register contents at operand address */ + dreg = ((U64)regs->fpr[i1] << 32) + | regs->fpr[i1+1]; + ARCH_DEP(vstore8) (dreg, effective_addr2, b2, regs); +} +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + + #endif /* FEATURE_HEXADECIMAL_FLOATING_POINT */ #if !defined(_GEN_ARCH) diff --git a/fthreads.c b/fthreads.c index 20b9289..5a1304e 100644 --- a/fthreads.c +++ b/fthreads.c @@ -23,6 +23,28 @@ int dummy = 0; #include "fthreads.h" #include "hostinfo.h" +#include "logger.h" + +//////////////////////////////////////////////////////////////////////////////////// +// Debugging + +#if defined(DEBUG) || defined(_DEBUG) + #define TRACE(a...) printf(a) + #define ASSERT(a) \ + do \ + { \ + if (!(a)) \ + { \ + printf("** Assertion Failed: %s(%d)\n",__FILE__,__LINE__); \ + } \ + } \ + while(0) + #define VERIFY(a) ASSERT((a)) +#else + #define TRACE(a...) + #define ASSERT(a) + #define VERIFY(a) ((void)(a)) +#endif //////////////////////////////////////////////////////////////////////////////////// @@ -70,36 +92,7 @@ int dummy = 0; #define IsEventSet(hEventHandle) (WaitForSingleObject(hEventHandle,0) == WAIT_OBJECT_0) -#define _fthreadmsg(fmt...) \ - do \ - { \ - fprintf(stderr, fmt); \ - fflush(stderr); \ - } \ - while (0) - ///////////////////////////////////////////////////////////////////////////// -// Debugging - -#if defined(DEBUG) || defined(_DEBUG) - #define TRACE(a...) _fthreadmsg(a) - #define ASSERT(a) \ - do \ - { \ - if (!(a)) \ - { \ - _fthreadmsg("** Assertion Failed: %s(%d)\n",__FILE__,__LINE__); \ - } \ - } \ - while(0) - #define VERIFY(a) ASSERT((a)) -#else - #define TRACE(a...) - #define ASSERT(a) - #define VERIFY(a) ((void)(a)) -#endif - -//////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////// // private internal fthreads CRITICAL_SECTION functions... @@ -116,6 +109,7 @@ InitializeFT_MUTEX { MyInitializeCriticalSection(&pFT_MUTEX->MutexLock); pFT_MUTEX->hUnlockedEvent = MyCreateEvent(NULL,TRUE,TRUE,NULL); // (initially signalled) + pFT_MUTEX->dwMutexMagic = FT_MUTEX_MAGIC; pFT_MUTEX->nLockedCount = 0; pFT_MUTEX->dwLockOwner = 0; } @@ -132,11 +126,11 @@ DeleteFT_MUTEX fthread_mutex_t* pFT_MUTEX ) { - ASSERT(IsEventSet(pFT_MUTEX->hUnlockedEvent) && !pFT_MUTEX->nLockedCount); - pFT_MUTEX->dwLockOwner = 0; - pFT_MUTEX->nLockedCount = 0; - MyDeleteEvent(pFT_MUTEX->hUnlockedEvent); MyDeleteCriticalSection(&pFT_MUTEX->MutexLock); + MyDeleteEvent(pFT_MUTEX->hUnlockedEvent); + pFT_MUTEX->dwMutexMagic = 0; + pFT_MUTEX->nLockedCount = 0; + pFT_MUTEX->dwLockOwner = 0; } //////////////////////////////////////////////////////////////////////////////////// @@ -151,14 +145,16 @@ EnterFT_MUTEX fthread_mutex_t* pFT_MUTEX ) { + FT_W32_DWORD dwThreadId = GetCurrentThreadId(); + if (hostinfo.trycritsec_avail) { MyEnterCriticalSection(&pFT_MUTEX->MutexLock); + pFT_MUTEX->dwLockOwner = dwThreadId; + VERIFY(++pFT_MUTEX->nLockedCount > 0); } else { - FT_W32_DWORD dwThreadId = GetCurrentThreadId(); - for (;;) { MyEnterCriticalSection(&pFT_MUTEX->MutexLock); @@ -189,14 +185,20 @@ LeaveFT_MUTEX { if (hostinfo.trycritsec_avail) { + ASSERT(pFT_MUTEX->nLockedCount > 0); + if (--pFT_MUTEX->nLockedCount <= 0) + pFT_MUTEX->dwLockOwner = 0; MyLeaveCriticalSection(&pFT_MUTEX->MutexLock); } else { MyEnterCriticalSection(&pFT_MUTEX->MutexLock); - ASSERT(pFT_MUTEX->nLockedCount >= 0); + ASSERT(pFT_MUTEX->nLockedCount > 0); if (--pFT_MUTEX->nLockedCount <= 0) + { + pFT_MUTEX->dwLockOwner = 0; MySetEvent(pFT_MUTEX->hUnlockedEvent); + } MyLeaveCriticalSection(&pFT_MUTEX->MutexLock); } } @@ -213,16 +215,21 @@ TryEnterFT_MUTEX fthread_mutex_t* pFT_MUTEX ) { - FT_W32_BOOL bSuccess; + FT_W32_BOOL bSuccess; + FT_W32_DWORD dwThreadId = GetCurrentThreadId(); if (hostinfo.trycritsec_avail) { bSuccess = MyTryEnterCriticalSection(&pFT_MUTEX->MutexLock); + + if (bSuccess) + { + VERIFY(++pFT_MUTEX->nLockedCount > 0); + pFT_MUTEX->dwLockOwner = dwThreadId; + } } else { - FT_W32_DWORD dwThreadId = GetCurrentThreadId(); - MyEnterCriticalSection(&pFT_MUTEX->MutexLock); ASSERT(pFT_MUTEX->nLockedCount >= 0); @@ -307,8 +314,7 @@ fthread_create fthread_t* pdwThreadID, fthread_attr_t* dummy1, PFT_THREAD_FUNC pfnThreadFunc, - void* pvThreadArgs, - int nThreadPriority + void* pvThreadArgs ) { FT_CALL_THREAD_PARMS* pCallTheirThreadParms; @@ -322,9 +328,9 @@ fthread_create if (!pCallTheirThreadParms) { #ifdef FISH_HANG - _fthreadmsg("fthread_create: malloc(FT_CALL_THREAD_PARMS) failed; %s(%d)\n",pszFile,nLine); + TRACE("fthread_create: malloc(FT_CALL_THREAD_PARMS) failed; %s(%d)\n",pszFile,nLine); #else - _fthreadmsg("fthread_create: malloc(FT_CALL_THREAD_PARMS) failed\n"); + TRACE("fthread_create: malloc(FT_CALL_THREAD_PARMS) failed\n"); #endif return (errno = EAGAIN); } @@ -338,26 +344,14 @@ fthread_create if (!hWin32ThreadFunc) { #ifdef FISH_HANG - _fthreadmsg("fthread_create: MyCreateThread failed; %s(%d)\n",pszFile,nLine); + TRACE("fthread_create: MyCreateThread failed; %s(%d)\n",pszFile,nLine); #else - _fthreadmsg("fthread_create: MyCreateThread failed\n"); + TRACE("fthread_create: MyCreateThread failed\n"); #endif free (pCallTheirThreadParms); return (errno = EAGAIN); } - if (nThreadPriority != THREAD_PRIORITY_NORMAL) - { - if (!SetThreadPriority(hWin32ThreadFunc,nThreadPriority)) - { -#ifdef FISH_HANG - _fthreadmsg("fthread_create: SetThreadPriority failed; %s(%d)\n",pszFile,nLine); -#else - _fthreadmsg("fthread_create: SetThreadPriority failed\n"); -#endif - } - } - CloseHandle(hWin32ThreadFunc); return 0; @@ -399,6 +393,12 @@ fthread_mutex_init fthread_mutex_t* pFT_MUTEX ) { + if (!pFT_MUTEX) + return (errno = EINVAL); // (invalid ptr) + + if (pFT_MUTEX->dwMutexMagic == FT_MUTEX_MAGIC) + return (errno = EBUSY); // (already initialized) + InitializeFT_MUTEX ( #ifdef FISH_HANG @@ -407,7 +407,42 @@ fthread_mutex_init #endif pFT_MUTEX ); - return 0; + + return (errno = 0); +} + +//////////////////////////////////////////////////////////////////////////////////// +// destroy a lock... + +int +fthread_mutex_destroy +( +#ifdef FISH_HANG + char* pszFile, + int nLine, +#endif + fthread_mutex_t* pFT_MUTEX +) +{ + if (!pFT_MUTEX) + return (errno = EINVAL); // (invalid ptr) + + if (pFT_MUTEX->dwMutexMagic != FT_MUTEX_MAGIC) + return (errno = EINVAL); // (not initialized) + + if (pFT_MUTEX->nLockedCount > 0) + return (errno = EBUSY); // (still in use) + + DeleteFT_MUTEX + ( +#ifdef FISH_HANG + pszFile, + nLine, +#endif + pFT_MUTEX + ); + + return (errno = 0); } //////////////////////////////////////////////////////////////////////////////////// @@ -423,6 +458,12 @@ fthread_mutex_lock fthread_mutex_t* pFT_MUTEX ) { + if (!pFT_MUTEX) + return (errno = EINVAL); // (invalid ptr) + + if (pFT_MUTEX->dwMutexMagic != FT_MUTEX_MAGIC) + return (errno = EINVAL); // (not initialized) + EnterFT_MUTEX ( #ifdef FISH_HANG @@ -431,7 +472,8 @@ fthread_mutex_lock #endif pFT_MUTEX ); - return 0; + + return (errno = 0); } //////////////////////////////////////////////////////////////////////////////////// @@ -447,16 +489,27 @@ fthread_mutex_trylock fthread_mutex_t* pFT_MUTEX ) { - return ((TryEnterFT_MUTEX + if (!pFT_MUTEX) + return (errno = EINVAL); // (invalid ptr) + + if (pFT_MUTEX->dwMutexMagic != FT_MUTEX_MAGIC) + return (errno = EINVAL); // (not initialized) + + return ( + TryEnterFT_MUTEX + ( #ifdef FISH_HANG - pszFile, - nLine, + pszFile, + nLine, #endif - pFT_MUTEX - )) - ? - (0) : (errno = EBUSY)); + pFT_MUTEX + ) + ? + (errno = 0) + : + (errno = EBUSY) + ); } //////////////////////////////////////////////////////////////////////////////////// @@ -472,6 +525,18 @@ fthread_mutex_unlock fthread_mutex_t* pFT_MUTEX ) { + if (!pFT_MUTEX) + return (errno = EINVAL); // (invalid ptr) + + if (pFT_MUTEX->dwMutexMagic != FT_MUTEX_MAGIC) + return (errno = EINVAL); // (not initialized) + + if (pFT_MUTEX->dwLockOwner != GetCurrentThreadId()) + return (errno = EPERM); // (not owned) + + if (pFT_MUTEX->nLockedCount <= 0) + return (errno = EPERM); // (not locked) + LeaveFT_MUTEX ( #ifdef FISH_HANG @@ -480,7 +545,8 @@ fthread_mutex_unlock #endif pFT_MUTEX ); - return 0; + + return (errno = 0); } //////////////////////////////////////////////////////////////////////////////////// @@ -496,27 +562,66 @@ fthread_cond_init fthread_cond_t* pFT_COND_VAR ) { + if (!pFT_COND_VAR) + return (errno = EINVAL); // (invalid ptr) + + if (pFT_COND_VAR->dwCondMagic == FT_COND_MAGIC) + return (errno = EBUSY); // (already initialized) + if ((pFT_COND_VAR->hSigXmitEvent = MyCreateEvent(NULL,TRUE,FALSE,NULL))) { if ((pFT_COND_VAR->hSigRecvdEvent = MyCreateEvent(NULL,TRUE,TRUE,NULL))) { MyInitializeCriticalSection(&pFT_COND_VAR->CondVarLock); + pFT_COND_VAR->dwCondMagic = FT_COND_MAGIC; pFT_COND_VAR->bBroadcastSig = FALSE; pFT_COND_VAR->nNumWaiting = 0; - return 0; + return (errno = 0); } MyDeleteEvent(pFT_COND_VAR->hSigXmitEvent); } #ifdef FISH_HANG - _fthreadmsg("fthread_cond_init failure; %s(%d)\n",pszFile,nLine); + TRACE("fthread_cond_init failure; %s(%d)\n",pszFile,nLine); #else - _fthreadmsg("fthread_cond_init failure\n"); + TRACE("fthread_cond_init failure\n"); #endif return (errno = EAGAIN); } +//////////////////////////////////////////////////////////////////////////////////// +// destroy a "condition"... + +int +fthread_cond_destroy +( +#ifdef FISH_HANG + char* pszFile, + int nLine, +#endif + fthread_cond_t* pFT_COND_VAR +) +{ + if (!pFT_COND_VAR) + return (errno = EINVAL); // (invalid ptr) + + if (pFT_COND_VAR->dwCondMagic != FT_COND_MAGIC) + return (errno = EINVAL); // (not initialized) + + if (pFT_COND_VAR->nNumWaiting > 0) + return (errno = EBUSY); // (still in use) + + MyDeleteCriticalSection(&pFT_COND_VAR->CondVarLock); + MyDeleteEvent(pFT_COND_VAR->hSigXmitEvent); + MyDeleteEvent(pFT_COND_VAR->hSigRecvdEvent); + pFT_COND_VAR->dwCondMagic = 0; + pFT_COND_VAR->bBroadcastSig = FALSE; + pFT_COND_VAR->nNumWaiting = 0; + + return (errno = 0); +} + //////////////////////////////////////////////////////////////////////////////////// // 'signal' a "condition"... (releases ONE waiting thread) @@ -530,7 +635,11 @@ fthread_cond_signal fthread_cond_t* pFT_COND_VAR ) { - if (!pFT_COND_VAR) return (errno = EINVAL); + if (!pFT_COND_VAR) + return (errno = EINVAL); // (invalid ptr) + + if (pFT_COND_VAR->dwCondMagic != FT_COND_MAGIC) + return (errno = EINVAL); // (not initialized) // Wait for everyone to finish receiving prior signal.. @@ -556,7 +665,7 @@ fthread_cond_signal MyLeaveCriticalSection(&pFT_COND_VAR->CondVarLock); - return 0; + return (errno = 0); } //////////////////////////////////////////////////////////////////////////////////// @@ -572,7 +681,11 @@ fthread_cond_broadcast fthread_cond_t* pFT_COND_VAR ) { - if (!pFT_COND_VAR) return (errno = EINVAL); + if (!pFT_COND_VAR) + return (errno = EINVAL); // (invalid ptr) + + if (pFT_COND_VAR->dwCondMagic != FT_COND_MAGIC) + return (errno = EINVAL); // (not initialized) // Wait for everyone to finish receiving prior signal.. @@ -598,7 +711,7 @@ fthread_cond_broadcast MyLeaveCriticalSection(&pFT_COND_VAR->CondVarLock); - return 0; + return (errno = 0); } //////////////////////////////////////////////////////////////////////////////////// @@ -615,13 +728,18 @@ fthread_cond_wait fthread_mutex_t* pFT_MUTEX ) { + int rc; FT_W32_DWORD dwWaitRetCode; - if (!pFT_COND_VAR || !pFT_MUTEX) return (errno = EINVAL); + if (!pFT_COND_VAR) + return (errno = EINVAL); // (invalid ptr) + + if (pFT_COND_VAR->dwCondMagic != FT_COND_MAGIC) + return (errno = EINVAL); // (not initialized) // Release lock (and thus any potential signalers)... - LeaveFT_MUTEX + rc = fthread_mutex_unlock ( #ifdef FISH_HANG pszFile, @@ -630,6 +748,16 @@ fthread_cond_wait pFT_MUTEX ); + if (rc) + { +#ifdef FISH_HANG + TRACE("fthread_cond_wait: fthread_mutex_unlock failed; %s(%d)\n",pszFile,nLine); +#else + TRACE("fthread_cond_wait: fthread_mutex_unlock failed\n"); +#endif + return (errno = rc); + } + // Wait for everyone to finish receiving prior signal (if any).. for (;;) @@ -663,10 +791,33 @@ fthread_cond_wait if (WAIT_OBJECT_0 != dwWaitRetCode) { + MyLeaveCriticalSection(&pFT_COND_VAR->CondVarLock); + + // Re-acquire the original lock before returning... + + rc = fthread_mutex_lock + ( +#ifdef FISH_HANG + pszFile, + nLine, +#endif + pFT_MUTEX + ); + + if (rc) + { +#ifdef FISH_HANG + TRACE("fthread_cond_wait: fthread_mutex_lock failed; %s(%d)\n",pszFile,nLine); +#else + TRACE("fthread_cond_wait: fthread_mutex_lock failed\n"); +#endif + return (errno = rc); + } + #ifdef FISH_HANG - _fthreadmsg("fthread_cond_wait: Invalid handle; %s(%d)\n",pszFile,nLine); + TRACE("fthread_cond_wait: Invalid handle; %s(%d)\n",pszFile,nLine); #else - _fthreadmsg("fthread_cond_wait: Invalid handle\n"); + TRACE("fthread_cond_wait: Invalid handle\n"); #endif return (errno = EINVAL); } @@ -688,7 +839,7 @@ fthread_cond_wait // receive it, or if no one remains to receive it, // then stop transmitting the signal. - if (!pFT_COND_VAR->bBroadcastSig || pFT_COND_VAR->nNumWaiting == 0) + if (!pFT_COND_VAR->bBroadcastSig || pFT_COND_VAR->nNumWaiting <= 0) { MyResetEvent(pFT_COND_VAR->hSigXmitEvent); MySetEvent(pFT_COND_VAR->hSigRecvdEvent); @@ -700,7 +851,7 @@ fthread_cond_wait // Re-acquire the original lock before returning... - EnterFT_MUTEX + rc = fthread_mutex_lock ( #ifdef FISH_HANG pszFile, @@ -709,7 +860,17 @@ fthread_cond_wait pFT_MUTEX ); - return 0; + if (rc) + { +#ifdef FISH_HANG + TRACE("fthread_cond_wait: fthread_mutex_lock failed; %s(%d)\n",pszFile,nLine); +#else + TRACE("fthread_cond_wait: fthread_mutex_lock failed\n"); +#endif + return (errno = rc); + } + + return (errno = 0); } //////////////////////////////////////////////////////////////////////////////////// @@ -728,13 +889,18 @@ fthread_cond_timedwait ) { struct timeval TimeNow; - FT_W32_DWORD dwWaitRetCode, dwWaitMilliSecs; + int rc; + FT_W32_DWORD dwWaitRetCode, dwWaitMilliSecs; + + if (!pFT_COND_VAR) + return (errno = EINVAL); // (invalid ptr) - if (!pFT_COND_VAR || !pFT_MUTEX) return (errno = EINVAL); + if (pFT_COND_VAR->dwCondMagic != FT_COND_MAGIC) + return (errno = EINVAL); // (not initialized) // Release lock (and thus any potential signalers)... - LeaveFT_MUTEX + rc = fthread_mutex_unlock ( #ifdef FISH_HANG pszFile, @@ -743,6 +909,16 @@ fthread_cond_timedwait pFT_MUTEX ); + if (rc) + { +#ifdef FISH_HANG + TRACE("fthread_cond_timedwait: fthread_mutex_unlock failed; %s(%d)\n",pszFile,nLine); +#else + TRACE("fthread_cond_timedwait: fthread_mutex_unlock failed\n"); +#endif + return (errno = rc); + } + // Wait for everyone to finish receiving prior signal.. for (;;) @@ -804,7 +980,7 @@ fthread_cond_timedwait // timed out) to allow late signal to eventually // be sent [to a different future waiter]. - if (pFT_COND_VAR->nNumWaiting == 0) + if (pFT_COND_VAR->nNumWaiting <= 0) { MySetEvent(pFT_COND_VAR->hSigRecvdEvent); } @@ -815,7 +991,7 @@ fthread_cond_timedwait // Re-acquire the original lock before returning... - EnterFT_MUTEX + rc = fthread_mutex_lock ( #ifdef FISH_HANG pszFile, @@ -824,13 +1000,23 @@ fthread_cond_timedwait pFT_MUTEX ); + if (rc) + { +#ifdef FISH_HANG + TRACE("fthread_cond_timedwait: timeout fthread_mutex_lock failed; %s(%d)\n",pszFile,nLine); +#else + TRACE("fthread_cond_timedwait: timeout fthread_mutex_lock failed\n"); +#endif + return (errno = rc); + } + if (WAIT_TIMEOUT == dwWaitRetCode) return (errno = ETIMEDOUT); // (timeout) #ifdef FISH_HANG - _fthreadmsg("fthread_cond_timedwait: Invalid handle; %s(%d)\n",pszFile,nLine); + TRACE("fthread_cond_timedwait: Invalid handle; %s(%d)\n",pszFile,nLine); #else - _fthreadmsg("fthread_cond_timedwait: Invalid handle\n"); + TRACE("fthread_cond_timedwait: Invalid handle\n"); #endif return (errno = EINVAL); } @@ -852,7 +1038,7 @@ fthread_cond_timedwait // receive it, or if no one remains to receive it, // then stop transmitting the signal. - if (!pFT_COND_VAR->bBroadcastSig || pFT_COND_VAR->nNumWaiting == 0) + if (!pFT_COND_VAR->bBroadcastSig || pFT_COND_VAR->nNumWaiting <= 0) { MyResetEvent(pFT_COND_VAR->hSigXmitEvent); MySetEvent(pFT_COND_VAR->hSigRecvdEvent); @@ -864,7 +1050,7 @@ fthread_cond_timedwait // Re-acquire the original lock before returning... - EnterFT_MUTEX + rc = fthread_mutex_lock ( #ifdef FISH_HANG pszFile, @@ -873,7 +1059,17 @@ fthread_cond_timedwait pFT_MUTEX ); - return 0; + if (rc) + { +#ifdef FISH_HANG + TRACE("fthread_cond_timedwait: fthread_mutex_lock failed; %s(%d)\n",pszFile,nLine); +#else + TRACE("fthread_cond_timedwait: fthread_mutex_lock failed\n"); +#endif + return (errno = rc); + } + + return (errno = 0); } //////////////////////////////////////////////////////////////////////////////////// diff --git a/fthreads.h b/fthreads.h index 8b310ea..2614999 100644 --- a/fthreads.h +++ b/fthreads.h @@ -12,19 +12,18 @@ //////////////////////////////////////////////////////////////////////////////////// +#define FT_MUTEX_MAGIC (0x4D767478) +#define FT_COND_MAGIC (0x436F6E64) + +//////////////////////////////////////////////////////////////////////////////////// + struct FT_CS // fthread "CRITICAL_SECTION" structure { - // Note: none of the below defined fields are actually used - // for anything. Their whole purpose is to simply reserve room - // for the actual WIN32 CRITICAL_SECTION. - - union - { - void* dummy1[16]; // (room for actual CRITICAL_SECTION + growth) - double dummy2; // (will hopefully ensure alignment) - long long dummy3; // (will hopefully ensure alignment) - } - dummy; + // The below defined field is not actually used for anything. + // Its whole purpose is to simply reserve room for the actual + // WIN32 CRITICAL_SECTION. Thus we purposely over-allocate. + + long long dummy[16]; // (room for actual CRITICAL_SECTION + growth) }; //////////////////////////////////////////////////////////////////////////////////// @@ -40,6 +39,7 @@ typedef int FT_W32_BOOL; // BOOL struct FT_COND_VAR // fthread "condition variable" structure { FT_W32_CRITICAL_SECTION CondVarLock; // (lock for accessing this data) + FT_W32_DWORD dwCondMagic; // (magic number) FT_W32_HANDLE hSigXmitEvent; // set during signal transmission FT_W32_HANDLE hSigRecvdEvent; // set once signal received by every- // one that's supposed to receive it. @@ -52,6 +52,7 @@ struct FT_COND_VAR // fthread "condition variable" structure struct FT_MUTEX // fthread "mutex" structure { FT_W32_CRITICAL_SECTION MutexLock; // (lock for accessing this data) + FT_W32_DWORD dwMutexMagic; // (magic number) FT_W32_HANDLE hUnlockedEvent; // (signalled while NOT locked) FT_W32_DWORD dwLockOwner; // (thread-id of who owns it) int nLockedCount; // (#of times lock acquired) @@ -89,8 +90,7 @@ fthread_create fthread_t* pdwThreadID, fthread_attr_t* dummy1, PFT_THREAD_FUNC pfnThreadFunc, - void* pvThreadArgs, - int nThreadPriority + void* pvThreadArgs ); //////////////////////////////////////////////////////////////////////////////////// @@ -123,6 +123,19 @@ fthread_mutex_init fthread_mutex_t* pFT_MUTEX ); +//////////////////////////////////////////////////////////////////////////////////// +// destroy a "mutex"... + +int +fthread_mutex_destroy +( +#ifdef FISH_HANG + char* pszFile, + int nLine, +#endif + fthread_mutex_t* pFT_MUTEX +); + //////////////////////////////////////////////////////////////////////////////////// // lock a "mutex"... @@ -175,6 +188,19 @@ fthread_cond_init fthread_cond_t* pFT_COND_VAR ); +//////////////////////////////////////////////////////////////////////////////////// +// destroy a "condition"... + +int +fthread_cond_destroy +( +#ifdef FISH_HANG + char* pszFile, + int nLine, +#endif + fthread_cond_t* pFT_COND_VAR +); + //////////////////////////////////////////////////////////////////////////////////// // 'signal' a "condition"... (releases ONE waiting thread) diff --git a/general1.c b/general1.c index 27b4287..9b9d7f2 100644 --- a/general1.c +++ b/general1.c @@ -715,10 +715,8 @@ int r1; /* Value of R field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ - r1 = inst[1] >> 4; - /* Branch to operand address if r1 mask bit is set */ - if ((0x08 >> regs->psw.cc) & r1) + if ((0x80 >> regs->psw.cc) & inst[1]) { RX(inst, execflag, regs, r1, b2, effective_addr2); regs->psw.IA = effective_addr2; @@ -1299,6 +1297,7 @@ int r1, r3; /* Register numbers */ int b2; /* effective address base */ VADR effective_addr2; /* effective address */ RADR abs2; /* absolute address */ +U32 old; /* old value */ RS(inst, execflag, regs, r1, r3, b2, effective_addr2); @@ -1311,11 +1310,13 @@ RADR abs2; /* absolute address */ abs2 = LOGICAL_TO_ABS (effective_addr2, b2, regs, ACCTYPE_WRITE, regs->psw.pkey); + old = CSWAP32(regs->GR_L(r1)); + /* Obtain main-storage access lock */ OBTAIN_MAINLOCK(regs); /* Attempt to exchange the values */ - regs->psw.cc = cmpxchg4 (®s->GR_L(r1), regs->GR_L(r3), regs->mainstor + abs2); + regs->psw.cc = cmpxchg4 (&old, CSWAP32(regs->GR_L(r3)), regs->mainstor + abs2); /* Release main-storage access lock */ RELEASE_MAINLOCK(regs); @@ -1325,6 +1326,7 @@ RADR abs2; /* absolute address */ if (regs->psw.cc == 1) { + regs->GR_L(r1) = CSWAP32(old); #if defined(_FEATURE_SIE) if((regs->sie_state && (regs->siebk->ic[0] & SIE_IC0_CS1))) { @@ -1365,8 +1367,8 @@ U64 old, new; /* old, new values */ ACCTYPE_WRITE, regs->psw.pkey); /* Get old, new values */ - old = ((U64)(regs->GR_L(r1)) << 32) | regs->GR_L(r1+1); - new = ((U64)(regs->GR_L(r3)) << 32) | regs->GR_L(r3+1); + old = CSWAP64(((U64)(regs->GR_L(r1)) << 32) | regs->GR_L(r1+1)); + new = CSWAP64(((U64)(regs->GR_L(r3)) << 32) | regs->GR_L(r3+1)); /* Obtain main-storage access lock */ OBTAIN_MAINLOCK(regs); @@ -1382,8 +1384,8 @@ U64 old, new; /* old, new values */ if (regs->psw.cc == 1) { - regs->GR_L(r1) = old >> 32; - regs->GR_L(r1+1) = old & 0xffffffff; + regs->GR_L(r1) = CSWAP64(old) >> 32; + regs->GR_L(r1+1) = CSWAP64(old) & 0xffffffff; #if defined(_FEATURE_SIE) if((regs->sie_state && (regs->siebk->ic[0] & SIE_IC0_CS1))) { @@ -2331,84 +2333,41 @@ BYTE utf[4]; /* UTF-8 bytes */ /*-------------------------------------------------------------------*/ DEF_INST(convert_to_binary) { -int r1; /* Values of R fields */ +U64 dreg; /* 64-bit result accumulator */ +int r1; /* Value of R1 field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ -U64 dreg; /* 64-bit result accumulator */ -int i; /* Loop counter */ -int h, d; /* Decimal digits */ -BYTE sbyte; /* Source operand byte */ +int ovf; /* 1=overflow */ +int dxf; /* 1=data exception */ +BYTE dec[8]; /* Packed decimal operand */ RX(inst, execflag, regs, r1, b2, effective_addr2); - /* Initialize binary result */ - dreg = 0; - - /* Convert digits to binary */ - for (i = 0; i < 8; i++) - { - /* Load next byte of operand */ - sbyte = ARCH_DEP(vfetchb) ( effective_addr2, b2, regs ); - - /* Isolate high-order and low-order digits */ - h = (sbyte & 0xF0) >> 4; - d = sbyte & 0x0F; - - /* Check for valid high-order digit */ - if (h > 9) - { - regs->dxc = DXC_DECIMAL; - ARCH_DEP(program_interrupt) (regs, PGM_DATA_EXCEPTION); - } - - /* Accumulate high-order digit into result */ - dreg *= 10; - dreg += h; - - /* Check for valid low-order digit or sign */ - if (i < 7) - { - /* Check for valid low-order digit */ - if (d > 9) - { - regs->dxc = DXC_DECIMAL; - ARCH_DEP(program_interrupt) (regs, PGM_DATA_EXCEPTION); - } - - /* Accumulate low-order digit into result */ - dreg *= 10; - dreg += d; - } - else - { - /* Check for valid sign */ - if (d < 10) - { - regs->dxc = DXC_DECIMAL; - ARCH_DEP(program_interrupt) (regs, PGM_DATA_EXCEPTION); - } - } - - /* Increment operand address */ - effective_addr2++; - effective_addr2 &= ADDRESS_MAXWRAP(regs); + /* Fetch 8-byte packed decimal operand */ + ARCH_DEP(vfetchc) (dec, 8-1, effective_addr2, b2, regs); - } /* end for(i) */ + /* Convert 8-byte packed decimal to 64-bit signed binary */ + packed_to_binary (dec, 8-1, &dreg, &ovf, &dxf); - /* Result is negative if sign is X'B' or X'D' */ - if (d == 0x0B || d == 0x0D) + /* Data exception if invalid digits or sign */ + if (dxf) { - (S64)dreg = -((S64)dreg); + regs->dxc = DXC_DECIMAL; + ARCH_DEP(program_interrupt) (regs, PGM_DATA_EXCEPTION); } + /* Overflow if result exceeds 31 bits plus sign */ + if ((S64)dreg < -2147483648LL || (S64)dreg > 2147483647LL) + ovf = 1; + /* Store low-order 32 bits of result into R1 register */ regs->GR_L(r1) = dreg & 0xFFFFFFFF; - /* Program check if overflow */ - if ((S64)dreg < -2147483648LL || (S64)dreg > 2147483647LL) + /* Program check if overflow (R1 contains rightmost 32 bits) */ + if (ovf) ARCH_DEP(program_interrupt) (regs, PGM_FIXED_POINT_DIVIDE_EXCEPTION); -} +} /* end DEF_INST(convert_to_binary) */ /*-------------------------------------------------------------------*/ @@ -2416,48 +2375,24 @@ BYTE sbyte; /* Source operand byte */ /*-------------------------------------------------------------------*/ DEF_INST(convert_to_decimal) { -int r1; /* Values of R fields */ +S64 bin; /* 64-bit signed binary value*/ +int r1; /* Value of R1 field */ int b2; /* Base of effective addr */ VADR effective_addr2; /* Effective address */ -U64 dreg; /* 64-bit result accumulator */ -int i; /* Loop counter */ -int d; /* Decimal digit */ -U32 n; /* Absolute value to convert */ +BYTE dec[16]; /* Packed decimal result */ RX(inst, execflag, regs, r1, b2, effective_addr2); - /* Load absolute value and generate sign */ - if (regs->GR_L(r1) < 0x80000000) - { - /* Value is positive */ - n = regs->GR_L(r1); - dreg = 0x0C; - } - else if (regs->GR_L(r1) > 0x80000000 ) - { - /* Value is negative */ - n = -((S32)(regs->GR_L(r1))); - dreg = 0x0D; - } - else - { - /* Special case when R1 is maximum negative value */ - n = 0; - dreg = 0x2147483648DULL; - } + /* Load value of register and sign-extend to 64 bits */ + bin = (S64)((S32)(regs->GR_L(r1))); - /* Generate decimal digits */ - for (i = 4; n != 0; i += 4) - { - d = n % 10; - n /= 10; - dreg |= (U64)d << i; - } + /* Convert to 16-byte packed decimal number */ + binary_to_packed (bin, dec); - /* Store packed decimal result at operand address */ - ARCH_DEP(vstore8) ( dreg, effective_addr2, b2, regs ); + /* Store low 8 bytes of result at operand address */ + ARCH_DEP(vstorec) ( dec+8, 8-1, effective_addr2, b2, regs ); -} +} /* end DEF_INST(convert_to_decimal) */ #if defined(FEATURE_ACCESS_REGISTERS) @@ -2473,7 +2408,7 @@ int r1, r2; /* Values of R fields */ /* Copy R2 access register to R1 access register */ regs->AR(r1) = regs->AR(r2); - INVALIDATE_AEA(r1, regs); + INVALIDATE_AEA_AR(r1, regs); } #endif /*defined(FEATURE_ACCESS_REGISTERS)*/ @@ -2904,7 +2839,6 @@ BYTE rwork[64]; /* Register work area */ /* Load one access register from work area */ FETCH_FW(regs->AR(n), rwork + d); d += 4; - INVALIDATE_AEA(n, regs); /* Instruction is complete when r3 register is done */ if ( n == r3 ) break; @@ -2912,6 +2846,11 @@ BYTE rwork[64]; /* Register work area */ n++; n &= 15; } + if (r1 == r3) + INVALIDATE_AEA_AR(r1, regs); + else + INVALIDATE_AEA_ARALL(regs); + } #endif /*defined(FEATURE_ACCESS_REGISTERS)*/ @@ -2957,7 +2896,7 @@ VADR effective_addr2; /* Effective address */ else /* ACCESS_REGISTER_MODE(&(regs->psw)) */ regs->AR(r1) = (b2 == 0) ? 0 : regs->AR(b2); - INVALIDATE_AEA(r1, regs); + INVALIDATE_AEA_AR(r1, regs); } #endif /*defined(FEATURE_ACCESS_REGISTERS)*/ @@ -3248,7 +3187,7 @@ GREG n; /* Work area */ BYTE obyte; /* Operand byte */ BYTE pad; /* Padding byte */ #ifdef OPTION_FAST_MOVELONG -RADR abs1, abs2; +RADR abs1, abs2; GREG len3; #endif @@ -3973,12 +3912,12 @@ U32 n; /* 32-bit operand values */ #if defined(_ARCHMODE2) #define _GEN_ARCH _ARCHMODE2 #include "general1.c" -#endif +#endif #if defined(_ARCHMODE3) #undef _GEN_ARCH #define _GEN_ARCH _ARCHMODE3 #include "general1.c" -#endif +#endif #endif /*!defined(_GEN_ARCH)*/ diff --git a/general2.c b/general2.c index 2a9dfe2..2c352c8 100644 --- a/general2.c +++ b/general2.c @@ -506,7 +506,7 @@ int r1, r2; /* Values of R fields */ /* Copy R2 general register to R1 access register */ regs->AR(r1) = regs->GR_L(r2); - INVALIDATE_AEA(r1, regs); + INVALIDATE_AEA_AR(r1, regs); } #endif /*defined(FEATURE_ACCESS_REGISTERS)*/ @@ -1105,7 +1105,6 @@ U32 n; /* 32-bit operand values */ /* Program check if fixed-point overflow */ if ( regs->psw.cc == 3 && regs->psw.fomask ) ARCH_DEP(program_interrupt) (regs, PGM_FIXED_POINT_OVERFLOW_EXCEPTION); - } @@ -1133,7 +1132,6 @@ U32 n; /* 32-bit operand values */ /* Program check if fixed-point overflow */ if ( regs->psw.cc == 3 && regs->psw.fomask ) ARCH_DEP(program_interrupt) (regs, PGM_FIXED_POINT_OVERFLOW_EXCEPTION); - } @@ -1154,9 +1152,9 @@ int r1, r2; /* Values of R fields */ } -/*---------------------------------------------------------------*/ +/*-------------------------------------------------------------------*/ /* 5F SL - Subtract Logical [RX] */ -/*---------------------------------------------------------------*/ +/*-------------------------------------------------------------------*/ DEF_INST(subtract_logical) { int r1; /* Value of R field */ @@ -1189,6 +1187,12 @@ int rc; /* Return code */ int new_ilc; /* New ilc to set */ RR_SVC(inst, execflag, regs, i); +#if defined(FEATURE_ECPSVM) + if(ecpsvm_dosvc(regs,i)==0) + { + return; + } +#endif #if defined(_FEATURE_SIE) if(regs->sie_state && @@ -1248,10 +1252,7 @@ int new_ilc; /* New ilc to set */ ARCH_DEP(store_psw) ( regs, psa->svcold ); /* Load new PSW from PSA+X'60' */ - obtain_lock(&sysblk.intlock); - rc = ARCH_DEP(load_psw) ( regs, psa->svcnew ); - release_lock(&sysblk.intlock); - if ( rc ) + if ( (rc = ARCH_DEP(load_psw) ( regs, psa->svcnew ) ) ) ARCH_DEP(program_interrupt) (regs, rc); /* load_psw() has set the ILC to zero. This needs to @@ -1495,7 +1496,7 @@ int i; /* Integer work areas */ dbyte = ARCH_DEP(vfetchb) ( effective_addr1, b1, regs ); /* Fetch function byte from second operand */ - sbyte = ARCH_DEP(vfetchb) ( (effective_addr2 + dbyte) + sbyte = ARCH_DEP(vfetchb) ( (effective_addr2 + dbyte) & ADDRESS_MAXWRAP(regs), b2, regs ); /* Test for non-zero function byte */ @@ -1727,7 +1728,7 @@ int ar1 = 4; /* Access register number */ tempword2 = ARCH_DEP(vfetch4) ( tempaddress, ar1, regs ); tempword3 = ARCH_DEP(vfetch4) ( tempaddress + 4, ar1, regs ); - + if ( regs->GR_L(0) == tempword2 ) { diff --git a/hdl.c b/hdl.c new file mode 100644 index 0000000..14c0992 --- /dev/null +++ b/hdl.c @@ -0,0 +1,859 @@ +/* HDL.C (c) Copyright Jan Jaeger, 2003 */ +/* Hercules Dynamic Loader */ + +#include "hercules.h" + +/* +extern HDLPRE hdl_preload[]; +*/ + +#if defined(OPTION_DYNAMIC_LOAD) +HDLPRE hdl_preload[] = { + { "hdteq", HDL_LOAD_NOMSG }, + { "dyncrypt", HDL_LOAD_NOMSG }, +#if 0 + { "dyn_test1", HDL_LOAD_DEFAULT }, + { "dyn_test2", HDL_LOAD_NOMSG }, + { "dyn_test3", HDL_LOAD_NOMSG | HDL_LOAD_NOUNLOAD }, +#endif + { NULL, 0 } }; + +#if 0 +/* Forward definitions from hdlmain.c stuff */ +/* needed because we cannot depend on dlopen(self) */ +extern void *HDL_DEPC; +extern void *HDL_INIT; +extern void *HDL_RESO; +extern void *HDL_DDEV; +extern void *HDL_FINI; +#endif + + +static DLLENT *hdl_dll; /* dll chain */ +static LOCK hdl_lock; /* loader lock */ +static DLLENT *hdl_cdll; /* current dll (hdl_lock) */ + +static HDLDEP *hdl_depend; /* Version codes in hdlmain */ + +static char *hdl_modpath = HDL_DEFAULT_PATH; + +#endif + +static HDLSHD *hdl_shdlist; /* Shutdown call list */ + +/* Global hdl_device_type_equates */ + +char *(*hdl_device_type_equates)(char *); + +/* hdl_adsc - add shutdown call + */ +void hdl_adsc (void * shdcall, void * shdarg) +{ +HDLSHD *newcall; + + newcall = malloc(sizeof(HDLSHD)); + newcall->shdcall = shdcall; + newcall->shdarg = shdarg; + newcall->next = hdl_shdlist; + hdl_shdlist = newcall; +} + + +/* hdl_rmsc - remove shutdown call + */ +int hdl_rmsc (void *shdcall, void *shdarg) +{ +HDLSHD **tmpcall; + + for(tmpcall = &(hdl_shdlist); *tmpcall; tmpcall = &((*tmpcall)->next) ) + { + if( (*tmpcall)->shdcall == shdcall + && (*tmpcall)->shdarg == shdarg ) + { + HDLSHD *frecall; + frecall = *tmpcall; + *tmpcall = (*tmpcall)->next; + free(frecall); + return 0; + } + } + return -1; +} + + +/* hdl_shut - call all shutdown call entries in LIFO order + */ +void hdl_shut (void) +{ +HDLSHD *shdent; + + for(shdent = hdl_shdlist; shdent; shdent = hdl_shdlist) + { + (shdent->shdcall) (shdent->shdarg); + /* Remove shutdown call entry to ensure it is called once */ + hdl_shdlist = shdent->next; + free(shdent); + } +} + + +#if defined(OPTION_DYNAMIC_LOAD) + + +/* hdl_setpath - set path for module load + */ +void hdl_setpath(char *path) +{ + hdl_modpath = path; +} + + +static void * hdl_dlopen(char *filename, int flag __attribute__ ((unused))) +{ +char *fullname; +void *ret; +int fulllen = 0; + + if(filename && *filename != '/' && *filename != '.') + { + if(hdl_modpath && *hdl_modpath) + { + fulllen = strlen(filename) + strlen(hdl_modpath) + 2 + HDL_SUFFIX_LENGTH; + fullname = malloc(fulllen); + strlcpy(fullname,hdl_modpath,fulllen); + strlcat(fullname,"/",fulllen); + strlcat(fullname,filename,fulllen); +#if defined(HDL_MODULE_SUFFIX) + strlcat(fullname,HDL_MODULE_SUFFIX,fulllen); +#endif + } + else + fullname = filename; + + if((ret = dlopen(fullname,flag))) + { + if(fulllen) + free(fullname); + + return ret; + } + +#if defined(HDL_MODULE_SUFFIX) + fullname[strlen(fullname) - HDL_SUFFIX_LENGTH] = '\0'; + + if((ret = dlopen(fullname,flag))) + { + if(fulllen) + free(fullname); + + return ret; + } +#endif + + if(fulllen) + free(fullname); + fulllen=0; + } + if(filename && *filename != '/' && *filename != '.') + { + fulllen = strlen(filename) + 1 + HDL_SUFFIX_LENGTH; + fullname = malloc(fulllen); + strlcpy(fullname,filename,fulllen); +#if defined(HDL_MODULE_SUFFIX) + strlcat(fullname,HDL_MODULE_SUFFIX,fulllen); +#endif + if((ret = dlopen(fullname,flag))) + { + if(fulllen) + free(fullname); + + return ret; + } + +#if defined(HDL_MODULE_SUFFIX) + fullname[strlen(fullname) - HDL_SUFFIX_LENGTH] = '\0'; + + if((ret = dlopen(fullname,flag))) + { + if(fulllen) + free(fullname); + + return ret; + } +#endif + + if(fulllen) + free(fullname); + fulllen=0; + } + + return dlopen(filename,flag); +} + + +/* hdl_dvad - register device type + */ +void hdl_dvad (char *devname, DEVHND *devhnd) +{ +HDLDEV *newhnd; + + newhnd = malloc(sizeof(HDLDEV)); + newhnd->name = strdup(devname); + newhnd->hnd = devhnd; + newhnd->next = hdl_cdll->hndent; + hdl_cdll->hndent = newhnd; +} + + +/* hdl_fhnd - find registered device handler + */ +static DEVHND * hdl_fhnd (char *devname) +{ +DLLENT *dllent; +HDLDEV *hndent; + + for(dllent = hdl_dll; dllent; dllent = dllent->dllnext) + { + for(hndent = dllent->hndent; hndent; hndent = hndent->next) + { + if(!strcasecmp(devname,hndent->name)) + { + return hndent->hnd; + } + } + } + + return NULL; +} + + +/* hdl_bdnm - build device module name + */ +static char * hdl_bdnm (char *ltype) +{ +char *dtname; +unsigned int n; + + dtname = malloc(strlen(ltype) + sizeof(HDL_HDTP_Q)); + strcpy(dtname,HDL_HDTP_Q); + strcat(dtname,ltype); + + for(n = 0; n < strlen(dtname); n++) + if(isupper(dtname[n])) + dtname[n] = tolower(dtname[n]); + + return dtname; +} + + +/* hdl_ghnd - obtain device handler + */ +DEVHND * hdl_ghnd (char *devtype) +{ +DEVHND *hnd; +char *hdtname; +char *ltype; + + if((hnd = hdl_fhnd(devtype))) + return hnd; + + hdtname = hdl_bdnm(devtype); + + if(hdl_load(hdtname,HDL_LOAD_NOMSG) || !hdl_fhnd(devtype)) + { + if(hdl_device_type_equates) + { + if((ltype = hdl_device_type_equates(devtype))) + { + free(hdtname); + + hdtname = hdl_bdnm(ltype); + + hdl_load(hdtname,HDL_LOAD_NOMSG); + } + } + } + + free(hdtname); + + return hdl_fhnd(devtype); +} + + +/* hdl_list - list all entry points + */ +void hdl_list (int flags) +{ +DLLENT *dllent; +MODENT *modent; + + for(dllent = hdl_dll; dllent; dllent = dllent->dllnext) + { + logmsg("dll type = %s",(dllent->flags & HDL_LOAD_MAIN) ? "main" : "load"); + logmsg(", name = %s",dllent->name); + + if (dllent->flags & (HDL_LOAD_NOUNLOAD | HDL_LOAD_WAS_FORCED)) + { + logmsg(", flags = (%s%s%s)" + ,(dllent->flags & HDL_LOAD_NOUNLOAD) ? "nounload" : "" + ,(dllent->flags & HDL_LOAD_NOUNLOAD) && + (dllent->flags & HDL_LOAD_WAS_FORCED) ? ", " : "" + ,(dllent->flags & HDL_LOAD_WAS_FORCED) ? "forced" : "" + ); + } + + logmsg("\n"); + + for(modent = dllent->modent; modent; modent = modent->modnext) + if((flags & HDL_LIST_ALL) + || !((dllent->flags & HDL_LOAD_MAIN) && !modent->fep)) + { + logmsg(" symbol = %s",modent->name); +// logmsg(", ep = %p",modent->fep); + if(modent->fep) + logmsg(", loadcount = %d",modent->count); + else + logmsg(", unresolved"); + logmsg(", owner = %s\n",dllent->name); + } + + if(dllent->hndent) + { + HDLDEV *hndent; + logmsg(" devtype ="); + for(hndent = dllent->hndent; hndent; hndent = hndent->next) + logmsg(" %s",hndent->name); + logmsg("\n"); + } + } +} + + +/* hdl_dlst - list all dependencies + */ +void hdl_dlst (void) +{ +HDLDEP *depent; + + for(depent = hdl_depend; + depent; + depent = depent->next) + logmsg("dependency(%s) version(%s) size(%d)\n", + depent->name,depent->version,depent->size); +} + + +/* hdl_dadd - add depency + */ +static int hdl_dadd (char *name, char *version, int size) +{ +HDLDEP **newdep; + + for (newdep = &(hdl_depend); + *newdep; + newdep = &((*newdep)->next)); + + (*newdep) = malloc(sizeof(HDLDEP)); + (*newdep)->next = NULL; + (*newdep)->name = strdup(name); + (*newdep)->version = strdup(version); + (*newdep)->size = size; + + return 0; +} + + +/* hdl_dchk - depency check + */ +static int hdl_dchk (char *name, char *version, int size) +{ +HDLDEP *depent; + + for(depent = hdl_depend; + depent && strcmp(name,depent->name); + depent = depent->next); + + if(depent) + { + if(strcmp(version,depent->version)) + { + logmsg(_("HHCHD010I Dependency check failed for %s, version(%s) expected(%s)\n"), + name,version,depent->version); + return -1; + } + + if(size != depent->size) + { + logmsg(_("HHCHD011I Dependency check failed for %s, size(%d) expected(%d)\n"), + name,size,depent->size); + return -1; + } + } + else + { + hdl_dadd(name,version,size); + } + + return 0; +} + + +/* hdl_fent - find entry point + */ +void * hdl_fent (char *name) +{ +DLLENT *dllent; +MODENT *modent; +void *fep; + + /* Find entry point and increase loadcount */ + for(dllent = hdl_dll; dllent; dllent = dllent->dllnext) + { + for(modent = dllent->modent; modent; modent = modent->modnext) + { + if(!strcmp(name,modent->name)) + { + modent->count++; + return modent->fep; + } + } + } + + /* If not found then lookup as regular symbol */ + for(dllent = hdl_dll; dllent; dllent = dllent->dllnext) + { + if((fep = dlsym(dllent->dll,name))) + { + if(!(modent = malloc(sizeof(MODENT)))) + { + logmsg(_("HHCHD001E registration malloc failed for %s\n"), + name); + return NULL; + } + + modent->fep = fep; + modent->name = strdup(name); + modent->count = 1; + + /* Insert current entry as first in chain */ + modent->modnext = dllent->modent; + dllent->modent = modent; + + return fep; + } + } + + /* No entry point found */ + return NULL; +} + + +/* hdl_nent - find next entry point in chain + */ +void * hdl_nent (void *fep) +{ +DLLENT *dllent; +MODENT *modent = NULL; +char *name; + + for(dllent = hdl_dll; dllent; dllent = dllent->dllnext) + { + for(modent = dllent->modent; modent; modent = modent->modnext) + { + if(modent->fep == fep) + break; + } + + if(modent && modent->fep == fep) + break; + } + + if(!modent) + return NULL; + + name = modent->name; + + if(!(modent = modent->modnext)) + { + if((dllent = dllent->dllnext)) + modent = dllent->modent; + else + return NULL; + } + + /* Find entry point */ + for(; dllent; dllent = dllent->dllnext, modent = dllent->modent) + { + for(; modent; modent = modent->modnext) + { + if(!strcmp(name,modent->name)) + { + return modent->fep; + } + } + } + + return NULL; +} + + +/* hdl_regi - register entry point + */ +static void hdl_regi (char *name, void *fep) +{ +MODENT *modent; + + modent = malloc(sizeof(MODENT)); + + modent->fep = fep; + modent->name = strdup(name); + modent->count = 0; + + modent->modnext = hdl_cdll->modent; + hdl_cdll->modent = modent; + +} + + +/* hdl_term - hercules termination + */ +static void hdl_term (void *unused __attribute__ ((unused)) ) +{ +DLLENT *dllent; + + /* Call all final routines, in reverse load order */ + for(dllent = hdl_dll; dllent; dllent = dllent->dllnext) + { + if(dllent->hdlfini) + (dllent->hdlfini)(); + } +} + + +/* hdl_main - initialize hercules dynamic loader + */ +void hdl_main (void) +{ +HDLPRE *preload; + + initialize_lock(&hdl_lock); + + dlinit(); + + if(!(hdl_cdll = hdl_dll = malloc(sizeof(DLLENT)))) + { + fprintf(stderr, _("HHCHD002E cannot allocate memory for DLL descriptor: %s\n"), + strerror(errno)); + exit(1); + } + + hdl_cdll->name = strdup("*Hercules"); +/* This was a nice trick. Unfortunatelly, on some platforms */ +/* it becomes impossible. Some platform need fully defined */ +/* DLLs, some other platforms do not allow dlopen(self) */ + +#if 1 + + if(!(hdl_cdll->dll = hdl_dlopen(NULL, RTLD_NOW ))) + { + fprintf(stderr, _("HHCHD003E unable to open hercules as DLL: %s\n"), + dlerror()); + exit(1); + } + + hdl_cdll->flags = HDL_LOAD_MAIN | HDL_LOAD_NOUNLOAD; + + if(!(hdl_cdll->hdldepc = dlsym(hdl_cdll->dll,HDL_DEPC_Q))) + { + fprintf(stderr, _("HHCHD012E No depency section in %s: %s\n"), + hdl_cdll->name, dlerror()); + exit(1); + } + + hdl_cdll->hdlinit = dlsym(hdl_cdll->dll,HDL_INIT_Q); + + hdl_cdll->hdlreso = dlsym(hdl_cdll->dll,HDL_RESO_Q); + + hdl_cdll->hdlddev = dlsym(hdl_cdll->dll,HDL_DDEV_Q); + + hdl_cdll->hdlfini = dlsym(hdl_cdll->dll,HDL_FINI_Q); +#else + + hdl_cdll->flags = HDL_LOAD_MAIN | HDL_LOAD_NOUNLOAD; + + hdl_cdll->hdldepc = &HDL_DEPC; + + hdl_cdll->hdlinit = &HDL_INIT; + + hdl_cdll->hdlreso = &HDL_RESO; + + hdl_cdll->hdlddev = &HDL_DDEV; + + hdl_cdll->hdlfini = &HDL_FINI; +#endif + + /* No modules or device types registered yet */ + hdl_cdll->modent = NULL; + hdl_cdll->hndent = NULL; + + /* No dll's loaded yet */ + hdl_cdll->dllnext = NULL; + + obtain_lock(&hdl_lock); + + if(hdl_cdll->hdldepc) + (hdl_cdll->hdldepc)(&hdl_dadd); + + if(hdl_cdll->hdlinit) + (hdl_cdll->hdlinit)(&hdl_regi); + + if(hdl_cdll->hdlreso) + (hdl_cdll->hdlreso)(&hdl_fent); + + if(hdl_cdll->hdlddev) + (hdl_cdll->hdlddev)(&hdl_dvad); + + release_lock(&hdl_lock); + + /* Register termination exit */ + hdl_adsc(hdl_term, NULL); + + for(preload = hdl_preload; preload->name; preload++) + hdl_load(preload->name, preload->flag); +} + + +/* hdl_load - load a dll + */ +int hdl_load (char *name,int flags) +{ +DLLENT *dllent, *tmpdll; +MODENT *modent; +char *modname; + + modname = (modname = strrchr(name,'/')) ? modname+1 : name; + + for(dllent = hdl_dll; dllent; dllent = dllent->dllnext) + { + if(strfilenamecmp(modname,dllent->name) == 0) + { + logmsg(_("HHCHD005E %s already loaded\n"),dllent->name); + return -1; + } + } + + if(!(dllent = malloc(sizeof(DLLENT)))) + { + logmsg(_("HHCHD006S cannot allocate memory for DLL descriptor: %s\n"), + strerror(errno)); + return -1; + } + + dllent->name = strdup(modname); + + if(!(dllent->dll = hdl_dlopen(name, RTLD_NOW))) + { + if(!(flags & HDL_LOAD_NOMSG)) + logmsg(_("HHCHD007E unable to open DLL %s: %s\n"), + name,dlerror()); + free(dllent); + return -1; + } + + dllent->flags = (flags & (~HDL_LOAD_WAS_FORCED)); + + if(!(dllent->hdldepc = dlsym(dllent->dll,HDL_DEPC_Q))) + { + logmsg(_("HHCHD013E No dependency section in %s: %s\n"), + dllent->name, dlerror()); + dlclose(dllent->dll); + free(dllent); + return -1; + } + + for(tmpdll = hdl_dll; tmpdll; tmpdll = tmpdll->dllnext) + { + if(tmpdll->hdldepc == dllent->hdldepc) + { + logmsg(_("HHCHD016E DLL %s is duplicate of %s\n"), + dllent->name, tmpdll->name); + dlclose(dllent->dll); + free(dllent); + return -1; + } + } + + + dllent->hdlinit = dlsym(dllent->dll,HDL_INIT_Q); + + dllent->hdlreso = dlsym(dllent->dll,HDL_RESO_Q); + + dllent->hdlddev = dlsym(dllent->dll,HDL_DDEV_Q); + + dllent->hdlfini = dlsym(dllent->dll,HDL_FINI_Q); + + /* No modules or device types registered yet */ + dllent->modent = NULL; + dllent->hndent = NULL; + + obtain_lock(&hdl_lock); + + if(dllent->hdldepc) + { + if((dllent->hdldepc)(&hdl_dchk)) + { + logmsg(_("HHCHD014E Dependency check failed for module %s\n"), + dllent->name); + if(!(flags & HDL_LOAD_FORCE)) + { + dlclose(dllent->dll); + free(dllent); + release_lock(&hdl_lock); + return -1; + } + dllent->flags |= HDL_LOAD_WAS_FORCED; + } + } + + hdl_cdll = dllent; + + /* Call initializer */ + if(hdl_cdll->hdlinit) + (dllent->hdlinit)(&hdl_regi); + + /* Insert current entry as first in chain */ + dllent->dllnext = hdl_dll; + hdl_dll = dllent; + + /* Reset the loadcounts */ + for(dllent = hdl_dll; dllent; dllent = dllent->dllnext) + for(modent = dllent->modent; modent; modent = modent->modnext) + modent->count = 0; + + /* Call all resolvers */ + for(dllent = hdl_dll; dllent; dllent = dllent->dllnext) + { + if(dllent->hdlreso) + (dllent->hdlreso)(&hdl_fent); + } + + /* register any device types */ + if(hdl_cdll->hdlddev) + (hdl_cdll->hdlddev)(&hdl_dvad); + + hdl_cdll = NULL; + + release_lock(&hdl_lock); + + return 0; +} + + +/* hdl_dele - unload a dll + */ +int hdl_dele (char *name) +{ +DLLENT **dllent, *tmpdll; +MODENT *modent, *tmpmod; +DEVBLK *dev; +HDLDEV *hnd; +char *modname; + + modname = (modname = strrchr(name,'/')) ? modname+1 : name; + + obtain_lock(&hdl_lock); + + for(dllent = &(hdl_dll); *dllent; dllent = &((*dllent)->dllnext)) + { + if(strfilenamecmp(modname,(*dllent)->name) == 0) + { + if((*dllent)->flags & (HDL_LOAD_MAIN | HDL_LOAD_NOUNLOAD)) + { + logmsg(_("HHCHD015E Unloading of %s not allowed\n"),(*dllent)->name); + release_lock(&hdl_lock); + return -1; + } + + for(dev = sysblk.firstdev; dev; dev = dev->nextdev) + if(dev->pmcw.flag5 & PMCW5_V) + for(hnd = (*dllent)->hndent; hnd; hnd = hnd->next) + if(hnd->hnd == dev->hnd) + { + logmsg(_("HHCHD008E Device %4.4X bound to %s\n"),dev->devnum,(*dllent)->name); + release_lock(&hdl_lock); + return -1; + } + + /* Call dll close routine */ + if((*dllent)->hdlfini) + { + int rc; + + if((rc = ((*dllent)->hdlfini)())) + { + logmsg(_("HHCHD017E Unload of %s rejected by final section\n"),(*dllent)->name); + release_lock(&hdl_lock); + return rc; + } + } + + modent = (*dllent)->modent; + while(modent) + { + tmpmod = modent; + + /* remove current entry from chain */ + modent = modent->modnext; + + /* free module resources */ + free(tmpmod->name); + free(tmpmod); + } + + tmpdll = *dllent; + + /* remove current entry from chain */ + *dllent = (*dllent)->dllnext; + + for(hnd = tmpdll->hndent; hnd;) + { + HDLDEV *nexthnd; + free(hnd->name); + nexthnd = hnd->next; + free(hnd); + hnd = nexthnd; + } + +// dlclose(tmpdll->dll); + + /* free dll resources */ + free(tmpdll->name); + free(tmpdll); + + /* Reset the loadcounts */ + for(tmpdll = hdl_dll; tmpdll; tmpdll = tmpdll->dllnext) + for(tmpmod = tmpdll->modent; tmpmod; tmpmod = tmpmod->modnext) + tmpmod->count = 0; + + /* Call all resolvers */ + for(tmpdll = hdl_dll; tmpdll; tmpdll = tmpdll->dllnext) + { + if(tmpdll->hdlreso) + (tmpdll->hdlreso)(&hdl_fent); + } + + release_lock(&hdl_lock); + + return 0; + } + + } + + release_lock(&hdl_lock); + + logmsg(_("HHCHD009E %s not found\n"),modname); + + return -1; +} + +#endif /*defined(OPTION_DYNAMIC_LOAD)*/ diff --git a/hdl.h b/hdl.h new file mode 100644 index 0000000..9c1076b --- /dev/null +++ b/hdl.h @@ -0,0 +1,244 @@ +/* HDL.H (c) Copyright Jan Jaeger, 2003 */ +/* Hercules Dynamic Loader */ + +#ifndef _HDL_H +#define _HDL_H + + +void hdl_adsc (void *, void *); /* Add shutdown routine */ +int hdl_rmsc(void *, void *); /* Remove shutdown routine */ +void hdl_shut(void); /* Call all shutdown routines*/ + + +struct _DEVHND; +struct _DEVHND *hdl_ghnd(char *devname); /* Get device handler */ + + +struct _HDLSHD; +typedef struct _HDLSHD { + struct _HDLSHD *next; + void (*shdcall) (void *); /* Entry to be called */ + void *shdarg; /* Optional argument */ +} HDLSHD; + + +#define STRING_M( _string ) #_string +#define STRING_Q( _string ) STRING_M( _string ) + + +#if defined(OPTION_DYNAMIC_LOAD) + +extern char *(*hdl_device_type_equates)(char *); + + +#if defined(HDL_USE_LIBTOOL) + #include + #define dlinit() lt_dlinit() + #define dlopen(_name, _flags) lt_dlopen(_name) + #define dlsym(_handle, _symbol) lt_dlsym(_handle, _symbol) + #define dlclose(_handle) lt_dlclose(_handle) + #define dlerror() lt_dlerror() + #define RTLD_NOW 0 +#else + #include + #define dlinit() +#endif + + +typedef struct _HDLDEV { /* Device entry */ + char *name; /* Device type name */ + struct _DEVHND *hnd; /* Device handlers */ + struct _HDLDEV *next; /* Next entry */ +} HDLDEV; + + +struct _HDLDEP; +typedef struct _HDLDEP { /* Dependency entry */ + char *name; /* Dependency name */ + char *version; /* Version */ + int size; /* Structure/module size */ + struct _HDLDEP *next; /* Next entry */ +} HDLDEP; + + +typedef struct _HDLPRE { /* Preload list entry */ + char *name; /* Module name */ + int flag; /* Load flags */ +} HDLPRE; + + +struct _MODENT; +typedef struct _MODENT { /* External Symbol entry */ + void (*fep)(); /* Function entry point */ + char *name; /* Function symbol name */ + int count; /* Symbol load count */ + struct _MODENT *modnext; /* Next entry in chain */ +} MODENT; + + +struct _DLLENT; +typedef struct _DLLENT { /* DLL entry */ + char *name; /* load module name */ + void *dll; /* DLL handle (dlopen) */ + int flags; /* load flags */ + int (*hdldepc)(void *); /* hdl_depc */ + int (*hdlreso)(void *); /* hdl_reso */ + int (*hdlinit)(void *); /* hdl_init */ + int (*hdlddev)(void *); /* hdl_ddev */ + int (*hdlfini)(); /* hdl_fini */ + struct _MODENT *modent; /* First symbol entry */ + struct _HDLDEV *hndent; /* First device entry */ + struct _DLLENT *dllnext; /* Next entry in chain */ +} DLLENT; + + +#if defined(MODULESDIR) +#define HDL_DEFAULT_PATH MODULESDIR +#else +#define HDL_DEFAULT_PATH "hercules" +#endif + +/* SHLIBEXT defined by ISW in configure.ac/config.h */ +#if HDL_BUILD_SHARED +#define HDL_MODULE_SUFFIX LTDL_SHLIB_EXT +#else +#define HDL_MODULE_SUFFIX ".la" +#endif + + +#if defined(HDL_MODULE_SUFFIX) + #define HDL_SUFFIX_LENGTH (sizeof(HDL_MODULE_SUFFIX) - 1) +#else + #define HDL_SUFFIX_LENGTH 0 +#endif + + +int hdl_load(char *, int); /* load dll */ +#define HDL_LOAD_DEFAULT 0x00000000 +#define HDL_LOAD_MAIN 0x00000001 /* Hercules MAIN module flag */ +#define HDL_LOAD_NOUNLOAD 0x00000002 /* Module cannot be unloaded */ +#define HDL_LOAD_FORCE 0x00000004 /* Override dependency check */ +#define HDL_LOAD_NOMSG 0x00000008 /* Do not issue not found msg*/ +#define HDL_LOAD_WAS_FORCED 0x00000010 /* Module load was forced */ + +int hdl_dele(char *); /* Unload dll */ +void hdl_list(int); /* list all loaded modules */ +#define HDL_LIST_DEFAULT 0x00000000 +#define HDL_LIST_ALL 0x00000001 /* list all references */ +void hdl_dlst(); /* list all dependencies */ + +void hdl_main(); /* Main initialization rtn */ + +void hdl_setpath(char *); /* Set module path */ + +void * hdl_fent(char *); /* Find entry name */ +void * hdl_nent(void *); /* Find next in chain */ + +/* The following statement should be void *(*unresolved)(void) = NULL*/ +static void **unresolved __attribute__ ((unused)) = NULL; +#define UNRESOLVED *unresolved + + +#define HDL_DEPC hdl_depc +#define HDL_RESO hdl_reso +#define HDL_INIT hdl_init +#define HDL_FINI hdl_fini +#define HDL_DDEV hdl_ddev + +#define HDL_HDTP hdt + +#define HDL_DEPC_Q STRING_Q(HDL_DEPC) +#define HDL_RESO_Q STRING_Q(HDL_RESO) +#define HDL_INIT_Q STRING_Q(HDL_INIT) +#define HDL_FINI_Q STRING_Q(HDL_FINI) +#define HDL_DDEV_Q STRING_Q(HDL_DDEV) + +#define HDL_HDTP_Q STRING_Q(HDL_HDTP) + + +#define HDL_FINDSYM(_name) \ + hdl_fent( (_name) ) + +#define HDL_FINDNXT(_ep) \ + hdl_nent( &(_ep) ) + + +#define HDL_DEPENDENCY_SECTION \ +int HDL_DEPC(int (*hdl_depc_vers)(char *, char *, int) __attribute__ ((unused)) ) \ +{ \ +int hdl_depc_rc = 0 + +#define HDL_DEPENDENCY(_comp) \ + if (hdl_depc_vers( STRING_Q(_comp), HDL_VERS_ ## _comp, HDL_SIZE_ ## _comp)) \ + hdl_depc_rc = 1 + +#define END_DEPENDENCY_SECTION \ +return hdl_depc_rc; } + + +#define HDL_REGISTER_SECTION \ +void HDL_INIT(int (*hdl_init_regi)(char *, void *) __attribute__ ((unused)) ) \ +{ + +/* register this epname, as ep = addr of this var or func... */ +#define HDL_REGISTER( _epname, _varname ) \ + (hdl_init_regi)( STRING_Q(_epname), &(_varname) ) + +#define END_REGISTER_SECTION \ +} + + +#define HDL_DEVICE_SECTION \ +void HDL_DDEV(int (*hdl_init_ddev)(char *, void *) __attribute__ ((unused)) ) \ +{ + +#define HDL_DEVICE( _devname, _devhnd ) \ + (hdl_init_ddev)( STRING_Q(_devname), &(_devhnd) ) + +#define END_DEVICE_SECTION \ +} + + +#define HDL_RESOLVER_SECTION \ +void HDL_RESO(void *(*hdl_reso_fent)(char *) __attribute__ ((unused)) ) \ +{ + +#define HDL_RESOLVE(_name) \ + (_name) = (hdl_reso_fent)(STRING_Q(_name)) + +/* set this ptrvar, to this ep value... */ +#define HDL_RESOLVE_PTRVAR( _ptrvar, _epname ) \ + (_ptrvar) = (hdl_reso_fent)( STRING_Q(_epname) ) + +#define END_RESOLVER_SECTION \ +} + + +#define HDL_FINAL_SECTION \ +int HDL_FINI() \ +{ + +#define END_FINAL_SECTION \ +return 0; } + + +#else /*defined(OPTION_DYNAMIC_LOAD)*/ + + +#define HDL_DEVICE_SECTION \ +DEVHND *hdl_ghnd(char *devtype) \ +{ + +#define HDL_DEVICE( _devname, _devhnd ) \ + if(!strcasecmp( STRING_Q(_devname), devtype )) \ + return &(_devhnd); + +#define END_DEVICE_SECTION \ + return NULL; \ +} + + +#endif /*defined(OPTION_DYNAMIC_LOAD)*/ + + +#endif diff --git a/hdlmain.c b/hdlmain.c new file mode 100644 index 0000000..d367fc6 --- /dev/null +++ b/hdlmain.c @@ -0,0 +1,220 @@ +/* HDLMAIN.C (c) Copyright Jan Jaeger, 2003 */ +/* Hercules Dynamic Loader */ + + +#include "hercules.h" + +#include "httpmisc.h" + +#define CRYPTO_EXTERN extern +#include "crypto.h" + + +#if !defined(_GEN_ARCH) + + +#if defined(_ARCHMODE2) + #define _GEN_ARCH _ARCHMODE2 + #include "hdlmain.c" +#endif + +#if defined(_ARCHMODE3) + #undef _GEN_ARCH + #define _GEN_ARCH _ARCHMODE3 + #include "hdlmain.c" +#endif + + +#if defined(OPTION_DYNAMIC_LOAD) + +/* Following block moved to 'hdl.c' */ +/* this is so that */ +/* hdlmain.c can be moved to the executable portion */ +/* hdl_main can find hdl_preload */ +/* +HDLPRE hdl_preload[] = { + { "hdteq", HDL_LOAD_NOMSG }, + { "dyncrypt", HDL_LOAD_NOMSG }, +#if 0 + { "dyn_test1", HDL_LOAD_DEFAULT }, + { "dyn_test2", HDL_LOAD_NOMSG }, + { "dyn_test3", HDL_LOAD_NOMSG | HDL_LOAD_NOUNLOAD }, +#endif + { NULL, 0 } }; +*/ + +HDL_DEPENDENCY_SECTION; +{ + HDL_DEPENDENCY(HERCULES); + HDL_DEPENDENCY(REGS); + HDL_DEPENDENCY(DEVBLK); + HDL_DEPENDENCY(SYSBLK); + HDL_DEPENDENCY(WEBBLK); +} +END_DEPENDENCY_SECTION; + + +HDL_REGISTER_SECTION; +{ + HDL_REGISTER( panel_command, panel_command_r ); + HDL_REGISTER( panel_display, panel_display_r ); + HDL_REGISTER( config_command, UNRESOLVED ); + HDL_REGISTER( system_command, UNRESOLVED ); + HDL_REGISTER( daemon_task, UNRESOLVED ); + HDL_REGISTER( debug_cpu_state, UNRESOLVED ); + HDL_REGISTER( debug_device_state, UNRESOLVED ); + HDL_REGISTER( debug_program_interrupt, UNRESOLVED ); + HDL_REGISTER( debug_diagnose, UNRESOLVED ); + HDL_REGISTER( debug_sclp_unknown_command, UNRESOLVED ); + HDL_REGISTER( debug_sclp_unknown_event, UNRESOLVED ); + HDL_REGISTER( debug_sclp_event_data, UNRESOLVED ); + HDL_REGISTER( debug_chsc_unknown_request, UNRESOLVED ); +#if defined(OPTION_W32_CTCI) + HDL_REGISTER( debug_tt32_stats, UNRESOLVED ); +#endif + + HDL_REGISTER( hdl_device_type_equates, UNRESOLVED ); + +#if defined(_390_FEATURE_MESSAGE_SECURITY_ASSIST) + HDL_REGISTER( s390_cipher_message, UNRESOLVED ); + HDL_REGISTER( s390_cipher_message_with_chaining, UNRESOLVED ); + HDL_REGISTER( s390_compute_intermediate_message_digest, UNRESOLVED ); + HDL_REGISTER( s390_compute_last_message_digest, UNRESOLVED ); + HDL_REGISTER( s390_compute_message_authentication_code, UNRESOLVED ); +#endif /*defined(_390_FEATURE_MESSAGE_SECURITY_ASSIST)*/ +#if defined(_900_FEATURE_MESSAGE_SECURITY_ASSIST) + HDL_REGISTER( z900_cipher_message, UNRESOLVED ); + HDL_REGISTER( z900_cipher_message_with_chaining, UNRESOLVED ); + HDL_REGISTER( z900_compute_intermediate_message_digest, UNRESOLVED ); + HDL_REGISTER( z900_compute_last_message_digest, UNRESOLVED ); + HDL_REGISTER( z900_compute_message_authentication_code, UNRESOLVED ); +#endif /*defined(_900_FEATURE_MESSAGE_SECURITY_ASSIST)*/ + +} +END_REGISTER_SECTION; + + +HDL_RESOLVER_SECTION; +{ + HDL_RESOLVE( panel_command ); + HDL_RESOLVE( panel_display ); + HDL_RESOLVE( config_command ); + HDL_RESOLVE( system_command ); + HDL_RESOLVE( daemon_task ); + HDL_RESOLVE( debug_cpu_state ); + HDL_RESOLVE( debug_device_state ); + HDL_RESOLVE( debug_program_interrupt ); + HDL_RESOLVE( debug_diagnose ); + HDL_RESOLVE( debug_sclp_unknown_command ); + HDL_RESOLVE( debug_sclp_unknown_event ); + HDL_RESOLVE( debug_sclp_event_data ); + HDL_RESOLVE( debug_chsc_unknown_request ); +#if defined(OPTION_W32_CTCI) + HDL_RESOLVE( debug_tt32_stats ); +#endif + + HDL_RESOLVE( hdl_device_type_equates ); + +#if defined(_390_FEATURE_MESSAGE_SECURITY_ASSIST) + HDL_RESOLVE( s390_cipher_message ); + HDL_RESOLVE( s390_cipher_message_with_chaining ); + HDL_RESOLVE( s390_compute_intermediate_message_digest ); + HDL_RESOLVE( s390_compute_last_message_digest ); + HDL_RESOLVE( s390_compute_message_authentication_code ); +#endif /*defined(_390_FEATURE_MESSAGE_SECURITY_ASSIST)*/ +#if defined(_900_FEATURE_MESSAGE_SECURITY_ASSIST) + HDL_RESOLVE( z900_cipher_message ); + HDL_RESOLVE( z900_cipher_message_with_chaining ); + HDL_RESOLVE( z900_compute_intermediate_message_digest ); + HDL_RESOLVE( z900_compute_last_message_digest ); + HDL_RESOLVE( z900_compute_message_authentication_code ); +#endif /*defined(_900_FEATURE_MESSAGE_SECURITY_ASSIST)*/ + +} +END_RESOLVER_SECTION; + + +HDL_FINAL_SECTION; +{ + system_cleanup(); +} +END_FINAL_SECTION; + + +#endif /*defined(OPTION_DYNAMIC_LOAD)*/ + + +HDL_DEVICE_SECTION; +{ +#if !defined(OPTION_DYNAMIC_LOAD) + /* TTY consoles */ + HDL_DEVICE(1052, constty_device_hndinfo ); + HDL_DEVICE(3215, constty_device_hndinfo ); + + /* 3270 consoles */ + HDL_DEVICE(3270, loc3270_device_hndinfo ); + HDL_DEVICE(3287, loc3270_device_hndinfo ); + + /* Communication line devices */ + HDL_DEVICE(2703, comadpt_device_hndinfo ); + + /* Card readers */ + HDL_DEVICE(1442, cardrdr_device_hndinfo ); + HDL_DEVICE(2501, cardrdr_device_hndinfo ); + HDL_DEVICE(3505, cardrdr_device_hndinfo ); + + /* Card punches */ + HDL_DEVICE(3525, cardpch_device_hndinfo ); + + /* Printers */ + HDL_DEVICE(1403, printer_device_hndinfo ); + HDL_DEVICE(3211, printer_device_hndinfo ); + + /* Tape drives */ + HDL_DEVICE(3410, tapedev_device_hndinfo ); + HDL_DEVICE(3411, tapedev_device_hndinfo ); + HDL_DEVICE(3420, tapedev_device_hndinfo ); + HDL_DEVICE(3480, tapedev_device_hndinfo ); + HDL_DEVICE(3490, tapedev_device_hndinfo ); + HDL_DEVICE(9347, tapedev_device_hndinfo ); + HDL_DEVICE(9348, tapedev_device_hndinfo ); + HDL_DEVICE(8809, tapedev_device_hndinfo ); + +#if !defined(__APPLE__) + /* Communications devices */ + HDL_DEVICE(3088, ctcadpt_device_hndinfo ); + HDL_DEVICE(CTCI, ctci_device_hndinfo ); +#if defined(WIN32) + HDL_DEVICE(CTCI-W32, ctci_device_hndinfo); +#endif /*defined(WIN32)*/ + HDL_DEVICE(CTCT, ctct_device_hndinfo ); + HDL_DEVICE(LCS, lcs_device_hndinfo ); + HDL_DEVICE(VMNET,vmnet_device_hndinfo ); +#endif /* !defined(__APPLE__) */ + +#endif /*!defined(OPTION_DYNAMIC_LOAD)*/ + + /* Count Key Data Direct Access Storage Devices */ + HDL_DEVICE(2311, ckddasd_device_hndinfo ); + HDL_DEVICE(2314, ckddasd_device_hndinfo ); + HDL_DEVICE(3330, ckddasd_device_hndinfo ); + HDL_DEVICE(3340, ckddasd_device_hndinfo ); + HDL_DEVICE(3350, ckddasd_device_hndinfo ); + HDL_DEVICE(3375, ckddasd_device_hndinfo ); + HDL_DEVICE(3380, ckddasd_device_hndinfo ); + HDL_DEVICE(3390, ckddasd_device_hndinfo ); + HDL_DEVICE(9345, ckddasd_device_hndinfo ); + + /* Fixed Block Architecture Direct Access Storage Devices */ + HDL_DEVICE(0671, fbadasd_device_hndinfo ); + HDL_DEVICE(3310, fbadasd_device_hndinfo ); + HDL_DEVICE(3370, fbadasd_device_hndinfo ); + HDL_DEVICE(9313, fbadasd_device_hndinfo ); + HDL_DEVICE(9332, fbadasd_device_hndinfo ); + HDL_DEVICE(9335, fbadasd_device_hndinfo ); + HDL_DEVICE(9336, fbadasd_device_hndinfo ); +} +END_DEVICE_SECTION; + + +#endif /*!defined(_GEN_ARCH)*/ diff --git a/hdteq.c b/hdteq.c new file mode 100644 index 0000000..c588dc7 --- /dev/null +++ b/hdteq.c @@ -0,0 +1,99 @@ +/* HDTEQ.C (c) Copyright Jan Jaeger, 2003 */ +/* Hercules Dynamic Loader */ + + +#include "hercules.h" + + +typedef struct _DTEQ { + char *alias; + char *name; +} DTEQ; + + +static DTEQ dteq[] = { +/* + This table provides aliases for device types, such that various + device types may be mapped to a common loadable module. + + The only purpose of this table is to associate the right loadable + module with a specific device type, before the device type in + question has been registered. This table will not be searched + for registered device types or if the specific loadable module exists. + + device type requested + | + | base device support + | | + V V */ + +// { "3390", "3990" }, +// { "3380", "3990" }, + + { "1052", "3270" }, + { "3215", "3270" }, + { "3287", "3270" }, + + { "1442", "3505" }, + { "2501", "3505" }, + + { "3211", "1403" }, + + { "3410", "3420" }, + { "3411", "3420" }, + { "3420", "3420" }, + { "3480", "3420" }, + { "3490", "3420" }, + { "9347", "3420" }, + { "9348", "3420" }, + { "8809", "3420" }, + { "3422", "3420" }, + { "3430", "3420" }, + + { "LCS", "3088" }, + { "CTCI", "3088" }, + { "CTCT", "3088" }, + { "VMNET", "3088" }, + + { NULL, NULL } }; + + +static char *hdt_device_type_equates(char *typname) +{ +DTEQ *device_type; +char *(*nextcall)(char *); + + for(device_type = dteq; device_type->name; device_type++) + if(!strcasecmp(device_type->alias, typname)) + return device_type->name; + + if((nextcall = HDL_FINDNXT(hdt_device_type_equates))) + return nextcall(typname); + + return NULL; +} + +/* Libtool static name colision resolution */ +/* note : lt_dlopen will look for symbol & modulename_LTX_symbol */ +/* for use in DLREOPEN case only */ +#if !defined(HDL_BUILD_SHARED) && defined(HDL_USE_LIBTOOL) +#define hdl_ddev hdteq_LTX_hdl_ddev +#define hdl_depc hdteq_LTX_hdl_depc +#define hdl_reso hdteq_LTX_hdl_reso +#define hdl_init hdteq_LTX_hdl_init +#define hdl_fini hdteq_LTX_hdl_fini +#endif + + +HDL_DEPENDENCY_SECTION; +{ + HDL_DEPENDENCY(HERCULES); +} +END_DEPENDENCY_SECTION; + + +HDL_REGISTER_SECTION; +{ + HDL_REGISTER(hdl_device_type_equates,hdt_device_type_equates); +} +END_REGISTER_SECTION; diff --git a/herc_getopt.h b/herc_getopt.h new file mode 100644 index 0000000..21eb1a6 --- /dev/null +++ b/herc_getopt.h @@ -0,0 +1,63 @@ +#if !defined(__HERC_GETOPT_H__) +# define __HERC_GETOPT_H__ + + +#if !defined(HAVE_CONFIG_H) + // If we don't have config.h yet, then + // we need to use Herc's getopt wrapper. + +// #define DO_GETOPT_WRAPPER +#else + // Else (we DO have config.h), then only + // use the wrapper if we really need to. + + #if defined(NEED_GETOPT_WRAPPER) + #define DO_GETOPT_WRAPPER + #endif /* NEED_GETOPT_WRAPPER */ + +#endif /* !HAVE_CONFIG_H */ + + + #if defined(NEED_GETOPT_OPTRESET) + #define OPTRESET() optreset=1 + #else + #define OPTRESET() + #endif + + +#if defined(DO_GETOPT_WRAPPER) + + // Declare HERC's getopt wrapper functions and extern variables... + + #if defined(HAVE_CONFIG_H) && defined(HAVE_GETOPT_LONG) + + #include + int herc_getopt_long (int,char * const *,const char *,const struct option *,int *); +// int herc_getopt_long_only(int,char * const *,const char *,const struct option *,int *); + + #endif /* HAVE_CONFIG_H && HAVE_GETOPT_LONG */ + + int herc_getopt(int,char * const *,const char *); + + extern char *herc_optarg; + extern int herc_optind; + extern int herc_opterr; + extern int herc_optopt; + extern int herc_optreset; + + // The following series of defines end up causing the source file + // that happens to include "herc_getopt.h" to end up calling HERC's + // version of getopt instead of the normal system getopt. + + #define getopt herc_getopt + #define getopt_long herc_getopt_long +// #define getopt_long_only herc_getopt_long_only + #define optarg herc_optarg + #define optind herc_optind + #define optopt herc_optopt + #define optreset herc_optreset + +#endif /* DO_GETOPT_WRAPPER */ + + +#endif /* __HERC_GETOPT_H__ */ diff --git a/hercifc.c b/hercifc.c index 9fe45bc..54d45ba 100644 --- a/hercifc.c +++ b/hercifc.c @@ -22,6 +22,17 @@ #include "hercules.h" #include "hercifc.h" +/* ISW 02/20/2003 - Proposed patch ISW20032002-2 + define dummy 'extgui' so that hercules can be defined on + a build with --enable-external-gui + extgui is set to 0 regardless of the environment + (i.e. there is no EXTERNALGUI argument to hercifc +*/ +#ifdef EXTERNALGUI +int extgui=0; +#endif +/* End of ISW20032002-2 */ + // -------------------------------------------------------------------- // HERCIFC program entry point // -------------------------------------------------------------------- diff --git a/hercifc.h b/hercifc.h index bb7782a..c727fc7 100644 --- a/hercifc.h +++ b/hercifc.h @@ -9,7 +9,22 @@ #ifndef __HERCIFC_H_ #define __HERCIFC_H_ -#include "if_tun.h" +#ifdef HAVE_LINUX_IF_TUN_H +#include +#else +/* Ioctl defines */ +#define TUNSETNOCSUM _IOW('T', 200, int) +#define TUNSETDEBUG _IOW('T', 201, int) +#define TUNSETIFF _IOW('T', 202, int) +#define TUNSETPERSIST _IOW('T', 203, int) +#define TUNSETOWNER _IOW('T', 204, int) + +/* TUNSETIFF ifr flags */ +#define IFF_TUN 0x0001 +#define IFF_TAP 0x0002 +#define IFF_NO_PI 0x1000 +#define IFF_ONE_QUEUE 0x2000 +#endif #if !defined( WIN32 ) #include diff --git a/hercnls.h b/hercnls.h index a89b328..aa65db2 100644 --- a/hercnls.h +++ b/hercnls.h @@ -1,9 +1,27 @@ +#define DEBUG_MESSAGES +/* Add message prefix filename:linenumber: to messages + when compiled with debug enabled - JJ 30/12/99 */ +#define DEBUG_MSG_Q( _string ) #_string +#define DEBUG_MSG_M( _string ) DEBUG_MSG_Q( _string ) +#define DEBUG_MSG( _string ) __FILE__ ":" DEBUG_MSG_M( __LINE__ ) ":" _string + +#define D_( _string ) DEBUG_MSG( _string ) + +#if defined(DEBUG) && defined(DEBUG_MESSAGES) + #define DEBUG_( _string ) D_( _string ) +#else + #define DEBUG_( _string ) _string +#endif + + + + #if defined(ENABLE_NLS) #include - #define _(_string) gettext(_string) + #define _(_string) gettext(DEBUG_(_string)) #else - #define _(_string) (_string) - #define N_(_string) (_string) + #define _(_string) (DEBUG_(_string)) + #define N_(_string) (DEBUG_(_string)) #define textdomain(_domain) #define bindtextdomain(_package, _directory) #endif diff --git a/hercules.cnf b/hercules.cnf index c9010eb..c333843 100644 --- a/hercules.cnf +++ b/hercules.cnf @@ -1,39 +1,120 @@ -# -# Sample configuration file for Hercules ESA/390 emulator -# - -CPUSERIAL 002623 # CPU serial number -CPUMODEL 3090 # CPU model number -MAINSIZE 64 # Main storage size in megabytes -CODEPAGE default # CodePage conversion table -XPNDSIZE 0 # Expanded storage size in megabytes -CNSLPORT 3270 # TCP port number to which consoles connect -HTTPPORT 8081 noauth userid password # HTTP server port -HTTPROOT /usr/local/share/hercules/ # base directory for built-in web server -NUMCPU 1 # Number of CPUs -LOADPARM 0120.... # IPL parameter -OSTAILOR LINUX # OS tailoring -PANRATE FAST # Panel refresh rate -ARCHMODE ESA/390 # Architecture mode S/370, ESA/390 or ESAME - -# .-----------------------Device number -# | .-----------------Device type -# | | .---------File name and parameters -# | | | -# V V V -#--- ---- -------------------- -000C 3505 ../share/hercules/zzsacard.bin -000D 3525 punch00d.txt ascii -000E 1403 print00e.txt crlf -001F 3270 -# 0580 3420 ickdsf.ipl -# 0120 3380 mvsv5r.120 -# 0121 3380 mvsv5d.121 -# 0122 3380 mvswk1.122 -# 0140 9336 dosres.140 -# 0141 9336 syswk1.141 -# 0200 3270 -# 0201 3270 -# 0202 3270 -# 0300 3370 sysres.300 -# 0700 3270 +# +# Sample configuration file for Hercules ESA/390 emulator +# + + +#------------------------------------------------------------------------------ +# CPU Configuration +#------------------------------------------------------------------------------ + + CPUSERIAL 002623 # CPU serial number + CPUMODEL 3090 # CPU model number + CPUVERID FD # CPU Version Identification + MAINSIZE 64 # Main storage size in megabytes + XPNDSIZE 0 # Expanded storage size in megabytes + NUMCPU 1 # Number of CPUs +# NUMVEC 1 # Number of Vector Processors + ARCHMODE ESA/390 # Architecture mode S/370, ESA/390 or ESAME + ECPSVM NO # VM Assist : NO or Level (20 recommended) + +#------------------------------------------------------------------------------ +# OS Tailoring +#------------------------------------------------------------------------------ + + LOADPARM 0120.... # IPL parameter + OSTAILOR LINUX # OS tailoring + SYSEPOCH 1900 # Base year for initial TOD clock +# TZOFFSET 0 # Using UTC (GMT) + + +#------------------------------------------------------------------------------ +# Hercules Service Processor and Hercules Application Window +#------------------------------------------------------------------------------ + + +# MODPATH /usr/local/lib/hercules # Where to search for modules +# LDMOD dyninst tcpip # Modules to be loaded + +#------------------------------------------------------------------------------ +# Hercules Service Processor and Hercules Application Window +#------------------------------------------------------------------------------ + + CODEPAGE default # CodePage conversion table + DIAG8CMD disable # OS may not issue commands via DIAG 8 + + HTTPPORT 8081 noauth userid password # HTTP server port +# HTTPROOT /usr/local/share/hercules/ # HTTP root directory + + PANRATE FAST # Panel refresh rate + + +#------------------------------------------------------------------------------- +# Advanced Hercules Performance Tailoring +# +# +----------------------------------------------------------------+ +# | Caution: Modification of these parameters may adversely | +# | affect the performance of the host system | +# | and/or Hercules. | +# +----------------------------------------------------------------+ +#------------------------------------------------------------------------------- + +# HERCPRIO 0 # Hercules process runs at Normal priority +# CPUPRIO 15 # CPU thread(s) run at Low priority +# DEVPRIO 8 # Device thread(s) run at Below Normal priority +# TODPRIO -20 # TOD Clock and timer thread are Time Critical + + +#------------------------------------------------------------------------------- +# Integrated Hercules I/O Controller +# + +# DEVTMAX 0 # Device threads, 8 on Windows, else unlimited + CNSLPORT 3270 # TCP port number to which consoles connect +# SHRDPORT 3990 # TCP port number for sharing DASD images on + # this instance of Hercules (inactive) + +# .-----------------------Device number +# | .-----------------Device type +# | | .---------File name and parameters +# | | | +# V V V +# ---- ---- -------------------- + 000C 3505 ./util/zzsacard.bin + 000D 3525 punch00d.txt ascii + 000E 1403 print00e.txt crlf + 001F 3270 +# The following statements are examples. Some of them require +# user tailoring before being used. +# 0580 3420 ickdsf.ipl +# 0120 3380 mvsv5r.120 +# 0121 3380 mvsv5d.121 +# 0122 3380 mvswk1.122 +# 0140 9336 dosres.140 +# 0141 9336 syswk1.141 +# +# The following statement defines 3 3270 devices starting +# at address 0200 +# 0200.3 3270 +# +# The following statement defines 3480 devices +# at addresses 0280 to 028F +# 280-28F 3480 +# +# The following statement defines 3420 devices +# at addresses 02C0 & 02C2 +# 2C0,2C2 3420 +# 0300 3370 sysres.300 +# +# The following statements define 3380 Devices +# with the CUU substituted in the device file name +# device file names will be +# 400.3380, 401.3380, 402.3380 and 403.3380 +# 400-403 3380 $(CUU).3380 +# +# CCUU may also be used to define a 4 digit device address +# in the name +# device file names will be +# 0480.3380, 0481.3380, 0482.3380 and 0483.3380 +# 480-483 3380 $(CCUU).3380 +# +# 0700 3270 diff --git a/hercules.h b/hercules.h index 25f5614..b513abf 100644 --- a/hercules.h +++ b/hercules.h @@ -9,6 +9,11 @@ /* and function prototypes. */ /*-------------------------------------------------------------------*/ +#if !defined(EXTERN) + #define EXTERN extern +#endif + + #ifdef HAVE_CONFIG_H #include #endif @@ -31,6 +36,8 @@ #if !defined(_HERCULES_H) + + #include #include #include @@ -38,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -61,6 +69,7 @@ #include #include #include +#include #include #include #include @@ -72,15 +81,34 @@ #include #endif +#include "hdl.h" + +#if defined(BUILTIN_MEMRCHR) +#include "memrchr.h" +#endif + +/* Include supplemental functions used in hercules but missing */ +/* on some ported platforms */ +#include "hscutl.h" + +/* Include LOCALE.H - Otherwise impl.c will not compile when + * CFLAGS does not contain -O[x] (libtinl.h only includes locale.h + * when __OPTIMIZE__ is defined) and impl.c uses LC_xxx macros + */ +#include + #ifndef _POSIX_SYNCHRONIZED_IO /* If fdatasync is not necessarily available, fsync will do fine */ #define fdatasync(fd) fsync(fd) #endif +#include "cache.h" #include "hercnls.h" #include "version.h" #include "hetlib.h" #include "codepage.h" +#include "logger.h" +#include "shared.h" /* definition of CLK_TCK is not part of the SUSE 7.2 definition. Added (VB) */ # ifndef CLK_TCK @@ -114,6 +142,14 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); #define O_BINARY 0 #endif +#define _IMPORT +#if defined(WIN32) +#if defined(HDL_BUILD_SHARED) +#undef _IMPORT +#define _IMPORT __declspec(dllimport) +#endif +#endif + #ifdef WIN32 #define socklen_t int #if !defined(OPTION_FTHREADS) @@ -128,58 +164,52 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); #define HANDLE int #define DWORD int /* will be undefined later */ #endif - -/*-------------------------------------------------------------------*/ -/* Macro for issuing panel commands */ -/*-------------------------------------------------------------------*/ - -#define SYNCHRONOUS_PANEL_CMD(cmdline) \ - panel_command((cmdline)) - -#define ASYNCHRONOUS_PANEL_CMD(cmdline) \ - create_thread(&cmdtid,&sysblk.detattr,panel_command,(cmdline)) +/* +** File name comparisons +** ('strcmp' vs. 'strcasecmp') +** +** On Windows, file names are not case sensitive. While the case +** of the file name may be preserved by the file system (and thus +** show file names in both upper/lower case in directory listings +** for example), the file system itself is NOT case-sensitive. File +** names "Foo", "foo", "fOo", "FoO", etc, all refer to the same file. +** On other platforms however (e.g. *nix), the file system IS case +** sensitive. File names "Foo", "foo", "fOo", "FoO", etc, all refer +** to different files on such systems. Thus we define a 'strfilecmp' +** macro to be used for filename comparisons and define it to be +** strcasecmp on Win32 platforms and strcmp for other platforms. +*/ +#ifdef WIN32 +#define strfilenamecmp(s1,s2) strcasecmp((s1),(s2)) +#else +#define strfilenamecmp(s1,s2) strcmp((s1),(s2)) +#endif /*-------------------------------------------------------------------*/ /* Macro definitions for tracing */ /*-------------------------------------------------------------------*/ -#ifndef FLUSHLOG -#define logmsg(a...) \ - do { \ - fprintf(sysblk.msgpipew, a); \ - } while(0) -#define devmsg(a...) \ - do { \ - fprintf(dev->msgpipew, a); \ - } while(0) -#define cckdmsg(a...) \ - do { \ - fprintf(cckdblk.msgpipew, a); \ - } while(0) -#else -#define logmsg(a...) \ - do { \ - fprintf(sysblk.msgpipew, a); \ - fflush(sysblk.msgpipew); \ - } while(0) -#define devmsg(a...) \ - do { \ - fprintf(dev->msgpipew, a); \ - fflush(dev->msgpipew); \ - } while(0) -#define cckdmsg(a...) \ - do { \ - fprintf(cckdblk.msgpipew, a); \ - fflush(cckdblk.msgpipew); \ - } while(0) -#endif + #define DEVTRACE(format, a...) \ do { \ if(dev->ccwtrace||dev->ccwstep) \ - fprintf(dev->msgpipew, "%4.4X:" format, dev->devnum, a); \ + { \ + logmsg("%4.4X:",dev->devnum); \ + logmsg(format, a); \ + } \ } while(0) /* Debugging */ + +#if defined(OPTION_DYNAMIC_LOAD) + #define HDC(_func, _args...) \ + ((_func) ? (_func) (_args) : (NULL)) +#else + #define HDC(_func, _args...) \ + (NULL) +#endif + + #if defined(DEBUG) || defined(_DEBUG) #define TRACE(a...) logmsg(a) #define ASSERT(a) \ @@ -207,7 +237,6 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); /*-------------------------------------------------------------------*/ /* Macro definitions for thread functions */ /*-------------------------------------------------------------------*/ -#ifndef NOTHREAD #ifdef WIN32 #define HAVE_STRUCT_TIMESPEC #endif @@ -220,8 +249,6 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); #undef DWORD #endif #if defined(OPTION_FTHREADS) -#define NORMAL_THREAD_PRIORITY 0 /* THREAD_PRIORITY_NORMAL */ -#define DEVICE_THREAD_PRIORITY 1 /* THREAD_PRIORITY_ABOVE_NORMAL */ typedef fthread_t TID; typedef fthread_mutex_t LOCK; typedef fthread_cond_t COND; @@ -229,10 +256,10 @@ typedef fthread_attr_t ATTR; #if defined(FISH_HANG) - #define create_thread(ptid,pat,fn,arg) fthread_create(__FILE__,__LINE__,(ptid),(pat),(PFT_THREAD_FUNC)&(fn),(arg),NORMAL_THREAD_PRIORITY) - #define create_device_thread(ptid,pat,fn,arg) fthread_create(__FILE__,__LINE__,(ptid),(pat),(PFT_THREAD_FUNC)&(fn),(arg),DEVICE_THREAD_PRIORITY) + #define create_thread(ptid,pat,fn,arg) fthread_create(__FILE__,__LINE__,(ptid),(pat),(PFT_THREAD_FUNC)&(fn),(arg)) #define initialize_lock(plk) fthread_mutex_init(__FILE__,__LINE__,(plk)) + #define destroy_lock(plk) fthread_mutex_destroy(__FILE__,__LINE__,(plk)) #define obtain_lock(plk) fthread_mutex_lock(__FILE__,__LINE__,(plk)) #define try_obtain_lock(plk) fthread_mutex_trylock(__FILE__,__LINE__,(plk)) #define test_lock(plk) \ @@ -240,6 +267,7 @@ typedef fthread_attr_t ATTR; #define release_lock(plk) fthread_mutex_unlock(__FILE__,__LINE__,(plk)) #define initialize_condition(pcond) fthread_cond_init(__FILE__,__LINE__,(pcond)) + #define destroy_condition(pcond) fthread_cond_destroy(__FILE__,__LINE__,(pcond)) #define signal_condition(pcond) fthread_cond_signal(__FILE__,__LINE__,(pcond)) #define broadcast_condition(pcond) fthread_cond_broadcast(__FILE__,__LINE__,(pcond)) #define wait_condition(pcond,plk) fthread_cond_wait(__FILE__,__LINE__,(pcond),(plk)) @@ -247,10 +275,10 @@ typedef fthread_attr_t ATTR; #else // !defined(FISH_HANG) - #define create_thread(ptid,pat,fn,arg) fthread_create((ptid),(pat),(PFT_THREAD_FUNC)&(fn),(arg),NORMAL_THREAD_PRIORITY) - #define create_device_thread(ptid,pat,fn,arg) fthread_create((ptid),(pat),(PFT_THREAD_FUNC)&(fn),(arg),DEVICE_THREAD_PRIORITY) + #define create_thread(ptid,pat,fn,arg) fthread_create((ptid),(pat),(PFT_THREAD_FUNC)&(fn),(arg)) #define initialize_lock(plk) fthread_mutex_init((plk)) + #define destroy_lock(plk) fthread_mutex_destroy((plk)) #define obtain_lock(plk) fthread_mutex_lock((plk)) #define try_obtain_lock(plk) fthread_mutex_trylock((plk)) #define test_lock(plk) \ @@ -258,6 +286,7 @@ typedef fthread_attr_t ATTR; #define release_lock(plk) fthread_mutex_unlock((plk)) #define initialize_condition(pcond) fthread_cond_init((pcond)) + #define destroy_condition(pcond) fthread_cond_destroy((pcond)) #define signal_condition(pcond) fthread_cond_signal((pcond)) #define broadcast_condition(pcond) fthread_cond_broadcast((pcond)) #define wait_condition(pcond,plk) fthread_cond_wait((pcond),(plk)) @@ -276,6 +305,8 @@ typedef pthread_cond_t COND; typedef pthread_attr_t ATTR; #define initialize_lock(plk) \ pthread_mutex_init((plk),NULL) +#define destroy_lock(plk) \ + pthread_mutex_destroy((plk)) #define obtain_lock(plk) \ pthread_mutex_lock((plk)) #define try_obtain_lock(plk) \ @@ -286,6 +317,8 @@ typedef pthread_attr_t ATTR; (pthread_mutex_trylock((plk)) ? 1 : pthread_mutex_unlock((plk)) ) #define initialize_condition(pcond) \ pthread_cond_init((pcond),NULL) +#define destroy_condition(pcond) \ + pthread_cond_destroy((pcond)) #define signal_condition(pcond) \ pthread_cond_signal((pcond)) #define broadcast_condition(pcond) \ @@ -301,8 +334,6 @@ typedef pthread_attr_t ATTR; typedef void*THREAD_FUNC(void*); #define create_thread(ptid,pat,fn,arg) \ pthread_create(ptid,pat,(THREAD_FUNC*)&(fn),arg) -#define create_device_thread(ptid,pat,fn,arg) \ - pthread_create(ptid,pat,(THREAD_FUNC*)&(fn),arg) #define exit_thread(_code) \ pthread_exit((_code)) #if !defined(WIN32) @@ -314,27 +345,6 @@ typedef void*THREAD_FUNC(void*); #define thread_id() \ pthread_self() #endif // defined(OPTION_FTHREADS) -#else -typedef int TID; -typedef int LOCK; -typedef int COND; -typedef int ATTR; -#define initialize_lock(plk) *(plk)=0 -#define obtain_lock(plk) *(plk)=1 -#define try_obtain_lock(plk) *(plk)=1 -#define release_lock(plk) *(plk)=0 -#define test_lock(plk) (*(plk)!=0) -#define initialize_condition(pcond) *(pcond)=0 -#define signal_condition(pcond) *(pcond)=1 -#define broadcast_condition(pcond) *(pcond)=1 -#define wait_condition(pcond,plk) *(pcond)=1 -#define timed_wait_condition(pcond,plk,timeout) *(pcond)=1 -#define initialize_detach_attr(pat) *(pat)=1 -#define create_thread(ptid,pat,fn,arg) (*(ptid)=0,fn(arg),0) -#define signal_thread(tid,signo) raise(signo) -#define thread_id() 0 -#define exit_thread(exitvar_ptr) (exit(0)) /* (should not ever be used with NOTHREAD!) */ -#endif /* Pattern for displaying the thread_id */ #define TIDPAT "%8.8lX" @@ -355,12 +365,11 @@ typedef void DEVXF (struct _DEVBLK *dev, BYTE code, BYTE flags, BYTE *iobuf, BYTE *more, BYTE *unitstat, U16 *residual); typedef int DEVCF (struct _DEVBLK *dev); typedef void DEVSF (struct _DEVBLK *dev); -typedef int CKDRT (struct _DEVBLK *, int, int, BYTE *); -typedef int CKDUT (struct _DEVBLK *, BYTE *, int, BYTE *); -typedef int CKDUC (struct _DEVBLK *); -typedef int FBARB (struct _DEVBLK *, BYTE *, int, BYTE *); -typedef int FBAWB (struct _DEVBLK *, BYTE *, int, BYTE *); -typedef int FBAUB (struct _DEVBLK *); +typedef int DEVRF (struct _DEVBLK *dev, int ix, BYTE *unitstat); +typedef int DEVWF (struct _DEVBLK *dev, int rcd, int off, BYTE *buf, int len, + BYTE *unitstat); +typedef int DEVUF (struct _DEVBLK *dev); +typedef void DEVRR (struct _DEVBLK *dev); /*-------------------------------------------------------------------*/ /* Structure definition for the Vector Facility */ @@ -382,6 +391,8 @@ typedef void (*SIEFN) (); /* Structure definition for CPU register context */ /*-------------------------------------------------------------------*/ typedef struct _REGS { /* Processor registers */ +#define HDL_VERS_REGS "2.17" /* Internal Version Number */ +#define HDL_SIZE_REGS sizeof(REGS) int arch_mode; /* Architectural mode */ U64 ptimer; /* CPU timer */ U64 clkc; /* 0-7=Clock comparator epoch, @@ -394,9 +405,9 @@ typedef struct _REGS { /* Processor registers */ U32 siosrate; /* IOs per second */ double cpupct; /* Percent CPU busy */ U64 waittod; /* Time of day last wait (us)*/ - U64 waittime; /* Wait time (us) in interval*/ + U64 waittime; /* Wait time (us) in interval*/ #ifdef WIN32 - struct timeval lasttod; /* Last gettimeofday */ + struct timeval lasttod; /* Last gettimeofday */ #endif TLBE tlb[256]; /* Translation lookaside buf */ TID cputid; /* CPU thread identifier */ @@ -406,33 +417,16 @@ typedef struct _REGS { /* Processor registers */ DW mc; /* Monitor Code */ DW ea; /* Exception address */ DW et; /* Execute Target address */ -#if defined(OPTION_AIA_BUFFER) DW ai; /* Absolute instruction addr */ DW vi; /* Virtual instruction addr */ -#endif /*defined(OPTION_AIA_BUFFER)*/ -#if defined(OPTION_AEA_BUFFER) -#if !defined(OPTION_FAST_LOGICAL) - DW ae[16]; /* Absolute effective addr */ - DW ve[16]; /* Virtual effective addr */ - BYTE aekey[16]; /* Storage Key */ - int aeacc[16]; /* Access type */ -#else -#if defined(OPTION_REDUCED_INVAL) DW ae[256]; /* Absolute effective addr */ DW ve[256]; /* Virtual effective addr */ BYTE aekey[256]; /* Storage Key */ int aeacc[256]; /* Access type */ - int aearn[256]; /* Address room */ -#else - DW ae[16]; /* Absolute effective addr */ - DW ve[16]; /* Virtual effective addr */ - BYTE aekey[16]; /* Storage Key */ - int aeacc[16]; /* Access type */ - int aearn[16]; /* Address room */ -#endif - int aenoarn; /* no access mode */ -#endif -#endif /*defined(OPTION_AEA_BUFFER)*/ + int aearn[256]; /* Access register used */ + int aenoarn; /* 1=Not in AR mode */ + int aearvalid; /* 1=Address(es) in AR mode */ + U32 aeID; /* Validation identifier */ #define GR_G(_r) gr[(_r)].D #define GR_H(_r) gr[(_r)].F.H.F /* Fullword bits 0-31 */ #define GR_HHH(_r) gr[(_r)].F.H.H.H.H /* Halfword bits 0-15 */ @@ -461,18 +455,14 @@ typedef struct _REGS { /* Processor registers */ #define ET_L et.F.L.F #define PX_G px.D #define PX_L px.F.L.F -#if defined(OPTION_AIA_BUFFER) #define AI_G ai.D #define AI_L ai.F.L.F #define VI_G vi.D #define VI_L vi.F.L.F -#endif /*defined(OPTION_AIA_BUFFER)*/ -#if defined(OPTION_AEA_BUFFER) #define AE_G(_r) ae[(_r)].D #define AE_L(_r) ae[(_r)].F.L.F #define VE_G(_r) ve[(_r)].D #define VE_L(_r) ve[(_r)].F.L.F -#endif /*defined(OPTION_AEA_BUFFER)*/ U32 ar[16]; /* Access registers */ #define AR(_r) ar[(_r)] U32 fpr[32]; /* Floating point registers */ @@ -528,27 +518,19 @@ typedef struct _REGS { /* Processor registers */ cpuonline:1, /* 1=CPU is online */ loadstate:1, /* 1=CPU is in load state */ checkstop:1, /* 1=CPU is checkstop-ed */ -#ifndef INTERRUPTS_FAST_CHECK - cpuint:1, /* 1=There is an interrupt - pending for this CPU */ - itimer_pending:1, /* 1=Interrupt is pending for - the interval timer */ - restart:1, /* 1=Restart interrpt pending*/ - extcall:1, /* 1=Extcall interrpt pending*/ - emersig:1, /* 1=Emersig interrpt pending*/ - ptpend:1, /* 1=CPU timer int pending */ - ckpend:1, /* 1=Clock comp int pending */ - storstat:1, /* 1=Stop and store status */ -#endif /*INTERRUPTS_FAST_CHECK*/ + mainlock:1, /* 1=Mainlock held */ + ghostregs:1, /* 1=Ghost registers (panel) */ hostint:1, /* Host generated interrupt */ - instfe:1, /* Instruction fetch active */ sigpreset:1, /* 1=SIGP cpu reset received */ sigpireset:1, /* 1=SIGP initial cpu reset */ + vtimerint:1, /* 1=Virtual Timer interrupt */ + /* (ECPS:VM) */ + rtimerint:1, /* 1=Concurrent Virt & Real */ + /* Interval Timer interrupts */ + /* (ECPS:VM Only) */ instvalid:1; /* 1=Inst field is valid */ -#ifdef INTERRUPTS_FAST_CHECK U32 ints_state; /* CPU Interrupts Status */ U32 ints_mask; /* Respective Interrupts Mask*/ -#endif /*INTERRUPTS_FAST_CHECK*/ BYTE malfcpu /* Malfuction alert flags */ [MAX_CPU_ENGINES]; /* for each CPU (1=pending) */ BYTE emercpu /* Emergency signal flags */ @@ -558,20 +540,6 @@ typedef struct _REGS { /* Processor registers */ BYTE *ip; /* Pointer to Last-fetched instruction (inst might not be uptodate */ -// #if MAX_CPU_ENGINES > 1 - unsigned int /* Flags */ - mainlock:1, /* MAINLOCK held indicator */ - mainsync:1, /* MAINLOCK sync wait */ - ghostregs:1; /* Ghost registers (panel) */ -// #ifdef SMP_SERIALIZATION - /* Locking and unlocking the serialisation lock causes - the processor cache to be flushed this is used to - mimic the S/390 serialisation operation. To avoid - contention, each S/390 CPU has its own lock */ - LOCK serlock; /* Serialization lock */ -// #endif /*SMP_SERIALIZATION*/ -// #endif /*MAX_CPU_ENGINES > 1*/ - #if defined(_FEATURE_VECTOR_FACILITY) VFREGS *vf; /* Vector Facility */ #endif /*defined(_FEATURE_VECTOR_FACILITY)*/ @@ -581,9 +549,7 @@ typedef struct _REGS { /* Processor registers */ jmp_buf archjmp; /* longjmp destination to switch architecture mode */ -#if MAX_CPU_ENGINES > 1 && defined(OPTION_FAST_INTCOND) COND intcond; /* CPU interrupt condition */ -#endif /* MAX_CPU_ENGINES > 1 && defined(OPTION_FAST_INTCOND) */ U32 cpumask; /* CPU mask */ } REGS; @@ -597,10 +563,9 @@ typedef struct _REGS { /* Processor registers */ #define ALL_CPUS 0xffffffff /* Macros to signal interrupt condition to a CPU[s] */ -#if MAX_CPU_ENGINES > 1 && defined(OPTION_FAST_INTCOND) #define WAKEUP_CPU(cpu) signal_condition(&sysblk.regs[(cpu)].intcond) #define WAKEUP_WAITING_CPU(mask,statemask) \ - { int i; \ + do { int i; \ for (i = 0; i < MAX_CPU_ENGINES; i++) \ if ((sysblk.regs[i].cpustate & (statemask)) \ && (sysblk.regs[i].cpumask & (mask)) \ @@ -609,62 +574,43 @@ typedef struct _REGS { /* Processor registers */ signal_condition(&sysblk.regs[i].intcond); \ break; \ } \ - } + } while(0) #define WAKEUP_WAITING_CPUS(mask,statemask) \ - { int i; \ + do { int i; \ for (i = 0; i < MAX_CPU_ENGINES; i++) \ if ((sysblk.regs[i].cpustate & (statemask)) \ && (sysblk.regs[i].cpumask & (mask)) \ && (sysblk.regs[i].cpumask & sysblk.waitmask)) \ signal_condition(&sysblk.regs[i].intcond); \ - } -#define INTCOND regs->intcond -#else /* MAX_CPU_ENGINES > 1 && defined(OPTION_FAST_INTCOND) */ -#define WAKEUP_CPU(cpu) broadcast_condition(&sysblk.intcond) -#define WAKEUP_WAITING_CPU(m,s) WAKEUP_CPU(0) -#define WAKEUP_WAITING_CPUS(m,s) WAKEUP_CPU(0) -#define INTCOND sysblk.intcond -#endif /* MAX_CPU_ENGINES > 1 && defined(OPTION_FAST_INTCOND) */ + } while (0) /* Macros to queue/dequeue a device on the I/O interrupt queue */ -#define QUEUE_IO_INTERRUPT(dev) \ - { \ - if (sysblk.iointq == NULL) \ - { \ - sysblk.iointq = (dev); \ - (dev)->iointq = NULL; \ +#define QUEUE_IO_INTERRUPT(_io) \ + do { \ + IOINT *prev; \ + for (prev = (IOINT *)&sysblk.iointq; prev->next != NULL; prev = prev->next) \ + if (prev->next == (_io) || prev->next->priority > (_io)->dev->priority) \ + break; \ + if (prev->next != (_io)) { \ + (_io)->next = prev->next; \ + prev->next = (_io); \ + (_io)->priority = (_io)->dev->priority; \ } \ - else if (sysblk.iointq != (dev)) \ - { \ - if (sysblk.iointq->priority > (dev)->priority) \ - { \ - (dev)->iointq = sysblk.iointq; \ - sysblk.iointq = (dev); \ + ON_IC_IOPENDING; \ + WAKEUP_WAITING_CPU (ALL_CPUS, CPUSTATE_STARTED); \ + } while (0) + +#define DEQUEUE_IO_INTERRUPT(_io) \ + do { \ + IOINT *prev; \ + for (prev = (IOINT *)&sysblk.iointq; prev->next != NULL; prev = prev->next) \ + if (prev->next == (_io)) { \ + prev->next = (_io)->next; \ + break; \ } \ - else \ - { \ - DEVBLK *prev; \ - for (prev = sysblk.iointq; prev->iointq != NULL; prev = prev->iointq) \ - if (prev->iointq == (dev) \ - || prev->iointq->priority > dev->priority) break; \ - if (prev->iointq != (dev)) \ - { \ - (dev)->iointq = prev->iointq; \ - prev->iointq = (dev); \ - } \ - } \ - } \ - } -#define DEQUEUE_IO_INTERRUPT(dev) \ - { \ - if ((dev) == sysblk.iointq) \ - sysblk.iointq = (dev)->iointq; \ - else { \ - DEVBLK *prev; \ - for (prev = sysblk.iointq; prev && prev->iointq != (dev); prev = prev->iointq); \ - if (prev) prev->iointq = (dev)->iointq; \ - } \ - } + if (sysblk.iointq == NULL) \ + OFF_IC_IOPENDING; \ + } while (0) // #if defined(FEATURE_REGION_RELOCATE) /*-------------------------------------------------------------------*/ @@ -686,6 +632,8 @@ typedef struct _ZPBLK { /* System configuration block */ /*-------------------------------------------------------------------*/ typedef struct _SYSBLK { +#define HDL_VERS_SYSBLK "2.17" /* Internal Version Number */ +#define HDL_SIZE_SYSBLK sizeof(SYSBLK) int arch_mode; /* Architecturual mode */ /* 0 == S/370 */ /* 1 == ESA/390 */ @@ -731,26 +679,29 @@ typedef struct _SYSBLK { U32 footprptr[MAX_CPU_ENGINES]; #endif LOCK mainlock; /* Main storage lock */ -#if MAX_CPU_ENGINES == 1 || !defined(OPTION_FAST_INTCOND) - COND intcond; /* Interrupt condition */ -#endif /* MAX_CPU_ENGINES == 1 || !defined(OPTION_FAST_INTCOND) */ LOCK intlock; /* Interrupt lock */ LOCK sigplock; /* Signal processor lock */ ATTR detattr; /* Detached thread attribute */ TID cnsltid; /* Thread-id for console */ - U16 cnslport; /* Port number for console */ - int cnslcnt; /* Number of 3270 devices */ + TID socktid; /* Thread-id for sockdev */ RADR mbo; /* Measurement block origin */ BYTE mbk; /* Measurement block key */ int mbm; /* Measurement block mode */ int mbd; /* Device connect time mode */ + int diag8cmd; /* Allow diagnose 8 commands */ int toddrag; /* TOD clock drag factor */ int panrate; /* Panel refresh rate */ int npquiet; /* New Panel quiet indicator */ struct _DEVBLK *firstdev; /* -> First device block */ +#if defined(OPTION_FAST_DEVLOOKUP) + struct _DEVBLK ***devnum_fl; /* 1st level table for fast */ + /* devnum lookup */ + struct _DEVBLK ***subchan_fl; /* Subchannel table fast */ + /* lookup table */ +#endif /* FAST_DEVICE_LOOKUP */ U16 highsubchan; /* Highest subchannel + 1 */ U32 chp_reset[8]; /* Channel path reset masks */ - struct _DEVBLK *iointq; /* I/O interrupt queue */ + struct _IOINT *iointq; /* I/O interrupt queue */ #if !defined(OPTION_FISHIO) struct _DEVBLK *ioq; /* I/O queue */ LOCK ioqlock; /* I/O queue lock */ @@ -763,31 +714,16 @@ typedef struct _SYSBLK { #endif // !defined(OPTION_FISHIO) RADR addrlimval; /* Address limit value (SAL) */ U32 servparm; /* Service signal parameter */ - U32 cp_recv_mask; /* Syscons CP receive mask */ - U32 cp_send_mask; /* Syscons CP send mask */ - U32 sclp_recv_mask; /* Syscons SCLP receive mask */ - U32 sclp_send_mask; /* Syscons SCLP send mask */ - BYTE scpcmdstr[123+1]; /* Operator command string */ - int scpcmdtype; /* Operator command type */ unsigned int /* Flags */ -#ifndef INTERRUPTS_FAST_CHECK - iopending:1, /* 1=I/O interrupt pending */ - mckpending:1, /* 1=MCK interrupt pending */ - extpending:1, /* 1=EXT interrupt pending */ - intkey:1, /* 1=Interrupt key pending */ - servsig:1, /* 1=Service signal pending */ - crwpending:1, /* 1=Channel report pending */ -#endif /*INTERRUPTS_FAST_CHECK*/ sigintreq:1, /* 1=SIGINT request pending */ insttrace:1, /* 1=Instruction trace */ inststep:1, /* 1=Instruction step */ instbreak:1, /* 1=Have breakpoint */ inststop:1, /* 1 = stop on program check */ /*VMA*/ vmactive:1, /* 1 = vma active */ /*VMA*/ - mschdelay:1; /* 1 = delay MSCH instruction*/ /*LNX*/ -#ifdef INTERRUPTS_FAST_CHECK + mschdelay:1, /* 1 = delay MSCH instruction*/ /*LNX*/ + shutdown:1; /* 1 = shutdown requested */ U32 ints_state; /* Common Interrupts Status */ -#endif /*INTERRUPTS_FAST_CHECK*/ U32 waitmask; /* Mask for waiting CPUs */ U32 started_mask; /* Mask for started CPUs */ int broadcast_code; /* Broadcast code */ @@ -795,17 +731,38 @@ typedef struct _SYSBLK { #define BROADCAST_PALB 2 /* Broadcast purge alb */ #define BROADCAST_ITLB 4 /* Broadcast invalidate tlb */ U64 broadcast_pfra; /* Broadcast pfra */ -#if MAX_CPU_ENGINES > 1 - U32 broadcast_mask; /* Broadcast CPU mask */ + int broadcast_count; /* Broadcast CPU count */ COND broadcast_cond; /* Broadcast condition */ -#endif /* MAX_CPU_ENGINES > 1 */ U64 breakaddr; /* Breakpoint address */ - FILE *msgpipew; /* Message pipe write handle */ - int msgpiper; /* Message pipe read handle */ +#ifdef FEATURE_ECPSVM +// + /* ECPS:VM */ + struct { + U16 available:1, + debug:1; + U16 level; + } ecpsvm; /* ECPS:VM structure */ +// +#endif + U64 pgminttr; /* Program int trace mask */ int pcpu; /* Tgt CPU panel cmd & displ */ +#ifndef WIN32 + #define DEFAULT_HERCPRIO 0 + #define DEFAULT_TOD_PRIO -20 + #define DEFAULT_CPU_PRIO 15 + #define DEFAULT_DEV_PRIO 8 +#else + #define DEFAULT_HERCPRIO 0 + #define DEFAULT_TOD_PRIO 0 + #define DEFAULT_CPU_PRIO 0 + #define DEFAULT_DEV_PRIO -8 +#endif + int hercprio; /* Hercules process priority */ + int todprio; /* TOD Clock thread priority */ int cpuprio; /* CPU thread priority */ + int devprio; /* Device thread priority */ int pgmprdos; /* Program product OS flag */ // #if defined(OPTION_HTTP_SERVER) TID httptid; /* HTTP listener thread id */ @@ -815,9 +772,16 @@ typedef struct _SYSBLK { char *httppass; /* HTTP password */ char *httproot; /* HTTP root */ // #endif /*defined(OPTION_HTTP_SERVER)*/ - CPCONV *codepage; - int ifcfd[2]; - int ifcpid; +#if defined(OPTION_SHARED_DEVICES) + TID shrdtid; /* Shared device listener */ + U16 shrdport; /* Shared device server port */ + U32 shrdrate; /* IOs per second */ + U32 shrdcount; /* IO count */ + SHRD_TRACE *shrdtrace; /* Internal trace table */ + SHRD_TRACE *shrdtracep; /* Current pointer */ + SHRD_TRACE *shrdtracex; /* End of trace table */ + int shrdtracen; /* Number of entries */ +#endif #ifdef OPTION_IODELAY_KLUDGE int iodelay; /* I/O delay kludge for linux*/ #endif /*OPTION_IODELAY_KLUDGE*/ @@ -863,11 +827,19 @@ typedef struct _SYSBLK { + sizeof(sysblk.imapxx) ) #endif +#if defined(OPTION_MIPS_COUNTING) + /* Merged Counters for all CPUs */ + U64 instcount; /* Instruction counter */ + U32 mipsrate; /* Instructions/millisecond */ + U32 siosrate; /* IOs per second */ +#endif /*defined(OPTION_MIPS_COUNTING)*/ + } SYSBLK; /* Definitions for OS tailoring - msb eq mon event, lsb eq oper exc. */ #define OS_NONE 0x7FFFFFFFF7DE7FFFULL /* No spec OS tail. */ #define OS_OS390 0x7FF673FFF7DE7FFFULL /* OS/390 */ +/* 0x7B7... to suppress ASCE-type and RGN-third */ #define OS_VSE 0x7FF673FFF7DE7FFFULL /* VSE */ #define OS_VM 0x7FFFFFFFF7DE7FFCULL /* VM */ #if !defined(NO_IEEE_SUPPORT) @@ -946,21 +918,35 @@ typedef struct _bind_struct } bind_struct; +/*-------------------------------------------------------------------*/ +/* I/O interrupt queue entry */ +/*-------------------------------------------------------------------*/ + +typedef struct _IOINT { + struct _IOINT *next; /* -> next interrupt entry */ + struct _DEVBLK *dev; /* -> Device block */ + int priority; /* Device priority */ + int pending:1, /* 1=Normal interrupt */ + pcipending:1, /* 1=PCI interrupt */ + attnpending:1; /* 1=ATTN interrupt */ + } IOINT; + struct _DEVDATA; /* Forward reference */ /*-------------------------------------------------------------------*/ /* Device configuration block */ /*-------------------------------------------------------------------*/ typedef struct _DEVBLK { +#define HDL_VERS_DEVBLK "2.17" /* Internal Version Number */ +#define HDL_SIZE_DEVBLK sizeof(DEVBLK) struct _DEVBLK *nextdev; /* -> next device block */ LOCK lock; /* Device block lock */ - FILE *msgpipew; /* Message pipe write handle */ /* device identification */ U16 subchan; /* Subchannel number */ U16 devnum; /* Device number */ U16 devtype; /* Device type */ - U16 chanset; /* Channel Set to which this + U16 chanset; /* Channel Set to which this device is connected S/370 */ char *typname; /* Device type name */ @@ -985,22 +971,43 @@ typedef struct _DEVBLK { device, NULL otherwise */ /* device buffer management fields */ + + int bufcur; /* Buffer data identifier */ BYTE *buf; /* -> Device data buffer */ - U32 bufsize; /* Device data buffer size */ + int bufsize; /* Device data buffer size */ + int buflen; /* Device buffer length used */ int bufoff; /* Offset into data buffer */ int bufoffhi; /* Highest offset allowed */ int bufupdlo; /* Lowest offset updated */ int bufupdhi; /* Highest offset updated */ U32 bufupd; /* 1=Buffer updated */ + /* device cache management fields */ + + int cache; /* Current cache index */ + int cachehits; /* Cache hits */ + int cachemisses; /* Cache misses */ + int cachewaits; /* Cache waits */ + + /* device compression support */ + + int comps; /* Acceptable compressions */ + int comp; /* Compression used */ + int compoff; /* Offset to compressed data */ + /* device i/o scheduling fields... */ TID tid; /* Thread-id executing CCW */ int priority; /* I/O q scehduling priority */ struct _DEVBLK *nextioq; /* -> next device in I/O q */ - struct _DEVBLK *iointq; /* -> next device in I/O - interrupt queue */ + IOINT ioint; /* Normal i/o interrupt + queue entry */ + IOINT pciioint; /* PCI i/o interrupt + queue entry */ + IOINT attnioint; /* ATTN i/o interrupt + queue entry */ int cpuprio; /* CPU thread priority */ + int devprio; /* Device thread priority */ /* fields used during ccw execution... */ BYTE chained; /* Command chain and data chain @@ -1014,6 +1021,15 @@ typedef struct _DEVBLK { /* device handler function pointers... */ struct _DEVHND *hnd; /* -> Device handlers */ + /* Supplemental handler functions - Set by init handler @ISW */ + /* Function invoked during HDV/HIO & HSCH instructions @ISW */ + /* processing occurs in channel.c in haltio et al. @ISW */ + /* when the device is busy, but the channel subsystem @ISW */ + /* does not know how to perform the halt itself but has @ISW */ + /* to rely on the handler to perform the halt @ISW */ + + void ( *halt_device)(struct _DEVBLK *); /* @ISW */ + /* emulated architecture fields... (MUST be aligned!) */ @@ -1022,8 +1038,10 @@ typedef struct _DEVBLK { PMCW pmcw; /* Path management ctl word */ SCSW scsw; /* Subchannel status word(XA)*/ SCSW pciscsw; /* PCI subchannel status word*/ + SCSW attnscsw; /* ATTNsubchannel status word*/ BYTE csw[8]; /* Channel status word(S/370)*/ BYTE pcicsw[8]; /* PCI channel status word */ + BYTE attncsw[8]; /* ATTN channel status word */ ESW esw; /* Extended status word */ BYTE ecw[32]; /* Extended control word */ U32 numsense; /* Number of sense bytes */ @@ -1032,9 +1050,15 @@ typedef struct _DEVBLK { BYTE devid[256]; /* Device identifier bytes */ U32 numdevchar; /* Number of devchar bytes */ BYTE devchar[64]; /* Device characteristics */ + BYTE pgstat; /* Path Group Status */ BYTE pgid[11]; /* Path Group ID */ - BYTE reserved2[5]; /* (pad/align/unused/avail) */ + BYTE reserved2[4]; /* (pad/align/unused/avail) */ COND resumecond; /* Resume condition */ + COND iocond; /* I/O active condition */ + int iowaiters; /* Number of I/O waiters */ + int ioactive; /* System Id active on device*/ +#define DEV_SYS_NONE 0 /* No active system on device*/ +#define DEV_SYS_LOCAL 0xffff /* Local system active on dev*/ #ifdef WIN32 struct timeval lasttod; /* Last gettimeofday */ #endif @@ -1046,21 +1070,32 @@ typedef struct _DEVBLK { ckdkeytrace:1, /* 1=Log CKD_KEY_TRACE */ #endif /*OPTION_CKD_KEY_TRACING*/ syncio:1, /* 1=Synchronous I/Os allowed*/ + shared:1, /* 1=Device is shareable */ console:1, /* 1=Console device */ connected:1, /* 1=Console client connected*/ readpending:2, /* 1=Console read pending */ + connecting:1, /* 1=Connecting to remote */ + localhost:1, /* 1=Remote is local */ batch:1, /* 1=Called by dasdutil */ dasdcopy:1, /* 1=Called by dasdcopy */ ccwtrace:1, /* 1=CCW trace */ ccwstep:1, /* 1=CCW single step */ cdwmerge:1; /* 1=Channel will merge data chained write CCWs */ - U32 pending; /* 1=Interrupt pending */ - U32 busy; /* 1=Device busy */ - U32 pcipending; /* 1=PCI interrupt pending */ - U32 crwpending; /* 1=CRW pending */ - U32 syncio_active; /* 1=Synchronous I/O active */ - U32 syncio_retry; /* 1=Retry I/O asynchronously*/ + + int /* Device state - serialized + by dev->lock */ + busy:1, /* 1=Device is busy */ + reserved:1, /* 1=Device is reserved */ + suspended:1, /* 1=Channel pgm suspended */ + pending:1, /* 1=I/O interrupt pending */ + pcipending:1, /* 1=PCI interrupt pending */ + attnpending:1, /* 1=ATTN interrupt pending */ + startpending:1; /* 1=startio pending */ + + int crwpending; /* 1=CRW pending */ + int syncio_active; /* 1=Synchronous I/O active */ + int syncio_retry; /* 1=Retry I/O asynchronously*/ /* Synchronous I/O */ @@ -1071,6 +1106,28 @@ typedef struct _DEVBLK { /* Device dependent data (generic) */ void *dev_data; + /* Fields for remote devices */ + + struct in_addr rmtaddr; /* Remote address */ + U16 rmtport; /* Remote port number */ + U16 rmtnum; /* Remote device number */ + int rmtid; /* Remote Id */ + int rmtrel; /* Remote release level */ + DWORD rmthdr; /* Remote header */ + int rmtcomp; /* Remote compression parm */ + int rmtcomps; /* Supported compressions */ + int rmtpurgen; /* Remote purge count */ + FWORD *rmtpurge; /* Remote purge list */ + +#ifdef OPTION_SHARED_DEVICES + /* Fields for device sharing */ + TID shrdtid; /* Device thread id */ + int shrdid; /* Id for next client */ + int shrdconn; /* Number connected clients */ + int shrdwait; /* Signal indicator */ + struct _SHRD *shrd[SHARED_MAX_SYS]; /* ->SHRD block */ +#endif + /* Device dependent fields for console */ struct in_addr ipaddr; /* Client IP address */ @@ -1142,32 +1199,74 @@ typedef struct _DEVBLK { U16 curbufoff; /* Offset into buffer of data for next data chained CCW */ HETB *hetb; /* HET control block */ + struct /* HET device parms */ { U16 compress:1; /* 1=Compression enabled */ U16 method:3; /* Compression method */ U16 level:4; /* Compression level */ + U16 strictsize:1; /* Strictly enforce MAXSIZE */ + U16 displayfeat:1; /* Device has a display */ + /* feature installed */ + U16 deonirq:1; /* DE on IRQ on tape motion */ + /* MVS 3.8j workaround */ + U16 logical_readonly; /* Tape is forced READ ONLY */ U16 chksize; /* Chunk size */ + size_t maxsize; /* Maximum allowed TAPE file + size */ + size_t eotmargin; /* Amount of space left + before reporting EOT */ } tdparms; /* HET device parms */ U32 /* Flags */ readonly:1, /* 1=Tape is write-protected */ - longfmt:1; /* 1=Long record format (DDR)*/ /*DDR*/ + longfmt:1, /* 1=Long record format (DDR)*/ /*DDR*/ + sns_pending:1; /* Contingency Allegiance */ + /* - means : don't build a */ + /* sense on X'04' : it's */ + /* aleady there */ + /* NOTE : flag cleared by */ + /* sense command only */ + /* or a device init */ BYTE tapedevt; /* Tape device type */ + struct _TAPEMEDIA_HANDLER *tmh; /* Tape Media Handling */ + /* dispatcher */ + /* Autoloader feature */ + struct _TAPEAUTOLOADENTRY *als; /* Autoloader stack */ + int alss; /* Autoloader stack size */ + int alsix; /* Current Autoloader index */ + char **al_argv; /* ARGV in autoloader */ + int al_argc; /* ARGC in autoloader */ + /* end autoloader feature */ + /* 3480/3490/3590 Message display */ + BYTE tapemsg1[9]; /* 1st 3480 Message */ + BYTE tapemsg2[9]; /* 2nd 3480 Message */ + BYTE tapedisptype; /* Type of message display */ +#define TAPEDISPLAY_IDLE 0 /* Display SYSTEM message */ +#define TAPEDISPLAY_MOUNT 1 /* A Mount Message is on */ +#define TAPEDISPLAY_UNMOUNT 2 /* An Unmount display is on */ +#define TAPEDISPLAY_UMOUNTMOUNT 3 /* A Unmount then mount msg */ +#define TAPEDISPLAY_WAITACT 4 /* Display until motion */ + BYTE tapedispflags; /* How the msg is displayed */ +#define TAPEDISPFLG_ALTERNATE 0x80 /* Alternate msgs 1 & 2 */ +#define TAPEDISPFLG_BLINKING 0x40 /* Selected msg blinks */ +#define TAPEDISPFLG_MSG2 0x20 /* Display msg 2 instead of 1*/ +#define TAPEDISPFLG_AUTOLOAD 0x10 /* Autoloader index req */ +#define TAPEDISPFLG_REQMOUNT 0x08 /* Pass through Mount Req Rtn*/ + + /* Device dependent fields for Comm Line */ + struct _COMMADPT *commadpt; /* Single structure pointer */ /* Device dependent fields for dasd (fba and ckd) */ - int dasdcur; /* Current ckd trk or fba blk*/ BYTE dasdsfn[256]; /* Shadow file name */ /* Device dependent fields for fbadasd */ - FBARB *fbardblk; /* -> Read block routine */ - FBAWB *fbawrblk; /* -> Write block routine */ - FBAUB *fbaused; /* -> Used blocks routine */ FBADEV *fbatab; /* Device table entry */ int fbaorigin; /* Device origin block number*/ int fbanumblk; /* Number of blocks in device*/ off_t fbarba; /* Relative byte offset */ + off_t fbaend; /* Last RBA in file */ int fbaxblkn; /* Offset from start of device to first block of extent */ int fbaxfirst; /* Block number within dataset @@ -1185,13 +1284,6 @@ typedef struct _DEVBLK { /* Device dependent fields for ckddasd */ -#ifdef CKDTRACE - BYTE *ckdtrace; /* Trace table */ - int ckdtracex; /* Trace table index */ -#endif - CKDRT *ckdrdtrk; /* -> Read track routine */ - CKDUT *ckdupdtrk; /* -> Update track routine */ - CKDUC *ckdused; /* -> Used cyls routine */ int ckdnumfd; /* Number of CKD image files */ int ckdfd[CKD_MAXFILES]; /* CKD image file descriptors*/ int ckdhitrk[CKD_MAXFILES]; /* Highest track number @@ -1226,11 +1318,7 @@ typedef struct _DEVBLK { BYTE ckdloper; /* Locate record operation */ BYTE ckdlaux; /* Locate record aux byte */ BYTE ckdlcount; /* Locate record count */ - struct _CKDDASD_CACHE *ckdcache;/* Cache table */ - int ckdcachenbr; /* Cache table size */ - int ckdcachehits; /* Cache hits */ - int ckdcachemisses; /* Cache misses */ - U64 ckdcacheage; /* Cache aging counter */ + BYTE ckdreserved1; /* Alignment */ void *cckd_ext; /* -> Compressed ckddasd extension otherwise NULL */ U32 /* Flags */ @@ -1252,6 +1340,8 @@ typedef struct _DEVBLK { ckdssi:1, /* 1=Set Special Intercept */ ckdnolazywr:1, /* 1=Perform updates now */ ckdrdonly:1, /* 1=Open read only */ + ckdwrha:1, /* 1=Write Home Address */ + /* Line above ISW20030819-1 */ ckdfakewr:1; /* 1=Fake successful write for read only file */ } DEVBLK; @@ -1304,18 +1394,9 @@ typedef struct _CKDDASD_RECHDR { /* Record header */ HWORD dlen; /* Data length */ } CKDDASD_RECHDR; -typedef struct _CKDDASD_CACHE { /* Cache entry */ - int trk; /* Track number */ - BYTE *buf; /* Buffer address */ - int fd; /* Track fd */ - U64 age; /* Entry age */ - U64 off; /* Entry offset */ - } CKDDASD_CACHE; - #define CKDDASD_DEVHDR_SIZE ((ssize_t)sizeof(CKDDASD_DEVHDR)) #define CKDDASD_TRKHDR_SIZE ((ssize_t)sizeof(CKDDASD_TRKHDR)) #define CKDDASD_RECHDR_SIZE ((ssize_t)sizeof(CKDDASD_RECHDR)) -#define CKDDASD_CACHE_SIZE ((ssize_t)sizeof(CKDDASD_CACHE)) /*-------------------------------------------------------------------*/ /* Structure definitions for Compressed CKD devices */ @@ -1360,20 +1441,9 @@ typedef struct _CCKDDASD_DEVHDR { /* Compress device header */ #define CCKD_FREEHDR_SIZE 28 #define CCKD_FREEHDR_POS CKDDASD_DEVHDR_SIZE+12 -#define CCKD_COMPRESS_NONE 0 -#ifndef HAVE_LIBZ -#define CCKD_COMPRESS_MAX CCKD_COMPRESS_NONE -#else -#define CCKD_COMPRESS_ZLIB 1 -#ifndef CCKD_BZIP2 -#define CCKD_COMPRESS_MAX CCKD_COMPRESS_ZLIB -#else -#define CCKD_COMPRESS_BZIP2 2 -#define CCKD_COMPRESS_MAX CCKD_COMPRESS_BZIP2 -#endif // CCKD_BZIP2 defined -#endif // HAVE_ZLIB defined -#define CCKD_COMPRESS_MAX_POSSIBLE 3 - +#define CCKD_COMPRESS_NONE 0x00 +#define CCKD_COMPRESS_ZLIB 0x01 +#define CCKD_COMPRESS_BZIP2 0x02 #define CCKD_COMPRESS_MASK 0x03 #define CCKD_STRESS_MINLEN 4096 @@ -1410,25 +1480,7 @@ typedef struct _CCKD_RA { /* Readahead queue entry */ int next; /* Index to next entry */ } CCKD_RA; -typedef struct _CCKD_CACHE { /* Cache structure */ - DEVBLK *dev; /* Cached device block ptr */ - int trk; /* Cached track number */ - int sfx; /* Cached l2tab file index */ - int l1x; /* Cached l2tab index */ - BYTE *buf; /* Cached buffer address */ - U64 age; /* Cache entry age */ - U32 flags; /* Cache flags */ - } CCKD_CACHE; -#define CCKD_CACHE_ACTIVE 0x80000000 /* Cache entry is active */ -#define CCKD_CACHE_UPDATED 0x40000000 /* Cache buf has been updated*/ -#define CCKD_CACHE_READING 0x20000000 /* Cache buf being read */ -#define CCKD_CACHE_WRITING 0x10000000 /* Cache buf being written */ -#define CCKD_CACHE_WRITE 0x08000000 /* Cache buf pending write */ -#define CCKD_CACHE_READWAIT 0x04000000 /* Thread waiting for read */ -#define CCKD_CACHE_WRITEWAIT 0x02000000 /* Thread waiting for write */ -#define CCKD_CACHE_INVALID 0x01000000 /* Cache entry invalid */ -#define CCKD_CACHE_USED 0x00800000 /* Cache entry was used */ -#define CCKD_CACHE_BUSY 0xff000000 /* Cache entry is busy */ +typedef char CCKD_TRACE[128]; /* Trace entry */ #define CCKDDASD_DEVHDR_SIZE ((ssize_t)sizeof(CCKDDASD_DEVHDR)) #define CCKD_L1ENT_SIZE ((ssize_t)sizeof(CCKD_L1ENT)) @@ -1453,8 +1505,6 @@ typedef struct _CCKD_CACHE { /* Cache structure */ #define CCKD_MAX_RA 9 /* Max readahead threads */ #define CCKD_MAX_WRITER 9 /* Max writer threads */ #define CCKD_MAX_GCOL 1 /* Max garbage collectors */ -#define CCKD_MAX_CACHE 1024 /* Max number cache entries */ -#define CCKD_MAX_L2CACHE 1024 /* Max nbr l2 cache entries */ #define CCKD_MAX_TRACE 200000 /* Max nbr trace entries */ #define CCKD_MAX_FREEPEND 4 /* Max free pending cycles */ @@ -1462,8 +1512,6 @@ typedef struct _CCKD_CACHE { /* Cache structure */ #define CCKD_MIN_RA 0 /* Min readahead threads */ #define CCKD_MIN_WRITER 1 /* Min writer threads */ #define CCKD_MIN_GCOL 0 /* Min garbage collectors */ -#define CCKD_MIN_CACHE 16 /* Min number cache entries */ -#define CCKD_MIN_L2CACHE 128 /* Min nbr l2 cache entries */ #define CCKD_DEFAULT_RA_SIZE 4 /* Readahead queue size */ #define CCKD_DEFAULT_RA 2 /* Default number readaheads */ @@ -1472,8 +1520,6 @@ typedef struct _CCKD_CACHE { /* Cache structure */ collectors */ #define CCKD_DEFAULT_GCOLWAIT 5 /* Default wait (seconds) */ #define CCKD_DEFAULT_GCOLPARM 0 /* Default adjustment parm */ -#define CCKD_DEFAULT_CACHE 128 /* Default cache size */ -#define CCKD_DEFAULT_L2CACHE 256 /* Default level 2 cache size*/ #define CCKD_DEFAULT_READAHEADS 2 /* Default nbr to read ahead */ #define CCKD_DEFAULT_FREEPEND -1 /* Default freepend cycles */ @@ -1486,20 +1532,28 @@ typedef struct _CCKD_CACHE { /* Cache structure */ typedef struct _CCKDBLK { /* Global cckd dasd block */ BYTE id[8]; /* "CCKDBLK " */ - FILE *msgpipew; /* Message pipe write handle */ DEVBLK *dev1st; /* 1st device in cckd queue */ int batch:1; /* 1=called in batch mode */ - LOCK l2cachelock; /* L2 cache lock */ - LOCK cachelock; /* Cache lock */ - COND cachecond; /* Wait for cache condition */ - U64 cacheage; /* Cache aging value */ - int cachewaiting; /* Threads waiting for cache */ + + int comps; /* Supported compressions */ + int comp; /* Override compression */ + int compparm; /* Override compression parm */ + LOCK gclock; /* Garbage collector lock */ COND gccond; /* Garbage collector cond */ - int gcols; /* Number garbage collectors */ - int gcolmax; /* Max garbage collectors */ - int gcolwait; /* Wait time in seconds */ - int gcolparm; /* Adjustment parm */ + int gcs; /* Number garbage collectors */ + int gcmax; /* Max garbage collectors */ + int gcwait; /* Wait time in seconds */ + int gcparm; /* Adjustment parm */ + + LOCK wrlock; /* I/O lock */ + COND wrcond; /* I/O condition */ + int wrpending; /* Number writes pending */ + int wrwaiting; /* Number writers waiting */ + int wrs; /* Number writer threads */ + int wrmax; /* Max writer threads */ + int wrprio; /* Writer thread priority */ + LOCK ralock; /* Readahead lock */ COND racond; /* Readahead condition */ int ras; /* Number readahead threads */ @@ -1507,25 +1561,22 @@ typedef struct _CCKDBLK { /* Global cckd dasd block */ int rawaiting; /* Number threads waiting */ int ranbr; /* Readahead queue size */ int readaheads; /* Nbr tracks to read ahead */ - CCKD_RA ra[CCKD_MAX_RA_SIZE]; /* Readahead queue */ + CCKD_RA ra[CCKD_MAX_RA_SIZE]; /* Readahead queue */ int ra1st; /* First readahead entry */ int ralast; /* Last readahead entry */ int rafree; /* Free readahead entry */ + + LOCK devlock; /* Device chain lock */ + COND devcond; /* Device chain condition */ + int devusers; /* Number shared users */ + int devwaiters; /* Number of waiters */ + int freepend; /* Number freepend cycles */ int nostress; /* 1=No stress writes */ int fsync; /* 1=Perform fsync() */ int ftruncwa; /* 1=ftruncate() workaround */ - COND writercond; /* Writer condition */ - int writepending; /* Number writes pending */ - int writerswaiting;/* Number writers waiting */ - int writers; /* Number writer threads */ - int writermax; /* Max writer threads */ - int writerprio; /* Writer thread priority */ - int writewaiting; /* Threads waiting for writes*/ - COND writecond; /* Write wait condition */ COND termcond; /* Termination condition */ - int l2cachenbr; /* Size of level 2 cache */ - int cachenbr; /* Size of cache */ + U64 stats_switches; /* Switches */ U64 stats_cachehits; /* Cache hits */ U64 stats_cachemisses; /* Cache misses */ @@ -1533,8 +1584,7 @@ typedef struct _CCKDBLK { /* Global cckd dasd block */ U64 stats_readaheadmisses;/* Readahead misses */ U64 stats_syncios; /* Synchronous i/os */ U64 stats_synciomisses; /* Missed syncios */ - U64 stats_readwaits; /* Waits for read */ - U64 stats_writewaits; /* Waits for write */ + U64 stats_iowaits; /* Waits for i/o */ U64 stats_cachewaits; /* Waits for cache */ U64 stats_stresswrites; /* Writes under stress*/ U64 stats_l2cachehits; /* L2 cache hits */ @@ -1546,52 +1596,58 @@ typedef struct _CCKDBLK { /* Global cckd dasd block */ U64 stats_writebytes; /* Bytes written */ U64 stats_gcolmoves; /* Spaces moved */ U64 stats_gcolbytes; /* Bytes moved */ - char *itrace; /* Internal trace table */ - int itracex; /* Internal trace index */ - int itracen; /* Internal trace size */ + + CCKD_TRACE *itrace; /* Internal trace table */ + CCKD_TRACE *itracep; /* Current pointer */ + CCKD_TRACE *itracex; /* End of trace table */ + int itracen; /* Number of entries */ + int bytemsgs; /* Limit for `byte 0' msgs */ - CCKD_CACHE cache[CCKD_MAX_CACHE]; /* CCKD cache */ - CCKD_CACHE l2cache[CCKD_MAX_L2CACHE]; /* CCKD l2 cache */ } CCKDBLK; typedef struct _CCKDDASD_EXT { /* Ext for compressed ckd */ DEVBLK *devnext; /* cckd device queue */ unsigned int ckddasd:1, /* 1=CKD dasd */ fbadasd:1, /* 1=FBA dasd */ - updated:1, /* 1=Data has been updated */ ioactive:1, /* 1=Channel program active */ + updated:1, /* 1=Update occurred */ merging:1, /* 1=File merge in progress */ stopping:1; /* 1=Device is closing */ LOCK filelock; /* File lock */ - CCKDDASD_DEVHDR cdevhdr[CCKD_MAX_SF+1];/* cckd device hdr */ - CCKD_L1ENT *l1[CCKD_MAX_SF+1]; /* Level 1 tables */ - int fd[CCKD_MAX_SF+1]; /* File descriptors */ - BYTE swapend[CCKD_MAX_SF+1]; /* Swap endian flag */ - BYTE open[CCKD_MAX_SF+1]; /* Open flag */ + LOCK iolock; /* I/O lock */ + COND iocond; /* I/O condition */ + int iowaiters; /* Number I/O waiters */ + int wrpending; /* Number writes pending */ + int ras; /* Number readaheads active */ int sfn; /* Number active shadow files*/ int sfx; /* Active level 2 file index */ int l1x; /* Active level 2 table index*/ CCKD_L2ENT *l2; /* Active level 2 table */ - CCKD_CACHE *l2active; /* Active level 2 cache entry*/ - CCKD_CACHE *active; /* Active cache entry */ - COND readcond; /* Wait for read condition */ - COND writecond; /* Wait for write condition */ + int l2active; /* Active level 2 cache entry*/ + int active; /* Active cache entry */ CCKD_FREEBLK *free; /* Internal free space chain */ int freenbr; /* Number free space entries */ int free1st; /* Index of 1st entry */ int freelast; /* Index of last entry */ int freeavail; /* Index of available entry */ int lastsync; /* Time of last sync */ + int ralkup[CCKD_MAX_RA_SIZE];/* Lookup table */ + int ratrk; /* Track to readahead */ + unsigned int totreads; /* Total nbr trk reads */ + unsigned int totwrites; /* Total nbr trk writes */ + unsigned int totl2reads; /* Total nbr l2 reads */ + unsigned int cachehits; /* Cache hits */ + unsigned int readaheads; /* Number trks read ahead */ + unsigned int switches; /* Number trk switches */ + unsigned int misses; /* Number readahead misses */ + int fd[CCKD_MAX_SF+1]; /* File descriptors */ + BYTE swapend[CCKD_MAX_SF+1]; /* Swap endian flag */ + BYTE open[CCKD_MAX_SF+1]; /* Open flag */ int reads[CCKD_MAX_SF+1]; /* Nbr track reads */ int l2reads[CCKD_MAX_SF+1]; /* Nbr l2 reads */ int writes[CCKD_MAX_SF+1]; /* Nbr track writes */ - U32 totreads; /* Total nbr trk reads */ - U32 totwrites; /* Total nbr trk writes */ - U32 totl2reads; /* Total nbr l2 reads */ - U32 cachehits; /* Cache hits */ - U32 readaheads; /* Number trks read ahead */ - U32 switches; /* Number trk switches */ - U32 misses; /* Number readahead misses */ + CCKD_L1ENT *l1[CCKD_MAX_SF+1]; /* Level 1 tables */ + CCKDDASD_DEVHDR cdevhdr[CCKD_MAX_SF+1]; /* cckd device hdr */ } CCKDDASD_EXT; #define CCKD_OPEN_NONE 0 @@ -1602,10 +1658,12 @@ typedef struct _CCKDDASD_EXT { /* Ext for compressed ckd */ /*-------------------------------------------------------------------*/ /* Global data areas in module config.c */ /*-------------------------------------------------------------------*/ -extern SYSBLK sysblk; /* System control block */ +extern _IMPORT SYSBLK sysblk; /* System control block */ extern CCKDBLK cckdblk; /* CCKD global block */ #ifdef EXTERNALGUI -extern int extgui; /* external gui present */ +extern _IMPORT int extgui; // __attribute__ ((deprecated)); +/* The external gui interface is now external and now uses the + HDC(debug_cpu_state, regs) interface */ #endif /*EXTERNALGUI*/ /*-------------------------------------------------------------------*/ @@ -1618,29 +1676,23 @@ extern const char* get_arch_mode_string(REGS* regs); /* Function prototypes */ /*-------------------------------------------------------------------*/ +#include "devtype.h" + /* Functions in module config.c */ void build_config (BYTE *fname); void release_config (); DEVBLK *find_device_by_devnum (U16 devnum); DEVBLK *find_device_by_subchan (U16 subchan); -DEVBLK *find_unused_device (); +DEVBLK *get_devblk (U16 devnum); +void ret_devblk (DEVBLK *dev); int attach_device (U16 devnum, char *devtype, int addargc, BYTE *addargv[]); int detach_device (U16 devnum); int define_device (U16 olddev, U16 newdev); int configure_cpu (REGS *regs); int deconfigure_cpu (REGS *regs); -//#ifdef EXTERNALGUI int parse_args (BYTE* p, int maxargc, BYTE** pargv, int* pargc); -//#endif /*EXTERNALGUI*/ - -/* Global data areas and functions in module panel.c */ -extern int volatile initdone; /* Initialization complete flag */ -extern void panel_display (void); -extern LIST_ENTRY bind_head; -extern LOCK bind_lock; -extern int bind_device (DEVBLK* dev, char* spec); -extern int unbind_device (DEVBLK* dev); +#define MAX_ARGS 12 /* Max argv[] array size */ /* Access type parameter passed to translate functions in dat.c */ #define ACCTYPE_HW 0 /* Hardware access */ @@ -1685,7 +1737,35 @@ extern int unbind_device (DEVBLK* dev); /* Functions in module panel.c */ +#if defined(OPTION_DYNAMIC_LOAD) +extern void *panel_command_r (void *cmdline); +extern void *(*panel_command) (void *); + +void panel_display_r (void); +extern void (*panel_display) (void); + +extern void (*daemon_task) (void); + +extern int (*config_command) (int argc, char *argv[], char *cmdline); +extern int (*system_command) (int argc, char *argv[], char *cmdline); + +extern void *(*debug_cpu_state) (REGS *); +extern void *(*debug_device_state) (DEVBLK *); +extern void *(*debug_program_interrupt) (REGS *, int); +extern void *(*debug_diagnose) (U32, int, int, REGS *); +extern void *(*debug_sclp_unknown_command) (U32, void *, REGS *); +extern void *(*debug_sclp_unknown_event) (void *, void *, REGS *); +extern void *(*debug_sclp_event_data) (void *, void *, REGS *); +extern void *(*debug_chsc_unknown_request) (void *, void *, REGS *); + +#else void *panel_command (void *cmdline); +void panel_display (void); +#endif + +/* Functions in module impl.c */ +void system_cleanup(void); +void system_shutdown(void); /* Functions in module timer.c */ void update_TOD_clock (void); @@ -1719,10 +1799,10 @@ void fbadasd_query_device (DEVBLK *dev, BYTE **class, /* Functions in module cckddasd.c */ DEVIF cckddasd_init_handler; int cckddasd_close_device (DEVBLK *); -int cckd_read_track (DEVBLK *, int, int, BYTE *); -int cckd_update_track (DEVBLK *, BYTE *, int, BYTE *); -int cfba_read_block (DEVBLK *, BYTE *, int, BYTE *); -int cfba_write_block (DEVBLK *, BYTE *, int, BYTE *); +int cckd_read_track (DEVBLK *, int, BYTE *); +int cckd_update_track (DEVBLK *, int, int, BYTE *, int, BYTE *); +int cfba_read_block (DEVBLK *, int, BYTE *); +int cfba_write_block (DEVBLK *, int, int, BYTE *, int, BYTE *); void cckd_sf_add (DEVBLK *); void cckd_sf_remove (DEVBLK *, int); void cckd_sf_newname (DEVBLK *, BYTE *); @@ -1754,10 +1834,29 @@ void get_connected_client (DEVBLK* dev, char** pclientip, char** pclientname); void alter_display_real (BYTE *opnd, REGS *regs); void alter_display_virt (BYTE *opnd, REGS *regs); -/* #if defined(OPTION_W32_CTCI) */ +/* Functions in ecpsvm.c that are not *direct* instructions */ +/* but support functions either used by other instruction */ +/* functions or from somewhere else */ +#ifdef FEATURE_ECPSVM +int ecpsvm_dosvc(REGS *regs, int svccode); +int ecpsvm_dossm(REGS *regs,int b,VADR ea); +int ecpsvm_dolpsw(REGS *regs,int b,VADR ea); +int ecpsvm_dostnsm(REGS *regs,int b,VADR ea,int imm); +int ecpsvm_dostosm(REGS *regs,int b,VADR ea,int imm); +int ecpsvm_dosio(REGS *regs,int b,VADR ea); +int ecpsvm_dodiag(REGS *regs,int r1,int r3,int b2,VADR effective_addr2); +int ecpsvm_dolctl(REGS *regs,int r1,int r3,int b2,VADR effective_addr2); +int ecpsvm_dostctl(REGS *regs,int r1,int r3,int b2,VADR effective_addr2); +int ecpsvm_doiucv(REGS *regs,int b2,VADR effective_addr2); +int ecpsvm_virttmr_ext(REGS *regs); +#endif + + /* Functions in module w32ctca.c */ #include "w32ctca.h" -/* #endif // defined(OPTION_W32_CTCI) */ +#if defined(OPTION_W32_CTCI) +extern _IMPORT int (*debug_tt32_stats) (int); +#endif // defined(OPTION_W32_CTCI) #if defined(__APPLE__) struct mt_tape_info { diff --git a/hetget.c b/hetget.c index 8f6c1d8..378a9e4 100644 --- a/hetget.c +++ b/hetget.c @@ -20,6 +20,7 @@ #include "hetlib.h" #include "sllib.h" #include "hercules.h" +#include "herc_getopt.h" /* || Local volatile data @@ -123,7 +124,9 @@ int reclen = 0; || Special flag to indicate whether or not we're being || run under the control of the external GUI facility. */ +#if 0 int extgui = 0; +#endif /* || Previously reported file position */ diff --git a/hetinit.c b/hetinit.c index 974d6b8..18e7c89 100644 --- a/hetinit.c +++ b/hetinit.c @@ -1,7 +1,7 @@ /* || ---------------------------------------------------------------------------- || -|| HETLIB.C (c) Copyright Leland Lucius, 2000-2003 +|| HETINIT.C (c) Copyright Leland Lucius, 2000-2003 || Released under terms of the Q Public License. || || Creates IEHINITT or NL format Hercules Emulated Tapes. @@ -19,6 +19,9 @@ #include #include #include +#include "sllib.h" +#include "herc_getopt.h" + /* || Local constant data */ @@ -34,7 +37,9 @@ static const char help[] = #ifdef EXTERNALGUI /* Special flag to indicate whether or not we're being run under the control of the external GUI facility. */ +#if 0 int extgui = 0; +#endif #endif /*EXTERNALGUI*/ /* @@ -46,6 +51,17 @@ usage( char *name ) printf( help, name, name ); } +/* +|| Subroutine to convert a null-terminated string to upper case +*/ +void het_string_to_upper (char *source) +{ +int i; + + for (i = 0; source[i] != '\0'; i++) + source[i] = toupper(source[i]); +} + /* || Standard main() function */ @@ -62,6 +78,8 @@ main( int argc, char *argv[] ) char *o_owner; char *o_volser; + set_codepage( NULL ); + #ifdef EXTERNALGUI if (argc >= 1 && strncmp(argv[argc-1],"EXTERNALGUI",11) == 0) { @@ -154,6 +172,12 @@ main( int argc, char *argv[] ) } } + if( o_volser ) + het_string_to_upper( o_volser ); + + if( o_owner ) + het_string_to_upper( o_owner ); + rc = het_open( &hetb, o_filename, HETOPEN_CREATE ); if( rc < 0 ) { @@ -170,7 +194,13 @@ main( int argc, char *argv[] ) if( o_iehinitt ) { - sl_vol1( &lab, o_volser, o_owner ); + rc = sl_vol1( &lab, o_volser, o_owner ); + if( rc < 0 ) + { + printf( "%s\n", sl_error(rc) ); + goto exit; + } + rc = het_write( hetb, &lab, sizeof( lab ) ); if( rc < 0 ) { @@ -178,7 +208,13 @@ main( int argc, char *argv[] ) goto exit; } - sl_hdr1( &lab, SL_INITDSN, NULL, 0, 0, NULL, 0 ); + rc = sl_hdr1( &lab, SL_INITDSN, NULL, 0, 0, NULL, 0 ); + if( rc < 0 ) + { + printf( "%s\n", sl_error(rc) ); + goto exit; + } + rc = het_write( hetb, &lab, sizeof( lab ) ); if( rc < 0 ) { diff --git a/hetlib.c b/hetlib.c index 61affd2..22c31db 100644 --- a/hetlib.c +++ b/hetlib.c @@ -4,7 +4,7 @@ || HETLIB.C (c) Copyright Leland Lucius, 2000-2003 || Released under terms of the Q Public License. || -|| Library for managing Hercules Emulated Tapes. +|| Library for managing Hercules Emulated Tapes. || || ---------------------------------------------------------------------------- */ @@ -32,7 +32,7 @@ /* || Local constant data */ -static const char *het_errstr[] = +static const char *het_errstr[] = { "No error", "File error", @@ -65,30 +65,37 @@ static const char *het_errstr[] = NAME het_open - Open an HET format file - + SYNOPSIS #include "hetlib.h" int het_open( HETB **hetb, char *filename, int flags ) - + DESCRIPTION The het_open() function opens the file indicated by the "filename" parameter and, if successful, places the address of an HETB at the location pointed to by the "hetb" parameter. - + Currently, "HETOPEN_CREATE" is the only flag available and has the same function as the O_CREAT flag of the open(3) function. - + + @ISW@ Added flag HETOPEN_READONLY + + HETOPEN_CREATE and HETOPEN_READONLY are mutually exclusive. + + When HETOPEN_READONLY is set, the het file must exist. + It is opened read only. Any attempt to write will fail. + RETURN VALUE If no errors are detected then the return value will be >= 0 and the address of the newly allocated HETB will be place at the "hetb" location. - + If an error occurs, then the return value will be < 0 and will be one of the following: - + HETE_NOMEM Insufficient memory to allocate an HETB - + HETE_ERROR File system error - check errno(3) For other possible errors, see: @@ -105,7 +112,7 @@ static const char *het_errstr[] = // #include "hetlib.h" - + int main( int argc, char *argv[] ) { HETB *hetb; @@ -131,19 +138,20 @@ static const char *het_errstr[] = ==DOC==*/ -int +int het_open( HETB **hetb, char *filename, int flags ) { HETB *thetb; char *omode; int rc; int fd; + int oflags; /* || Initialize */ *hetb = NULL; - + /* || Allocate a new HETB */ @@ -162,17 +170,27 @@ het_open( HETB **hetb, char *filename, int flags ) thetb->level = HETDFLT_LEVEL; thetb->chksize = HETDFLT_CHKSIZE; + /* + || clear HETOPEN_CREATE if HETOPEN_READONLY is specified + */ + if(flags & HETOPEN_READONLY) + { + flags&=~HETOPEN_CREATE; + } /* || Translate HET create flag to filesystem flag */ - flags = ( ( flags & HETOPEN_CREATE ) ? O_CREAT : 0 ); + oflags = ( ( flags & HETOPEN_CREATE ) ? O_CREAT : 0 ); /* || Open the tape file */ omode = "r+b"; - fd = open( filename, O_RDWR | flags, S_IRUSR | S_IWUSR | S_IRGRP ); - if( fd == -1 && (errno == EROFS || errno == EACCES) ) + if(!(flags & HETOPEN_READONLY)) + { + fd = open( filename, O_RDWR | oflags, S_IRUSR | S_IWUSR | S_IRGRP ); + } + if( (flags & HETOPEN_READONLY) || (fd == -1 && (errno == EROFS || errno == EACCES) ) ) { /* || Retry open if file resides on readonly file system @@ -250,21 +268,21 @@ het_open( HETB **hetb, char *filename, int flags ) NAME het_close - Close an HET file - + SYNOPSIS #include "hetlib.h" int het_close( HETB **hetb ) - + DESCRIPTION The het_close() function closes an HET file and releases the HETB. - + RETURN VALUE If no errors are detected then the return value will be >= 0 and the location specified by the "hetb" parameter will be set to NULL. - + If an error occurs, then the return value will be < 0. At this time, no errors will be returned. @@ -274,7 +292,7 @@ het_open( HETB **hetb, char *filename, int flags ) // #include "hetlib.h" - + int main( int argc, char *argv[] ) { HETB *hetb; @@ -300,10 +318,10 @@ het_open( HETB **hetb, char *filename, int flags ) ==DOC==*/ -int +int het_close( HETB **hetb ) { - + /* || Only free the HETB if we have one */ @@ -331,27 +349,27 @@ het_close( HETB **hetb ) NAME het_cntl - Control HET file behavior - + SYNOPSIS #include "hetlib.h" int het_cntl( HETB *hetb, int func, unsigned long val ) - + DESCRIPTION The het_cntl() function allows you to get/set several values that control how an HET file behaves. The value of the "val" parameter depends on the function code. The possible modes are: - + HETCNTL_GET Should be ORed (|) with the function codes to retrieve the current setting. (Default) - + HETCNTL_SET Should be ORed (|) with the function codes to set a new value. - + The possible function codes are: - + HETCNTL_COMPRESS val=TRUE to enable write compression (see notes) Values: FALSE (disable) TRUE (enable) @@ -361,22 +379,22 @@ het_close( HETB **hetb ) Values: FALSE (diable) TRUE (enable) Default: HETDFLT_DECOMPRESS (TRUE) - + HETCNTL_METHOD val=Compression method to use Values: HETMETH_ZLIB (1) HETMETH_BZLIB (2) Default: HETDFLT_METHOD (HETMETH_ZLIB) - + HETCNTL_LEVEL val=Level of compression Min: HETMIN_LEVEL (1) Max: HETMAX_LEVEL (9) Default: HETDFLT_LEVEL (4) - + HETCNTL_CHUNKSIZE val=Size of output chunks (see notes) Min: HETMIN_CHUNKSIZE (4096) Max: HETMAX_CHUNKSIZE (65535) Default: HETDFLT_CHUNKSIZE (65535) - + RETURN VALUE If no errors are detected then the return value will be either the current setting for a "get" request or >= 0 for a "set" @@ -408,7 +426,7 @@ het_close( HETB **hetb ) #include "hetlib.h" char data[] = "This is a test"; - + int main( int argc, char *argv[] ) { HETB *hetb; @@ -443,11 +461,11 @@ het_close( HETB **hetb ) ==DOC==*/ -int +int het_cntl( HETB *hetb, int func, unsigned long val ) { int mode; - + /* || Isolate the mode */ @@ -466,7 +484,7 @@ het_cntl( HETB *hetb, int func, unsigned long val ) hetb->compress = ( val ? TRUE : FALSE ); break; - + case HETCNTL_DECOMPRESS: if( mode == HETCNTL_GET ) { @@ -475,7 +493,7 @@ het_cntl( HETB *hetb, int func, unsigned long val ) hetb->decompress = ( val ? TRUE : FALSE ); break; - + case HETCNTL_METHOD: if( mode == HETCNTL_GET ) { @@ -503,7 +521,7 @@ het_cntl( HETB *hetb, int func, unsigned long val ) hetb->level = val; break; - + case HETCNTL_CHUNKSIZE: if( mode == HETCNTL_GET ) { @@ -517,7 +535,7 @@ het_cntl( HETB *hetb, int func, unsigned long val ) hetb->chksize = val; break; - + default: return( HETE_BADFUNC ); break; @@ -534,15 +552,15 @@ het_cntl( HETB *hetb, int func, unsigned long val ) NAME het_read_header - Retrieve the next chunk header from an HET file - + SYNOPSIS #include "hetlib.h" int het_read_header( HETB *hetb ) - + DESCRIPTION Retrieves the next chunk header and stores it in the HETB. - + RETURN VALUE If no errors are detected then the return value will be >= 0 and the current block count will be incremented. @@ -658,16 +676,16 @@ het_read_header( HETB *hetb ) NAME het_read - Retrieve the next block from an HET file - + SYNOPSIS #include "hetlib.h" int het_read( HETB *hetb, void *sbuf ) - + DESCRIPTION Read the next block of data into the "sbuf" memory location. The length of "sbuf" should be at least HETMAX_BLOCKSIZE bytes. - + RETURN VALUE If no errors are detected then the return value will be the size of the block read. This will be either the compressed or @@ -680,13 +698,13 @@ het_read_header( HETB *hetb ) HETE_ERROR File system error - check errno(3) HETE_BADBOR Beginning of record expected but not found - + HETE_BADCOMPRESS Compression mismatch between related chunks - + HETE_OVERFLOW Record too large for buffer - + HETE_PREMEOF Premature EOF on file - + HETE_DECERR Decompression error (stored in errno(3)) HETE_UNKMETH Unknown compression method encountered @@ -868,22 +886,22 @@ het_read( HETB *hetb, void *sbuf ) #if defined(HAVE_LIBZ) case HETHDR_FLAGS1_ZLIB: slen = HETMAX_BLOCKSIZE; - + rc = uncompress( sbuf, &slen, tbuf, tlen ); if( rc != Z_OK ) { errno = rc; return( HETE_DECERR ); } - + tlen = slen; break; #endif - + #if defined( HET_BZIP2 ) case HETHDR_FLAGS1_BZLIB: slen = HETMAX_BLOCKSIZE; - + rc = BZ2_bzBuffToBuffDecompress( sbuf, (unsigned int *) &slen, tbuf, @@ -895,11 +913,11 @@ het_read( HETB *hetb, void *sbuf ) errno = rc; return( HETE_DECERR ); } - + tlen = slen; break; #endif /* defined( HET_BZIP2 ) */ - + default: return( HETE_UNKMETH ); break; @@ -921,15 +939,15 @@ het_read( HETB *hetb, void *sbuf ) NAME het_write_header - Write a chunk header to an HET file - + SYNOPSIS #include "hetlib.h" int het_write_header( HETB *hetb, int len, int flags1, int flags2 ) - + DESCRIPTION Constructs and writes a chunk header to an HET file. - + RETURN VALUE If no errors are detected then the return value will be >= 0 and the current block count will be incremented. @@ -1032,7 +1050,7 @@ het_write_header( HETB *hetb, int len, int flags1, int flags2 ) fseek( hetb->fd, 0, SEEK_CUR ); hetb->readlast = FALSE; } - + /* || If this is the first write, truncate the file */ @@ -1043,16 +1061,16 @@ het_write_header( HETB *hetb, int len, int flags1, int flags2 ) { return( HETE_ERROR ); } - + rc = ftruncate( fileno( hetb->fd ), rc ); if( rc == -1 ) { return( HETE_ERROR ); } - + hetb->truncated = TRUE; } - + /* || Construct the header */ @@ -1100,7 +1118,7 @@ het_write_header( HETB *hetb, int len, int flags1, int flags2 ) Writes a block of data specified by "sbuf" with a length of "slen" to an HET file. Depending on the current HETCNTL_COMPRESS setting, the data may be compressed prior to writing. - + RETURN VALUE If no errors are detected then the return value will be the size of the block written. This will be either the compressed or @@ -1113,9 +1131,9 @@ het_write_header( HETB *hetb, int len, int flags1, int flags2 ) HETE_ERROR File system error - check errno(3) HETE_BADLEN "slen" parameter out of range - + HETE_BADCOMPRESS Compression mismatch between related chunks - + For other possible errors, see: het_write_header() @@ -1127,7 +1145,7 @@ het_write_header( HETB *hetb, int len, int flags1, int flags2 ) #include "hetlib.h" char data[] = "This is a test"; - + int main( int argc, char *argv[] ) { HETB *hetb; @@ -1164,7 +1182,7 @@ het_write( HETB *hetb, void *sbuf, int slen ) int rc; int flags; unsigned long tlen; - char tbuf[ HETMAX_BLOCKSIZE ]; + char tbuf[ ((((HETMAX_BLOCKSIZE * 1001) + 999) / 1000) + 12) ]; /* || Validate @@ -1279,7 +1297,7 @@ het_write( HETB *hetb, void *sbuf, int slen ) { return( HETE_ERROR ); } - + /* || Bump pointers and turn off BOR flag */ @@ -1299,16 +1317,16 @@ het_write( HETB *hetb, void *sbuf, int slen ) NAME het_tapemark - Write a tape mark to an HET file - + SYNOPSIS #include "hetlib.h" int het_tapemark( HETB *hetb ) - + DESCRIPTION Writes a special chunk header to an HET file to simulate a tape mark. - + RETURN VALUE If no errors are detected then the return value will be >= 0. @@ -1376,16 +1394,16 @@ het_tapemark( HETB *hetb ) NAME het_locate - Locate a block within an HET file - + SYNOPSIS #include "hetlib.h" int het_locate( HETB *hetb, int block ) - + DESCRIPTION Repositions the HET file to the start of the block specified by the "block" parameter. - + RETURN VALUE If no errors are detected then the return value will be >= 0 and represents the new current block number. @@ -1439,7 +1457,7 @@ int het_locate( HETB *hetb, int block ) { int rc; - + /* || Start the search from the beginning */ @@ -1463,21 +1481,21 @@ het_locate( HETB *hetb, int block ) return( hetb->cblk ); } - + /*==DOC== NAME het_bsb - Backspace a block in an HET file - + SYNOPSIS #include "hetlib.h" int het_bsb( HETB *hetb ) - + DESCRIPTION - Repositions the current block pointer in an HET file to the + Repositions the current block pointer in an HET file to the previous block. - + RETURN VALUE If no errors are detected then the return value will be >= 0 and will be the new block number. @@ -1488,7 +1506,7 @@ het_locate( HETB *hetb, int block ) HETE_ERROR File system error - check errno(3) HETE_BOT Beginning of tape - + HETE_TAPEMARK Tape mark encountered For other possible errors, see: @@ -1543,7 +1561,7 @@ het_bsb( HETB *hetb ) int newblk; int offset; int tapemark = FALSE; - + /* || Error if at BOT */ @@ -1664,21 +1682,21 @@ het_bsb( HETB *hetb ) */ return( hetb->cblk ); } - + /*==DOC== NAME het_fsb - Foward space a block in an HET file - + SYNOPSIS #include "hetlib.h" int het_fsb( HETB *hetb ) - + DESCRIPTION - Repositions the current block pointer in an HET file to the + Repositions the current block pointer in an HET file to the next block. - + RETURN VALUE If no errors are detected then the return value will be >= 0 and will be the new block number. @@ -1732,7 +1750,7 @@ int het_fsb( HETB *hetb ) { int rc; - + /* || Loop until we've processed an entire block */ @@ -1770,21 +1788,21 @@ het_fsb( HETB *hetb ) */ return( hetb->cblk ); } - + /*==DOC== NAME het_bsf - Backspace a file in an HET file - + SYNOPSIS #include "hetlib.h" int het_bsf( HETB *hetb ) - + DESCRIPTION - Repositions the current block pointer in an HET file to the + Repositions the current block pointer in an HET file to the previous tapemark. - + RETURN VALUE If no errors are detected then the return value will be >= 0 and will be the new block number. @@ -1838,7 +1856,7 @@ int het_bsf( HETB *hetb ) { int rc; - + /* || Backspace until we hit a tapemark */ @@ -1847,7 +1865,7 @@ het_bsf( HETB *hetb ) rc = het_bsb( hetb ); } while( rc >= 0 ); - + /* || Success */ @@ -1861,21 +1879,21 @@ het_bsf( HETB *hetb ) */ return( rc ); } - + /*==DOC== NAME het_fsf - Forward space a file in an HET file - + SYNOPSIS #include "hetlib.h" int het_fsf( HETB *hetb ) - + DESCRIPTION - Repositions the current block pointer in an HET file to the + Repositions the current block pointer in an HET file to the next tapemark. - + RETURN VALUE If no errors are detected then the return value will be >= 0 and will be the new block number. @@ -1925,7 +1943,7 @@ int het_fsf( HETB *hetb ) { int rc; - + /* || Forward space until we hit a tapemark */ @@ -1934,7 +1952,7 @@ het_fsf( HETB *hetb ) rc = het_fsb( hetb ); } while( rc >= 0 ); - + /* || Success */ @@ -1952,24 +1970,24 @@ het_fsf( HETB *hetb ) /*==DOC== NAME - het_rewind - Rewind an HET file - + het_rewind - Rewind an HET file + SYNOPSIS #include "hetlib.h" int het_rewind( HETB *hetb ) - + DESCRIPTION - Repositions the current block pointer in an HET file to the + Repositions the current block pointer in an HET file to the load point. - + RETURN VALUE If no errors are detected then the return value will be >= 0 and represents the new block number (always 0). If an error occurs, then the return value will be < 0 and will be one of the following: - + HETE_ERROR File system error - check errno(3) EXAMPLE @@ -2013,7 +2031,7 @@ int het_rewind( HETB *hetb ) { int rc; - + /* || Just seek to the beginning of the file */ @@ -2050,16 +2068,16 @@ het_rewind( HETB *hetb ) NAME het_error - Returns a text message for an HET error code - + SYNOPSIS #include "hetlib.h" char *het_error( int rc ) - + DESCRIPTION Simply returns a pointer to a string that describes the error code passed in the "rc" parameter. - + RETURN VALUE The return value is always valid and no errors are returned. @@ -2093,7 +2111,7 @@ het_error( int rc ) { rc = 0; } - + /* || Turn it into an index */ @@ -2112,3 +2130,71 @@ het_error( int rc ) */ return( het_errstr[ rc ] ); } +/*==DOC== + + NAME + het_tell - Returns the current read/write pointer offset + + SYNOPSIS + #include "hetlib.h" + + long het_error( HETB *hetb ) + + DESCRIPTION + Returns a long describing the actual read/write cursor + within the HET file + + RETURN VALUE + >=0 The actual cursor offset + <0 An error occured. + Possible errors are : + HETE_ERROR - File system error occured + + EXAMPLE + // + // Get the current HET pointer + // + + #include "hetlib.h" + + int main( int argc, char *argv[] ) + { + HETB *hetb; + int rc; + long rwptr; + + rc = het_open( &hetb, argv[ 1 ], 0 ); + if( rc >= 0 ) + { + rwptr = het_tell( hetb ); + if( rc >= 0 ) + { + printf( "Current offset is %ld\n" , rwptr); + } + } + + if( rc < 0 ) + { + printf( "HETLIB error: %d\n", rc ); + } + + het_close( &hetb ); + + return( 0 ); + } + + SEE ALSO + +==DOC==*/ + +long +het_tell( HETB *hetb ) +{ + long rwptr; + rwptr=ftell(hetb->fd); + if(rwptr<0) + { + return HETE_ERROR; + } + return rwptr; +} diff --git a/hetlib.h b/hetlib.h index 12f219f..a881f51 100644 --- a/hetlib.h +++ b/hetlib.h @@ -109,6 +109,7 @@ typedef struct _hetb || Flags for het_open() */ #define HETOPEN_CREATE 0x01 /* Create NL tape, if file missing */ +#define HETOPEN_READONLY 0x02 /* Force the open read-only */ /* || Modes for het_cntl() @@ -170,5 +171,6 @@ int het_bsf( HETB *hetb ); int het_fsf( HETB *hetb ); int het_rewind( HETB *hetb ); const char *het_error( int rc ); +long het_tell ( HETB *hetb ); #endif /* defined( _HETLIB_H_ ) */ diff --git a/hetmap.c b/hetmap.c index 66ff160..28c7bf2 100644 --- a/hetmap.c +++ b/hetmap.c @@ -4,7 +4,7 @@ || HETMAP.C (c) Copyright Leland Lucius, 2000-2003 || Released under terms of the Q Public License. || -|| Displays information about the structure of a Hercules Emulated Tape. +|| Displays information about the structure of a Hercules Emulated Tape. || || ---------------------------------------------------------------------------- */ @@ -20,6 +20,7 @@ #include "hetlib.h" #include "sllib.h" #include "hercules.h" +#include "herc_getopt.h" /* || Local constant data @@ -38,7 +39,9 @@ static const char help[] = #ifdef EXTERNALGUI /* Special flag to indicate whether or not we're being run under the control of the external GUI facility. */ +#if 0 int extgui = 0; +#endif /* Previous reported file position */ static long prevpos = 0; /* Report progress every this many bytes */ @@ -297,7 +300,7 @@ main( int argc, char *argv[] ) cminsz = 0; cmaxsz = 0; cbytes = 0; - + continue; } diff --git a/hetupd.c b/hetupd.c index be61732..ccc9e1b 100644 --- a/hetupd.c +++ b/hetupd.c @@ -24,6 +24,7 @@ #include "hetlib.h" #include "sllib.h" #include "hercules.h" +#include "herc_getopt.h" /* || Local volatile data @@ -42,7 +43,9 @@ static HETB *d_hetb = NULL; #ifdef EXTERNALGUI /* Special flag to indicate whether or not we're being run under the control of the external GUI facility. */ +#if 0 int extgui = 0; +#endif /* Previous reported file position */ static long prevpos = 0; /* Report progress every this many bytes */ @@ -53,7 +56,7 @@ static long prevpos = 0; || Local constant data */ static const char help[] = - "%s - Print a map of an HET tape file\n\n" + "%s - Updates the compression of a Hercules Emulated Tape file.\n\n" "Usage: %s [options] source [dest]\n\n" "Options:\n" " -1 compress fast\n" @@ -97,7 +100,7 @@ closetapes( int rc ) het_close( &d_hetb ); het_close( &s_hetb ); - + if( dorename ) { if( rc >= 0 ) @@ -241,7 +244,7 @@ opentapes( void ) printf( "Compression level : %d\n", het_cntl( d_hetb, HETCNTL_LEVEL, 0 ) ); } - + exit: if( rc < 0 ) @@ -357,11 +360,11 @@ main( int argc, char *argv[] ) o_dname = toname; dorename = TRUE; break; - + case 2: o_dname = argv[ optind + 1 ]; break; - + default: usage( argv[ 0 ] ); exit( 1 ); @@ -388,6 +391,6 @@ main( int argc, char *argv[] ) } closetapes( rc ); - + return 0; } diff --git a/hsccmd.c b/hsccmd.c index 4b6a58d..459a8af 100644 --- a/hsccmd.c +++ b/hsccmd.c @@ -33,32 +33,37 @@ extern void FishHangReport(); extern void FishHangAtExit(); #endif // defined(FISH_HANG) +#if defined(FEATURE_ECPSVM) +extern void ecpsvm_command(int argc,char **argv); +#endif + +/* Added forward declaration to process_script_file ISW20030220-3 */ +int process_script_file(char *,int); + /////////////////////////////////////////////////////////////////////// /* quit or exit command - terminate the emulator */ -int quit_cmd(char* cmdline, int argc, char *argv[]) +int quit_cmd(int argc, char *argv[],char *cmdline) { UNREFERENCED(cmdline); + /* ZZ FIXME: 'now' has a few nasty side-effects, it does not + flush any buffers (DASD), and it does not terminate + any threads which might leave hercules in a 'hanging' + state. The 'now' option should probably be removed + in a future version */ if (!(argc > 1 && !strcasecmp("now",argv[1]))) - usleep(100000); + { +// usleep(10000); /* (fix by new shutdown sequence) */ + system_shutdown(); + } #if defined(FISH_HANG) FishHangAtExit(); #endif - sysblk.msgpipew = stderr; - -#if defined(OPTION_FISHIO) - ios_msgpipew = sysblk.msgpipew; -#endif - -#if defined(OPTION_W32_CTCI) - g_tt32_msgpipew = sysblk.msgpipew; -#endif - - if (argc < 2 || strcasecmp("now",argv[1])) - release_config(); + fprintf(stderr, _("HHCIN099I Hercules terminated\n")); + fflush(stderr); exit(0); @@ -68,7 +73,7 @@ int quit_cmd(char* cmdline, int argc, char *argv[]) /////////////////////////////////////////////////////////////////////// /* start command (or just Enter) - start CPU (or printer device if argument given) */ -int start_cmd(char* cmdline, int argc, char *argv[]) +int start_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; @@ -147,7 +152,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; "subchannel not enabled\n"), devnum); break; } - + } return 0; @@ -156,7 +161,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* g command - turn off single stepping and start CPU */ -int g_cmd(char* cmdline, int argc, char *argv[]) +int g_cmd(int argc, char *argv[], char *cmdline) { UNREFERENCED(cmdline); UNREFERENCED(argc); @@ -165,13 +170,13 @@ int g_cmd(char* cmdline, int argc, char *argv[]) sysblk.inststep = 0; SET_IC_TRACE; - return start_cmd(NULL,0,NULL); + return start_cmd(0,NULL,NULL); } /////////////////////////////////////////////////////////////////////// /* stop command - stop CPU (or printer device if argument given) */ -int stop_cmd(char* cmdline, int argc, char *argv[]) +int stop_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; @@ -226,12 +231,10 @@ REGS *regs = sysblk.regs + sysblk.pcpu; return 0; } -#if MAX_CPU_ENGINES > 1 - /////////////////////////////////////////////////////////////////////// /* startall command - start all CPU's */ -int startall_cmd(char* cmdline, int argc, char *argv[]) +int startall_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; unsigned i; @@ -256,7 +259,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* stopall command - stop all CPU's */ -int stopall_cmd(char* cmdline, int argc, char *argv[]) +int stopall_cmd(int argc, char *argv[], char *cmdline) { unsigned i; @@ -279,12 +282,10 @@ int stopall_cmd(char* cmdline, int argc, char *argv[]) return 0; } -#endif /*MAX_CPU_ENGINES > 1*/ - /////////////////////////////////////////////////////////////////////// /* quiet command - quiet PANEL */ -int quiet_cmd(char* cmdline, int argc, char *argv[]) +int quiet_cmd(int argc, char *argv[], char *cmdline) { UNREFERENCED(cmdline); UNREFERENCED(argc); @@ -305,7 +306,7 @@ int quiet_cmd(char* cmdline, int argc, char *argv[]) /////////////////////////////////////////////////////////////////////// /* clocks command - display tod clkc and cpu timer */ -int clocks_cmd(char* cmdline, int argc, char *argv[]) +int clocks_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; @@ -313,7 +314,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; UNREFERENCED(argc); UNREFERENCED(argv); - logmsg( "HHCPN028I tod = %16.16llX\n", + logmsg( _("HHCPN028I tod = %16.16llX\n"), (long long)(sysblk.todclk + regs->todoffset) << 8 ); @@ -336,7 +337,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* iodelay command - display or set I/O delay value */ -int iodelay_cmd(char* cmdline, int argc, char *argv[]) +int iodelay_cmd(int argc, char *argv[], char *cmdline) { UNREFERENCED(cmdline); @@ -361,7 +362,7 @@ int iodelay_cmd(char* cmdline, int argc, char *argv[]) /////////////////////////////////////////////////////////////////////// /* cckd command */ -int cckd_cmd(char* cmdline, int argc, char *argv[]) +int cckd_cmd(int argc, char *argv[], char *cmdline) { BYTE* p = strtok(cmdline+4," \t"); @@ -376,7 +377,7 @@ int cckd_cmd(char* cmdline, int argc, char *argv[]) /////////////////////////////////////////////////////////////////////// /* tt32stats command - display CTCI-W32 statistics */ -int tt32stats_cmd(char* cmdline, int argc, char *argv[]) +int tt32stats_cmd(int argc, char *argv[], char *cmdline) { int rc = 0; U16 devnum; @@ -397,7 +398,8 @@ int tt32stats_cmd(char* cmdline, int argc, char *argv[]) return -1; } - if (!(dev = find_device_by_devnum (devnum))) + if (!(dev = find_device_by_devnum (devnum)) && + !(dev = find_device_by_devnum (devnum ^ 0x01))) { logmsg( _("HHCPN033E Device number %4.4X not found\n"), devnum ); return -1; @@ -410,12 +412,13 @@ int tt32stats_cmd(char* cmdline, int argc, char *argv[]) return -1; } - if (display_tt32_stats(dev->fd) < 0) + if (debug_tt32_stats) + rc = debug_tt32_stats (dev->fd); + else { logmsg( _("(error)\n") ); rc = -1; } - else rc = 0; return rc; } @@ -425,7 +428,7 @@ int tt32stats_cmd(char* cmdline, int argc, char *argv[]) /////////////////////////////////////////////////////////////////////// /* store command - store CPU status at absolute zero */ -int store_cmd(char* cmdline, int argc, char *argv[]) +int store_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; @@ -451,7 +454,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* toddrag command - display or set TOD clock drag factor */ -int toddrag_cmd(char* cmdline, int argc, char *argv[]) +int toddrag_cmd(int argc, char *argv[], char *cmdline) { UNREFERENCED(cmdline); @@ -477,7 +480,7 @@ int toddrag_cmd(char* cmdline, int argc, char *argv[]) /////////////////////////////////////////////////////////////////////// /* panrate command - display or set rate at which console refreshes */ -int panrate_cmd(char* cmdline, int argc, char *argv[]) +int panrate_cmd(int argc, char *argv[], char *cmdline) { UNREFERENCED(cmdline); @@ -509,7 +512,7 @@ int panrate_cmd(char* cmdline, int argc, char *argv[]) /////////////////////////////////////////////////////////////////////// /* shell command */ -int sh_cmd(char* cmdline, int argc, char *argv[]) +int sh_cmd(int argc, char *argv[], char *cmdline) { UNREFERENCED(argc); UNREFERENCED(argv); @@ -519,7 +522,7 @@ int sh_cmd(char* cmdline, int argc, char *argv[]) /////////////////////////////////////////////////////////////////////// /* gpr command - display general purpose registers */ -int gpr_cmd(char* cmdline, int argc, char *argv[]) +int gpr_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; @@ -533,7 +536,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* fpr command - display floating point registers */ -int fpr_cmd(char* cmdline, int argc, char *argv[]) +int fpr_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; @@ -547,7 +550,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* cr command - display control registers */ -int cr_cmd(char* cmdline, int argc, char *argv[]) +int cr_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; @@ -561,7 +564,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* ar command - display access registers */ -int ar_cmd(char* cmdline, int argc, char *argv[]) +int ar_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; @@ -575,7 +578,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* pr command - display prefix register */ -int pr_cmd(char* cmdline, int argc, char *argv[]) +int pr_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; @@ -592,7 +595,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* psw command - display program status word */ -int psw_cmd(char* cmdline, int argc, char *argv[]) +int psw_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; @@ -606,7 +609,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* restart command - generate restart interrupt */ -int restart_cmd(char* cmdline, int argc, char *argv[]) +int restart_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; @@ -640,7 +643,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* r command - display or alter real storage */ -int r_cmd(char* cmdline, int argc, char *argv[]) +int r_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; @@ -650,10 +653,23 @@ REGS *regs = sysblk.regs + sysblk.pcpu; return 0; } +/////////////////////////////////////////////////////////////////////// +/* u command - disassemble */ + +int u_cmd(int argc, char *argv[], char *cmdline) +{ +REGS *regs = sysblk.regs + sysblk.pcpu; + + UNREFERENCED(argc); + UNREFERENCED(argv); + disasm_stor (regs, cmdline+2); + return 0; +} + /////////////////////////////////////////////////////////////////////// /* v command - display or alter virtual storage */ -int v_cmd(char* cmdline, int argc, char *argv[]) +int v_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; @@ -666,7 +682,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* b command - set breakpoint */ -int bset_cmd(char* cmdline, int argc, char *argv[]) +int bset_cmd(int argc, char *argv[], char *cmdline) { BYTE c; /* Character work area */ @@ -693,7 +709,7 @@ BYTE c; /* Character work area */ /////////////////////////////////////////////////////////////////////// /* b- command - delete breakpoint */ -int bdelete_cmd(char* cmdline, int argc, char *argv[]) +int bdelete_cmd(int argc, char *argv[], char *cmdline) { UNREFERENCED(cmdline); UNREFERENCED(argc); @@ -707,7 +723,7 @@ int bdelete_cmd(char* cmdline, int argc, char *argv[]) /////////////////////////////////////////////////////////////////////// /* i command - generate I/O attention interrupt for device */ -int i_cmd(char* cmdline, int argc, char *argv[]) +int i_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; BYTE c; /* Character work area */ @@ -752,7 +768,7 @@ BYTE c; /* Character work area */ devnum); break; } - + if (rc == 3 && CPUSTATE_STOPPED == regs->cpustate) logmsg( _("HHCPN049W Are you sure you didn't mean 'ipl %4.4X' " "instead?\n"), devnum ); @@ -763,7 +779,7 @@ BYTE c; /* Character work area */ /////////////////////////////////////////////////////////////////////// /* ext command - generate external interrupt */ -int ext_cmd(char* cmdline, int argc, char *argv[]) +int ext_cmd(int argc, char *argv[], char *cmdline) { UNREFERENCED(cmdline); UNREFERENCED(argc); @@ -786,7 +802,7 @@ int ext_cmd(char* cmdline, int argc, char *argv[]) /////////////////////////////////////////////////////////////////////// /* loadparm xxxxxxxx command - set IPL parameter */ -int loadparm_cmd(char* cmdline, int argc, char *argv[]) +int loadparm_cmd(int argc, char *argv[], char *cmdline) { BYTE c; /* Character work area */ @@ -809,7 +825,7 @@ BYTE c; /* Character work area */ } /* Display IPL parameter */ - logmsg( "HHCPN051I LOADPARM=%c%c%c%c%c%c%c%c\n", + logmsg( _("HHCPN051I LOADPARM=%c%c%c%c%c%c%c%c\n"), guest_to_host(sysblk.loadparm[0]), guest_to_host(sysblk.loadparm[1]), guest_to_host(sysblk.loadparm[2]), @@ -826,7 +842,7 @@ BYTE c; /* Character work area */ /////////////////////////////////////////////////////////////////////// /* ipl xxxx command - IPL from device xxxx */ -int ipl_cmd(char* cmdline, int argc, char *argv[]) +int ipl_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; BYTE c; /* Character work area */ @@ -860,7 +876,7 @@ BYTE c; /* Character work area */ /////////////////////////////////////////////////////////////////////// /* cpu command - define target cpu for panel display and commands */ -int cpu_cmd(char* cmdline, int argc, char *argv[]) +int cpu_cmd(int argc, char *argv[], char *cmdline) { BYTE c; /* Character work area */ @@ -900,7 +916,7 @@ BYTE c; /* Character work area */ /////////////////////////////////////////////////////////////////////// /* FishHangReport - verify/debug proper Hercules LOCK handling... */ -int FishHangReport_cmd(char* cmdline, int argc, char *argv[]) +int FishHangReport_cmd(int argc, char *argv[], char *cmdline) { UNREFERENCED(cmdline); UNREFERENCED(argc); @@ -917,19 +933,79 @@ int FishHangReport_cmd(char* cmdline, int argc, char *argv[]) /////////////////////////////////////////////////////////////////////// /* devlist command - list devices */ -int devlist_cmd(char* cmdline, int argc, char *argv[]) +int SortDevBlkPtrsAscendingByDevnum(const void* pDevBlkPtr1, const void* pDevBlkPtr2) +{ + return + ((int)((*(DEVBLK**)pDevBlkPtr1)->devnum) - + (int)((*(DEVBLK**)pDevBlkPtr2)->devnum)); +} + +#define MAX_DEVLIST_DEVICES 1024 + +int devlist_cmd(int argc, char *argv[], char *cmdline) { DEVBLK* dev; - BYTE *devclass; - BYTE devnam[256]; + BYTE* devclass; + BYTE devnam[1024]; + DEVBLK** pDevBlkPtr; + DEVBLK** orig_pDevBlkPtrs; + size_t nDevCount, i; + int bTooMany = 0; UNREFERENCED(cmdline); UNREFERENCED(argc); UNREFERENCED(argv); - for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) + // Since we wish to display the list of devices in ascending device + // number order, we build our own private a sorted array of DEVBLK + // pointers and use that instead to make the devlist command wholly + // immune from the actual order/sequence of the actual DEVBLK chain. + + // Note too that there is no lock to lock access to ALL device blocks + // (even though there really SHOULD be), only one to lock an individual + // DEVBLK (which doesn't do us much good here). + + if (!(orig_pDevBlkPtrs = malloc(sizeof(DEVBLK*) * MAX_DEVLIST_DEVICES))) + { + logmsg( _("HHCPN146E Work buffer malloc failed: %s\n"), + strerror(errno) ); + return -1; + } + + nDevCount = 0; + pDevBlkPtr = orig_pDevBlkPtrs; + + for (dev = sysblk.firstdev; dev && nDevCount <= MAX_DEVLIST_DEVICES; dev = dev->nextdev) + { + if (dev->pmcw.flag5 & PMCW5_V) // (valid device?) + { + if (nDevCount < MAX_DEVLIST_DEVICES) + { + *pDevBlkPtr = dev; // (save ptr to DEVBLK) + nDevCount++; // (count array entries) + pDevBlkPtr++; // (bump to next entry) + } + else + { + bTooMany = 1; // (no more room) + break; // (no more room) + } + } + } + + ASSERT(nDevCount <= MAX_DEVLIST_DEVICES); // (sanity check) + + // Sort the DEVBLK pointers into ascending sequence by device number. + + qsort(orig_pDevBlkPtrs, nDevCount, sizeof(DEVBLK*), SortDevBlkPtrsAscendingByDevnum); + + // Now use our sorted array of DEVBLK pointers + // to display our sorted list of devices... + + for (i = nDevCount, pDevBlkPtr = orig_pDevBlkPtrs; i; --i, pDevBlkPtr++) { - if (!(dev->pmcw.flag5 & PMCW5_V)) continue; + dev = *pDevBlkPtr; // --> DEVBLK + ASSERT(dev->pmcw.flag5 & PMCW5_V); // (sanity check) /* Call device handler's query definition function */ (dev->hnd->query)(dev, &devclass, sizeof(devnam), devnam); @@ -964,13 +1040,23 @@ int devlist_cmd(char* cmdline, int argc, char *argv[]) } } + free ( orig_pDevBlkPtrs ); + + if (bTooMany) + { + logmsg( _("HHCPN147W Warning: not all devices shown (max %d)\n"), + MAX_DEVLIST_DEVICES); + + return -1; // (treat as error) + } + return 0; } /////////////////////////////////////////////////////////////////////// /* attach command - configure a device */ -int attach_cmd(char* cmdline, int argc, char *argv[]) +int attach_cmd(int argc, char *argv[], char *cmdline) { U16 devnum /* , dummy_devtype */; BYTE c; /* Character work area */ @@ -1003,7 +1089,7 @@ BYTE c; /* Character work area */ /////////////////////////////////////////////////////////////////////// /* detach command - remove device */ -int detach_cmd(char* cmdline, int argc, char *argv[]) +int detach_cmd(int argc, char *argv[], char *cmdline) { U16 devnum; BYTE c; /* Character work area */ @@ -1028,7 +1114,7 @@ BYTE c; /* Character work area */ /////////////////////////////////////////////////////////////////////// /* define command - rename a device */ -int define_cmd(char* cmdline, int argc, char *argv[]) +int define_cmd(int argc, char *argv[], char *cmdline) { U16 devnum, newdevn; BYTE c; /* Character work area */ @@ -1059,7 +1145,7 @@ BYTE c; /* Character work area */ /////////////////////////////////////////////////////////////////////// /* pgmtrace command - trace program interrupts */ -int pgmtrace_cmd(char* cmdline, int argc, char *argv[]) +int pgmtrace_cmd(int argc, char *argv[], char *cmdline) { int abs_rupt_num, rupt_num; BYTE c; /* Character work area */ @@ -1099,46 +1185,12 @@ BYTE c; /* Character work area */ /////////////////////////////////////////////////////////////////////// /* k command - print out cckd internal trace */ -int k_cmd(char* cmdline, int argc, char *argv[]) +int k_cmd(int argc, char *argv[], char *cmdline) { UNREFERENCED(cmdline); - -#ifndef CKDTRACE UNREFERENCED(argc); UNREFERENCED(argv); -#else - if (argc > 1) - { - DEVBLK* dev; - U16 devnum; - int start, i; - - if (sscanf(argv[1], "%hx%c", &devnum, &c) != 1 - || !(dev = find_device_by_devnum (devnum)) || !dev->cckd_ext) - { - logmsg( _("HHCPN068E Device number %s is invalid\n"), argv[1]); - return -1; - } - i = start = dev->ckdtracex; - - do - { - if (i >= (128 * CKDTRACE)) i = 0; - - if (dev->ckdtrace[i] != '\0') - fprintf(dev->msgpipew, "%s", &dev->ckdtrace[i]); - - i += 128; - } - while (i != start); - - fflush (dev->msgpipew); - - sleep (2); - } - else -#endif cckd_print_itrace (); return 0; @@ -1147,7 +1199,7 @@ int k_cmd(char* cmdline, int argc, char *argv[]) /////////////////////////////////////////////////////////////////////// /* ds - display subchannel */ -int ds_cmd(char* cmdline, int argc, char *argv[]) +int ds_cmd(int argc, char *argv[], char *cmdline) { DEVBLK* dev; U16 devnum; @@ -1178,12 +1230,11 @@ BYTE c; /* Character work area */ return 0; } -#ifdef OPTION_SYNCIO /////////////////////////////////////////////////////////////////////// /* syncio command - list syncio devices statistics */ -int syncio_cmd(char* cmdline, int argc, char *argv[]) +int syncio_cmd(int argc, char *argv[], char *cmdline) { DEVBLK* dev; U64 syncios = 0, asyncios = 0; @@ -1221,16 +1272,14 @@ int syncio_cmd(char* cmdline, int argc, char *argv[]) return 0; } -#endif - /////////////////////////////////////////////////////////////////////// /* devtmax command - display or set max device threads */ #if !defined(OPTION_FISHIO) -void device_thread(); +void *device_thread(void *arg); #endif /* !defined(OPTION_FISHIO) */ -int devtmax_cmd(char* cmdline, int argc, char *argv[]) +int devtmax_cmd(int argc, char *argv[], char *cmdline) { int devtmax = -2; @@ -1292,18 +1341,8 @@ int devtmax_cmd(char* cmdline, int argc, char *argv[]) if (sysblk.ioq && (!sysblk.devtmax || sysblk.devtnbr < sysblk.devtmax)) create_thread(&tid, &sysblk.detattr, device_thread, NULL); - /* Terminate threads while the number of threads exceeds - the maximum and threads are waiting */ - - while (1 - && sysblk.devtmax - && sysblk.devtnbr > sysblk.devtmax - && sysblk.devtwait - ) - { - signal_condition (&sysblk.ioqcond); - sched_yield(); - } + /* Wakeup threads in case they need to terminate */ + broadcast_condition (&sysblk.ioqcond); logmsg( _("HHCPN078E Max device threads %d current %d most %d " "waiting %d total I/Os queued %d\n"), @@ -1319,7 +1358,7 @@ int devtmax_cmd(char* cmdline, int argc, char *argv[]) /////////////////////////////////////////////////////////////////////// /* sf commands - shadow file add/remove/set/compress/display */ -int ShadowFile_cmd(char* cmdline, int argc, char *argv[]) +int ShadowFile_cmd(int argc, char *argv[], char *cmdline) { BYTE *cmd = (BYTE*) cmdline; /* Copy of panel command */ BYTE *devascii; /* ASCII text device number */ @@ -1460,7 +1499,7 @@ BYTE c; /* Character work area */ /////////////////////////////////////////////////////////////////////// /* devinit command - assign/open a file for a configured device */ -int devinit_cmd(char* cmdline, int argc, char *argv[]) +int devinit_cmd(int argc, char *argv[], char *cmdline) { DEVBLK* dev; U16 devnum; @@ -1490,8 +1529,8 @@ BYTE c; /* Character work area */ obtain_lock (&dev->lock); /* Reject if device is busy or interrupt pending */ - if (dev->busy || dev->pending - || (dev->scsw.flag3 & SCSW3_SC_PEND)) + if (dev->busy || dev->pending || dev->pcipending + || (dev->scsw.flag3 & SCSW3_SC_PEND)) { release_lock (&dev->lock); logmsg( _("HHCPN096E Device %4.4X busy or interrupt pending\n"), @@ -1527,7 +1566,7 @@ BYTE c; /* Character work area */ /////////////////////////////////////////////////////////////////////// /* savecore filename command - save a core image to file */ -int savecore_cmd(char* cmdline, int argc, char *argv[]) +int savecore_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; @@ -1627,7 +1666,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* loadcore filename command - load a core image file */ -int loadcore_cmd(char* cmdline, int argc, char *argv[]) +int loadcore_cmd(int argc, char *argv[], char *cmdline) { REGS *regs = sysblk.regs + sysblk.pcpu; @@ -1687,7 +1726,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* loadtext filename command - load a text deck file */ -int loadtext_cmd(char* cmdline, int argc, char *argv[]) +int loadtext_cmd(int argc, char *argv[], char *cmdline) { BYTE *fname; /* -> File name (ASCIIZ) */ BYTE *loadaddr; /* loadcore memory address */ @@ -1780,11 +1819,13 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* ipending command - display pending interrupts */ -int ipending_cmd(char* cmdline, int argc, char *argv[]) +int ipending_cmd(int argc, char *argv[], char *cmdline) { BYTE *cmdarg; /* -> Command argument */ DEVBLK *dev; /* -> Device block */ + IOINT *io; /* -> I/O interrupt entry */ unsigned i; + char sysid[12]; char *states[] = {"?", "STOPPED", "STOPPING", "?", "STARTED", "?", "?", "?", "STARTING"}; REGS *regs = sysblk.regs + sysblk.pcpu; @@ -1858,10 +1899,6 @@ REGS *regs = sysblk.regs + sysblk.pcpu; sysblk.regs[i].cpuad, IS_IC_EMERSIG(sysblk.regs + i) ? "" : _("not ") ); - logmsg( _(" CPU%4.4X: CPU %swaiting for interlock\n"), - sysblk.regs[i].cpuad, - sysblk.regs[i].mainsync ? "" : _("not ") - ); logmsg( _(" CPU%4.4X: CPU interlock %sheld\n"), sysblk.regs[i].cpuad, sysblk.regs[i].mainlock ? "" : _("not ") @@ -1888,11 +1925,9 @@ REGS *regs = sysblk.regs + sysblk.pcpu; logmsg( _(" Started mask %8.8X waiting mask %8.8X\n"), sysblk.started_mask, sysblk.waitmask ); -#if MAX_CPU_ENGINES > 1 - logmsg( _(" Broadcast mask %8.8X code %d\n"), - sysblk.broadcast_mask, sysblk.broadcast_code + logmsg( _(" Broadcast count %d code %d\n"), + sysblk.broadcast_count, sysblk.broadcast_code ); -#endif logmsg( _(" Machine check interrupt %spending\n"), IS_IC_MCKPENDING ? "" : _("not ") ); @@ -1922,6 +1957,18 @@ REGS *regs = sysblk.regs + sysblk.pcpu; for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) { + if (dev->ioactive == DEV_SYS_NONE) + strcpy (sysid, "(none)"); + else if (dev->ioactive == DEV_SYS_LOCAL) + strcpy (sysid, "local"); + else + sprintf (sysid, "id=%d", dev->ioactive); + if (dev->busy && !(dev->suspended && dev->ioactive == DEV_SYS_NONE)) + logmsg( _(" DEV%4.4X: busy %s\n"), dev->devnum, sysid ); + if (dev->reserved) + logmsg( _(" DEV%4.4X: reserved %s\n"), dev->devnum, sysid ); + if (dev->suspended) + logmsg( _(" DEV%4.4X: suspended\n"), dev->devnum ); if (dev->pending && (dev->pmcw.flag5 & PMCW5_V)) logmsg( _(" DEV%4.4X: I/O pending\n"), dev->devnum ); if (dev->pcipending && (dev->pmcw.flag5 & PMCW5_V)) @@ -1935,10 +1982,11 @@ REGS *regs = sysblk.regs + sysblk.pcpu; logmsg( _(" I/O interrupt queue: ") ); if (!sysblk.iointq) - logmsg( _("(NULL)\n") ); + logmsg( _("(NULL)") ); + logmsg("\n"); - for (dev = sysblk.iointq; dev; dev = dev->iointq) - logmsg( _(" DEV%4.4X\n"), dev->devnum ); + for (io = sysblk.iointq; io; io = io->next) + logmsg( _(" DEV%4.4X\n"), io->dev->devnum ); return 0; } @@ -1948,7 +1996,7 @@ REGS *regs = sysblk.regs + sysblk.pcpu; /////////////////////////////////////////////////////////////////////// /* icount command - display instruction counts */ -int icount_cmd(char* cmdline, int argc, char *argv[]) +int icount_cmd(int argc, char *argv[], char *cmdline) { int i1, i2; @@ -2068,10 +2116,213 @@ int icount_cmd(char* cmdline, int argc, char *argv[]) #endif /*defined(OPTION_INSTRUCTION_COUNTING)*/ +/* PATCH ISW20030220 - Script command support */ + +static int scr_recursion=0; /* Recursion count (set to 0) */ +static int scr_aborted=0; /* Script abort flag */ +static int scr_uaborted=0; /* Script user abort flag */ +TID scr_tid=0; + +int cscript_cmd(int argc, char *argv[], char *cmdline) +{ + UNREFERENCED(cmdline); + UNREFERENCED(argc); + UNREFERENCED(argv); + if(scr_tid!=0) + { + scr_uaborted=1; + } + return 0; +} + +int script_cmd(int argc, char *argv[], char *cmdline) +{ + + int i; + + UNREFERENCED(cmdline); + if(argc<2) + { + logmsg(_("HHCPN996E The script command requires a filename\n")); + return 1; + } + if(scr_tid==0) + { + scr_tid=thread_id(); + scr_aborted=0; + scr_uaborted=0; + } + else + { + if(scr_tid!=thread_id()) + { + logmsg(_("HHCPN997E Only 1 script may be invoked from the panel at any time\n")); + return 1; + } + } + + for(i=1;i=10) + { + logmsg(_("HHCPN998E Script aborted : Script recursion level exceeded\n")); + scr_aborted=1; + return 0; + } + /* Open RC file. If it doesn't exist, then issue error message + only if this is NOT the RuntimeConfiguration (rc) file */ + + if (!(scrfp = fopen(script_name, "r"))) + { + if (ENOENT != errno && !isrcfile) + logmsg(_("HHCPN007E Script file %s open failed: %s\n"), + script_name, strerror(errno)); + return 0; + if(errno==ENOENT) + { + logmsg(_("HHCPN995E Script file %s not found\n"), + script_name); + } + } + scr_recursion++; + + if(isrcfile) + { + logmsg(_("HHCPN008I Script file processing started using file %s\n"), + script_name); + } + + /* Obtain storage for the SCRIPT file buffer */ + + if (!(scrbuf = malloc (scrbufsize))) + { + logmsg(_("HHCPN009E Script file buffer malloc failed: %s\n"), + strerror(errno)); + fclose(scrfp); + return 0; + } + + for (;;) + { + script_test_userabort(); + if(scr_aborted) + { + break; + } + /* Read a complete line from the SCRIPT file */ + + if (!fgets(scrbuf, scrbufsize, scrfp)) break; + + /* Remove trailing whitespace */ + + for (scrlen = strlen(scrbuf); scrlen && isspace(scrbuf[scrlen-1]); scrlen--); + scrbuf[scrlen] = 0; + + /* '#' == silent comment, '*' == loud comment */ + + if ('#' == scrbuf[0] || '*' == scrbuf[0]) + { + if ('*' == scrbuf[0]) + logmsg ("> %s",scrbuf); + continue; + } + + /* Remove any # comments on the line before processing */ + + if ((p = strchr(scrbuf,'#')) && p > scrbuf) + do *p = 0; while (isspace(*--p) && p >= scrbuf); + + if (strncasecmp(scrbuf,"pause",5) == 0) + { + sscanf(scrbuf+5, "%d", &scr_pause_amt); + + if (scr_pause_amt < 0 || scr_pause_amt > 999) + { + logmsg(_("HHCPN010W Ignoring invalid SCRIPT file pause " + "statement: %s\n"), + scrbuf+5); + continue; + } + + logmsg (_("HHCPN011I Pausing SCRIPT file processing for %d " + "seconds...\n"), + scr_pause_amt); + sleep(scr_pause_amt); + logmsg (_("HHCPN012I Resuming SCRIPT file processing...\n")); + + continue; + } + + /* Process the command */ + + for (p = scrbuf; isspace(*p); p++); + + panel_command(p); + script_test_userabort(); + if(scr_aborted) + { + break; + } + } + + if (feof(scrfp)) + logmsg (_("HHCPN013I EOF reached on SCRIPT file. Processing complete.\n")); + else + { + if(!scr_aborted) + { + logmsg (_("HHCPN014E I/O error reading SCRIPT file: %s\n"), + strerror(errno)); + } + else + { + logmsg (_("HHCPN999I Script %s aborted due to previous conditions\n"),script_name); + scr_uaborted=1; + } + } + + fclose(scrfp); + scr_recursion--; /* Decrement recursion count */ + if(scr_recursion==0) + { + scr_aborted=0; /* reset abort flag */ + scr_tid=0; /* reset script thread id */ + } + + return 0; +} +/* END PATCH ISW20030220 */ + /////////////////////////////////////////////////////////////////////// /* archmode command - set architecture mode */ -int archmode_cmd(char* cmdline, int argc, char *argv[]) +int archmode_cmd(int argc, char *argv[], char *cmdline) { unsigned i; @@ -2128,7 +2379,7 @@ int archmode_cmd(char* cmdline, int argc, char *argv[]) /////////////////////////////////////////////////////////////////////// /* x+ and x- commands - turn switches on or off */ -int OnOffCommand(char* cmdline, int argc, char *argv[]) +int OnOffCommand(int argc, char *argv[], char *cmdline) { BYTE *cmd = (BYTE*) cmdline; /* Copy of panel command */ int oneorzero; /* 1=x+ command, 0=x- */ @@ -2240,10 +2491,142 @@ BYTE c; /* Character work area */ return -1; } +/////////////////////////////////////////////////////////////////////// +/* aea - display aea tables */ + +int aea_cmd(int argc, char *argv[], char *cmdline) +{ + int i; /* Index */ + int matches = 0; /* Number aeID matches */ + REGS *regs; + + UNREFERENCED(cmdline); + UNREFERENCED(argc); + UNREFERENCED(argv); + + regs = sysblk.regs + 0; + logmsg ("aenoarn %d aeID 0x%3.3x\n",regs->aenoarn,regs->aeID); + logmsg (" ix ve key ar a ae\n"); + for (i = 0; i < MAXAEA; i++) + { + logmsg("%s%2.2x %16.16llx %2.2x %2d %d %16.16llx\n", + (regs->VE_G(i) & 0xfff) == regs->aeID ? "*" : " ", i, regs->VE_G(i), + regs->aekey[i], regs->aearn[i], regs->aeacc[i], regs->AE_G(i)); + if ((regs->VE_G(i) & 0xfff) == regs->aeID) matches++; + } + logmsg("%d aeID matches\n", matches); + + return 0; +} + +#if defined(OPTION_DYNAMIC_LOAD) +/////////////////////////////////////////////////////////////////////// +/* ldmod - load a module */ + +int ldmod_cmd(int argc, char *argv[], char *cmdline) +{ + int i; /* Index */ + + UNREFERENCED(cmdline); + + if(argc <= 1) + { + logmsg("Usage: %s \n",argv[0]); + return -1; + } + + for(i = 1; i < argc; i++) + { + logmsg(_("HHCHD100I Loading %s ...\n"),argv[i]); + if(!hdl_load(argv[i], 0)) + logmsg(_("HHCHD101I Module %s loaded\n"),argv[i]); + } + + return 0; +} + +/////////////////////////////////////////////////////////////////////// +/* rmmod - delete a module */ + +int rmmod_cmd(int argc, char *argv[], char *cmdline) +{ + int i; /* Index */ + + UNREFERENCED(cmdline); + + if(argc <= 1) + { + logmsg("Usage: %s \n",argv[0]); + return -1; + } + + for(i = 1; i < argc; i++) + { + logmsg(_("HHCHD102I Unloading %s ...\n"),argv[i]); + if(!hdl_dele(argv[i])) + logmsg(_("HHCHD103I Module %s unloaded\n"),argv[i]); + } + + return 0; +} + +/////////////////////////////////////////////////////////////////////// +/* lsmod - list dynamic modules */ + +int lsmod_cmd(int argc, char *argv[], char *cmdline) +{ + UNREFERENCED(cmdline); + UNREFERENCED(argc); + UNREFERENCED(argv); + + hdl_list(HDL_LIST_DEFAULT); + + return 0; +} + +/////////////////////////////////////////////////////////////////////// +/* lsdep - list module dependencies */ + +int lsdep_cmd(int argc, char *argv[], char *cmdline) +{ + UNREFERENCED(cmdline); + UNREFERENCED(argc); + UNREFERENCED(argv); + + hdl_dlst(); + + return 0; +} +#endif /*defined(OPTION_DYNAMIC_LOAD)*/ + +/////////////////////////////////////////////////////////////////////// +/* evm - ECPS:VM command */ + +#ifdef FEATURE_ECPSVM +int evm_cmd_1(int argc, char *argv[], char *cmdline) +{ + UNREFERENCED(cmdline); + UNREFERENCED(argc); + UNREFERENCED(argv); + + logmsg(_("HHCPN150W evm command is deprecated. Use \"ecpsvm\" instead\n")); + ecpsvm_command(argc,argv); + return 0; +} +int evm_cmd(int argc, char *argv[], char *cmdline) +{ + UNREFERENCED(cmdline); + UNREFERENCED(argc); + UNREFERENCED(argv); + + ecpsvm_command(argc,argv); + return 0; +} +#endif /////////////////////////////////////////////////////////////////////// // Layout of command routing table... -typedef int CMDFUNC(char* cmdline, int argc, char *argv[]); +typedef int CMDFUNC(int argc, char *argv[], char *cmdline); typedef struct _CMDTAB { @@ -2260,8 +2643,8 @@ CMDTAB; /////////////////////////////////////////////////////////////////////// // Define all panel command here... -int ListAllCommands (char* cmdline, int argc, char *argv[]); /*(forward reference)*/ -int HelpCommand (char* cmdline, int argc, char *argv[]); /*(forward reference)*/ +int ListAllCommands (int argc, char *argv[], char *cmdline); /*(forward reference)*/ +int HelpCommand (int argc, char *argv[], char *cmdline); /*(forward reference)*/ CMDTAB Commands[] = { @@ -2278,10 +2661,8 @@ COMMAND ( "cpu", cpu_cmd, "define target cpu for panel display and c COMMAND ( "start", start_cmd, "start CPU (or printer device if argument given)" ) COMMAND ( "stop", stop_cmd, "stop CPU (or printer device if argument given)\n" ) -#if MAX_CPU_ENGINES > 1 COMMAND ( "startall", startall_cmd, "start all CPU's" ) COMMAND ( "stopall", stopall_cmd, "stop all CPU's\n" ) -#endif #ifdef _FEATURE_SYSTEM_CONSOLE COMMAND ( ".reply", g_cmd, "scp command" ) @@ -2308,6 +2689,7 @@ COMMAND ( "ipending", ipending_cmd, "display pending interrupts" ) COMMAND ( "ds", ds_cmd, "display subchannel" ) COMMAND ( "r", r_cmd, "display or alter real storage" ) COMMAND ( "v", v_cmd, "display or alter virtual storage" ) +COMMAND ( "u", u_cmd, "disassemble storage" ) COMMAND ( "devtmax", devtmax_cmd, "display or set max device threads" ) COMMAND ( "k", k_cmd, "display cckd internal trace\n" ) @@ -2318,7 +2700,9 @@ COMMAND ( "devinit", devinit_cmd, "reinitialize device" ) COMMAND ( "devlist", devlist_cmd, "list all devices\n" ) COMMAND ( "sh", sh_cmd, "shell command" ) +COMMAND ( "cache", cache_cmd, "cache command" ) COMMAND ( "cckd", cckd_cmd, "cckd command" ) +COMMAND ( "shrd", shared_cmd, "shrd command" ) COMMAND ( "quiet", quiet_cmd, "toggle automatic refresh of panel display data\n" ) COMMAND ( "b", bset_cmd, "set breakpoint" ) @@ -2330,6 +2714,13 @@ COMMAND ( "savecore", savecore_cmd, "save a core image to file" ) COMMAND ( "loadcore", loadcore_cmd, "load a core image file" ) COMMAND ( "loadtext", loadtext_cmd, "load a text deck file\n" ) +#if defined(OPTION_DYNAMIC_LOAD) +COMMAND ( "ldmod", ldmod_cmd, "load a module" ) +COMMAND ( "rmmod", rmmod_cmd, "delete a module" ) +COMMAND ( "lsmod", lsmod_cmd, "list dynamic modules\n" ) +COMMAND ( "lsdep", lsdep_cmd, "list module dependencies\n" ) +#endif /*defined(OPTION_DYNAMIC_LOAD)*/ + #ifdef OPTION_IODELAY_KLUDGE COMMAND ( "iodelay", iodelay_cmd, "display or set I/O delay value" ) #endif @@ -2342,15 +2733,21 @@ COMMAND ( "toddrag", toddrag_cmd, "display or set TOD clock drag factor" ) #ifdef PANEL_REFRESH_RATE COMMAND ( "panrate", panrate_cmd, "display or set rate at which console refreshes" ) #endif -#ifdef OPTION_SYNCIO COMMAND ( "syncio", syncio_cmd, "display syncio devices statistics" ) -#endif #if defined(OPTION_INSTRUCTION_COUNTING) COMMAND ( "icount", icount_cmd, "display instruction counts" ) #endif #if defined(FISH_HANG) COMMAND ( "FishHangReport", FishHangReport_cmd, "(DEBUG) display thread/lock/event objects" ) #endif +COMMAND ( "script", script_cmd, "Run a sequence of panel commands contained in a file" ) +COMMAND ( "cscript", cscript_cmd, "Cancels a running script thread" ) +#if defined(FEATURE_ECPSVM) +COMMAND ( "evm", evm_cmd_1, "ECPS:VM Commands (Deprecated)" ) +COMMAND ( "ecpsvm", evm_cmd, "ECPS:VM Commands" ) +#endif + +COMMAND ( "aea", aea_cmd, "Display AEA tables" ) COMMAND ( NULL, NULL, NULL ) /* (end of table) */ }; @@ -2358,10 +2755,8 @@ COMMAND ( NULL, NULL, NULL ) /* (end of table) */ /////////////////////////////////////////////////////////////////////// // Main panel command processing function... -#define MAX_CMD_ARGS 12 - int cmd_argc; -BYTE* cmd_argv[MAX_CMD_ARGS]; +BYTE* cmd_argv[MAX_ARGS]; int ProcessPanelCommand (const char* pszCmdLine) { @@ -2373,7 +2768,7 @@ int ProcessPanelCommand (const char* pszCmdLine) { /* (enter) - start CPU (ignore if not instruction stepping) */ if (sysblk.inststep) - rc = start_cmd(NULL,0,NULL); + rc = start_cmd(0,NULL,NULL); return rc; } @@ -2383,7 +2778,13 @@ int ProcessPanelCommand (const char* pszCmdLine) /* Parse the command line into its individual arguments... Note: original command line now sprinkled with nulls */ - parse_args((BYTE*)pszCmdLine, MAX_CMD_ARGS, cmd_argv, &cmd_argc); + parse_args((BYTE*)pszCmdLine, MAX_ARGS, cmd_argv, &cmd_argc); + +#if defined(OPTION_DYNAMIC_LOAD) + if( system_command ) + if( (rc = system_command(cmd_argc, (char**)cmd_argv,pszSaveCmdLine) ) ) + return rc; +#endif /* Route standard formatted commands from our routing table... */ if (cmd_argc) @@ -2391,7 +2792,7 @@ int ProcessPanelCommand (const char* pszCmdLine) { if (!strcasecmp(cmd_argv[0],pCmdTab->pszCommand)) { - rc = pCmdTab->pfnCommand(pszSaveCmdLine,cmd_argc,(char**)cmd_argv); + rc = pCmdTab->pfnCommand(cmd_argc,(char**)cmd_argv,pszSaveCmdLine); free(pszSaveCmdLine); return rc; } @@ -2408,7 +2809,7 @@ int ProcessPanelCommand (const char* pszCmdLine) || !strncasecmp(pszSaveCmdLine,"sfd",3) ) { - rc = ShadowFile_cmd(pszSaveCmdLine,cmd_argc,(char**)cmd_argv); + rc = ShadowFile_cmd(cmd_argc,(char**)cmd_argv,pszSaveCmdLine); free(pszSaveCmdLine); return rc; } @@ -2416,7 +2817,7 @@ int ProcessPanelCommand (const char* pszCmdLine) /* x+ and x- commands - turn switches on or off */ if ('+' == pszSaveCmdLine[1] || '-' == pszSaveCmdLine[1]) { - rc = OnOffCommand(pszSaveCmdLine,cmd_argc,(char**)cmd_argv); + rc = OnOffCommand(cmd_argc,(char**)cmd_argv,pszSaveCmdLine); free(pszSaveCmdLine); return rc; } @@ -2434,7 +2835,7 @@ int ProcessPanelCommand (const char* pszCmdLine) /////////////////////////////////////////////////////////////////////// /* ? command - list all commands */ -int ListAllCommands(char* cmdline, int argc, char *argv[]) +int ListAllCommands(int argc, char *argv[], char *cmdline) { CMDTAB* pCmdTab; @@ -2442,35 +2843,35 @@ int ListAllCommands(char* cmdline, int argc, char *argv[]) UNREFERENCED(argc); UNREFERENCED(argv); - logmsg( _("HHCPN140I Valid panel commands are...\n \n") ); - logmsg( " %-9.9s %s \n \n", "Command", "Description..." ); - logmsg( " %-9.9s %s \n \n", "-------", "-----------------------------------------------" ); + logmsg( _("HHCPN140I Valid panel commands are...\n\n") ); + logmsg( " %-9.9s %s \n", "Command", "Description..." ); + logmsg( " %-9.9s %s \n", "-------", "-----------------------------------------------" ); /* List standard formatted commands from our routing table... */ for (pCmdTab = Commands; pCmdTab->pszCommand; pCmdTab++) - logmsg( " %-9.9s %s \n \n", pCmdTab->pszCommand, _(pCmdTab->pszCmdDesc) ); + logmsg( _(" %-9.9s %s \n"), pCmdTab->pszCommand, pCmdTab->pszCmdDesc ); // List non-standard formatted commands... /* sf commands - shadow file add/remove/set/compress/display */ - logmsg( " %-9.9s %s \n \n", "sf+", _("add shadow file") ); - logmsg( " %-9.9s %s \n \n", "sf-", _("delete shadow file") ); - logmsg( " %-9.9s %s \n \n", "sf=", _("rename shadow file") ); - logmsg( " %-9.9s %s \n \n", "sfc", _("compress shadow files") ); - logmsg( " %-9.9s %s \n \n", "sfd", _("display shadow file stats") ); + logmsg( " %-9.9s %s \n", "sf+", _("add shadow file") ); + logmsg( " %-9.9s %s \n", "sf-", _("delete shadow file") ); + logmsg( " %-9.9s %s \n", "sf=", _("rename shadow file") ); + logmsg( " %-9.9s %s \n", "sfc", _("compress shadow files") ); + logmsg( " %-9.9s %s \n", "sfd", _("display shadow file stats") ); /* x+ and x- commands - turn switches on or off */ - logmsg( " %-9.9s %s \n \n", "t{+/-}", _("turn instruction tracing on/off") ); - logmsg( " %-9.9s %s \n \n", "s{+/-}", _("turn instruction stepping on/off") ); - logmsg( " %-9.9s %s \n \n", "t{+/-}dev", _("turn CCW tracing on/off") ); - logmsg( " %-9.9s %s \n \n", "s{+/-}dev", _("turn CCW stepping on/off") ); + logmsg( " %-9.9s %s \n", "t{+/-}", _("turn instruction tracing on/off") ); + logmsg( " %-9.9s %s \n", "s{+/-}", _("turn instruction stepping on/off") ); + logmsg( " %-9.9s %s \n", "t{+/-}dev", _("turn CCW tracing on/off") ); + logmsg( " %-9.9s %s \n", "s{+/-}dev", _("turn CCW stepping on/off") ); #ifdef OPTION_CKD_KEY_TRACING - logmsg( " %-9.9s %s \n \n", "t{+/-}CKD", _("turn CKD_KEY tracing on/off") ); + logmsg( " %-9.9s %s \n", "t{+/-}CKD", _("turn CKD_KEY tracing on/off") ); #endif - logmsg( " %-9.9s %s \n \n", "f{+/-}adr", _("mark frames unusable/usable") ); + logmsg( " %-9.9s %s \n", "f{+/-}adr", _("mark frames unusable/usable") ); return 0; } @@ -2592,6 +2993,24 @@ CMDHELP ( "loadtext", "Format: \"loadtext filename [address]\". This command is "to the 'loadcore' command except that it loads a text deck file with \"TXT\"\n" "and \"END\" 80 byte records (i.e. an object deck).\n" ) +CMDHELP ( "script", "Format: \"script filename [...filename...]\". Sequentially executes the commands contained\n" + "within the file -filename-. The script file may also contain \"script\" commands,\n" + "but the system ensures that no more than 10 levels of script are invoked at any\n" + "one time (to avoid a recursion loop)\n" + ) + +CMDHELP ( "cscript", "Format: \"cscript\". This command will cancel the currently running script.\n" + "if no script is running, no action is taken\n" + ) + +#if defined(FEATURE_ECPSVM) +CMDHELP ( "ecpsvm", "Format: \"ecpsvm\". This command invokes ECPS:VM Subcommands.\n" + "Type \"ecpsvm help\" to see a list of available commands\n" + ) +CMDHELP ( "evm", "Format: \"evm\". This command is deprecated.\n" + "use \"ecpsvm\" instead\n" + ) +#endif #if defined(FISH_HANG) CMDHELP ( "FishHangReport", "When built with --enable-fthreads --enable-fishhang, a detailed record of\n" @@ -2611,7 +3030,7 @@ CMDHELP ( NULL, NULL ) /* (end of table) */ /////////////////////////////////////////////////////////////////////// /* help command - display additional help for a given command */ -int HelpCommand(char* cmdline, int argc, char *argv[]) +int HelpCommand(int argc, char *argv[], char *cmdline) { HELPTAB* pHelpTab; @@ -2627,7 +3046,7 @@ int HelpCommand(char* cmdline, int argc, char *argv[]) { if (!strcasecmp(pHelpTab->pszCommand,argv[1])) { - logmsg( _(pHelpTab->pszCmdHelp) ); + logmsg( _("%s"),pHelpTab->pszCmdHelp ); return 0; } } @@ -2638,7 +3057,11 @@ int HelpCommand(char* cmdline, int argc, char *argv[]) /////////////////////////////////////////////////////////////////////// +#if defined(OPTION_DYNAMIC_LOAD) +void *panel_command_r (void *cmdline) +#else void *panel_command (void *cmdline) +#endif { #define MAX_CMD_LEN (32768) BYTE cmd[MAX_CMD_LEN]; /* Copy of panel command */ @@ -2687,43 +3110,6 @@ REGS *regs = sysblk.regs + sysblk.pcpu; ProcessPanelCommand(cmd); return NULL; +} -#ifdef OPTION_CKD_KEY_TRACING - #define TSPLUS_CMD \ - "t+=trace, s+=step, t+ckd=CKD_KEY trace, t+devn=CCW trace, s+devn=CCW step\n" -#else - #define TSPLUS_CMD \ - "t+=trace, s+=step, t+devn=CCW trace, s+devn=CCW step\n" -#endif /*OPTION_CKD_KEY_TRACING*/ - -#if MAX_CPU_ENGINES > 1 - #define STSPALL_CMD "startall/stopall=start/stop all CPUs\n" -#else - #define STSPALL_CMD -#endif /*MAX_CPU_ENGINES>1*/ - -#ifdef _FEATURE_SYSTEM_CONSOLE - #define SYSCONS_CMD ".xxx=scp command, !xxx=scp priority messsage\n" -#else - #define SYSCONS_CMD -#endif /*_FEATURE_SYSTEM_CONSOLE*/ - -#ifdef OPTION_TODCLOCK_DRAG_FACTOR - #define TODDRAG_CMD "toddrag nnn = display or set TOD clock drag factor\n" -#else - #define TODDRAG_CMD -#endif /*OPTION_TODCLOCK_DRAG_FACTOR*/ - -#ifdef PANEL_REFRESH_RATE - #define PANRATE_CMD "panrate [fast|slow|nnnn] = display or set panel refresh rate\n" -#else - #define PANRATE_CMD -#endif /*PANEL_REFRESH_RATE*/ - -#if defined(OPTION_INSTRUCTION_COUNTING) - #define ICOUNT_CMD "icount [clear] = display instruction counters\n" -#else - #define ICOUNT_CMD -#endif - - } +/////////////////////////////////////////////////////////////////////// diff --git a/hscmisc.c b/hscmisc.c index e99aaa5..7a8bcdd 100644 --- a/hscmisc.c +++ b/hscmisc.c @@ -4,13 +4,11 @@ #include "hercules.h" - #include "devtype.h" - #include "opcode.h" - #include "inline.h" +#define DISPLAY_INSTRUCTION_OPERANDS #if !defined(_HSCMISC_C) #define _HSCMISC_C @@ -182,10 +180,10 @@ BYTE *s; /* Alteration value pointer */ BYTE delim; /* Operand delimiter */ BYTE c; /* Character work area */ - rc = sscanf(operand, "%Lx%c%Lx%c", &opnd1, &delim, &opnd2, &c); + rc = sscanf(operand, "%llx%c%llx%c", &opnd1, &delim, &opnd2, &c); /* Process storage alteration operand */ - if (rc > 2 && delim == '=') + if (rc > 2 && delim == '=' && newval) { s = strchr (operand, '='); for (n = 0; n < 32;) @@ -306,6 +304,8 @@ int protect = 0; U16 xcode; REGS gregs, hgregs; +// FIXME: cygwin emits bad code here so we have the next stmt: + if (!regs) return 0; gregs = *regs; gregs.ghostregs = 1; @@ -443,6 +443,107 @@ U16 xcode; /* Exception code */ } /* end function display_virt */ +/*-------------------------------------------------------------------*/ +/* Disassemble real */ +/*-------------------------------------------------------------------*/ +static void ARCH_DEP(disasm_stor) (REGS *regs, char *opnd) +{ +U64 saddr, eaddr; /* Range start/end addresses */ +U64 maxadr; /* Highest real storage addr */ +RADR raddr; /* Real storage address */ +RADR aaddr; /* Absolute storage address */ +int stid = -1; +int len; /* Number of bytes to alter */ +int i; /* Loop counter */ +int ilc; +BYTE inst[6]; /* Storage alteration value */ +BYTE opcode; +U16 xcode; +char type; + + /* Set limit for address range */ + #if defined(FEATURE_ESAME) + maxadr = 0xFFFFFFFFFFFFFFFFULL; + #else /*!defined(FEATURE_ESAME)*/ + maxadr = 0x7FFFFFFF; + #endif /*!defined(FEATURE_ESAME)*/ + + while((opnd && *opnd != '\0') && + (*opnd == ' ' || *opnd == '\t')) + opnd++; + + if(REAL_MODE(®s->psw)) + type = 'R'; + else + type = 'V'; + + switch(toupper(*opnd)) { + case 'R': /* real */ + case 'V': /* virtual */ + case 'P': /* primary */ + case 'H': /* home */ + type = toupper(*opnd); + opnd++; + } + + /* Parse the range or alteration operand */ + len = parse_range (opnd, maxadr, &saddr, &eaddr, NULL); + if (len < 0) return; + + /* Display real storage */ + for (i = 0; i < 999 && saddr <= eaddr; i++) + { + + if(type == 'R') + raddr = saddr; + else + { + if((xcode = ARCH_DEP(virt_to_abs) (&raddr, &stid, saddr, 0, regs, ACCTYPE_INSTFETCH) )) + { + logmsg(_("Storage not accessible code = %4.4X\n"), xcode); + return; + } + } + + aaddr = APPLY_PREFIXING (raddr, regs->PX); + if (aaddr > regs->mainlim) + { + logmsg(_("Adressing exception\n")); + return; + } + + opcode = regs->mainstor[aaddr]; + ilc = (opcode < 0x40) ? 2 : (opcode < 0xC0) ? 4 : 6; + + if (aaddr + ilc > regs->mainlim) + { + logmsg(_("Adressing exception\n")); + return; + } + + memcpy(inst, regs->mainstor + aaddr, ilc); + logmsg("%c" F_RADR ": %2.2X%2.2X", + stid == TEA_ST_PRIMARY ? 'P' : + stid == TEA_ST_HOME ? 'H' : + stid == TEA_ST_SECNDRY ? 'S' : 'R', + raddr, inst[0], inst[1]); + if(ilc > 2) + { + logmsg("%2.2X%2.2X", inst[2], inst[3]); + if(ilc > 4) + logmsg("%2.2X%2.2X ", inst[4], inst[5]); + else + logmsg(" "); + } + else + logmsg(" "); + DISASM_INSTRUCTION(inst); + saddr += ilc; + } /* end for(i) */ + +} /* end function disasm_stor */ + + /*-------------------------------------------------------------------*/ /* Process real storage alter/display command */ /*-------------------------------------------------------------------*/ @@ -840,15 +941,38 @@ void display_inst(REGS *regs, BYTE *inst) } +void disasm_stor(REGS *regs, char *opnd) +{ + switch(regs->arch_mode) { +#if defined(_370) + case ARCH_370: + s370_disasm_stor(regs,opnd); + break; +#endif +#if defined(_390) + case ARCH_390: + s390_disasm_stor(regs,opnd); + break; +#endif +#if defined(_900) + case ARCH_900: + z900_disasm_stor(regs,opnd); + break; +#endif + } + +} + + /*-------------------------------------------------------------------*/ /* Execute a Unix or Windows command */ /* Returns the system command status code */ /*-------------------------------------------------------------------*/ int herc_system (char* command) { -#ifdef WIN32 +#if defined(WIN32) || defined(__APPLE__) return system(command); -#else /* !WIN32 */ +#else /* !WIN32 && !APPLE */ extern char **environ; int pid, status; @@ -864,9 +988,8 @@ int pid, status; { char *argv[4]; - dup2(sysblk.msgpiper, STDIN_FILENO); - dup2(fileno(sysblk.msgpipew), STDOUT_FILENO); - dup2(fileno(sysblk.msgpipew), STDERR_FILENO); + /* Redirect stderr (screen) to hercules log task */ + dup2(STDOUT_FILENO, STDERR_FILENO); /* Drop ROOT authority (saved uid) */ SETMODE(TERM); diff --git a/hscutl.c b/hscutl.c new file mode 100644 index 0000000..2ad195a --- /dev/null +++ b/hscutl.c @@ -0,0 +1,493 @@ +/* HSCUTL.C */ +/* Implementation of functions used in hercules that */ +/* may be missing on some platform ports */ +/* (c) 2003 Ivan Warren & Others */ +/* Released under the Q Public License */ +/* This file is portion of the HERCULES S/370, S/390 */ +/* z/Architecture emulator */ +#include "hercules.h" + + +#if defined(NEED_GETOPT_WRAPPER) +/* getopt dynamic linking kludge */ +/* for some odd reason, on some platforms */ +/* (namely cygwin & possibly Darwin) */ +/* dynamically linking to the libc */ +/* imports STATIC versions of getopt */ +/* and getopt_long into the linkedited */ +/* shared library. If any program then */ +/* link edits against BOTH the shared library */ +/* and libc, the linker complains about */ +/* getopt and/or getopt_long being defined */ +/* multiple times. In an effort to overcome this, */ +/* I am defining a stub version of getopt & getop_long */ +/* that can be called by loadable modules */ +/* --Ivan */ + +int herc_opterr=0; +char *herc_optarg=NULL; +int herc_optopt=0; +int herc_optind=1; +#if defined(NEED_GETOPT_OPTRESET) +int herc_optreset=0; +#endif + +#if defined(HAVE_GETOPT_LONG) +#include +int herc_getopt_long(int ac, + char * const av[], + const char *opt, + const struct option *lo, + int *li) +{ + int rc; +#if defined(NEED_GETOPT_OPTRESET) + optreset=herc_optreset; +#endif + optind=herc_optind; + rc=getopt_long(ac,av,opt,lo,li); +#if defined(NEED_GETOPT_OPTRESET) + herc_optreset=optreset; +#endif + herc_optarg=optarg; + herc_optind=optind; + herc_optopt=optind; + herc_opterr=optind; + return(rc); +} +#endif +int herc_getopt(int ac,char * const av[],const char *opt) +{ + int rc; +#if defined(NEED_GETOPT_OPTRESET) + optreset=herc_optreset; +#endif + rc=getopt(ac,av,opt); +#if defined(NEED_GETOPT_OPTRESET) + herc_optreset=optreset; +#endif + herc_optarg=optarg; + herc_optind=optind; + herc_optopt=optind; + herc_opterr=optind; + return(rc); +} +#endif /* NEED_GETOPT_WRAPPER */ + +#if defined(BUILTIN_STRERROR_R) +static LOCK strerror_lock; +void strerror_r_init(void) +{ + initialize_lock(&strerror_lock); +} + +int strerror_r(int err,char *bfr,size_t sz) +{ + char *wbfr; + obtain_lock(&strerror_lock); + wbfr=strerror(err); + if(wbfr==NULL || (int)wbfr==-1) + { + release_lock(&strerror_lock); + return(-1); + } + if(sz<=strlen(wbfr)) + { + errno=ERANGE; + release_lock(&strerror_lock); + return(-1); + } + strncpy(bfr,wbfr,sz); + release_lock(&strerror_lock); + return(0); +} + +#endif /* defined(BUILTIN_STRERROR_R) */ + +#if !defined(HAVE_STRLCPY) +/* $OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $ */ + +/* ** NOTE ** returns 'size_t' and NOT 'char*' like strncpy! */ +/* + * Copyright (c) 1998 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char *rcsid = "$OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include + +/* + * Copy src to string dst of size siz. At most siz-1 characters + * will be copied. Always NUL terminates (unless siz == 0). + * Returns strlen(src); if retval >= siz, truncation occurred. + */ + +/* ** NOTE ** returns 'size_t' and NOT 'char*' like strncpy! */ + +size_t +strlcpy(char *dst, const char *src, size_t siz) +{ + register char *d = dst; + register const char *s = src; + register size_t n = siz; + + /* Copy as many bytes as will fit */ + if (n != 0 && --n != 0) { + do { + if ((*d++ = *s++) == 0) + break; + } while (--n != 0); + } + + /* Not enough room in dst, add NUL and traverse rest of src */ + if (n == 0) { + if (siz != 0) + *d = '\0'; /* NUL-terminate dst */ + while (*s++) + ; + } + + return(s - src - 1); /* count does not include NUL */ +} +#endif // !defined(HAVE_STRLCPY) + +#if !defined(HAVE_STRLCAT) +/* $OpenBSD: strlcat.c,v 1.11 2003/06/17 21:56:24 millert Exp $ */ + +/* ** NOTE ** returns 'size_t' and NOT 'char*' like strncpy! */ +/* + * Copyright (c) 1998 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char *rcsid = "$OpenBSD: strlcat.c,v 1.11 2003/06/17 21:56:24 millert Exp $"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include + +/* + * Appends src to string dst of size siz (unlike strncat, siz is the + * full size of dst, not space left). At most siz-1 characters + * will be copied. Always NUL terminates (unless siz <= strlen(dst)). + * Returns strlen(src) + MIN(siz, strlen(initial dst)). + * If retval >= siz, truncation occurred. + */ + +/* ** NOTE ** returns 'size_t' and NOT 'char*' like strncat! */ + +size_t +strlcat(char *dst, const char *src, size_t siz) +{ + register char *d = dst; + register const char *s = src; + register size_t n = siz; + size_t dlen; + + /* Find the end of dst and adjust bytes left but don't go past end */ + while (n-- != 0 && *d != '\0') + d++; + dlen = d - dst; + n = siz - dlen; + + if (n == 0) + return(dlen + strlen(s)); + while (*s != '\0') { + if (n != 1) { + *d++ = *s; + n--; + } + s++; + } + *d = '\0'; + + return(dlen + (s - src)); /* count does not include NUL */ +} +#endif // !defined(HAVE_STRLCAT) + +#if defined(OPTION_CONFIG_SYMBOLS) + +/* The following structures are defined herein because they are private structures */ +/* that MUST be opaque to the outside world */ + +typedef struct _SYMBOL_TOKEN +{ + char *var; + char *val; +} SYMBOL_TOKEN; + +#define SYMBOL_TABLE_INCREMENT 256 +#define SYMBOL_BUFFER_GROWTH 256 +#define MAX_SYMBOL_SIZE 31 +#define SYMBOL_QUAL_1 '$' +#define SYMBOL_QUAL_2 '(' +#define SYMBOL_QUAL_3 ')' + +static SYMBOL_TOKEN **symbols=NULL; +static int symbol_count=0; +static int symbol_max=0; +#if !defined(MIN) +#define MIN(_x,_y) ( ( ( _x ) < ( _y ) ) ? ( _x ) : ( _y ) ) +#endif /* !defined(MIN) */ + +/* This function retrieves or allocates a new SYMBOL_TOKEN */ +static SYMBOL_TOKEN *get_symbol_token(const char *sym,int alloc) +{ + SYMBOL_TOKEN *tok; + int i; + + for(i=0;ivar,sym)==0) + { + return(symbols[i]); + } + } + if(!alloc) + { + return(NULL); + } + if(symbol_count>=symbol_max) + { + symbol_max+=SYMBOL_TABLE_INCREMENT; + if(symbols==NULL) + { + symbols=malloc(sizeof(SYMBOL_TOKEN *)*symbol_max); + if(symbols==NULL) + { + symbol_max=0; + symbol_count=0; + return(NULL); + } + } + else + { + symbols=realloc(symbols,sizeof(SYMBOL_TOKEN *)*symbol_max); + if(symbols==NULL) + { + symbol_max=0; + symbol_count=0; + return(NULL); + } + } + } + tok=malloc(sizeof(SYMBOL_TOKEN)); + if(tok==NULL) + { + return(NULL); + } + tok->var=malloc(MIN(MAX_SYMBOL_SIZE+1,strlen(sym)+1)); + if(tok->var==NULL) + { + free(tok); + return(NULL); + } + strncpy(tok->var,sym,MIN(MAX_SYMBOL_SIZE,strlen(sym))); + tok->val=NULL; + symbols[symbol_count]=tok; + symbol_count++; + return(tok); +} + +void set_symbol(const char *sym,const char *value) +{ + SYMBOL_TOKEN *tok; + tok=get_symbol_token(sym,1); + if(tok==NULL) + { + return; + } + if(tok->val!=NULL) + { + free(tok->val); + } + tok->val=malloc(strlen(value)+1); + if(tok->val==NULL) + { + return; + } + strcpy(tok->val,value); + return; +} + +const char *get_symbol(const char *sym) +{ + SYMBOL_TOKEN *tok; + tok=get_symbol_token(sym,0); + if(tok==NULL) + { + return(NULL); + } + return(tok->val); +} + +static void buffer_addchar_and_alloc(char **bfr,char c,int *ix_p,int *max_p) +{ + char *buf; + int ix; + int mx; + buf=*bfr; + ix=*ix_p; + mx=*max_p; + if((ix+1)>=mx) + { + mx+=SYMBOL_BUFFER_GROWTH; + if(buf==NULL) + { + buf=malloc(mx); + } + else + { + buf=realloc(buf,mx); + } + *bfr=buf; + *max_p=mx; + } + buf[ix++]=c; + buf[ix]=0; + *ix_p=ix; + return; +} +static void append_string(char **bfr,char *text,int *ix_p,int *max_p) +{ + int i; + for(i=0;text[i]!=0;i++) + { + buffer_addchar_and_alloc(bfr,text[i],ix_p,max_p); + } + return; +} + +static void append_symbol(char **bfr,char *sym,int *ix_p,int *max_p) +{ + char *txt; + txt=(char *)get_symbol(sym); + if(txt==NULL) + { + txt="**UNRESOLVED**"; + } + append_string(bfr,txt,ix_p,max_p); + return; +} + +char *resolve_symbol_string(const char *text) +{ + char *resstr; + int curix,maxix; + char cursym[MAX_SYMBOL_SIZE+1]; + int cursymsize=0; + int q1,q2; + int i; + + /* Quick check - look for QUAL1 ('$') or QUAL2 ('(').. if not found, return the string as-is */ + if(!strchr(text,SYMBOL_QUAL_1) || !strchr(text,SYMBOL_QUAL_2)) + { + /* Malloc anyway - the caller will free() */ + resstr=malloc(strlen(text)+1); + strcpy(resstr,text); + return(resstr); + } + q1=0; + q2=0; + curix=0; + maxix=0; + resstr=NULL; + for(i=0;text[i]!=0;i++) + { + if(q1) + { + if(text[i]==SYMBOL_QUAL_2) + { + q2=1; + q1=0; + continue; + } + q1=0; + buffer_addchar_and_alloc(&resstr,SYMBOL_QUAL_1,&curix,&maxix); + buffer_addchar_and_alloc(&resstr,text[i],&curix,&maxix); + continue; + } + if(q2) + { + if(text[i]==SYMBOL_QUAL_3) + { + append_symbol(&resstr,cursym,&curix,&maxix); + cursymsize=0; + q2=0; + continue; + } + if(cursymsizeval); + if(tok->var!=NULL) + { + free(tok->var); + } + free(tok); + symbols[i]=NULL; + } + free(symbols); + symbol_count=0; + symbol_max=0; + return; +} + +#endif /* #if defined(OPTION_CONFIG_SYMBOLS) */ diff --git a/hscutl.h b/hscutl.h new file mode 100644 index 0000000..3a4e0e5 --- /dev/null +++ b/hscutl.h @@ -0,0 +1,85 @@ +#ifndef __HSCUTL_H__ +#define __HSCUTL_H__ + +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif + +#if defined(BUILTIN_STRERROR_R) +void strerror_r_init(void); +int strerror_r(int, char *, size_t); +#endif /* BUILTIN_STRERROR_R */ + +#if defined(OPTION_CONFIG_SYMBOLS) +void set_symbol(const char *,const char *); +const char *get_symbol(const char *); +char *resolve_symbol_string(const char *); +void kill_all_symbols(void); +#endif + + +#if defined(__CYGWIN__) + +// Cygwin w32api/winbase.h updates +// REALTIME_PRIORITY_CLASS 256 // -20 +// HIGH_PRIORITY_CLASS 128 // -15 +#ifndef ABOVE_NORMAL_PRIORITY_CLASS +#define ABOVE_NORMAL_PRIORITY_CLASS 32768 // -8 +#endif +// NORMAL_PRIORITY_CLASS 32 // 0 +#ifndef BELOW_NORMAL_PRIORITY_CLASS +#define BELOW_NORMAL_PRIORITY_CLASS 16384 // 8 +#endif +// IDLE_PRIORITY_CLASS 64 // 15 + +// Cygwin sys/resource.h updates +#define PRIO_PROCESS 0 +#define PRIO_PGRP 1 +#define PRIO_USER 2 + +int getpriority(int, int); +int setpriority(int, int, int); + +#endif /*defined(__CYGWIN__)*/ + +#if !defined(HAVE_STRLCPY) +/* $OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $ */ +/* + * Copyright (c) 1998 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + */ +/* + * Copy src to string dst of size siz. At most siz-1 characters + * will be copied. Always NUL terminates (unless siz == 0). + * Returns strlen(src); if retval >= siz, truncation occurred. + */ +/* ** NOTE ** returns 'size_t' and NOT 'char*' like strncpy! */ +size_t +strlcpy(char *dst, const char *src, size_t siz); +#endif + +#if !defined(HAVE_STRLCAT) +/* $OpenBSD: strlcat.c,v 1.11 2003/06/17 21:56:24 millert Exp $ */ +/* + * Copyright (c) 1998 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + */ +/* + * Appends src to string dst of size siz (unlike strncat, siz is the + * full size of dst, not space left). At most siz-1 characters + * will be copied. Always NUL terminates (unless siz <= strlen(dst)). + * Returns strlen(src) + MIN(siz, strlen(initial dst)). + * If retval >= siz, truncation occurred. + */ +/* ** NOTE ** returns 'size_t' and NOT 'char*' like strncat! */ +size_t +strlcat(char *dst, const char *src, size_t siz); +#endif + +#endif /* __HSCUTL_H__ */ diff --git a/hscutl2.c b/hscutl2.c new file mode 100644 index 0000000..1422e4c --- /dev/null +++ b/hscutl2.c @@ -0,0 +1,234 @@ +/**********************************************************************/ +/* */ +/* HSCUTL2.C */ +/* */ +/* (c) 2003 Mark L. Gaubatz and others */ +/* */ +/* Implementation of functions used in Hercules that may be missing */ +/* on some platform ports. */ +/* */ +/* HSCUTL2.C differs from HSCUTL.C in that the only Hercules header */ +/* files permitted are config.h and hscutl.h. This is necessary to */ +/* include some header files that conflict with definitions in some */ +/* Hercules header files. */ +/* */ +/* Released under the Q Public License */ +/* (http://www.conmicro.cx/hercules/herclic.html) */ +/* as modifications to Hercules. */ +/* */ +/* This file is portion of the HERCULES S/370, S/390 and */ +/* z/Architecture emulator. */ +/* */ +/**********************************************************************/ + +#include /* Needed for size_t declaration */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "hscutl.h" /* Hercules Utilities */ + + +/**********************************************************************/ +/* */ +/* CYGWIN Patches */ +/* */ +/* The following functional equivalents are provided for the */ +/* CYGWIN environment: */ +/* */ +/* int getpriority(int which, int who); */ +/* int setpriority(int which, int who, int prio); */ +/* */ +/* */ +/**********************************************************************/ + +#if defined(__CYGWIN__) + +#include +#include + + +// Windows Unix +// THREAD_PRIORITY_TIME_CRITICAL 15 -20 +// THREAD_PRIORITY_HIGHEST 2 -15 +// THREAD_PRIORITY_ABOVE_NORMAL 1 -8 +// THREAD_PRIORITY_NORMAL 0 0 +// THREAD_PRIORITY_BELOW_NORMAL -1 8 +// THREAD_PRIORITY_LOWEST -2 15 +// THREAD_PRIORITY_IDLE -15 20 + + +/**********************************************************************/ +/* */ +/* int getpriority(int which , int who ); */ +/* */ +/* Notes: */ +/* */ +/* 1. PRIO_USER not supported. */ +/* 2. who may only be specified as 0, for the current */ +/* process or process group id. */ +/* */ +/* */ +/**********************************************************************/ + +inline int +getpriority_process(int who) +{ + + HANDLE process; + DWORD priority; + + if (who) + return EINVAL; + + process = (HANDLE) -1; + priority = GetPriorityClass (process); + + switch (priority) { + case REALTIME_PRIORITY_CLASS: return -20; + case HIGH_PRIORITY_CLASS: return -15; + case ABOVE_NORMAL_PRIORITY_CLASS: return -8; + case NORMAL_PRIORITY_CLASS: return 0; + case BELOW_NORMAL_PRIORITY_CLASS: return 8; + } + /* IDLE_PRIORITY_CLASS: */ return 15; +} + + +inline int +getpriority_thread(int who) +{ + + HANDLE thread; + int priority; + + if (who) + return EINVAL; + + thread = GetCurrentThread(); + priority = GetThreadPriority (thread); + + switch (priority) { + case THREAD_PRIORITY_TIME_CRITICAL: return -20; + case THREAD_PRIORITY_HIGHEST: return -15; + case THREAD_PRIORITY_ABOVE_NORMAL: return -8; + case THREAD_PRIORITY_NORMAL: return 0; + case THREAD_PRIORITY_BELOW_NORMAL: return 8; + case THREAD_PRIORITY_LOWEST: return 15; + } + /* THREAD_PRIORITY_IDLE: */ return 20; +} + + +inline int +getpriority_user(int who) +{ + if (who) + return EINVAL; + return 0; +} + + +int +getpriority(int which , int who ) +{ + switch (which) { + case PRIO_PROCESS: + return getpriority_thread(who); + case PRIO_PGRP: + return getpriority_process(who); + case PRIO_USER: + return getpriority_user(who); + } + return EINVAL; +} + + +/**********************************************************************/ +/* */ +/* int setpriority(int which , int who , int prio ); */ +/* */ +/* Notes: */ +/* */ +/* 1. PRIO_USER not supported. */ +/* 2. who may only be specified as 0, for the current */ +/* process or process group id. */ +/* */ +/* */ +/**********************************************************************/ + +inline int +setpriority_process(int who , int prio ) +{ + + HANDLE process; + DWORD priority; + + if (who) + return EINVAL; + + process = (HANDLE) -1; /* Force to current process */ + + if (prio < -15) priority = REALTIME_PRIORITY_CLASS; + else if (prio < -8) priority = HIGH_PRIORITY_CLASS; + else if (prio < 0) priority = ABOVE_NORMAL_PRIORITY_CLASS; + else if (prio < 8) priority = NORMAL_PRIORITY_CLASS; + else if (prio < 15) priority = BELOW_NORMAL_PRIORITY_CLASS; + else priority = IDLE_PRIORITY_CLASS; + + if (!SetPriorityClass (process, priority)) + return GetLastError(); + return 0; +} + + +inline int +setpriority_thread(int who , int prio ) +{ + + HANDLE thread; + int priority; + + if (who) + return EINVAL; + + thread = GetCurrentThread(); + + if (prio < -15) priority = THREAD_PRIORITY_TIME_CRITICAL; + else if (prio < -8) priority = THREAD_PRIORITY_HIGHEST; + else if (prio < 0) priority = THREAD_PRIORITY_ABOVE_NORMAL; + else if (prio < 8) priority = THREAD_PRIORITY_NORMAL; + else if (prio < 15) priority = THREAD_PRIORITY_BELOW_NORMAL; + else if (prio < 20) priority = THREAD_PRIORITY_LOWEST; + else priority = THREAD_PRIORITY_IDLE; + + if (!SetThreadPriority (thread, priority)) + return GetLastError(); + return 0; +} + + +inline int +setpriority_user(int who , int prio ) +{ + if (who) + return EINVAL; + return 0; /* Ignore */ + prio = prio; /* Unreferenced */ +} + + +int +setpriority(int which , int who , int prio ) +{ + switch (which) { + case PRIO_PROCESS: + return setpriority_thread(who, prio); + case PRIO_PGRP: + return setpriority_process(who, prio); + case PRIO_USER: + return setpriority_user(who, prio); + } + return EINVAL; +} + +#endif /*defined(__CYGWIN__)*/ diff --git a/hsys.c b/hsys.c new file mode 100644 index 0000000..9b384c6 --- /dev/null +++ b/hsys.c @@ -0,0 +1,11 @@ +#include "hercules.h" + +SYSBLK sysblk; + +#if defined(EXTERNALGUI) +int extgui; +#endif + +#if defined(OPTION_W32_CTCI) +int (*debug_tt32_stats)(int); +#endif diff --git a/html/Makefile.am b/html/Makefile.am index 82ba47a..4f608ee 100644 --- a/html/Makefile.am +++ b/html/Makefile.am @@ -1,15 +1,16 @@ dist_pkgdata_DATA = cckddasd.html hercinst.html hercnew.html \ - hercconf.html herclic.html hercrdr.html herctcp.html \ - hercfaq.html hercload.html index.html hercules.css \ + hercconf.html herclic.html hercrdr.html herctcp.html \ + hercfaq.html hercload.html index.html hercules.css \ hercules.html tasks.html fishgui.html hercmsg.html \ hercmscf.html hercmscp.html hercmsct.html hercmsda.html \ - hercmsdc.html hercmsdi.html hercmsdl.html hercmsds.html \ + hercmsdc.html hercmsdg.html hercmsdi.html hercmsdl.html hercmsds.html \ hercmsdt.html hercmsdu.html hercmshe.html hercmshg.html \ hercmshm.html hercmsht.html hercmshu.html hercmsif.html \ hercmsin.html hercmslc.html hercmspn.html hercmspr.html \ hercmspu.html hercmsrd.html hercmssd.html hercmsta.html \ hercmstc.html hercmste.html hercmstm.html hercmsts.html \ - hercmstu.html + hercmstt.html hercmstu.html hercmslg.html hercmsca.html \ + hercrnot.html include_sources = include/header.htmlpart include/footer.htmlpart diff --git a/html/Makefile.in b/html/Makefile.in index 1cbfa72..bfa86cd 100644 --- a/html/Makefile.in +++ b/html/Makefile.in @@ -65,16 +65,27 @@ EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ PATH_SEPARATOR = @PATH_SEPARATOR@ AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +EGREP = @EGREP@ +F77 = @F77@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ HAVE_LIB = @HAVE_LIB@ +INCLTDL = @INCLTDL@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ @@ -82,16 +93,23 @@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LIB = @LIB@ +LIBADD_DL = @LIBADD_DL@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ +LIBLTDL = @LIBLTDL@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LN_S = @LN_S@ LTLIB = @LTLIB@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ MAINT = @MAINT@ MKINSTALLDIRS = @MKINSTALLDIRS@ +OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POSUB = @POSUB@ RANLIB = @RANLIB@ +RC = @RC@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ @@ -99,18 +117,20 @@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ +modexecdir = @modexecdir@ dist_pkgdata_DATA = cckddasd.html hercinst.html hercnew.html \ - hercconf.html herclic.html hercrdr.html herctcp.html \ - hercfaq.html hercload.html index.html hercules.css \ + hercconf.html herclic.html hercrdr.html herctcp.html \ + hercfaq.html hercload.html index.html hercules.css \ hercules.html tasks.html fishgui.html hercmsg.html \ hercmscf.html hercmscp.html hercmsct.html hercmsda.html \ - hercmsdc.html hercmsdi.html hercmsdl.html hercmsds.html \ + hercmsdc.html hercmsdg.html hercmsdi.html hercmsdl.html hercmsds.html \ hercmsdt.html hercmsdu.html hercmshe.html hercmshg.html \ hercmshm.html hercmsht.html hercmshu.html hercmsif.html \ hercmsin.html hercmslc.html hercmspn.html hercmspr.html \ hercmspu.html hercmsrd.html hercmssd.html hercmsta.html \ hercmstc.html hercmste.html hercmstm.html hercmsts.html \ - hercmstu.html + hercmstt.html hercmstu.html hercmslg.html hercmsca.html \ + hercrnot.html include_sources = include/header.htmlpart include/footer.htmlpart @@ -152,6 +172,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configu $(AUTOMAKE) --gnu html/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool uninstall-info-am: dist_images_pkgdataDATA_INSTALL = $(INSTALL_DATA) install-dist_images_pkgdataDATA: $(dist_images_pkgdata_DATA) @@ -270,11 +299,11 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic mostlyclean-am +clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -distclean-am: clean-am distclean-generic +distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am @@ -301,22 +330,22 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-generic +mostlyclean-am: mostlyclean-generic mostlyclean-libtool uninstall-am: uninstall-dist_images_pkgdataDATA \ uninstall-dist_include_pkgdataDATA uninstall-dist_pkgdataDATA \ uninstall-info-am -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am \ - install-dist_images_pkgdataDATA \ +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am info info-am install install-am install-data \ + install-data-am install-dist_images_pkgdataDATA \ install-dist_include_pkgdataDATA install-dist_pkgdataDATA \ install-exec install-exec-am install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic uninstall uninstall-am \ - uninstall-dist_images_pkgdataDATA \ + mostlyclean mostlyclean-generic mostlyclean-libtool uninstall \ + uninstall-am uninstall-dist_images_pkgdataDATA \ uninstall-dist_include_pkgdataDATA uninstall-dist_pkgdataDATA \ uninstall-info-am diff --git a/html/hercconf.html b/html/hercconf.html index 8dd8b24..e014ce3 100644 --- a/html/hercconf.html +++ b/html/hercconf.html @@ -1,12 +1,12 @@ -Hercules Version 2: Configuration File +Hercules Version 3: Configuration File -

Hercules Version 2: Configuration File

+

Hercules Version 3: Configuration File

This page describes the configuration file for the Hercules S/370, ESA/390, and z/Architecture emulator. @@ -24,15 +24,21 @@

Example configuration file

CPUSERIAL 000611 CPUMODEL 3090 + CPUVERID FD MAINSIZE 64 XPNDSIZE 0 CODEPAGE default CNSLPORT 3270 HTTPPORT 8081 HTTPROOT /usr/local/share/hercules/ + SHRDPORT 3990 + DIAG8CMD disable NUMCPU 1 NUMVEC 1 + HERCPRIO 0 CPUPRIO 15 + DEVPRIO 8 + TODPRIO -20 ARCHMODE ESA/390 LOADPARM 0120.... SYSEPOCH 1900 @@ -52,14 +58,12 @@

Example configuration file

0120 3380 mvsv5r.120 0121 3380 mvsv5d.121 0122 3380 mvswk1.122 + 0123 3380 192.168.1.100 0140 3370 dosres.140 0141 3370 syswk1.141 - 0200 3270 - 0201 3270 - 0202 3270 + 0200.4 3270 0300 3370 sysres.300 0400 3088 CTCI /dev/tun0 1500 192.168.200.1 192.168.200.2 255.255.255.0 - 0401 3088 CTCI /dev/tun0 1500 192.168.200.1 192.168.200.2 255.255.255.0 0410 3088 CTCT 30880 192.168.100.2 30880 2048 0411 3088 CTCT 30881 192.168.100.2 30881 2048 0580 3420 ickdsf.ipl @@ -84,6 +88,11 @@

System parameters

CPUMODEL xxxx
specifies the 4 hexadecimal digit CPU model number stored by the STIDP instruction +
CPUVERID xx +
specifies the 2 hexadecimal digit CPU version code + stored by the STIDP instruction. + The default version code is FD when ARCHMODE S/370 or ARCHMODE ESA/390 + is specified. For the ESAME architecture mode 00 is used as default.
MAINSIZE nnnn
specifies the main storage size in megabytes, where nnnn is a decimal number @@ -117,35 +126,77 @@

System parameters

"K:\Hercules\html\", then you should specify "/cygdrive/k/Hercules/html/" on your HTTPROOT statement. +
SHRDPORT nnnn +
specifies the port number (in decimal) on which the Shared Device server + will listen. Specifying SHRDPORT will allow other Hercules instances + to access devices on this instance. (Currently only DASD devices may + be shared). By default, the other Hercules instances (clients) will + use port 3990. If you specify a different port number, then you will + have to specify this port number on the device statement for the other + Hercules clients. + If no SHRDPORT statement is present then the Shared Device server thread + will not be activated.
+
DIAG8CMD disable/enable +
When set to enable, commands issued through diagnose 8 will be + executed by hercules as hercules commands. When set to disable, + commands issued through the diagnose 8 interface will be ignored. + The default is disable. Note that when this feature is enabled, systems + running under hercules can even issue host commands through the hercules + sh command. Enabling this feature may have security consequences.
CNSLPORT nnnn
specifies the port number (in decimal) to which tn3270 and telnet clients will connect +
The CNSLPORT statement may also have the form of host:port, where + the telnet console server will bind to the specified address.
NUMCPU nn
specifies the number of emulated CPUs. Note: Multiprocessor emulation is only available when the definition of the compile-time variable MAX_CPU_ENGINES - in the file hercules.h has a value of more than 1. + in the file config.h has a value of more than 1. + Note: current versions of Hercules already have this value + set to 2 by default, so all you need to do is specify + NUMCPU 2 + in your configuration file. If you wish to set a different value + for MAX_CPU_ENGINES, use the + --enable-multi-cpu=NUMBER + option when you do your ./configure before doing your + make. Multiprocessor emulation works best - if your system has more than physical CPU, but you can - emulate multiple CPUs even on a uniprocessor system - and you may still achieve a small performance benefit. - There is no point in specifying NUMCPU greater than 1 unless - your operating system is able to support multiple CPUs, and - if you do not need multiprocessor emulation then setting - MAX_CPU_ENGINES to 1 at compile time may improve performance. + if your host system actually has more than one physical CPU, but you can + still emulate multiple CPUs nervertheless even on a uniprocessor system + (and you might even achieve a small performance benefit when you do). + There is little point, however, in specifying NUMCPU greater + than 1 unless your guest operating system (running under Hercules) is + actually able to support multiple CPUs (and if you do not actually need + multiprocessor emulation, then setting MAX_CPU_ENGINES to 1 at + compile time might even produce a slight performance advantage too).
NUMVEC nn
specifies the number of emulated vector facilities. Default is one per CPU. Only available by default in ESA/390 mode. +
HERCPRIO nn +
specifies the process priority for Hercules. The default is 0. See + "Process Priorities" below for more information.
CPUPRIO nn -
is only valid when Hercules is run on a *ix (Linux/Unix) host and - specifies the priority of the CPU thread. Default is a nice value of - 15, which means a low priority such that I/O can be scheduled and - completed in favour of CPU cycles being burned. On Multi-CPU systems, - a real CPU can be 'dedicated' to Hercules, by giving the CPU thread a - very high dispatching priority (-20). Note that Hercules needs to be a - setuid root program to allow it to reset its dispatching priority to a - high (negative) value (ie. chown root.root hercules; chmod +s hercules) +
specifies the priority of the CPU thread. Default is a nice value + of 15, which means a low priority such that I/O can be scheduled and + completed in favour of CPU cycles being burned. On Multi-CPU + systems, a real CPU can be "dedicated" to Hercules, by giving the + CPU thread a very high dispatching priority (-20). See "Thread + Priorities" below for more information. + Caution: CPUPRIO should not have a higher dispatching + priority than the TOD Clock and timer thread. + +
DEVPRIO nn +
specifies the priority of the device threads. The default value is + 8. See "Thread Priorities" below for more information. + Caution: DEVPRIO should not have a higher dispatching + priority than the TOD Clock and timer thread. +
TODPRIO nn +
specifies the priority of the TOD Clock and timer thread. The + default value is -20. See "Thread Priorities" below for more + information. Caution: TODPRIO should be given a dispatching + priority equal to or higher than any other thread within Hercules.
LOADPARM xxxxxxxx
specifies the eight-character IPL parameter which is used by some operating systems to select system parameters @@ -193,32 +244,32 @@

System parameters

DEVTMAX -1 | 0 | 1-n
specifies the maximum number of device threads allowed.

Specify -1 to cause 'one time only' temporary threads to be - created to service each I/O request to a device. Once the I/O request is - complete, the thread exits. Subsequent I/O to the same device will cause - another worker thread to be created again. + created to service each I/O request to a device. Once the I/O request is + complete, the thread exits. Subsequent I/O to the same device will cause + another worker thread to be created again.

Specify 0 to cause an unlimited number of 'semi-permanent' - threads to be created on an 'as-needed' basis. With this option, a thread - is created to service an I/O request for a device if one doesn't already - exist, but once the I/O is complete, the thread enters an idle state waiting - for new work. If a new I/O request for the device arrives before the timeout - period expires, the existing thread will be reused. The timeout value is - currently hard coded at 5 minutes. Note that this option can cause one thread - (or possibly more) to be created for each device defined in your - configuration. Specifying 0 means there is no limit to the - number of threads that can be created. -

Specify a value from 1 to n to set an upper limit - to the number of threads that can be created to service any I/O request to - any device. Like the 0 option, each thread, once done servicing - an I/O request, enters an idle state. If a new request arrives before the - timeout period expires, the thread is reused. If all threads are busy when - a new I/O request arrives however, a new thread is created only if the - specified maximum has not yet been reached. If the specified maximum number - of threads has already been reached, then the I/O request is placed in a queue - and will be serviced by the first available thread (i.e. by whichever thread - becomes idle first). This option was created to address a threading issue - (possibly related to the cygwin Pthreads implementation) on Windows systems. -

The default for Windows is 8. The default for all other systems - is 0. + threads to be created on an 'as-needed' basis. With this option, a thread + is created to service an I/O request for a device if one doesn't already + exist, but once the I/O is complete, the thread enters an idle state waiting + for new work. If a new I/O request for the device arrives before the timeout + period expires, the existing thread will be reused. The timeout value is + currently hard coded at 5 minutes. Note that this option can cause one thread + (or possibly more) to be created for each device defined in your + configuration. Specifying 0 means there is no limit to the + number of threads that can be created. +

Specify a value from 1 to n to set an upper limit + to the number of threads that can be created to service any I/O request to + any device. Like the 0 option, each thread, once done servicing + an I/O request, enters an idle state. If a new request arrives before the + timeout period expires, the thread is reused. If all threads are busy when + a new I/O request arrives however, a new thread is created only if the + specified maximum has not yet been reached. If the specified maximum number + of threads has already been reached, then the I/O request is placed in a queue + and will be serviced by the first available thread (i.e. by whichever thread + becomes idle first). This option was created to address a threading issue + (possibly related to the cygwin Pthreads implementation) on Windows systems. +

The default for Windows is 8. The default for all other systems + is 0.

PGMPRDOS RESTRICTED | LICENSED
specifies whether or not Hercules will run licensed program product ESA or z/Architecture operating systems. Specify RESTRICTED to @@ -246,24 +297,193 @@

System parameters

real machine. This problem is being pursued with IBM linux. Meanwhile, if OSTAILOR LINUX is specified, then this value defaults to 800 otherwise the value defaults to 0. -
CODEPAGEcodepage +
CODEPAGE codepage
specifies the codepage conversion table used for ascii/ebcdic translation "default" specifies traditional hercules codepage, "437/037", "437/500" and "850/273" are also supported. + Iconv single byte codepages may also be used. (eg."UTF8/EBCDIC-CP-NL") If no codepage is specified then the environment variable HERCULES_CP will be inspected. The default codepage used is "default" +
ECPSVM YES | NO | LEVEL nn +
specifies whether ECPS:VM (Extended Control Program Support : Virtual Machine) + support is to be enabled. If YES is specified, then the support + level reported to the operating system is 20. The purpose of + ECPS:VM is to provide to the VM/370 Operating system a set of shortcut + facilities to perform hypervisor functions (CP Assists) and virtual + machine simulation (VM Assists). Although this feature does not affect + VM Operating system products operating in XA, ESA or z/Architecture mode, + it will affect VM/370 and VM/SP products running under VM/XA, VM/ESA or z/VM. + Running VM/370 and VM/SP products under VM/XA, VM/ESA or z/VM should be + done with ECPS:VM disabled. ECPS:VM should not be enabled in an AP or MP + environment. ECPS:VM has no effect on non-VM operating systems. It is + however recommended to disable ECPS:VM when running native non-VM operating + systems. If a specific LEVEL is specified, this value will be reported + to the operating system when it issues a Store ECPS:VM level, but it + doesn't otherwise alter the ECPS:VM facility operations. This is a partial + implementation. +
LDMOD module list +
specifies additional modules that are to be loaded by the hercules dynamic loader. +The default search order is with the hercules directory in the default DLL search path. Most systems also support absolute filenames (ie names starting with '/' or '.') in which case the default search path is not taken. +
Multiple LDMOD statements may be used. +
MODPATH path +
specifies the path where dynamic modules are loaded from. +When a modpath statement is specified, the path on the modpath statement is searched before the default path is searched. +When a relative path is specified is interpreted as a relative path within the default search path, if an absolute path is specified is interpreted as such. +
The default MODPATH is hercules, which means modules are loaded from the directory hercules within the default LD_LIBRARY_PATH.

A comment preceded by a pound sign may be appended to any system parameter statement. + +

Process and Thread Priorities

+
+
+
Process Priorities
+
+

Note: Under Linux, a process is a thread and thread priority information +applies instead. +

For Windows, the following conversions are used for translating Unix +process priorities to Windows process priority classes: +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Unix Priority
Windows Priority Class
 -20 to -16 Realtime
 -15 to -9 High
 -8 to -1 Above Normal
 0 to 7 Normal +
 8 to 15 Below Normal
 16 to 20 Low
+

+ +
Thread Priorities
+
+

On a *ix (Linux/Unix) host, Hercules needs to be a setuid root +program to allow it to reset its dispatching priority to a high +(negative) value +(i.e., chown root.root hercules; chmod +s hercules). +

For Windows, the following conversions are used for translating +Linux/Unix thread priorities to Windows thread priorities: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Unix Priority
Windows Priority
 -20 to -16 + Time Critical
 -15 to -9 Highest
 -8 to -1 Above Normal
 0 to 7 Normal
 8 to 15 Below Normal
 16 to 19 Lowest
 20   Idle
+

+
+

Device records

The remaining statements in the configuration file are device records. -There must be one device record for each I/O device. The format of -the device record is: -

devnum devtype [arguments] +There must be one device record for each I/O device or group of identical I/O devices. +The format of the device record is: +

devnums devtype [arguments]

where:

+
devnums +
is either a single devnum, a range of devnum (separated by a '-'), + a count of devnum (separated by a '.') or a comma separated list + of devnums. + Examples would be 200-210 or 0300.10 or 0400,0403 or 0100,0110-011F. + All devices defined when devnums specifies more than one device + have identical caracteristics (except for the device number itself). + All devices defined as a group must be defined on a single channel. + A channel is defined as a contiguous group of 256 (or hexadecimal 100) devices. + 0010 and 0020 are on the same channels. 0100 and 0210 are not. + See devnum below for an explanation of how each device number is specified.
devnum
is a 1 to 4 digit hexadecimal number, in the range 0000 to FFFF (for ESA/390) or 0000 to 0FFF (for S/370). The device number uniquely @@ -276,8 +496,8 @@

Device records

Description Emulated by - 3270 - Local non-SNA 3270 + 3270, 3287 + Local non-SNA 3270 display or printer TN3270 client connection 1052, 3215 @@ -296,15 +516,15 @@

Device records

Line printers Disk file (ASCII) - 3420, 3480 + 3410, 3420, 3480
3490, 9347, 8809
3422, 3430 Tape drives Disk file, CDROM, or SCSI tape 3088 Channel-to-channel adapters - TCP socket + TCP socket, TUN/TAP Driver - 3310, 3370, 9336
0671 + 3310, 3370, 9332
9335, 9336, 0671 FBA direct access storage devices Disk file @@ -312,6 +532,10 @@

Device records

CKD direct access storage devices Disk file + 2703 + Communication Line + TCP Socket +
arguments
is a list of parameters whose meaning depends on the device type. @@ -535,26 +759,53 @@

Arguments required for each device type

decreasing it may reduce compression performance, but it's there if you want it. The range is from 4096 to 65535. The latter being the default. -
+

+ +
+ The following parameters apply to both AWS and HET emulation files : +

+
MAXSIZE|MAXSIZEK|MAXSIZEM=n +
Specifies the maximum number of bytes (specified in bytes, Kilobytes or Megabytes) for the emulated file. This parameter defaults to 0, meaning there is no limit on the file size. +
EOTMARGIN=n +
Specifies the number of bytes remaining before reaching maxsize at which point the tape device will signal the presence of the 'End Of Tape' marker, thus allowing the program to switch to the next tape. +

+
+
+ Additionally, if the file name starts with the '@' character (at sign), the file really describes a list of tape emulation files to be loaded in succession. +
The syntax of each line is identical to the information specified that can be specified after the device type when the emulation file is specified directly after the device type in the configuration file. +
If the emulation file filename in the file list is the '*' character, then this specifies a set of options to be applied to all additional emulation files specified in the file list. +
Parameters are appended in succession. In all cases, is the same parameter is specified more than once, the last instance takes precedence. +
+ Therefore, it is possible to specify a set of parameters in the base configuration file, Another set on a '*' line, and another set for each individual lines. Parameter are then appended in that order. +

+ An SCSI tape device should *NOT* be given in a file list. +
+

+ See the README.TAPE file for additional information, system and application programming for tape devices.

Channel-to-channel adapters
The first argument defines the emulation type, and the remaining - arguments depend on the emulation type. The following emulation - types are defined: + arguments depend on the chosen emulation type. If the first argument + is not a recognized emulation type, then the driver will operate as + in Hercules Version 1, using Willem Konynenberg's vmnet package, as + described in Axel Schwarzer's + CTCA 3088 document. +

The following are the emulation types currently supported:

CTCI     (Channel to Channel link to TCP/IP stack)

A point-to-point IP connection with the TCP/IP stack of the driving system on which Hercules is running. See the Hercules TCP/IP page for details.

(Note: The CTCI protocol is only for the Linux version of - Hercules. For Windows, use the CTCI-W32 protocol instead). -

CTCI-W32     (modified Channel to Channel link to Win32 TCP/IP stack)

+ Hercules. For Windows, use the below CTCI protocol instead). +

CTCI     (Channel to Channel link to Win32 TCP/IP stack)

A modified Win32 version of the CTCI protocol for the Windows - crowd. See Fish's + crowd. Note that the protocol name (CTCI) is the same, + even though the actual implementation is very different. See Fish's CTCI-W32 - page for details. + page for further details and information.

CTCT     (Channel to Channel Emulation via TCP connection)

An emulated CTCA to another Hercules system. Four arguments are required:

@@ -576,16 +827,156 @@

Arguments required for each device type

for IP traffic, this parameter should be more than the MTU of the interface definition in the OS.
+ Note : CTCT currently only supports IP traffic, so it cannot be used to + transport NJE, SNA, PVM, etc.. payload. This may change in the future. +

LCS     (LAN Channel Station Emulation)

+

An emulated Lan Channel Station Adapter. + This emulation mode appears to the operating system running in + the Hercules machine as an IBM 8232 LCS device, an IBM 2216 + router, a 3172 running ICP (Interconnect Communications Program), + the LCS3172 driver of a P/390, or an IBM Open Systems Adapter. +
+ Rather than a point-to-point link, this emulation creates a + virtual ethernet adapter through which the guest operating system + running in the Hercules machine can communicate. As such, this + mode is not limited to TCP/IP traffic, but in fact will handle + any ethernet frame. +

+ A single device should be declared for all LCS device numbers. The LCS + emulator will create all the additional devices necessary for LCS operations. + Also, the 1st declared device should be an even numbered device. + The configuration statement for LCS is as follows: +

+ NOTE :
+ There are no required parameters for the LCS emulation, however + there are several options that can be specified on the config + statement: +

+ NOTE :
+ On the MAC OS X Platform, the long option format (--xxx) is not supported. Only the short option format (-x : One dash, one letter) should be used. +

+

+
-n devname or --dev devname +
+ where devname is: +

+ [*nix] the name of the TUN/TAP special character device, + normally /dev/net/tun. +
+

+ + [Windows] is either the IP or MAC address of the driving + systems network card. TunTap32 will automatically select + the first network card it finds if this option is + omitted, this may not be desirable for some users. +
+
-o filename or --oat filename +
+ where filename specifies the filename of the Address + Translation file. If this option is specified, the optional + --mac and guestip entries are ignored in preference to + statements in the OAT. (See below for the format of the OAT) +
-m MAC Address or --mac MAC address +
+ where MAC Address is the optional hardware address of + the interface in the format: xx:xx:xx:xx:xx:xx. If you use the + --oat option, do not specify an address here. + +
guestip +
+ is an optional IP address of the Hercules + (guest OS) side. Note: This is only used to + establish a point-to-point routing table entry + on driving system. If you use the --oat option, + do not specify an address here. +

+ +

OAT File

+
+ The syntax for the Address Translation file is as follows: +

+*********************************************************
+* Dev Mode Port Entry specific information              *
+*********************************************************
+0400  IP   00  PRI 172.021.003.032
+0402  IP   00  SEC 172.021.003.033
+0404  IP   00  NO  172.021.003.038
+0406  IP   01  NO  172.021.002.016
+040E  SNA  00
+
+HWADD 00 02:00:FE:DF:00:42
+HWADD 01 02:00:FE:DF:00:43
+ROUTE 00 172.021.003.032 255.255.255.224
+
+
+
+where: +

+

+
Dev
is the base device address +
Mode
is the operation mode - IP or SNA +
Port
is the virtual (relative) adapter number. +
+
+

+For IP modes, the entry specific information is as follows: +

+

+
+
PRI|SEC|NO
specifies where a packet with an unknown IP +address is forwarded to. PRI is the primary +default entry, SEC specifies the entry to use +when the primary is not available, and NO + specifies that this is not a default entry. +
nnn.nnn.nnn.nnn
specifies the home IP address +
+

+

When the operation mode is IP, specify only the even (read) + device number dev. The odd (write) address will be create automatically. +

+ + Note: SNA is currently NOT implemented. +

+ + Additionally, two other statements can be included in the + address translation file. The HWADD and ROUTE statements. +

+ + Use the HWADD to specify a hardware (MAC) address for a + virtual adapter. The first parameter after HWADD specifies + with relative adapter for which the address is applied. +

+ + The ROUTE statement is included for convenience. This allows the + hercifc program to create a network route for this specified + virtual adapter. Please note that it is not necessary to include + point-to-point routes for each IP address in the table. This is + done automatically by the emulation module. +

+ + Up to 4 virtual (relative) adapters 00-03 are currently supported. +

+

+ If no Address Translation file is specified, the emulation module + will create the following: +

+

+ An ethernet adapter (port 0) for TCP/IP traffic only. +
+
+ Two device addresses will be defined (devnum and devnum + 1). +
+

+

+ -

If the first parameter is not one of the recognized CTC emulation - types, then the driver will operate as in Hercules Version 1, using - Willem Konynenberg's vmnet package, as described in Axel Schwarzer's - CTCA 3088 document.

FBA DASD devices
The argument specifies the name of a file which contains the FBA - DASD image. The file consists of fixed length 512-byte records, + DASD image or the INET address of a Hercules shared device server. +

+ The file consists of fixed length 512-byte records, each of which represents one physical block of the emulated disk.

To allow access to a minidisk within a full-pack FBA DASD image @@ -605,17 +996,33 @@

Arguments required for each device type

If omitted, or if specified as an asterisk, then the minidisk continues to the end of the DASD image file. +

+ If you specify an INET address the format is: +

+

+
ip-name-or-addr:port:devnum +
ip-name-or-addr specifies the internet name or address + where the Hercules shared device server is running. +

+

port specifies the port number the shared device server + is listening on. If omitted, the default is 3990. +

+

devnum specifies the device number on the shared + device server. If omitted, the default is the current device number. +

CKD DASD devices
The argument specifies the name of a file containing the disk CKD - DASD image. The file consists of a 512-byte device header record + DASD image or the INET address of a Hercules shared device server. +

+ The file consists of a 512-byte device header record followed by fixed length track images. The length of each track image depends on the emulated device type, and is always rounded up to the next multiple of 512 bytes.

Volumes larger than 2GB (for example, the 3390 model 3) - are supported by spreading the data across more than one file. + can be supported by spreading the data across more than one file. Each file contains a whole number of cylinders. The first file (which contains cylinders 0-2518 in the case of a 3390) usually has _1 as the last two characters of its name. The ckddasd driver @@ -626,11 +1033,89 @@

Arguments required for each device type

specify only the first file name (the file with suffix _1) in the configuration statement!

+ If your operating system supports large file sizes or + 64 bit offsets then volumes larger than 2G can be kept + in a single file. +

Alternatively, the argument may specify the name of a file containing a compressed CKD DASD image. The CKD driver will automatically detect whether the file contains a regular CKD image or a compressed CKD image. Refer to the CCKD page for details - of how to create and use compressed CKD DASD images. + on how to create and use compressed CKD DASD images. +

+ If you specify an INET address the format is: +

+

+
ip-name-or-addr:port:devnum +
ip-name-or-addr specifies the internet name or address + where the Hercules shared device server is running. +

+

port specifies the port number the shared device server + is listening on. If omitted, the default is 3990. +

+

devnum specifies the device number on the shared + device server. If omitted, the default is the current device number. +
+

+ +

Communication Adapter +
+ Describes a BSC emulation line entry to either link 2 hercules engines + or a custom made program emulating a 2780, 3780 or 3x74, or a custom made + program interfacing to a real BSC line. +

+ The communication is emulated over a TCP connection. All bytes are + transfered as-is (except for doubling DLE in transparent mode) just + like it would over a real BSC link. Emulated EIA (DCD, DTR, CTS, + etc..) or X.21/V.11 leads (C, T, etc..) are treated differently depending + on the DIAL option selected. +

+ The line emulates a point-to-point BSC link. There is no point-to-multipoint handling. +

+ The following options define the line emulation behaviour : +
+
DIAL=IN|OUT|INOUT|NO
+ Specifies call direction (if any). If DIAL=NO is specified, the + TCP outgoing connection is attempted as soon as an 'ENABLE' CCW is executed. + Also, in this mode, an incoming connection will always be accepted. If DIAL=IN|INOUT + is specified, a TCP incoming call is accepted ONLY if an 'ENABLE' CCW is currently + executing on the device. If DIAL=OUT, the 'ENABLE' CCW is rejected. + When DIAL=IN|INOUT is specified, a DIAL CCW allows the application + to establish a TCP connection to a specific host. For other DIAL values, + the DIAL CCW is rejected. +
lhost=hostname|ip address|* +
Specifies which IP address to listen on. This also conditions the network + interface from which incoming calls will be accepted. Specifying '*' means + all incoming TCP calls are accepted, regardless of the destination IP + address or call origin. This is the default value. Specifying a specific + IP address when DIAL=OUT is specified has no effect. +
lport=service name|port number +
Specifies the TCP port for which to listen to incoming TCP calls. This + value is mandatory for DIAL=IN|INOUT|NO. It is ignored for DIAL=OUT. +
rhost=hostname|ip address +
rport=service name|port number +
Specifies the remote host and port to which to direct a TCP connection on a + DIAL=NO line when an 'ENABLE' CCW is executed. This option is mandatory when DIAL=NO + is specified. It is ignored for other DIAL values. +
The following options are tuning options. In most cases, using the default values + give the best results +
rto=0|-1|nnn|3000 +
Specifies the number of miliseconds before terminating a read on a timeout, when + no read termination control character is received. Specifying 0 means the READ ends + immediatly. -1 specifies there is no timeout. +
pto=0|-1|nnn|3000 +
Specifies the number of miliseconds before terminating a POLL on a timeout, when + no ACK or NACK sequence is received. Specifying 0 means the POLL ends + immediatly. -1 specifies there is no timeout. +
eto=0|-1|nnn|10000 +
Specifies the number of miliseconds before terminating an ENABLE operation on a timeout. + the timeout applies when DIAL=NO|IN|INOUT is specified, the outgoing TCP call fails (DIAL=NO) + and there is no previously or currently established TCP connection for this line. When DIAL=NO is + specified, the timeout defaults to 10 seconds. for DIAL=IN|INOUT, the timeout + defaults to -1. +
+
+

A comment preceded by a pound sign may be appended to any device @@ -643,6 +1128,6 @@

Arguments required for each device type

back -

Last updated 1 February 2003 +

Last updated 3 October 2003 diff --git a/html/hercfaq.html b/html/hercfaq.html index a752253..e99b7cb 100644 --- a/html/hercfaq.html +++ b/html/hercfaq.html @@ -1,307 +1,623 @@ -Hercules Version 2: Frequently-Asked Questions + + Hercules Version 3: Frequently-Asked Questions + -

Hercules Version 2: Frequently-Asked Questions

-


-

What is Hercules?

-

Hercules is a software implementation of the System/370, ESA/390 -and z/Architecture -hardware which runs under Linux on several hardware platforms including the -Intel Pentium PC, and under Windows NT and Windows 2000.

-

So what exactly does that mean?

-

It means that your PC can emulate an IBM mainframe processor. The -mainframe can range from a 360 to a z900 - running in "System/370" mode, -"ESA/390" mode, or "z/Architecture" mode. -Hercules executes S/370, ESA/390, and z/Architecture instructions and channel -programs. It emulates mainframe I/O devices by using PC devices. For -example, 3390 DASD devices are emulated by large files on your hard disk, -and local 3270 screens are emulated by tn3270 sessions. (Note: Not all 370 -and 390 features have been implemented in Hercules. See the list of -particulars later in this document. Also, certain non-standard models, -360/20s, and the 360/67 virtual memory mode are not emulated.)

-

Hercules implements only the raw S/370, ESA/390, and z/Architecture -instruction set; it -does not provide any operating system facilities. This means that you need -to provide an operating system or standalone program which Hercules can load -from an emulated disk or tape device. You will have to write the operating -system or standalone program yourself, unless you can manage to obtain a -license from IBM to run one of their operating systems on your PC, or use -IBM programs and operating systems which have been placed in the public -domain.

-

Is it functional enough to run production work?

-

No. At the moment it's a system programmer's toy, though it's rapidly -becoming good enough to run a wide range of software without problems.

-

Can it run z/OS, z/VM, VSE/ESA, Linux/390 and Linux for zSeries?

-

Yes. Hercules is a software implementation of the architecture, and so -it is capable of running Linux, z/OS, VSE/ESA, and z/VM, as well as older -versions of these OS's.

-

What IBM operating systems can I run legally?

-

Linux/390 and Linux for zSeries can be run as there are no -licensing issues involved.

-

OS/360 (PCP, MFT and MVT), as far as I know. OS/360 is in the public -domain. The status of OSes for which IBM did not charge a license fee is -somewhat murky; these include MVS 3.8, VM/370 release 6, and DOS/VS release -34. OS/390 and other ESA versions of OS's are definitely licensed to a -particular machine. Therefore, in practice you cannot run any ESA operating -system on your PC unless you can obtain a license from IBM allowing you to -do so. It is believed that there are, however, three legal ways you could -run z/OS, z/VM, or VSE/ESA under Hercules:

+ ALINK="#000000"> +

+ Hercules Version 3: Frequently-Asked Questions +

+

+


+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1.01What is Hercules?
1.02So what exactly does that mean?
1.03Is it functional enough to run production work?
1.04What are the licensing restrictions for Hercules?
 
2.01Can it run OS/390, VM/ESA, VSE/ESA?
2.02What operating systems can I run legally?
2.03What other programs will run under Hercules?
2.04Where can I obtain OS/360 ?
2.05Where can I obtain MVS ?
2.06Where can I obtain VM/370 ?
2.07Where can I obtain DOS/VS ?
2.08Where can I obtain Linux/390 ?
2.09Where can I find documentation?
 
3.01What PC hardware do I need to run Hercules?
3.02What PC software do I need to run Hercules?
3.03What sort of MIPS rate can I expect?
3.04Which C compiler should I use to build Hercules?
3.05Why do I get an unexpected fixed-point divide exception (program check 0009 or abend 0C9) on a CVB instruction?
3.06Do you plan to port Hercules to other platforms?
 
4.01How can I create a virtual DASD volume?
4.02Can I read a tape which was created on a mainframe?
4.03Can I attach a PC tape drive to Hercules?
4.04Can I process mainframe tapes with Hercules?
4.05Can I create Assembler programs without a mainframe?
 
5.01What architectural features are implemented?
 
6.01Who are the Herculeans?
 
7.01Where can I obtain technical support?
+

+


+

+

1.01 + What is Hercules? +

+

+ Hercules is a software implementation of the System/370, ESA/390 and + z/Architecture hardware which runs under Linux on several hardware + platforms including the Intel Pentium PC, and under Windows NT and + Windows 2000. +

+

1.02 + So what exactly does that mean? +

+

+ It means that your PC can emulate an IBM mainframe processor. The + mainframe can range from a 360 to a z900 - running in "System/370" mode, + "ESA/390" mode, or "z/Architecture" mode. +

+

+ Hercules executes S/370, ESA/390, and z/Architecture instructions + and channel programs. It emulates mainframe I/O devices by using + PC devices. For example, 3390 DASD devices are emulated by large + files on your hard disk, and local 3270 screens are emulated by tn3270 + sessions. (Note: Not all 370 and 390 features have been implemented + in Hercules. See the list of particulars later in this document. + Also, certain non-standard models, 360/20s, and the 360/67 virtual + memory mode are not emulated.) +

+

+ Hercules implements only the raw S/370, ESA/390, and z/Architecture + instruction set; it does not provide any operating system facilities. + This means that you need to provide an operating system or standalone + program which Hercules can load from an emulated disk or tape device. + You will have to write the operating system or standalone program + yourself, unless you can manage to obtain a license from IBM to run + one of their operating systems on your PC, or use IBM programs and + operating systems which have been placed in the public domain. +

+

1.03 + Is it functional enough to run production work? +

+

+ No. At the moment it's a system programmer's toy, though it's rapidly + becoming good enough to run a wide range of software without problems. +

+

1.04 + What are the licensing restrictions for Hercules? +

+

+ Hercules is a copyright work which has been made generally + available, subject to the terms of the +Q Public License. + In essence this allows free use and distribution of the program for + personal and commercial use. You may not distribute modified copies + of the program, but you may distribute your own patches along with + the program, provided that you also grant the maintainer permission + to include those patches in future versions of the program. You may + not copy any portion of the source code for use in any other program. +

+

+ Hercules is not, repeat, not GPL software! The GNU + General Public License is a Unix/Linux software licensing agreement, + which we, the authors, will not participate in. We believe that the + QPL, which has been certified as compliant with the +Open Source Definition, + provides the benefits and protections of open source for both users and + developers, without the political baggage that has come to be associated + with the GPL. +

+

+


+

+

2.01 + Can it run OS/390, VM/ESA, VSE/ESA? +

+

+ Yes. Hercules is a software implementation of ESA/390, and so it is + capable of running OS/390, VSE/ESA, and VM/ESA, as well as older + versions of these OS's. +

+

2.02 + What operating systems can I run legally? +

+

+ Most 3rd party operating systems like Linux/390, z/Linux and TELPAR + are covered under their own free license and can therefore + run under Hercules without any legal problems. +

+

+ OS/360 (PCP, MFT and MVT) is in the public domain, as far + as we know. The status of OSes for which IBM did not charge a license + fee is somewhat murky; these include MVS 3.8, VM/370 + release 6, and DOS/VS release 34. +

+

+ The legal status outside the USA, where something like public domain or + software without copyright doesn't exist, is "copyrighted software + provided at no charge". It is a known fact that vendors like + amdahl, Hitachi, Nixdorf and others + modified those operating systems, and distributed them as their own + OS for their own hardware, without asking IBM for permission. But + law had been changed over that time, so its not clear if the same + legal status applies in your country right now. +

+

+ Rick Fochtman managed to obtain a letter from IBM that he is allowed + to distribute OS/360. Try to ask your salesdroid for a similar letter + for VM/370, MVS 3.8j or DOS/VS next time he wants to sell you a major + upgrade. +

+

+ OS/390 and other ESA versions of OS's are definitely licensed to a + particular machine. Therefore, in practice you cannot run any classic + ESA operating system on your PC unless you can obtain a license from + IBM allowing you to do so. It is believed that there are, however, + three legal ways you could run OS/390, VM/ESA, or VSE/ESA under + Hercules: +

    -
  1. Running under Linux on the Pentium processor of a P/390 which is -licensed to run the OS.
  2. -
  3. Running under Linux/390 on a mainframe which is licensed to run the OS. +
  4. + Running under Linux on the Pentium processor of a P/390 which is + licensed to run the OS. +
  5. +
  6. + Running under Linux/390 on a mainframe which is licensed to run the OS. +
  7. +
  8. + Running under the terms of a disaster recovery provision of the OS + license (but I really don't recommend depending on Hercules to be your + disaster recovery solution!).
  9. -
  10. Running under the terms of a disaster recovery provision of the OS -license (but I really don't recommend depending on Hercules to be your -disaster recovery solution!).
-

What other programs will run under Hercules?

-

Any program which uses the S/370, ESA/390, or z/Architecture -instruction set, as -implemented in Hercules. Some special utilities in the form of standalone -programs are known to run well. I can particularly recommend Jan Jaeger's -excellent standalone editor (ZZSA) which is included in the Hercules -distribution, or it can be downloaded from http://www.cbttape.org/~jjaeger; -I use it regularly to look at DASD while debugging an OS installation, which -is just what it's designed to do. Note: ZZSA runs in ESA/390 mode. -See Jan Jaeger's website for more information and special -logon procedures.

-

Where can I obtain OS/360?

-

1. Rick Fochtman's OS/360 archive CD is now obtainable by download from -these locations:

+ +

2.03 + What other programs will run under Hercules? +

+

+ Any program which uses the S/370, ESA/390, or z/Architecture instruction + set, as implemented in Hercules. Some special utilities in the form of + standalone programs are known to run well. I can particularly recommend + Jan Jaeger's excellent standalone editor (ZZSA) which is included in the + Hercules distribution, or it can be downloaded from +http://home.worldonline.nl/~jjaeger; + I use it regularly to look at DASD while debugging an OS installation, + which is just what it's designed to do. Note: ZZSA runs in ESA/390 mode. + See Jan Jaeger's website for more information and special logon procedures. +

+

2.04 + Where can I obtain OS/360 ? +

+

+ 1. Rick Fochtman's OS/360 archive CD is now obtainable by download + from these locations: +

-

2. If you are interested in obtaining a copy of the CD itself, contact -Rick Fochtman at rfochtman @ ync.net.

-

You can use the dasdload and dasdisup programs -(see the Creating Hercules DASD document) to -build an OS/360 IPL volume from the unloaded files on the archive CD.

-

3. Alternatively, you can download the mftr33.tar.gz package which contains a minimal MFT -system on a 3330 image, with some minimal documentation. The configuration -is that of a 370/145 with 2 megabytes of main storage, running OS/MFT -Release 21.0, with several volumes of pre-loaded DASD. 2 program partitions -(P0 and P1) have been genned. There is no working TOD clock, and no SMF. -Volume DLIB01 which is specified does not exist in the zipped file, but can -be created using a plf file with the CDROM of OS/360. DLIB01 can be -commented-out from the config (cnf) file if desired. The mftr33 package also -includes the IPL text and program for the standalone IBCDASD program as file -"ibcdasdi.rdr" which can be used if desired.

-

Where can I find documentation?

-

I've produced a document describing how to build an OS/360 system on -Hercules, called "OS/360 on Hercules". It can be found at http://www.conmicro.cx/hercos360. -

-

The Creating Hercules DASD document describes -various methods of creating and loading virtual DASD volumes.

-

Malcolm Beattie has also produced two useful documents on 3270s and TSO: -
"Guide to Using 3270 Consoles and Terminals for Hercules" at http://users.ox.ac.uk/~mbeattie/hercules/3270.html -

-

"Guide to Installing TSO Under MVT on Hercules" at http://users.ox.ac.uk/~mbeattie/hercules/tso.html -

-

For adding multiple 3270 terminals to TCAM, see the document by Mike Ross -at http://www.corestore.org/hercules.html -

-

What are the licensing restrictions for Hercules?

- -

Hercules is a copyright work which has been made generally -available, subject to the terms of the -Q Public License. -In essence this allows free use and distribution of the program for -personal and commercial use. You may not distribute modified copies -of the program, but you may distribute your own patches along with -the program, provided that you also grant the maintainer permission -to include those patches in future versions of the program. You may -not copy any portion of the source code for use in any other program.

-

Hercules is not, repeat, not GPL software! The GNU -General Public License is a Unix/Linux software licensing agreement, which -we, the authors, will not participate in. We believe that the QPL, which has -been certified as compliant with the Open Source Definition, provides the -benefits and protections of open source for both users and developers, -without the political baggage that has come to be associated with the GPL.

-

What PC hardware do I need to run Hercules?

-

It depends how fast you want it to run. A Pentium 200 with 32Mb RAM is -probably the minimum practical requirement; 500+ MHz with 128Mb RAM would be -much better. Hercules doesn't use any fancy graphics, but it does need a -fast processor to achieve a reasonable MIPS rate. -

-

If you can afford a multiprocessor system, so much the better. Hercules -makes extensive use of multithreading to overlap I/O with CPU activity, so -you should find that a dual or quad Pentium 200 system will outperform a -uniprocessor Pentium 450. My development system is a Compaq ProLiant 6000 -with four Pentium Pro 200s, and response time is quite satisfactory.

-

Hercules does not depend on the Pentium architecture. I've built and run -it successfully on a 500 MHz Alpha 21164, and others have run it on SPARC -and S/390 (!) Linux systems. (One guy has even run OS/360 under Hercules -under Linux/390 under Hercules under Linux/390 under VM/ESA!) The only -weirdness about building the package on an Alpha is that you'll get compiler -warnings about "unsigned long value, unsigned long long format". You can -ignore these.

-

You will need enough Linux swap space to accommodate your S/390 real -storage (main storage plus expanded storage). For maximum throughput, you -should set your main and expanded storage sizes high enough to eliminate -S/390 paging. S/390 storage is allocated out of Linux virtual storage, so if -you can provide enough RAM to eliminate Linux paging as well, then so much -the better.

-

You also need enough hard disk space to accommodate the emulated DASD. A -virtual "3330 model 1" disk drive will need about 100 megabytes of space for -emulation (a 3330-11 will need about 200 megabytes). A 3380 "single density" -model will need about 650MB, and a 3390 model 2 needs about 2GB. If you use -the compressed CKD DASD feature, these sizes will -shrink dramatically, usually to about 20 to 30 percent of the original -size.

-

What PC software do I need to run Hercules?

-

1. You need a Linux system with POSIX threads (pthread) support. I will -only provide support for Linux 2.2.x or later kernels with glibc2 (libc6) as -supplied in popular distributions such as Red Hat 6.0 or later and SuSE -Linux 6.1 or later. My development system runs Red Hat 6.1. You can also run -under Windows NT or Windows 2000, though Hercules isn't quite as polished on -that platform.

-

2. A recent version of the GNU C compiler (GCC), normally -distributed with Linux. See the notes below on this compiler. If you -wish to rebuild the Windows version, you will need the Cygwin tools from Red -Hat.

-

3. You will also need tn3270 client software for the virtual 3270 -console. The tn3270 client can run on the same machine as Hercules, or -on any Unix or Windows box with a TCP/IP connection to the Hercules -machine.

-

The supported and recommended tn3270 clients for Hercules are: +

  • +http://www.cyberdynesys.com/os360.tgz +
  • +
  • +ftp://ftp.ox.ac.uk/pub/linux/hercos360/os360.tar.gz +
  • +
  • +ftp://source.rfc822.org/pub/mirror/hercules/hercos360/os360.tar.gz +
  • +
  • +http://open360.copyleft.de/pub/os360-cdrom-1999-325.tar.gz +
  • + +

    + 2. If you are interested in obtaining a copy of the CD itself, + contact Rick Fochtman at rfochtman@ync.net. +

    +

    + 3. Alternatively, you can download the +OS/360 Y2K Starter + package which contains a full featured MVT system on a 3330 image, + with some minimal documentation. The configuration is that of a + 370/158 with 4 megabytes of main storage, running OS/MVT Release + 21.0. The same site also offers a MVTDBL volume and a + Builder package for those who like to participate in + OS/360 nucleus hacking. +

    +

    2.05 + Where can I obtain MVS 3.8 ? +

    +

    + The Original MVS 3.8 distribution as it was first used came from +

    + + who advise using the mirrors at + +

    + Several people have generated a functional MVS system from this archive : +

    + +

    2.05 + Where can I obtain VM/370 ? +

    +

    + Bob Abeles started a VM/370 web site at: +

    + +

    + Right now it's in an embryonic state. If anyone has material that + they'd like to contribute, please send it to me. I'm looking for + FAQ material, command summaries, how-to's, personal experiences and + anecdotes, machine room photos, and just about anything else you + think might be of interest. +

    +

    2.07 + Where can I obtain DOS/VS ? +

    +

    + I've put the DOS/VS r34 install tape on my site. It'll expand to a 21 + MB AWSTAPE file, dosrel34.aws. You need the Coverletter to + install it. Read the relevant postings of the Hercules mailing list + first, as the install process is quite obscure. +

    +

    + You can grab those files at : +

    + +

    2.08 + Where can I obtain Linux/390 ? +

    +

    + The process of downloading and installing Linux/390 is best + described by the +Getting Started with Linux/390 + document. Take a look at, +David Pitts' GCC/EGCS Compiler Page + if you need GCC and GNU utils for OS/390 to bootstrap Linux from source. +

    +

    2.09 + Where can I find documentation? +

    +

    + The +Creating Hercules DASD + document describes various methods of creating and loading virtual + DASD volumes. +

    +

    + I've produced a document describing how to build an OS/360 system + on Hercules, called "OS/360 on Hercules". It can be found at +

    + +

    + This will build an MVT system without TCAM/TSO, but with two 3270 + consoles. You will need Malcolm Beattie's "Guide to Using 3270 + Consoles and Terminals for Hercules" with this MVT version. +

    + +

    + The N.U.D.E guides can be found at : +

    + +

    + IBM provides only current documentation, ...
    + but many things haven't changed since 1964 : +

    + +
    +

    +

    3.01 + What PC hardware do I need to run Hercules? +

    +

    + It depends how fast you want it to run. A Pentium 200 with 32Mb RAM is + probably the minimum practical requirement; 500+ MHz with 128Mb RAM would + be much better. Hercules doesn't use any fancy graphics, but it does + need a fast processor to achieve a reasonable MIPS rate. +

    +

    + If you can afford a multiprocessor system, so much the better. Hercules + makes extensive use of multi-threading to overlap I/O with CPU activity, so + you should find that a dual or quad Pentium 200 system will outperform a + uniprocessor Pentium 450. My development system is a Compaq ProLiant 6000 + with four Pentium Pro 200s, and response time is quite satisfactory. +

    +

    + Hercules does not depend on the Pentium architecture. I've built and run + it successfully on a 500 MHz Alpha 21164, and others have run it on SPARC + and S/390 (!) Linux systems. (One guy has even run OS/360 under Hercules + under Linux/390 under Hercules under Linux/390 under VM/ESA!) The only + weirdness about building the package on an Alpha is that you'll get + compiler warnings about "unsigned long value, unsigned long long format". + You can ignore these. +

    +

    + You will need enough Linux swap space to accommodate your S/390 real + storage (main storage plus expanded storage). For maximum throughput, you + should set your main and expanded storage sizes high enough to eliminate + S/390 paging. S/390 storage is allocated out of Linux virtual storage, + so if you can provide enough RAM to eliminate Linux paging as well, + then so much the better. +

    +

    + You also need enough hard disk space to accommodate the emulated DASD. A + virtual "3330 model 1" disk drive will need about 100 megabytes of space + for emulation (a 3330-11 will need about 200 megabytes). A 3380 "single + density" model will need about 650MB, and a 3390 model 2 needs about 2GB. + If you use the +compressed CKD DASD feature, + these sizes will shrink dramatically, usually to about 20 to 30 percent + of the original size. +

    +

    3.02 + What PC software do I need to run Hercules? +

    +

    + 1. You need a Linux system with POSIX threads (pthread) support. I will + only provide support for Linux 2.2.x kernels with glibc2 (libc6) as + supplied in popular distributions such as Red Hat 6.0 or later and + SuSE Linux 6.1 or later. My development system runs Red Hat 6.1. + You can also run under Windows NT or Windows 2000, though Hercules + isn't quite as polished on that platform. +

    +

    + 2. An egcs C compiler, normally distributed with Linux. See the notes + below on this compiler. If you wish to rebuild the Windows version, + you will need the +Cygwin + tools from Red Hat. +

    +

    + 3. You will also need tn3270 client software for the virtual 3270 + console. The tn3270 client can run on the same machine as Hercules, or + on any Unix or Windows box with a TCP/IP connection to the Hercules + machine. +

    +

    + The supported and recommended tn3270 clients for Hercules are:

    -
    x3270 for Unix -
    x3270 is included with most Linux distributions, or you can -download it from - -www.geocities.com/SiliconValley/Peaks/7814 -
    Vista tn3270 for Windows -
    Vista tn3270 can be obtained from - -www.tombrennansoftware.com. The very modest license fee charged -for this excellent 3270 emulator helps to support an independent -software developer. +
    + + x3270 for Unix + +
    + x3270 is included with most Linux distributions, or you can + download it from +www.geocities.com/SiliconValley/Peaks/7814 +
    + + Vista tn3270 for Windows + +
    + Vista tn3270 can be obtained from +www.tombrennansoftware.com. + The very modest license fee charged for this excellent 3270 emulator + helps to support an independent software developer.
    -

    Other tn3270 clients, such as QWS3270, IBM Personal Communications, -Attachmate Extra, or Dynacomm Elite should also work in most cases, but -be aware that some tn3270 clients have bugs which make them unusable -as OS/360 or MVS consoles.

    -

    What sort of MIPS rate can I expect?

    -

    Thanks to the performance enhancements which began around release 1.60, -as a result of work by Mike Noel, Juergen Dobrinski, Valery Pogonchenko, and -Jan Jaeger, you should now see an execution speed of around 0.8 to 1 MIPS, -even on a Pentium 200. That's enough to run OS/360 (MFT or MVT) with a -response time similar to that of a 3033 from the 1970's. It's also fast -enough to run VSE/ESA with an acceptable response time. If you want to run -OS/390 instead of OS/360 (assuming you can do so legally), you'd better get -a gigahertz or so Pentium III. On a fast dual Pentium III it's now not -unusual to see 10 MIPS or better.

    -

    Typical I/O rates of around 50 EXCP/second are reported on average -hardware, with rates over 500/second achievable with hardware RAID.

    -

    Which C compiler should I use to build Hercules?

    -

    You must use GCC 2.9x, previously known as EGCS. I am -using the version that came with Red Hat 6.1 and it seems to work -OK. The version number reported by the Linux command cc --v is: egcs-2.91.66 19990314/Linux (egcs-1.1.2 release). If -your compiler is version 2.9 or higher, it's EGCS-based, and should -work fine, as EGCS version 1 is just another name for gcc version -2.9.

    -

    Older versions of gcc are known to produce incorrect code for some 64-bit -(unsigned long) integer operations. I have had reports that earlier versions -of egcs produce strange results too.

    -

    If you have both an old gcc and egcs compilers installed, use the CC -parameter on the "make" command to force it to choose the correct compiler: -
    make CC=egcs ...

    -

    Red Hat 7.0 ships with two versions of gcc. If you don't do anything -special, you get gcc 2.96, which will not compile the Linux kernel, so they -included 2.91 as well as kgcc. If you encounter problems when -building Hercules with the 2.96 compiler, try make CC=kgcc -instead. I would appreciate reports as to how well the 2.96 compiler works, -as it is a development snapshot, and lots of folks, including the GCC -development team and Linus Torvalds, were very unhappy that Red Hat included -it in their distribution.

    -

    Why do I get an unexpected fixed-point divide exception (program check -0009 or abend 0C9) on a CVB instruction?

    -

    You are using an old gcc compiler. You must use the newer egcs-based -compiler instead. See previous question for the required compiler level. -

    -

    Do you plan to port Hercules to other platforms?

    -

    No. I do not have the resources to support more than one operating -system.

    -

    If you want to make Hercules run on Solaris, Linux 2.0.x, or whatever, -then by all means go ahead. I welcome reports of any bugs or problems you -find, but I probably won't fix problems if it means introducing -platform-specific code, and I will not be able to test new releases against -other platforms. Folks who have gotten it compiled on the BSDs report that -the hardest part is removing the Linux-specific tape support. Hercules is -part of the FreeBSD packages collection.

    -

    There is ongoing work to make Hercules run under Windows 98, NT, and -2000. The source code has support for these platforms included, and there is -a Win32 makefile as makefile.w32.

    -

    The Hercules code is not intended to be specific to Intel hardware, so if -you find any issues or faults related to running on other hardware (SPARC, -Alpha, PPC, ...) under Linux 2.2, then I'm likely to be receptive to fixing -that sort of problem. Issues related to Unix variants are less likely -to be fixed.

    -

    How can I create a virtual DASD volume?

    -

    The Creating Hercules DASD document describes -various methods of creating and loading virtual DASD volumes.

    -

    Can I read a tape which was created on a mainframe?

    -

    Yes, indirectly. The mainframe tape must be converted to AWSTAPE format -and then downloaded to your PC. The tapeconv.jcl file in the -Hercules directory contains a sample program which you can run under OS/390 -on your mainframe system. It reads a file from tape and converts it to -AWSTAPE format. Download the AWSTAPE file to your PC (making sure to choose -binary format for the download), and then add the downloaded -filename to the Hercules configuration file as a virtual tape device. You -will then be able to read the tape file from the virtual tape drive located -on your PC.

    -

    Note: the "tapeconv" program will not correctly process input tapes -whose block size exceeds 32760! One symptom of this may be the message -"ADRY011E I/O ERROR - DEVICE NOT ATTACHED.0000,NA,00...00,0000" -when attempting to restore from tape originally created using the default -DF/DSS block size. The solution is to recreate the dump tape with -DCB=BLKSIZE=32760.

    -

    Can I attach a PC tape drive to Hercules?

    -

    Yes. Hercules can read and write tapes on SCSI drives on Linux systems. I -have tested this with 4mm DAT, QIC-1000, and 9-track drives. The Cygwin -libraries that support Hercules on Windows do not provide support for SCSI -tapes.

    -

    Can I process mainframe tapes with Hercules?

    -

    Yes. It is possible to obtain 9-track open reel drives and 3480-type -cartridge drives which attach to the SCSI bus. Hercules makes these -appear to the operating system as channel-attached 3420 or 3480 devices, -making it possible to read and write real mainframe tapes.

    -

    Can I create Assembler programs without a mainframe?

    -

    Yes. If you want to write Assembler (BAL) programs to run on Hercules, -but you don't have access to a mainframe, then there are two interesting -products which you can run on your PC to assemble programs:

    +

    + Other tn3270 clients, such as QWS3270, IBM Personal Communications, + Attachmate Extra, or Dynacomm Elite should also work in most cases, but + be aware that some tn3270 clients have bugs which make them unusable + as OS/360 or MVS consoles. +

    +

    3.03 + What sort of MIPS rate can I expect? +

    +

    + With the performance enhancements which began around release 1.60, + thanks to work by Juergen Dobrinski, Valery Pogonchenko, and Jan Jaeger, + you should now see an execution speed of around 0.8 to 1 MIPS, even on a + Pentium 200. That's enough to run OS/360 (MFT or MVT) with a response + time similar to that of a 3033 from the 1970's. It's also fast enough to + run VSE/ESA with an acceptable response time. If you want to run OS/390 + instead of OS/360, you'd better get a gigahertz or so Pentium III. On a + fast dual Pentium III it's now not unusual to see 5 MIPS or better. +

    +

    + Typical I/O rates of around 50 EXCP/second are reported on average + hardware, with rates over 500/second achievable with hardware RAID. +

    +

    3.04 + Which C compiler should I use to build Hercules? +

    +

    + You must use the egcs C compiler. I am using the version that + came with Red Hat 6.1 and it seems to work OK. The version number reported + by the Linux command cc -v is: egcs-2.91.66 19990314/Linux + (egcs-1.1.2 release). If your compiler is version 2.9 or higher, it's + EGCS-based, and should work fine, as EGCS version 1 is just another name + for gcc version 2.9. +

    +

    + The older gcc compiler is known to produce incorrect code for some 64-bit + (unsigned long) integer operations. I have had reports that earlier + versions of egcs produce strange results too. +

    +

    + If you have both an old gcc and egcs compilers installed, use the CC + parameter on the "make" command to force it to choose the correct compiler: +
    +make CC=egcs ... +

    +

    + Red Hat 7.0 ships with two versions of gcc. If you don't do anything + special, you get gcc 2.96, which will not compile the Linux kernel, so + they included 2.91 as well as kgcc. If you encounter + problems when building Hercules with the 2.96 compiler, try +make CC=kgcc + instead. I would appreciate reports as to how well the 2.96 compiler works, + as it is a development snapshot, and lots of folks, including the GCC + development team ad Linus Torvalds, were very unhappy that Red Hat included + it in their distribution. +

    +

    3.05 + Why do I get an unexpected fixed-point divide exception (program check + 0009 or abend 0C9) on a CVB instruction? +

    +

    + You are using an old gcc compiler. You must use the newer egcs-based + compiler instead. See previous question for the required compiler level. +

    +

    3.06 + Do you plan to port Hercules to other platforms? +

    +

    + Not really, no. We simply do not have the resources to support more than + one operating system. +

    +

    + It should be noted however that we do make efforts to ensure Hercules + builds and run on several different operating system platforms (mostly + just Linux, Windows and Apple right now), but we of course simply cannot + guarantee that it will run on every operating system platform out there. +

    +

    + If you want to make Hercules run on FreeBSD, Solaris, Linux 2.0.x, or + whatever, then by all means go ahead. I welcome reports of any bugs or + problems you find, but I probably won't fix problems if it means introducing + platform-specific code, and I will not be able to test new releases against + other platforms. Folks who have gotten it compiled on the BSDs report that + the hardest part is removing the Linux-specific tape support. +

    +

    + The Hercules code is not intended to be specific to Intel hardware, so if + you find any issues or faults related to running on other hardware (SPARC, + Alpha, PPC, ...) under Linux 2.2, then I'm likely to be receptive to fixing + that sort of problem. Issues related to Unix variants are less likely + to be fixed however. +

    +

    +


    +

    +

    4.01 + How can I create a virtual DASD volume? +

    +

    + The + + Creating Hercules DASD + + document describes + various methods of creating and loading virtual DASD volumes. +

    +

    4.02 + Can I read a tape which was created on a mainframe? +

    +

    + Yes, indirectly. The mainframe tape must be converted to AWSTAPE format + and then downloaded to your PC. The +tapeconv.jcl + file in the + Hercules directory contains a sample program which you can run under OS/390 + on your mainframe system. It reads a file from tape and converts it to + AWSTAPE format. Download the AWSTAPE file to your PC (making sure to choose +binary + format for the download), and then add the downloaded + filename to the Hercules configuration file as a virtual tape device. You + will then be able to read the tape file from the virtual tape drive located + on your PC. +

    +

    + + Note: the "tapeconv" program will not correctly process input tapes + whose block size exceeds 32760! + + One symptom of this may be the message " +ADRY011E I/O ERROR - DEVICE NOT ATTACHED.0000,NA,00...00,0000" + when attempting to restore from tape originally created using the default + DF/DSS block size. The solution is to recreate the dump tape with + DCB=BLKSIZE=32760. +

    +

    4.03 + Can I attach a PC tape drive to Hercules? +

    +

    + Yes. Hercules can read and write tapes on SCSI drives. I have tested this + with 4mm DAT, QIC-1000, and 9-track drives. +

    +

    4.04 + Can I process mainframe tapes with Hercules? +

    +

    + Yes. It is possible to obtain 9-track open reel drives and 3480-type + cartridge drives which attach to the SCSI bus. Hercules makes these + appear to the operating system as channel-attached 3420 or 3480 devices, + making it possible to read and write real mainframe tapes. +

    +

    4.05 + Can I create Assembler programs without a mainframe? +

    +

    + Yes. If you want to write Assembler (BAL) programs to run on Hercules, + but you don't have access to a mainframe, then there are two interesting + products which you can run on your PC to assemble programs: +

    -
    The "Tachyon 390 Cross Assembler" ( -http://www.tachyonsoft.com/tachyon)
    -
    With this assembler you can produce S/390-compatible object decks using -your Linux or Windows PC. A high degree of HLASM compatibility, coupled with -the ability to perform complex assemblies at lightning speed, make this a -product which is well worth looking at. I have tried this assembler and it -is truly amazing.
    -
    The "Dignus Systems/C Compiler" ( -http://www.dignus.com)
    -
    This is a C compiler which runs under Windows or Linux and generates -mainframe assembler code which you can then assemble using the Tachyon -assembler.
    +
    + The "Tachyon 390 Cross Assembler" ( +http://www.tachyonsoft.com/tachyon + ) +
    +
    + With this assembler you can produce S/390-compatible object decks using + your Linux or Windows PC. A high degree of HLASM compatibility, coupled with + the ability to perform complex assemblies at lightning speed, make this a + product which is well worth looking at. I have tried this assembler and it + is truly amazing. +
    +
    + The "Dignus Systems/C Compiler" ( +http://www.dignus.com + ) +
    +
    + This is a C compiler which runs under Windows or Linux and generates + mainframe assembler code which you can then assemble using the Tachyon + assembler. +
    -

    Sam Golob wrote a fascinating review of these two products in the -September 1999 issue of NaSPA Technical Support magazine.

    -

    What architectural features are implemented?

    +

    + Sam Golob wrote a fascinating review of these two products in the + September 1999 issue of NaSPA Technical Support magazine. +

    +

    +


    +

    +

    5.01 + What architectural features are implemented? +

    The following standard features have been implemented:

    • Address-Limit Checking
    • @@ -382,6 +698,7 @@

      What architectural features are implemented?

      The following optional features have been partially implemented:

      • Channel-Subsystem Call
      • +
      • VM/370 assists

      The following features are not yet implemented, either due to lack of documentation, limited host system capability, or lack of @@ -399,39 +716,40 @@

      What architectural features are implemented?

      Reconfiguration, SCP-initiated Reset, Processor Availability
    • PR/SM
    • Sysplex Timer (ETR)
    • -
    • VM/370 assists
    +

    Hercules is compliant with IBM's ALS-1, ALS-2 and ALS-3 architectural level sets to the degree necessary to run all OS/390 versions through 2.10 and known versions of z/OS in both ARCHLVL 1 and ARCHLVL 2 mode, and Linux and z/VM in both ESA/390 and z/Architecture mode.

    -

    What z/Architecture features are implemented?

    -

    z/Architecture includes as standard all of the features of ESA/390, -except vector operations, which is not part of the z/Architecture. -It also includes new standard features such as 5-level DAT, 64-bit -addressing, IDAW format-2, and many new instructions. -

    Who are the Herculeans?

    - +

    +


    +

    +

    6.01 + Who are the Herculeans? +

    The following people are among those who have contributed to this -project, either as coders or as testers or both: +project, either as coders or as testers or both:

    +

    -
  • Roger Bowler +
  • Roger Bowler (original author)
  • Jay Maynard (current maintainer)
  • Jan Jaeger -
  • Volker Bandke +
  • Volker Bandke
  • David Barth -
  • Malcolm Beattie +
  • Malcolm Beattie
  • Mario Bezzi
  • Vic Cross
  • Juergen Dobrinski
  • Fritz Elfert +
  • Tomas Fott
  • Steve Gay
  • Roland Goetschi
  • Glen Herrmannsfeldt
  • Brandon Hill +
  • Gabor Hoffer
  • Dan Horak
  • Soren Jorvang
  • Willem Konynenberg @@ -447,20 +765,25 @@

    Who are the Herculeans?

  • Andy Norrie
  • Dutch Owen
  • Reed H. Petty +
  • Jim Pierson
  • Valery Pogonchenko
  • Emerson Santos
  • Axel Schwarzer
  • Paul Scott
  • Daniel Seagraves
  • Greg Smith +
  • John Summerfield +
  • Mark Szlaga
  • Adam Thornton -
  • David "Fish" Trout +
  • "Fish" (David B. Trout)
  • Ronen Tzur
  • Bernard van der Helm
  • Kris Van Hees +
  • Ivan Warren
  • Matt Zimmerman

    -

    And thanks for support and encouragement from: +

    And thanks for support and encouragement from:

    +

  • Tim Alpaerts
  • Bertus Bekker @@ -471,6 +794,7 @@

    Who are the Herculeans?

  • Cory Hamasaki
  • Tony Harminc
  • Richard Higson +
  • Jim Keohane
  • Sam Knutson
  • Mike Ross
  • Daniel Rudin @@ -479,14 +803,66 @@

    Who are the Herculeans?

  • Mark S. Waterbury

    If anyone feels they have been unfairly omitted from either of these -lists, please let me (Jay Maynard) know.

    -


    -

    Note:If you have any -comments and questions, join the Hercules discussion group at http://groups.yahoo.com/group/hercules-390 -

    -


    back

    -

    -Last updated 1 February 2003

    +lists, please let me (Jay Maynard) know.

    +

    +


    +

    +

    7.01 + Where can I obtain technical support? +

    +

    + If your question and/or concern is not addressed in this FAQ, please + post your question to the Hercules-390 forum: +

    +
    +Files and archives at:
    +  http://groups.yahoo.com/group/hercules-390
    +
    +Community email addresses:
    +  Post message: hercules-390@yahoogroups.com
    +  Subscribe:    hercules-390-subscribe@yahoogroups.com
    +  Unsubscribe:  hercules-390-unsubscribe@yahoogroups.com
    +  List owner:   hercules-390-owner@yahoogroups.com
    +
    +

    + The Hercules-390 forum is in fact your primary source for Hercules support, + and you are strongly encouraged to subscribe. We have a vibrant, active + community of over 3200+ members, many of which are very knowledgeable in + many different areas of mainframe technology, both from a hardware point + of view as well as from an operating system and software point of view. +

    +

    + In addition to the main Hercules-390 forum, other more specialized Hercules + forums also exist to provide more focused support for a variety of popular + IBM mainframe operating systems, such as DOS, VM, and MVS. +

    +

    + + + * Note! the use of Yahoo! as host for the Hercules-390 and related forums + should in no way be interpreted as an endorsement of the Yahoo! service. + + +

    +

    +


    +

    +

    +Note: + If you have any comments and questions, please join the Hercules discussion + group at +http://groups.yahoo.com/group/hercules-390 +

    +

    +


    + +back + +

    +

    + +Last updated 3 October 2003 + +

    + diff --git a/html/hercinst.html b/html/hercinst.html index 494127f..d2b874a 100644 --- a/html/hercinst.html +++ b/html/hercinst.html @@ -1,13 +1,13 @@ -Hercules Version 2: Installation and Operation +Hercules Version 3: Installation and Operation -

    Installing and Operating Hercules Version 2

    +

    Hercules Version 3: Installation and Operation

    Installation Procedure

    Building from source

    @@ -16,7 +16,7 @@

    Building from source

    href="http://www.bsp-gmbh.com/hercules/nude_w32.html">http://www.bsp-gmbh.com/hercules/nude_w32.html.
    1. Download the distribution file -hercules-2.17.1.tar.gz +hercules-3.00.tar.gz

      Notes:

        @@ -29,21 +29,21 @@

        Building from source

    2. Use these commands to unzip the distribution file: -
      tar xvzf ../hercules-2.17.1.tar.gz
      -cd hercules-2.17.1
      +
      tar xvzf ../hercules-3.00.tar.gz
      +cd hercules-3.00
    3. Configure Hercules for your system:

      ./configure

      By default, the configure script will attempt to guess appropriate - compiler optimization flags for your system. If its guesses - turn out to be wrong, you can disable all optimization by - passing the --disable-optimization option to - configure, or specify your own optimization flags with - --enable-optimization=FLAGS + compiler optimization flags for your system. If its guesses + turn out to be wrong, you can disable all optimization by + passing the --disable-optimization option to + configure, or specify your own optimization flags with + --enable-optimization=FLAGS

      For additional configuration options, run ./configure - --help + --help

    4. Build the executables:

      make @@ -60,12 +60,13 @@

      Installing prebuilt RPMs:

      1. Download the RPM file you want:
      2. Install the RPM:
        rpm -Uvh RPMfile
      -This will leave the Hercules executables in /usr/bin, where you can run them +This will leave the Hercules executables in /usr/bin and the dynamic +libraries in /usr/lib and /usr/lib/hercules, where you can run them from anywhere. Sample configuration files will be placed in /etc/hercules, and the IPLable card deck for the ZZSA standalone utility will be placed in /var/share/hercules. @@ -80,7 +81,7 @@

      Installing Debian packages:

    5. Manually with dpkg:
      1. Download a .deb - package + package
      2. dpkg -i DEB
      @@ -89,13 +90,40 @@

      Installing on Mac OS X:

      1. Download the compressed disk image: hercules-2.17.1.dmg +href="hercules-3.00.dmg">hercules-3.00.dmg
      2. Mount the image by double-clicking on it in the Finder. Your web browser may have done that for you already.
      3. Installation and use instructions are in the file OS X ReadMe.rtf.
      +

      Installing on Windows:

      + +
        +
      1. You must first install the Cygwin package. +Download the setup program from the Cygwin +site, and run it. If it's not preselected for you, +select the libintl-2 package when you're presented with a list of packages +to install. Hercules version 3.00 was built with version 1.5.5 +of Cygwin, and may not work with other versions, as the +Cygwin library tends to have subtle incompatibilities form version +to version that Herucles seems to stress. +
      2. Download the self-extracting Windows archive: + +The Fish threads versions are recommended unless you encounter strange +problems. +
      3. Run the self-extracting archive to install on your system. +
      +

      Configuration Procedure

      You will need to amend the configuration file @@ -141,81 +169,81 @@

      Loading a standalone program or operating system

      Panel commands

      -cpu n   Set target CPU for subsequent commands
      -psw     Display program status word
      -gpr     Display general-purpose registers
      -fpr     Display floating-point registers
      -cr      Display control registers
      -ar      Display access registers
      -pr      Display prefix register
      -clocks  Display todclock, clock comparator, cpu timer, and interval timer (370 mode only)
      -
      -rx      Display 64 bytes starting at real address x
      -rx.n    Display n bytes starting at real address x
      -rx-y    Display real storage locations x to y
      -vx      Display 64 bytes starting at virtual address x
      -vx.n    Display n bytes starting at virtual address x
      -vx-y    Display virtual storage locations x to y
      -f-x     Mark storage frame at address x unusable
      -f+x     Mark storage frame at address x usable
      -
      -rx=hexvalue   Alter real storage location x
      -vx=hexvalue   Alter virtual storage location x
      -
      -t+      Turn on CPU instruction tracing
      -t-      Turn off CPU instruction tracing
      -s+      Turn on CPU single-step mode
      -s-      Turn off CPU single-step mode
      -g       Go (turn off CPU single-step mode and start CPU)
      -
      -bx      Set breakpoint at address x
      -b-      Clear breakpoint
      -
      -t+ckd            Turn on CKD key tracing
      -t-ckd            Turn off CKD key tracing
      -t+xxxx  Turn on CCW tracing for device number xxxx
      -t-xxxx  Turn off CCW tracing for device number xxxx
      -s+xxxx  Turn on CCW single-step mode for device number xxxx
      -s-xxxx  Turn off CCW single-step mode for device number xxxx
      -ixxxx   Generate an I/O attention interrupt for device number xxxx
      -kxxxx   Print CCKD internal trace for device number xxxx
      -dsxxxx  Display subchannel status for device number xxxx
      -
      -archmode S/370|ESA/390|ESAME  Set architecture mode
      -loadparm [xxxxxxxx]           Display or set the IPL parameter
      -loadcore xxxxxxxx [address]   Load core image from file xxxxxxxx
      -savecore xxxxxxxx [start/*] [end/*] save core to file xxxxxxxx
      -loadtext xxxxxxxx [address]   Load object deck xxxxxxxx
      -ipl xxxx                      IPL from device number xxxx
      -
      -ext       Generate an external interrupt
      -stop      Stop CPU
      -start     Start CPU
      -stopall   Stop all CPUs
      -startall  Start all CPUs
      -restart   Generate a restart interrupt and start CPU
      -store     Store status
      -ipending  Display pending interrupts
      -quit|exit Terminate Hercules
      -quiet     Toggles panel quiet mode
      -
      -devlist  Display configured devices
      -attach xxxx type [ args ]  Create device xxxx
      -detach xxxx  Delete device xxxx
      -define xxxx yyyy  Rename device number xxxx to yyyy
      -devinit xxxx [ args ]  Reinitialize device xxxx
      -
      -.text   Enter an SCP command via the HMC system console
      -!text   Enter an SCP priority message via the HMC system console
      -
      -toddrag [n]  Display or set TOD clock drag factor
      -
      -pgmtrace n   Turn on program interrupt tracing for interrupt code n
      -pgmtrace -n  Turn off program interrupt tracing for interrupt code n
      -
      -panrate slow | fast | n   Set panel refresh rate to n milliseconds
      +      Command      Description...
      +      -------      -----------------------------------------------
      +      ?            list all commands
      +      help         command specific help
      +      quit         terminate the emulator
      +      exit         (synonym for 'quit')
      +      cpu          define target cpu for panel display and commands
      +      start        start CPU (or printer device if argument given)
      +      stop         stop CPU (or printer device if argument given)
      +      startall     start all CPU's
      +      stopall      stop all CPU's
      +      .reply       scp command
      +      !message     scp priority messsage
      +      i            generate I/O attention interrupt for device
      +      ext          generate external interrupt
      +      restart      generate restart interrupt
      +      store        store CPU status at absolute zero
      +      archmode     set architecture mode
      +      loadparm     set IPL parameter
      +      ipl          IPL from device xxxx
      +      psw          display program status word
      +      gpr          display general purpose registers
      +      fpr          display floating point registers
      +      cr           display control registers
      +      ar           display access registers
      +      pr           display prefix register
      +      clocks       display tod clkc and cpu timer
      +      ipending     display pending interrupts
      +      ds           display subchannel
      +      r            display or alter real storage
      +      v            display or alter virtual storage
      +      devtmax      display or set max device threads
      +      k            display cckd internal trace
      +      attach       configure device
      +      detach       remove device
      +      define       rename device
      +      devinit      reinitialize device
      +      devlist      list all devices
      +      sh           shell command
      +      cache        cache command
      +      cckd         cckd command
      +      shrd         shrd command
      +      quiet        toggle automatic refresh of panel display data
      +      b            set breakpoint
      +      b-           delete breakpoint
      +      g            turn off instruction stepping and start CPU
      +      pgmtrace     trace program interrupts
      +      savecore     save a core image to file
      +      loadcore     load a core image file
      +      loadtext     load a text deck file
      +      ldmod        load a module
      +      rmmod        delete a module
      +      lsmod        list dynamic modules
      +      lsdep        list module dependencies
      +      iodelay      display or set I/O delay value
      +      tt32stats    display CTCI-W32 statistics
      +      toddrag      display or set TOD clock drag factor
      +      panrate      display or set rate at which console refreshes
      +      syncio       display syncio devices statistics
      +      script       Run a sequence of panel commands contained in a file
      +      cscript      Cancels a running script thread
      +      evm          ECPS:VM Commands
      +      aea          Display AEA tables
      +      sf+          add shadow file
      +      sf-          delete shadow file
      +      sf=          rename shadow file
      +      sfc          compress shadow files
      +      sfd          display shadow file stats
      +      t{+/-}       turn instruction tracing on/off
      +      s{+/-}       turn instruction stepping on/off
      +      t{+/-}dev    turn CCW tracing on/off
      +      s{+/-}dev    turn CCW stepping on/off
      +      t{+/-}CKD    turn CKD_KEY tracing on/off
      +      f{+/-}adr    mark frames unusable/usable
       
      -

      The ipl command may also be used to perform a load from cdrom or server. For example if a standard SuSE S/390 Linux distribution CD is loaded @@ -241,8 +269,117 @@

      Panel commands

      There is also an alternate semi-graphical control panel. Press Esc to switch between the command line format and the semi-graphical format. Press ? to obtain help in either control panel. +


      +

      Additional Panel Command Help Information

      +

      +

      +    help        Enter "help cmd" where cmd is the command you need help
      +                with. If the command has additional help text defined for it,
      +                it will be displayed. Help text is usually limited to explaining
      +                the format of the command and its various required or optional
      +                parameters and is not meant to replace reading the documentation.
      +
      +
      +    quit        Format: "quit [NOW]". The optional 'NOW' argument
      +                causes the emulator to immediately terminate without
      +                attempting to close any of the device files or perform
      +                any cleanup. Only use it in extreme circumstances.
      +
      +
      +    cpu         Format: "cpu nnnn" where 'nnnn' is the cpu address of
      +                the cpu in your multiprocessor configuration which you wish
      +                all panel commands to apply to. For example, entering 'cpu 1'
      +                followed by "gpr" will display the general purpose registers
      +                for cpu#1 in your configuration as opposed to cpu#0
      +
      +
      +    start       Entering the 'start' command by itself simply starts a stopped
      +                CPU, whereas 'start <devn>' presses the virtual start button on
      +                printer device <devn>.
      +
      +
      +    stop        Entering the 'stop' command by itself simply stops a running
      +                CPU, whereas 'stop <devn>' presses the virtual stop button on
      +                printer device <devn>, usually causing an INTREQ.
      +
      +
      +    .reply      To reply to a system control program (i.e. guest operating system)
      +                message that gets issued to the hercules console, prefix the reply
      +                with a period.
      +
      +
      +    !message    To enter a system control program (i.e. guest operating system)
      +                priority command on the hercules console, simply prefix the command
      +                with an exclamation point '!'.
      +
      +
      +    r           Format: "r addr[.len]" or "r addr-addr" to display real
      +                storage, or "r addr=value" to alter real storage, where 'value'
      +                is a hex string of up to 32 pairs of digits.
       
      +    v           Format: "v addr[.len]" or "v addr-addr" to display virtual
      +                storage, or "v addr=value" to alter virtual storage, where 'value'
      +                is a hex string of up to 32 pairs of digits.
       
      +
      +    attach      Format: "attach devn type [arg...]
      +
      +
      +    define      Format: "define olddevn newdevn"
      +
      +
      +    devinit     Format: "devinit devn arg [arg...]"
      +
      +
      +    sh          Format: "sh command [args...]" where 'command' is any valid shell
      +                command. The entered command and any arguments are passed as-is to the
      +                shell for processing and the results are displayed on the console.
      +
      +
      +    b           Format: "b addr" where 'addr' is the instruction address where you
      +                wish to halt execution. Once the breakpoint is reached, instruction
      +                execution is temporarily halted and the next instruction to be executed
      +                is displayed. You may then examine registers and/or storage, etc. To
      +                continue execution after reaching a breakpoint, enter the 'g' command.
      +
      +
      +    b-          Format: "b-"  (removes any previously set breakpoint)
      +
      +
      +    pgmtrace    Format: "pgmtrace [-]intcode" where 'intcode' is any valid program
      +                interruption code in the range 0x01 to 0x40. Precede the interrupt code
      +                with a '-' to stop tracing of that particular program interruption.
      +
      +
      +    savecore    Format: "savecore filename [{start|*}] [{end|*}]" where 'start' and 'end'
      +                define the starting and ending addresss of the range of real storage to be
      +                saved to file 'filename'. '*' means address 0 if specified for start, and end
      +                of available storage if specified for end. The default is '* *' (beginning
      +                of storage through the end of storage; i.e. all of storage).
      +
      +    loadcore    Format: "loadcore filename [address]" where 'address' is the storage address
      +                of where to begin loading memory. The file 'filename' is presumed to be a pure
      +                binary image file previously created via the 'savecore' command. The default for
      +                'address' is 0 (begining of storage).
      +
      +    loadtext    Format: "loadtext filename [address]". This command is essentially identical
      +                to the 'loadcore' command except that it loads a text deck file with "TXT"
      +                and "END" 80 byte records (i.e. an object deck).
      +
      +    script      Format: "script filename [...filename...]". Sequentially executes the commands contained
      +                within the file -filename-. The script file may also contain "script" commands,
      +                but the system ensures that no more than 10 levels of script are invoked at any
      +                one time (to avoid a recursion loop)
      +
      +
      +    cscript     Format: "cscript". This command will cancel the currently running script.
      +                if no script is running, no action is taken
      +
      +
      +    evm         Format: "evm". This command invokes ECPS:VM Subcommands.
      +                Type "evm help" to see a list of available commands
      +
      +


      The  hercules.rc  (run-commands)  file:

      Hercules also supports the ability to automatically execute panel commands @@ -252,7 +389,7 @@

      The  hercules.rc  (run-commands)  file:

      entered from the HMC system console.

      The default filename for the run-commands file is "hercules.rc", but may be -overridden by setting the "HERCULES_RC" environment variable to the +overridden by setting the "HERCULES_RC" environment variable to the desired filename.

      Except for the 'pause' command (see paragraph further below), each command @@ -307,6 +444,6 @@

      Technical Support

      -

      Last updated 12 February 2003 +

      Last updated 3 October 2003 diff --git a/html/hercload.html b/html/hercload.html index a135f59..0b24b78 100644 --- a/html/hercload.html +++ b/html/hercload.html @@ -1,13 +1,13 @@ -Hercules Version 2: Creating DASD +Hercules Version 3: Creating DASD -

      Creating Hercules DASD

      +

      Hercules Version 3: Creating DASD

      This page describes various ways of creating and loading DASD volumes for use with Hercules. @@ -221,7 +221,11 @@

      Formatting the empty DASD volume

      init3330.txt and start Hercules in S/370 mode with a configuration file containing these statements:
      
      -001234 3145 02 0 1052 1 ........
      +CPUSERIAL 001234
      +CPUMODEL 3145
      +MAINSIZE 2
      +CNSLPORT 1052
      +ARCHMODE S/370
       0009   1052
       000A   1442    ibcdasdi.rdr
       000C   1442    init3330.txt
      @@ -563,6 +567,6 @@ 

      DASDPDSU - Unload PDS members

      -

      Last updated 2 April 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmsca.html b/html/hercmsca.html new file mode 100644 index 0000000..b51153e --- /dev/null +++ b/html/hercmsca.html @@ -0,0 +1,431 @@ + + + +Hercules Version 3: System Messages: CA - Communication Adapter + + + +

      Hercules Version 3: System Messages: CA - Communication Adapter

      +

      +This page describes the Communication Adapter emulation messages for the Hercules S/370, +ESA/390, and z/Architecture emulator. +

      Messages

      + + +
      +
      + +HHCCA001I CCUU:Connect out to ipaddr:port failed during initial status : System Cause Text + +
      +
      Explanation +
      HERCULES attempted to make an outgoing TCP connection to ipaddr:port, but the system indicated that there was an error while processing the request. +
      System Action +
      The DIAL or ENABLE CCW that caused the connection attempt ends with Unit Check and Intervention Required. + The reason for the failure is indicated in the System Cause Text field +
      Operator Action +
      None +
      Programmer Action +
      Correct the RHOST/RPORT configuration statements in the configuration file. + If this message occured during a program initiated DIAL, correct the dial data. +
      Module +
      commadpt.c +
      Function +
      commadpt_connout +
      +

      +
      + +HHCCA002I CCUU:Line Communication thread thread id started + +
      +
      Explanation +
      The thread responsible for asynchronous operations for the BSC emulated line CCUU has been started. +
      System Action +
      The system continues +
      Operator Action +
      None. This is an informational message +
      Programmer Action +
      None. This is an informational message +
      Module +
      commadpt.c +
      Function +
      commadpt_thread +
      +

      +
      + +HHCCA003E CCUU:Cannot obtain socket for incoming calls : System Cause Text + +
      +
      Explanation +
      A system error occured while attempting to create a socket to listen for incoming calls. +
      System Action +
      The device creation is aborted. +
      Operator Action +
      None. +
      Programmer Action +
      Check the System Cause Text for any information relating to the host system. Notify support. +
      Module +
      commadpt.c +
      Function +
      commadpt_thread +
      +

      +
      + +HHCCA004W CCUU:Waiting 5 seconds for port port to become available + +
      + +
      Explanation
      While attempting to reserve port port to listen to + it, the system indicated the port was already being used. + +
      System Action
      The system waits 5 seconds and then retries the operation + +
      Operator Action
      Terminate the device if the port is in error + +
      Programmer Action
      Determine the program holding the specified port. If + the port cannot be made available, use a different port. +
      +

      +
      + +HHCCA005I CCUU:Listening on port port for incoming TCP connections + +
      + +
      Explanation
      The system is now listening on port port for incoming + a tcp connection. + +
      System Action
      The system continues + +
      Operator Action
      None. This is an informational message + +
      Programmer Action
      None. This is an informational message +
      +

      +
      + +HHCCA006T CCUU:Select failed : System Cause Text + +
      + +
      Explanation
      An error occured during a 'select' system call. + +
      System Action
      The BSC thread is terminated + +
      Operator Action
      None. + +
      Programmer Action
      Check the System Cause Text for any indication + of where the error might come from. Notify Support. +
      +

      +
      + +HHCCA007W CCUU:Outgoing call failed during ENABLE|DIAL command : System Cause Text + +
      + +
      Explanation
      The system reported that a previously initiated TCP connection + could not be completed + +
      System Action
      The I/O operation responsible for the TCP outgoing connection + is ended with Unit Check and Intervention Required. + +
      Operator Action
      If the error indicates that the error is temporary, retry + the operation. + +
      Programmer Action
      Check that the destination for this line is correctly + configured. If the operation was a DIAL attempt, check in the + application configuration or operation data. +
      +

      +
      + +HHCCA008I CCUU:cthread - Incoming Call + +
      + +
      Explanation
      The BSC thread has received an incoming call. + +
      System Action
      Depending on configuration and operational status, + the call is either accepted or rejected. Eventually, an + ongoign I/O operation may complete. + +
      Operator Action
      None. This is an informational message + +
      Programmer Action
      None. This is an informational message +
      +

      +
      + +HHCCA009I CCUU:BSC utility thread terminated + +
      + +
      Explanation
      The BSC thread has ended + +
      System Action
      the system continue. + +
      Operator Action
      Refer to any previous error message + if this message was not unexpected + +
      Programmer Action
      Refer to any previous error message + if this message was not unexpected +
      +

      +
      + +HHCCA010I CCUU:initialisation not performed + +
      + +
      Explanation
      The Device initialisation process has failed. + +
      System Action
      the system terminates or continues, depending + on the reason for which the device was initialisation was + initiated. + +
      Operator Action
      Refer to any previous error message + +
      Programmer Action
      Refer to any previous error message +
      +

      +
      + +HHCCA011E CCUU:Error parsing Keyword + +
      + +
      Explanation
      The device keyword parser found an error while + parsing a known keyword. + +
      System Action
      The system continues. The device initialisation + routine turns on a NOGO flag. + +
      Operator Action
      for a runtime initialisation, + correct the device initialisation parameters, otherwise + notify the programmer. + +
      Programmer Action
      For an engine initialisation, correct the device + configuration parameters in the configuration file. +
      +

      +
      + +HHCCA012E CCUU:Unrecognized parameter Keyword + +
      + +
      Explanation
      The device keyword parser found an unknown + keyword in the device parameter list. + +
      System Action
      The system continues. The device initialisation + routine turns on a NOGO flag. + +
      Operator Action
      for a runtime initialisation, + correct the device initialisation parameters, otherwise + notify the programmer. + +
      Programmer Action
      For an engine initialisation, correct the device + configuration parameters in the configuration file. +
      +

      +
      + +HHCCA013E CCUU:Incorrect local port|remote port|local host|remote host specification value + +
      + +
      Explanation
      The device initialisation routine could not correctly parse a + parameter value. + +
      System Action
      The system continues. The device initialisation + routine turns on a NOGO flag. + +
      Operator Action
      for a runtime initialisation, + correct the device initialisation parameters, otherwise + notify the programmer. + +
      Programmer Action
      For an engine initialisation, correct the device + configuration parameters in the configuration file. +
      +

      +
      + +HHCCA014E CCUU:Incorrect switched/dial specification value; defaulting to DIAL=OUT + +
      + +
      Explanation
      The device initialisation routine found an incorrect + DIAL value. + +
      System Action
      The system continues. The device initialisation + routine turns on a NOGO flag. + +
      Operator Action
      for a runtime initialisation, + correct the device initialisation parameters, otherwise + notify the programmer. + +
      Programmer Action
      For an engine initialisation, correct the device + configuration parameters in the configuration file. +
      +

      +
      + +HHCCA015E CCUU:Missing parameter : DIAL=NO|IN|OUT|INOUT and LPORT|RPORT|LHOST|RHOST not specified + +
      + +
      Explanation
      The device initialisation routine found that a + mandatory parameter was not provided for a specific + DIAL Value. + +
      System Action
      The system continues. The device initialisation + routine turns on a NOGO flag. + +
      Operator Action
      for a runtime initialisation, + correct the device initialisation parameters, otherwise + notify the programmer. + +
      Programmer Action
      For an engine initialisation, correct the device + configuration parameters in the configuration file. + +
      Note
      + For DIAL=NO , LPORT, RPORT and RHOST are needed +
      For DIAL=IN , LPORT is required +
      For DIAL=OUT None of LPORT,LHOST,RPORT,RHOST are required +
      For DIAL=INOUT, LPORT is required +
      +

      +
      + +HHCCA016W CCUU:Conflicting parameter : DIAL=NO|IN|OUT|INOUT and LPORT|RPORT|LHOST|RHOST=value specified + +
      + +
      Explanation
      The device initialisation routine found that a + parameter was provided for a parameter that is not + relevant for a specific DIAL Value. + +
      System Action
      The parameter is ignored. The system continues + +
      Operator Action
      for a runtime initialisation, + correct the device initialisation parameters, otherwise + notify the programmer. + +
      Programmer Action
      For an engine initialisation, correct the device + configuration parameters in the configuration file. + +
      Note +
      For DIAL=IN , RPORT and RHOST are ignored +
      For DIAL=OUT , LPORT, LHOST, RPORT and RHOST are ignored +
      For DIAL=INOUT, RPORT and RHOST are ignored +
      +

      +
      + +HHCCA017I CCUU:LPORT|RPORT|LHOST|RHOST parameter ignored + +
      + +
      Explanation
      The system indicates that the parameter specified + is ignored. This message is preceeded by message HHCCA016W + +
      System Action
      The system continues + +
      Operator Action
      None + +
      Programmer Action
      None +
      +

      +
      + +HHCCA018E CCUU:Bind failed : System Cause Text + +
      + +
      Explanation
      While attempting to bind a socket to a specific + host/port, the host system returned an uncorrectable + error. + +
      System Action
      BSC Thread terminates + +
      Operator Action
      None + +
      Programmer Action
      Check that the LHOST parameter for this device + is indeed a local IP address. Otherwise, notify support. +
      +

      +
      + +HHCCA019E CCUU:BSC comm thread did not initialise + +
      + +
      Explanation
      The BSC communication thread reported that it terminated + while the device was initialising. + +
      System Action
      The device is not initialised. + +
      Operator Action
      Check for any previously issued error message. + +
      Programmer Action
      Check for any previously issued error message. +
      +

      + +
      + + HHCCA020E CCUU:Memory allocation failure for main control block + +
      + +
      Explanation
      A memory allocation failure occured while attempting to reserve memory for the Communication Adapter control block + +
      System Action
      The device is not initialised. + +
      Operator Action
      None + +
      Programmer Action
      Contact support +
      +

      +
      + + HHCCA021I CCUU:Initialisation failed due to previous errors + +
      + +
      Explanation
      The initialisation process for device CCUU did not complete succesfully + +
      System Action
      The device is not initialised + +
      Operator Action
      None + +
      Programmer Action
      Refer to any previous error message +
      +

      +
      + + HHCCA300D Debug Message + +
      + +
      Explanation
      This is a debug message. CCW Tracing has been turned on for this device and the Line Handler issues debug messages to help diagnose interface, conformance and protocol issues. +
      System Action
      The system continues +
      Operator Action
      If the debug messages are no longer necessary, turn off CCW tracing (panel command : 't-CCUU'). +
      Programmer Action
      None +
      +

      +


      +

      +If you have a question about Hercules, see the +Hercules Frequently-Asked Questions page. +


      +back +
      + +

      Last updated 3 October 2003 + + diff --git a/html/hercmscf.html b/html/hercmscf.html index 7b2770d..f6dd712 100644 --- a/html/hercmscf.html +++ b/html/hercmscf.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: CF - Configuration Processing +Hercules Version 3: System Messages: CF - Configuration Processing -

      Hercules Version 2: System Messages: CF: Configuration Processing

      +

      Hercules Version 3: System Messages: CF: Configuration Processing

      This page describes the terminal emulation messages for the Hercules S/370, ESA/390, and z/Architecture emulator. @@ -233,29 +233,32 @@

      Messages

      HHCCF016S Error in filename line lineno: -Invalid CPU thread priority priority +Invalid threadname thread priority priority
      Meaning -
      The CPU thread priority priority specified on the -CPUPRIO configuration statement at line number lineno of -the file named filename must be a valid decimal number. +
      The thread priority priority specified on + the xxxPRIO configuration statement at line + number lineno of the file named + filename must be a valid decimal number.
      Action -
      Correct the CPU thread priority and restart Hercules. +
      Correct the priority on the statement and restart Hercules.
      Issued by
      config.c, function build_config
      -HHCCF017W Hercules is not running as setuid root, cannot raise CPU priority +HHCCF017W Hercules is not running as setuid root, cannot raise + threadname priority
      Meaning -
      A negative value for the CPU thread priority parameter -CPUPRIO was specified, but Hercules is not running as the -root user (either directly or via the setuid mechanism). -This parameter value would cause the priority of the CPU execution thread -to be raised above the normal level if Hercules were running -as root. Since it is not, however, the parameter will have no effect. +
      A negative value for the threadname thread priority + parameter xxxPRIO was specified, but + Hercules is not running as the root user (either directly or via + the setuid mechanism). This parameter value would cause the + priority of the CPU execution thread to be raised above the normal + level if Hercules were running as root. Since it is not, however, + the parameter will have no effect.
      Action
      Either specify a positive value to lower the CPU thread priority, zero to not alter the priority, or omit the statement entirely @@ -617,9 +620,13 @@

      Messages

      Meaning
      An attempt was made to define a device of type type. This -device type is not supported by Hercules. + device type is not supported by Hercules. It may also indicate that the system was + unable to load the device handler for the specified device type.
      Action -
      Specify a supported device type. +
      Specify a supported device type. If the device type is supported, make sure the + the system can load the load modules necessary for device operations. Either use + the LD_LIBRARY_PATH environment variable or use ldconfig(8) to customize the library + search path.
      Issued by
      config.c, function attach_device
      @@ -720,6 +727,173 @@

      Messages

      Issued by
      config.c, function define_device
      +
      +HHCCF051S Error in filename line lineno: +verid is not a valid CPU version code + +
      +
      Meaning +
      The version code verid specified on the CPUVERID +configuration statement at line number lineno of the +file named filename must be exactly two digits long, +and must be a valid hexadecimal number. +
      Action +
      Correct the model number and restart Hercules. +
      Issued by +
      config.c, function build_config +
      +
      +HHCCF052S Error in filename line lineno: +option: invalid argument + +
      +
      Meaning +
      The argument option on the DIAG8CMD is invalid. Valid options are enable and disable. +
      Action +
      Correct the statement and restart Hercules. +
      Issued by +
      config.c, function build_config +
      +
      + HHCCF053E Incorrect second device number in device range near character c + +
      +
      Meaning +
      The 2nd argument of a device range contains an incorrect device number +
      Action +
      Correct the statement and restart Hercules. +
      Issued by +
      config.c, function parse_devnums +
      +
      +HHCCF054E Incorrect Device count near character c + +
      +
      Meaning +
      The count field in a device count specification is invalid +
      Action +
      Correct the statement and restart Hercules. +
      Issued by +
      config.c, function parse_devnums +
      +
      +HHCCF055E Incorrect device address specification near character c + +
      +
      Meaning +
      The first or only CUU in a device specification statement is invalid +
      Action +
      Correct the statement and restart Hercules. +
      Issued by +
      config.c, function parse_devnums +
      +
      +HHCCF056E Incorrect device address range. CUU1>CUU2 + +
      +
      Meaning +
      The first device number of a range is greater than the last device number +
      Action +
      Correct the statement and restart Hercules. +
      Issued by +
      config.c, function parse_devnums +
      +
      +HHCCF057E CUU is on wrong channel (1st device defined on channel CC) + +
      +
      Meaning +
      At least one of the devices in a device number specification is on a different channel than a previously defined device number within the same specification. All device numbers on a single configuration line must be on a single channel (Group of 256 devices) +
      Action +
      Correct the statement and restart Hercules. +
      Issued by +
      config.c, function parse_devnums +
      +
      +HHCCF058E Some or all devices in CUU-CUU duplicate devices already defined + +
      +
      Meaning +
      At least one of the device numbers on a device specification statement defines a device number that is already specified on that same statement. +
      Action +
      Correct the statement and restart Hercules. +
      Issued by +
      config.c, function parse_devnums +
      +
      +HHCCF061W ECPS:VM Statement deprecated. Use ECPSVM instead + +
      +
      Meaning +
      The "ECPS:VM" statement was encountered. This statement is deprecated in favor of the "ECPSVM" statement. +
      Action +
      The configuration statement is still carried out, but the statement syntax should be changed as soon as possible. +
      Issued by +
      config.c +
      +
      +HHCCF062W Missing ECPSVM level value. 20 Assumed + +
      +
      Meaning +
      The "ECPSVM" statement keyword "LEVEL" was encountered, but no numeric level followed it +
      Action +
      The default level of 20 is used, and the ECPS:VM feature is made available. The statement should be corrected as soon as possible. +
      Issued by +
      config.c +
      +
      +HHCCF063W Specifying ECPSVM level directly is deprecated. Use the 'LEVEL' keyword instead + +
      +
      Meaning +
      The deprecated "ECPSVM" level syntax form (without the LEVEL keyword) was found. +
      Action +
      The ECPS:VM Level is set to the specified value. The configuration statement should be updated to include the "LEVEL" keyword. +
      Issued by +
      config.c +
      +
      +HHCCF064W Hercules set priority priority failed: error + +
      +
      Meaning +
      An attempt to change the priority of the Hercules process to + priority failed. The error is described + by error. The process priority has not + been changed. Hercules overall performance may be impaired as + a result. +
      Action +
      If performance problems are noted, correct the error and + restart Hercules. +
      Issued by +
      config.c, function build_config +
      +
      +HHCCF065I Hercules: tid=threadid, pid=processid, + pgid=processgroupid, priority=priority + +
      +
      Meaning +
      Hercules thread id is threadid, its + process id is processid, its process group + id is processgroupid and its execution + priority is priority. +
      Issued by +
      config.c, function build_config +
      +
      +HHCCF066E Invalid HTTPROOT: error + +
      +
      Meaning +
      The pathname specified on your HTTPROOT statement is invalid. +The error is described by error. +
      Action +
      Correct the error and restart Hercules. +
      Issued by +
      config.c, function build_config +


      @@ -729,6 +903,6 @@

      Messages

      back -

      Last updated 16 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmscp.html b/html/hercmscp.html index fdb5528..dc0c4cc 100644 --- a/html/hercmscp.html +++ b/html/hercmscp.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: CP - CPU Emulation +Hercules Version 3: System Messages: CP - CPU Emulation -

      Hercules Version 2: System Messages: CP - CPU Emulation

      +

      Hercules Version 3: System Messages: CP - CPU Emulation

      This page describes the CPU emulation messages for the Hercules S/370, ESA/390, and z/Architecture emulator. @@ -75,14 +75,15 @@

      Messages

      Issued by
      cpu.c, function cpu_thread -
      -HHCCP006E Cannot create timer thread: error +
      +HHCCP006S Cannot create timer thread: error
      Meaning -
      An attempt to create the thread used for -timing functions has failed. Hercules will continue, but -successful execution is unlikely. The error is described by error. +
      An attempt to create the thread used for timing functions has + failed. The error is described by error. + The CPU thread terminates and successful continuation of Hercules + is not possible.
      Action
      Correct the error and restart Hercules.
      Issued by @@ -148,27 +149,6 @@

      Messages

      Issued by
      cpu.c, function process_interrupt
      -
      -HHCCP012I Timer thread started: -tid=threadid, pid=processid - -
      -
      Meaning -
      The thread for timing functions has been -started. Its thread id is threadid, and its process id is -processid. -
      Issued by -
      timer.c, function timer_update_thread -
      -
      -HHCCP013I Timer thread ended - -
      -
      Meaning -
      The thread for timing functions has ended. -
      Issued by -
      timer.c, function timer_update_thread -


      @@ -178,6 +158,6 @@

      Messages

      back -

      Last updated 16 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmsct.html b/html/hercmsct.html index ef44eca..21a30f5 100644 --- a/html/hercmsct.html +++ b/html/hercmsct.html @@ -1,13 +1,13 @@ -Hercules Version 2: System Messages: CT - Channel-to-Channel Adapter +Hercules Version 3: System Messages: CT - Channel-to-Channel Adapter Emulation -

      Hercules Version 2: System Messages: CT - Channel-to-Channel Adapter +

      Hercules Version 3: System Messages: CT - Channel-to-Channel Adapter Emulation

      This page describes the channel-to-channel adapter emulation messages for @@ -32,6 +32,6 @@

      Messages

      back -

      Last updated 15 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmsda.html b/html/hercmsda.html index 23618b5..a567fc0 100644 --- a/html/hercmsda.html +++ b/html/hercmsda.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: DA - DASD Emulation +Hercules Version 3: System Messages: DA - DASD Emulation -

      Hercules Version 2: System Messages: DA - DASD Emulation

      +

      Hercules Version 3: System Messages: DA - DASD Emulation

      This page describes the DASD emulation messages for the Hercules S/370, ESA/390, and z/Architecture emulator. @@ -30,6 +30,6 @@

      Messages

      back -

      Last updated 15 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmsdc.html b/html/hercmsdc.html index d18de4d..160ec2a 100644 --- a/html/hercmsdc.html +++ b/html/hercmsdc.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: DC - dasdcopy +Hercules Version 3: System Messages: DC - dasdcopy -

      Hercules Version 2: System Messages: DC - dasdcopy

      +

      Hercules Version 3: System Messages: DC - dasdcopy

      This page describes the messages for the Hercules S/370, ESA/390, and z/Architecture emulator disk image copy utility. @@ -158,6 +158,6 @@

      Messages

      back -

      Last updated 18 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmsdg.html b/html/hercmsdg.html new file mode 100644 index 0000000..f60399b --- /dev/null +++ b/html/hercmsdg.html @@ -0,0 +1,201 @@ + + + +Hercules Version 3: System Messages: DG - DYNGUI.DLL + + + +

      Hercules Version 3: System Messages: DG - DYNGUI.DLL

      +

      +This page describes the DYNGUI.DLL messages for the Hercules S/370, +ESA/390, and z/Architecture emulator. +

      Messages

      +
      + + + + + +
      + + + + + + + + + + + + + + + +
      +HHCDG001I dyngui.dll - name - version vers initiated +
      +HHCDG002I dyngui.dll terminated +
      +HHCDG003S select failed on input stream: errmsg +
      +HHCDG004S read failed on input stream: errmsg +
      +HHCDG005E Device query buffer overflow! (device=xxxx) +
      +HHCDG006S malloc pszInputBuff failed: errmsg +
      +HHCDG007S malloc pszCommandBuff failed: errmsg +
      + +


      + + + + +

      +HHCDG001I dyngui.dll - name - version vers initiated +
      + +

      Meaning
      + + The dyngui loadable module was successfully loaded and initiated. + +

      Action
      + + None. This message is informational only. + +


      + + + +
      +HHCDG002I dyngui.dll terminated +
      + +

      Meaning
      + + The dyngui loadable module was successfully terminated. + +

      Action
      + + None. This message is informational only. + +


      + + + +
      +HHCDG003S select failed on input stream: errmsg +
      + +

      Meaning
      + + The socket select function call failed on the input stream. + errmsg  describes the exact error. + +

      Action
      + + None; this is a fatal error; the system is immediately terminated. + +


      + + + +
      +HHCDG004S read failed on input stream: errmsg +
      + +

      Meaning
      + + An unrecoverable i/o error occurred while reading from the input stream. + errmsg  describes the exact error. + +

      Action
      + + None; this is a fatal error; the system is immediately terminated. + +


      + + + +
      +HHCDG005E Device query buffer overflow! (device=xxxx) +
      + +

      Meaning
      + + The device query buffer is not large enough to hold all of the information + returned by the device handler. xxxx  is the device + whose information was being queried at the time the error occurred. + +

      Action
      + + The system attempts to continue functioning, but unpredictable results may + occur (i.e. the system could crash). You should report this error to the + Hercules developers immediately so that they can build you a new dyngui.dll + with a larger device query buffer. Since the dyngui.dll is an unloadable + module however, you will need to restart Hercules in order to begin using + the newly fixed version of dyngui.dll. + +


      + + + +
      +HHCDG006S malloc pszInputBuff failed: errmsg +
      + +

      Meaning
      + + There was not enough virtual memory on the host system to satisfy the + malloc request for the input stream buffer. errmsg  + describes the exact error. + +

      Action
      + + None; this is a fatal error; the system is immediately terminated. You + should increase the size of your host system's virtual memory allocation + so that there is enough for Hercules to run, or else decrease the amount of + memory that Hercules needs in order to run (e.g. decrease your MAINSIZE + value). + +


      + + + +
      +HHCDG007S malloc pszCommandBuff failed: errmsg +
      + +

      Meaning
      + + There was not enough virtual memory on the host system to satisfy the + malloc request for the command processing buffer. errmsg  + describes the exact error. + +

      Action
      + + None; this is a fatal error; the system is immediately terminated. You + should increase the size of your host system's virtual memory allocation + so that there is enough for Hercules to run, or else decrease the amount of + memory that Hercules needs in order to run (e.g. decrease your MAINSIZE + value). + +


      + + + +
      +


      +

      +If you have a question about Hercules, see the +Hercules Frequently-Asked Questions page. +


      +back +
      + +

      Last updated 3 October 2003 + + diff --git a/html/hercmsdi.html b/html/hercmsdi.html index 73f9f91..c8aeb98 100644 --- a/html/hercmsdi.html +++ b/html/hercmsdi.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: DI - dasdinit +Hercules Version 3: System Messages: DI - dasdinit -

      Hercules Version 2: System Messages: DI - dasdinit

      +

      Hercules Version 3: System Messages: DI - dasdinit

      This page describes the messages for the Hercules S/370, ESA/390, and z/Architecture emulator utility program dasdinit. @@ -31,6 +31,6 @@

      Messages

      back -

      Last updated 18 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmsdl.html b/html/hercmsdl.html index 96379fb..69c08df 100644 --- a/html/hercmsdl.html +++ b/html/hercmsdl.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: DL - dasdload +Hercules Version 3: System Messages: DL - dasdload -

      Hercules Version 2: System Messages: DL - dasdload

      +

      Hercules Version 3: System Messages: DL - dasdload

      This page describes the messages for the Hercules S/370, ESA/390, and z/Architecture emulator utility program dasdload. @@ -1700,6 +1700,6 @@

      Messages

      back -

      Last updated 24 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmsds.html b/html/hercmsds.html index 83c1ddd..3dccd59 100644 --- a/html/hercmsds.html +++ b/html/hercmsds.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: DS - dasdisup +Hercules Version 3: System Messages: DS - dasdisup -

      Hercules Version 2: System Messages: DS - dasdisup

      +

      Hercules Version 3: System Messages: DS - dasdisup

      This page describes the messages for the Hercules S/370, ESA/390, and z/Architecture emulator utility program dasdisup. @@ -276,6 +276,6 @@

      Messages

      back -

      Last updated 17 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmsdt.html b/html/hercmsdt.html index 980c397..dbd4b2e 100644 --- a/html/hercmsdt.html +++ b/html/hercmsdt.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: DT - dasdcat +Hercules Version 3: System Messages: DT - dasdcat -

      Hercules Version 2: System Messages: DT - dasdcat

      +

      Hercules Version 3: System Messages: DT - dasdcat

      This page describes the messages for the Hercules S/370, ESA/390, and z/Architecture emulator utility program dasdcat. @@ -85,6 +85,6 @@

      Messages

      back -

      Last updated 18 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmsdu.html b/html/hercmsdu.html index 9581254..6ea4234 100644 --- a/html/hercmsdu.html +++ b/html/hercmsdu.html @@ -1,13 +1,13 @@ -Hercules Version 2: System Messages: DU - DASD Utilities Common +Hercules Version 3: System Messages: DU - DASD Utilities Common Functions -

      Hercules Version 2: System Messages: DU - DASD Utilities +

      Hercules Version 3: System Messages: DU - DASD Utilities Common Functions

      This page describes the messages for the Hercules S/370, diff --git a/html/hercmsg.html b/html/hercmsg.html index 8c66541..fe29264 100644 --- a/html/hercmsg.html +++ b/html/hercmsg.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Message Overview +Hercules Version 3: System Message Overview -

      Hercules Version 2: System Message Overview

      +

      Hercules Version 3: System Message Overview

      This page describes the system messages for the Hercules S/370, ESA/390, and z/Architecture emulator. @@ -21,6 +21,8 @@

      Message format

      mm
      specifies the function that issued the message, from the following list:
      +
      CA +
      Communication Adapter emulation
      CF
      Configuration file processing
      CP @@ -31,6 +33,8 @@

      Message format

      DASD emulation (both CKD and FBA)
      DC
      dasdcopy +
      DG +
      dyngui.dll
      DI
      dasdinit
      DL @@ -40,6 +44,8 @@

      Message format

      DT
      dasdcat
      DU +
      Hercules Dynamic Loader +
      HD
      DASD utilities common functions
      HE
      hetinit @@ -56,6 +62,8 @@

      Message format

      IN
      Hercules initialization
      LC +
      System Log functions +
      LG
      LCS emulation
      PN
      Hercules control panel command messages @@ -77,8 +85,12 @@

      Message format

      tapemap
      TS
      tapesplt +
      TT +
      TOD Clock and Timer Services
      TU
      TUN/TAP driver support +
      VM +
      VM/CP emulation facility
      nnn
      Specific message number, assigned more or less sequentially. @@ -111,6 +123,6 @@

      Message format

      back -

      Last updated 19 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmshe.html b/html/hercmshe.html index 958f700..ecaace2 100644 --- a/html/hercmshe.html +++ b/html/hercmshe.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: HE - hetinit +Hercules Version 3: System Messages: HE - hetinit -

      Hercules Version 2: System Messages: HE - hetinit

      +

      Hercules Version 3: System Messages: HE - hetinit

      This page describes the messages for the Hercules S/370, ESA/390, and z/Architecture emulator utility program hetinit. @@ -30,6 +30,6 @@

      Messages

      back -

      Last updated 15 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmshg.html b/html/hercmshg.html index bc6c745..0b43d65 100644 --- a/html/hercmshg.html +++ b/html/hercmshg.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: HG - hetget +Hercules Version 3: System Messages: HG - hetget -

      Hercules Version 2: System Messages: HG - hetget

      +

      Hercules Version 3: System Messages: HG - hetget

      This page describes the messages for the Hercules S/370, ESA/390, and z/Architecture emulator utility program hetget. @@ -30,6 +30,6 @@

      Messages

      back -

      Last updated 15 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmshm.html b/html/hercmshm.html index f3e102a..59561ef 100644 --- a/html/hercmshm.html +++ b/html/hercmshm.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: HM - hetmap +Hercules Version 3: System Messages: HM - hetmap -

      Hercules Version 2: System Messages: HM - hetmap

      +

      Hercules Version 3: System Messages: HM - hetmap

      This page describes the messages for the Hercules S/370, ESA/390, and z/Architecture emulator utility program hetmap. @@ -30,6 +30,6 @@

      Messages

      back -

      Last updated 15 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmsht.html b/html/hercmsht.html index e6c993d..2a52b6d 100644 --- a/html/hercmsht.html +++ b/html/hercmsht.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: HT - HTTP Server +Hercules Version 3: System Messages: HT - HTTP Server -

      Hercules Version 2: System Messages: HT - HTTP Server

      +

      Hercules Version 3: System Messages: HT - HTTP Server

      This page describes the HTTP server messages for the Hercules S/370, ESA/390, and z/Architecture emulator. @@ -154,6 +154,6 @@

      Messages

      back -

      Last updated 16 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmshu.html b/html/hercmshu.html index fcc076d..8d4d01e 100644 --- a/html/hercmshu.html +++ b/html/hercmshu.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: HU - hetutil +Hercules Version 3: System Messages: HU - hetutil -

      Hercules Version 2: System Messages: HU - hetinit

      +

      Hercules Version 3: System Messages: HU - hetinit

      This page describes the messages for the Hercules S/370, ESA/390, and z/Architecture emulator utility program hetutil. @@ -30,6 +30,6 @@

      Messages

      back -

      Last updated 15 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmsif.html b/html/hercmsif.html index d69a197..dde4918 100644 --- a/html/hercmsif.html +++ b/html/hercmsif.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: IF - hercifc +Hercules Version 3: System Messages: IF - hercifc -

      Hercules Version 2: System Messages: IF - hercifc

      +

      Hercules Version 3: System Messages: IF - hercifc

      This page describes the messages for the Hercules S/370, ESA/390, and z/Architecture emulator utility program hercifc. @@ -90,6 +90,6 @@

      Messages

      back -

      Last updated 16 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmsin.html b/html/hercmsin.html index 221bbe4..626118b 100644 --- a/html/hercmsin.html +++ b/html/hercmsin.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: IN - Hercules Initialization +Hercules Version 3: System Messages: IN - Hercules Initialization -

      Hercules Version 2: System Messages: IN - Hercules Initialization

      +

      Hercules Version 3: System Messages: IN - Hercules Initialization

      This page describes the system initialization messages for the Hercules S/370, ESA/390, and z/Architecture emulator. @@ -87,6 +87,30 @@

      Messages

      Issued by
      impl.c, function main +
      +HHCIN007S Cannot create devnum connection thread: error + +
      +
      Meaning +
      The shared device server was unable to create the thread meant to +manage remote device devnum. +The error is described by error. +
      Action +
      Correct the error and restart Hercules. +
      Issued by +
      impl.c, function main +
      +
      +HHCIN099I Hercules terminated + +
      +
      Meaning +
      Hercules has ended. +
      Action +
      None. +
      Issued by +
      hsccmd.c, function quit_cmd +


      @@ -96,6 +120,6 @@

      Messages

      back -

      Last updated 16 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmslc.html b/html/hercmslc.html index 66bfe6a..6ee0945 100644 --- a/html/hercmslc.html +++ b/html/hercmslc.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: LC - LAN Channel Station Emulation +Hercules Version 3: System Messages: LC - LAN Channel Station Emulation -

      Hercules Version 2: System Messages: LC - LAN Channel Station Emulation

      +

      Hercules Version 3: System Messages: LC - LAN Channel Station Emulation

      This page describes the LAN Channel Station emulation messages for the Hercules S/370, ESA/390, and z/Architecture emulator. @@ -30,6 +30,6 @@

      Messages

      back -

      Last updated 15 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmslg.html b/html/hercmslg.html new file mode 100644 index 0000000..339adbb --- /dev/null +++ b/html/hercmslg.html @@ -0,0 +1,134 @@ + + + +Hercules Version 3: System Messages: LG - Log functions + + + +

      Hercules Version 3: System Messages: LG - Log functions

      +

      +This page describes messages related to the log funtions of the Hercules S/370, +ESA/390, and z/Architecture emulator. +

      Messages

      +
      +
      +HHCLG001E Error redirecting stdout: error + +
      +
      Meaning +
      The stdout stream could not be redirected to the system logger, +the error is described by error. +
      Issued by +
      logger.c, function logger_thread +
      +
      +HHHCLG002E Error reading syslog pipe: error + +
      +
      Meaning +
      An error occurred while reading the syslog pipe. +The error is described by error. +
      Issued by +
      logger.c, function logger_thread +
      +
      +HHCLG003E Error writing hardcopy log: error + +
      +
      Meaning +
      The error as indicated by error occurred while writeing the hardcopy log. +
      Issued by +
      logger.c, function logger_thread +
      +
      +HHCLG004E Error duplicating stderr: error + +
      +
      Meaning +
      Stdout could not be redirected to stderr. +The error is described by error. +
      Issued by +
      logger.c, function logger_init +
      +
      +HHCLG005E Error duplicating stdout: error + +
      +
      Meaning +
      Stderr could not be redirected to stdout. +The error is described by error. +
      Issued by +
      logger.c, function logger_init +
      +
      +HHCLG006E Duplicate error redirecting hardcopy log: error + +
      +
      Meaning +
      The error described by error occurred whilst redirecting the hardcopy log. +
      Issued by +
      logger.c, function logger_init +
      +
      +HHCLG007S Hardcopy log fdopen failed: error + +
      +
      Meaning +
      An attempt to open a stream for the hardcopy log failed. +The error is described by error. +
      Issued by +
      logger.c, function logger_init +
      +
      +HHCLG008S logbuffer malloc failed: error + +
      +
      Meaning +
      An instorage buffer for the system log could not be obtained. +The error is described by error. +
      Issued by +
      logger.c, function logger_init +
      +
      +HHCLG009S Syslog message pipe creation failed: error + +
      +
      Meaning +
      An attempt to create the pipe for the system logger failed. +The error is described by error. +
      Issued by +
      logger.c, function logger_init +
      +
      +HHCLG010S Syslog write message pipe open failed: error + +
      +
      Meaning +
      An attempt to open a stream for the logger pipe failed. +The error is described by error. +
      Issued by +
      logger.c, function logger_init +
      +
      +HHCLG011S Syslog read message pipe open failed: error + +
      +
      Meaning +
      An attempt to open a stream for the logger pipe failed. +The error is described by error. +
      Issued by +
      logger.c, function logger_init +
      +
      +


      +

      +If you have a question about Hercules, see the +Hercules Frequently-Asked Questions page. +


      +back +
      + +

      Last updated 3 October 2003 + + diff --git a/html/hercmspn.html b/html/hercmspn.html index d1c67ba..343b8f9 100644 --- a/html/hercmspn.html +++ b/html/hercmspn.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: PN - Control Panel +Hercules Version 3: System Messages: PN - Control Panel -

      Hercules Version 2: System Messages: PN - Control Panel

      +

      Hercules Version 3: System Messages: PN - Control Panel

      This page describes the control panel messages for the Hercules S/370, ESA/390, and z/Architecture emulator. @@ -190,6 +190,6 @@

      Messages

      back -

      Last updated 18 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmspr.html b/html/hercmspr.html index 185d784..aec0856 100644 --- a/html/hercmspr.html +++ b/html/hercmspr.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: PR - Printer Emulation +Hercules Version 3: System Messages: PR - Printer Emulation -

      Hercules Version 2: System Messages: PR - Printer Emulation

      +

      Hercules Version 3: System Messages: PR - Printer Emulation

      This page describes the printer emulation messages for the Hercules S/370, ESA/390, and z/Architecture emulator. @@ -183,6 +183,6 @@

      Messages

      back -

      Last updated 15 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmspu.html b/html/hercmspu.html index 38f2337..56274e4 100644 --- a/html/hercmspu.html +++ b/html/hercmspu.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: PU - Card Punch Emulation +Hercules Version 3: System Messages: PU - Card Punch Emulation -

      Hercules Version 2: System Messages: PU - Card Punch Emulation

      +

      Hercules Version 3: System Messages: PU - Card Punch Emulation

      This page describes the card punch emulation messages for the Hercules S/370, ESA/390, and z/Architecture emulator. @@ -72,6 +72,6 @@

      Messages

      back -

      Last updated 16 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmsrd.html b/html/hercmsrd.html index 0190b10..11dcd2c 100644 --- a/html/hercmsrd.html +++ b/html/hercmsrd.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: RD - Card Reader Emulation +Hercules Version 3: System Messages: RD - Card Reader Emulation -

      Hercules Version 2: System Messages: RD - Card Reader Emulation

      +

      Hercules Version 3: System Messages: RD - Card Reader Emulation

      This page describes the card reader emulation messages for the Hercules S/370, ESA/390, and z/Architecture emulator. @@ -264,6 +264,6 @@

      Messages

      back -

      Last updated 16 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmssd.html b/html/hercmssd.html index 4276b06..705d420 100644 --- a/html/hercmssd.html +++ b/html/hercmssd.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: SD - Socket Devices +Hercules Version 3: System Messages: SD - Socket Devices -

      Hercules Version 2: System Messages: SD - Socket Devices

      +

      Hercules Version 3: System Messages: SD - Socket Devices

      This page describes the messages for the Hercules S/370, ESA/390, and z/Architecture emulator common routines to support socket diff --git a/html/hercmsta.html b/html/hercmsta.html index aa75e5c..97b96d8 100644 --- a/html/hercmsta.html +++ b/html/hercmsta.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: TA - Tape Device Emulation +Hercules Version 3: System Messages: TA - Tape Device Emulation -

      Hercules Version 2: System Messages: TA - Tape Device Emulation

      +

      Hercules Version 3: System Messages: TA - Tape Device Emulation

      This page describes the tape device emulation messages for the Hercules S/370, ESA/390, and z/Architecture emulator. @@ -30,6 +30,6 @@

      Messages

      back -

      Last updated 15 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmstc.html b/html/hercmstc.html index b8b4ef8..1823ca6 100644 --- a/html/hercmstc.html +++ b/html/hercmstc.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: TC - tapecopy +Hercules Version 3: System Messages: TC - tapecopy -

      Hercules Version 2: System Messages: TC - tapecopy

      +

      Hercules Version 3: System Messages: TC - tapecopy

      This page describes the messages for the Hercules S/370, ESA/390, and z/Architecture emulator utility program tapecopy. @@ -30,6 +30,6 @@

      Messages

      back -

      Last updated 15 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmste.html b/html/hercmste.html index ba1ab00..501f3bc 100644 --- a/html/hercmste.html +++ b/html/hercmste.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: TE - 1052/3270 Terminal Emulation +Hercules Version 3: System Messages: TE - 1052/3270 Terminal Emulation -

      Hercules Version 2: System Messages: TE - 1052/3270 Terminal Emulation

      +

      Hercules Version 3: System Messages: TE - 1052/3270 Terminal Emulation

      This page describes the terminal emulation messages for the Hercules S/370, ESA/390, and z/Architecture emulator. @@ -118,6 +118,15 @@

      Messages

      Issued by
      console.c, function connect_client +
      +HHCTE010E CNSLPORT statement invalid: statement + +
      +
      Meaning +
      The CNSLPORT statement in the hercules configuration file is invalid. +
      Issued by +
      console.c, function console_connection_handler +


      @@ -127,6 +136,6 @@

      Messages

      back -

      Last updated 15 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercmstm.html b/html/hercmstm.html index 6cb9766..6387055 100644 --- a/html/hercmstm.html +++ b/html/hercmstm.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: TM - tapemap +Hercules Version 3: System Messages: TM - tapemap -

      Hercules Version 2: System Messages: TM - tapemap

      +

      Hercules Version 3: System Messages: TM - tapemap

      This page describes the messages for the Hercules S/370, ESA/390, and z/Architecture emulator utility program tapemap. @@ -30,6 +30,6 @@

      Messages

      back -

      Last updated 15 December 2002 +

      Last updated 3 October 2002 diff --git a/html/hercmsts.html b/html/hercmsts.html index eb7575b..add5611 100644 --- a/html/hercmsts.html +++ b/html/hercmsts.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: TS - tapesplt +Hercules Version 3: System Messages: TS - tapesplt -

      Hercules Version 2: System Messages: TS - tapesplt

      +

      Hercules Version 3: System Messages: TS - tapesplt

      This page describes the messages for the Hercules S/370, ESA/390, and z/Architecture emulator utility program tapesplt. @@ -30,6 +30,6 @@

      Messages

      back -

      Last updated 15 December 2002 +

      Last updated 3 October 2002 diff --git a/html/hercmstt.html b/html/hercmstt.html new file mode 100644 index 0000000..e9c9878 --- /dev/null +++ b/html/hercmstt.html @@ -0,0 +1,68 @@ + + + + +Hercules Version 3: System Messages: TT - TOD Clock and Timer Services + + + + +

      Hercules Version 3: System Messages: +TT - TOD Clock and Timer Services

      +

      This page describes the TOD Clock and Timer Services messages for the +Hercules S/370, ESA/390, and z/Architecture emulator. +

      Messages

      +
      +
      +HHCTT001W Timer thread set priority priority failed: + error + +
      +
      Meaning +
      An attempt to change the priority of the timer thread to + priority failed. The error is described + by error. The thread priority has not + been changed. Hercules overall performance may be impaired as + a result. +
      Action +
      If performance problems are noted, correct the error and + restart Hercules. +
      Issued by +
      timer.c, function timer_update_thread +
      +
      +HHCTT002I Timer thread started: + tid=threadid, pid=processid, + priority=priority + +
      +
      Meaning +
      The thread for timing functions has been started. Its thread + id is threadid, its process id is + processid and the thread priority is + priority. +
      Issued by +
      timer.c, function timer_update_thread +
      +
      +HHCTT003I Timer thread ended + +
      +
      Meaning +
      The thread for timing functions has ended. +
      Issued by +
      timer.c, function timer_update_thread +
      +
      +


      +

      +If you have a question about Hercules, see the +Hercules Frequently-Asked Questions page. +


      +back +
      + +

      Last updated 3 October 2003 + + diff --git a/html/hercmstu.html b/html/hercmstu.html index c82c90e..e73026f 100644 --- a/html/hercmstu.html +++ b/html/hercmstu.html @@ -1,12 +1,12 @@ -Hercules Version 2: System Messages: TU - TUN/TAP device support +Hercules Version 3: System Messages: TU - TUN/TAP device support -

      Hercules Version 2: System Messages: TU - TUN/TAP device support

      +

      Hercules Version 3: System Messages: TU - TUN/TAP device support

      This page describes the messages for the Hercules S/370, ESA/390, and z/Architecture emulator TUN/TAP support routines. @@ -30,6 +30,6 @@

      Messages

      back -

      Last updated 15 December 2002 +

      Last updated 3 October 2003 diff --git a/html/hercnew.html b/html/hercnew.html index d36fd58..2ee6572 100644 --- a/html/hercnew.html +++ b/html/hercnew.html @@ -8,6 +8,33 @@ VLINK="#008040" ALINK="#000000">

      What's new in Hercules


      +

      What's new in release 3.00

      +

      Release date: 2 October 2003 +

        +
      • Dynamically loaded module support for devices, instructions, and +operator console panels (Jan Jaeger, David "Fish" Trout, Ivan Warren) +
      • Shared and remote DASD support (Greg Smith) +
      • z/990 (ALS4) instruction support (Roger Bowler, Jan Jaeger, Bernard van +der Helm) +
      • Simplified network adapter specifications (David "Fish" Trout, Jim +Pierson) +
      • New device emulations: 2703, 3410, 3490, 9347 (Ivan Warren) +
      • ECPS:VM support (Ivan Warren) +
      • Reworked process priority handling (Mark Gaubatz) +
      • Greatly improved interval timer resolution (Mark Gaubatz) +
      • Internal consistency checking improvvements (Greg Smith) +
      • Corrected 3270 session disconnect processing (Ivan Warren) +
      • Instruction disassembler in control panel (Jan Jaeger) +
      • Tape read backward fixes (Jay Jaeger) +
      • Fix for double memory consumption bug on Windows (Mark D., David +"Fish" Trout) +
      • OMA tape processing fixes (Ivan Warren) +
      • Message logging restructuring (Jan Jaeger, David "Fish" Trout) +
      • S/370 I/O race condition fixes (Victor Shkamerda, Greg Smith) +
      • Manual pages for some commands (Jim Morrison) +
      +

      Download +hercules-3.00.tar.gz

      What's new in release 2.17.1

      Release date: 12 February 2003

        @@ -793,6 +820,6 @@

        What's new in release 1.32

        -

        Last updated 12 February 2003 +

        Last updated 3 October 2003 diff --git a/html/hercrdr.html b/html/hercrdr.html index fc144b9..554a34b 100644 --- a/html/hercrdr.html +++ b/html/hercrdr.html @@ -1,13 +1,13 @@ -Hercules Version 2: +<HEAD><TITLE>Hercules Version 3: Submitting jobs via the socket reader -

        Submitting jobs via a socket reader

        +

        Hercules version 3: Submitting jobs via the socket reader

        The "sockdev" option allows you to submit cards directly to a Hercules card reader from outside of Hercules. What you do is define your reader @@ -196,6 +196,6 @@

        Using the netcat program

        -

        Last updated 27 January 2002 +

        Last updated 3 October 2003 \ No newline at end of file diff --git a/html/hercrnot.html b/html/hercrnot.html new file mode 100644 index 0000000..62c91b8 --- /dev/null +++ b/html/hercrnot.html @@ -0,0 +1,113 @@ + + + +Hercules Version 3: Release Notes and Known Issues + + + +

        Hercules Version 3: Release Notes and Known Issues

        +
        +

        Release notes for release 3.00

        +

        Release date: 3 October 2003 +

        +
        CTCI device changes +

        +

          +
        • The CTCI-W32 protocol is deprecated. You should use the CTCI +protocol instead.
        • +
        • The VMNET protocol is also deprecated. Not even its author uses it any +more. Every system on which Hercules is now prebuilt has the TUN/TAP +driver functionality available inone form or another, and it's much more +robust.
        • +
        +Both of these will go away in a future release.

        +

        In addition, you must not define both even/odd CTCI device pairs in +your configuration file. You should only define the first even +numbered device. Hercules will automatically define the odd numbered device +for you. If you define the odd numbered device by mistake, an open error will +occur on that device. This is by design. See the README.NETWORKING document +for further details.

        +
        Hercules Dynamic Loader support +
        +

        Starting with version 3.00, Hercules now contains support for the dynamic +loading of certain modules upon startup on Linux, Windows, and Mac OS X. +This support should also work on any platform supported by GNU libtool. As a +result of this new feature, Hercules itself now no longer consists of just the +'hercules.exe' module by itself, but rather consists of both the 'hercules.exe' +program as well as whatever dynamic modules (DLLs) that accompany it.

        +

        As a result of this change, whenever you install a new version of Hercules, +you must ensure that you ALSO install the accompanying new versions of the +new dynamic modules as well. Attempting to use a version of Hercules with a +dynamic module that was not specifically built for that version will cause +loading of that dynamic module to fail.

        +

        You cannot mix versions of Hercules with differing versions of +dynamically loaded modules.

        +

        Ensure that your library path (set by the environment variable +LD_LIBRARY_PATH) set correctly such that it includes the directory of your +Hercules dynamic load libraries. If you see message HHCCF042E, +which indicates that the system is unable to locate necessary loadable +modules, this is likely your problem. This should not be necessary if you +have a binary download, but if you're building from source, especially if +you've previously installed a binary package, this should be the first thing +you do.

        +
        ECPS:VM +
        +

        Do not use ECPS:VM (See README.ECPSVM) in an AP or MP environment +in VM/370. If AP=YES or MP=YES is coded in DMKSYS +and the AP/MP control file is used to build the CP nucleus and +NUMCPU is set to more than 1 in the hercules.cnf +file, any of LOK001, LOK003 or other abends will occur. This occurs because +the Hercules ECPS:VM CP Assist implementation is not MP safe, and +particularly, attemps VM dispatching without holding necessary AP or MP +locks.

        +
        Memory allocation on Windows +
        +

        Due to the change in Hercules' "mainstor" memory allocation technique to +address a "double memory consumption" bug in Cygwin's malloc implementation, +some Windows Hercules users may experience an "out of memory" error whenever +Hercules is started with a large MAINSIZE configuration file +value:

        +

        HHCCF031S Cannot obtain nnnMB main storage

        +

        This error will most likely occur (if it does at all) for those users who +have manually adjusted their Cygwin heap_chunk_in_mb Windows +registry setting value (in order to allow them to specify a large +MAINSIZE value when running Hercules). If this problem does occur +(i.e. if you do happen to experience the above mentioned error with +this new release of Hercules), then either reduce your +heap_chunk_in_mb value (yes, that's correct: reduce it, +as in change it to a smaller value) or else remove it altogether (so +as to let it default).

        +

        A complete discussion of this issue is in the RELEASE.NOTES file +in the source distribution.

        +
        Thread priority and other problems +
        +

        There is a known problem with thread priority handling under Mac OS +X. The OS X threading model is different from the one classically used in +Linux. This causes failures to set the timer thread priority, and slow +performance as all of Hercules is set to a low execution priority. This +will be fixed in a future release. A workaround, for now, for slow +performance is to add the statement

        +

        CPUPRIO 0

        +

        to your Hercules configuration file.

        +

        A possibly related problem is that Hercules fails in random ways when +using the NPTL (new POSIX threads library) library under Linux. +This library is used by default in Red Hat 9, and possibly other systems. +If problems are encountered on a very recent version of Linux, try issuing +the command

        +

        export LD_ASSUME_KERNEL=2.4.1

        +

        before starting Hercules.

        +
        +


        +

        +If you have a question about Hercules, see the +Hercules Frequently-Asked Questions page. + +


        +back +
        + + +

        Last updated 3 October 2003 + + diff --git a/html/herctcp.html b/html/herctcp.html index a6d670a..b074b85 100644 --- a/html/herctcp.html +++ b/html/herctcp.html @@ -1,13 +1,13 @@ -Hercules Version 2: +<HEAD><TITLE>Hercules Version 3: TCP/IP networking with Hercules -

        TCP/IP networking with Hercules

        +

        Hercules version 3: TCP/IP networking with Hercules

        This page describes how to set up TCP/IP connectivity between a Hercules machine and the outside world. @@ -190,20 +190,17 @@

        Defining a route to Hercules TCP/IP

        Defining the link in Hercules

        -You must define a pair of CTC devices in the Hercules configuration -file. The devices must be defined using an adjacent pair of even/odd -device numbers such as 0E20 and 0E21, as in this example: +You must define a single CTC device in the Hercules configuration +file. The second device will automatically be created at the original address + 1. The device number must be even.

        For Linux 2.2:
        0E20 3088 CTCI /dev/tun0 1500 192.168.200.1 192.168.200.2 255.255.255.0 -
        0E21 3088 CTCI /dev/tun0 1500 192.168.200.1 192.168.200.2 255.255.255.0

        For Linux 2.4:
        0E20 3088 CTCI /dev/net/tun 1500 192.168.200.1 192.168.200.2 255.255.255.0 -
        0E21 3088 CTCI /dev/net/tun 1500 192.168.200.1 192.168.200.2 255.255.255.0

        Two IP addresses must be assigned, one for the driving system's @@ -347,6 +344,6 @@

        What to do if TUN/TAP doesn't work

        -

        Last updated 15 January 2002 by Roger Bowler +

        Last updated 3 October 2003 diff --git a/html/hercules.html b/html/hercules.html index 12bbb4b..3aa3764 100644 --- a/html/hercules.html +++ b/html/hercules.html @@ -3,9 +3,9 @@ Hercules - + - + diff --git a/html/index.html b/html/index.html index 75b5e14..30b8d64 100644 --- a/html/index.html +++ b/html/index.html @@ -11,8 +11,8 @@ <h1>The Hercules System/370, ESA/390, and z/Architecture Emulator</h1> <p> Hercules is an open source software implementation of the mainframe System/370 and ESA/390 architectures, in addition to the new 64-bit -z/Architecture. -Hercules runs under Linux, Windows 98, Windows NT, and Windows 2000. +z/Architecture. Hercules runs under Linux, Windows 98, Windows NT, Windows +2000, Windows XP, and Mac OS X 10.2 and later. <p> Hercules was created by Roger Bowler and is maintained by Jay Maynard. Jan Jaeger designed and implemented many of the advanced features of @@ -25,30 +25,31 @@ <h1>The Hercules System/370, ESA/390, and z/Architecture Emulator</h1> <li><a href="hercinst.html">Hercules Installation and Operation</a> <li><a href="hercmsg.html">Hercules System Messages</a> <li><a href="hercnew.html">What's new in this release</a> +<li><a href="hercrnot.html">Release notes</a> <li><a href="herclic.html">The Q Public Licence</a> <li>Hercules is <a href="http://www.opensource.org/">OSI Certified Open Source Software.<br><img src="images/osi-certified-60x50.jpg"></a> </ul> <p> -Download the current release version, 2.17.1: +Download the current release version, 3.00: <ul> -<li><a href="hercules-2.17.1tar.gz">hercules-2.17.1.tar.gz</a>: Source tarball -<li><a href="hercules-2.17.1-1.i386.rpm">hercules-2.17.1-1.i386.rpm</a>: Intel RPM -<li><a href="hercules-2.17.1-1.src.rpm">hercules-2.17.1-1.src.rpm</a>: Source +<li><a href="hercules-3.00.tar.gz">hercules-3.00.tar.gz</a>: Source tarball +<li><a href="hercules-3.00-1.i386.rpm">hercules-3.00-1.i386.rpm</a>: Intel RPM +<li><a href="hercules-3.00-1.src.rpm">hercules-3.00-1.src.rpm</a>: Source RPM (if you want to build RPMs yourself) -<li><a href="hercules2171-i586f.exe">hercules2171-i586f.exe</a>: +<li><a href="hercules300-i586f.exe">hercules300-i586f.exe</a>: Self-extracting archive for Windows, Pentium, Fish (optimized) threads version -<li><a href="hercules2171-i686f.exe">hercules2171-i686f.exe</a>: +<li><a href="hercules300-i686f.exe">hercules300-i686f.exe</a>: Self-extracting archive for Windows, Pentium Pro/Pentium II and above, Fish (optimized) threads version -<li><a href="hercules2171-i586p.exe">hercules2171-i586p.exe</a>: +<li><a href="hercules300-i586p.exe">hercules300-i586p.exe</a>: Self-extracting archive for Windows, Pentium, standard pthreads version -<li><a href="hercules2171-i686p.exe">hercules2171-i686p.exe</a>: +<li><a href="hercules300-i686p.exe">hercules300-i686p.exe</a>: Self-extracting archive for Windows, Pentium Pro/Pentium II and above, standard pthreads version -<li><a href="hercules-2.17.1.dmg">hercules-2.17.1.dmg</a>: Mac OS X +<li><a href="hercules-3.00.dmg">hercules-3.00.dmg</a>: Mac OS X version, compressed disk image </ul> @@ -61,10 +62,7 @@ <h3> Hercules is also available via anonymous access from our CVS source code repository. The CVS root is <b>CVSROOT=:pserver:anonymous@cvs.conmicro.cx:/usr/cvs/hercules</b>. Doing a -checkout on module "hercules" will get you the source for all of Hercules, -and checking out "wingui" will get you the complete source for the -<a href="http://home.sprintmail.com/~dtrout/Hercules/index.html">Windows GUI</a> -front end (HercGUI). +checkout on module "hercules" will get you the source for all of Hercules. <p> No password is required; just press enter when asked: @@ -95,6 +93,15 @@ <h3> </h3> <p> <em>&#147; +Never in my wildest dreams did I expect to see MVS +running on a machine that I personally own. +Hercules is a marvelous tool. My thanks to you all for a job +very well done. +&#148;</em> +<br>&#151; +Reed H. Petty +<p> +<em>&#147; I do miss my mainframe a lot, and playing with Herc sure brings back memories. Just seeing the IBM message prefixes, and responding to console messages again was a wonderful bit of nostalgia! @@ -210,6 +217,8 @@ <h3> <br>Cory Hamasaki's New Users Documentation Effort <li><a href="http://www.kiyoinc.com/herc3088.html">http://www.kiyoinc.com/herc3088.html</a> <br>Axel Schwarzer's 3088 howto documentation +<li><a href=:http://www.ibiblio.org/jmaynard/">http://www.ibiblio.org/jmaynard/</a> + <br>Jay Maynard's S/360 and S/370 public domain software archive </ul> <p> @@ -228,6 +237,6 @@ <h3> registered trademarks of IBM Corporation. Other product names mentioned here are trademarks of other companies. <small> -<p>Last updated 12 February 2003 +<p>Last updated 3 October 2003 </BODY> </HTML> diff --git a/httpmisc.h b/httpmisc.h index c0ce90e..1e19559 100644 --- a/httpmisc.h +++ b/httpmisc.h @@ -1,6 +1,9 @@ /* HTTPMISC.C (c)Copyright Jan Jaeger, 2002-2003 */ /* HTTP Server */ +#if !defined(_HTTPMISC_H) +#define _HTTPMISC_H + #if !defined(PKGDATADIR) #define HTTP_ROOT "/usr/local/share/hercules/" @@ -16,6 +19,7 @@ #define HTML_STATIC_EXPIRY_TIME (60*60*24*7) +#define HTTP_PATH_LENGTH 1024 typedef struct _CGIVAR { struct _CGIVAR *next; @@ -53,6 +57,8 @@ typedef struct _CONTYP { typedef struct _WEBBLK { +#define HDL_VERS_WEBBLK "2.17" +#define HDL_SIZE_WEBBLK sizeof(WEBBLK) FILE *hsock; int request_type; #define REQTYPE_NONE 0 @@ -82,3 +88,5 @@ int html_include(WEBBLK *webblk, char *filename); char *http_variable(WEBBLK *webblk, char *name, int type); void *http_server (void *arg); + +#endif /*!defined(_HTTPMISC_H)*/ diff --git a/httpserv.c b/httpserv.c index c0ca0e8..261d769 100644 --- a/httpserv.c +++ b/httpserv.c @@ -52,12 +52,14 @@ static CONTYP mime_types[] = { int html_include(WEBBLK *webblk, char *filename) { FILE *inclfile; - char fullname[1024]; - char buffer[1024]; + char fullname[HTTP_PATH_LENGTH]; + char buffer[HTTP_PATH_LENGTH]; int ret; - strncpy(fullname,sysblk.httproot,1024); - inclfile = fopen(strncat(fullname,filename,1024),"r"); + strlcpy( fullname, sysblk.httproot, sizeof(fullname) ); + strlcat( fullname, filename, sizeof(fullname) ); + + inclfile = fopen(fullname,"r"); if (!inclfile) { @@ -277,22 +279,27 @@ char *http_variable(WEBBLK *webblk, char *name, int type) static void http_verify_path(WEBBLK *webblk, char *path) { - char resolved_base[1024]; - char resolved_path[1024]; + char resolved_path[HTTP_PATH_LENGTH]; int i; - realpath(sysblk.httproot,resolved_base); strncat(resolved_base,"/",1024); - realpath(path,resolved_path); - for (i = 0; path[i]; i++) if (!isalnum((int)path[i]) && !strchr("/.-_", path[i])) http_error(webblk, "404 File Not Found","", "Illegal character in filename"); - if(strncmp(resolved_base,resolved_path,strlen(resolved_base))) + if (!realpath( path, resolved_path )) + { http_error(webblk, "404 File Not Found","", "Invalid pathname"); + } + + // The following verifies the specified file does not lie + // outside the specified httproot (Note: sysblk.httproot + // was previously resolved to an absolute path by config.c) + if (strncmp( sysblk.httproot, resolved_path, strlen(sysblk.httproot))) + http_error(webblk, "404 File Not Found","", + "Invalid pathname"); } @@ -355,16 +362,16 @@ static int http_authenticate(WEBBLK *webblk, char *type, char *userpass) static void http_download(WEBBLK *webblk, char *filename) { - char buffer[1024]; + char buffer[HTTP_PATH_LENGTH]; char tbuf[80]; int fd, length; char *filetype; - char fullname[1024]; + char fullname[HTTP_PATH_LENGTH]; struct stat st; CONTYP *mime_type = mime_types; - strncpy(fullname,sysblk.httproot,1024); - strncat(fullname,filename,1024); + strlcpy( fullname, sysblk.httproot, sizeof(fullname) ); + strlcat( fullname, filename, sizeof(fullname) ); http_verify_path(webblk,fullname); @@ -404,7 +411,7 @@ static void *http_request(FILE *hsock) { WEBBLK *webblk; int authok = !sysblk.httpauth; - char line[1024]; + char line[HTTP_PATH_LENGTH]; char *url = NULL; char *pointer; char *strtok_str; @@ -537,6 +544,22 @@ static void *http_request(FILE *hsock) } } +#if defined(OPTION_DYNAMIC_LOAD) + { + zz_cgibin dyncgi; + + if( (dyncgi = HDL_FINDSYM(webblk->baseurl)) ) + { + char tbuf[80]; + fprintf(webblk->hsock,"HTTP/1.0 200 OK\nConnection: close\n"); + fprintf(webblk->hsock,"Date: %s\n", + http_timestring(tbuf,sizeof(tbuf),time(NULL))); + dyncgi(webblk); + http_exit(webblk); + } + } +#endif /*defined(OPTION_DYNAMIC_LOAD)*/ + http_error(webblk, "404 File Not Found","", "The requested file was not found"); @@ -562,6 +585,54 @@ TID httptid; /* Negotiation thread id */ "tid="TIDPAT", pid=%d\n"), thread_id(), getpid()); + + /* If the HTTP root directory is not specified, + use a reasonable default */ + if (!sysblk.httproot) + { +#if defined(WIN32) + char process_dir[HTTP_PATH_LENGTH]; + if (get_process_directory(process_dir,HTTP_PATH_LENGTH) > 0) + sysblk.httproot = strdup(process_dir); + else +#endif /*defined(WIN32)*/ + sysblk.httproot = strdup(HTTP_ROOT); + } +#if defined(WIN32) + if (is_win32_directory(sysblk.httproot)) + { + char posix_dir[HTTP_PATH_LENGTH]; + convert_win32_directory_to_posix_directory(sysblk.httproot,posix_dir); + free(sysblk.httproot); sysblk.httproot = strdup(posix_dir); + } +#endif /*defined(WIN32)*/ + /* Convert the specified HTTPROOT value to an absolute path + ending with a '/' and save in sysblk.httproot. */ + { + char absolute_httproot_path[HTTP_PATH_LENGTH]; + char save_working_directory[HTTP_PATH_LENGTH]; + int rc; + if (!realpath(sysblk.httproot,absolute_httproot_path)) + { + logmsg( _("HHCCF066E Invalid HTTPROOT: %s\n"), + strerror(errno)); + return NULL; + } + VERIFY(getcwd(save_working_directory,sizeof(save_working_directory))); + rc = chdir(absolute_httproot_path); // (verify path) + VERIFY(!chdir(save_working_directory)); // (restore cwd) + if (rc != 0) + { + logmsg( _("HHCCF066E Invalid HTTPROOT: %s\n"), + strerror(errno)); + return NULL; + } + strlcat(absolute_httproot_path,"/",sizeof(absolute_httproot_path)); + free(sysblk.httproot); sysblk.httproot = strdup(absolute_httproot_path); + TRACE("HTTPROOT = %s\n",sysblk.httproot);// (debug display) + } + + /* Obtain a socket */ lsock = socket (AF_INET, SOCK_STREAM, 0); @@ -613,7 +684,7 @@ TID httptid; /* Negotiation thread id */ logmsg(_("HHCHT006I Waiting for HTTP requests on port %u\n"), sysblk.httpport); - /* Handle connection requests and attention interrupts */ + /* Handle http requests */ while (TRUE) { /* Initialize the select parameters */ @@ -639,10 +710,10 @@ TID httptid; /* Negotiation thread id */ break; } - /* If a client connection request has arrived then accept it */ + /* If a http request has arrived then accept it */ if (FD_ISSET(lsock, &selset)) { - /* Accept a connection and create conversation socket */ + /* Accept the connection and create conversation socket */ csock = accept (lsock, NULL, NULL); if (csock < 0) @@ -658,7 +729,7 @@ TID httptid; /* Negotiation thread id */ continue; } - /* Create a thread to complete the client connection */ + /* Create a thread to execute the http request */ if ( create_thread (&httptid, &sysblk.detattr, http_request, hsock) ) { diff --git a/ieee.c b/ieee.c index b6f912d..008525a 100644 --- a/ieee.c +++ b/ieee.c @@ -4,6 +4,7 @@ * Binary (IEEE) Floating Point Instructions * Copyright (c) 2001 Willem Konynenberg <wfk@xos.nl> * TCEB, TCDB and TCXB contributed by Per Jessen, 20 September 2001. + * THDER,THDR by Roger Bowler, 19 July 2003. * Licensed under the Q Public License * For details, see html/herclic.html */ @@ -50,6 +51,13 @@ #define _GNU_SOURCE 1 +/* COMMENT OUT THE FOLLOWING DEFINE */ +/* (_ISW_PREVENT_COMPWARN) */ +/* IF IEEE FP INSTRUCTIONS ARE GIVING */ +/* INCOHERENT RESULTS IN RESPECT TO */ +/* INFINITY. */ +#define _ISW_PREVENT_COMPWARN + #include "hercules.h" #include "opcode.h" @@ -114,7 +122,7 @@ struct sbfp { #ifndef HAVE_FMODL #define fmodl(x,y) fmod(x,y) #endif -#ifndef HAVE_FREXPL +#ifndef HAVE_FREXPL #define frexpl(x,y) frexp(x,y) #endif @@ -268,13 +276,13 @@ int sbfpclassify(struct sbfp *op) int ebfpissnan(struct ebfp *op) { return ebfpclassify(op) == FP_NAN - && (op->fracth & 0x0000800000000000L) == 0; + && (op->fracth & 0x0000800000000000ULL) == 0; } int lbfpissnan(struct lbfp *op) { return lbfpclassify(op) == FP_NAN - && (op->fract & 0x0008000000000000L) == 0; + && (op->fract & 0x0008000000000000ULL) == 0; } int sbfpissnan(struct sbfp *op) @@ -293,14 +301,14 @@ void ebfpdnan(struct ebfp *op) { op->sign = 0; op->exp = 0x7FFF; - op->fracth = 0x0000800000000000L; + op->fracth = 0x0000800000000000ULL; op->fractl = 0; } void lbfpdnan(struct lbfp *op) { op->sign = 0; op->exp = 0x7FF; - op->fract = 0x0008000000000000L; + op->fract = 0x0008000000000000ULL; } void sbfpdnan(struct sbfp *op) { @@ -310,11 +318,11 @@ void sbfpdnan(struct sbfp *op) } void ebfpstoqnan(struct ebfp *op) { - op->fracth |= 0x0000800000000000L; + op->fracth |= 0x0000800000000000ULL; } void lbfpstoqnan(struct lbfp *op) { - op->fract |= 0x0008000000000000L; + op->fract |= 0x0008000000000000ULL; } void sbfpstoqnan(struct sbfp *op) { @@ -386,6 +394,9 @@ void sbfpinfinity(struct sbfp *op, int sign) void ebfpston(struct ebfp *op) { long double h, l; +#if defined(_ISW_PREVENT_COMPWARN) + int dummyzero; +#endif switch (ebfpclassify(op)) { case FP_NAN: @@ -397,7 +408,12 @@ void ebfpston(struct ebfp *op) if (op->sign) { op->v = log(0); } else { +#if defined(_ISW_PREVENT_COMPWARN) + dummyzero=0; + op->v = 1/dummyzero; +#else op->v = 1/0; +#endif } break; case FP_ZERO: @@ -422,7 +438,7 @@ void ebfpston(struct ebfp *op) op->v = ldexpl(h + l, op->exp - 16383); break; case FP_NORMAL: - h = ldexpl((long double)(op->fracth | 0x1000000000000L), -48); + h = ldexpl((long double)(op->fracth | 0x1000000000000ULL), -48); l = ldexpl((long double)op->fractl, -112); if (op->sign) { h = -h; @@ -437,6 +453,9 @@ void ebfpston(struct ebfp *op) void lbfpston(struct lbfp *op) { double t; +#if defined(_ISW_PREVENT_COMPWARN) + int dummyzero; +#endif switch (lbfpclassify(op)) { case FP_NAN: @@ -448,7 +467,12 @@ void lbfpston(struct lbfp *op) if (op->sign) { op->v = log(0); } else { +#if defined(_ISW_PREVENT_COMPWARN) + dummyzero=0; + op->v = 1/dummyzero; +#else op->v = 1/0; +#endif } break; case FP_ZERO: @@ -470,7 +494,7 @@ void lbfpston(struct lbfp *op) op->v = ldexp(t, op->exp - 1023); break; case FP_NORMAL: - t = ldexp((double)(op->fract | 0x10000000000000L), -52); + t = ldexp((double)(op->fract | 0x10000000000000ULL), -52); if (op->sign) t = -t; op->v = ldexp(t, op->exp - 1023); @@ -482,6 +506,9 @@ void lbfpston(struct lbfp *op) void sbfpston(struct sbfp *op) { float t; +#if defined(_ISW_PREVENT_COMPWARN) + int dummyzero; +#endif switch (sbfpclassify(op)) { case FP_NAN: @@ -493,7 +520,12 @@ void sbfpston(struct sbfp *op) if (op->sign) { op->v = log(0); } else { +#if defined(_ISW_PREVENT_COMPWARN) + dummyzero=0; + op->v = 1/dummyzero; +#else op->v = 1/0; +#endif } break; case FP_ZERO: @@ -550,7 +582,7 @@ void ebfpntos(struct ebfp *op) f = frexpl(op->v, &(op->exp)); op->sign = signbit(op->v); op->exp += 16383 - 1; - op->fracth = (U64)ldexp(fabsl(f), 49) & 0xFFFFFFFFFFFFL; + op->fracth = (U64)ldexp(fabsl(f), 49) & 0xFFFFFFFFFFFFULL; op->fractl = (U64)fmodl(ldexp(fabsl(f), 113), pow(2, 64)); break; } @@ -580,7 +612,7 @@ void lbfpntos(struct lbfp *op) f = frexp(op->v, &(op->exp)); op->sign = signbit(op->v); op->exp += 1023 - 1; - op->fract = (U64)ldexp(fabs(f), 53) & 0xFFFFFFFFFFFFFL; + op->fract = (U64)ldexp(fabs(f), 53) & 0xFFFFFFFFFFFFFULL; break; } //logmsg("exp=%d fract=%llx v=%g\n", op->exp, op->fract, op->v); @@ -623,7 +655,7 @@ static void get_ebfp(struct ebfp *op, U32 *fpr) op->sign = (fpr[0] & 0x80000000) != 0; op->exp = (fpr[0] & 0x7FFF0000) >> 16; op->fracth = (((U64)fpr[0] & 0x0000FFFF) << 32) | fpr[1]; - op->fractl = ((U64)fpr[4] << 32) | fpr[5]; + op->fractl = ((U64)fpr[FPREX] << 32) | fpr[FPREX+1]; } static void get_lbfp(struct lbfp *op, U32 *fpr) @@ -641,9 +673,9 @@ static void vfetch_lbfp(struct lbfp *op, VADR addr, int arn, REGS *regs) v = vfetch8(addr, arn, regs); - op->sign = (v & 0x8000000000000000L) != 0; - op->exp = (v & 0x7FF0000000000000L) >> 52; - op->fract = v & 0x000FFFFFFFFFFFFFL; + op->sign = (v & 0x8000000000000000ULL) != 0; + op->exp = (v & 0x7FF0000000000000ULL) >> 52; + op->fract = v & 0x000FFFFFFFFFFFFFULL; //logmsg("lfetch m=%16.16llx exp=%d fract=%llx\n", v, op->exp, op->fract); } @@ -677,8 +709,8 @@ static void put_ebfp(struct ebfp *op, U32 *fpr) { fpr[0] = (op->sign ? 1<<31 : 0) | (op->exp<<16) | (op->fracth>>32); fpr[1] = op->fracth & 0xFFFFFFFF; - fpr[4] = op->fractl>>32; - fpr[5] = op->fractl & 0xFFFFFFFF; + fpr[FPREX] = op->fractl>>32; + fpr[FPREX+1] = op->fractl & 0xFFFFFFFF; } static void put_lbfp(struct lbfp *op, U32 *fpr) @@ -700,22 +732,168 @@ static void put_sbfp(struct sbfp *op, U32 *fpr) * Chapter 9. Floating-Point Overview and Support Instructions */ +#if defined(FEATURE_FPS_EXTENSIONS) +#if !defined(_CBH_FUNC) +/* + * Convert binary floating point to hexadecimal long floating point + * save result into long register and return condition code + * Roger Bowler, 19 July 2003 + */ +static int cnvt_bfp_to_hfp (struct lbfp *op, int class, U32 *fpr) +{ + short exp; + U64 fract; + U32 r0, r1; + int cc; + + switch (class) { + default: + case FP_NAN: + r0 = 0x7FFFFFFF; + r1 = 0xFFFFFFFF; + cc = 3; + break; + case FP_INFINITE: + r0 = op->sign ? 0xFFFFFFFF : 0x7FFFFFFF; + r1 = 0xFFFFFFFF; + cc = 3; + break; + case FP_ZERO: + r0 = op->sign ? 0x80000000 : 0; + r1 = 0; + cc = 0; + break; + case FP_SUBNORMAL: + r0 = op->sign ? 0x80000000 : 0; + r1 = 0; + cc = op->sign ? 1 : 2; + break; + case FP_NORMAL: + /* Insert an implied 1. in front of the 52 bit binary + fraction and lengthen the result to 56 bits */ + fract = (U64)(op->fract | 0x8000000000000) << 4; + + /* The binary exponent is equal to the biased exponent - 1023 + and we subtract another 1 to account for the implied 1. */ + exp = op->exp - 1024; + + /* Shift the fraction right one bit at a time until + the binary exponent becomes a multiple of 4 */ + while (exp & 3) + { + exp++; + fract >>= 1; + } + + /* Convert the binary exponent into a hexadecimal exponent + by dropping the last two bits (which are now zero) */ + exp >>= 2; + + /* If the hexadecimal exponent is less than -64 then return + a signed zero result with a non-zero condition code */ + if (exp < -64) { + r0 = op->sign ? 0x80000000 : 0; + r1 = 0; + cc = op->sign ? 1 : 2; + break; + } + + /* If the hexadecimal exponent exceeds +63 then return + a signed maximum result with condition code 3 */ + if (exp > 63) { + r0 = op->sign ? 0xFFFFFFFF : 0x7FFFFFFF; + r1 = 0xFFFFFFFF; + cc = 3; + break; + } + + /* Convert the hexadecimal exponent to a characteristic + by adding 64 */ + exp += 64; + + /* Pack the exponent and the fraction into the result */ + r0 = (op->sign ? 1<<31 : 0) | (exp << 24) | (fract >> 32); + r1 = fract & 0xFFFFFFFF; + cc = op->sign ? 1 : 2; + break; + } + /* Store high and low halves of result into fp register array + and return condition code */ + fpr[0] = r0; + fpr[1] = r1; + return cc; +} +#define _CBH_FUNC +#endif /*!defined(_CBH_FUNC)*/ + /* * B359 THDR - CONVERT BFP TO HFP (long) [RRE] + * Roger Bowler, 19 July 2003 + */ +DEF_INST(convert_bfp_long_to_float_long_reg) +{ + int r1, r2; + struct lbfp op2; + + RRE(inst, execflag, regs, r1, r2); + //logmsg("THDR r1=%d r2=%d\n", r1, r2); + HFPREG2_CHECK(r1, r2, regs); + + /* Load lbfp operand from R2 register */ + get_lbfp(&op2, regs->fpr + FPR2I(r2)); + + /* Convert to hfp register and set condition code */ + regs->psw.cc = + cnvt_bfp_to_hfp (&op2, + lbfpclassify(&op2), + regs->fpr + FPR2I(r1)); + +} + +/* * B358 THDER - CONVERT BFP TO HFP (short to long) [RRE] + * Roger Bowler, 19 July 2003 + */ +DEF_INST(convert_bfp_short_to_float_long_reg) +{ + int r1, r2; + struct sbfp op2; + struct lbfp lbfp_op2; + + RRE(inst, execflag, regs, r1, r2); + //logmsg("THDER r1=%d r2=%d\n", r1, r2); + HFPREG2_CHECK(r1, r2, regs); + + /* Load sbfp operand from R2 register */ + get_sbfp(&op2, regs->fpr + FPR2I(r2)); + + /* Lengthen sbfp operand to lbfp */ + lbfp_op2.sign = op2.sign; + lbfp_op2.exp = op2.exp - 127 + 1023; + lbfp_op2.fract = op2.fract << (52 - 23); + + /* Convert lbfp to hfp register and set condition code */ + regs->psw.cc = + cnvt_bfp_to_hfp (&lbfp_op2, + sbfpclassify(&op2), + regs->fpr + FPR2I(r1)); + +} + + +/* The following instructions are not yet implemented */ +#define UNDEF_INST(_x) \ + DEF_INST(_x) { ARCH_DEP(operation_exception) \ + (inst,execflag,regs); } +/* * B351 TBDR - CONVERT HFP TO BFP (long) [RRF] + */ + UNDEF_INST(convert_float_long_to_bfp_long_reg) +/* * B350 TBEDR - CONVERT HFP TO BFP (long to short) [RRF] - * B365 LXR - LOAD (extended) [RRE] - * 28 LDR - LOAD (long) [RR] - * 68 LD - LOAD (long) [RX] - * 38 LER - LOAD (short) [RR] - * 78 LE - LOAD (short) [RX] - * B376 LZXR - LOAD ZERO (extended) [RRE] - * B375 LZDR - LOAD ZERO (long) [RRE] - * B374 LZER - LOAD ZERO (short) [RRE] - * 60 STD - STORE (long) [RX] - * 70 STE - STORE (short) [RX] */ + UNDEF_INST(convert_float_long_to_bfp_short_reg) +#endif /*defined(FEATURE_FPS_EXTENSIONS)*/ /* * Chapter 19. Binary-Floating-Point Instructions @@ -1744,7 +1922,7 @@ DEF_INST(convert_bfp_long_to_fix64_reg) case FP_NAN: pgm_check = ieee_exception(FE_INVALID, regs); regs->psw.cc = 3; - regs->GR_G(r1) = 0x8000000000000000L; + regs->GR_G(r1) = 0x8000000000000000ULL; if (regs->fpc & FPC_MASK_IMX) { pgm_check = ieee_exception(FE_INEXACT, regs); if (pgm_check) { @@ -1759,9 +1937,9 @@ DEF_INST(convert_bfp_long_to_fix64_reg) pgm_check = ieee_exception(FE_INVALID, regs); regs->psw.cc = 3; if (op2.sign) { - regs->GR_G(r1) = 0x8000000000000000L; + regs->GR_G(r1) = 0x8000000000000000ULL; } else { - regs->GR_G(r1) = 0x7FFFFFFFFFFFFFFFL; + regs->GR_G(r1) = 0x7FFFFFFFFFFFFFFFULL; } if (regs->fpc & FPC_MASK_IMX) { pgm_check = ieee_exception(FE_INEXACT, regs); @@ -1807,7 +1985,7 @@ DEF_INST(convert_bfp_short_to_fix64_reg) case FP_NAN: pgm_check = ieee_exception(FE_INVALID, regs); regs->psw.cc = 3; - regs->GR_G(r1) = 0x8000000000000000L; + regs->GR_G(r1) = 0x8000000000000000ULL; if (regs->fpc & FPC_MASK_IMX) { pgm_check = ieee_exception(FE_INEXACT, regs); if (pgm_check) { @@ -1821,9 +1999,9 @@ DEF_INST(convert_bfp_short_to_fix64_reg) pgm_check = ieee_exception(FE_INVALID, regs); regs->psw.cc = 3; if (op2.sign) { - regs->GR_G(r1) = 0x8000000000000000L; + regs->GR_G(r1) = 0x8000000000000000ULL; } else { - regs->GR_G(r1) = 0x7FFFFFFFFFFFFFFFL; + regs->GR_G(r1) = 0x7FFFFFFFFFFFFFFFULL; } if (regs->fpc & FPC_MASK_IMX) { pgm_check = ieee_exception(FE_INEXACT, regs); @@ -2347,7 +2525,7 @@ DEF_INST(load_and_test_bfp_short_reg) * B303 LCEBR - LOAD COMPLEMENT (extended BFP) [RRE] */ -/* +/* * B357 FIEBR - LOAD FP INTEGER (extended BFP) [RRF] */ DEF_INST(load_fp_int_short_reg) @@ -2379,16 +2557,16 @@ DEF_INST(load_fp_int_short_reg) feclearexcept(FE_ALL_EXCEPT); sbfpston(&op); - op.v = rint(op.v); + op.v = rint(op.v); - if (regs->fpc & FPC_MASK_IMX) { + if (regs->fpc & FPC_MASK_IMX) { ieee_exception(FE_INEXACT, regs); } else { ieee_exception(FE_INVALID, regs); } - sbfpston(&op); - + sbfpston(&op); + raised = fetestexcept(FE_ALL_EXCEPT); if (raised) { @@ -2435,16 +2613,16 @@ DEF_INST(load_fp_int_long_reg) feclearexcept(FE_ALL_EXCEPT); lbfpston(&op); - op.v = rint(op.v); + op.v = rint(op.v); - if (regs->fpc & FPC_MASK_IMX) { + if (regs->fpc & FPC_MASK_IMX) { ieee_exception(FE_INEXACT, regs); } else { ieee_exception(FE_INVALID, regs); } - lbfpston(&op); - + lbfpston(&op); + raised = fetestexcept(FE_ALL_EXCEPT); if (raised) { @@ -2492,16 +2670,16 @@ DEF_INST(load_fp_int_ext_reg) feclearexcept(FE_ALL_EXCEPT); ebfpston(&op); - op.v = rint(op.v); + op.v = rint(op.v); - if (regs->fpc & FPC_MASK_IMX) { + if (regs->fpc & FPC_MASK_IMX) { ieee_exception(FE_INEXACT, regs); } else { ieee_exception(FE_INVALID, regs); } - ebfpston(&op); - + ebfpston(&op); + raised = fetestexcept(FE_ALL_EXCEPT); if (raised) { @@ -3676,7 +3854,7 @@ DEF_INST(testdataclass_bfp_short) get_sbfp(&op1, regs->fpr + FPR2I(r1)); switch ( sbfpclassify(&op1) ) - { + { case FP_ZERO: bit=20+op1.sign; break; case FP_NORMAL: @@ -3686,8 +3864,8 @@ DEF_INST(testdataclass_bfp_short) case FP_INFINITE: bit=26+op1.sign; break; case FP_NAN: - if ( !sbfpissnan(&op1) ) bit=28+op1.sign; - else bit=30+op1.sign; + if ( !sbfpissnan(&op1) ) bit=28+op1.sign; + else bit=30+op1.sign; break; default: bit=0; break; @@ -3719,7 +3897,7 @@ DEF_INST(testdataclass_bfp_long) get_lbfp(&op1, regs->fpr + FPR2I(r1)); switch ( lbfpclassify(&op1) ) - { + { case FP_ZERO: bit=20+op1.sign; break; case FP_NORMAL: @@ -3729,8 +3907,8 @@ DEF_INST(testdataclass_bfp_long) case FP_INFINITE: bit=26+op1.sign; break; case FP_NAN: - if ( !lbfpissnan(&op1) ) bit=28+op1.sign; - else bit=30+op1.sign; + if ( !lbfpissnan(&op1) ) bit=28+op1.sign; + else bit=30+op1.sign; break; default: bit=0; break; @@ -3762,7 +3940,7 @@ DEF_INST(testdataclass_bfp_ext) get_ebfp(&op1, regs->fpr + FPR2I(r1)); switch ( ebfpclassify(&op1) ) - { + { case FP_ZERO: bit=20+op1.sign; break; case FP_NORMAL: @@ -3772,8 +3950,8 @@ DEF_INST(testdataclass_bfp_ext) case FP_INFINITE: bit=26+op1.sign; break; case FP_NAN: - if ( !ebfpissnan(&op1) ) bit=28+op1.sign; - else bit=30+op1.sign; + if ( !ebfpissnan(&op1) ) bit=28+op1.sign; + else bit=30+op1.sign; break; default: bit=0; break; diff --git a/if_tun.h b/if_tun.h deleted file mode 100644 index 76dc680..0000000 --- a/if_tun.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Universal TUN/TAP device driver. - * Copyright (C) 1999-2000 Maxim Krasnyansky <max_mk@yahoo.com> - * - * 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. - * - * $Id: if_tun.h,v 1.2 2002/07/14 10:25:48 fish Exp $ - */ - -#ifndef __IF_TUN_H -#define __IF_TUN_H - -/* Uncomment to enable debugging */ -/* #define TUN_DEBUG 1 */ - -#ifdef __KERNEL__ - -#ifdef TUN_DEBUG -#define DBG if(tun->debug)printk -#define DBG1 if(debug==2)printk -#else -#define DBG( a... ) -#define DBG1( a... ) -#endif - -struct tun_struct { - char *name; - unsigned long flags; - int attached; - uid_t owner; - - wait_queue_head_t read_wait; - struct sk_buff_head readq; - - struct net_device dev; - struct net_device_stats stats; - - struct fasync_struct *fasync; - -#ifdef TUN_DEBUG - int debug; -#endif -}; - -#ifndef MIN -#define MIN(a,b) ( (a)<(b) ? (a):(b) ) -#endif - -#endif /* __KERNEL__ */ - -/* Read queue size */ -#define TUN_READQ_SIZE 10 - -/* TUN device flags */ -#define TUN_TUN_DEV 0x0001 -#define TUN_TAP_DEV 0x0002 -#define TUN_TYPE_MASK 0x000f - -#define TUN_FASYNC 0x0010 -#define TUN_NOCHECKSUM 0x0020 -#define TUN_NO_PI 0x0040 -#define TUN_ONE_QUEUE 0x0080 -#define TUN_PERSIST 0x0100 - -/* Ioctl defines */ -#define TUNSETNOCSUM _IOW('T', 200, int) -#define TUNSETDEBUG _IOW('T', 201, int) -#define TUNSETIFF _IOW('T', 202, int) -#define TUNSETPERSIST _IOW('T', 203, int) -#define TUNSETOWNER _IOW('T', 204, int) - -/* TUNSETIFF ifr flags */ -#define IFF_TUN 0x0001 -#define IFF_TAP 0x0002 -#define IFF_NO_PI 0x1000 -#define IFF_ONE_QUEUE 0x2000 - -struct tun_pi { - unsigned short flags; - unsigned short proto; -}; -#define TUN_PKT_STRIP 0x0001 - -#endif /* __IF_TUN_H */ diff --git a/impl.c b/impl.c index 9894884..524d63d 100644 --- a/impl.c +++ b/impl.c @@ -4,14 +4,16 @@ /*-------------------------------------------------------------------*/ /* This module initializes the Hercules S/370 or ESA/390 emulator. */ /* It builds the system configuration blocks, creates threads for */ -/* central processors, HTTP server */ -/* and activates the control panel which runs under the main thread. */ +/* central processors, HTTP server, logger task and activates the */ +/* control panel which runs under the main thread when in foreground */ +/* mode. */ /*-------------------------------------------------------------------*/ #include "hercules.h" #include "opcode.h" +#include "devtype.h" +#include "herc_getopt.h" #include "httpmisc.h" -#include "hostinfo.h" #if defined(FISH_HANG) extern int bFishHangAtExit; // (set to true when shutting down) @@ -20,6 +22,12 @@ extern void FishHangReport(); extern void FishHangAtExit(); #endif // defined(FISH_HANG) +/* (delayed_exit function defined in config.c) */ +extern void delayed_exit (int exit_code); + +/* forward define process_script_file (ISW20030220-3) */ +int process_script_file(char *,int); + /*-------------------------------------------------------------------*/ /* Signal handler for SIGINT signal */ /*-------------------------------------------------------------------*/ @@ -40,7 +48,7 @@ static void sigint_handler (int signo) { /* Release the configuration */ release_config(); - exit(1); + delayed_exit(1); } /* Set SIGINT request pending flag */ @@ -54,11 +62,13 @@ static void sigint_handler (int signo) #if !defined(NO_SIGABEND_HANDLER) -static void watchdog_thread() +static void *watchdog_thread(void *arg) { S64 savecount[MAX_CPU_ENGINES]; int i; + UNREFERENCED(arg); + #ifndef WIN32 /* Set watchdog priority just below cpu priority such that it will not invalidly detect an @@ -84,7 +94,7 @@ int i; { /* If the cpu is running but not executing instructions then it must be malfunctioning */ - if(sysblk.regs[i].instcount == savecount[i]) + if(sysblk.regs[i].instcount == (U64)savecount[i]) { if(!try_obtain_lock(&sysblk.intlock)) { @@ -105,21 +115,88 @@ int i; /* Sleep for 20 seconds */ sleep(20); } + + return NULL; } #endif /*!defined(NO_SIGABEND_HANDLER)*/ +/*-------------------------------------------------------------------*/ +/* Process .RC file thread */ +/*-------------------------------------------------------------------*/ + +void* process_rc_file (void* dummy) +{ +BYTE *rcname; /* hercules.rc name pointer */ + + UNREFERENCED(dummy); + + /* Obtain the name of the hercules.rc file or default */ + + if(!(rcname = getenv("HERCULES_RC"))) + rcname = "hercules.rc"; + + /* Run the script processor for this file */ + + process_script_file(rcname,1); + + return NULL; +} + + /*-------------------------------------------------------------------*/ /* IMPL main entry point */ /*-------------------------------------------------------------------*/ -int main (int argc, char *argv[]) +static int daemon_mode = 0; +int impl(int argc, char *argv[]) { BYTE *cfgfile; /* -> Configuration filename */ int c; /* Work area for getopt */ int arg_error = 0; /* 1=Invalid arguments */ -#ifdef PROFILE_CPU -TID paneltid; -#endif +char *msgbuf; /* */ +int msgnum; /* */ +int msgcnt; /* */ +TID rctid; /* RC file thread identifier */ + +#if defined(FISH_HANG) + /* "FishHang" debugs lock/cond/threading logic. Thus it must + * be initialized BEFORE any lock/cond/threads are created. + */ + FishHangInit(__FILE__,__LINE__); +#endif // defined(FISH_HANG) + + if(isatty(STDERR_FILENO)) + display_version (stderr, "Hercules "); + else + if(isatty(STDOUT_FILENO)) + display_version (stdout, "Hercules "); + + /* Clear the system configuration block */ + memset (&sysblk, 0, sizeof(SYSBLK)); + + /* ensure hdl_shut is called in case of shutdown + hdl_shut will ensure entries are only called once */ + atexit(hdl_shut); + + set_codepage(NULL); + + logger_init(); + + /* ZZFIXME: I don't know what's going on (yet), but for some reason + log messages seem to get permanently "stuck" in the logmsg pipe. + (see SECOND issue in zHerc message #6562) and the following brief + delay seems to fix it. Note too that this problem occurs with or + without the GUI and is thus NOT a GUI related issue. + */ + usleep(100000); /* wait a bit before issuing messages */ + + /* Display the version identifier */ + display_version (stdout, "Hercules "); + +#if defined(OPTION_DYNAMIC_LOAD) + /* Initialize the hercules dynamic loader */ + hdl_main(); +#endif /* defined(OPTION_DYNAMIC_LOAD) */ #if defined(ENABLE_NLS) setlocale(LC_ALL, ""); @@ -127,18 +204,24 @@ TID paneltid; textdomain(PACKAGE); #endif + /* default to background mode when both stdout and stderr + are redirected to a non-tty device */ + daemon_mode = !isatty(STDERR_FILENO); + #ifdef EXTERNALGUI /* Set GUI flag if specified as final argument */ if (argc >= 1 && strncmp(argv[argc-1],"EXTERNALGUI",11) == 0) { - extgui = 1; +#if defined(OPTION_DYNAMIC_LOAD) + hdl_load("dyngui",HDL_LOAD_NOUNLOAD); +#endif /* defined(OPTION_DYNAMIC_LOAD) */ argc--; } #endif /*EXTERNALGUI*/ -#if defined(FISH_HANG) - FishHangInit(__FILE__,__LINE__); -#endif // defined(FISH_HANG) +#if defined(BUILTIN_STRERROR_R) + strerror_r_init(); +#endif /* defined(BUILTIN_STRERROR_R) */ init_hostinfo(); @@ -146,25 +229,38 @@ TID paneltid; if(!(cfgfile = getenv("HERCULES_CNF"))) cfgfile = "hercules.cnf"; - /* Display the version identifier */ - display_version (stderr, "Hercules "); - /* Process the command line options */ - while ((c = getopt(argc, argv, "f:")) != EOF) + while ((c = getopt(argc, argv, "f:p:l:d")) != EOF) { + switch (c) { case 'f': cfgfile = optarg; break; +#if defined(OPTION_DYNAMIC_LOAD) + case 'p': + if(optarg) + hdl_setpath(strdup(optarg)); + break; + case 'l': + { + char *dllname, *strtok_str; + for(dllname = strtok_r(optarg,", ",&strtok_str); + dllname; + dllname = strtok_r(NULL,", ",&strtok_str)) + hdl_load(dllname, HDL_LOAD_DEFAULT); + } + break; +#endif /* defined(OPTION_DYNAMIC_LOAD) */ + case 'd': + daemon_mode = 1; + break; default: arg_error = 1; } /* end switch(c) */ } /* end while */ - /* The getopt function sets the external variable optind - to the index in argv of the first non-option argument. - There should not be any non-option arguments */ if (optind < argc) arg_error = 1; @@ -174,19 +270,16 @@ TID paneltid; fprintf (stderr, "usage: %s [-f config-filename]\n", argv[0]); - exit(1); + delayed_exit(1); } - /* Build system configuration */ - build_config (cfgfile); - /* Register the SIGINT handler */ if ( signal (SIGINT, sigint_handler) == SIG_ERR ) { fprintf (stderr, - "HHCIN001S Cannot register SIGINT handler: %s\n", + _("HHCIN001S Cannot register SIGINT handler: %s\n"), strerror(errno)); - exit(1); + delayed_exit(1); } /* Ignore the SIGPIPE signal, otherwise Hercules may terminate with @@ -194,7 +287,7 @@ TID paneltid; if ( signal (SIGPIPE, SIG_IGN) == SIG_ERR ) { fprintf (stderr, - "HHCIN002E Cannot suppress SIGPIPE signal: %s\n", + _("HHCIN002E Cannot suppress SIGPIPE signal: %s\n"), strerror(errno)); } @@ -216,77 +309,119 @@ TID paneltid; || sigaction(SIGUSR2, &sa, NULL) ) { fprintf (stderr, - "HHCIN003S Cannot register SIGILL/FPE/SEGV/BUS/USR " - "handler: %s\n", + _("HHCIN003S Cannot register SIGILL/FPE/SEGV/BUS/USR " + "handler: %s\n"), strerror(errno)); - exit(1); + delayed_exit(1); } } +#endif /*!defined(NO_SIGABEND_HANDLER)*/ + + /* Build system configuration */ + build_config (cfgfile); +#if !defined(NO_SIGABEND_HANDLER) /* Start the watchdog */ if ( create_thread (&sysblk.wdtid, &sysblk.detattr, watchdog_thread, NULL) ) { fprintf (stderr, - "HHCIN004S Cannot create watchdog thread: %s\n", + _("HHCIN004S Cannot create watchdog thread: %s\n"), strerror(errno)); - exit(1); + delayed_exit(1); } #endif /*!defined(NO_SIGABEND_HANDLER)*/ #if defined(OPTION_HTTP_SERVER) - if(sysblk.httpport) { + if (sysblk.httpport) + { /* Start the http server connection thread */ - if (!sysblk.httproot) - { -#if defined(WIN32) - char process_dir[1024]; - if (get_process_directory(process_dir,1024) > 0) - sysblk.httproot = strdup(process_dir); - else -#endif /*defined(WIN32)*/ - sysblk.httproot = HTTP_ROOT; - } -#if defined(WIN32) - if (is_win32_directory(sysblk.httproot)) - { - char posix_dir[1024]; - convert_win32_directory_to_posix_directory(sysblk.httproot,posix_dir); - sysblk.httproot = strdup(posix_dir); - } -#endif /*defined(WIN32)*/ - TRACE("HTTPROOT = %s\n",sysblk.httproot); if ( create_thread (&sysblk.httptid, &sysblk.detattr, http_server, NULL) ) { fprintf (stderr, - "HHCIN005S Cannot create http_server thread: %s\n", + _("HHCIN005S Cannot create http_server thread: %s\n"), strerror(errno)); - exit(1); + delayed_exit(1); } } #endif /*defined(OPTION_HTTP_SERVER)*/ -#ifndef PROFILE_CPU - /* Activate the control panel */ - panel_display (); -#else - if(sysblk.regs[0].cpuonline) - return -1; - sysblk.regs[0].cpuonline = 1; - sysblk.regs[0].cpustate = CPUSTATE_STARTING; - sysblk.regs[0].cputid = thread_id(); - sysblk.regs[0].arch_mode = sysblk.arch_mode; - if ( create_thread (&paneltid, &sysblk.detattr, - panel_display, NULL) ) +#ifdef OPTION_SHARED_DEVICES + /* Start the shared server */ + if (sysblk.shrdport) + if ( create_thread (&sysblk.shrdtid, &sysblk.detattr, + shared_server, NULL) ) + { + fprintf (stderr, + _("HHCIN006S Cannot create shared_server thread: %s\n"), + strerror(errno)); + delayed_exit(1); + } + + /* Retry pending connections */ { - fprintf (stderr, - "HHCIN006S Cannot create panel thread: %s\n", - strerror(errno)); - exit(1); + DEVBLK *dev; + TID tid; + + for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) + if (dev->connecting) + if ( create_thread (&tid, &sysblk.detattr, *dev->hnd->init, dev) ) + { + fprintf (stderr, + _("HHCIN007S Cannot create %4.4X connection thread: %s\n"), + dev->devnum, strerror(errno)); + delayed_exit(1); + } } - cpu_thread(&sysblk.regs[0]); #endif + /* Start up the RC file processing thread */ + create_thread(&rctid,&sysblk.detattr,process_rc_file,NULL); + + /* Activate the control panel */ + if(!daemon_mode) + { + panel_display (); + } + else + while(1) +#if defined(OPTION_DYNAMIC_LOAD) + if(daemon_task) + daemon_task (); + else +#endif /* defined(OPTION_DYNAMIC_LOAD) */ + if((msgcnt = log_read(&msgbuf, &msgnum, LOG_BLOCK))) + if(isatty(STDERR_FILENO)) + fwrite(msgbuf,msgcnt,1,stderr); + return 0; } /* end function main */ + + +/*-------------------------------------------------------------------*/ +/* System cleanup */ +/*-------------------------------------------------------------------*/ +void system_cleanup (void) +{ +} + + +/*-------------------------------------------------------------------*/ +/* Shutdown hercules */ +/*-------------------------------------------------------------------*/ +void system_shutdown (void) +{ + /* ZZ FIXME: Using the shutdown flag does not serialize shutdown + it would be better to call a synchronous termination + routine, which only returns when the shutdown of + the function in question has been completed */ + + sysblk.shutdown = 1; + + release_config(); + + /* Call all termination routines in LIFO order */ + hdl_shut(); + +} diff --git a/inline.h b/inline.h index e5a38d4..9eb8544 100644 --- a/inline.h +++ b/inline.h @@ -30,7 +30,7 @@ _DAT_C_STATIC void ARCH_DEP(invalidate_pte) (BYTE ibyte, int r1, _LOGICAL_C_STATIC RADR ARCH_DEP(logical_to_abs) (VADR addr, int arn, REGS *regs, int acctype, BYTE akey); -#if defined(_FEATURE_SIE) +#if defined(_FEATURE_SIE) && ARCH_MODE != ARCH_900 _LOGICAL_C_STATIC RADR s390_logical_to_abs (U32 addr, int arn, REGS *regs, int acctype, BYTE akey); _DAT_C_STATIC int s390_translate_addr (U32 vaddr, int arn, REGS *regs, diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c index 516f521..6efdc19 100644 --- a/intl/loadmsgcat.c +++ b/intl/loadmsgcat.c @@ -32,6 +32,8 @@ #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> + +typedef unsigned long long uintmax_t; // fishfix #ifdef __GNUC__ # define alloca __builtin_alloca diff --git a/io.c b/io.c index 132ff12..f9c4c09 100644 --- a/io.c +++ b/io.c @@ -188,20 +188,21 @@ PMCW pmcw; /* Path management ctl word */ PERFORM_SERIALIZATION (regs); PERFORM_CHKPT_SYNC (regs); + /* Obtain the device lock */ + obtain_lock (&dev->lock); + /* Condition code 1 if subchannel is status pending with other than intermediate status */ if ((dev->scsw.flag3 & SCSW3_SC_PEND) && !(dev->scsw.flag3 & SCSW3_SC_INTER)) { regs->psw.cc = 1; + release_lock (&dev->lock); return; } - /* Obtain the device lock */ - obtain_lock (&dev->lock); - /* Condition code 2 if subchannel is busy */ - if (dev->busy || dev->pending) + if (dev->busy || dev->pending || dev->pcipending || dev->attnpending) { regs->psw.cc = 2; release_lock (&dev->lock); @@ -234,6 +235,7 @@ PMCW pmcw; /* Path management ctl word */ dev->pmcw.flag26 = pmcw.flag26; dev->pmcw.flag27 = pmcw.flag27; +#if defined(_FEATURE_IO_ASSIST) /* Relate the device storage view to the requested zone */ { RADR mso, msl; mso = sysblk.zpb[dev->pmcw.zone].mso << 20; @@ -247,6 +249,7 @@ PMCW pmcw; /* Path management ctl word */ dev->mainlim = msl - mso; dev->storkeys = &(STORAGE_KEY(mso, &sysblk)); } +#endif /*defined(_FEATURE_IO_ASSIST)*/ /* Set device priority from the interruption subclass bits */ dev->priority = (dev->pmcw.flag4 & PMCW4_ISC) >> 3; @@ -868,6 +871,15 @@ VADR ccwaddr; /* CCW address for start I/O */ BYTE ccwkey; /* Bits 0-3=key, 4=7=zeroes */ S(inst, execflag, regs, b2, effective_addr2); +#if defined(FEATURE_ECPSVM) + if((inst[1])!=0x02) + { + if(ecpsvm_dosio(regs,b2,effective_addr2)==0) + { + return; + } + } +#endif PRIV_CHECK(regs); diff --git a/ipl.c b/ipl.c index 93ef117..13160f0 100644 --- a/ipl.c +++ b/ipl.c @@ -35,9 +35,14 @@ PSA *psa; /* -> Prefixed storage area */ BYTE unitstat; /* IPL device unit status */ BYTE chanstat; /* IPL device channel status */ -#ifdef EXTERNALGUI - if (extgui) logmsg("LOAD=1\n"); -#endif /*EXTERNALGUI*/ + if(!regs->cpuonline) + { + obtain_lock (&sysblk.intlock); + configure_cpu(regs); + release_lock(&sysblk.intlock); + } + + HDC(debug_cpu_state, regs); /* Reset external interrupts */ OFF_IC_SERVSIG; @@ -62,9 +67,9 @@ BYTE chanstat; /* IPL device channel status */ { logmsg (_("HHCCP027E Device %4.4X not in configuration\n"), devnum); -#ifdef EXTERNALGUI - if (extgui) logmsg("LOAD=0\n"); -#endif /*EXTERNALGUI*/ + + HDC(debug_cpu_state, regs); + return -1; } @@ -72,9 +77,9 @@ BYTE chanstat; /* IPL device channel status */ && dev->chanset != regs->chanset) { logmsg(_("HHCCP028E Device not connected to channelset\n")); -#ifdef EXTERNALGUI - if (extgui) logmsg("LOAD=0\n"); -#endif /*EXTERNALGUI*/ + + HDC(debug_cpu_state, regs); + return -1; } /* Point to the PSA in main storage */ @@ -100,12 +105,13 @@ BYTE chanstat; /* IPL device channel status */ /* Build the operation request block */ /*@IWZ*/ memset (&dev->orb, 0, sizeof(ORB)); /*@IWZ*/ + dev->busy = 1; + /* Execute the IPL channel program */ ARCH_DEP(execute_ccw_chain) (dev); /* Clear the interrupt pending and device busy conditions */ - dev->pending = 0; - dev->busy = 0; + dev->busy = dev->pending = dev->pcipending = 0; dev->scsw.flag2 = 0; dev->scsw.flag3 = 0; @@ -121,18 +127,18 @@ BYTE chanstat; /* IPL device channel status */ #endif /*FEATURE_CHANNEL_SUBSYSTEM*/ if (unitstat != (CSW_CE | CSW_DE) || chanstat != 0) { - logmsg (_("HHCCP029E %s mode IPL failed: CSW status=%2.2X%2.2X\n"), + logmsg (_("HHCCP029E %s mode IPL failed: CSW status=%2.2X%2.2X\n" + " Sense="), get_arch_mode_string(regs), unitstat, chanstat); - logmsg (_(" Sense=")); for (i=0; i < (int)dev->numsense; i++) { logmsg ("%2.2X", dev->sense[i]); if ((i & 3) == 3) logmsg(" "); } logmsg ("\n"); -#ifdef EXTERNALGUI - if (extgui) logmsg("LOAD=0\n"); -#endif /*EXTERNALGUI*/ + + HDC(debug_cpu_state, regs); + return -1; } @@ -166,9 +172,7 @@ BYTE chanstat; /* IPL device channel status */ psa = (PSA*)(regs->mainstor + regs->PX); /* Load IPL PSW from PSA+X'0' */ - obtain_lock(&sysblk.intlock); rc = ARCH_DEP(load_psw) (regs, psa->iplpsw); - release_lock(&sysblk.intlock); if ( rc ) { logmsg (_("HHCCP030E %s mode IPL failed: Invalid IPL PSW: " @@ -177,17 +181,14 @@ BYTE chanstat; /* IPL device channel status */ psa->iplpsw[0], psa->iplpsw[1], psa->iplpsw[2], psa->iplpsw[3], psa->iplpsw[4], psa->iplpsw[5], psa->iplpsw[6], psa->iplpsw[7]); -#ifdef EXTERNALGUI - if (extgui) logmsg("LOAD=0\n"); -#endif /*EXTERNALGUI*/ + + HDC(debug_cpu_state, regs); + return -1; } -#if defined(OPTION_REDUCED_INVAL) INVALIDATE_AIA(regs); - INVALIDATE_AEA_ALL(regs); -#endif /* Set the CPU into the started state */ regs->cpustate = CPUSTATE_STARTED; @@ -205,9 +206,8 @@ BYTE chanstat; /* IPL device channel status */ WAKEUP_CPU (regs->cpuad); release_lock (&sysblk.intlock); -#ifdef EXTERNALGUI - if (extgui) logmsg("LOAD=0\n"); -#endif /*EXTERNALGUI*/ + HDC(debug_cpu_state, regs); + return 0; } /* end function load_ipl */ @@ -246,9 +246,14 @@ U32 fileaddr; if(fname == NULL) /* Default ipl from DASD */ fname = "hercules.ins"; /* from hercules.ins */ -#ifdef EXTERNALGUI - if (extgui) logmsg("LOAD=1\n"); -#endif /*EXTERNALGUI*/ + if(!regs->cpuonline) + { + obtain_lock (&sysblk.intlock); + configure_cpu(regs); + release_lock(&sysblk.intlock); + } + + HDC(debug_cpu_state, regs); /* Reset external interrupts */ OFF_IC_SERVSIG; @@ -303,9 +308,9 @@ U32 fileaddr; if( ARCH_DEP(load_main) (pathname, fileaddr) < 0 ) { fclose(fp); -#ifdef EXTERNALGUI - if (extgui) logmsg("LOAD=0\n"); -#endif /*EXTERNALGUI*/ + + HDC(debug_cpu_state, regs); + return -1; } } @@ -331,17 +336,14 @@ U32 fileaddr; psa->iplpsw[0], psa->iplpsw[1], psa->iplpsw[2], psa->iplpsw[3], psa->iplpsw[4], psa->iplpsw[5], psa->iplpsw[6], psa->iplpsw[7]); -#ifdef EXTERNALGUI - if (extgui) logmsg("LOAD=0\n"); -#endif /*EXTERNALGUI*/ + + HDC(debug_cpu_state, regs); + return -1; } -#if defined(OPTION_REDUCE_INVAL) INVALIDATE_AIA(regs); - INVALIDATE_AEA_ALL(regs); -#endif /* Set the CPU into the started state */ regs->cpustate = CPUSTATE_STARTED; @@ -355,9 +357,8 @@ U32 fileaddr; WAKEUP_CPU (regs->cpuad); release_lock (&sysblk.intlock); -#ifdef EXTERNALGUI - if (extgui) logmsg("LOAD=0\n"); -#endif /*EXTERNALGUI*/ + HDC(debug_cpu_state, regs); + return 0; } /* end function load_hmc */ /*-------------------------------------------------------------------*/ @@ -460,6 +461,10 @@ void ARCH_DEP(initial_cpu_reset) (REGS *regs) if(regs->guestregs) ARCH_DEP(initial_cpu_reset)(regs->guestregs); #endif /*defined(_FEATURE_SIE)*/ +#if defined(FEATURE_ECPSVM) + regs->vtimerint=0; + regs->rtimerint=0; +#endif } /* end function initial_cpu_reset */ diff --git a/linklist.h b/linklist.h index c32adc1..a03f40c 100644 --- a/linklist.h +++ b/linklist.h @@ -294,7 +294,7 @@ Return Value: ////////////////////////////////////////////////////////////////////////////////////////// // -// VOID InsertlistTail +// VOID InsertListTail // ( // LIST_ENTRY* head, // LIST_ENTRY* entry @@ -431,6 +431,7 @@ Return Value: _EX_Flink->Blink = _EX_Blink; \ } + ////////////////////////////////////////////////////////////////////////////////////////// #endif // _LLIST_ diff --git a/logger.c b/logger.c new file mode 100644 index 0000000..9c63a61 --- /dev/null +++ b/logger.c @@ -0,0 +1,373 @@ +/* LOGGER.C (c) Copyright Jan Jaeger, 2003 */ +/* System logger functions */ + +/* If standard output or standard error is redirected then the log */ +/* is written to the redirection. */ +/* If standard output and standard error are both redirected then */ +/* the system log is written to the redirection of standard error */ +/* the redirection of standard output is ignored in this case, */ +/* and background mode is assumed. */ + +/* Any thread can determine background mode by inspecting stderr */ +/* for isatty() */ + +#include "hercules.h" +#include "opcode.h" /* Required for SETMODE macro */ + +static ATTR logger_attr; +static COND logger_cond; +static LOCK logger_lock; +static TID logger_tid; + +static char *logger_buffer; +static int logger_bufsize; + +static int logger_currmsg; +static int logger_wrapped; + +static int logger_active; + +static FILE *logger_syslog[2]; /* Syslog read/write pipe */ +static int logger_syslogfd[2]; /* pairs */ +static FILE *logger_hrdcpy; /* Hardcopy log or zero */ +static int logger_hrdcpyfd; /* Hardcopt fd or -1 */ + +/* Find the index for a specific line number in the log, */ +/* one being the most recent line */ +/* Example: */ +/* read the last 5 lines in the syslog: */ +/* */ +/* int msgnum; */ +/* int msgidx; */ +/* char *msgbuf; */ +/* */ +/* msgidx = log_line(5); */ +/* while((msgcnt = log_read(&msgbuf, &msgidx, LOG_NOBLOCK))) */ +/* function_to_process_log(msgbuf, msgcnt); */ +/* */ +int log_line(int linenumber) +{ +char *msgbuf[2],*tmpbuf = NULL; +int msgidx[2] = { -1, -1 }; +int msgcnt[2]; +int i; + + if(!linenumber++) + return logger_currmsg; + + /* Find the last two blocks in the log */ + do { + msgidx[0] = msgidx[1]; + msgbuf[0] = msgbuf[1]; + msgcnt[0] = msgcnt[1]; + } while((msgcnt[1] = log_read(&msgbuf[1], &msgidx[1], LOG_NOBLOCK))); + + for(i = 0; i < 2 && linenumber; i++) + if(msgidx[i] != -1) + { + for(; linenumber > 0; linenumber--) + { + if(!(tmpbuf = memrchr(msgbuf[i],'\n',msgcnt[i]))) + break; + msgcnt[i] = tmpbuf - msgbuf[i]; + } + if(!linenumber) + break; + } + + while(i < 2 && tmpbuf && (*tmpbuf == '\r' || *tmpbuf == '\n')) + { + tmpbuf++; + msgcnt[i]++; + } + + return i ? msgcnt[i] + msgidx[0] : msgcnt[i]; +} + + +/* log_read - read system log */ +/* parameters: */ +/* buffer - pointer to bufferpointer */ +/* the bufferpointer will be returned */ +/* msgindex - an index used on multiple read requests */ +/* a value of -1 ensures that reading starts at the */ +/* oldest entry in the log */ +/* block - LOG_NOBLOCK - non blocking request */ +/* LOG_BLOCK - blocking request */ +/* returns: */ +/* number of bytes in buffer or zero */ +/* */ +/* */ +int log_read(char **buffer, int *msgindex, int block) +{ +int bytes_returned; + + obtain_lock(&logger_lock); + + if(*msgindex == logger_currmsg && block) + { + if(logger_active) + { + wait_condition(&logger_cond, &logger_lock); + } + else + { + *msgindex = logger_currmsg; + *buffer = logger_buffer + logger_currmsg; + release_lock(&logger_lock); + return 0; + } + } + + if(*msgindex != logger_currmsg) + { + if(*msgindex < 0) + *msgindex = logger_wrapped ? logger_currmsg : 0; + + if(*msgindex < 0 || *msgindex >= logger_bufsize) + *msgindex = 0; + + *buffer = logger_buffer + *msgindex; + + if(*msgindex >= logger_currmsg) + { + bytes_returned = logger_bufsize - *msgindex; + *msgindex = 0; + } + else + { + bytes_returned = logger_currmsg - *msgindex; + *msgindex = logger_currmsg; + } + } + else + bytes_returned = 0; + + release_lock(&logger_lock); + + return bytes_returned; +} + + +static void logger_term(void *arg __attribute__ ((unused)) ) +{ + + if(logger_active) + { + obtain_lock(&logger_lock); + +fflush(stdout); + /* Redirect all output to stderr */ + dup2(STDERR_FILENO, STDOUT_FILENO); + + /* Mark logger inactive */ + logger_active = 0; + + /* Send the logger a message to wake it up */ + fprintf(logger_syslog[LOG_WRITE], _("HHCLG014I logger thread terminating\n") ); + + /* Wait for the logger to terminate */ + wait_condition(&logger_cond, &logger_lock); + + release_lock(&logger_lock); + + /* Wait for the logger to terminate */ +// pthread_join(logger_tid, NULL); + } +} + + +static void logger_thread(void *arg) +{ +int bytes_read; + + UNREFERENCED(arg); + + /* Set root mode in order to set priority */ + SETMODE(ROOT); + + /* Set device thread priority; ignore any errors */ + setpriority(PRIO_PROCESS, 0, sysblk.devprio); + + /* Back to user mode */ + SETMODE(USER); + + if(dup2(logger_syslogfd[LOG_WRITE],STDOUT_FILENO) == -1) + { + if(logger_hrdcpy) + fprintf(logger_hrdcpy, _("HHCLG001E Error redirecting stdout: %s\n"), + strerror(errno)); + exit(1); + } + setvbuf (stdout, NULL, _IOLBF, 0); + + /* call logger_term on system shutdown */ + hdl_adsc(logger_term, NULL); + + obtain_lock(&logger_lock); + + logger_active = 1; + + /* Signal initialization complete */ + signal_condition(&logger_cond); + + release_lock(&logger_lock); + + /* ZZ FIXME: We must empty the read pipe before we terminate */ + while(logger_active) + { + bytes_read = read(logger_syslogfd[LOG_READ],logger_buffer + logger_currmsg, + ((logger_bufsize - logger_currmsg) > SSIZE_MAX ? SSIZE_MAX : logger_bufsize - logger_currmsg)); + + if(bytes_read == -1) + { + if(logger_hrdcpy) + fprintf(logger_hrdcpy, _("HHCLG002E Error reading syslog pipe: %s\n"), + strerror(errno)); + bytes_read = 0; + } + + if(logger_hrdcpy && fwrite(logger_buffer + logger_currmsg,bytes_read,1,logger_hrdcpy) != 1) + fprintf(logger_hrdcpy, _("HHCLG003E Error writing hardcopy log: %s\n"), + strerror(errno)); + + logger_currmsg += bytes_read; + if(logger_currmsg >= logger_bufsize) + { + logger_currmsg = 0; + logger_wrapped = 1; + } + + obtain_lock(&logger_lock); + + broadcast_condition(&logger_cond); + + release_lock(&logger_lock); + } + + /* Logger is now terminating */ + obtain_lock(&logger_lock); + + /* Redirect all msgs to stderr */ + logger_syslog[LOG_WRITE] = stderr; + logger_syslogfd[LOG_WRITE] = STDERR_FILENO; + + /* Signal any waiting tasks */ + broadcast_condition(&logger_cond); + + release_lock(&logger_lock); +} + + +void logger_init(void) +{ + initialize_detach_attr (&logger_attr); + initialize_condition (&logger_cond); + initialize_lock (&logger_lock); + + obtain_lock(&logger_lock); + + logger_syslog[LOG_WRITE] = stderr; + + /* If standard error is redirected, then use standard error + as the log file. */ + if(!isatty(STDOUT_FILENO) && !isatty(STDERR_FILENO)) + { + /* Ignore standard output to the extent that it is + treated as standard error */ + logger_hrdcpyfd = dup(STDOUT_FILENO); + if(dup2(STDERR_FILENO,STDOUT_FILENO) == -1) + { + fprintf(stderr, _("HHCLG004E Error duplicating stderr: %s\n"), + strerror(errno)); + exit(1); + } + } + else + { + if(!isatty(STDOUT_FILENO)) + { + logger_hrdcpyfd = dup(STDOUT_FILENO); + if(dup2(STDERR_FILENO,STDOUT_FILENO) == -1) + { + fprintf(stderr, _("HHCLG004E Error duplicating stderr: %s\n"), + strerror(errno)); + exit(1); + } + } + if(!isatty(STDERR_FILENO)) + { + logger_hrdcpyfd = dup(STDERR_FILENO); + if(dup2(STDOUT_FILENO,STDERR_FILENO) == -1) + { + fprintf(stderr, _("HHCLG005E Error duplicating stdout: %s\n"), + strerror(errno)); + exit(1); + } + } + } + + if(logger_hrdcpyfd == -1) + { + logger_hrdcpyfd = 0; + fprintf(stderr, _("HHCLG006E Duplicate error redirecting hardcopy log: %s\n"), + strerror(errno)); + } + + if(logger_hrdcpyfd) + { + if(!(logger_hrdcpy = fdopen(logger_hrdcpyfd,"w"))) + fprintf(stderr, _("HHCLG007S Hardcopy log fdopen failed: %s\n"), + strerror(errno)); + } + + if(logger_hrdcpy) + setvbuf(logger_hrdcpy, NULL, _IONBF, 0); + + logger_bufsize = LOG_DEFSIZE; + + if(!(logger_buffer = malloc(logger_bufsize))) + { + fprintf(stderr, _("HHCLG008S logbuffer malloc failed: %s\n"), + strerror(errno)); + exit(1); + } + + if(pipe(logger_syslogfd)) + { + fprintf(stderr, _("HHCLG009S Syslog message pipe creation failed: %s\n"), + strerror(errno)); + exit(1); /* Hercules running without syslog */ + } + + if(!(logger_syslog[LOG_WRITE] = fdopen(logger_syslogfd[LOG_WRITE],"w"))) + { + logger_syslog[LOG_WRITE] = stderr; + fprintf(stderr, _("HHCLG010S Syslog write message pipe open failed: %s\n"), + strerror(errno)); + exit(1); + } + +#if 0 + if(!(logger_syslog[LOG_READ] = fdopen(logger_syslogfd[LOG_READ],"r"))) + { + fprintf(stderr, _("HHCLG011S Syslog read message pipe open failed: %s\n"), + strerror(errno)); + exit(1); + } +#endif + + setvbuf (logger_syslog[LOG_WRITE], NULL, _IOLBF, 0); + + if (create_thread (&logger_tid, &logger_attr, logger_thread, NULL)) + { + fprintf(stderr, _("HHCLG012E Cannot create logger thread: %s\n"), + strerror(errno)); + exit(1); + } + + wait_condition(&logger_cond, &logger_lock); + + release_lock(&logger_lock); + +} diff --git a/logger.h b/logger.h new file mode 100644 index 0000000..2ee6dd4 --- /dev/null +++ b/logger.h @@ -0,0 +1,71 @@ +/* LOGGER.H (c) Copyright Jan Jaeger, 2003 */ +/* System logger functions */ + +#ifndef __LOGGER_H__ +#define __LOGGER_H__ + + +#define LOG_READ 0 +#define LOG_WRITE 1 + +#define LOG_NOBLOCK 0 +#define LOG_BLOCK 1 + +#if defined(SSIZE_MAX) && SSIZE_MAX < 1048576 + #define LOG_DEFSIZE SSIZE_MAX +#else + #define LOG_DEFSIZE 65536 +#endif + +#if defined(NO_CYGWIN_SETVBUF_BUG) || !defined(WIN32) +#if 0 +#define logmsg(_message...) printf(_message) +#else +#define logmsg(_message...) log_write(0,_message) +#define logmsgp(_message...) log_write(1,_message) +#define logmsgb(_message...) log_write(2,_message) +#endif +#else /*NO_CYGWIN_SETVBUF_BUG*/ +#if 0 +#define logmsg(_message...) \ +do { \ + printf(_message); \ + fflush(stdout); \ +} while(0) +#else +#define logmsg(_message...) \ +do { \ + log_write(0,_message); \ + fflush(stdout); \ +} while(0) +#define logmsgp(_message...) \ +do { \ + log_write(1,_message); \ + fflush(stdout); \ +} while(0) +#define logmsgb(_message...) \ +do { \ + log_write(2,_message); \ + fflush(stdout); \ +} while(0) +#endif +#endif /*NO_CYGWIN_SETVBUF_BUG*/ + +void logger_init(void); + +int log_read(char **buffer, int *msgindex, int block); +int log_line(int linenumber); + +/* Log routing section */ +typedef void LOG_WRITER(void *,unsigned char *); +typedef void LOG_CLOSER(void *); + +int log_open(LOG_WRITER,LOG_CLOSER,void *); +void log_close(void); +void log_write(int,unsigned char *,...); +/* End of log routing section */ + +/* Log routing utility */ +unsigned char *log_capture(void *(*)(void *),void *); + +#endif diff --git a/logmsg.c b/logmsg.c new file mode 100644 index 0000000..0031c0d --- /dev/null +++ b/logmsg.c @@ -0,0 +1,187 @@ +/* LOGMSG.C : ISW 2003 */ +/* logmsg frontend routing */ + +#include "hercules.h" + +static LOCK log_route_lock; + +#define MAX_LOG_ROUTES 16 +typedef struct _LOG_ROUTES +{ + TID t; + LOG_WRITER *w; + LOG_CLOSER *c; + void *u; +} LOG_ROUTES; + +LOG_ROUTES log_routes[MAX_LOG_ROUTES]; + +static int log_route_inited=0; + +static void log_route_init(void) +{ + int i; + if(log_route_inited) + { + return; + } + initialize_lock(&log_route_lock); + for(i=0;i<MAX_LOG_ROUTES;i++) + { + log_routes[i].t=0; + log_routes[i].w=NULL; + log_routes[i].c=NULL; + log_routes[i].u=NULL; + } + log_route_inited=1; + return; +} +/* LOG Routing functions */ +static int log_route_search(TID t) +{ + int i; + for(i=0;i<MAX_LOG_ROUTES;i++) + { + if(log_routes[i].t==t) + { + if(t==0) + { + log_routes[i].t=1; + } + return(i); + } + } + return(-1); +} + +/* Open a log redirection Driver route on a per-thread basis */ +/* Up to 16 concurent threads may have an alternate logging route */ +/* opened */ +int log_open(LOG_WRITER *lw,LOG_CLOSER *lc,void *uw) +{ + int slot; + log_route_init(); + obtain_lock(&log_route_lock); + slot=log_route_search((TID)0); + if(slot<0) + { + release_lock(&log_route_lock); + return(-1); + } + log_routes[slot].t=thread_id(); + log_routes[slot].w=lw; + log_routes[slot].c=lc; + log_routes[slot].u=uw; + release_lock(&log_route_lock); + return(0); +} + +void log_close(void) +{ + int slot; + log_route_init(); + obtain_lock(&log_route_lock); + slot=log_route_search(thread_id()); + if(slot<0) + { + release_lock(&log_route_lock); + return; + } + log_routes[slot].c(log_routes[slot].u); + log_routes[slot].t=0; + log_routes[slot].w=NULL; + log_routes[slot].c=NULL; + log_routes[slot].u=NULL; + release_lock(&log_route_lock); + return; +} + +/* panel : 0 - No, 1 - Only, 2 - Also */ +void log_write(int panel,BYTE *msg,...) +{ + char *bfr; + int rc; + va_list vl; + int slot; + log_route_init(); + va_start(vl,msg); + if(panel==1) + { + vprintf(msg,vl); + return; + } + obtain_lock(&log_route_lock); + slot=log_route_search(thread_id()); + release_lock(&log_route_lock); + if(slot<0 || panel>0) + { + vprintf(msg,vl); + va_end(vl); + if(slot<0) + { + return; + } + va_start(vl,msg); + } + bfr=malloc(256); + rc=vsnprintf(bfr,256,msg,vl); + va_end(vl); + if(rc>=256) + { + free(bfr); + bfr=malloc(rc+1); + va_start(vl,msg); + vsnprintf(bfr,rc,msg,vl); + va_end(vl); + } + log_routes[slot].w(log_routes[slot].u,bfr); + free(bfr); + return; +} + +/* capture log output routine series */ +/* log_capture is a sample of how to */ +/* use log rerouting. */ +/* log_capture takes 2 args : */ +/* a ptr to a function taking 1 parm */ +/* the function parm */ +struct log_capture_data +{ + char *obfr; + size_t sz; +}; + +void log_capture_writer(void *vcd,BYTE *msg) +{ + struct log_capture_data *cd; + cd=(struct log_capture_data *)vcd; + if(cd->sz==0) + { + cd->sz=strlen(msg)+1; + cd->obfr=malloc(cd->sz); + cd->obfr[0]=0; + } + else + { + cd->sz+=strlen(msg); + cd->obfr=realloc(cd->obfr,cd->sz); + } + strcat(cd->obfr,msg); + return; +} +void log_capture_closer(void *vcd) +{ + UNREFERENCED(vcd); + return; +} + +BYTE *log_capture(void *(*fun)(void *),void *p) +{ + struct log_capture_data cd; + cd.obfr=NULL; + cd.sz=0; + log_open(log_capture_writer,log_capture_closer,&cd); + fun(p); + log_close(); + return(cd.obfr); +} diff --git a/ltdl.c b/ltdl.c new file mode 100644 index 0000000..7fbb4a4 --- /dev/null +++ b/ltdl.c @@ -0,0 +1,4487 @@ +/* ltdl.c -- system independent dlopen wrapper + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Originally by Thomas Tanner <tanner@ffii.org> + This file is part of GNU Libtool. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +As a special exception to the GNU Lesser General Public License, +if you distribute this file as part of a program or library that +is built using GNU libtool, you may include it under the same +distribution terms that you use for the rest of that program. + +This library 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 +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA + +*/ + +#if HAVE_CONFIG_H +# include <config.h> +#endif + +#if HAVE_UNISTD_H +# include <unistd.h> +#endif + +#if HAVE_STDIO_H +# include <stdio.h> +#endif + +#if HAVE_STDLIB_H +# include <stdlib.h> +#endif + +#if HAVE_STRING_H +# include <string.h> +#else +# if HAVE_STRINGS_H +# include <strings.h> +# endif +#endif + +#if HAVE_CTYPE_H +# include <ctype.h> +#endif + +#if HAVE_MALLOC_H +# include <malloc.h> +#endif + +#if HAVE_MEMORY_H +# include <memory.h> +#endif + +#if HAVE_ERRNO_H +# include <errno.h> +#endif + + +#ifndef __WINDOWS__ +# ifdef __WIN32__ +# define __WINDOWS__ +# endif +#endif + + +#undef LT_USE_POSIX_DIRENT +#ifdef HAVE_CLOSEDIR +# ifdef HAVE_OPENDIR +# ifdef HAVE_READDIR +# ifdef HAVE_DIRENT_H +# define LT_USE_POSIX_DIRENT +# endif /* HAVE_DIRENT_H */ +# endif /* HAVE_READDIR */ +# endif /* HAVE_OPENDIR */ +#endif /* HAVE_CLOSEDIR */ + + +#undef LT_USE_WINDOWS_DIRENT_EMULATION +#ifndef LT_USE_POSIX_DIRENT +# ifdef __WINDOWS__ +# define LT_USE_WINDOWS_DIRENT_EMULATION +# endif /* __WINDOWS__ */ +#endif /* LT_USE_POSIX_DIRENT */ + + +#ifdef LT_USE_POSIX_DIRENT +# include <dirent.h> +# define LT_D_NAMLEN(dirent) (strlen((dirent)->d_name)) +#else +# ifdef LT_USE_WINDOWS_DIRENT_EMULATION +# define LT_D_NAMLEN(dirent) (strlen((dirent)->d_name)) +# else +# define dirent direct +# define LT_D_NAMLEN(dirent) ((dirent)->d_namlen) +# if HAVE_SYS_NDIR_H +# include <sys/ndir.h> +# endif +# if HAVE_SYS_DIR_H +# include <sys/dir.h> +# endif +# if HAVE_NDIR_H +# include <ndir.h> +# endif +# endif +#endif + +#if HAVE_ARGZ_H +# include <argz.h> +#endif + +#if HAVE_ASSERT_H +# include <assert.h> +#else +# define assert(arg) ((void) 0) +#endif + +#include "ltdl.h" + +#if WITH_DMALLOC +# include <dmalloc.h> +#endif + + + + +/* --- WINDOWS SUPPORT --- */ + + +#ifdef DLL_EXPORT +# define LT_GLOBAL_DATA __declspec(dllexport) +#else +# define LT_GLOBAL_DATA +#endif + +/* fopen() mode flags for reading a text file */ +#undef LT_READTEXT_MODE +#ifdef __WINDOWS__ +# define LT_READTEXT_MODE "rt" +#else +# define LT_READTEXT_MODE "r" +#endif + +#ifdef LT_USE_WINDOWS_DIRENT_EMULATION + +#include <windows.h> + +#define dirent lt_dirent +#define DIR lt_DIR + +struct dirent +{ + char d_name[2048]; + int d_namlen; +}; + +typedef struct _DIR +{ + HANDLE hSearch; + WIN32_FIND_DATA Win32FindData; + BOOL firsttime; + struct dirent file_info; +} DIR; + +#endif /* LT_USE_WINDOWS_DIRENT_EMULATION */ + + +/* --- MANIFEST CONSTANTS --- */ + + +/* Standard libltdl search path environment variable name */ +#undef LTDL_SEARCHPATH_VAR +#define LTDL_SEARCHPATH_VAR "LTDL_LIBRARY_PATH" + +/* Standard libtool archive file extension. */ +#undef LTDL_ARCHIVE_EXT +#define LTDL_ARCHIVE_EXT ".la" + +/* max. filename length */ +#ifndef LT_FILENAME_MAX +# define LT_FILENAME_MAX 1024 +#endif + +/* This is the maximum symbol size that won't require malloc/free */ +#undef LT_SYMBOL_LENGTH +#define LT_SYMBOL_LENGTH 128 + +/* This accounts for the _LTX_ separator */ +#undef LT_SYMBOL_OVERHEAD +#define LT_SYMBOL_OVERHEAD 5 + + + + +/* --- MEMORY HANDLING --- */ + + +/* These are the functions used internally. In addition to making + use of the associated function pointers above, they also perform + error handling. */ +static char *lt_estrdup LT_PARAMS((const char *str)); +static lt_ptr lt_emalloc LT_PARAMS((size_t size)); +static lt_ptr lt_erealloc LT_PARAMS((lt_ptr addr, size_t size)); + +/* static lt_ptr rpl_realloc LT_PARAMS((lt_ptr ptr, size_t size)); */ +#define rpl_realloc realloc + +/* These are the pointers that can be changed by the caller: */ +LT_GLOBAL_DATA lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)) + = (lt_ptr (*) LT_PARAMS((size_t))) malloc; +LT_GLOBAL_DATA lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size)) + = (lt_ptr (*) LT_PARAMS((lt_ptr, size_t))) rpl_realloc; +LT_GLOBAL_DATA void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)) + = (void (*) LT_PARAMS((lt_ptr))) free; + +/* The following macros reduce the amount of typing needed to cast + assigned memory. */ +#if WITH_DMALLOC + +#define LT_DLMALLOC(tp, n) ((tp *) xmalloc ((n) * sizeof(tp))) +#define LT_DLREALLOC(tp, p, n) ((tp *) xrealloc ((p), (n) * sizeof(tp))) +#define LT_DLFREE(p) \ + LT_STMT_START { if (p) (p) = (xfree (p), (lt_ptr) 0); } LT_STMT_END + +#define LT_EMALLOC(tp, n) ((tp *) xmalloc ((n) * sizeof(tp))) +#define LT_EREALLOC(tp, p, n) ((tp *) xrealloc ((p), (n) * sizeof(tp))) + +#else + +#define LT_DLMALLOC(tp, n) ((tp *) lt_dlmalloc ((n) * sizeof(tp))) +#define LT_DLREALLOC(tp, p, n) ((tp *) lt_dlrealloc ((p), (n) * sizeof(tp))) +#define LT_DLFREE(p) \ + LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END + +#define LT_EMALLOC(tp, n) ((tp *) lt_emalloc ((n) * sizeof(tp))) +#define LT_EREALLOC(tp, p, n) ((tp *) lt_erealloc ((p), (n) * sizeof(tp))) + +#endif + +#define LT_DLMEM_REASSIGN(p, q) LT_STMT_START { \ + if ((p) != (q)) { if (p) lt_dlfree (p); (p) = (q); (q) = 0; } \ + } LT_STMT_END + + +/* --- REPLACEMENT FUNCTIONS --- */ + + +#undef strdup +#define strdup rpl_strdup + +static char *strdup LT_PARAMS((const char *str)); + +static char * +strdup(str) + const char *str; +{ + char *tmp = 0; + + if (str) + { + tmp = LT_DLMALLOC (char, 1+ strlen (str)); + if (tmp) + { + strcpy(tmp, str); + } + } + + return tmp; +} + + +#if ! HAVE_STRCMP + +#undef strcmp +#define strcmp rpl_strcmp + +static int strcmp LT_PARAMS((const char *str1, const char *str2)); + +static int +strcmp (str1, str2) + const char *str1; + const char *str2; +{ + if (str1 == str2) + return 0; + if (str1 == 0) + return -1; + if (str2 == 0) + return 1; + + for (;*str1 && *str2; ++str1, ++str2) + { + if (*str1 != *str2) + break; + } + + return (int)(*str1 - *str2); +} +#endif + + +#if ! HAVE_STRCHR + +# if HAVE_INDEX +# define strchr index +# else +# define strchr rpl_strchr + +static const char *strchr LT_PARAMS((const char *str, int ch)); + +static const char* +strchr(str, ch) + const char *str; + int ch; +{ + const char *p; + + for (p = str; *p != (char)ch && *p != LT_EOS_CHAR; ++p) + /*NOWORK*/; + + return (*p == (char)ch) ? p : 0; +} + +# endif +#endif /* !HAVE_STRCHR */ + + +#if ! HAVE_STRRCHR + +# if HAVE_RINDEX +# define strrchr rindex +# else +# define strrchr rpl_strrchr + +static const char *strrchr LT_PARAMS((const char *str, int ch)); + +static const char* +strrchr(str, ch) + const char *str; + int ch; +{ + const char *p, *q = 0; + + for (p = str; *p != LT_EOS_CHAR; ++p) + { + if (*p == (char) ch) + { + q = p; + } + } + + return q; +} + +# endif +#endif + +/* NOTE: Neither bcopy nor the memcpy implementation below can + reliably handle copying in overlapping areas of memory. Use + memmove (for which there is a fallback implmentation below) + if you need that behaviour. */ +#if ! HAVE_MEMCPY + +# if HAVE_BCOPY +# define memcpy(dest, src, size) bcopy (src, dest, size) +# else +# define memcpy rpl_memcpy + +static lt_ptr memcpy LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); + +static lt_ptr +memcpy (dest, src, size) + lt_ptr dest; + const lt_ptr src; + size_t size; +{ + size_t i = 0; + + for (i = 0; i < size; ++i) + { + dest[i] = src[i]; + } + + return dest; +} + +# endif /* !HAVE_BCOPY */ +#endif /* !HAVE_MEMCPY */ + +#if ! HAVE_MEMMOVE +# define memmove rpl_memmove + +static lt_ptr memmove LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); + +static lt_ptr +memmove (dest, src, size) + lt_ptr dest; + const lt_ptr src; + size_t size; +{ + size_t i; + + if (dest < src) + for (i = 0; i < size; ++i) + { + dest[i] = src[i]; + } + else if (dest > src) + for (i = size -1; i >= 0; --i) + { + dest[i] = src[i]; + } + + return dest; +} + +#endif /* !HAVE_MEMMOVE */ + +#ifdef LT_USE_WINDOWS_DIRENT_EMULATION + +static void closedir LT_PARAMS((DIR *entry)); + +static void +closedir(entry) + DIR *entry; +{ + assert(entry != (DIR *) NULL); + FindClose(entry->hSearch); + lt_dlfree((lt_ptr)entry); +} + + +static DIR * opendir LT_PARAMS((const char *path)); + +static DIR* +opendir (path) + const char *path; +{ + char file_specification[LT_FILENAME_MAX]; + DIR *entry; + + assert(path != (char *) NULL); + (void) strncpy(file_specification,path,LT_FILENAME_MAX-1); + (void) strcat(file_specification,"\\"); + entry = LT_DLMALLOC (DIR,sizeof(DIR)); + if (entry != (DIR *) 0) + { + entry->firsttime = TRUE; + entry->hSearch = FindFirstFile(file_specification,&entry->Win32FindData); + } + if (entry->hSearch == INVALID_HANDLE_VALUE) + { + (void) strcat(file_specification,"\\*.*"); + entry->hSearch = FindFirstFile(file_specification,&entry->Win32FindData); + if (entry->hSearch == INVALID_HANDLE_VALUE) + { + LT_DLFREE (entry); + return (DIR *) 0; + } + } + return(entry); +} + + +static struct dirent *readdir LT_PARAMS((DIR *entry)); + +static struct dirent *readdir(entry) + DIR *entry; +{ + int + status; + + if (entry == (DIR *) 0) + return((struct dirent *) 0); + if (!entry->firsttime) + { + status = FindNextFile(entry->hSearch,&entry->Win32FindData); + if (status == 0) + return((struct dirent *) 0); + } + entry->firsttime = FALSE; + (void) strncpy(entry->file_info.d_name,entry->Win32FindData.cFileName, + LT_FILENAME_MAX-1); + entry->file_info.d_namlen = strlen(entry->file_info.d_name); + return(&entry->file_info); +} + +#endif /* LT_USE_WINDOWS_DIRENT_EMULATION */ + +/* According to Alexandre Oliva <oliva@lsd.ic.unicamp.br>, + ``realloc is not entirely portable'' + In any case we want to use the allocator supplied by the user without + burdening them with an lt_dlrealloc function pointer to maintain. + Instead implement our own version (with known boundary conditions) + using lt_dlmalloc and lt_dlfree. */ + +/* #undef realloc + #define realloc rpl_realloc +*/ +#if 0 + /* You can't (re)define realloc unless you also (re)define malloc. + Right now, this code uses the size of the *destination* to decide + how much to copy. That's not right, but you can't know the size + of the source unless you know enough about, or wrote malloc. So + this code is disabled... */ + +static lt_ptr +realloc (ptr, size) + lt_ptr ptr; + size_t size; +{ + if (size == 0) + { + /* For zero or less bytes, free the original memory */ + if (ptr != 0) + { + lt_dlfree (ptr); + } + + return (lt_ptr) 0; + } + else if (ptr == 0) + { + /* Allow reallocation of a NULL pointer. */ + return lt_dlmalloc (size); + } + else + { + /* Allocate a new block, copy and free the old block. */ + lt_ptr mem = lt_dlmalloc (size); + + if (mem) + { + memcpy (mem, ptr, size); + lt_dlfree (ptr); + } + + /* Note that the contents of PTR are not damaged if there is + insufficient memory to realloc. */ + return mem; + } +} +#endif + + +#if ! HAVE_ARGZ_APPEND +# define argz_append rpl_argz_append + +static error_t argz_append LT_PARAMS((char **pargz, size_t *pargz_len, + const char *buf, size_t buf_len)); + +static error_t +argz_append (pargz, pargz_len, buf, buf_len) + char **pargz; + size_t *pargz_len; + const char *buf; + size_t buf_len; +{ + size_t argz_len; + char *argz; + + assert (pargz); + assert (pargz_len); + assert ((*pargz && *pargz_len) || (!*pargz && !*pargz_len)); + + /* If nothing needs to be appended, no more work is required. */ + if (buf_len == 0) + return 0; + + /* Ensure there is enough room to append BUF_LEN. */ + argz_len = *pargz_len + buf_len; + argz = LT_DLREALLOC (char, *pargz, argz_len); + if (!argz) + return ENOMEM; + + /* Copy characters from BUF after terminating '\0' in ARGZ. */ + memcpy (argz + *pargz_len, buf, buf_len); + + /* Assign new values. */ + *pargz = argz; + *pargz_len = argz_len; + + return 0; +} +#endif /* !HAVE_ARGZ_APPEND */ + + +#if ! HAVE_ARGZ_CREATE_SEP +# define argz_create_sep rpl_argz_create_sep + +static error_t argz_create_sep LT_PARAMS((const char *str, int delim, + char **pargz, size_t *pargz_len)); + +static error_t +argz_create_sep (str, delim, pargz, pargz_len) + const char *str; + int delim; + char **pargz; + size_t *pargz_len; +{ + size_t argz_len; + char *argz = 0; + + assert (str); + assert (pargz); + assert (pargz_len); + + /* Make a copy of STR, but replacing each occurence of + DELIM with '\0'. */ + argz_len = 1+ LT_STRLEN (str); + if (argz_len) + { + const char *p; + char *q; + + argz = LT_DLMALLOC (char, argz_len); + if (!argz) + return ENOMEM; + + for (p = str, q = argz; *p != LT_EOS_CHAR; ++p) + { + if (*p == delim) + { + /* Ignore leading delimiters, and fold consecutive + delimiters in STR into a single '\0' in ARGZ. */ + if ((q > argz) && (q[-1] != LT_EOS_CHAR)) + *q++ = LT_EOS_CHAR; + else + --argz_len; + } + else + *q++ = *p; + } + /* Copy terminating LT_EOS_CHAR. */ + *q = *p; + } + + /* If ARGZ_LEN has shrunk to nothing, release ARGZ's memory. */ + if (!argz_len) + LT_DLFREE (argz); + + /* Assign new values. */ + *pargz = argz; + *pargz_len = argz_len; + + return 0; +} +#endif /* !HAVE_ARGZ_CREATE_SEP */ + + +#if ! HAVE_ARGZ_INSERT +# define argz_insert rpl_argz_insert + +static error_t argz_insert LT_PARAMS((char **pargz, size_t *pargz_len, + char *before, const char *entry)); + +static error_t +argz_insert (pargz, pargz_len, before, entry) + char **pargz; + size_t *pargz_len; + char *before; + const char *entry; +{ + assert (pargz); + assert (pargz_len); + assert (entry && *entry); + + /* No BEFORE address indicates ENTRY should be inserted after the + current last element. */ + if (!before) + return argz_append (pargz, pargz_len, entry, 1+ LT_STRLEN (entry)); + + /* This probably indicates a programmer error, but to preserve + semantics, scan back to the start of an entry if BEFORE points + into the middle of it. */ + while ((before > *pargz) && (before[-1] != LT_EOS_CHAR)) + --before; + + { + size_t entry_len = 1+ LT_STRLEN (entry); + size_t argz_len = *pargz_len + entry_len; + size_t offset = before - *pargz; + char *argz = LT_DLREALLOC (char, *pargz, argz_len); + + if (!argz) + return ENOMEM; + + /* Make BEFORE point to the equivalent offset in ARGZ that it + used to have in *PARGZ incase realloc() moved the block. */ + before = argz + offset; + + /* Move the ARGZ entries starting at BEFORE up into the new + space at the end -- making room to copy ENTRY into the + resulting gap. */ + memmove (before + entry_len, before, *pargz_len - offset); + memcpy (before, entry, entry_len); + + /* Assign new values. */ + *pargz = argz; + *pargz_len = argz_len; + } + + return 0; +} +#endif /* !HAVE_ARGZ_INSERT */ + + +#if ! HAVE_ARGZ_NEXT +# define argz_next rpl_argz_next + +static char *argz_next LT_PARAMS((char *argz, size_t argz_len, + const char *entry)); + +static char * +argz_next (argz, argz_len, entry) + char *argz; + size_t argz_len; + const char *entry; +{ + assert ((argz && argz_len) || (!argz && !argz_len)); + + if (entry) + { + /* Either ARGZ/ARGZ_LEN is empty, or ENTRY points into an address + within the ARGZ vector. */ + assert ((!argz && !argz_len) + || ((argz <= entry) && (entry < (argz + argz_len)))); + + /* Move to the char immediately after the terminating + '\0' of ENTRY. */ + entry = 1+ strchr (entry, LT_EOS_CHAR); + + /* Return either the new ENTRY, or else NULL if ARGZ is + exhausted. */ + return (entry >= argz + argz_len) ? 0 : (char *) entry; + } + else + { + /* This should probably be flagged as a programmer error, + since starting an argz_next loop with the iterator set + to ARGZ is safer. To preserve semantics, handle the NULL + case by returning the start of ARGZ (if any). */ + if (argz_len > 0) + return argz; + else + return 0; + } +} +#endif /* !HAVE_ARGZ_NEXT */ + + + +#if ! HAVE_ARGZ_STRINGIFY +# define argz_stringify rpl_argz_stringify + +static void argz_stringify LT_PARAMS((char *argz, size_t argz_len, + int sep)); + +static void +argz_stringify (argz, argz_len, sep) + char *argz; + size_t argz_len; + int sep; +{ + assert ((argz && argz_len) || (!argz && !argz_len)); + + if (sep) + { + --argz_len; /* don't stringify the terminating EOS */ + while (--argz_len > 0) + { + if (argz[argz_len] == LT_EOS_CHAR) + argz[argz_len] = sep; + } + } +} +#endif /* !HAVE_ARGZ_STRINGIFY */ + + + + +/* --- TYPE DEFINITIONS -- */ + + +/* This type is used for the array of caller data sets in each handler. */ +typedef struct { + lt_dlcaller_id key; + lt_ptr data; +} lt_caller_data; + + + + +/* --- OPAQUE STRUCTURES DECLARED IN LTDL.H --- */ + + +/* Extract the diagnostic strings from the error table macro in the same + order as the enumerated indices in ltdl.h. */ + +static const char *lt_dlerror_strings[] = + { +#define LT_ERROR(name, diagnostic) (diagnostic), + lt_dlerror_table +#undef LT_ERROR + + 0 + }; + +/* This structure is used for the list of registered loaders. */ +struct lt_dlloader { + struct lt_dlloader *next; + const char *loader_name; /* identifying name for each loader */ + const char *sym_prefix; /* prefix for symbols */ + lt_module_open *module_open; + lt_module_close *module_close; + lt_find_sym *find_sym; + lt_dlloader_exit *dlloader_exit; + lt_user_data dlloader_data; +}; + +struct lt_dlhandle_struct { + struct lt_dlhandle_struct *next; + lt_dlloader *loader; /* dlopening interface */ + lt_dlinfo info; + int depcount; /* number of dependencies */ + lt_dlhandle *deplibs; /* dependencies */ + lt_module module; /* system module handle */ + lt_ptr system; /* system specific data */ + lt_caller_data *caller_data; /* per caller associated data */ + int flags; /* various boolean stats */ +}; + +/* Various boolean flags can be stored in the flags field of an + lt_dlhandle_struct... */ +#define LT_DLGET_FLAG(handle, flag) (((handle)->flags & (flag)) == (flag)) +#define LT_DLSET_FLAG(handle, flag) ((handle)->flags |= (flag)) + +#define LT_DLRESIDENT_FLAG (0x01 << 0) +/* ...add more flags here... */ + +#define LT_DLIS_RESIDENT(handle) LT_DLGET_FLAG(handle, LT_DLRESIDENT_FLAG) + + +#define LT_DLSTRERROR(name) lt_dlerror_strings[LT_CONC(LT_ERROR_,name)] + +static const char objdir[] = LTDL_OBJDIR; +static const char archive_ext[] = LTDL_ARCHIVE_EXT; +#ifdef LTDL_SHLIB_EXT +static const char shlib_ext[] = LTDL_SHLIB_EXT; +#endif +#ifdef LTDL_SYSSEARCHPATH +static const char sys_search_path[] = LTDL_SYSSEARCHPATH; +#endif + + + + +/* --- MUTEX LOCKING --- */ + + +/* Macros to make it easier to run the lock functions only if they have + been registered. The reason for the complicated lock macro is to + ensure that the stored error message from the last error is not + accidentally erased if the current function doesn't generate an + error of its own. */ +#define LT_DLMUTEX_LOCK() LT_STMT_START { \ + if (lt_dlmutex_lock_func) (*lt_dlmutex_lock_func)(); \ + } LT_STMT_END +#define LT_DLMUTEX_UNLOCK() LT_STMT_START { \ + if (lt_dlmutex_unlock_func) (*lt_dlmutex_unlock_func)();\ + } LT_STMT_END +#define LT_DLMUTEX_SETERROR(errormsg) LT_STMT_START { \ + if (lt_dlmutex_seterror_func) \ + (*lt_dlmutex_seterror_func) (errormsg); \ + else lt_dllast_error = (errormsg); } LT_STMT_END +#define LT_DLMUTEX_GETERROR(errormsg) LT_STMT_START { \ + if (lt_dlmutex_seterror_func) \ + (errormsg) = (*lt_dlmutex_geterror_func) (); \ + else (errormsg) = lt_dllast_error; } LT_STMT_END + +/* The mutex functions stored here are global, and are necessarily the + same for all threads that wish to share access to libltdl. */ +static lt_dlmutex_lock *lt_dlmutex_lock_func = 0; +static lt_dlmutex_unlock *lt_dlmutex_unlock_func = 0; +static lt_dlmutex_seterror *lt_dlmutex_seterror_func = 0; +static lt_dlmutex_geterror *lt_dlmutex_geterror_func = 0; +static const char *lt_dllast_error = 0; + + +/* Either set or reset the mutex functions. Either all the arguments must + be valid functions, or else all can be NULL to turn off locking entirely. + The registered functions should be manipulating a static global lock + from the lock() and unlock() callbacks, which needs to be reentrant. */ +int +lt_dlmutex_register (lock, unlock, seterror, geterror) + lt_dlmutex_lock *lock; + lt_dlmutex_unlock *unlock; + lt_dlmutex_seterror *seterror; + lt_dlmutex_geterror *geterror; +{ + lt_dlmutex_unlock *old_unlock = unlock; + int errors = 0; + + /* Lock using the old lock() callback, if any. */ + LT_DLMUTEX_LOCK (); + + if ((lock && unlock && seterror && geterror) + || !(lock || unlock || seterror || geterror)) + { + lt_dlmutex_lock_func = lock; + lt_dlmutex_unlock_func = unlock; + lt_dlmutex_geterror_func = geterror; + } + else + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_MUTEX_ARGS)); + ++errors; + } + + /* Use the old unlock() callback we saved earlier, if any. Otherwise + record any errors using internal storage. */ + if (old_unlock) + (*old_unlock) (); + + /* Return the number of errors encountered during the execution of + this function. */ + return errors; +} + + + + +/* --- ERROR HANDLING --- */ + + +static const char **user_error_strings = 0; +static int errorcount = LT_ERROR_MAX; + +int +lt_dladderror (diagnostic) + const char *diagnostic; +{ + int errindex = 0; + int result = -1; + const char **temp = (const char **) 0; + + assert (diagnostic); + + LT_DLMUTEX_LOCK (); + + errindex = errorcount - LT_ERROR_MAX; + temp = LT_EREALLOC (const char *, user_error_strings, 1 + errindex); + if (temp) + { + user_error_strings = temp; + user_error_strings[errindex] = diagnostic; + result = errorcount++; + } + + LT_DLMUTEX_UNLOCK (); + + return result; +} + +int +lt_dlseterror (errindex) + int errindex; +{ + int errors = 0; + + LT_DLMUTEX_LOCK (); + + if (errindex >= errorcount || errindex < 0) + { + /* Ack! Error setting the error message! */ + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_ERRORCODE)); + ++errors; + } + else if (errindex < LT_ERROR_MAX) + { + /* No error setting the error message! */ + LT_DLMUTEX_SETERROR (lt_dlerror_strings[errindex]); + } + else + { + /* No error setting the error message! */ + LT_DLMUTEX_SETERROR (user_error_strings[errindex - LT_ERROR_MAX]); + } + + LT_DLMUTEX_UNLOCK (); + + return errors; +} + +static lt_ptr +lt_emalloc (size) + size_t size; +{ + lt_ptr mem = lt_dlmalloc (size); + if (size && !mem) + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); + return mem; +} + +static lt_ptr +lt_erealloc (addr, size) + lt_ptr addr; + size_t size; +{ + lt_ptr mem = lt_dlrealloc (addr, size); + if (size && !mem) + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); + return mem; +} + +static char * +lt_estrdup (str) + const char *str; +{ + char *copy = strdup (str); + if (LT_STRLEN (str) && !copy) + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); + return copy; +} + + + + +/* --- DLOPEN() INTERFACE LOADER --- */ + + +#if HAVE_LIBDL + +/* dynamic linking with dlopen/dlsym */ + +#if HAVE_DLFCN_H +# include <dlfcn.h> +#endif + +#if HAVE_SYS_DL_H +# include <sys/dl.h> +#endif + +#ifdef RTLD_GLOBAL +# define LT_GLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_GLOBAL DL_GLOBAL +# endif +#endif /* !RTLD_GLOBAL */ +#ifndef LT_GLOBAL +# define LT_GLOBAL 0 +#endif /* !LT_GLOBAL */ + +/* We may have to define LT_LAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_LAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_LAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_LAZY_OR_NOW DL_LAZY +# endif +# endif /* !RTLD_LAZY */ +#endif +#ifndef LT_LAZY_OR_NOW +# ifdef RTLD_NOW +# define LT_LAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_LAZY_OR_NOW DL_NOW +# endif +# endif /* !RTLD_NOW */ +#endif +#ifndef LT_LAZY_OR_NOW +# define LT_LAZY_OR_NOW 0 +#endif /* !LT_LAZY_OR_NOW */ + +#if HAVE_DLERROR +# define DLERROR(arg) dlerror () +#else +# define DLERROR(arg) LT_DLSTRERROR (arg) +#endif + +static lt_module +sys_dl_open (loader_data, filename) + lt_user_data loader_data; + const char *filename; +{ + lt_module module = dlopen (filename, LT_GLOBAL | LT_LAZY_OR_NOW); + + if (!module) + { + LT_DLMUTEX_SETERROR (DLERROR (CANNOT_OPEN)); + } + + return module; +} + +static int +sys_dl_close (loader_data, module) + lt_user_data loader_data; + lt_module module; +{ + int errors = 0; + + if (dlclose (module) != 0) + { + LT_DLMUTEX_SETERROR (DLERROR (CANNOT_CLOSE)); + ++errors; + } + + return errors; +} + +static lt_ptr +sys_dl_sym (loader_data, module, symbol) + lt_user_data loader_data; + lt_module module; + const char *symbol; +{ + lt_ptr address = dlsym (module, symbol); + + if (!address) + { + LT_DLMUTEX_SETERROR (DLERROR (SYMBOL_NOT_FOUND)); + } + + return address; +} + +static struct lt_user_dlloader sys_dl = + { +# ifdef NEED_USCORE + "_", +# else + 0, +# endif + sys_dl_open, sys_dl_close, sys_dl_sym, 0, 0 }; + + +#endif /* HAVE_LIBDL */ + + + +/* --- SHL_LOAD() INTERFACE LOADER --- */ + +#if HAVE_SHL_LOAD + +/* dynamic linking with shl_load (HP-UX) (comments from gmodule) */ + +#ifdef HAVE_DL_H +# include <dl.h> +#endif + +/* some flags are missing on some systems, so we provide + * harmless defaults. + * + * Mandatory: + * BIND_IMMEDIATE - Resolve symbol references when the library is loaded. + * BIND_DEFERRED - Delay code symbol resolution until actual reference. + * + * Optionally: + * BIND_FIRST - Place the library at the head of the symbol search + * order. + * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all + * unsatisfied symbols as fatal. This flag allows + * binding of unsatisfied code symbols to be deferred + * until use. + * [Perl: For certain libraries, like DCE, deferred + * binding often causes run time problems. Adding + * BIND_NONFATAL to BIND_IMMEDIATE still allows + * unresolved references in situations like this.] + * BIND_NOSTART - Do not call the initializer for the shared library + * when the library is loaded, nor on a future call to + * shl_unload(). + * BIND_VERBOSE - Print verbose messages concerning possible + * unsatisfied symbols. + * + * hp9000s700/hp9000s800: + * BIND_RESTRICTED - Restrict symbols visible by the library to those + * present at library load time. + * DYNAMIC_PATH - Allow the loader to dynamically search for the + * library specified by the path argument. + */ + +#ifndef DYNAMIC_PATH +# define DYNAMIC_PATH 0 +#endif +#ifndef BIND_RESTRICTED +# define BIND_RESTRICTED 0 +#endif + +#define LT_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH) + +static lt_module +sys_shl_open (loader_data, filename) + lt_user_data loader_data; + const char *filename; +{ + static shl_t self = (shl_t) 0; + lt_module module = shl_load (filename, LT_BIND_FLAGS, 0L); + + /* Since searching for a symbol against a NULL module handle will also + look in everything else that was already loaded and exported with + the -E compiler flag, we always cache a handle saved before any + modules are loaded. */ + if (!self) + { + lt_ptr address; + shl_findsym (&self, "main", TYPE_UNDEFINED, &address); + } + + if (!filename) + { + module = self; + } + else + { + module = shl_load (filename, LT_BIND_FLAGS, 0L); + + if (!module) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); + } + } + + return module; +} + +static int +sys_shl_close (loader_data, module) + lt_user_data loader_data; + lt_module module; +{ + int errors = 0; + + if (module && (shl_unload ((shl_t) (module)) != 0)) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); + ++errors; + } + + return errors; +} + +static lt_ptr +sys_shl_sym (loader_data, module, symbol) + lt_user_data loader_data; + lt_module module; + const char *symbol; +{ + lt_ptr address = 0; + + /* sys_shl_open should never return a NULL module handle */ + if (module == (lt_module) 0) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); + } + else if (!shl_findsym((shl_t*) &module, symbol, TYPE_UNDEFINED, &address)) + { + if (!address) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); + } + } + + return address; +} + +static struct lt_user_dlloader sys_shl = { + 0, sys_shl_open, sys_shl_close, sys_shl_sym, 0, 0 +}; + +#endif /* HAVE_SHL_LOAD */ + + + + +/* --- LOADLIBRARY() INTERFACE LOADER --- */ + +#ifdef __WINDOWS__ + +/* dynamic linking for Win32 */ + +#include <windows.h> + +/* Forward declaration; required to implement handle search below. */ +static lt_dlhandle handles; + +static lt_module +sys_wll_open (loader_data, filename) + lt_user_data loader_data; + const char *filename; +{ + lt_dlhandle cur; + lt_module module = 0; + const char *errormsg = 0; + char *searchname = 0; + char *ext; + char self_name_buf[MAX_PATH]; + + if (!filename) + { + /* Get the name of main module */ + *self_name_buf = 0; + GetModuleFileName (NULL, self_name_buf, sizeof (self_name_buf)); + filename = ext = self_name_buf; + } + else + { + ext = strrchr (filename, '.'); + } + + if (ext) + { + /* FILENAME already has an extension. */ + searchname = lt_estrdup (filename); + } + else + { + /* Append a `.' to stop Windows from adding an + implicit `.dll' extension. */ + searchname = LT_EMALLOC (char, 2+ LT_STRLEN (filename)); + if (searchname) + sprintf (searchname, "%s.", filename); + } + if (!searchname) + return 0; + +#if __CYGWIN__ + { + char wpath[MAX_PATH]; + cygwin_conv_to_full_win32_path(searchname, wpath); + module = LoadLibrary(wpath); + } +#else + module = LoadLibrary (searchname); +#endif + LT_DLFREE (searchname); + + /* libltdl expects this function to fail if it is unable + to physically load the library. Sadly, LoadLibrary + will search the loaded libraries for a match and return + one of them if the path search load fails. + + We check whether LoadLibrary is returning a handle to + an already loaded module, and simulate failure if we + find one. */ + LT_DLMUTEX_LOCK (); + cur = handles; + while (cur) + { + if (!cur->module) + { + cur = 0; + break; + } + + if (cur->module == module) + { + break; + } + + cur = cur->next; + } + LT_DLMUTEX_UNLOCK (); + + if (cur || !module) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); + module = 0; + } + + return module; +} + +static int +sys_wll_close (loader_data, module) + lt_user_data loader_data; + lt_module module; +{ + int errors = 0; + + if (FreeLibrary(module) == 0) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); + ++errors; + } + + return errors; +} + +static lt_ptr +sys_wll_sym (loader_data, module, symbol) + lt_user_data loader_data; + lt_module module; + const char *symbol; +{ + lt_ptr address = GetProcAddress (module, symbol); + + if (!address) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); + } + + return address; +} + +static struct lt_user_dlloader sys_wll = { + 0, sys_wll_open, sys_wll_close, sys_wll_sym, 0, 0 +}; + +#endif /* __WINDOWS__ */ + + + + +/* --- LOAD_ADD_ON() INTERFACE LOADER --- */ + + +#ifdef __BEOS__ + +/* dynamic linking for BeOS */ + +#include <kernel/image.h> + +static lt_module +sys_bedl_open (loader_data, filename) + lt_user_data loader_data; + const char *filename; +{ + image_id image = 0; + + if (filename) + { + image = load_add_on (filename); + } + else + { + image_info info; + int32 cookie = 0; + if (get_next_image_info (0, &cookie, &info) == B_OK) + image = load_add_on (info.name); + } + + if (image <= 0) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); + image = 0; + } + + return (lt_module) image; +} + +static int +sys_bedl_close (loader_data, module) + lt_user_data loader_data; + lt_module module; +{ + int errors = 0; + + if (unload_add_on ((image_id) module) != B_OK) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); + ++errors; + } + + return errors; +} + +static lt_ptr +sys_bedl_sym (loader_data, module, symbol) + lt_user_data loader_data; + lt_module module; + const char *symbol; +{ + lt_ptr address = 0; + image_id image = (image_id) module; + + if (get_image_symbol (image, symbol, B_SYMBOL_TYPE_ANY, address) != B_OK) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); + address = 0; + } + + return address; +} + +static struct lt_user_dlloader sys_bedl = { + 0, sys_bedl_open, sys_bedl_close, sys_bedl_sym, 0, 0 +}; + +#endif /* __BEOS__ */ + + + + +/* --- DLD_LINK() INTERFACE LOADER --- */ + + +#if HAVE_DLD + +/* dynamic linking with dld */ + +#if HAVE_DLD_H +#include <dld.h> +#endif + +static lt_module +sys_dld_open (loader_data, filename) + lt_user_data loader_data; + const char *filename; +{ + lt_module module = strdup (filename); + + if (dld_link (filename) != 0) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); + LT_DLFREE (module); + module = 0; + } + + return module; +} + +static int +sys_dld_close (loader_data, module) + lt_user_data loader_data; + lt_module module; +{ + int errors = 0; + + if (dld_unlink_by_file ((char*)(module), 1) != 0) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); + ++errors; + } + else + { + LT_DLFREE (module); + } + + return errors; +} + +static lt_ptr +sys_dld_sym (loader_data, module, symbol) + lt_user_data loader_data; + lt_module module; + const char *symbol; +{ + lt_ptr address = dld_get_func (symbol); + + if (!address) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); + } + + return address; +} + +static struct lt_user_dlloader sys_dld = { + 0, sys_dld_open, sys_dld_close, sys_dld_sym, 0, 0 +}; + +#endif /* HAVE_DLD */ + +/* --- DYLD() MACOSX/DARWIN INTERFACE LOADER --- */ +#if HAVE_DYLD + + +#if HAVE_MACH_O_DYLD_H +#if !defined(__APPLE_CC__) && !defined(__MWERKS__) && !defined(__private_extern__) +/* Is this correct? Does it still function properly? */ +#define __private_extern__ extern +#endif +# include <mach-o/dyld.h> +#endif +#include <mach-o/getsect.h> + +/* We have to put some stuff here that isn't in older dyld.h files */ +#ifndef ENUM_DYLD_BOOL +# define ENUM_DYLD_BOOL +# undef FALSE +# undef TRUE + enum DYLD_BOOL { + FALSE, + TRUE + }; +#endif +#ifndef LC_REQ_DYLD +# define LC_REQ_DYLD 0x80000000 +#endif +#ifndef LC_LOAD_WEAK_DYLIB +# define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD) +#endif +static const struct mach_header * (*ltdl_NSAddImage)(const char *image_name, unsigned long options) = 0; +static NSSymbol (*ltdl_NSLookupSymbolInImage)(const struct mach_header *image,const char *symbolName, unsigned long options) = 0; +static enum DYLD_BOOL (*ltdl_NSIsSymbolNameDefinedInImage)(const struct mach_header *image, const char *symbolName) = 0; +static enum DYLD_BOOL (*ltdl_NSMakePrivateModulePublic)(NSModule module) = 0; + +#ifndef NSADDIMAGE_OPTION_NONE +#define NSADDIMAGE_OPTION_NONE 0x0 +#endif +#ifndef NSADDIMAGE_OPTION_RETURN_ON_ERROR +#define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1 +#endif +#ifndef NSADDIMAGE_OPTION_WITH_SEARCHING +#define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2 +#endif +#ifndef NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED +#define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4 +#endif +#ifndef NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME +#define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8 +#endif +#ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND +#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0 +#endif +#ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW +#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1 +#endif +#ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY +#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY 0x2 +#endif +#ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR +#define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4 +#endif + + +static const char * +lt_int_dyld_error(othererror) + char* othererror; +{ +/* return the dyld error string, or the passed in error string if none */ + NSLinkEditErrors ler; + int lerno; + const char *errstr; + const char *file; + NSLinkEditError(&ler,&lerno,&file,&errstr); + if (!errstr || !strlen(errstr)) errstr = othererror; + return errstr; +} + +static const struct mach_header * +lt_int_dyld_get_mach_header_from_nsmodule(module) + NSModule module; +{ +/* There should probably be an apple dyld api for this */ + int i=_dyld_image_count(); + int j; + const char *modname=NSNameOfModule(module); + const struct mach_header *mh=NULL; + if (!modname) return NULL; + for (j = 0; j < i; j++) + { + if (!strcmp(_dyld_get_image_name(j),modname)) + { + mh=_dyld_get_image_header(j); + break; + } + } + return mh; +} + +static const char* lt_int_dyld_lib_install_name(mh) + const struct mach_header *mh; +{ +/* NSAddImage is also used to get the loaded image, but it only works if the lib + is installed, for uninstalled libs we need to check the install_names against + each other. Note that this is still broken if DYLD_IMAGE_SUFFIX is set and a + different lib was loaded as a result +*/ + int j; + struct load_command *lc; + unsigned long offset = sizeof(struct mach_header); + const char* retStr=NULL; + for (j = 0; j < mh->ncmds; j++) + { + lc = (struct load_command*)(((unsigned long)mh) + offset); + if (LC_ID_DYLIB == lc->cmd) + { + retStr=(char*)(((struct dylib_command*)lc)->dylib.name.offset + + (unsigned long)lc); + } + offset += lc->cmdsize; + } + return retStr; +} + +static const struct mach_header * +lt_int_dyld_match_loaded_lib_by_install_name(const char *name) +{ + int i=_dyld_image_count(); + int j; + const struct mach_header *mh=NULL; + const char *id=NULL; + for (j = 0; j < i; j++) + { + id=lt_int_dyld_lib_install_name(_dyld_get_image_header(j)); + if ((id) && (!strcmp(id,name))) + { + mh=_dyld_get_image_header(j); + break; + } + } + return mh; +} + +static NSSymbol +lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh) + const char *symbol; + const struct mach_header *mh; +{ + /* Safe to assume our mh is good */ + int j; + struct load_command *lc; + unsigned long offset = sizeof(struct mach_header); + NSSymbol retSym = 0; + const struct mach_header *mh1; + if ((ltdl_NSLookupSymbolInImage) && NSIsSymbolNameDefined(symbol) ) + { + for (j = 0; j < mh->ncmds; j++) + { + lc = (struct load_command*)(((unsigned long)mh) + offset); + if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB == lc->cmd)) + { + mh1=lt_int_dyld_match_loaded_lib_by_install_name((char*)(((struct dylib_command*)lc)->dylib.name.offset + + (unsigned long)lc)); + if (!mh1) + { + /* Maybe NSAddImage can find it */ + mh1=ltdl_NSAddImage((char*)(((struct dylib_command*)lc)->dylib.name.offset + + (unsigned long)lc), + NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED + + NSADDIMAGE_OPTION_WITH_SEARCHING + + NSADDIMAGE_OPTION_RETURN_ON_ERROR ); + } + if (mh1) + { + retSym = ltdl_NSLookupSymbolInImage(mh1, + symbol, + NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW + | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR + ); + if (retSym) break; + } + } + offset += lc->cmdsize; + } + } + return retSym; +} + +static int +sys_dyld_init() +{ + int retCode = 0; + int err = 0; + if (!_dyld_present()) { + retCode=1; + } + else { + err = _dyld_func_lookup("__dyld_NSAddImage",(unsigned long*)&ltdl_NSAddImage); + err = _dyld_func_lookup("__dyld_NSLookupSymbolInImage",(unsigned long*)&ltdl_NSLookupSymbolInImage); + err = _dyld_func_lookup("__dyld_NSIsSymbolNameDefinedInImage",(unsigned long*)&ltdl_NSIsSymbolNameDefinedInImage); + err = _dyld_func_lookup("__dyld_NSMakePrivateModulePublic",(unsigned long*)&ltdl_NSMakePrivateModulePublic); + } + return retCode; +} + +static lt_module +sys_dyld_open (loader_data, filename) + lt_user_data loader_data; + const char *filename; +{ + lt_module module = 0; + NSObjectFileImage ofi = 0; + NSObjectFileImageReturnCode ofirc; + + if (!filename) + return (lt_module)-1; + ofirc = NSCreateObjectFileImageFromFile(filename, &ofi); + switch (ofirc) + { + case NSObjectFileImageSuccess: + module = NSLinkModule(ofi, filename, + NSLINKMODULE_OPTION_RETURN_ON_ERROR + | NSLINKMODULE_OPTION_PRIVATE + | NSLINKMODULE_OPTION_BINDNOW); + NSDestroyObjectFileImage(ofi); + if (module) + ltdl_NSMakePrivateModulePublic(module); + break; + case NSObjectFileImageInappropriateFile: + if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage) + { + module = (lt_module)ltdl_NSAddImage(filename, NSADDIMAGE_OPTION_RETURN_ON_ERROR); + break; + } + default: + LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_OPEN))); + return 0; + } + if (!module) LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_OPEN))); + return module; +} + +static int +sys_dyld_close (loader_data, module) + lt_user_data loader_data; + lt_module module; +{ + int retCode = 0; + int flags = 0; + if (module == (lt_module)-1) return 0; +#ifdef __BIG_ENDIAN__ + if (((struct mach_header *)module)->magic == MH_MAGIC) +#else + if (((struct mach_header *)module)->magic == MH_CIGAM) +#endif + { + LT_DLMUTEX_SETERROR("Can not close a dylib"); + retCode = 1; + } + else + { +#if 1 +/* Currently, if a module contains c++ static destructors and it is unloaded, we + get a segfault in atexit(), due to compiler and dynamic loader differences of + opinion, this works around that. +*/ + if ((const struct section *)NULL != + getsectbynamefromheader(lt_int_dyld_get_mach_header_from_nsmodule(module), + "__DATA","__mod_term_func")) + { + flags += NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED; + } +#endif +#ifdef __ppc__ + flags += NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES; +#endif + if (!NSUnLinkModule(module,flags)) + { + retCode=1; + LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_CLOSE))); + } + } + + return retCode; +} + +static lt_ptr +sys_dyld_sym (loader_data, module, symbol) + lt_user_data loader_data; + lt_module module; + const char *symbol; +{ + lt_ptr address = 0; + NSSymbol *nssym = 0; + void *unused; + const struct mach_header *mh=NULL; + char saveError[256] = "Symbol not found"; + if (module == (lt_module)-1) + { + _dyld_lookup_and_bind(symbol,(unsigned long*)&address,&unused); + return address; + } +#ifdef __BIG_ENDIAN__ + if (((struct mach_header *)module)->magic == MH_MAGIC) +#else + if (((struct mach_header *)module)->magic == MH_CIGAM) +#endif + { + if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage) + { + mh=module; + if (ltdl_NSIsSymbolNameDefinedInImage((struct mach_header*)module,symbol)) + { + nssym = ltdl_NSLookupSymbolInImage((struct mach_header*)module, + symbol, + NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW + | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR + ); + } + } + + } + else { + nssym = NSLookupSymbolInModule(module, symbol); + } + if (!nssym) + { + strncpy(saveError, lt_int_dyld_error(LT_DLSTRERROR(SYMBOL_NOT_FOUND)), 255); + saveError[255] = 0; + if (!mh) mh=lt_int_dyld_get_mach_header_from_nsmodule(module); + nssym = lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh); + } + if (!nssym) + { + LT_DLMUTEX_SETERROR (saveError); + return NULL; + } + return NSAddressOfSymbol(nssym); +} + +static struct lt_user_dlloader sys_dyld = + { "_", sys_dyld_open, sys_dyld_close, sys_dyld_sym, 0, 0 }; + + +#endif /* HAVE_DYLD */ + + +/* --- DLPREOPEN() INTERFACE LOADER --- */ + + +/* emulate dynamic linking using preloaded_symbols */ + +typedef struct lt_dlsymlists_t +{ + struct lt_dlsymlists_t *next; + const lt_dlsymlist *syms; +} lt_dlsymlists_t; + +static const lt_dlsymlist *default_preloaded_symbols = 0; +static lt_dlsymlists_t *preloaded_symbols = 0; + +static int +presym_init (loader_data) + lt_user_data loader_data; +{ + int errors = 0; + + LT_DLMUTEX_LOCK (); + + preloaded_symbols = 0; + if (default_preloaded_symbols) + { + errors = lt_dlpreload (default_preloaded_symbols); + } + + LT_DLMUTEX_UNLOCK (); + + return errors; +} + +static int +presym_free_symlists () +{ + lt_dlsymlists_t *lists; + + LT_DLMUTEX_LOCK (); + + lists = preloaded_symbols; + while (lists) + { + lt_dlsymlists_t *tmp = lists; + + lists = lists->next; + LT_DLFREE (tmp); + } + preloaded_symbols = 0; + + LT_DLMUTEX_UNLOCK (); + + return 0; +} + +static int +presym_exit (loader_data) + lt_user_data loader_data; +{ + presym_free_symlists (); + return 0; +} + +static int +presym_add_symlist (preloaded) + const lt_dlsymlist *preloaded; +{ + lt_dlsymlists_t *tmp; + lt_dlsymlists_t *lists; + int errors = 0; + + LT_DLMUTEX_LOCK (); + + lists = preloaded_symbols; + while (lists) + { + if (lists->syms == preloaded) + { + goto done; + } + lists = lists->next; + } + + tmp = LT_EMALLOC (lt_dlsymlists_t, 1); + if (tmp) + { + memset (tmp, 0, sizeof(lt_dlsymlists_t)); + tmp->syms = preloaded; + tmp->next = preloaded_symbols; + preloaded_symbols = tmp; + } + else + { + ++errors; + } + + done: + LT_DLMUTEX_UNLOCK (); + return errors; +} + +static lt_module +presym_open (loader_data, filename) + lt_user_data loader_data; + const char *filename; +{ + lt_dlsymlists_t *lists; + lt_module module = (lt_module) 0; + + LT_DLMUTEX_LOCK (); + lists = preloaded_symbols; + + if (!lists) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_SYMBOLS)); + goto done; + } + + /* Can't use NULL as the reflective symbol header, as NULL is + used to mark the end of the entire symbol list. Self-dlpreopened + symbols follow this magic number, chosen to be an unlikely + clash with a real module name. */ + if (!filename) + { + filename = "@PROGRAM@"; + } + + while (lists) + { + const lt_dlsymlist *syms = lists->syms; + + while (syms->name) + { + if (!syms->address && strcmp(syms->name, filename) == 0) + { + module = (lt_module) syms; + goto done; + } + ++syms; + } + + lists = lists->next; + } + + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); + + done: + LT_DLMUTEX_UNLOCK (); + return module; +} + +static int +presym_close (loader_data, module) + lt_user_data loader_data; + lt_module module; +{ + /* Just to silence gcc -Wall */ + module = 0; + return 0; +} + +static lt_ptr +presym_sym (loader_data, module, symbol) + lt_user_data loader_data; + lt_module module; + const char *symbol; +{ + lt_dlsymlist *syms = (lt_dlsymlist*) module; + + ++syms; + while (syms->address) + { + if (strcmp(syms->name, symbol) == 0) + { + return syms->address; + } + + ++syms; + } + + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); + + return 0; +} + +static struct lt_user_dlloader presym = { + 0, presym_open, presym_close, presym_sym, presym_exit, 0 +}; + + + + + +/* --- DYNAMIC MODULE LOADING --- */ + + +/* The type of a function used at each iteration of foreach_dirinpath(). */ +typedef int foreach_callback_func LT_PARAMS((char *filename, lt_ptr data1, + lt_ptr data2)); + +static int foreach_dirinpath LT_PARAMS((const char *search_path, + const char *base_name, + foreach_callback_func *func, + lt_ptr data1, lt_ptr data2)); + +static int find_file_callback LT_PARAMS((char *filename, lt_ptr data, + lt_ptr ignored)); +static int find_handle_callback LT_PARAMS((char *filename, lt_ptr data, + lt_ptr ignored)); +static int foreachfile_callback LT_PARAMS((char *filename, lt_ptr data1, + lt_ptr data2)); + + +static int canonicalize_path LT_PARAMS((const char *path, + char **pcanonical)); +static int argzize_path LT_PARAMS((const char *path, + char **pargz, + size_t *pargz_len)); +static FILE *find_file LT_PARAMS((const char *search_path, + const char *base_name, + char **pdir)); +static lt_dlhandle *find_handle LT_PARAMS((const char *search_path, + const char *base_name, + lt_dlhandle *handle)); +static int find_module LT_PARAMS((lt_dlhandle *handle, + const char *dir, + const char *libdir, + const char *dlname, + const char *old_name, + int installed)); +static int free_vars LT_PARAMS((char *dlname, char *oldname, + char *libdir, char *deplibs)); +static int load_deplibs LT_PARAMS((lt_dlhandle handle, + char *deplibs)); +static int trim LT_PARAMS((char **dest, + const char *str)); +static int try_dlopen LT_PARAMS((lt_dlhandle *handle, + const char *filename)); +static int tryall_dlopen LT_PARAMS((lt_dlhandle *handle, + const char *filename)); +static int unload_deplibs LT_PARAMS((lt_dlhandle handle)); +static int lt_argz_insert LT_PARAMS((char **pargz, + size_t *pargz_len, + char *before, + const char *entry)); +static int lt_argz_insertinorder LT_PARAMS((char **pargz, + size_t *pargz_len, + const char *entry)); +static int lt_argz_insertdir LT_PARAMS((char **pargz, + size_t *pargz_len, + const char *dirnam, + struct dirent *dp)); +static int lt_dlpath_insertdir LT_PARAMS((char **ppath, + char *before, + const char *dir)); +static int list_files_by_dir LT_PARAMS((const char *dirnam, + char **pargz, + size_t *pargz_len)); +static int file_not_found LT_PARAMS((void)); + +static char *user_search_path= 0; +static lt_dlloader *loaders = 0; +static lt_dlhandle handles = 0; +static int initialized = 0; + +/* Initialize libltdl. */ +int +lt_dlinit () +{ + int errors = 0; + + LT_DLMUTEX_LOCK (); + + /* Initialize only at first call. */ + if (++initialized == 1) + { + handles = 0; + user_search_path = 0; /* empty search path */ + +#if HAVE_LIBDL + errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dl, "dlopen"); +#endif +#if HAVE_SHL_LOAD + errors += lt_dlloader_add (lt_dlloader_next (0), &sys_shl, "dlopen"); +#endif +#ifdef __WINDOWS__ + errors += lt_dlloader_add (lt_dlloader_next (0), &sys_wll, "dlopen"); +#endif +#ifdef __BEOS__ + errors += lt_dlloader_add (lt_dlloader_next (0), &sys_bedl, "dlopen"); +#endif +#if HAVE_DLD + errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dld, "dld"); +#endif +#if HAVE_DYLD + errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dyld, "dyld"); + errors += sys_dyld_init(); +#endif + errors += lt_dlloader_add (lt_dlloader_next (0), &presym, "dlpreload"); + + if (presym_init (presym.dlloader_data)) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INIT_LOADER)); + ++errors; + } + else if (errors != 0) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (DLOPEN_NOT_SUPPORTED)); + ++errors; + } + } + + LT_DLMUTEX_UNLOCK (); + + return errors; +} + +int +lt_dlpreload (preloaded) + const lt_dlsymlist *preloaded; +{ + int errors = 0; + + if (preloaded) + { + errors = presym_add_symlist (preloaded); + } + else + { + presym_free_symlists(); + + LT_DLMUTEX_LOCK (); + if (default_preloaded_symbols) + { + errors = lt_dlpreload (default_preloaded_symbols); + } + LT_DLMUTEX_UNLOCK (); + } + + return errors; +} + +int +lt_dlpreload_default (preloaded) + const lt_dlsymlist *preloaded; +{ + LT_DLMUTEX_LOCK (); + default_preloaded_symbols = preloaded; + LT_DLMUTEX_UNLOCK (); + return 0; +} + +int +lt_dlexit () +{ + /* shut down libltdl */ + lt_dlloader *loader; + int errors = 0; + + LT_DLMUTEX_LOCK (); + loader = loaders; + + if (!initialized) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SHUTDOWN)); + ++errors; + goto done; + } + + /* shut down only at last call. */ + if (--initialized == 0) + { + int level; + + while (handles && LT_DLIS_RESIDENT (handles)) + { + handles = handles->next; + } + + /* close all modules */ + for (level = 1; handles; ++level) + { + lt_dlhandle cur = handles; + int saw_nonresident = 0; + + while (cur) + { + lt_dlhandle tmp = cur; + cur = cur->next; + if (!LT_DLIS_RESIDENT (tmp)) + saw_nonresident = 1; + if (!LT_DLIS_RESIDENT (tmp) && tmp->info.ref_count <= level) + { + if (lt_dlclose (tmp)) + { + ++errors; + } + } + } + /* done if only resident modules are left */ + if (!saw_nonresident) + break; + } + + /* close all loaders */ + while (loader) + { + lt_dlloader *next = loader->next; + lt_user_data data = loader->dlloader_data; + if (loader->dlloader_exit && loader->dlloader_exit (data)) + { + ++errors; + } + + LT_DLMEM_REASSIGN (loader, next); + } + loaders = 0; + } + + done: + LT_DLMUTEX_UNLOCK (); + return errors; +} + +static int +tryall_dlopen (handle, filename) + lt_dlhandle *handle; + const char *filename; +{ + lt_dlhandle cur; + lt_dlloader *loader; + const char *saved_error; + int errors = 0; + + LT_DLMUTEX_GETERROR (saved_error); + LT_DLMUTEX_LOCK (); + + cur = handles; + loader = loaders; + + /* check whether the module was already opened */ + while (cur) + { + /* try to dlopen the program itself? */ + if (!cur->info.filename && !filename) + { + break; + } + + if (cur->info.filename && filename + && strcmp (cur->info.filename, filename) == 0) + { + break; + } + + cur = cur->next; + } + + if (cur) + { + ++cur->info.ref_count; + *handle = cur; + goto done; + } + + cur = *handle; + if (filename) + { + /* Comment out the check of file permissions using access. + This call seems to always return -1 with error EACCES. + */ + /* We need to catch missing file errors early so that + file_not_found() can detect what happened. + if (access (filename, R_OK) != 0) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); + ++errors; + goto done; + } */ + + cur->info.filename = lt_estrdup (filename); + if (!cur->info.filename) + { + ++errors; + goto done; + } + } + else + { + cur->info.filename = 0; + } + + while (loader) + { + lt_user_data data = loader->dlloader_data; + + cur->module = loader->module_open (data, filename); + + if (cur->module != 0) + { + break; + } + loader = loader->next; + } + + if (!loader) + { + LT_DLFREE (cur->info.filename); + ++errors; + goto done; + } + + cur->loader = loader; + LT_DLMUTEX_SETERROR (saved_error); + + done: + LT_DLMUTEX_UNLOCK (); + + return errors; +} + +static int +tryall_dlopen_module (handle, prefix, dirname, dlname) + lt_dlhandle *handle; + const char *prefix; + const char *dirname; + const char *dlname; +{ + int error = 0; + char *filename = 0; + size_t filename_len = 0; + size_t dirname_len = LT_STRLEN (dirname); + + assert (handle); + assert (dirname); + assert (dlname); +#ifdef LT_DIRSEP_CHAR + /* Only canonicalized names (i.e. with DIRSEP chars already converted) + should make it into this function: */ + assert (strchr (dirname, LT_DIRSEP_CHAR) == 0); +#endif + + if (dirname_len > 0) + if (dirname[dirname_len -1] == '/') + --dirname_len; + filename_len = dirname_len + 1 + LT_STRLEN (dlname); + + /* Allocate memory, and combine DIRNAME and MODULENAME into it. + The PREFIX (if any) is handled below. */ + filename = LT_EMALLOC (char, dirname_len + 1 + filename_len + 1); + if (!filename) + return 1; + + sprintf (filename, "%.*s/%s", (int) dirname_len, dirname, dlname); + + /* Now that we have combined DIRNAME and MODULENAME, if there is + also a PREFIX to contend with, simply recurse with the arguments + shuffled. Otherwise, attempt to open FILENAME as a module. */ + if (prefix) + { + error += tryall_dlopen_module (handle, + (const char *) 0, prefix, filename); + } + else if (tryall_dlopen (handle, filename) != 0) + { + ++error; + } + + LT_DLFREE (filename); + return error; +} + +static int +find_module (handle, dir, libdir, dlname, old_name, installed) + lt_dlhandle *handle; + const char *dir; + const char *libdir; + const char *dlname; + const char *old_name; + int installed; +{ + /* Try to open the old library first; if it was dlpreopened, + we want the preopened version of it, even if a dlopenable + module is available. */ + if (old_name && tryall_dlopen (handle, old_name) == 0) + { + return 0; + } + + /* Try to open the dynamic library. */ + if (dlname) + { + /* try to open the installed module */ + if (installed && libdir) + { + if (tryall_dlopen_module (handle, + (const char *) 0, libdir, dlname) == 0) + return 0; + } + + /* try to open the not-installed module */ + if (!installed) + { + if (tryall_dlopen_module (handle, dir, objdir, dlname) == 0) + return 0; + } + + /* maybe it was moved to another directory */ + { + if (tryall_dlopen_module (handle, + (const char *) 0, dir, dlname) == 0) + return 0; + } + } + + return 1; +} + + +static int +canonicalize_path (path, pcanonical) + const char *path; + char **pcanonical; +{ + char *canonical = 0; + + assert (path && *path); + assert (pcanonical); + + canonical = LT_EMALLOC (char, 1+ LT_STRLEN (path)); + if (!canonical) + return 1; + + { + size_t dest = 0; + size_t src; + for (src = 0; path[src] != LT_EOS_CHAR; ++src) + { + /* Path separators are not copied to the beginning or end of + the destination, or if another separator would follow + immediately. */ + if (path[src] == LT_PATHSEP_CHAR) + { + if ((dest == 0) + || (path[1+ src] == LT_PATHSEP_CHAR) + || (path[1+ src] == LT_EOS_CHAR)) + continue; + } + + /* Anything other than a directory separator is copied verbatim. */ + if ((path[src] != '/') +#ifdef LT_DIRSEP_CHAR + && (path[src] != LT_DIRSEP_CHAR) +#endif + ) + { + canonical[dest++] = path[src]; + } + /* Directory separators are converted and copied only if they are + not at the end of a path -- i.e. before a path separator or + NULL terminator. */ + else if ((path[1+ src] != LT_PATHSEP_CHAR) + && (path[1+ src] != LT_EOS_CHAR) +#ifdef LT_DIRSEP_CHAR + && (path[1+ src] != LT_DIRSEP_CHAR) +#endif + && (path[1+ src] != '/')) + { + canonical[dest++] = '/'; + } + } + + /* Add an end-of-string marker at the end. */ + canonical[dest] = LT_EOS_CHAR; + } + + /* Assign new value. */ + *pcanonical = canonical; + + return 0; +} + +static int +argzize_path (path, pargz, pargz_len) + const char *path; + char **pargz; + size_t *pargz_len; +{ + error_t error; + + assert (path); + assert (pargz); + assert (pargz_len); + + if ((error = argz_create_sep (path, LT_PATHSEP_CHAR, pargz, pargz_len))) + { + switch (error) + { + case ENOMEM: + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); + break; + default: + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (UNKNOWN)); + break; + } + + return 1; + } + + return 0; +} + +/* Repeatedly call FUNC with each LT_PATHSEP_CHAR delimited element + of SEARCH_PATH and references to DATA1 and DATA2, until FUNC returns + non-zero or all elements are exhausted. If BASE_NAME is non-NULL, + it is appended to each SEARCH_PATH element before FUNC is called. */ +static int +foreach_dirinpath (search_path, base_name, func, data1, data2) + const char *search_path; + const char *base_name; + foreach_callback_func *func; + lt_ptr data1; + lt_ptr data2; +{ + int result = 0; + int filenamesize = 0; + size_t lenbase = LT_STRLEN (base_name); + size_t argz_len = 0; + char *argz = 0; + char *filename = 0; + char *canonical = 0; + + LT_DLMUTEX_LOCK (); + + if (!search_path || !*search_path) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); + goto cleanup; + } + + if (canonicalize_path (search_path, &canonical) != 0) + goto cleanup; + + if (argzize_path (canonical, &argz, &argz_len) != 0) + goto cleanup; + + { + char *dir_name = 0; + while ((dir_name = argz_next (argz, argz_len, dir_name))) + { + size_t lendir = LT_STRLEN (dir_name); + + if (lendir +1 +lenbase >= filenamesize) + { + LT_DLFREE (filename); + filenamesize = lendir +1 +lenbase +1; /* "/d" + '/' + "f" + '\0' */ + filename = LT_EMALLOC (char, filenamesize); + if (!filename) + goto cleanup; + } + + assert (filenamesize > lendir); + strcpy (filename, dir_name); + + if (base_name && *base_name) + { + if (filename[lendir -1] != '/') + filename[lendir++] = '/'; + strcpy (filename +lendir, base_name); + } + + if ((result = (*func) (filename, data1, data2))) + { + break; + } + } + } + + cleanup: + LT_DLFREE (argz); + LT_DLFREE (canonical); + LT_DLFREE (filename); + + LT_DLMUTEX_UNLOCK (); + + return result; +} + +/* If FILEPATH can be opened, store the name of the directory component + in DATA1, and the opened FILE* structure address in DATA2. Otherwise + DATA1 is unchanged, but DATA2 is set to a pointer to NULL. */ +static int +find_file_callback (filename, data1, data2) + char *filename; + lt_ptr data1; + lt_ptr data2; +{ + char **pdir = (char **) data1; + FILE **pfile = (FILE **) data2; + int is_done = 0; + + assert (filename && *filename); + assert (pdir); + assert (pfile); + + if ((*pfile = fopen (filename, LT_READTEXT_MODE))) + { + char *dirend = strrchr (filename, '/'); + + if (dirend > filename) + *dirend = LT_EOS_CHAR; + + LT_DLFREE (*pdir); + *pdir = lt_estrdup (filename); + is_done = (*pdir == 0) ? -1 : 1; + } + + return is_done; +} + +static FILE * +find_file (search_path, base_name, pdir) + const char *search_path; + const char *base_name; + char **pdir; +{ + FILE *file = 0; + + foreach_dirinpath (search_path, base_name, find_file_callback, pdir, &file); + + return file; +} + +static int +find_handle_callback (filename, data, ignored) + char *filename; + lt_ptr data; + lt_ptr ignored; +{ + lt_dlhandle *handle = (lt_dlhandle *) data; + int notfound = access (filename, R_OK); + + /* Bail out if file cannot be read... */ + if (notfound) + return 0; + + /* Try to dlopen the file, but do not continue searching in any + case. */ + if (tryall_dlopen (handle, filename) != 0) + *handle = 0; + + return 1; +} + +/* If HANDLE was found return it, otherwise return 0. If HANDLE was + found but could not be opened, *HANDLE will be set to 0. */ +static lt_dlhandle * +find_handle (search_path, base_name, handle) + const char *search_path; + const char *base_name; + lt_dlhandle *handle; +{ + if (!search_path) + return 0; + + if (!foreach_dirinpath (search_path, base_name, find_handle_callback, + handle, 0)) + return 0; + + return handle; +} + +static int +load_deplibs (handle, deplibs) + lt_dlhandle handle; + char *deplibs; +{ +#if LTDL_DLOPEN_DEPLIBS + char *p, *save_search_path = 0; + int depcount = 0; + int i; + char **names = 0; +#endif + int errors = 0; + + handle->depcount = 0; + +#if LTDL_DLOPEN_DEPLIBS + if (!deplibs) + { + return errors; + } + ++errors; + + LT_DLMUTEX_LOCK (); + if (user_search_path) + { + save_search_path = lt_estrdup (user_search_path); + if (!save_search_path) + goto cleanup; + } + + /* extract search paths and count deplibs */ + p = deplibs; + while (*p) + { + if (!isspace ((int) *p)) + { + char *end = p+1; + while (*end && !isspace((int) *end)) + { + ++end; + } + + if (strncmp(p, "-L", 2) == 0 || strncmp(p, "-R", 2) == 0) + { + char save = *end; + *end = 0; /* set a temporary string terminator */ + if (lt_dladdsearchdir(p+2)) + { + goto cleanup; + } + *end = save; + } + else + { + ++depcount; + } + + p = end; + } + else + { + ++p; + } + } + + /* restore the old search path */ + LT_DLFREE (user_search_path); + user_search_path = save_search_path; + + LT_DLMUTEX_UNLOCK (); + + if (!depcount) + { + errors = 0; + goto cleanup; + } + + names = LT_EMALLOC (char *, depcount * sizeof (char*)); + if (!names) + goto cleanup; + + /* now only extract the actual deplibs */ + depcount = 0; + p = deplibs; + while (*p) + { + if (isspace ((int) *p)) + { + ++p; + } + else + { + char *end = p+1; + while (*end && !isspace ((int) *end)) + { + ++end; + } + + if (strncmp(p, "-L", 2) != 0 && strncmp(p, "-R", 2) != 0) + { + char *name; + char save = *end; + *end = 0; /* set a temporary string terminator */ + if (strncmp(p, "-l", 2) == 0) + { + size_t name_len = 3+ /* "lib" */ LT_STRLEN (p + 2); + name = LT_EMALLOC (char, 1+ name_len); + if (name) + sprintf (name, "lib%s", p+2); + } + else + name = lt_estrdup(p); + + if (!name) + goto cleanup_names; + + names[depcount++] = name; + *end = save; + } + p = end; + } + } + + /* load the deplibs (in reverse order) + At this stage, don't worry if the deplibs do not load correctly, + they may already be statically linked into the loading application + for instance. There will be a more enlightening error message + later on if the loaded module cannot resolve all of its symbols. */ + if (depcount) + { + int j = 0; + + handle->deplibs = (lt_dlhandle*) LT_EMALLOC (lt_dlhandle *, depcount); + if (!handle->deplibs) + goto cleanup; + + for (i = 0; i < depcount; ++i) + { + handle->deplibs[j] = lt_dlopenext(names[depcount-1-i]); + if (handle->deplibs[j]) + { + ++j; + } + } + + handle->depcount = j; /* Number of successfully loaded deplibs */ + errors = 0; + } + + cleanup_names: + for (i = 0; i < depcount; ++i) + { + LT_DLFREE (names[i]); + } + + cleanup: + LT_DLFREE (names); +#endif + + return errors; +} + +static int +unload_deplibs (handle) + lt_dlhandle handle; +{ + int i; + int errors = 0; + + if (handle->depcount) + { + for (i = 0; i < handle->depcount; ++i) + { + if (!LT_DLIS_RESIDENT (handle->deplibs[i])) + { + errors += lt_dlclose (handle->deplibs[i]); + } + } + } + + return errors; +} + +static int +trim (dest, str) + char **dest; + const char *str; +{ + /* remove the leading and trailing "'" from str + and store the result in dest */ + const char *end = strrchr (str, '\''); + size_t len = LT_STRLEN (str); + char *tmp; + + LT_DLFREE (*dest); + + if (len > 3 && str[0] == '\'') + { + tmp = LT_EMALLOC (char, end - str); + if (!tmp) + return 1; + + strncpy(tmp, &str[1], (end - str) - 1); + tmp[len-3] = LT_EOS_CHAR; + *dest = tmp; + } + else + { + *dest = 0; + } + + return 0; +} + +static int +free_vars (dlname, oldname, libdir, deplibs) + char *dlname; + char *oldname; + char *libdir; + char *deplibs; +{ + LT_DLFREE (dlname); + LT_DLFREE (oldname); + LT_DLFREE (libdir); + LT_DLFREE (deplibs); + + return 0; +} + +static int +try_dlopen (phandle, filename) + lt_dlhandle *phandle; + const char *filename; +{ + const char * ext = 0; + const char * saved_error = 0; + char * canonical = 0; + char * base_name = 0; + char * dir = 0; + char * name = 0; + int errors = 0; + lt_dlhandle newhandle; + + assert (phandle); + assert (*phandle == 0); + + LT_DLMUTEX_GETERROR (saved_error); + + /* dlopen self? */ + if (!filename) + { + *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); + if (*phandle == 0) + return 1; + + memset (*phandle, 0, sizeof(struct lt_dlhandle_struct)); + newhandle = *phandle; + + /* lt_dlclose()ing yourself is very bad! Disallow it. */ + LT_DLSET_FLAG (*phandle, LT_DLRESIDENT_FLAG); + + if (tryall_dlopen (&newhandle, 0) != 0) + { + LT_DLFREE (*phandle); + return 1; + } + + goto register_handle; + } + + assert (filename && *filename); + + /* Doing this immediately allows internal functions to safely + assume only canonicalized paths are passed. */ + if (canonicalize_path (filename, &canonical) != 0) + { + ++errors; + goto cleanup; + } + + /* If the canonical module name is a path (relative or absolute) + then split it into a directory part and a name part. */ + base_name = strrchr (canonical, '/'); + if (base_name) + { + size_t dirlen = (1+ base_name) - canonical; + + dir = LT_EMALLOC (char, 1+ dirlen); + if (!dir) + { + ++errors; + goto cleanup; + } + + strncpy (dir, canonical, dirlen); + dir[dirlen] = LT_EOS_CHAR; + + ++base_name; + } + else + LT_DLMEM_REASSIGN (base_name, canonical); + + assert (base_name && *base_name); + + /* Check whether we are opening a libtool module (.la extension). */ + ext = strrchr (base_name, '.'); + if (ext && strcmp (ext, archive_ext) == 0) + { + /* this seems to be a libtool module */ + FILE * file = 0; + char * dlname = 0; + char * old_name = 0; + char * libdir = 0; + char * deplibs = 0; + char * line = 0; + size_t line_len; + + /* if we can't find the installed flag, it is probably an + installed libtool archive, produced with an old version + of libtool */ + int installed = 1; + + /* extract the module name from the file name */ + name = LT_EMALLOC (char, ext - base_name + 1); + if (!name) + { + ++errors; + goto cleanup; + } + + /* canonicalize the module name */ + { + size_t i; + for (i = 0; i < ext - base_name; ++i) + { + if (isalnum ((int)(base_name[i]))) + { + name[i] = base_name[i]; + } + else + { + name[i] = '_'; + } + } + name[ext - base_name] = LT_EOS_CHAR; + } + + /* Now try to open the .la file. If there is no directory name + component, try to find it first in user_search_path and then other + prescribed paths. Otherwise (or in any case if the module was not + yet found) try opening just the module name as passed. */ + if (!dir) + { + const char *search_path; + + LT_DLMUTEX_LOCK (); + search_path = user_search_path; + if (search_path) + file = find_file (user_search_path, base_name, &dir); + LT_DLMUTEX_UNLOCK (); + + if (!file) + { + search_path = getenv (LTDL_SEARCHPATH_VAR); + if (search_path) + file = find_file (search_path, base_name, &dir); + } + +#ifdef LTDL_SHLIBPATH_VAR + if (!file) + { + search_path = getenv (LTDL_SHLIBPATH_VAR); + if (search_path) + file = find_file (search_path, base_name, &dir); + } +#endif +#ifdef LTDL_SYSSEARCHPATH + if (!file && sys_search_path) + { + file = find_file (sys_search_path, base_name, &dir); + } +#endif + } + if (!file) + { + file = fopen (filename, LT_READTEXT_MODE); + } + + /* If we didn't find the file by now, it really isn't there. Set + the status flag, and bail out. */ + if (!file) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); + ++errors; + goto cleanup; + } + + line_len = LT_FILENAME_MAX; + line = LT_EMALLOC (char, line_len); + if (!line) + { + fclose (file); + ++errors; + goto cleanup; + } + + /* read the .la file */ + while (!feof (file)) + { + if (!fgets (line, (int) line_len, file)) + { + break; + } + + /* Handle the case where we occasionally need to read a line + that is longer than the initial buffer size. */ + while ((line[LT_STRLEN(line) -1] != '\n') && (!feof (file))) + { + line = LT_DLREALLOC (char, line, line_len *2); + if (!fgets (&line[line_len -1], (int) line_len +1, file)) + { + break; + } + line_len *= 2; + } + + if (line[0] == '\n' || line[0] == '#') + { + continue; + } + +#undef STR_DLNAME +#define STR_DLNAME "dlname=" + if (strncmp (line, STR_DLNAME, sizeof (STR_DLNAME) - 1) == 0) + { + errors += trim (&dlname, &line[sizeof (STR_DLNAME) - 1]); + } + +#undef STR_OLD_LIBRARY +#define STR_OLD_LIBRARY "old_library=" + else if (strncmp (line, STR_OLD_LIBRARY, + sizeof (STR_OLD_LIBRARY) - 1) == 0) + { + errors += trim (&old_name, &line[sizeof (STR_OLD_LIBRARY) - 1]); + } +#undef STR_LIBDIR +#define STR_LIBDIR "libdir=" + else if (strncmp (line, STR_LIBDIR, sizeof (STR_LIBDIR) - 1) == 0) + { + errors += trim (&libdir, &line[sizeof(STR_LIBDIR) - 1]); + } + +#undef STR_DL_DEPLIBS +#define STR_DL_DEPLIBS "dependency_libs=" + else if (strncmp (line, STR_DL_DEPLIBS, + sizeof (STR_DL_DEPLIBS) - 1) == 0) + { + errors += trim (&deplibs, &line[sizeof (STR_DL_DEPLIBS) - 1]); + } + else if (strcmp (line, "installed=yes\n") == 0) + { + installed = 1; + } + else if (strcmp (line, "installed=no\n") == 0) + { + installed = 0; + } + +#undef STR_LIBRARY_NAMES +#define STR_LIBRARY_NAMES "library_names=" + else if (! dlname && strncmp (line, STR_LIBRARY_NAMES, + sizeof (STR_LIBRARY_NAMES) - 1) == 0) + { + char *last_libname; + errors += trim (&dlname, &line[sizeof (STR_LIBRARY_NAMES) - 1]); + if (!errors + && dlname + && (last_libname = strrchr (dlname, ' ')) != 0) + { + last_libname = lt_estrdup (last_libname + 1); + if (!last_libname) + { + ++errors; + goto cleanup; + } + LT_DLMEM_REASSIGN (dlname, last_libname); + } + } + + if (errors) + break; + } + + fclose (file); + LT_DLFREE (line); + + /* allocate the handle */ + *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); + if (*phandle == 0) + ++errors; + + if (errors) + { + free_vars (dlname, old_name, libdir, deplibs); + LT_DLFREE (*phandle); + goto cleanup; + } + + assert (*phandle); + + memset (*phandle, 0, sizeof(struct lt_dlhandle_struct)); + if (load_deplibs (*phandle, deplibs) == 0) + { + newhandle = *phandle; + /* find_module may replace newhandle */ + if (find_module (&newhandle, dir, libdir, dlname, old_name, installed)) + { + unload_deplibs (*phandle); + ++errors; + } + } + else + { + ++errors; + } + + free_vars (dlname, old_name, libdir, deplibs); + if (errors) + { + LT_DLFREE (*phandle); + goto cleanup; + } + + if (*phandle != newhandle) + { + unload_deplibs (*phandle); + } + } + else + { + /* not a libtool module */ + *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); + if (*phandle == 0) + { + ++errors; + goto cleanup; + } + + memset (*phandle, 0, sizeof (struct lt_dlhandle_struct)); + newhandle = *phandle; + + /* If the module has no directory name component, try to find it + first in user_search_path and then other prescribed paths. + Otherwise (or in any case if the module was not yet found) try + opening just the module name as passed. */ + if ((dir || (!find_handle (user_search_path, base_name, &newhandle) + && !find_handle (getenv (LTDL_SEARCHPATH_VAR), base_name, + &newhandle) +#ifdef LTDL_SHLIBPATH_VAR + && !find_handle (getenv (LTDL_SHLIBPATH_VAR), base_name, + &newhandle) +#endif +#ifdef LTDL_SYSSEARCHPATH + && !find_handle (sys_search_path, base_name, &newhandle) +#endif + ))) + { + if (tryall_dlopen (&newhandle, filename) != 0) + { + newhandle = NULL; + } + } + + if (!newhandle) + { + LT_DLFREE (*phandle); + ++errors; + goto cleanup; + } + } + + register_handle: + LT_DLMEM_REASSIGN (*phandle, newhandle); + + if ((*phandle)->info.ref_count == 0) + { + (*phandle)->info.ref_count = 1; + LT_DLMEM_REASSIGN ((*phandle)->info.name, name); + + LT_DLMUTEX_LOCK (); + (*phandle)->next = handles; + handles = *phandle; + LT_DLMUTEX_UNLOCK (); + } + + LT_DLMUTEX_SETERROR (saved_error); + + cleanup: + LT_DLFREE (dir); + LT_DLFREE (name); + LT_DLFREE (canonical); + + return errors; +} + +lt_dlhandle +lt_dlopen (filename) + const char *filename; +{ + lt_dlhandle handle = 0; + + /* Just incase we missed a code path in try_dlopen() that reports + an error, but forgets to reset handle... */ + if (try_dlopen (&handle, filename) != 0) + return 0; + + return handle; +} + +/* If the last error messge store was `FILE_NOT_FOUND', then return + non-zero. */ +static int +file_not_found () +{ + const char *error = 0; + + LT_DLMUTEX_GETERROR (error); + if (error == LT_DLSTRERROR (FILE_NOT_FOUND)) + return 1; + + return 0; +} + +/* If FILENAME has an ARCHIVE_EXT or SHLIB_EXT extension, try to + open the FILENAME as passed. Otherwise try appending ARCHIVE_EXT, + and if a file is still not found try again with SHLIB_EXT appended + instead. */ +lt_dlhandle +lt_dlopenext (filename) + const char *filename; +{ + lt_dlhandle handle = 0; + char * tmp = 0; + char * ext = 0; + size_t len; + int errors = 0; + + if (!filename) + { + return lt_dlopen (filename); + } + + assert (filename); + + len = LT_STRLEN (filename); + ext = strrchr (filename, '.'); + + /* If FILENAME already bears a suitable extension, there is no need + to try appending additional extensions. */ + if (ext && ((strcmp (ext, archive_ext) == 0) +#ifdef LTDL_SHLIB_EXT + || (strcmp (ext, shlib_ext) == 0) +#endif + )) + { + return lt_dlopen (filename); + } + + /* First try appending ARCHIVE_EXT. */ + tmp = LT_EMALLOC (char, len + LT_STRLEN (archive_ext) + 1); + if (!tmp) + return 0; + + strcpy (tmp, filename); + strcat (tmp, archive_ext); + errors = try_dlopen (&handle, tmp); + + /* If we found FILENAME, stop searching -- whether we were able to + load the file as a module or not. If the file exists but loading + failed, it is better to return an error message here than to + report FILE_NOT_FOUND when the alternatives (foo.so etc) are not + in the module search path. */ + if (handle || ((errors > 0) && !file_not_found ())) + { + LT_DLFREE (tmp); + return handle; + } + +#ifdef LTDL_SHLIB_EXT + /* Try appending SHLIB_EXT. */ + if (LT_STRLEN (shlib_ext) > LT_STRLEN (archive_ext)) + { + LT_DLFREE (tmp); + tmp = LT_EMALLOC (char, len + LT_STRLEN (shlib_ext) + 1); + if (!tmp) + return 0; + + strcpy (tmp, filename); + } + else + { + tmp[len] = LT_EOS_CHAR; + } + + strcat(tmp, shlib_ext); + errors = try_dlopen (&handle, tmp); + + /* As before, if the file was found but loading failed, return now + with the current error message. */ + if (handle || ((errors > 0) && !file_not_found ())) + { + LT_DLFREE (tmp); + return handle; + } +#endif + + /* Still here? Then we really did fail to locate any of the file + names we tried. */ + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); + LT_DLFREE (tmp); + return 0; +} + + +static int +lt_argz_insert (pargz, pargz_len, before, entry) + char **pargz; + size_t *pargz_len; + char *before; + const char *entry; +{ + error_t error; + + if ((error = argz_insert (pargz, pargz_len, before, entry))) + { + switch (error) + { + case ENOMEM: + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); + break; + default: + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (UNKNOWN)); + break; + } + return 1; + } + + return 0; +} + +static int +lt_argz_insertinorder (pargz, pargz_len, entry) + char **pargz; + size_t *pargz_len; + const char *entry; +{ + char *before = 0; + + assert (pargz); + assert (pargz_len); + assert (entry && *entry); + + if (*pargz) + while ((before = argz_next (*pargz, *pargz_len, before))) + { + int cmp = strcmp (entry, before); + + if (cmp < 0) break; + if (cmp == 0) return 0; /* No duplicates! */ + } + + return lt_argz_insert (pargz, pargz_len, before, entry); +} + +static int +lt_argz_insertdir (pargz, pargz_len, dirnam, dp) + char **pargz; + size_t *pargz_len; + const char *dirnam; + struct dirent *dp; +{ + char *buf = 0; + size_t buf_len = 0; + char *end = 0; + size_t end_offset = 0; + size_t dir_len = 0; + int errors = 0; + + assert (pargz); + assert (pargz_len); + assert (dp); + + dir_len = LT_STRLEN (dirnam); + end = dp->d_name + LT_D_NAMLEN(dp); + + /* Ignore version numbers. */ + { + char *p; + for (p = end; p -1 > dp->d_name; --p) + if (strchr (".0123456789", p[-1]) == 0) + break; + + if (*p == '.') + end = p; + } + + /* Ignore filename extension. */ + { + char *p; + for (p = end -1; p > dp->d_name; --p) + if (*p == '.') + { + end = p; + break; + } + } + + /* Prepend the directory name. */ + end_offset = end - dp->d_name; + buf_len = dir_len + 1+ end_offset; + buf = LT_EMALLOC (char, 1+ buf_len); + if (!buf) + return ++errors; + + assert (buf); + + strcpy (buf, dirnam); + strcat (buf, "/"); + strncat (buf, dp->d_name, end_offset); + buf[buf_len] = LT_EOS_CHAR; + + /* Try to insert (in order) into ARGZ/ARGZ_LEN. */ + if (lt_argz_insertinorder (pargz, pargz_len, buf) != 0) + ++errors; + + LT_DLFREE (buf); + + return errors; +} + +static int +list_files_by_dir (dirnam, pargz, pargz_len) + const char *dirnam; + char **pargz; + size_t *pargz_len; +{ + DIR *dirp = 0; + int errors = 0; + + assert (dirnam && *dirnam); + assert (pargz); + assert (pargz_len); + assert (dirnam[LT_STRLEN(dirnam) -1] != '/'); + + dirp = opendir (dirnam); + if (dirp) + { + struct dirent *dp = 0; + + while ((dp = readdir (dirp))) + if (dp->d_name[0] != '.') + if (lt_argz_insertdir (pargz, pargz_len, dirnam, dp)) + { + ++errors; + break; + } + + closedir (dirp); + } + else + ++errors; + + return errors; +} + + +/* If there are any files in DIRNAME, call the function passed in + DATA1 (with the name of each file and DATA2 as arguments). */ +static int +foreachfile_callback (dirname, data1, data2) + char *dirname; + lt_ptr data1; + lt_ptr data2; +{ + int (*func) LT_PARAMS((const char *filename, lt_ptr data)) + = (int (*) LT_PARAMS((const char *filename, lt_ptr data))) data1; + + int is_done = 0; + char *argz = 0; + size_t argz_len = 0; + + if (list_files_by_dir (dirname, &argz, &argz_len) != 0) + goto cleanup; + if (!argz) + goto cleanup; + + { + char *filename = 0; + while ((filename = argz_next (argz, argz_len, filename))) + if ((is_done = (*func) (filename, data2))) + break; + } + + cleanup: + LT_DLFREE (argz); + + return is_done; +} + + +/* Call FUNC for each unique extensionless file in SEARCH_PATH, along + with DATA. The filenames passed to FUNC would be suitable for + passing to lt_dlopenext. The extensions are stripped so that + individual modules do not generate several entries (e.g. libfoo.la, + libfoo.so, libfoo.so.1, libfoo.so.1.0.0). If SEARCH_PATH is NULL, + then the same directories that lt_dlopen would search are examined. */ +int +lt_dlforeachfile (search_path, func, data) + const char *search_path; + int (*func) LT_PARAMS ((const char *filename, lt_ptr data)); + lt_ptr data; +{ + int is_done = 0; + + if (search_path) + { + /* If a specific path was passed, search only the directories + listed in it. */ + is_done = foreach_dirinpath (search_path, 0, + foreachfile_callback, func, data); + } + else + { + /* Otherwise search the default paths. */ + is_done = foreach_dirinpath (user_search_path, 0, + foreachfile_callback, func, data); + if (!is_done) + { + is_done = foreach_dirinpath (getenv("LTDL_LIBRARY_PATH"), 0, + foreachfile_callback, func, data); + } + +#ifdef LTDL_SHLIBPATH_VAR + if (!is_done) + { + is_done = foreach_dirinpath (getenv(LTDL_SHLIBPATH_VAR), 0, + foreachfile_callback, func, data); + } +#endif +#ifdef LTDL_SYSSEARCHPATH + if (!is_done) + { + is_done = foreach_dirinpath (getenv(LTDL_SYSSEARCHPATH), 0, + foreachfile_callback, func, data); + } +#endif + } + + return is_done; +} + +int +lt_dlclose (handle) + lt_dlhandle handle; +{ + lt_dlhandle cur, last; + int errors = 0; + + LT_DLMUTEX_LOCK (); + + /* check whether the handle is valid */ + last = cur = handles; + while (cur && handle != cur) + { + last = cur; + cur = cur->next; + } + + if (!cur) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); + ++errors; + goto done; + } + + handle->info.ref_count--; + + /* Note that even with resident modules, we must track the ref_count + correctly incase the user decides to reset the residency flag + later (even though the API makes no provision for that at the + moment). */ + if (handle->info.ref_count <= 0 && !LT_DLIS_RESIDENT (handle)) + { + lt_user_data data = handle->loader->dlloader_data; + + if (handle != handles) + { + last->next = handle->next; + } + else + { + handles = handle->next; + } + + errors += handle->loader->module_close (data, handle->module); + errors += unload_deplibs(handle); + + /* It is up to the callers to free the data itself. */ + LT_DLFREE (handle->caller_data); + + LT_DLFREE (handle->info.filename); + LT_DLFREE (handle->info.name); + LT_DLFREE (handle); + + goto done; + } + + if (LT_DLIS_RESIDENT (handle)) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CLOSE_RESIDENT_MODULE)); + ++errors; + } + + done: + LT_DLMUTEX_UNLOCK (); + + return errors; +} + +lt_ptr +lt_dlsym (handle, symbol) + lt_dlhandle handle; + const char *symbol; +{ + size_t lensym; + char lsym[LT_SYMBOL_LENGTH]; + char *sym; + lt_ptr address; + lt_user_data data; + + if (!handle) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); + return 0; + } + + if (!symbol) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); + return 0; + } + + lensym = LT_STRLEN (symbol) + LT_STRLEN (handle->loader->sym_prefix) + + LT_STRLEN (handle->info.name); + + if (lensym + LT_SYMBOL_OVERHEAD < LT_SYMBOL_LENGTH) + { + sym = lsym; + } + else + { + sym = LT_EMALLOC (char, lensym + LT_SYMBOL_OVERHEAD + 1); + if (!sym) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (BUFFER_OVERFLOW)); + return 0; + } + } + + data = handle->loader->dlloader_data; + if (handle->info.name) + { + const char *saved_error; + + LT_DLMUTEX_GETERROR (saved_error); + + /* this is a libtool module */ + if (handle->loader->sym_prefix) + { + strcpy(sym, handle->loader->sym_prefix); + strcat(sym, handle->info.name); + } + else + { + strcpy(sym, handle->info.name); + } + + strcat(sym, "_LTX_"); + strcat(sym, symbol); + + /* try "modulename_LTX_symbol" */ + address = handle->loader->find_sym (data, handle->module, sym); + if (address) + { + if (sym != lsym) + { + LT_DLFREE (sym); + } + return address; + } + LT_DLMUTEX_SETERROR (saved_error); + } + + /* otherwise try "symbol" */ + if (handle->loader->sym_prefix) + { + strcpy(sym, handle->loader->sym_prefix); + strcat(sym, symbol); + } + else + { + strcpy(sym, symbol); + } + + address = handle->loader->find_sym (data, handle->module, sym); + if (sym != lsym) + { + LT_DLFREE (sym); + } + + return address; +} + +const char * +lt_dlerror () +{ + const char *error; + + LT_DLMUTEX_GETERROR (error); + LT_DLMUTEX_SETERROR (0); + + return error ? error : LT_DLSTRERROR (UNKNOWN); +} + +static int +lt_dlpath_insertdir (ppath, before, dir) + char **ppath; + char *before; + const char *dir; +{ + int errors = 0; + char *canonical = 0; + char *argz = 0; + size_t argz_len = 0; + + assert (ppath); + assert (dir && *dir); + + if (canonicalize_path (dir, &canonical) != 0) + { + ++errors; + goto cleanup; + } + + assert (canonical && *canonical); + + /* If *PPATH is empty, set it to DIR. */ + if (*ppath == 0) + { + assert (!before); /* BEFORE cannot be set without PPATH. */ + assert (dir); /* Without DIR, don't call this function! */ + + *ppath = lt_estrdup (dir); + if (*ppath == 0) + ++errors; + + return errors; + } + + assert (ppath && *ppath); + + if (argzize_path (*ppath, &argz, &argz_len) != 0) + { + ++errors; + goto cleanup; + } + + /* Convert BEFORE into an equivalent offset into ARGZ. This only works + if *PPATH is already canonicalized, and hence does not change length + with respect to ARGZ. We canonicalize each entry as it is added to + the search path, and don't call this function with (uncanonicalized) + user paths, so this is a fair assumption. */ + if (before) + { + assert (*ppath <= before); + assert (before - *ppath <= strlen (*ppath)); + + before = before - *ppath + argz; + } + + if (lt_argz_insert (&argz, &argz_len, before, dir) != 0) + { + ++errors; + goto cleanup; + } + + argz_stringify (argz, argz_len, LT_PATHSEP_CHAR); + LT_DLMEM_REASSIGN (*ppath, argz); + + cleanup: + LT_DLFREE (canonical); + LT_DLFREE (argz); + + return errors; +} + +int +lt_dladdsearchdir (search_dir) + const char *search_dir; +{ + int errors = 0; + + if (search_dir && *search_dir) + { + LT_DLMUTEX_LOCK (); + if (lt_dlpath_insertdir (&user_search_path, 0, search_dir) != 0) + ++errors; + LT_DLMUTEX_UNLOCK (); + } + + return errors; +} + +int +lt_dlinsertsearchdir (before, search_dir) + const char *before; + const char *search_dir; +{ + int errors = 0; + + if (before) + { + LT_DLMUTEX_LOCK (); + if ((before < user_search_path) + || (before >= user_search_path + LT_STRLEN (user_search_path))) + { + LT_DLMUTEX_UNLOCK (); + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_POSITION)); + return 1; + } + LT_DLMUTEX_UNLOCK (); + } + + if (search_dir && *search_dir) + { + LT_DLMUTEX_LOCK (); + if (lt_dlpath_insertdir (&user_search_path, + (char *) before, search_dir) != 0) + { + ++errors; + } + LT_DLMUTEX_UNLOCK (); + } + + return errors; +} + +int +lt_dlsetsearchpath (search_path) + const char *search_path; +{ + int errors = 0; + + LT_DLMUTEX_LOCK (); + LT_DLFREE (user_search_path); + LT_DLMUTEX_UNLOCK (); + + if (!search_path || !LT_STRLEN (search_path)) + { + return errors; + } + + LT_DLMUTEX_LOCK (); + if (canonicalize_path (search_path, &user_search_path) != 0) + ++errors; + LT_DLMUTEX_UNLOCK (); + + return errors; +} + +const char * +lt_dlgetsearchpath () +{ + const char *saved_path; + + LT_DLMUTEX_LOCK (); + saved_path = user_search_path; + LT_DLMUTEX_UNLOCK (); + + return saved_path; +} + +int +lt_dlmakeresident (handle) + lt_dlhandle handle; +{ + int errors = 0; + + if (!handle) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); + ++errors; + } + else + { + LT_DLSET_FLAG (handle, LT_DLRESIDENT_FLAG); + } + + return errors; +} + +int +lt_dlisresident (handle) + lt_dlhandle handle; +{ + if (!handle) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); + return -1; + } + + return LT_DLIS_RESIDENT (handle); +} + + + + +/* --- MODULE INFORMATION --- */ + +const lt_dlinfo * +lt_dlgetinfo (handle) + lt_dlhandle handle; +{ + if (!handle) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); + return 0; + } + + return &(handle->info); +} + +lt_dlhandle +lt_dlhandle_next (place) + lt_dlhandle place; +{ + return place ? place->next : handles; +} + +int +lt_dlforeach (func, data) + int (*func) LT_PARAMS((lt_dlhandle handle, lt_ptr data)); + lt_ptr data; +{ + int errors = 0; + lt_dlhandle cur; + + LT_DLMUTEX_LOCK (); + + cur = handles; + while (cur) + { + lt_dlhandle tmp = cur; + + cur = cur->next; + if ((*func) (tmp, data)) + { + ++errors; + break; + } + } + + LT_DLMUTEX_UNLOCK (); + + return errors; +} + +lt_dlcaller_id +lt_dlcaller_register () +{ + static lt_dlcaller_id last_caller_id = 0; + int result; + + LT_DLMUTEX_LOCK (); + result = ++last_caller_id; + LT_DLMUTEX_UNLOCK (); + + return result; +} + +lt_ptr +lt_dlcaller_set_data (key, handle, data) + lt_dlcaller_id key; + lt_dlhandle handle; + lt_ptr data; +{ + int n_elements = 0; + lt_ptr stale = (lt_ptr) 0; + int i; + + /* This needs to be locked so that the caller data can be updated + simultaneously by different threads. */ + LT_DLMUTEX_LOCK (); + + if (handle->caller_data) + while (handle->caller_data[n_elements].key) + ++n_elements; + + for (i = 0; i < n_elements; ++i) + { + if (handle->caller_data[i].key == key) + { + stale = handle->caller_data[i].data; + break; + } + } + + /* Ensure that there is enough room in this handle's caller_data + array to accept a new element (and an empty end marker). */ + if (i == n_elements) + { + lt_caller_data *temp + = LT_DLREALLOC (lt_caller_data, handle->caller_data, 2+ n_elements); + + if (!temp) + { + stale = 0; + goto done; + } + + handle->caller_data = temp; + + /* We only need this if we needed to allocate a new caller_data. */ + handle->caller_data[i].key = key; + handle->caller_data[1+ i].key = 0; + } + + handle->caller_data[i].data = data; + + done: + LT_DLMUTEX_UNLOCK (); + + return stale; +} + +lt_ptr +lt_dlcaller_get_data (key, handle) + lt_dlcaller_id key; + lt_dlhandle handle; +{ + lt_ptr result = (lt_ptr) 0; + + /* This needs to be locked so that the caller data isn't updated by + another thread part way through this function. */ + LT_DLMUTEX_LOCK (); + + /* Locate the index of the element with a matching KEY. */ + { + int i; + for (i = 0; handle->caller_data[i].key; ++i) + { + if (handle->caller_data[i].key == key) + { + result = handle->caller_data[i].data; + break; + } + } + } + + LT_DLMUTEX_UNLOCK (); + + return result; +} + + + +/* --- USER MODULE LOADER API --- */ + + +int +lt_dlloader_add (place, dlloader, loader_name) + lt_dlloader *place; + const struct lt_user_dlloader *dlloader; + const char *loader_name; +{ + int errors = 0; + lt_dlloader *node = 0, *ptr = 0; + + if ((dlloader == 0) /* diagnose null parameters */ + || (dlloader->module_open == 0) + || (dlloader->module_close == 0) + || (dlloader->find_sym == 0)) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); + return 1; + } + + /* Create a new dlloader node with copies of the user callbacks. */ + node = LT_EMALLOC (lt_dlloader, 1); + if (!node) + return 1; + + node->next = 0; + node->loader_name = loader_name; + node->sym_prefix = dlloader->sym_prefix; + node->dlloader_exit = dlloader->dlloader_exit; + node->module_open = dlloader->module_open; + node->module_close = dlloader->module_close; + node->find_sym = dlloader->find_sym; + node->dlloader_data = dlloader->dlloader_data; + + LT_DLMUTEX_LOCK (); + if (!loaders) + { + /* If there are no loaders, NODE becomes the list! */ + loaders = node; + } + else if (!place) + { + /* If PLACE is not set, add NODE to the end of the + LOADERS list. */ + for (ptr = loaders; ptr->next; ptr = ptr->next) + { + /*NOWORK*/; + } + + ptr->next = node; + } + else if (loaders == place) + { + /* If PLACE is the first loader, NODE goes first. */ + node->next = place; + loaders = node; + } + else + { + /* Find the node immediately preceding PLACE. */ + for (ptr = loaders; ptr->next != place; ptr = ptr->next) + { + /*NOWORK*/; + } + + if (ptr->next != place) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); + ++errors; + } + else + { + /* Insert NODE between PTR and PLACE. */ + node->next = place; + ptr->next = node; + } + } + + LT_DLMUTEX_UNLOCK (); + + return errors; +} + +int +lt_dlloader_remove (loader_name) + const char *loader_name; +{ + lt_dlloader *place = lt_dlloader_find (loader_name); + lt_dlhandle handle; + int errors = 0; + + if (!place) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); + return 1; + } + + LT_DLMUTEX_LOCK (); + + /* Fail if there are any open modules which use this loader. */ + for (handle = handles; handle; handle = handle->next) + { + if (handle->loader == place) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (REMOVE_LOADER)); + ++errors; + goto done; + } + } + + if (place == loaders) + { + /* PLACE is the first loader in the list. */ + loaders = loaders->next; + } + else + { + /* Find the loader before the one being removed. */ + lt_dlloader *prev; + for (prev = loaders; prev->next; prev = prev->next) + { + if (!strcmp (prev->next->loader_name, loader_name)) + { + break; + } + } + + place = prev->next; + prev->next = prev->next->next; + } + + if (place->dlloader_exit) + { + errors = place->dlloader_exit (place->dlloader_data); + } + + LT_DLFREE (place); + + done: + LT_DLMUTEX_UNLOCK (); + + return errors; +} + +lt_dlloader * +lt_dlloader_next (place) + lt_dlloader *place; +{ + lt_dlloader *next; + + LT_DLMUTEX_LOCK (); + next = place ? place->next : loaders; + LT_DLMUTEX_UNLOCK (); + + return next; +} + +const char * +lt_dlloader_name (place) + lt_dlloader *place; +{ + const char *name = 0; + + if (place) + { + LT_DLMUTEX_LOCK (); + name = place ? place->loader_name : 0; + LT_DLMUTEX_UNLOCK (); + } + else + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); + } + + return name; +} + +lt_user_data * +lt_dlloader_data (place) + lt_dlloader *place; +{ + lt_user_data *data = 0; + + if (place) + { + LT_DLMUTEX_LOCK (); + data = place ? &(place->dlloader_data) : 0; + LT_DLMUTEX_UNLOCK (); + } + else + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); + } + + return data; +} + +lt_dlloader * +lt_dlloader_find (loader_name) + const char *loader_name; +{ + lt_dlloader *place = 0; + + LT_DLMUTEX_LOCK (); + for (place = loaders; place; place = place->next) + { + if (strcmp (place->loader_name, loader_name) == 0) + { + break; + } + } + LT_DLMUTEX_UNLOCK (); + + return place; +} diff --git a/ltdl.h b/ltdl.h new file mode 100644 index 0000000..995d403 --- /dev/null +++ b/ltdl.h @@ -0,0 +1,366 @@ +/* ltdl.h -- generic dlopen functions + Copyright (C) 1998-2000 Free Software Foundation, Inc. + Originally by Thomas Tanner <tanner@ffii.org> + This file is part of GNU Libtool. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +As a special exception to the GNU Lesser General Public License, +if you distribute this file as part of a program or library that +is built using GNU libtool, you may include it under the same +distribution terms that you use for the rest of that program. + +This library 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 +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free +Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA +*/ + +/* Only include this header file once. */ +#ifndef LTDL_H +#define LTDL_H 1 + +#include <sys/types.h> /* for size_t declaration */ + + +/* --- MACROS FOR PORTABILITY --- */ + + +/* Saves on those hard to debug '\0' typos.... */ +#define LT_EOS_CHAR '\0' + +/* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations, + so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at + the end of C declarations. */ +#ifdef __cplusplus +# define LT_BEGIN_C_DECLS extern "C" { +# define LT_END_C_DECLS } +#else +# define LT_BEGIN_C_DECLS /* empty */ +# define LT_END_C_DECLS /* empty */ +#endif + +LT_BEGIN_C_DECLS + + +/* LT_PARAMS is a macro used to wrap function prototypes, so that compilers + that don't understand ANSI C prototypes still work, and ANSI C + compilers can issue warnings about type mismatches. */ +#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus) +# define LT_PARAMS(protos) protos +# define lt_ptr void* +#else +# define LT_PARAMS(protos) () +# define lt_ptr char* +#endif + +/* LT_STMT_START/END are used to create macros which expand to a + a single compound statement in a portable way. */ +#if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus) +# define LT_STMT_START (void)( +# define LT_STMT_END ) +#else +# if (defined (sun) || defined (__sun__)) +# define LT_STMT_START if (1) +# define LT_STMT_END else (void)0 +# else +# define LT_STMT_START do +# define LT_STMT_END while (0) +# endif +#endif + +/* LT_CONC creates a new concatenated symbol for the compiler + in a portable way. */ +#if defined(__STDC__) || defined(__cplusplus) || defined(_MSC_VER) +# define LT_CONC(s,t) s##t +#else +# define LT_CONC(s,t) s/**/t +#endif + +/* LT_STRLEN can be used safely on NULL pointers. */ +#define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0) + + + +/* --- WINDOWS SUPPORT --- */ + + +/* Canonicalise Windows and Cygwin recognition macros. */ +#ifdef __CYGWIN32__ +# ifndef __CYGWIN__ +# define __CYGWIN__ __CYGWIN32__ +# endif +#endif +#if defined(_WIN32) || defined(WIN32) +# ifndef __WINDOWS__ +# ifdef _WIN32 +# define __WINDOWS__ _WIN32 +# else +# ifdef WIN32 +# define __WINDOWS__ WIN32 +# endif +# endif +# endif +#endif + + +#ifdef __WINDOWS__ +# ifndef __CYGWIN__ +/* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory + separator when it is set. */ +# define LT_DIRSEP_CHAR '\\' +# define LT_PATHSEP_CHAR ';' +# endif +#endif +#ifndef LT_PATHSEP_CHAR +# define LT_PATHSEP_CHAR ':' +#endif + +/* DLL building support on win32 hosts; mostly to workaround their + ridiculous implementation of data symbol exporting. */ +#ifndef LT_SCOPE +# ifdef __WINDOWS__ +# ifdef DLL_EXPORT /* defined by libtool (if required) */ +# define LT_SCOPE __declspec(dllexport) +# endif +# ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */ +# define LT_SCOPE extern __declspec(dllimport) +# endif +# endif +# ifndef LT_SCOPE /* static linking or !__WINDOWS__ */ +# define LT_SCOPE extern +# endif +#endif + + +#if defined(_MSC_VER) /* Visual Studio */ +# define R_OK 4 +#endif + + + +/* --- DYNAMIC MODULE LOADING API --- */ + + +typedef struct lt_dlhandle_struct *lt_dlhandle; /* A loaded module. */ + +/* Initialisation and finalisation functions for libltdl. */ +LT_SCOPE int lt_dlinit LT_PARAMS((void)); +LT_SCOPE int lt_dlexit LT_PARAMS((void)); + +/* Module search path manipulation. */ +LT_SCOPE int lt_dladdsearchdir LT_PARAMS((const char *search_dir)); +LT_SCOPE int lt_dlinsertsearchdir LT_PARAMS((const char *before, + const char *search_dir)); +LT_SCOPE int lt_dlsetsearchpath LT_PARAMS((const char *search_path)); +LT_SCOPE const char *lt_dlgetsearchpath LT_PARAMS((void)); +LT_SCOPE int lt_dlforeachfile LT_PARAMS(( + const char *search_path, + int (*func) (const char *filename, lt_ptr data), + lt_ptr data)); + +/* Portable libltdl versions of the system dlopen() API. */ +LT_SCOPE lt_dlhandle lt_dlopen LT_PARAMS((const char *filename)); +LT_SCOPE lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename)); +LT_SCOPE lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle, + const char *name)); +LT_SCOPE const char *lt_dlerror LT_PARAMS((void)); +LT_SCOPE int lt_dlclose LT_PARAMS((lt_dlhandle handle)); + +/* Module residency management. */ +LT_SCOPE int lt_dlmakeresident LT_PARAMS((lt_dlhandle handle)); +LT_SCOPE int lt_dlisresident LT_PARAMS((lt_dlhandle handle)); + + + + +/* --- MUTEX LOCKING --- */ + + +typedef void lt_dlmutex_lock LT_PARAMS((void)); +typedef void lt_dlmutex_unlock LT_PARAMS((void)); +typedef void lt_dlmutex_seterror LT_PARAMS((const char *errmsg)); +typedef const char *lt_dlmutex_geterror LT_PARAMS((void)); + +LT_SCOPE int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock, + lt_dlmutex_unlock *unlock, + lt_dlmutex_seterror *seterror, + lt_dlmutex_geterror *geterror)); + + + + +/* --- MEMORY HANDLING --- */ + + +/* By default, the realloc function pointer is set to our internal + realloc implementation which iself uses lt_dlmalloc and lt_dlfree. + libltdl relies on a featureful realloc, but if you are sure yours + has the right semantics then you can assign it directly. Generally, + it is safe to assign just a malloc() and a free() function. */ +LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)); +LT_SCOPE lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size)); +LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)); + + + + +/* --- PRELOADED MODULE SUPPORT --- */ + + +/* A preopened symbol. Arrays of this type comprise the exported + symbols for a dlpreopened module. */ +typedef struct { + const char *name; + lt_ptr address; +} lt_dlsymlist; + +LT_SCOPE int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded)); +LT_SCOPE int lt_dlpreload_default + LT_PARAMS((const lt_dlsymlist *preloaded)); + +#define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \ + extern const lt_dlsymlist lt_preloaded_symbols[]; \ + lt_dlpreload_default(lt_preloaded_symbols); \ + }LT_STMT_END + + + + +/* --- MODULE INFORMATION --- */ + + +/* Read only information pertaining to a loaded module. */ +typedef struct { + char *filename; /* file name */ + char *name; /* module name */ + int ref_count; /* number of times lt_dlopened minus + number of times lt_dlclosed. */ +} lt_dlinfo; + +LT_SCOPE const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle)); +LT_SCOPE lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place)); +LT_SCOPE int lt_dlforeach LT_PARAMS(( + int (*func) (lt_dlhandle handle, lt_ptr data), + lt_ptr data)); + +/* Associating user data with loaded modules. */ +typedef unsigned lt_dlcaller_id; + +LT_SCOPE lt_dlcaller_id lt_dlcaller_register LT_PARAMS((void)); +LT_SCOPE lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key, + lt_dlhandle handle, + lt_ptr data)); +LT_SCOPE lt_ptr lt_dlcaller_get_data LT_PARAMS((lt_dlcaller_id key, + lt_dlhandle handle)); + + + +/* --- USER MODULE LOADER API --- */ + + +typedef struct lt_dlloader lt_dlloader; +typedef lt_ptr lt_user_data; +typedef lt_ptr lt_module; + +/* Function pointer types for creating user defined module loaders. */ +typedef lt_module lt_module_open LT_PARAMS((lt_user_data loader_data, + const char *filename)); +typedef int lt_module_close LT_PARAMS((lt_user_data loader_data, + lt_module handle)); +typedef lt_ptr lt_find_sym LT_PARAMS((lt_user_data loader_data, + lt_module handle, + const char *symbol)); +typedef int lt_dlloader_exit LT_PARAMS((lt_user_data loader_data)); + +struct lt_user_dlloader { + const char *sym_prefix; + lt_module_open *module_open; + lt_module_close *module_close; + lt_find_sym *find_sym; + lt_dlloader_exit *dlloader_exit; + lt_user_data dlloader_data; +}; + +LT_SCOPE lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place)); +LT_SCOPE lt_dlloader *lt_dlloader_find LT_PARAMS(( + const char *loader_name)); +LT_SCOPE const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place)); +LT_SCOPE lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place)); +LT_SCOPE int lt_dlloader_add LT_PARAMS((lt_dlloader *place, + const struct lt_user_dlloader *dlloader, + const char *loader_name)); +LT_SCOPE int lt_dlloader_remove LT_PARAMS(( + const char *loader_name)); + + + +/* --- ERROR MESSAGE HANDLING --- */ + + +/* Defining error strings alongside their symbolic names in a macro in + this way allows us to expand the macro in different contexts with + confidence that the enumeration of symbolic names will map correctly + onto the table of error strings. */ +#define lt_dlerror_table \ + LT_ERROR(UNKNOWN, "unknown error") \ + LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available") \ + LT_ERROR(INVALID_LOADER, "invalid loader") \ + LT_ERROR(INIT_LOADER, "loader initialization failed") \ + LT_ERROR(REMOVE_LOADER, "loader removal failed") \ + LT_ERROR(FILE_NOT_FOUND, "file not found") \ + LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found") \ + LT_ERROR(NO_SYMBOLS, "no symbols defined") \ + LT_ERROR(CANNOT_OPEN, "can't open the module") \ + LT_ERROR(CANNOT_CLOSE, "can't close the module") \ + LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found") \ + LT_ERROR(NO_MEMORY, "not enough memory") \ + LT_ERROR(INVALID_HANDLE, "invalid module handle") \ + LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow") \ + LT_ERROR(INVALID_ERRORCODE, "invalid errorcode") \ + LT_ERROR(SHUTDOWN, "library already shutdown") \ + LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module") \ + LT_ERROR(INVALID_MUTEX_ARGS, "invalid mutex handler registration") \ + LT_ERROR(INVALID_POSITION, "invalid search path insert position") + +/* Enumerate the symbolic error names. */ +enum { +#define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name), + lt_dlerror_table +#undef LT_ERROR + + LT_ERROR_MAX +}; + +/* These functions are only useful from inside custom module loaders. */ +LT_SCOPE int lt_dladderror LT_PARAMS((const char *diagnostic)); +LT_SCOPE int lt_dlseterror LT_PARAMS((int errorcode)); + + + + +/* --- SOURCE COMPATIBILITY WITH OLD LIBLTDL --- */ + + +#ifdef LT_NON_POSIX_NAMESPACE +# define lt_ptr_t lt_ptr +# define lt_module_t lt_module +# define lt_module_open_t lt_module_open +# define lt_module_close_t lt_module_close +# define lt_find_sym_t lt_find_sym +# define lt_dlloader_exit_t lt_dlloader_exit +# define lt_dlloader_t lt_dlloader +# define lt_dlloader_data_t lt_user_data +#endif + +LT_END_C_DECLS + +#endif /* !LTDL_H */ diff --git a/m4/Makefile.in b/m4/Makefile.in index ef2cde1..2d86c21 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -65,16 +65,27 @@ EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ PATH_SEPARATOR = @PATH_SEPARATOR@ AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +EGREP = @EGREP@ +F77 = @F77@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ HAVE_LIB = @HAVE_LIB@ +INCLTDL = @INCLTDL@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ @@ -82,16 +93,23 @@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LIB = @LIB@ +LIBADD_DL = @LIBADD_DL@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ +LIBLTDL = @LIBLTDL@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LN_S = @LN_S@ LTLIB = @LTLIB@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ MAINT = @MAINT@ MKINSTALLDIRS = @MKINSTALLDIRS@ +OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POSUB = @POSUB@ RANLIB = @RANLIB@ +RC = @RC@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ @@ -99,6 +117,7 @@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ +modexecdir = @modexecdir@ EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 subdir = m4 mkinstalldirs = $(SHELL) $(top_srcdir)/autoconf/mkinstalldirs @@ -114,6 +133,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configu $(AUTOMAKE) --gnu m4/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool uninstall-info-am: tags: TAGS TAGS: @@ -176,11 +204,11 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic mostlyclean-am +clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -distclean-am: clean-am distclean-generic +distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am @@ -206,17 +234,18 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-generic +mostlyclean-am: mostlyclean-generic mostlyclean-libtool uninstall-am: uninstall-info-am -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic uninstall uninstall-am uninstall-info-am +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/machchk.c b/machchk.c index 45655d5..3185947 100644 --- a/machchk.c +++ b/machchk.c @@ -189,15 +189,12 @@ U32 xdmg = 0; RADR fsta = 0; /* Release mainlock if held */ -#if MAX_CPU_ENGINES > 1 - /* Unlock the main storage lock if held */ if (regs->mainlock) RELEASE_MAINLOCK(regs); #if defined(FEATURE_INTERPRETIVE_EXECUTION) if(regs->sie_active && regs->guestregs->mainlock) RELEASE_MAINLOCK(regs->guestregs); #endif /*defined(FEATURE_INTERPRETIVE_EXECUTION)*/ -#endif /*MAX_CPU_ENGINES > 1*/ /* Exit SIE when active */ #if defined(FEATURE_INTERPRETIVE_EXECUTION) @@ -260,13 +257,15 @@ RADR fsta = 0; #if defined(_ARCHMODE3) #undef _GEN_ARCH - #if !defined(HAVE_STRSIGNAL) + #define _GEN_ARCH _ARCHMODE3 + #include "machchk.c" +#endif + + +#if !defined(HAVE_STRSIGNAL) char * strsignal( int sig ) { return sys_siglist[sig]; } - #endif - #define _GEN_ARCH _ARCHMODE3 - #include "machchk.c" #endif @@ -283,10 +282,10 @@ int i; { DEVBLK *dev; - if(tid == sysblk.cnsltid) + if(tid == sysblk.cnsltid || tid == sysblk.socktid) return; for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) - if (dev->tid == tid) break; + if (dev->tid == tid || dev->shrdtid == tid) break; if( dev == NULL) logmsg(_("HHCCP020E signal USR2 received for undetermined " "device\n")); diff --git a/machdep.h b/machdep.h index 1990895..9ca424f 100644 --- a/machdep.h +++ b/machdep.h @@ -13,60 +13,16 @@ /*-------------------------------------------------------------------*/ /* Intel pentiumpro/i686 */ /*-------------------------------------------------------------------*/ -#if defined(__i686__) | defined(__pentiumpro__) +#if defined(__i686__) | defined(__pentiumpro__) +#if !defined(PIC) #define FETCHIBYTE1(_ib, _inst) \ - { \ - __asm__("movzbl 1(%%esi),%%eax" : \ - "=a" (_ib) : "S" (_inst)); \ - } - -#define fetch_dw(x) fetch_dw_i686(x) -static __inline__ U64 fetch_dw_i686(void *ptr) -{ - U64 value; - __asm__ __volatile__ ( - "movl (%1),%%eax\n\t" - "movl 4(%1),%%edx\n" - "1:\t" - "movl %%eax,%%ebx\n\t" - "movl %%edx,%%ecx\n\t" - "lock cmpxchg8b (%1)\n\t" - "jnz 1b\n\t" - "bswap %%eax\n\t" - "bswap %%edx\n\t" - "xchgl %%eax,%%edx" - : "=A"(value) - : "D"(ptr) - : "bx","cx","memory"); - return value; -} - -#define store_dw(x,y) store_dw_i686(x,y) -static __inline__ void store_dw_i686(void *ptr, U64 value) -{ - U32 high,low; - low = value & 0xffffffff; - high = value >> 32; - __asm__ __volatile__ ( - "bswap %0\n\t" - "bswap %1\n\t" - "movl (%2),%%eax\n\t" - "movl 4(%2),%%edx\n" - "1:\t" - "lock cmpxchg8b (%2)\n\t" - "jnz 1b" - : /* no output */ - : "b"(high), - "c"(low), - "D"(ptr) - : "ax","dx","memory"); -} + __asm__("movzbl 1(%%esi),%%eax" : "=a" (_ib) : "S" (_inst)); #define cmpxchg1(x,y,z) cmpxchg1_i686(x,y,z) -static __inline__ int cmpxchg1_i686(BYTE *old, BYTE new, void *ptr) { +static __inline__ BYTE cmpxchg1_i686(BYTE *old, BYTE new, void *ptr) { /* returns zero on success otherwise returns 1 */ - unsigned char code; + BYTE code; __asm__ __volatile__ ( "movb (%2),%%al\n\t" "lock; cmpxchgb %b1,(%3)\n\t" @@ -81,16 +37,13 @@ static __inline__ int cmpxchg1_i686(BYTE *old, BYTE new, void *ptr) { } #define cmpxchg4(x,y,z) cmpxchg4_i686(x,y,z) -static __inline__ int cmpxchg4_i686(U32 *old, U32 new, void *ptr) { +static __inline__ BYTE cmpxchg4_i686(U32 *old, U32 new, void *ptr) { /* returns zero on success otherwise returns 1 */ - int code; + BYTE code; __asm__ __volatile__ ( "movl (%2),%%eax\n\t" - "bswap %%eax\n\t" - "bswap %1\n\t" "lock; cmpxchgl %1,(%3)\n\t" "setnz %b0\n\t" - "bswap %%eax\n\t" "movl %%eax,(%2)" : "=q"(code) : "q"(new), @@ -99,30 +52,24 @@ static __inline__ int cmpxchg4_i686(U32 *old, U32 new, void *ptr) { : "ax", "memory"); return code; } +#define HAVE_CMPXCHG #define cmpxchg8(x,y,z) cmpxchg8_i686(x,y,z) -static __inline__ int cmpxchg8_i686(U64 *old, U64 new, void *ptr) { +static __inline__ BYTE cmpxchg8_i686(U64 *old, U64 new, void *ptr) { /* returns zero on success otherwise returns 1 */ - int code; - U32 high,low; - high = new >> 32; - low = new & 0xffffffff; + BYTE code; + U32 high = new >> 32; + U32 low = new & 0xffffffff; __asm__ __volatile__ ( - "bswap %1\n\t" - "bswap %2\n\t" - "movl (%3),%%edx\n\t" - "movl 4(%3),%%eax\n\t" - "bswap %%edx\n\t" - "bswap %%eax\n\t" + "movl (%3),%%eax\n\t" + "movl 4(%3),%%edx\n\t" "lock; cmpxchg8b (%4)\n\t" "setnz %b0\n\t" - "bswap %%edx\n\t" - "bswap %%eax\n\t" - "movl %%edx,(%3)\n\t" - "movl %%eax,4(%3)" + "movl %%eax,(%3)\n\t" + "movl %%edx,4(%3)" : "=b"(code) - : "b"(high), - "c"(low), + : "b"(low), + "c"(high), "S"(old), "D"(ptr) : "ax", "dx", "memory"); @@ -135,10 +82,10 @@ static __inline__ int cmpxchg16_i686(U64 *old1, U64 *old2, U64 new1, U64 new2, v //FIXME: not smp safe; an attempt is made to minimize the number of cycles int code; union { BYTE buf[32]; U64 dw[4]; } u; - u.dw[0] = bswap_64(*old1); - u.dw[1] = bswap_64(*old2); - u.dw[2] = bswap_64(new1); - u.dw[3] = bswap_64(new2); + u.dw[0] = *old1; + u.dw[1] = *old2; + u.dw[2] = new1; + u.dw[3] = new2; __asm__ __volatile__ ( "movl %1,%0\n\t" "movl %2,%%ebx\n\t" @@ -163,12 +110,28 @@ static __inline__ int cmpxchg16_i686(U64 *old1, U64 *old2, U64 new1, U64 new2, v "D"(ptr) : "bx","cx","memory"); if (code == 1) { - *old1 = bswap_64(u.dw[0]); - *old2 = bswap_64(u.dw[1]); + *old1 = u.dw[0]; + *old2 = u.dw[1]; } return code; } +#define fetch_dw(x) fetch_dw_i686(x) +static __inline__ U64 fetch_dw_i686(void *ptr) +{ + U64 value = *(U64 *)ptr; + while ( cmpxchg8 (&value, value, (U64 *)ptr) ); + return CSWAP64 (value); +} + +#define store_dw(x,y) store_dw_i686(x,y) +static __inline__ void store_dw_i686(void *ptr, U64 value) +{ + U64 orig = *(U64 *)ptr; + while ( cmpxchg8 (&orig, CSWAP64(value), (U64 *)ptr) ); +} + +#endif /* !defined(PIC) */ #endif /* defined(__i686__) | defined(__pentiumpro__) */ /*-------------------------------------------------------------------*/ @@ -221,12 +184,12 @@ static __inline__ void store_dw(volatile void *ptr, U64 value) { #endif #ifndef cmpxchg1 -static __inline__ int cmpxchg1(BYTE *old, BYTE new, volatile void *ptr) { +static __inline__ BYTE cmpxchg1(BYTE *old, BYTE new, volatile void *ptr) { BYTE tmp; - int code; - if (*old == (tmp = *((BYTE *)ptr))) + BYTE code; + if (*old == (tmp = *(BYTE *)ptr)) { - *((BYTE *)ptr) = new; + *(BYTE *)ptr = new; code = 0; } else @@ -239,17 +202,17 @@ static __inline__ int cmpxchg1(BYTE *old, BYTE new, volatile void *ptr) { #endif #ifndef cmpxchg4 -static __inline__ int cmpxchg4(U32 *old, U32 new, volatile void *ptr) { +static __inline__ BYTE cmpxchg4(U32 *old, U32 new, volatile void *ptr) { U32 tmp; - int code; - if (CSWAP32(*old) == (tmp = *((U32 *)ptr))) + BYTE code; + if (*old == (tmp = *(U32 *)ptr)) { - *((U32 *)ptr) = CSWAP32(new); + *(U32 *)ptr = new; code = 0; } else { - *old = CSWAP32(tmp); + *old = tmp; code = 1; } return code; @@ -257,17 +220,17 @@ static __inline__ int cmpxchg4(U32 *old, U32 new, volatile void *ptr) { #endif #ifndef cmpxchg8 -static __inline__ int cmpxchg8(U64 *old, U64 new, volatile void *ptr) { +static __inline__ BYTE cmpxchg8(U64 *old, U64 new, volatile void *ptr) { U64 tmp; - int code; - if (CSWAP64(*old) == (tmp = *((U64 *)ptr))) + BYTE code; + if (*old == (tmp = *(U64 *)ptr)) { - *((U64 *)ptr) = CSWAP64(new); + *(U64 *)ptr = new; code = 0; } else { - *old = CSWAP64(tmp); + *old = tmp; code = 1; } return code; @@ -277,16 +240,16 @@ static __inline__ int cmpxchg8(U64 *old, U64 new, volatile void *ptr) { #ifndef cmpxchg16 static __inline__ int cmpxchg16(U64 *old1, U64 *old2, U64 new1, U64 new2, volatile void *ptr) { int code; - if (CSWAP64(*old1) == *((U64 *)ptr) && CSWAP64(*old2) == *((U64 *)(ptr + 8))) + if (*old1 == *(U64 *)ptr && *old2 == *(U64 *)(ptr + 8)) { - *((U64 *)ptr) = CSWAP64(new1); - *((U64 *)(ptr + 8)) = CSWAP64(new2); + *(U64 *)ptr = new1; + *(U64 *)(ptr + 8) = new2; code = 0; } else { - *old1 = CSWAP64(*((U64 *)ptr)); - *old2 = CSWAP64(*((U64 *)(ptr + 8))); + *old1 = *((U64 *)ptr); + *old2 = *((U64 *)(ptr + 8)); code = 1; } return code; diff --git a/man/Makefile.am b/man/Makefile.am new file mode 100644 index 0000000..324d87e --- /dev/null +++ b/man/Makefile.am @@ -0,0 +1,5 @@ +man_MANS = cckddiag.1 cckd.4 dasdseq.1 + +EXTRA_DIST = $(man_MANS) + + diff --git a/man/Makefile.in b/man/Makefile.in new file mode 100644 index 0000000..86f6059 --- /dev/null +++ b/man/Makefile.in @@ -0,0 +1,339 @@ +# Makefile.in generated by automake 1.6.1 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_HEADER = $(INSTALL_DATA) +transform = @program_transform_name@ +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = @host_alias@ +host_triplet = @host@ + +EXEEXT = @EXEEXT@ +OBJEXT = @OBJEXT@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AWK = @AWK@ +BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +DATADIRNAME = @DATADIRNAME@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +EGREP = @EGREP@ +F77 = @F77@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ +GENCAT = @GENCAT@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +HAVE_LIB = @HAVE_LIB@ +INCLTDL = @INCLTDL@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLBISON = @INTLBISON@ +INTLLIBS = @INTLLIBS@ +INTLOBJS = @INTLOBJS@ +INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ +LIB = @LIB@ +LIBADD_DL = @LIBADD_DL@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBLTDL = @LIBLTDL@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LN_S = @LN_S@ +LTLIB = @LTLIB@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +MAINT = @MAINT@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +OBJDUMP = @OBJDUMP@ +PACKAGE = @PACKAGE@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +RC = @RC@ +STRIP = @STRIP@ +USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +am__include = @am__include@ +am__quote = @am__quote@ +install_sh = @install_sh@ +modexecdir = @modexecdir@ +man_MANS = cckddiag.1 cckd.4 dasdseq.1 + +EXTRA_DIST = $(man_MANS) +subdir = man +mkinstalldirs = $(SHELL) $(top_srcdir)/autoconf/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +DIST_SOURCES = + +NROFF = nroff +MANS = $(man_MANS) +DIST_COMMON = Makefile.am Makefile.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu man/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +man1dir = $(mandir)/man1 +install-man1: $(man1_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(man1dir) + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ + $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ + done +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ + rm -f $(DESTDIR)$(man1dir)/$$inst; \ + done + +man4dir = $(mandir)/man4 +install-man4: $(man4_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(man4dir) + @list='$(man4_MANS) $(dist_man4_MANS) $(nodist_man4_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.4*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man4dir)/$$inst"; \ + $(INSTALL_DATA) $$file $(DESTDIR)$(man4dir)/$$inst; \ + done +uninstall-man4: + @$(NORMAL_UNINSTALL) + @list='$(man4_MANS) $(dist_man4_MANS) $(nodist_man4_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.4*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f $(DESTDIR)$(man4dir)/$$inst"; \ + rm -f $(DESTDIR)$(man4dir)/$$inst; \ + done +tags: TAGS +TAGS: + +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @for file in $(DISTFILES); do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(MANS) + +installdirs: + $(mkinstalldirs) $(DESTDIR)$(man1dir) $(DESTDIR)$(man4dir) + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: install-man + +install-exec-am: + +install-info: install-info-am + +install-man: install-man1 install-man4 + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +uninstall-am: uninstall-info-am uninstall-man + +uninstall-man: uninstall-man1 uninstall-man4 + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-man1 install-man4 \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool uninstall uninstall-am \ + uninstall-info-am uninstall-man uninstall-man1 uninstall-man4 + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/man/cckd.4 b/man/cckd.4 new file mode 100644 index 0000000..6ffa985 --- /dev/null +++ b/man/cckd.4 @@ -0,0 +1,113 @@ +.TH cckd 4 "2003-02-03" +.SH NAME +\fBcckd\fP - Hercules Compressed CKD DASD image file + +.SH DESCRIPTION +Hercules DASD image file that emulates IBM mainframe DASD devices on +a (usually) non-mainframe platform. +Specified in the Hercules configuration file (default name hercules.cnf) +to describe the DASD devices Hercules is to emulate. +Also specified as input and/or output file to several Hercules utilities. +Hercules compressed DASD devices are frequently referred to as CCKD. +Hercules uncompressed DASD devices are frequently referred to as CKD. +Hercules CKD DASD image files are largely compatible with P/390 AWS DASD files. + +.SH TECHNICAL OVERVIEW +The following provides a technical overview of CCKD internal structures. +Except as indicated below, data in the following structures is stored +in the byte order indicated by the CDEVHDR.options CCKD_BIGENDIAN bit +(the 0x02 bit). +This bit is 1 when data is big-endian byte order, 0 when data is little-endian +byte order. +.SS DEVHDR +occupies the first 512 bytes of a CKD or CCKD DASD file. +The DEVHDR contains the device type and the number of heads per cylinder. +Its contents are the same whether the DASD image is compressed (CCKD) or not (CKD). +Described by the CKDDASD_DEVHDR struct; 512 bytes in size. +.SS CDEVHDR +immediately follows the DEVHDR, and contains fields describing the number of +L1ENTs in the L1TAB, the number of L2ENTs in each L2TAB, +and anchors the free space chain. +Described by the CCKDDASD_DEVHDR struct; 512 bytes in size. +.SS L1TAB +immediately follows the CDEVHDR, and consists of L1ENT entries, each of which +points to an L2TAB. Each L1ENT is an U32 (4 bytes) offset into the CCKD DASD file. +The CDEVHDR numl1tab field describes how many L1ENTs are in the L1TAB. +L1ENTs are described by the CCKD_L1ENT typedef; the L1TAB is of variable size. +Conceptually each L1ENT describes cdevhdr.numl2tab tracks. +.SS L2TAB +is pointed to by an L1ENT, and is composed of L2ENT entries, the number of which +is described by the CDEVHDR numl2tab field; currently 256 L2ENTs in each L2TAB. +L2ENTs contain the offset to the TRKHDR, and the combined length of the TRKHDR +and (optionally) compressed track data. +The CDEVHDR numl2tab field describes how many L2ENTs are in each L2TAB. +Currently, there are 256 L2ENTs in each L2TAB. +Described by the CCKD_L2ENT struct; (256 * 8) bytes in size. +Conceptually each L2ENT describes one track. +.SS FREEBLK +describes free space in the CCKD DASD image, anchored by the CDEVHDR free field. +Consists of a 4 byte offset to the next free space (or zero for end of free +space chain), and a 4 byte length of the free space (which length includes +the 8 bytes occupied by the FREEBLK itself), followed by zero or more +bytes of residual data. +Described by the first 8 bytes of the CCKD_FREEBLK struct; 8 bytes in size. +.SS TRKHDR +Occurs once at the beginning of each track. +contains flag (one byte), CC (two bytes), and HH (two bytes) of the track. +When the flag byte = 0x00, TRKHDR is the same as the Home Address on real DASD. +Flag bits are described in hercules.h, and are of the format nlllllcc where +n=1 for new track header format, lllll is used for track recovery purposes, +and cc describes the track compression algorithm. +The compression algorithms are: B'00' = uncompressed, B'01' = zlib, +B'10' = bzip2, B'11' is currently invalid. +Data in TRKHDR is stored in big-endian byte order. +Described by the CKDDASD_TRKHDR struct; 5 bytes in size. +.SS COUNT field +8 bytes, containing CC (two bytes), HH (two bytes), R (one byte), KL (one byte), +and DL (two bytes). +CC is the (relative zero) cylinder number. +HH is the (relative zero) head number. +R is the (relative zero) record number on the track. +KL is the key length; if zero no key is present. +DL is the length of the data record. +Data in the COUNT field is stored in big-endian byte order. +Described by the CKDDASD_RECHDR struct; 8 bytes in size. +.SS KEY field +if present, KL bytes of record key; immediately follows the COUNT field. +Byte order is not a factor for the KEY field; to the extent it is +examined by Hercules code it is simply a byte stream. +Size varies. +.SS DATA field. +if present, DL bytes of record data; immediately follows the KEY field for +keyed record, else immediately follows the COUNT field for unkeyed records. +Byte order is not a factor for the DATA field; to the extent it is +examined by Hercules code it is simply a byte stream. +Size varies. + +.SH GLOSSARY +.SS CKD +Count, Key, Data - contents of an track. +Also refers to the Hercules uncompressed DASD image file. +.SS CCKD +Compressed Count, Key, Data - compressed contents of a track. +Also refers to the Hercules compressed DASD image file. +.SS DASD +Direct Access Storage Device - term the IBM mainframe world uses to +refer to hard drives. +.SS EOT +End Of Track - indicated by 8X'FF' in the COUNT field. + +.SH "SEE ALSO" +.TP +\fBhttp://www.conmicro.cx/hercules/\fP the Hercules emulator homepage. +.TP +\fBhttp://www.conmicro.cx/hercules/cckddasd.html\fP which describes +the Hercules CCKD DASD facility. +.TP +\fBhttp://www.conmicro.cx/hercules/hercconf.html\fP which describes +the Hercules configuration file. + +.SH HISTORY +2003-02-07 originally written by James M. Morrison + + diff --git a/man/cckddiag.1 b/man/cckddiag.1 new file mode 100644 index 0000000..d198cbd --- /dev/null +++ b/man/cckddiag.1 @@ -0,0 +1,86 @@ +.TH cckddiag 1 "2003-02-03" +.SH NAME +\fBcckddiag\fP - Hercules CCKD DASD diagnostic tool + +.SH SYNOPSIS +\fBcckddiag\fP [options...] \fBfilename\fP + +.SH DESCRIPTION +Hercules support tool used to assist in the diagnosis of CCKD DASD problems. +Operates on Hercules CCKD DASD volumes in read-only mode, and displays +various information contained in CCKD DASD files. Effective usage requires +internal knowledge of Hercules CCKD DASD files. + +.SH OPTIONS +The following options are used to specify which portions of the CCKD DASD +file are to be displayed. Options may not be combined; for example, -cd1 +is not a valid option. Surround each option by blank(s). + +Argument numbers may be specified either in decimal or hexadecimal. +If the number begins with the characters 0x the number is presumed to be +hexadecimal; else the number is presumed to be decimal. +No numeric overflow checking is done, the user is assumed (!) to know +what they're doing. + +Options are divided into three categories: \fBglobal options\fP, \fBtrack-related +options\fP, and \fBthe offset option\fP. + +.SH Global options + +.SS filename +specifies the Hercules CCKD DASD filename (sometimes referred to as the +DASD image file) +.SS -v +display version and exit +.SS -d +display DEVHDR +.SS -c +display CDEVHDR +.SS -1 +display L1TAB (note this option is a numeric one) +.SS -g +enable debug output + +.SH Track-related options + +To direct cckddiag to a specific track, two options are provided: -a and -r. +The remaining track-related options describe the kind of output desired. +The TRKHDR for the track is displayed for all track-related options. +.SS -a cc hh +display \fBabsolute\fP CCHH data - where \fBcc\fP and \fBhh\fP are respectively the +cylinder number (relative zero), and the head number (relative zero). +.SS -r tt +display \fBrelative\fP track data - where \fBtt\fP is the track number +(relative zero). +.SS -2 +display L2TAB - requires a corresponding -a or -r specification to direct +cckddiag to a specific track. +.SS -t +display track data - displays the COUNT, KEY, and DATA record summaries +for the data residing on the indicated track. +.SS -x +hex display track key/data - displays the KEY and DATA records' contents in +hexadecimal display format for the indicated track. +Some repetitive data may be omitted from the hex display output. + +.SH Offset option + +This option provides the ability to examine any portion of the CCKD file, +as an alternative to track specification. +.SS -o oo ll +hex display data at offset \fBoo\fP of length \fBll\fP. + +.SH "SEE ALSO" +.TP +cckd(4) +.TP +http://www.conmicro.cx/hercules/ the Hercules emulator homepage. +.TP +http://www.conmicro.cx/hercules/cckddasd.html which describes +the Hercules CCKD DASD facility. + +.SH HISTORY +2003-02-07 originally written by James M. Morrison + + + diff --git a/man/dasdseq.1 b/man/dasdseq.1 new file mode 100644 index 0000000..fd77f12 --- /dev/null +++ b/man/dasdseq.1 @@ -0,0 +1,141 @@ +.TH dasdseq 1 "2003-03-10" +.SH NAME +\fBdasdseq\fP - Hercules DSORG=PS retrieval command + +.SH SYNOPSIS +\fBdasdseq\fP [options...] \fBimage \fP[sf=shadow] \fBfilespec\fP +.br +\fBdasdseq \fP[-debug] [-expert] [-ascii] \fBimage \fP[sf=shadow] [attr] \fBfilespec \fP[debugopts] [ascii] + +.SH DESCRIPTION +Hercules command to retrieve a DSORG=PS (sequential) dataset from +CKD/CCKD DASD. The dataset is presumed to be encoded in EBCDIC. +The second form of the command is for 'expert mode' users, and allows more +advanced access to data on the DASD image. + +.SH OPTIONS +The following options are used to specify dasdseq behavior. +Surround each option by blank(s). +Options are divided into three categories: \fBrequired, optional, +and expert mode operands.\fP + +.SH Required operands + +.SS image +specifies the Hercules CKD/CCKD DASD filename (sometimes referred to as the +DASD image file) +.SS filespec +dataset name of the file to retrieve. Case insensitive, converted to upper +case for searching VTOC on image DASD volume. + +.SH Optional operands + +.SS sf=shadow +For CCKD images which also use shadow files, specifies the [path/]filename +of the shadow file. Note the sf=, which must be present for this option. + +.SS -ascii +convert the output file to ASCII (from EBCDIC). +Additionally, trailing blanks are trimmed. +The 'ascii' option (no leading dash) is deprecated, and may be removed in a +future release. + +.SH Expert mode operands +All expert mode operands are considered to be experimental. + +\fB dasdseq [-debug] [-expert] [-ascii] image [sf=shadow] [attr] filespec [debugopts]\fP + +.SS -debug +Additional debug options are displayed. +Specifying -debug will (eventually) display dataset extent information. + +.SS attr +dataset attributes (only useful with -abs) + +\fB[-recfm fb] [-lrecl aa]\fP + +-recfm designates RECFM, reserved for future support + +fb - fixed, blocked (only RECFM currently supported) + +-lrecl designates dataset LRECL + +aa - decimal logical record length (default 80) + +Blocksize need not be specified; dasdseq handles whatever +block size comes off the volume. + +.SS filespec +composed of the following sub-operands, in the following order: +\fBheads, abs, filename.\fP + +.SS -heads xx +defines # tracks per cylinder on device; +xx = decimal number of heads per cylinder on device + +.SS -abs cc hh tt [...] [-abs cc hh tt] + +-abs indicates the beginning of each extent's location in terms of +absolute dasd image location. + +cc - decimal cylinder number (relative zero) + +hh - decimal head number (relative zero) + +tt - decimal number of tracks in extent + +When -abs is specified, each -abs group specifies one dataset extent. +For multi-extent datasets, -abs groups may be repeated as needed, +in the order in which the dataset's extents occur. +A maximum of 123 extents are supported. +With -abs, no VTOC structure is implied; a F1 DSCB will not be sought. +Dasdseq will frequently report 'track not found in extent table' +(along with a message from fbcopy about rc -1 from convert_tt) +due to potentially missing EOF markers in the extent, and the +fact that the F1 DSCB DS1LSTAR field is not valid. +Check your output file before you panic. +Fbcopy -abs ignores EOF, in case you are attempting to recovery PDS +member(s) from a damaged dasd volume, preferring to wait until +all tracks in the extent have been processed. +Tracks containing PDS members may have more than one EOF per track. +Expect a lot of associated manual effort with -abs. + +When -abs is -not- specified, filename specifies the MVS DSORG=PS dataset +on the volume. +The dasd image volume containing the dataset must have a valid VTOC +structure, and a F1 DSCB describing the dataset. + +.SS filename +will be the filename of the output file in the current directory; +output filename in the same case as the command line filename. + +.SS debugopts +Produces debugging output, refer to the source code. + +\fBverbose [x [y [z]]]\fP + +verbose debug output level (default = 0 when not specified). +Higher numbers produce more output. + +x main program (default = 1 when verbose specified) + +y copyfile + showf1 + +z dasdutil + +.SH "SEE ALSO" +.TP +dasdpdsu for DSORG=PO datasets +.TP +cckd(4) for CCKD DASD +.TP +http://www.conmicro.cx/hercules/cckddasd.html which describes +the Hercules CCKD DASD facility. +.TP +http://www.conmicro.cx/hercules/ the Hercules emulator homepage. + +.SH HISTORY +2003-03-10 originally written by James M. Morrison + + + diff --git a/memrchr.c b/memrchr.c new file mode 100644 index 0000000..ea9b763 --- /dev/null +++ b/memrchr.c @@ -0,0 +1,30 @@ +/************************************************************************/ +/* */ +/* memrchr -- Right to Left memory scan */ +/* */ +/* This function seems to be missing in Cygwin. If, at some later */ +/* time, it gets added to Cygwin, memrchr.[ch] can be removed from */ +/* the CVS repository */ +/* */ +/************************************************************************/ + +#include "memrchr.h" +#include <string.h> + +void *memrchr(const void *buf, int c, size_t num) +{ + unsigned char *pMem; + if (num == 0) + { + return NULL; + } + for (pMem = (unsigned char *) buf + num - 1; pMem >= (unsigned char *) buf; pMem--) + { + if (*pMem == (unsigned char) c) break; + } + if (pMem >= (unsigned char *) buf) + { + return ((void *) pMem); + } + return NULL; +} diff --git a/memrchr.h b/memrchr.h new file mode 100644 index 0000000..11ac5ae --- /dev/null +++ b/memrchr.h @@ -0,0 +1,25 @@ +/************************************************************************/ +/* */ +/* memrchr -- Right to Left memory scan */ +/* */ +/* Scans the memory block and reports the last occurrence of */ +/* the specified byte in the buffer. Returns a pointer to */ +/* the byte if found, or NULL if not found. */ +/* */ +/************************************************************************/ + +#ifndef MEMRCHR_H +#define MEMRCHR_H + +#include <string.h> + +#ifdef __cplusplus +extern "C" { +#endif /*__cplusplus*/ +void *memrchr(const void *buf, int c, size_t num); + +#ifdef __cplusplus +} +#endif /*__cplusplus*/ + +#endif /*MEMRCHR_H*/ diff --git a/opcode.c b/opcode.c index 9c3fa86..7caf562 100644 --- a/opcode.c +++ b/opcode.c @@ -352,6 +352,18 @@ #endif /*!defined(FEATURE_FPS_EXTENSIONS)*/ +#if !defined(FEATURE_HFP_MULTIPLY_ADD_SUBTRACT) + UNDEF_INST(multiply_add_float_short_reg) + UNDEF_INST(multiply_add_float_long_reg) + UNDEF_INST(multiply_add_float_short) + UNDEF_INST(multiply_add_float_long) + UNDEF_INST(multiply_subtract_float_short_reg) + UNDEF_INST(multiply_subtract_float_long_reg) + UNDEF_INST(multiply_subtract_float_short) + UNDEF_INST(multiply_subtract_float_long) +#endif /*!defined(FEATURE_HFP_MULTIPLY_ADD_SUBTRACT)*/ + + #if !defined(FEATURE_BINARY_FLOATING_POINT) UNDEF_INST(store_fpc) UNDEF_INST(load_fpc) @@ -384,7 +396,7 @@ UNDEF_INST(convert_fix64_to_bfp_long_reg); UNDEF_INST(convert_fix64_to_bfp_short_reg); UNDEF_INST(convert_bfp_long_to_fix64_reg); - UNDEF_INST(convert_bfp_short_to_fix64_reg); + UNDEF_INST(convert_bfp_short_to_fix64_reg); UNDEF_INST(divide_bfp_ext_reg) UNDEF_INST(divide_bfp_long) UNDEF_INST(divide_bfp_long_reg) @@ -471,6 +483,11 @@ #endif /*!defined(FEATURE_IO_ASSIST)*/ +#if !defined(FEATURE_QUEUED_DIRECT_IO) + UNDEF_INST(signal_adapter) +#endif /*!defined(FEATURE_QUEUED_DIRECT_IO)*/ + + #if !defined(FEATURE_CHANNEL_SWITCHING) UNDEF_INST(connect_channel_set) UNDEF_INST(disconnect_channel_set) @@ -552,6 +569,108 @@ #endif /*!defined(FEATURE_CANCEL_IO_FACILITY)*/ +#if !defined(FEATURE_ECPSVM) + UNDEF_INST(ecpsvm_basic_freex); + UNDEF_INST(ecpsvm_basic_fretx); + UNDEF_INST(ecpsvm_lock_page); + UNDEF_INST(ecpsvm_unlock_page); + UNDEF_INST(ecpsvm_decode_next_ccw); + UNDEF_INST(ecpsvm_free_ccwstor); + UNDEF_INST(ecpsvm_locate_vblock); + UNDEF_INST(ecpsvm_disp1); + UNDEF_INST(ecpsvm_tpage); + UNDEF_INST(ecpsvm_tpage_lock); + UNDEF_INST(ecpsvm_inval_segtab); + UNDEF_INST(ecpsvm_inval_ptable); + UNDEF_INST(ecpsvm_decode_first_ccw); + UNDEF_INST(ecpsvm_dispatch_main); + UNDEF_INST(ecpsvm_locate_rblock); + UNDEF_INST(ecpsvm_comm_ccwproc); + UNDEF_INST(ecpsvm_unxlate_ccw); + UNDEF_INST(ecpsvm_disp2); + UNDEF_INST(ecpsvm_store_level); + UNDEF_INST(ecpsvm_loc_chgshrpg); + UNDEF_INST(ecpsvm_extended_freex); + UNDEF_INST(ecpsvm_extended_fretx); + UNDEF_INST(ecpsvm_prefmach_assist); +#endif /*!defined(FEATURE_ECPSVM)*/ + + +#if !defined(FEATURE_LONG_DISPLACEMENT) + UNDEF_INST(add_y) + UNDEF_INST(add_halfword_y) + UNDEF_INST(add_logical_y) + UNDEF_INST(and_immediate_y) + UNDEF_INST(and_y) + UNDEF_INST(compare_y) + UNDEF_INST(compare_and_swap_y) + UNDEF_INST(compare_double_and_swap_y) + UNDEF_INST(compare_halfword_y) + UNDEF_INST(compare_logical_y) + UNDEF_INST(compare_logical_immediate_y) + UNDEF_INST(compare_logical_characters_under_mask_y) + UNDEF_INST(convert_to_binary_y) + UNDEF_INST(convert_to_decimal_y) + UNDEF_INST(exclusive_or_immediate_y) + UNDEF_INST(exclusive_or_y) + UNDEF_INST(insert_character_y) + UNDEF_INST(insert_characters_under_mask_y) + UNDEF_INST(load_y) + UNDEF_INST(load_address_y) + UNDEF_INST(load_byte) + UNDEF_INST(load_byte_long) + UNDEF_INST(load_halfword_y) + UNDEF_INST(load_multiple_y) + UNDEF_INST(load_real_address_y) + UNDEF_INST(move_immediate_y) + UNDEF_INST(multiply_single_y) + UNDEF_INST(or_immediate_y) + UNDEF_INST(or_y) + UNDEF_INST(store_y) + UNDEF_INST(store_character_y) + UNDEF_INST(store_characters_under_mask_y) + UNDEF_INST(store_halfword_y) + UNDEF_INST(store_multiple_y) + UNDEF_INST(subtract_y) + UNDEF_INST(subtract_halfword_y) + UNDEF_INST(subtract_logical_y) + UNDEF_INST(test_under_mask_y) +#endif /*!defined(FEATURE_LONG_DISPLACEMENT)*/ + + +#if !defined(FEATURE_LONG_DISPLACEMENT) \ + || !defined(FEATURE_ACCESS_REGISTERS) + UNDEF_INST(load_access_multiple_y) + UNDEF_INST(store_access_multiple_y) +#endif /*!defined(FEATURE_LONG_DISPLACEMENT) + || !defined(FEATURE_ACCESS_REGISTERS)*/ + + +#if !defined(FEATURE_LONG_DISPLACEMENT) \ + || !defined(FEATURE_HEXADECIMAL_FLOATING_POINT) + UNDEF_INST(load_float_long_y) + UNDEF_INST(load_float_short_y) + UNDEF_INST(store_float_long_y) + UNDEF_INST(store_float_short_y) +#endif /*!defined(FEATURE_LONG_DISPLACEMENT) + || !defined(FEATURE_HEXADECIMAL_FLOATING_POINT)*/ + + +#if !defined(FEATURE_MESSAGE_SECURITY_ASSIST) + UNDEF_INST(cipher_message_r) + UNDEF_INST(cipher_message_with_chaining_r) + UNDEF_INST(compute_intermediate_message_digest_r) + UNDEF_INST(compute_last_message_digest_r) + UNDEF_INST(compute_message_authentication_code_r) +#endif /*!defined(FEATURE_MESSAGE_SECURITY_ASSIST)*/ + + +#if !defined(FEATURE_DAT_ENHANCEMENT) + UNDEF_INST(compare_and_swap_and_purge_long) + UNDEF_INST(invalidate_dat_table_entry) +#endif /*!defined(FEATURE_DAT_ENHANCEMENT)*/ + + /* The following execute_xxxx routines can be optimized by the compiler to an indexed jump, leaving the stack frame untouched as the called routine has the same arguments, and the routine @@ -593,6 +712,10 @@ DEF_INST(execute_e5xx) opcode_e5xx[inst[1]][ARCH_MODE](inst, execflag, regs); } +DEF_INST(execute_e6xx) +{ + opcode_e6xx[inst[1]][ARCH_MODE](inst, execflag, regs); +} #if defined(FEATURE_ESAME) || defined(FEATURE_ESAME_N3_ESA390) DEF_INST(execute_a5xx) @@ -722,6 +845,7 @@ DISASM_ROUTE(b9xx,[1]); DISASM_ROUTE(c0xx,[1] & 0x0F); DISASM_ROUTE(e3xx,[5]); DISASM_ROUTE(e5xx,[1]); +DISASM_ROUTE(e6xx,[1]); DISASM_ROUTE(ebxx,[5]); DISASM_ROUTE(ecxx,[5]); DISASM_ROUTE(edxx,[5]); @@ -824,6 +948,16 @@ int r1,x2,b2,d2; logmsg("%-6.6s%d,%d(%d,%d)\n",mnemonic,r1,d2,x2,b2); } +void disasm_RXY (BYTE inst[], BYTE mnemonic[]) +{ +int r1,x2,b2,d2; + r1 = inst[1] >> 4; + x2 = inst[1] & 0x0F; + b2 = inst[2] >> 4; + d2 = (((S8)inst[4]) << 12) | (inst[2] & 0x0F) << 8 | inst[3]; + logmsg("%-6.6s%d,%d(%d,%d)\n",mnemonic,r1,d2,x2,b2); +} + void disasm_RXF (BYTE inst[], BYTE mnemonic[]) { int r1,r3,x2,b2,d2; @@ -855,6 +989,16 @@ int r1,r3,b2,d2; logmsg("%-6.6s%d,%d,%d(%d)\n",mnemonic,r1,r3,d2,b2); } +void disasm_RSY (BYTE inst[], BYTE mnemonic[]) +{ +int r1,r3,b2,d2; + r1 = inst[1] >> 4; + r3 = inst[1] & 0x0F; + b2 = inst[2] >> 4; + d2 = (((S8)inst[4]) << 12) | (inst[2] & 0x0F) << 8 | inst[3]; + logmsg("%-6.6s%d,%d,%d(%d)\n",mnemonic,r1,r3,d2,b2); +} + void disasm_RSL (BYTE inst[], BYTE mnemonic[]) { int l1,b1,d1; @@ -916,6 +1060,15 @@ int i2,b1,d1; logmsg("%-6.6s%d(%d),%d\n",mnemonic,d1,b1,i2); } +void disasm_SIY (BYTE inst[], BYTE mnemonic[]) +{ +int i2,b1,d1; + i2 = inst[1]; + b1 = inst[2] >> 4; + d1 = (((S8)inst[4]) << 12) | (inst[2] & 0x0F) << 8 | inst[3]; + logmsg("%-6.6s%d(%d),%d\n",mnemonic,d1,b1,i2); +} + void disasm_S (BYTE inst[], BYTE mnemonic[]) { int d2,b2; @@ -1261,7 +1414,7 @@ zz_func opcode_table[256][GEN_MAXARCH] = { /*E3*/ GENx___x390x900 (execute_e3xx,e3xx,""), /*E4*/ GENx370x390x___ (execute_e4xx,e4xx,""), /*E5*/ GENx370x390x900 (execute_e5xx,e5xx,""), - /*E6*/ GENx___x___x___ , + /*E6*/ GENx370x___x___ (execute_e6xx,e6xx,""), /*E7*/ GENx___x___x___ , /*E8*/ GENx370x390x900 (move_inverse,SS_L,"MVCIN"), /*E9*/ GENx___x390x900 (pack_ascii,SS_L,"PKA"), @@ -1968,7 +2121,7 @@ zz_func opcode_b2xx[256][GEN_MAXARCH] = { /*B271*/ GENx___x___x___ , /*%STPCS */ /*B272*/ GENx___x___x___ , /* Sysplex */ /*B273*/ GENx___x___x___ , - /*B274*/ GENx___x___x___ , /*%SIGA */ + /*B274*/ GENx___x390x900 (signal_adapter,S,"SIGA"), /*B275*/ GENx___x___x___ , /*B276*/ GENx___x390x900 (cancel_subchannel,S,"XSCH"), /*B277*/ GENx___x390x900 (resume_program,S,"RP"), @@ -2127,8 +2280,8 @@ zz_func opcode_b3xx[256][GEN_MAXARCH] = { /*B30B*/ GENx___x390x900 (subtract_bfp_short_reg,RRE,"SEBR"), /*B30C*/ GENx___x390x900 (dummy_instruction,RRE,"MDEBR"), /*B30D*/ GENx___x390x900 (divide_bfp_short_reg,RRE,"DEBR"), - /*B30E*/ GENx___x390x900 (dummy_instruction,RRE,"MAEBR"), - /*B30F*/ GENx___x390x900 (dummy_instruction,RRE,"MSEBR"), + /*B30E*/ GENx___x390x900 (dummy_instruction,RRF_R,"MAEBR"), + /*B30F*/ GENx___x390x900 (dummy_instruction,RRF_R,"MSEBR"), /*B310*/ GENx___x390x900 (load_positive_bfp_long_reg,RRE,"LPDBR"), /*B311*/ GENx___x390x900 (load_negative_bfp_long_reg,RRE,"LNDBR"), /*B312*/ GENx___x390x900 (load_and_test_bfp_long_reg,RRE,"LTDBR"), @@ -2143,8 +2296,8 @@ zz_func opcode_b3xx[256][GEN_MAXARCH] = { /*B31B*/ GENx___x390x900 (subtract_bfp_long_reg,RRE,"SDBR"), /*B31C*/ GENx___x390x900 (multiply_bfp_long_reg,RRE,"MDBR"), /*B31D*/ GENx___x390x900 (divide_bfp_long_reg,RRE,"DDBR"), - /*B31E*/ GENx___x390x900 (dummy_instruction,RRE,"MAEBR"), - /*B31F*/ GENx___x390x900 (dummy_instruction,RRE,"MSDBR"), + /*B31E*/ GENx___x390x900 (dummy_instruction,RRF_R,"MAEBR"), + /*B31F*/ GENx___x390x900 (dummy_instruction,RRF_R,"MSDBR"), /*B320*/ GENx___x___x___ , /*B321*/ GENx___x___x___ , /*B322*/ GENx___x___x___ , @@ -2159,8 +2312,8 @@ zz_func opcode_b3xx[256][GEN_MAXARCH] = { /*B32B*/ GENx___x___x___ , /*B32C*/ GENx___x___x___ , /*B32D*/ GENx___x___x___ , - /*B32E*/ GENx___x___x___ , - /*B32F*/ GENx___x___x___ , + /*B32E*/ GENx___x___x900 (multiply_add_float_short_reg,RRF_R,"MAER"), + /*B32F*/ GENx___x___x900 (multiply_subtract_float_short_reg,RRF_R,"MSER"), /*B330*/ GENx___x___x___ , /*B331*/ GENx___x___x___ , /*B332*/ GENx___x___x___ , @@ -2175,8 +2328,8 @@ zz_func opcode_b3xx[256][GEN_MAXARCH] = { /*B33B*/ GENx___x___x___ , /*B33C*/ GENx___x___x___ , /*B33D*/ GENx___x___x___ , - /*B33E*/ GENx___x___x___ , - /*B33F*/ GENx___x___x___ , + /*B33E*/ GENx___x___x900 (multiply_add_float_long_reg,RRF_R,"MADR"), + /*B33F*/ GENx___x___x900 (multiply_subtract_float_long_reg,RRF_R,"MSDR"), /*B340*/ GENx___x390x900 (load_positive_bfp_ext_reg,RRE,"LPXBR"), /*B341*/ GENx___x390x900 (load_negative_bfp_ext_reg,RRE,"LNXBR"), /*B342*/ GENx___x390x900 (load_and_test_bfp_ext_reg,RRE,"LTXBR"), @@ -2405,7 +2558,7 @@ zz_func opcode_b9xx[256][GEN_MAXARCH] = { /*B91B*/ GENx___x___x900 (subtract_logical_long_fullword_register,RRE,"SLGFR"), /*B91C*/ GENx___x___x900 (multiply_single_long_fullword_register,RRE,"MSGFR"), /*B91D*/ GENx___x___x900 (divide_single_long_fullword_register,RRE,"DSGFR"), - /*B91E*/ GENx___x___x___ , + /*B91E*/ GENx___x390x900 (compute_message_authentication_code_r,RRE,"KMAC"), /*B91F*/ GENx___x390x900 (load_reversed_register,RRE,"LRVR"), /*B920*/ GENx___x___x900 (compare_long_register,RRE,"CGR"), /*B921*/ GENx___x___x900 (compare_logical_long_register,RRE,"CLGR"), @@ -2421,8 +2574,8 @@ zz_func opcode_b9xx[256][GEN_MAXARCH] = { /*B92B*/ GENx___x___x___ , /*B92C*/ GENx___x___x___ , /*B92D*/ GENx___x___x___ , - /*B92E*/ GENx___x___x___ , - /*B92F*/ GENx___x___x___ , + /*B92E*/ GENx___x390x900 (cipher_message_r,RRE,"KM"), + /*B92F*/ GENx___x390x900 (cipher_message_with_chaining_r,RRE,"KMC"), /*B930*/ GENx___x___x900 (compare_long_fullword_register,RRE,"CGFR"), /*B931*/ GENx___x___x900 (compare_logical_long_fullword_register,RRE,"CLGFR"), /*B932*/ GENx___x___x___ , @@ -2437,8 +2590,8 @@ zz_func opcode_b9xx[256][GEN_MAXARCH] = { /*B93B*/ GENx___x___x___ , /*B93C*/ GENx___x___x___ , /*B93D*/ GENx___x___x___ , - /*B93E*/ GENx___x___x___ , - /*B93F*/ GENx___x___x___ , + /*B93E*/ GENx___x390x900 (compute_intermediate_message_digest_r,RRE,"KIMD"), + /*B93F*/ GENx___x390x900 (compute_last_message_digest_r,RRE,"KLMD"), /*B940*/ GENx___x___x___ , /*B941*/ GENx___x___x___ , /*B942*/ GENx___x___x___ , @@ -2513,11 +2666,11 @@ zz_func opcode_b9xx[256][GEN_MAXARCH] = { /*B987*/ GENx___x___x900 (divide_logical_long_register,RRE,"DLGR"), /*B988*/ GENx___x___x900 (add_logical_carry_long_register,RRE,"ALCGR"), /*B989*/ GENx___x___x900 (subtract_logical_borrow_long_register,RRE,"SLBGR"), - /*B98A*/ GENx___x___x___ , + /*B98A*/ GENx___x___x900 (compare_and_swap_and_purge_long,RRE,"CSPG"), /*B98B*/ GENx___x___x___ , /*B98C*/ GENx___x___x___ , /*B98D*/ GENx___x390x900 (extract_psw,RRE,"EPSW"), - /*B98E*/ GENx___x___x___ , + /*B98E*/ GENx___x___x900 (invalidate_dat_table_entry,RRF_R,"IDTE"), /*B98F*/ GENx___x___x___ , /*B990*/ GENx___x390x900 (translate_two_to_two,RRE,"TRTT"), /*B991*/ GENx___x390x900 (translate_two_to_one,RRE,"TRTO"), @@ -2662,42 +2815,42 @@ zz_func opcode_e3xx[256][GEN_MAXARCH] = { /*E300*/ GENx___x___x___ , /*E301*/ GENx___x___x___ , /*E302*/ GENx___x___x___ , - /*E303*/ GENx___x___x900 (load_real_address_long,RXE,"LRAG"), - /*E304*/ GENx___x___x900 (load_long,RXE,"LG"), + /*E303*/ GENx___x___x900 (load_real_address_long,RXY,"LRAG"), + /*E304*/ GENx___x___x900 (load_long,RXY,"LG"), /*E305*/ GENx___x___x___ , - /*E306*/ GENx___x___x___ , + /*E306*/ GENx___x___x900 (convert_to_binary_y,RXY,"CVBY"), /*E307*/ GENx___x___x___ , - /*E308*/ GENx___x___x900 (add_long,RXE,"AG"), - /*E309*/ GENx___x___x900 (subtract_long,RXE,"SG"), - /*E30A*/ GENx___x___x900 (add_logical_long,RXE,"ALG"), - /*E30B*/ GENx___x___x900 (subtract_logical_long,RXE,"SLG"), - /*E30C*/ GENx___x___x900 (multiply_single_long,RXE,"MSG"), - /*E30D*/ GENx___x___x900 (divide_single_long,RXE,"DSG"), - /*E30E*/ GENx___x___x900 (convert_to_binary_long,RXE,"CVBG"), - /*E30F*/ GENx___x___x900 (load_reversed_long,RXE,"LRVG"), + /*E308*/ GENx___x___x900 (add_long,RXY,"AG"), + /*E309*/ GENx___x___x900 (subtract_long,RXY,"SG"), + /*E30A*/ GENx___x___x900 (add_logical_long,RXY,"ALG"), + /*E30B*/ GENx___x___x900 (subtract_logical_long,RXY,"SLG"), + /*E30C*/ GENx___x___x900 (multiply_single_long,RXY,"MSG"), + /*E30D*/ GENx___x___x900 (divide_single_long,RXY,"DSG"), + /*E30E*/ GENx___x___x900 (convert_to_binary_long,RXY,"CVBG"), + /*E30F*/ GENx___x___x900 (load_reversed_long,RXY,"LRVG"), /*E310*/ GENx___x___x___ , /*E311*/ GENx___x___x___ , /*E312*/ GENx___x___x___ , - /*E313*/ GENx___x___x___ , - /*E314*/ GENx___x___x900 (load_long_fullword,RXE,"LGF"), - /*E315*/ GENx___x___x900 (load_long_halfword,RXE,"LGH"), - /*E316*/ GENx___x___x900 (load_logical_long_fullword,RXE,"LLGF"), - /*E317*/ GENx___x___x900 (load_logical_long_thirtyone,RXE,"LLGT"), - /*E318*/ GENx___x___x900 (add_long_fullword,RXE,"AGF"), - /*E319*/ GENx___x___x900 (subtract_long_fullword,RXE,"SGF"), - /*E31A*/ GENx___x___x900 (add_logical_long_fullword,RXE,"ALGF"), - /*E31B*/ GENx___x___x900 (subtract_logical_long_fullword,RXE,"SLGF"), - /*E31C*/ GENx___x___x900 (multiply_single_long_fullword,RXE,"MSGF"), - /*E31D*/ GENx___x___x900 (divide_single_long_fullword,RXE,"DSGF"), - /*E31E*/ GENx___x390x900 (load_reversed,RXE,"LRV"), - /*E31F*/ GENx___x390x900 (load_reversed_half,RXE,"LRVH"), - /*E320*/ GENx___x___x900 (compare_long,RXE,"CG"), - /*E321*/ GENx___x___x900 (compare_logical_long,RXE,"CLG"), + /*E313*/ GENx___x___x900 (load_real_address_y,RXY,"LRAY"), + /*E314*/ GENx___x___x900 (load_long_fullword,RXY,"LGF"), + /*E315*/ GENx___x___x900 (load_long_halfword,RXY,"LGH"), + /*E316*/ GENx___x___x900 (load_logical_long_fullword,RXY,"LLGF"), + /*E317*/ GENx___x___x900 (load_logical_long_thirtyone,RXY,"LLGT"), + /*E318*/ GENx___x___x900 (add_long_fullword,RXY,"AGF"), + /*E319*/ GENx___x___x900 (subtract_long_fullword,RXY,"SGF"), + /*E31A*/ GENx___x___x900 (add_logical_long_fullword,RXY,"ALGF"), + /*E31B*/ GENx___x___x900 (subtract_logical_long_fullword,RXY,"SLGF"), + /*E31C*/ GENx___x___x900 (multiply_single_long_fullword,RXY,"MSGF"), + /*E31D*/ GENx___x___x900 (divide_single_long_fullword,RXY,"DSGF"), + /*E31E*/ GENx___x390x900 (load_reversed,RXY,"LRV"), + /*E31F*/ GENx___x390x900 (load_reversed_half,RXY,"LRVH"), + /*E320*/ GENx___x___x900 (compare_long,RXY,"CG"), + /*E321*/ GENx___x___x900 (compare_logical_long,RXY,"CLG"), /*E322*/ GENx___x___x___ , /*E323*/ GENx___x___x___ , - /*E324*/ GENx___x___x900 (store_long,RXE,"STG"), + /*E324*/ GENx___x___x900 (store_long,RXY,"STG"), /*E325*/ GENx___x___x___ , - /*E326*/ GENx___x___x___ , + /*E326*/ GENx___x___x900 (convert_to_decimal_y,RXY,"CVDY"), /*E327*/ GENx___x___x___ , /*E328*/ GENx___x___x___ , /*E329*/ GENx___x___x___ , @@ -2705,10 +2858,10 @@ zz_func opcode_e3xx[256][GEN_MAXARCH] = { /*E32B*/ GENx___x___x___ , /*E32C*/ GENx___x___x___ , /*E32D*/ GENx___x___x___ , - /*E32E*/ GENx___x___x900 (convert_to_decimal_long,RXE,"CVDG"), - /*E32F*/ GENx___x___x900 (store_reversed_long,RXE,"STRVG"), - /*E330*/ GENx___x___x900 (compare_long_fullword,RXE,"CGF"), - /*E331*/ GENx___x___x900 (compare_logical_long_fullword,RXE,"CLGF"), + /*E32E*/ GENx___x___x900 (convert_to_decimal_long,RXY,"CVDG"), + /*E32F*/ GENx___x___x900 (store_reversed_long,RXY,"STRVG"), + /*E330*/ GENx___x___x900 (compare_long_fullword,RXY,"CGF"), + /*E331*/ GENx___x___x900 (compare_logical_long_fullword,RXY,"CLGF"), /*E332*/ GENx___x___x___ , /*E333*/ GENx___x___x___ , /*E334*/ GENx___x___x___ , @@ -2721,15 +2874,15 @@ zz_func opcode_e3xx[256][GEN_MAXARCH] = { /*E33B*/ GENx___x___x___ , /*E33C*/ GENx___x___x___ , /*E33D*/ GENx___x___x___ , - /*E33E*/ GENx___x390x900 (store_reversed,RXE,"STRV"), - /*E33F*/ GENx___x390x900 (store_reversed_half,RXE,"STRVH"), + /*E33E*/ GENx___x390x900 (store_reversed,RXY,"STRV"), + /*E33F*/ GENx___x390x900 (store_reversed_half,RXY,"STRVH"), /*E340*/ GENx___x___x___ , /*E341*/ GENx___x___x___ , /*E342*/ GENx___x___x___ , /*E343*/ GENx___x___x___ , /*E344*/ GENx___x___x___ , /*E345*/ GENx___x___x___ , - /*E346*/ GENx___x___x900 (branch_on_count_long,RXE,"BCTG"), + /*E346*/ GENx___x___x900 (branch_on_count_long,RXY,"BCTG"), /*E347*/ GENx___x___x___ , /*E348*/ GENx___x___x___ , /*E349*/ GENx___x___x___ , @@ -2739,22 +2892,22 @@ zz_func opcode_e3xx[256][GEN_MAXARCH] = { /*E34D*/ GENx___x___x___ , /*E34E*/ GENx___x___x___ , /*E34F*/ GENx___x___x___ , - /*E350*/ GENx___x___x___ , - /*E351*/ GENx___x___x___ , + /*E350*/ GENx___x___x900 (store_y,RXY,"STY"), + /*E351*/ GENx___x___x900 (multiply_single_y,RXY,"MSY"), /*E352*/ GENx___x___x___ , /*E353*/ GENx___x___x___ , - /*E354*/ GENx___x___x___ , - /*E355*/ GENx___x___x___ , - /*E356*/ GENx___x___x___ , - /*E357*/ GENx___x___x___ , - /*E358*/ GENx___x___x___ , - /*E359*/ GENx___x___x___ , - /*E35A*/ GENx___x___x___ , - /*E35B*/ GENx___x___x___ , + /*E354*/ GENx___x___x900 (and_y,RXY,"NY"), + /*E355*/ GENx___x___x900 (compare_logical_y,RXY,"CLY"), + /*E356*/ GENx___x___x900 (or_y,RXY,"OY"), + /*E357*/ GENx___x___x900 (exclusive_or_y,RXY,"XY"), + /*E358*/ GENx___x___x900 (load_y,RXY,"LY"), + /*E359*/ GENx___x___x900 (compare_y,RXY,"CY"), + /*E35A*/ GENx___x___x900 (add_y,RXY,"AY"), + /*E35B*/ GENx___x___x900 (subtract_y,RXY,"SY"), /*E35C*/ GENx___x___x___ , /*E35D*/ GENx___x___x___ , - /*E35E*/ GENx___x___x___ , - /*E35F*/ GENx___x___x___ , + /*E35E*/ GENx___x___x900 (add_logical_y,RXY,"ALY"), + /*E35F*/ GENx___x___x900 (subtract_logical_y,RXY,"SLY"), /*E360*/ GENx___x___x___ , /*E361*/ GENx___x___x___ , /*E362*/ GENx___x___x___ , @@ -2771,48 +2924,48 @@ zz_func opcode_e3xx[256][GEN_MAXARCH] = { /*E36D*/ GENx___x___x___ , /*E36E*/ GENx___x___x___ , /*E36F*/ GENx___x___x___ , - /*E370*/ GENx___x___x___ , - /*E371*/ GENx___x___x___ , - /*E372*/ GENx___x___x___ , - /*E373*/ GENx___x___x___ , + /*E370*/ GENx___x___x900 (store_halfword_y,RXY,"STHY"), + /*E371*/ GENx___x___x900 (load_address_y,RXY,"LAY"), + /*E372*/ GENx___x___x900 (store_character_y,RXY,"STCY"), + /*E373*/ GENx___x___x900 (insert_character_y,RXY,"ICY"), /*E374*/ GENx___x___x___ , /*E375*/ GENx___x___x___ , - /*E376*/ GENx___x___x___ , - /*E377*/ GENx___x___x___ , - /*E378*/ GENx___x___x___ , - /*E379*/ GENx___x___x___ , - /*E37A*/ GENx___x___x___ , - /*E37B*/ GENx___x___x___ , + /*E376*/ GENx___x___x900 (load_byte,RXY,"LB"), + /*E377*/ GENx___x___x900 (load_byte_long,RXY,"LGB"), + /*E378*/ GENx___x___x900 (load_halfword_y,RXY,"LHY"), + /*E379*/ GENx___x___x900 (compare_halfword_y,RXY,"CHY"), + /*E37A*/ GENx___x___x900 (add_halfword_y,RXY,"AHY"), + /*E37B*/ GENx___x___x900 (subtract_halfword_y,RXY,"SHY"), /*E37C*/ GENx___x___x___ , /*E37D*/ GENx___x___x___ , /*E37E*/ GENx___x___x___ , /*E37F*/ GENx___x___x___ , - /*E380*/ GENx___x___x900 (and_long,RXE,"NG"), - /*E381*/ GENx___x___x900 (or_long,RXE,"OG"), - /*E382*/ GENx___x___x900 (exclusive_or_long,RXE,"XG"), + /*E380*/ GENx___x___x900 (and_long,RXY,"NG"), + /*E381*/ GENx___x___x900 (or_long,RXY,"OG"), + /*E382*/ GENx___x___x900 (exclusive_or_long,RXY,"XG"), /*E383*/ GENx___x___x___ , /*E384*/ GENx___x___x___ , /*E385*/ GENx___x___x___ , - /*E386*/ GENx___x___x900 (multiply_logical_long,RXE,"MLG"), - /*E387*/ GENx___x___x900 (divide_logical_long,RXE,"DLG"), - /*E388*/ GENx___x___x900 (add_logical_carry_long,RXE,"ALCG"), - /*E389*/ GENx___x___x900 (subtract_logical_borrow_long,RXE,"SLBG"), + /*E386*/ GENx___x___x900 (multiply_logical_long,RXY,"MLG"), + /*E387*/ GENx___x___x900 (divide_logical_long,RXY,"DLG"), + /*E388*/ GENx___x___x900 (add_logical_carry_long,RXY,"ALCG"), + /*E389*/ GENx___x___x900 (subtract_logical_borrow_long,RXY,"SLBG"), /*E38A*/ GENx___x___x___ , /*E38B*/ GENx___x___x___ , /*E38C*/ GENx___x___x___ , /*E38D*/ GENx___x___x___ , - /*E38E*/ GENx___x___x900 (store_pair_to_quadword,RXE,"STPQ"), - /*E38F*/ GENx___x___x900 (load_pair_from_quadword,RXE,"LPQ"), - /*E390*/ GENx___x___x900 (load_logical_character,RXE,"LLGC"), - /*E391*/ GENx___x___x900 (load_logical_halfword,RXE,"LLGH"), + /*E38E*/ GENx___x___x900 (store_pair_to_quadword,RXY,"STPQ"), + /*E38F*/ GENx___x___x900 (load_pair_from_quadword,RXY,"LPQ"), + /*E390*/ GENx___x___x900 (load_logical_character,RXY,"LLGC"), + /*E391*/ GENx___x___x900 (load_logical_halfword,RXY,"LLGH"), /*E392*/ GENx___x___x___ , /*E393*/ GENx___x___x___ , /*E394*/ GENx___x___x___ , /*E395*/ GENx___x___x___ , - /*E396*/ GENx___x390x900 (multiply_logical,RXE,"ML"), - /*E397*/ GENx___x390x900 (divide_logical,RXE,"DL"), - /*E398*/ GENx___x390x900 (add_logical_carry,RXE,"ALC"), - /*E399*/ GENx___x390x900 (subtract_logical_borrow,RXE,"SLB"), + /*E396*/ GENx___x390x900 (multiply_logical,RXY,"ML"), + /*E397*/ GENx___x390x900 (divide_logical,RXY,"DL"), + /*E398*/ GENx___x390x900 (add_logical_carry,RXY,"ALC"), + /*E399*/ GENx___x390x900 (subtract_logical_borrow,RXY,"SLB"), /*E39A*/ GENx___x___x___ , /*E39B*/ GENx___x___x___ , /*E39C*/ GENx___x___x___ , @@ -3178,6 +3331,263 @@ zz_func opcode_e5xx[256][GEN_MAXARCH] = { /*E5FE*/ GENx___x___x___ , /*E5FF*/ GENx___x___x___ }; +zz_func opcode_e6xx[256][GEN_MAXARCH] = { + /*E600*/ GENx370x___x___ (ecpsvm_basic_freex,SSE,"FREE"), + /*E601*/ GENx370x___x___ (ecpsvm_basic_fretx,SSE,"FRET"), + /*E602*/ GENx370x___x___ (ecpsvm_lock_page,SSE,"VLKPG"), + /*E603*/ GENx370x___x___ (ecpsvm_unlock_page,SSE,"VULKP"), + /*E604*/ GENx370x___x___ (ecpsvm_decode_next_ccw,SSE,"DNCCW"), + /*E605*/ GENx370x___x___ (ecpsvm_free_ccwstor,SSE,"FCCWS"), + /*E606*/ GENx370x___x___ (ecpsvm_locate_vblock,SSE,"SCNVU"), + /*E607*/ GENx370x___x___ (ecpsvm_disp1,SSE,"ECPS:DISP1"), + /*E608*/ GENx370x___x___ (ecpsvm_tpage,SSE,"ECPS:TRBRG"), + /*E609*/ GENx370x___x___ (ecpsvm_tpage_lock,SSE,"TRLCK"), + /*E60A*/ GENx370x___x___ (ecpsvm_inval_segtab,SSE,"VIST"), + /*E60B*/ GENx370x___x___ (ecpsvm_inval_ptable,SSE,"VIPT"), + /*E60C*/ GENx370x___x___ (ecpsvm_decode_first_ccw,SSE,"DFCCW"), + /*E60D*/ GENx370x___x___ (ecpsvm_dispatch_main,SSE,"DISP0"), + /*E60E*/ GENx370x___x___ (ecpsvm_locate_rblock,SSE,"SCNRU"), + /*E60F*/ GENx370x___x___ (ecpsvm_comm_ccwproc,SSE,"CCWGN"), + /*E610*/ GENx370x___x___ (ecpsvm_unxlate_ccw,SSE,"UXCCW"), + /*E611*/ GENx370x___x___ (ecpsvm_disp2,SSE,"DISP2"), + /*E612*/ GENx370x___x___ (ecpsvm_store_level,SSE,"STEVL"), + /*E613*/ GENx370x___x___ (ecpsvm_loc_chgshrpg,SSE,"LCSPG"), + /*E614*/ GENx370x___x___ (ecpsvm_extended_freex,SSE,"FREEX"), + /*E615*/ GENx370x___x___ (ecpsvm_extended_fretx,SSE,"FRETX"), + /*E616*/ GENx370x___x___ (ecpsvm_prefmach_assist,SSE,"PRFMA"), + /*E617*/ GENx___x___x___ , + /*E618*/ GENx___x___x___ , + /*E619*/ GENx___x___x___ , + /*E61A*/ GENx___x___x___ , + /*E61B*/ GENx___x___x___ , + /*E61C*/ GENx___x___x___ , + /*E61D*/ GENx___x___x___ , + /*E61E*/ GENx___x___x___ , + /*E61F*/ GENx___x___x___ , + /*E620*/ GENx___x___x___ , + /*E621*/ GENx___x___x___ , + /*E622*/ GENx___x___x___ , + /*E623*/ GENx___x___x___ , + /*E624*/ GENx___x___x___ , + /*E625*/ GENx___x___x___ , + /*E626*/ GENx___x___x___ , + /*E627*/ GENx___x___x___ , + /*E628*/ GENx___x___x___ , + /*E629*/ GENx___x___x___ , + /*E62A*/ GENx___x___x___ , + /*E62B*/ GENx___x___x___ , + /*E62C*/ GENx___x___x___ , + /*E62D*/ GENx___x___x___ , + /*E62E*/ GENx___x___x___ , + /*E62F*/ GENx___x___x___ , + /*E630*/ GENx___x___x___ , + /*E631*/ GENx___x___x___ , + /*E632*/ GENx___x___x___ , + /*E633*/ GENx___x___x___ , + /*E634*/ GENx___x___x___ , + /*E635*/ GENx___x___x___ , + /*E636*/ GENx___x___x___ , + /*E637*/ GENx___x___x___ , + /*E638*/ GENx___x___x___ , + /*E639*/ GENx___x___x___ , + /*E63A*/ GENx___x___x___ , + /*E63B*/ GENx___x___x___ , + /*E63C*/ GENx___x___x___ , + /*E63D*/ GENx___x___x___ , + /*E63E*/ GENx___x___x___ , + /*E63F*/ GENx___x___x___ , + /*E640*/ GENx___x___x___ , + /*E641*/ GENx___x___x___ , + /*E642*/ GENx___x___x___ , + /*E643*/ GENx___x___x___ , + /*E644*/ GENx___x___x___ , + /*E645*/ GENx___x___x___ , + /*E646*/ GENx___x___x___ , + /*E647*/ GENx___x___x___ , + /*E648*/ GENx___x___x___ , + /*E649*/ GENx___x___x___ , + /*E64A*/ GENx___x___x___ , + /*E64B*/ GENx___x___x___ , + /*E64C*/ GENx___x___x___ , + /*E64D*/ GENx___x___x___ , + /*E64E*/ GENx___x___x___ , + /*E64F*/ GENx___x___x___ , + /*E650*/ GENx___x___x___ , + /*E651*/ GENx___x___x___ , + /*E652*/ GENx___x___x___ , + /*E653*/ GENx___x___x___ , + /*E654*/ GENx___x___x___ , + /*E655*/ GENx___x___x___ , + /*E656*/ GENx___x___x___ , + /*E657*/ GENx___x___x___ , + /*E658*/ GENx___x___x___ , + /*E659*/ GENx___x___x___ , + /*E65A*/ GENx___x___x___ , + /*E65B*/ GENx___x___x___ , + /*E65C*/ GENx___x___x___ , + /*E65D*/ GENx___x___x___ , + /*E65E*/ GENx___x___x___ , + /*E65F*/ GENx___x___x___ , + /*E660*/ GENx___x___x___ , + /*E661*/ GENx___x___x___ , + /*E662*/ GENx___x___x___ , + /*E663*/ GENx___x___x___ , + /*E664*/ GENx___x___x___ , + /*E665*/ GENx___x___x___ , + /*E666*/ GENx___x___x___ , + /*E667*/ GENx___x___x___ , + /*E668*/ GENx___x___x___ , + /*E669*/ GENx___x___x___ , + /*E66A*/ GENx___x___x___ , + /*E66B*/ GENx___x___x___ , + /*E66C*/ GENx___x___x___ , + /*E66D*/ GENx___x___x___ , + /*E66E*/ GENx___x___x___ , + /*E66F*/ GENx___x___x___ , + /*E670*/ GENx___x___x___ , + /*E671*/ GENx___x___x___ , + /*E672*/ GENx___x___x___ , + /*E673*/ GENx___x___x___ , + /*E674*/ GENx___x___x___ , + /*E675*/ GENx___x___x___ , + /*E676*/ GENx___x___x___ , + /*E677*/ GENx___x___x___ , + /*E678*/ GENx___x___x___ , + /*E679*/ GENx___x___x___ , + /*E67A*/ GENx___x___x___ , + /*E67B*/ GENx___x___x___ , + /*E67C*/ GENx___x___x___ , + /*E67D*/ GENx___x___x___ , + /*E67E*/ GENx___x___x___ , + /*E67F*/ GENx___x___x___ , + /*E680*/ GENx___x___x___ , + /*E681*/ GENx___x___x___ , + /*E682*/ GENx___x___x___ , + /*E683*/ GENx___x___x___ , + /*E684*/ GENx___x___x___ , + /*E685*/ GENx___x___x___ , + /*E686*/ GENx___x___x___ , + /*E687*/ GENx___x___x___ , + /*E688*/ GENx___x___x___ , + /*E689*/ GENx___x___x___ , + /*E68A*/ GENx___x___x___ , + /*E68B*/ GENx___x___x___ , + /*E68C*/ GENx___x___x___ , + /*E68D*/ GENx___x___x___ , + /*E68E*/ GENx___x___x___ , + /*E68F*/ GENx___x___x___ , + /*E690*/ GENx___x___x___ , + /*E691*/ GENx___x___x___ , + /*E692*/ GENx___x___x___ , + /*E693*/ GENx___x___x___ , + /*E694*/ GENx___x___x___ , + /*E695*/ GENx___x___x___ , + /*E696*/ GENx___x___x___ , + /*E697*/ GENx___x___x___ , + /*E698*/ GENx___x___x___ , + /*E699*/ GENx___x___x___ , + /*E69A*/ GENx___x___x___ , + /*E69B*/ GENx___x___x___ , + /*E69C*/ GENx___x___x___ , + /*E69D*/ GENx___x___x___ , + /*E69E*/ GENx___x___x___ , + /*E69F*/ GENx___x___x___ , + /*E6A0*/ GENx___x___x___ , + /*E6A1*/ GENx___x___x___ , + /*E6A2*/ GENx___x___x___ , + /*E6A3*/ GENx___x___x___ , + /*E6A4*/ GENx___x___x___ , + /*E6A5*/ GENx___x___x___ , + /*E6A6*/ GENx___x___x___ , + /*E6A7*/ GENx___x___x___ , + /*E6A8*/ GENx___x___x___ , + /*E6A9*/ GENx___x___x___ , + /*E6AA*/ GENx___x___x___ , + /*E6AB*/ GENx___x___x___ , + /*E6AC*/ GENx___x___x___ , + /*E6AD*/ GENx___x___x___ , + /*E6AE*/ GENx___x___x___ , + /*E6AF*/ GENx___x___x___ , + /*E6B0*/ GENx___x___x___ , + /*E6B1*/ GENx___x___x___ , + /*E6B2*/ GENx___x___x___ , + /*E6B3*/ GENx___x___x___ , + /*E6B4*/ GENx___x___x___ , + /*E6B5*/ GENx___x___x___ , + /*E6B6*/ GENx___x___x___ , + /*E6B7*/ GENx___x___x___ , + /*E6B8*/ GENx___x___x___ , + /*E6B9*/ GENx___x___x___ , + /*E6BA*/ GENx___x___x___ , + /*E6BB*/ GENx___x___x___ , + /*E6BC*/ GENx___x___x___ , + /*E6BD*/ GENx___x___x___ , + /*E6BE*/ GENx___x___x___ , + /*E6BF*/ GENx___x___x___ , + /*E6C0*/ GENx___x___x___ , + /*E6C1*/ GENx___x___x___ , + /*E6C2*/ GENx___x___x___ , + /*E6C3*/ GENx___x___x___ , + /*E6C4*/ GENx___x___x___ , + /*E6C5*/ GENx___x___x___ , + /*E6C6*/ GENx___x___x___ , + /*E6C7*/ GENx___x___x___ , + /*E6C8*/ GENx___x___x___ , + /*E6C9*/ GENx___x___x___ , + /*E6CA*/ GENx___x___x___ , + /*E6CB*/ GENx___x___x___ , + /*E6CC*/ GENx___x___x___ , + /*E6CD*/ GENx___x___x___ , + /*E6CE*/ GENx___x___x___ , + /*E6CF*/ GENx___x___x___ , + /*E6D0*/ GENx___x___x___ , + /*E6D1*/ GENx___x___x___ , + /*E6D2*/ GENx___x___x___ , + /*E6D3*/ GENx___x___x___ , + /*E6D4*/ GENx___x___x___ , + /*E6D5*/ GENx___x___x___ , + /*E6D6*/ GENx___x___x___ , + /*E6D7*/ GENx___x___x___ , + /*E6D8*/ GENx___x___x___ , + /*E6D9*/ GENx___x___x___ , + /*E6DA*/ GENx___x___x___ , + /*E6DB*/ GENx___x___x___ , + /*E6DC*/ GENx___x___x___ , + /*E6DD*/ GENx___x___x___ , + /*E6DE*/ GENx___x___x___ , + /*E6DF*/ GENx___x___x___ , + /*E6E0*/ GENx___x___x___ , + /*E6E1*/ GENx___x___x___ , + /*E6E2*/ GENx___x___x___ , + /*E6E3*/ GENx___x___x___ , + /*E6E4*/ GENx___x___x___ , + /*E6E5*/ GENx___x___x___ , + /*E6E6*/ GENx___x___x___ , + /*E6E7*/ GENx___x___x___ , + /*E6E8*/ GENx___x___x___ , + /*E6E9*/ GENx___x___x___ , + /*E6EA*/ GENx___x___x___ , + /*E6EB*/ GENx___x___x___ , + /*E6EC*/ GENx___x___x___ , + /*E6ED*/ GENx___x___x___ , + /*E6EE*/ GENx___x___x___ , + /*E6EF*/ GENx___x___x___ , + /*E6F0*/ GENx___x___x___ , + /*E6F1*/ GENx___x___x___ , + /*E6F2*/ GENx___x___x___ , + /*E6F3*/ GENx___x___x___ , + /*E6F4*/ GENx___x___x___ , + /*E6F5*/ GENx___x___x___ , + /*E6F6*/ GENx___x___x___ , + /*E6F7*/ GENx___x___x___ , + /*E6F8*/ GENx___x___x___ , + /*E6F9*/ GENx___x___x___ , + /*E6FA*/ GENx___x___x___ , + /*E6FB*/ GENx___x___x___ , + /*E6FC*/ GENx___x___x___ , + /*E6FD*/ GENx___x___x___ , + /*E6FE*/ GENx___x___x___ , + /*E6FF*/ GENx___x___x___ }; // #if defined(FEATURE_ESAME) @@ -3187,23 +3597,23 @@ zz_func opcode_ebxx[256][GEN_MAXARCH] = { /*EB01*/ GENx___x___x___ , /*EB02*/ GENx___x___x___ , /*EB03*/ GENx___x___x___ , - /*EB04*/ GENx___x___x900 (load_multiple_long,RSE,"LMG"), + /*EB04*/ GENx___x___x900 (load_multiple_long,RSY,"LMG"), /*EB05*/ GENx___x___x___ , /*EB06*/ GENx___x___x___ , /*EB07*/ GENx___x___x___ , /*EB08*/ GENx___x___x___ , /*EB09*/ GENx___x___x___ , - /*EB0A*/ GENx___x___x900 (shift_right_single_long,RSE,"SRAG"), - /*EB0B*/ GENx___x___x900 (shift_left_single_long,RSE,"SLAG"), - /*EB0C*/ GENx___x___x900 (shift_right_single_logical_long,RSE,"SRLG"), - /*EB0D*/ GENx___x___x900 (shift_left_single_logical_long,RSE,"SLLG"), + /*EB0A*/ GENx___x___x900 (shift_right_single_long,RSY,"SRAG"), + /*EB0B*/ GENx___x___x900 (shift_left_single_long,RSY,"SLAG"), + /*EB0C*/ GENx___x___x900 (shift_right_single_logical_long,RSY,"SRLG"), + /*EB0D*/ GENx___x___x900 (shift_left_single_logical_long,RSY,"SLLG"), /*EB0E*/ GENx___x___x___ , - /*EB0F*/ GENx___x___x900 (trace_long,RSE,"TRACG"), + /*EB0F*/ GENx___x___x900 (trace_long,RSY,"TRACG"), /*EB10*/ GENx___x___x___ , /*EB11*/ GENx___x___x___ , /*EB12*/ GENx___x___x___ , /*EB13*/ GENx___x___x___ , - /*EB14*/ GENx___x___x___ , + /*EB14*/ GENx___x___x900 (compare_and_swap_y,RSY,"CSY"), /*EB15*/ GENx___x___x___ , /*EB16*/ GENx___x___x___ , /*EB17*/ GENx___x___x___ , @@ -3211,28 +3621,28 @@ zz_func opcode_ebxx[256][GEN_MAXARCH] = { /*EB19*/ GENx___x___x___ , /*EB1A*/ GENx___x___x___ , /*EB1B*/ GENx___x___x___ , - /*EB1C*/ GENx___x___x900 (rotate_left_single_logical_long,RSE,"RLLG"), - /*EB1D*/ GENx___x390x900 (rotate_left_single_logical,RSE,"RLL"), + /*EB1C*/ GENx___x___x900 (rotate_left_single_logical_long,RSY,"RLLG"), + /*EB1D*/ GENx___x390x900 (rotate_left_single_logical,RSY,"RLL"), /*EB1E*/ GENx___x___x___ , /*EB1F*/ GENx___x___x___ , - /*EB20*/ GENx___x___x900 (compare_logical_characters_under_mask_high,RSE,"CLMH"), - /*EB21*/ GENx___x___x___ , + /*EB20*/ GENx___x___x900 (compare_logical_characters_under_mask_high,RSY,"CLMH"), + /*EB21*/ GENx___x___x900 (compare_logical_characters_under_mask_y,RSY,"CLMY"), /*EB22*/ GENx___x___x___ , /*EB23*/ GENx___x___x___ , - /*EB24*/ GENx___x___x900 (store_multiple_long,RSE,"STMG"), - /*EB25*/ GENx___x___x900 (store_control_long,RSE,"STCTG"), - /*EB26*/ GENx___x___x900 (store_multiple_high,RSE,"STMH"), + /*EB24*/ GENx___x___x900 (store_multiple_long,RSY,"STMG"), + /*EB25*/ GENx___x___x900 (store_control_long,RSY,"STCTG"), + /*EB26*/ GENx___x___x900 (store_multiple_high,RSY,"STMH"), /*EB27*/ GENx___x___x___ , /*EB28*/ GENx___x___x___ , /*EB29*/ GENx___x___x___ , /*EB2A*/ GENx___x___x___ , /*EB2B*/ GENx___x___x___ , - /*EB2C*/ GENx___x___x900 (store_characters_under_mask_high,RSE,"STCMH"), - /*EB2D*/ GENx___x___x___ , + /*EB2C*/ GENx___x___x900 (store_characters_under_mask_high,RSY,"STCMH"), + /*EB2D*/ GENx___x___x900 (store_characters_under_mask_y,RSY,"STCMY"), /*EB2E*/ GENx___x___x___ , - /*EB2F*/ GENx___x___x900 (load_control_long,RSE,"LCTLG"), - /*EB30*/ GENx___x___x900 (compare_and_swap_long,RSE,"CSG"), - /*EB31*/ GENx___x___x___ , + /*EB2F*/ GENx___x___x900 (load_control_long,RSY,"LCTLG"), + /*EB30*/ GENx___x___x900 (compare_and_swap_long,RSY,"CSG"), + /*EB31*/ GENx___x___x900 (compare_double_and_swap_y,RSY,"CDSY"), /*EB32*/ GENx___x___x___ , /*EB33*/ GENx___x___x___ , /*EB34*/ GENx___x___x___ , @@ -3245,14 +3655,14 @@ zz_func opcode_ebxx[256][GEN_MAXARCH] = { /*EB3B*/ GENx___x___x___ , /*EB3C*/ GENx___x___x___ , /*EB3D*/ GENx___x___x___ , - /*EB3E*/ GENx___x___x900 (compare_double_and_swap_long,RSE,"CDSG"), + /*EB3E*/ GENx___x___x900 (compare_double_and_swap_long,RSY,"CDSG"), /*EB3F*/ GENx___x___x___ , /*EB40*/ GENx___x___x___ , /*EB41*/ GENx___x___x___ , /*EB42*/ GENx___x___x___ , /*EB43*/ GENx___x___x___ , - /*EB44*/ GENx___x___x900 (branch_on_index_high_long,RSE,"BXHG"), - /*EB45*/ GENx___x___x900 (branch_on_index_low_or_equal_long,RSE,"BXLEG"), + /*EB44*/ GENx___x___x900 (branch_on_index_high_long,RSY,"BXHG"), + /*EB45*/ GENx___x___x900 (branch_on_index_low_or_equal_long,RSY,"BXLEG"), /*EB46*/ GENx___x___x___ , /*EB47*/ GENx___x___x___ , /*EB48*/ GENx___x___x___ , @@ -3264,13 +3674,13 @@ zz_func opcode_ebxx[256][GEN_MAXARCH] = { /*EB4E*/ GENx___x___x___ , /*EB4F*/ GENx___x___x___ , /*EB50*/ GENx___x___x___ , - /*EB51*/ GENx___x___x___ , - /*EB52*/ GENx___x___x___ , + /*EB51*/ GENx___x___x900 (test_under_mask_y,SIY,"TMY"), + /*EB52*/ GENx___x___x900 (move_immediate_y,SIY,"MVIY"), /*EB53*/ GENx___x___x___ , - /*EB54*/ GENx___x___x___ , - /*EB55*/ GENx___x___x___ , - /*EB56*/ GENx___x___x___ , - /*EB57*/ GENx___x___x___ , + /*EB54*/ GENx___x___x900 (and_immediate_y,SIY,"NIY"), + /*EB55*/ GENx___x___x900 (compare_logical_immediate_y,SIY,"CLIY"), + /*EB56*/ GENx___x___x900 (or_immediate_y,SIY,"OIY"), + /*EB57*/ GENx___x___x900 (exclusive_or_immediate_y,SIY,"XIY"), /*EB58*/ GENx___x___x___ , /*EB59*/ GENx___x___x___ , /*EB5A*/ GENx___x___x___ , @@ -3311,8 +3721,8 @@ zz_func opcode_ebxx[256][GEN_MAXARCH] = { /*EB7D*/ GENx___x___x___ , /*EB7E*/ GENx___x___x___ , /*EB7F*/ GENx___x___x___ , - /*EB80*/ GENx___x___x900 (insert_characters_under_mask_high,RSE,"ICMH"), - /*EB81*/ GENx___x___x___ , + /*EB80*/ GENx___x___x900 (insert_characters_under_mask_high,RSY,"ICMH"), + /*EB81*/ GENx___x___x900 (insert_characters_under_mask_y,RSY,"ICMY"), /*EB82*/ GENx___x___x___ , /*EB83*/ GENx___x___x___ , /*EB84*/ GENx___x___x___ , @@ -3325,20 +3735,20 @@ zz_func opcode_ebxx[256][GEN_MAXARCH] = { /*EB8B*/ GENx___x___x___ , /*EB8C*/ GENx___x___x___ , /*EB8D*/ GENx___x___x___ , - /*EB8E*/ GENx___x390x900 (move_long_unicode,RSE,"MVCLU"), - /*EB8F*/ GENx___x390x900 (compare_logical_long_unicode,RSE,"CLCLU"), - /*EB90*/ GENx___x___x___ , + /*EB8E*/ GENx___x390x900 (move_long_unicode,RSY,"MVCLU"), + /*EB8F*/ GENx___x390x900 (compare_logical_long_unicode,RSY,"CLCLU"), + /*EB90*/ GENx___x___x900 (store_multiple_y,RSY,"STMY"), /*EB91*/ GENx___x___x___ , /*EB92*/ GENx___x___x___ , /*EB93*/ GENx___x___x___ , /*EB94*/ GENx___x___x___ , /*EB95*/ GENx___x___x___ , - /*EB96*/ GENx___x___x900 (load_multiple_high,RSE,"LMH"), + /*EB96*/ GENx___x___x900 (load_multiple_high,RSY,"LMH"), /*EB97*/ GENx___x___x___ , - /*EB98*/ GENx___x___x___ , + /*EB98*/ GENx___x___x900 (load_multiple_y,RSY,"LMY"), /*EB99*/ GENx___x___x___ , - /*EB9A*/ GENx___x___x___ , - /*EB9B*/ GENx___x___x___ , + /*EB9A*/ GENx___x___x900 (load_access_multiple_y,RSY,"LAMY"), + /*EB9B*/ GENx___x___x900 (store_access_multiple_y,RSY,"STAMY"), /*EB9C*/ GENx___x___x___ , /*EB9D*/ GENx___x___x___ , /*EB9E*/ GENx___x___x___ , @@ -3721,8 +4131,8 @@ zz_func opcode_edxx[256][GEN_MAXARCH] = { /*ED0B*/ GENx___x390x900 (subtract_bfp_short,RXE,"SEB"), /*ED0C*/ GENx___x390x900 (dummy_instruction,RXE,"MDEB"), /*ED0D*/ GENx___x390x900 (divide_bfp_short,RXE,"DEB"), - /*ED0E*/ GENx___x390x900 (dummy_instruction,RXE,"MAEB"), - /*ED0F*/ GENx___x390x900 (dummy_instruction,RXE,"MSDB"), + /*ED0E*/ GENx___x390x900 (dummy_instruction,RXF,"MAEB"), + /*ED0F*/ GENx___x390x900 (dummy_instruction,RXF,"MSDB"), /*ED10*/ GENx___x390x900 (testdataclass_bfp_short,RXE,"TCEB"), /*ED11*/ GENx___x390x900 (testdataclass_bfp_long,RXE,"TCDB"), /*ED12*/ GENx___x390x900 (testdataclass_bfp_ext,RXE,"TCXB"), @@ -3737,8 +4147,8 @@ zz_func opcode_edxx[256][GEN_MAXARCH] = { /*ED1B*/ GENx___x390x900 (subtract_bfp_long,RXE,"SDB"), /*ED1C*/ GENx___x390x900 (multiply_bfp_long,RXE,"MDB"), /*ED1D*/ GENx___x390x900 (divide_bfp_long,RXE,"DDB"), - /*ED1E*/ GENx___x390x900 (dummy_instruction,RXE,"MADB"), - /*ED1F*/ GENx___x390x900 (dummy_instruction,RXE,"MSDB"), + /*ED1E*/ GENx___x390x900 (dummy_instruction,RXF,"MADB"), + /*ED1F*/ GENx___x390x900 (dummy_instruction,RXF,"MSDB"), /*ED20*/ GENx___x___x___ , /*ED21*/ GENx___x___x___ , /*ED22*/ GENx___x___x___ , @@ -3753,8 +4163,8 @@ zz_func opcode_edxx[256][GEN_MAXARCH] = { /*ED2B*/ GENx___x___x___ , /*ED2C*/ GENx___x___x___ , /*ED2D*/ GENx___x___x___ , - /*ED2E*/ GENx___x___x___ , - /*ED2F*/ GENx___x___x___ , + /*ED2E*/ GENx___x___x900 (multiply_add_float_short,RXF,"MAE"), + /*ED2F*/ GENx___x___x900 (multiply_subtract_float_short,RXF,"MSE"), /*ED30*/ GENx___x___x___ , /*ED31*/ GENx___x___x___ , /*ED32*/ GENx___x___x___ , @@ -3769,8 +4179,8 @@ zz_func opcode_edxx[256][GEN_MAXARCH] = { /*ED3B*/ GENx___x___x___ , /*ED3C*/ GENx___x___x___ , /*ED3D*/ GENx___x___x___ , - /*ED3E*/ GENx___x___x___ , - /*ED3F*/ GENx___x___x___ , + /*ED3E*/ GENx___x___x900 (multiply_add_float_long,RXF,"MAD"), + /*ED3F*/ GENx___x___x900 (multiply_subtract_float_long,RXF,"MSD"), /*ED40*/ GENx___x___x___ , /*ED41*/ GENx___x___x___ , /*ED42*/ GENx___x___x___ , @@ -3807,10 +4217,10 @@ zz_func opcode_edxx[256][GEN_MAXARCH] = { /*ED61*/ GENx___x___x___ , /*ED62*/ GENx___x___x___ , /*ED63*/ GENx___x___x___ , - /*ED64*/ GENx___x___x___ , - /*ED65*/ GENx___x___x___ , - /*ED66*/ GENx___x___x___ , - /*ED67*/ GENx___x___x___ , + /*ED64*/ GENx___x___x900 (load_float_short_y,RXY,"LEY"), + /*ED65*/ GENx___x___x900 (load_float_long_y,RXY,"LDY"), + /*ED66*/ GENx___x___x900 (store_float_short_y,RXY,"STEY"), + /*ED67*/ GENx___x___x900 (store_float_long_y,RXY,"STDY"), /*ED68*/ GENx___x___x___ , /*ED69*/ GENx___x___x___ , /*ED6A*/ GENx___x___x___ , diff --git a/opcode.h b/opcode.h index 955a960..b85ca00 100644 --- a/opcode.h +++ b/opcode.h @@ -126,6 +126,7 @@ extern zz_func opcode_e3xx[][GEN_MAXARCH]; extern zz_func opcode_e4xx[][GEN_MAXARCH]; extern zz_func v_opcode_e4xx[][GEN_MAXARCH]; extern zz_func opcode_e5xx[][GEN_MAXARCH]; +extern zz_func opcode_e6xx[][GEN_MAXARCH]; extern zz_func opcode_ebxx[][GEN_MAXARCH]; extern zz_func opcode_ecxx[][GEN_MAXARCH]; extern zz_func opcode_edxx[][GEN_MAXARCH]; @@ -206,28 +207,12 @@ int used; \ #endif - -#define UNROLLED_EXECUTE(_regs) \ -do { \ - (_regs)->instvalid = 0; \ - INSTRUCTION_FETCH((_regs)->inst, (_regs)->psw.IA, (_regs)); \ - (_regs)->instvalid = 1; \ - EXECUTE_INSTRUCTION ((_regs)->inst, 0, (_regs)); \ -} while(0) - - -/* Main storage access locking - This routine will ensure that a given CPU +/* Main storage access locking + This routine will ensure that a given CPU has exclusive access to main storage and hence will be able to perform as what appears as an interlocked update to other CPU's - Jan Jaeger */ -/* OBTAIN_MAINLOCK() may cause a retry of the instruction */ - -#if MAX_CPU_ENGINES == 1 - #define OBTAIN_MAINLOCK(_regs) - #define RELEASE_MAINLOCK(_regs) -#else #define OBTAIN_MAINLOCK(_register_context) \ do { \ obtain_lock(&sysblk.mainlock); \ @@ -239,42 +224,94 @@ do { \ (_register_context)->mainlock = 0; \ release_lock(&sysblk.mainlock); \ } while(0) -#endif - /* The footprint_buffer option saves a copy of the register context every time an instruction is executed. This is for problem - determination only, as it severely impacts performance. *JJ */ + determination only, as it severely impacts performance. *JJ */ -#if !defined(OPTION_FOOTPRINT_BUFFER) +#if defined(OPTION_FOOTPRINT_BUFFER) +#define FOOTPRINT(_regs) \ +do { \ + sysblk.footprregs[(_regs)->cpuad][sysblk.footprptr[(_regs)->cpuad]] = *(_regs); \ + memcpy(&sysblk.footprregs[(_regs)->cpuad][sysblk.footprptr[(_regs)->cpuad]++].inst,(_inst),6); \ + sysblk.footprptr[(_regs)->cpuad] &= OPTION_FOOTPRINT_BUFFER - 1; \ +} while(0) +#endif -#define EXECUTE_INSTRUCTION(_instruction, _execflag, _regs) \ +#if !defined(FOOTPRINT) +#define FOOTPRINT(_regs) +#endif + +/* Instruction fetching */ +#define INSTRUCTION_FETCH(_dest, _addr, _regs) \ do { \ - COUNT_INST((_instruction), (_regs)); \ - opcode_table[((_instruction)[0])][ARCH_MODE]((_instruction), (_execflag), (_regs)); \ + if( (_regs)->VI == ((_addr) & PAGEFRAME_PAGEMASK) \ + && ((_addr) & 0x7FF) <= (0x800 - 6)) \ + { \ + if((_addr) & 0x01) \ + ARCH_DEP(program_interrupt)((_regs), PGM_SPECIFICATION_EXCEPTION); \ + memcpy ((_dest), (_regs)->mainstor + (_regs)->AI + \ + ((_addr) & PAGEFRAME_BYTEMASK) , 6); \ + } \ + else \ + ARCH_DEP(instfetch) ((_dest), (_addr), (_regs)); \ } while(0) -#else /*defined(OPTION_FOOTPRINT_BUFFER)*/ +#define FAST_INSTRUCTION_FETCH(_dest, _addr, _regs, _pe, _if) \ +do { \ + if ( (_regs)->VI == ((_addr) & (PAGEFRAME_PAGEMASK | 0x01)) \ + && (_addr) <= (_pe)) \ + (_dest) = pagestart + ((_addr) & PAGEFRAME_BYTEMASK); \ + else goto _if; \ +} while(0) +#define FAST_IFETCH(_regs, _pe, _ip, _if, _ex) \ +do { \ +_if: \ + (_regs)->instvalid = 0; \ + (_ip) = (_regs)->inst; \ + (_regs)->ip = (_ip); \ + ARCH_DEP(instfetch) ((_regs)->inst, (_regs)->psw.IA, (_regs)); \ + (regs)->instvalid = 1; \ + (_pe) = ((_regs)->psw.IA & ~0x7FF) + (0x800 - 6); \ + pagestart = (_regs)->mainstor + (_regs)->AI; \ + goto _ex; \ +} while(0) + +/* Instruction execution */ #define EXECUTE_INSTRUCTION(_instruction, _execflag, _regs) \ do { \ - sysblk.footprregs[(_regs)->cpuad][sysblk.footprptr[(_regs)->cpuad]] = *(_regs); \ - memcpy(&sysblk.footprregs[(_regs)->cpuad][sysblk.footprptr[(_regs)->cpuad]++].inst,(_instruction),6); \ - sysblk.footprptr[(_regs)->cpuad] &= OPTION_FOOTPRINT_BUFFER - 1; \ + FOOTPRINT((_regs)); \ COUNT_INST((_instruction), (_regs)); \ opcode_table[((_instruction)[0])][ARCH_MODE]((_instruction), (_execflag), (_regs)); \ } while(0) -#endif /*defined(OPTION_FOOTPRINT_BUFFER)*/ +#define FAST_EXECUTE_INSTRUCTION(_inst, _execflag, _regs) \ +do { \ + FOOTPRINT ((_regs)); \ + COUNT_INST ((_inst), (_regs)); \ + (_regs)->ip = (_inst); \ + (ARCH_DEP(opcode_table)[_inst[0]]) ((_inst), 0, (_regs)); \ +} while(0) + +/* Unrolled execution */ +#define UNROLLED_EXECUTE(_regs) \ +do { \ + (_regs)->instvalid = 0; \ + INSTRUCTION_FETCH((_regs)->inst, (_regs)->psw.IA, (_regs)); \ + (_regs)->instvalid = 1; \ + EXECUTE_INSTRUCTION ((_regs)->inst, 0, (_regs)); \ +} while(0) + +#define FAST_UNROLLED_EXECUTE(_regs, _pe, _ip, _if, _ex) \ +do { \ + FAST_INSTRUCTION_FETCH((_ip), (_regs)->psw.IA, (_regs), (_pe), _if); \ +_ex: \ + FAST_EXECUTE_INSTRUCTION((_ip), 0, (_regs)); \ +} while(0) -#if defined(OPTION_CPU_UNROLL) #define RETURN_INTCHECK(_regs) \ longjmp((_regs)->progjmp, SIE_NO_INTERCEPT) -#else -#define RETURN_INTCHECK(_regs) \ - return -#endif - #define ODD_CHECK(_r, _regs) \ if( (_r) & 1 ) \ @@ -341,6 +378,42 @@ do { \ #include "machdep.h" +/* Bit manipulation macros; if HAVE_CMPXCHG is defined then + the routines are architecture dependent but SMP safe */ +#ifdef HAVE_CMPXCHG + +#define set_bits(_ptr, _mask, _bits) \ +do { \ + U32 old = *(U32 *)(_ptr); \ + while ( cmpxchg4 (&old, (old & (_mask)) | (_bits), (U32 *)(_ptr)) ); \ +} while (0) + +#define or_bits(_ptr, _bits) \ +do { \ + U32 old = *(U32 *)(_ptr); \ + while ( cmpxchg4 (&old, old | (_bits), (U32 *)(_ptr)) ); \ +} while (0) + +#define and_bits(_ptr, _mask) \ +do { \ + U32 old = *(U32 *)(_ptr); \ + while ( cmpxchg4 (&old, old & (_mask), (U32 *)(_ptr)) ); \ +} while (0) + +#else /* HAVE_CMPXCHG */ + +#define set_bits(_ptr, _mask, _bits) \ +do { \ + *(U32 *)(_ptr) &= (_mask); \ + *(U32 *)(_ptr) |= (_bits); \ +} while (0) + +#define or_bits(_ptr, _bits) *(U32 *)(_ptr) |= (_bits) + +#define and_bits(_ptr, _mask) *(U32 *)(_ptr) &= (_mask) + +#endif /* HAVE_CMPXCHG */ + #endif /*!defined(_OPCODE_H)*/ @@ -453,7 +526,7 @@ do { \ } \ } -#endif /*!defined(_FEATURE_SIE)*/ +#endif /*!defined(_FEATURE_SIE)*/ /* Convert fpr to index */ @@ -494,227 +567,200 @@ do { \ #endif /*!defined(FEATURE_BASIC_FP_EXTENSIONS)*/ - -#if defined(OPTION_AIA_BUFFER) - -#undef INSTRUCTION_FETCH -#undef INVALIDATE_AIA - -#define INSTRUCTION_FETCH(_dest, _addr, _regs) \ -do { \ - if( (_regs)->VI == ((_addr) & PAGEFRAME_PAGEMASK) \ - && ((_addr) & 0x7FF) <= (0x800 - 6)) \ - { \ - if((_addr) & 0x01) \ - ARCH_DEP(program_interrupt)((_regs), PGM_SPECIFICATION_EXCEPTION); \ - memcpy ((_dest), (_regs)->mainstor + (_regs)->AI + \ - ((_addr) & PAGEFRAME_BYTEMASK) , 6); \ - } \ - else \ - ARCH_DEP(instfetch) ((_dest), (_addr), (_regs)); \ -} while(0) - #define INVALIDATE_AIA(_regs) \ (_regs)->VI = 1 -#else /*!defined(OPTION_AIA_BUFFER)*/ - -#define INSTRUCTION_FETCH(_dest, _addr, _regs) \ - ARCH_DEP(instfetch) ((_dest), (_addr), (_regs)) - -#define INVALIDATE_AIA(_regs) - -#endif /*!defined(OPTION_AIA_BUFFER)*/ - - -#if defined(OPTION_AEA_BUFFER) - -#if !defined(OPTION_FAST_LOGICAL) -#define LOGICAL_TO_ABS(_addr, _arn, _regs, _acctype, _akey) \ - (((_addr) & PAGEFRAME_PAGEMASK) == (_regs)->VE((_arn))) && \ - ((_arn) >= 0) && \ - (((_regs)->aekey[(_arn)] == (_akey)) || (_akey) == 0) && \ - ((_regs)->aeacc[(_arn)] >= (_acctype)) ? \ - ((_acctype) == ACCTYPE_READ) ? \ - (STORAGE_KEY((_regs)->AE((_arn)), (_regs)) |= STORKEY_REF, \ - ((_regs)->AE((_arn)) | ((_addr) & PAGEFRAME_BYTEMASK)) ) : \ - (STORAGE_KEY((_regs)->AE((_arn)), (_regs)) |= (STORKEY_REF | STORKEY_CHANGE), \ - ((_regs)->AE((_arn)) | ((_addr) & PAGEFRAME_BYTEMASK)) ) : \ - ARCH_DEP(logical_to_abs) ((_addr), (_arn), (_regs), (_acctype), (_akey)) - -#define LOGICAL_TO_ABS_SKP(_addr, _arn, _regs, _acctype, _akey) \ - (((_addr) & PAGEFRAME_PAGEMASK) == (_regs)->VE((_arn))) && \ - ((_arn) >= 0) && \ - (((_regs)->aekey[(_arn)] == (_akey)) || (_akey) == 0) && \ - ((_regs)->aeacc[(_arn)] >= (_acctype)) ? \ - ((_regs)->AE((_arn)) | ((_addr) & PAGEFRAME_BYTEMASK)) : \ - ARCH_DEP(logical_to_abs) ((_addr), (_arn), (_regs), (_acctype), (_akey)) - -#define INVALIDATE_AEA(_arn, _regs) \ - (_regs)->VE((_arn)) = 1 - -#define INVALIDATE_AEA_ALL(_regs) \ +#define INVALIDATE_AIA_ABS(_addr, _regs) \ do { \ - int i; \ - for(i = 0; i < 16; i++) \ - (_regs)->VE(i) = 1; \ -} while(0) - -#else + if (((_addr) & PAGEFRAME_PAGEMASK) == (_regs)->AI) \ + (_regs)->VI = 1; \ +} while (0) -#if defined(OPTION_REDUCED_INVAL) #define AEIND(_addr) (((_addr) >> PAGEFRAME_PAGESHIFT) & 0xff) #define MAXAEA 256 -#else -#define AEIND(_addr) (((_addr) >> PAGEFRAME_PAGESHIFT) & 0xf) -#define MAXAEA 16 -#endif #define LOGICAL_TO_ABS(_addr, _arn, _regs, _acctype, _akey) \ - (((_addr) & PAGEFRAME_PAGEMASK) == (_regs)->VE((AEIND(_addr)))) && \ - ((_arn) >= 0) && \ - (((_regs)->aekey[(AEIND(_addr))] == (_akey)) || (_akey) == 0) && \ - (((_regs)->aenoarn) || ((_regs)->aearn[AEIND(_addr)] == (_arn))) && \ - ((_regs)->aeacc[(AEIND(_addr))] >= (_acctype)) ? \ - ((_acctype) == ACCTYPE_READ) ? \ - (STORAGE_KEY((_regs)->AE((AEIND(_addr))), (_regs)) |= STORKEY_REF, \ - ((_regs)->AE((AEIND(_addr))) | ((_addr) & PAGEFRAME_BYTEMASK)) ) : \ - (STORAGE_KEY((_regs)->AE((AEIND(_addr))), (_regs)) |= (STORKEY_REF | STORKEY_CHANGE), \ - ((_regs)->AE((AEIND(_addr))) | ((_addr) & PAGEFRAME_BYTEMASK)) ) : \ - ARCH_DEP(logical_to_abs) ((_addr), (_arn), (_regs), (_acctype), (_akey)) + (((_addr) & PAGEFRAME_PAGEMASK) | (_regs)->aeID) == (_regs)->VE(AEIND(_addr)) \ + && (_arn) >= 0 \ + && ((_akey) == 0 || (_regs)->aekey[AEIND(_addr)] == (_akey)) \ + && ( ( (_regs)->aenoarn && (_regs)->aearn[AEIND(_addr)] == 0 ) \ + || ( !(_regs)->aenoarn \ + && ( (_regs)->aearn[AEIND(_addr)] == (_arn) \ + || ((_regs)->aearn[AEIND(_addr)] == 0 && (_regs)->AR(_arn) == 0) \ + ) \ + ) \ + ) \ + && (_regs)->aeacc[AEIND(_addr)] >= (_acctype) \ + ? (_acctype) == ACCTYPE_READ \ + ? ( STORAGE_KEY((_regs)->AE(AEIND(_addr)), (_regs)) |= STORKEY_REF, \ + (_regs)->AE(AEIND(_addr)) | ((_addr) & PAGEFRAME_BYTEMASK) \ + ) \ + : ( STORAGE_KEY((_regs)->AE(AEIND(_addr)), (_regs)) |= (STORKEY_REF|STORKEY_CHANGE), \ + (_regs)->AE(AEIND(_addr)) | ((_addr) & PAGEFRAME_BYTEMASK) \ + ) \ + : ARCH_DEP(logical_to_abs) ((_addr), (_arn), (_regs), (_acctype), (_akey)) #define LOGICAL_TO_ABS_SKP(_addr, _arn, _regs, _acctype, _akey) \ - (((_addr) & PAGEFRAME_PAGEMASK) == (_regs)->VE((AEIND(_addr)))) && \ - ((_arn) >= 0) && \ - (((_regs)->aekey[(AEIND(_addr))] == (_akey)) || (_akey) == 0) && \ - (((_regs)->aenoarn) || ((_regs)->aearn[AEIND(_addr)] == (_arn))) && \ - ((_regs)->aeacc[(AEIND(_addr))] >= (_acctype)) ? \ - ((_regs)->AE((AEIND(_addr))) | ((_addr) & PAGEFRAME_BYTEMASK)) : \ - ARCH_DEP(logical_to_abs) ((_addr), (_arn), (_regs), (_acctype), (_akey)) - -#define INVALIDATE_AEA(_arn, _regs) \ + (((_addr) & PAGEFRAME_PAGEMASK) | (_regs)->aeID) == (_regs)->VE(AEIND(_addr)) \ + && (_arn) >= 0 \ + && ((_akey) == 0 || (_regs)->aekey[AEIND(_addr)] == (_akey)) \ + && ( ( (_regs)->aenoarn && (_regs)->aearn[AEIND(_addr)] == 0 ) \ + || ( !(_regs)->aenoarn \ + && ( (_regs)->aearn[AEIND(_addr)] == (_arn) \ + || ((_regs)->aearn[AEIND(_addr)] == 0 && (_regs)->AR(_arn) == 0) \ + ) \ + ) \ + ) \ + && (_regs)->aeacc[AEIND(_addr)] >= (_acctype) \ + ? ( \ + (_regs)->AE(AEIND(_addr)) | ((_addr) & PAGEFRAME_BYTEMASK) \ + ) \ + : ( \ + ARCH_DEP(logical_to_abs) ((_addr), (_arn), (_regs), (_acctype), (_akey)) \ + ) + +#undef SET_AENOARN +#if defined(FEATURE_ACCESS_REGISTERS) +#define SET_AENOARN(_regs) \ + (_regs)->aenoarn = !(ACCESS_REGISTER_MODE(&regs->psw)) +#else +#define SET_AENOARN(_regs) \ + (_regs)->aenoarn = 1 +#endif + +#define INVALIDATE_AEA_AR(_arn, _regs) \ do { \ int i; \ - (_regs)->aenoarn = 0; \ - for(i = 0; i < MAXAEA; i++) \ - (_regs)->VE(i) = 1; \ + if ((_regs)->aearvalid) \ + for(i = 0; i < MAXAEA; i++) \ + if ((_regs)->aearn[i] == (_arn)) \ + (_regs)->VE(i) = 0; \ } while(0) -#define INVALIDATE_AEA_ALL(_regs) \ +#define INVALIDATE_AEA_ARALL(_regs) \ do { \ int i; \ - (_regs)->aenoarn = 0; \ - for(i = 0; i < MAXAEA; i++) \ - (_regs)->VE(i) = 1; \ + if ((_regs)->aearvalid) \ + { \ + (_regs)->aearvalid = 0; \ + for(i = 0; i < MAXAEA; i++) \ + if ((_regs)->aearn[i] != 0) \ + (_regs)->VE(i) = 0; \ + } \ } while(0) -#endif - -#else /*!defined(OPTION_AEA_BUFFER)*/ -#define LOGICAL_TO_ABS(_addr, _arn, _regs, _acctype, _akey) \ - ARCH_DEP(logical_to_abs) ((_addr), (_arn), (_regs), (_acctype), (_akey)) - -#define LOGICAL_TO_ABS_SKP(_addr, _arn, _regs, _acctype, _akey) \ - ARCH_DEP(logical_to_abs) ((_addr), (_arn), (_regs), (_acctype), (_akey)) - -#define INVALIDATE_AEA(_arn, _regs) +#define INVALIDATE_AEA_ABS(_addr, _regs) \ +do { \ + int i; \ + for(i = 0; i < MAXAEA; i++) \ + if (((_addr) & PAGEFRAME_PAGEMASK) == (_regs)->AE(i)) \ + (_regs)->VE(i) = 0; \ +} while(0) -#define INVALIDATE_AEA_ALL(_regs) +#define INVALIDATE_AEA_ALL(_regs) \ +do { \ + (_regs)->aeID++; \ + (_regs)->aearvalid = 0; \ + if ((_regs)->aeID == PAGEFRAME_PAGESIZE) \ + { \ + (_regs)->aeID = 1; \ + memset((_regs)->ve, 0, 256*sizeof(DW)); \ + } \ +} while (0) -#endif /*!defined(OPTION_AEA_BUFFER)*/ #define INST_UPDATE_PSW(_regs, _len, _execflag) \ - { \ - if( !(_execflag) ) \ - { \ - (_regs)->psw.ilc = (_len); \ - (_regs)->psw.IA += (_len); \ - (_regs)->psw.IA &= ADDRESS_MAXWRAP((_regs)); \ - } \ - } + { \ + if( !(_execflag) ) \ + { \ + (_regs)->psw.ilc = (_len); \ + (_regs)->psw.IA += (_len); \ + (_regs)->psw.IA &= ADDRESS_MAXWRAP((_regs)); \ + } \ + } /* E implied operands and extended op code */ #undef E #define E(_inst, _execflag, _regs) \ - { \ + { \ INST_UPDATE_PSW((_regs), 2, (_execflag)); \ - } + } /* RR register to register */ #undef RR #if defined(FETCHIBYTE1) #define RR(_inst, _execflag, _regs, _r1, _r2) \ - { \ + { \ register U32 ib; \ FETCHIBYTE1(ib, (_inst)) \ - (_r1) = ib >> 4; \ - (_r2) = ib & 0x0F; \ + (_r1) = ib >> 4; \ + (_r2) = ib & 0x0F; \ INST_UPDATE_PSW((_regs), 2, (_execflag)); \ - } + } #else #define RR(_inst, _execflag, _regs, _r1, _r2) \ - { \ - (_r1) = (_inst)[1] >> 4; \ - (_r2) = (_inst)[1] & 0x0F; \ + { \ + (_r1) = (_inst)[1] >> 4; \ + (_r2) = (_inst)[1] & 0x0F; \ INST_UPDATE_PSW((_regs), 2, (_execflag)); \ - } + } #endif /* RR special format for SVC instruction */ #undef RR_SVC #if defined(FETCHIBYTE1) #define RR_SVC(_inst, _execflag, _regs, _svc) \ - { \ + { \ FETCHIBYTE1((_svc), (_inst)) \ INST_UPDATE_PSW((_regs), 2, (_execflag)); \ - } + } #else #define RR_SVC(_inst, _execflag, _regs, _svc) \ - { \ - (_svc) = (_inst)[1]; \ + { \ + (_svc) = (_inst)[1]; \ INST_UPDATE_PSW((_regs), 2, (_execflag)); \ - } + } #endif /* RRE register to register with extended op code */ #undef RRE #define RRE(_inst, _execflag, _regs, _r1, _r2) \ - { U32 temp; \ + { U32 temp; \ memcpy (&temp, (_inst), 4); \ temp = CSWAP32(temp); \ (_r1) = (temp >> 4) & 0xf; \ (_r2) = temp & 0xf; \ INST_UPDATE_PSW((_regs), 4, (_execflag)); \ - } + } /* RRF register to register with additional R3 field */ #undef RRF_R #define RRF_R(_inst, _execflag, _regs, _r1, _r2, _r3) \ - { U32 temp; \ + { U32 temp; \ memcpy (&temp, (_inst), 4); \ temp = CSWAP32(temp); \ (_r1) = (temp >> 12) & 0xf; \ (_r3) = (temp >> 4) & 0xf; \ (_r2) = temp & 0xf; \ INST_UPDATE_PSW((_regs), 4, (_execflag)); \ - } + } /* RRF register to register with additional M3 field */ #undef RRF_M #define RRF_M(_inst, _execflag, _regs, _r1, _r2, _m3) \ - { U32 temp; \ + { U32 temp; \ memcpy (&temp, (_inst), 4); \ temp = CSWAP32(temp); \ (_m3) = (temp >> 12) & 0xf; \ (_r1) = (temp >> 4) & 0xf; \ (_r2) = temp & 0xf; \ INST_UPDATE_PSW((_regs), 4, (_execflag)); \ - } + } /* RRF register to register with additional R3 and M4 fields */ #undef RRF_RM #define RRF_RM(_inst, _execflag, _regs, _r1, _r2, _r3, _m4) \ - { U32 temp; \ + { U32 temp; \ memcpy (&temp, (_inst), 4); \ temp = CSWAP32(temp); \ (_r3) = (temp >> 12) & 0xf; \ @@ -794,6 +840,49 @@ do { \ INST_UPDATE_PSW((_regs), 6, (_execflag)); \ } +/* RXY register and indexed storage with extended op code + and long displacement */ +#undef RXY +#if defined(FEATURE_LONG_DISPLACEMENT) +#define RXY(_inst, _execflag, _regs, _r1, _b2, _effective_addr2) \ + { U32 temp; S32 temp2; int tempx; \ + memcpy (&temp, (_inst), 4); \ + temp = CSWAP32(temp); \ + (_r1) = (temp >> 20) & 0xf; \ + tempx = (temp >> 16) & 0xf; \ + (_b2) = (temp >> 12) & 0xf; \ + temp2 = (_inst[4] << 12) | (temp & 0xfff); \ + if (temp2 & 0x80000) temp2 |= 0xfff00000; \ + (_effective_addr2) = \ + (tempx ? (_regs)->GR(tempx) : (GREG)0) + \ + ((_b2) ? (_regs)->GR((_b2)) : (GREG)0) + \ + temp2; \ + (_effective_addr2) &= ADDRESS_MAXWRAP((_regs)); \ + INST_UPDATE_PSW((_regs), 6, (_execflag)); \ + } +#else /*!defined(FEATURE_LONG_DISPLACEMENT)*/ +#define RXY(_inst, _execflag, _regs, _r1, _b2, _effective_addr2) \ + { U32 temp; \ + memcpy (&temp, (_inst), 4); \ + temp = CSWAP32(temp); \ + (_r1) = (temp >> 20) & 0xf; \ + (_b2) = (temp >> 16) & 0xf; \ + (_effective_addr2) = temp & 0xfff; \ + if((_b2)) \ + { \ + (_effective_addr2) += (_regs)->GR((_b2)); \ + (_effective_addr2) &= ADDRESS_MAXWRAP((_regs)); \ + } \ + (_b2) = (temp >> 12) & 0xf; \ + if((_b2)) \ + { \ + (_effective_addr2) += (_regs)->GR((_b2)); \ + (_effective_addr2) &= ADDRESS_MAXWRAP((_regs)); \ + } \ + INST_UPDATE_PSW((_regs), 6, (_execflag)); \ + } +#endif /*!defined(FEATURE_LONG_DISPLACEMENT)*/ + /* RS register and storage with additional R3 or M3 field */ #undef RS #define RS(_inst, _execflag, _regs, _r1, _r3, _b2, _effective_addr2) \ @@ -814,6 +903,7 @@ do { \ /* RSE register and storage with extended op code and additional R3 or M3 field (note, this is NOT the ESA/390 vector RSE format) */ +/* Note: Effective June 2003, RSE is retired and replaced by RSY */ #undef RSE #define RSE(_inst, _execflag, _regs, _r1, _r3, _b2, _effective_addr2) \ { U32 temp; \ @@ -831,6 +921,43 @@ do { \ INST_UPDATE_PSW((_regs), 6, (_execflag)); \ } +/* RSY register and storage with extended op code, long displacement, + and additional R3 or M3 field */ +#undef RSY +#if defined(FEATURE_LONG_DISPLACEMENT) +#define RSY(_inst, _execflag, _regs, _r1, _r3, _b2, _effective_addr2) \ + { U32 temp; S32 temp2; \ + memcpy (&temp, (_inst), 4); \ + temp = CSWAP32(temp); \ + (_r1) = (temp >> 20) & 0xf; \ + (_r3) = (temp >> 16) & 0xf; \ + (_b2) = (temp >> 12) & 0xf; \ + temp2 = (_inst[4] << 12) | (temp & 0xfff); \ + if (temp2 & 0x80000) temp2 |= 0xfff00000; \ + (_effective_addr2) = \ + ((_b2) ? (_regs)->GR((_b2)) : (GREG)0) + \ + temp2; \ + (_effective_addr2) &= ADDRESS_MAXWRAP((_regs)); \ + INST_UPDATE_PSW((_regs), 6, (_execflag)); \ + } +#else /*!defined(FEATURE_LONG_DISPLACEMENT)*/ +#define RSY(_inst, _execflag, _regs, _r1, _r3, _b2, _effective_addr2) \ + { U32 temp; \ + memcpy (&temp, (_inst), 4); \ + temp = CSWAP32(temp); \ + (_r1) = (temp >> 20) & 0xf; \ + (_r3) = (temp >> 16) & 0xf; \ + (_b2) = (temp >> 12) & 0xf; \ + (_effective_addr2) = temp & 0xfff; \ + if((_b2) != 0) \ + { \ + (_effective_addr2) += (_regs)->GR((_b2)); \ + (_effective_addr2) &= ADDRESS_MAXWRAP((_regs)); \ + } \ + INST_UPDATE_PSW((_regs), 6, (_execflag)); \ + } +#endif /*!defined(FEATURE_LONG_DISPLACEMENT)*/ + /* RSL storage operand with extended op code and 4-bit L field */ #undef RSL #define RSL(_inst, _execflag, _regs, _l1, _b1, _effective_addr1) \ @@ -915,6 +1042,25 @@ do { \ INST_UPDATE_PSW((_regs), 4, (_execflag)); \ } +/* SIY storage and immediate with long displacement */ +#undef SIY +#if defined(FEATURE_LONG_DISPLACEMENT) +#define SIY(_inst, _execflag, _regs, _i2, _b1, _effective_addr1) \ + { U32 temp; S32 temp1; \ + memcpy (&temp, (_inst), 4); \ + temp = CSWAP32(temp); \ + (_i2) = (temp >> 16) & 0xff; \ + (_b1) = (temp >> 12) & 0xf; \ + temp1 = (_inst[4] << 12) | (temp & 0xfff); \ + if (temp1 & 0x80000) temp1 |= 0xfff00000; \ + (_effective_addr1) = \ + ((_b1) ? (_regs)->GR((_b1)) : (GREG)0) + \ + temp1; \ + (_effective_addr1) &= ADDRESS_MAXWRAP((_regs)); \ + INST_UPDATE_PSW((_regs), 6, (_execflag)); \ + } +#endif /*defined(FEATURE_LONG_DISPLACEMENT)*/ + /* S storage operand only */ #undef S #define S(_inst, _execflag, _regs, _b2, _effective_addr2) \ @@ -1225,37 +1371,20 @@ do { \ #endif /*defined(FEATURE_VECTOR_FACILITY)*/ -#undef PERFORM_SERIALIZATION -#if MAX_CPU_ENGINES > 1 && defined(SMP_SERIALIZATION) - /* In order to syncronize mainstorage access we need to flush - the cache on all processors, this needs special case when - running on an SMP machine, as the physical CPU's actually - need to perform this function. This is accomplished by - obtaining and releasing a mutex lock, which is intended to - serialize storage access */ -#define PERFORM_SERIALIZATION(_regs) \ - { \ - obtain_lock(&regs->serlock); \ - release_lock(&regs->serlock); \ - } -#else /*!SERIALIZATION*/ #define PERFORM_SERIALIZATION(_regs) -#endif /*SERIALIZATION*/ - - #define PERFORM_CHKPT_SYNC(_regs) #if !defined(NO_SETUID) -/* SETMODE(INIT) +/* SETMODE(INIT) * sets the saved uid to the effective uid, and * sets the effective uid to the real uid, such * that the program is running with normal user * attributes, other then that it may switch to * the saved uid by SETMODE(ROOT). This call is * usually made upon entry to the setuid program. - * + * * SETMODE(ROOT) * sets the saved uid to the real uid, and * sets the real and effective uid to the saved uid. @@ -1263,15 +1392,15 @@ do { \ * will have all the appropriate access. * * SETMODE(USER) - * sets the real and effective uid to the uid of the - * caller. The saved uid will be the effective uid + * sets the real and effective uid to the uid of the + * caller. The saved uid will be the effective uid * upon entry to the program (as before SETMODE(INIT)) * * SETMODE(TERM) * sets real, effective and saved uid to the real uid - * upon entry to the program. This call will revoke + * upon entry to the program. This call will revoke * any setuid access that the thread/process has. It - * is important to issue this call before an exec to a + * is important to issue this call before an exec to a * shell or other program that could introduce integrity * exposures when running with root access. */ @@ -1363,7 +1492,7 @@ int haltio (REGS *regs, DEVBLK *dev, BYTE ibyte); int resume_subchan (REGS *regs, DEVBLK *dev); int ARCH_DEP(present_io_interrupt) (REGS *regs, U32 *ioid, U32 *ioparm, U32 *iointid, BYTE *csw); -int ARCH_DEP(present_zone_io_interrupt) (U32 *ioid, U32 *ioparm, +int ARCH_DEP(present_zone_io_interrupt) (U32 *ioid, U32 *ioparm, U32 *iointid, BYTE zone); void io_reset (void); int chp_reset(BYTE chpid); @@ -1407,8 +1536,19 @@ void ARCH_DEP(access_reipl_data) (int r1, int r2, REGS *regs); int ARCH_DEP(diag_ppagerel) (int r1, int r2, REGS *regs); +/* Functions in module control.c */ +void ARCH_DEP(load_real_address_proc) (REGS *regs, + int r1, int b2, VADR effective_addr2); + + +/* Functions in module decimal.c */ +void packed_to_binary (BYTE *dec, int len, U64 *result, + int *ovf, int *dxf); +void binary_to_packed (S64 bin, BYTE *result); + + /* Functions in module diagnose.c */ -void ARCH_DEP(diagnose_call) (U32 effective_addr2, int r1, int r3, +void ARCH_DEP(diagnose_call) (VADR effective_addr2, int b2, int r1, int r3, REGS *regs); @@ -1573,6 +1713,14 @@ DEF_INST(trace_svc_return); DEF_INST(compression_call); +/* Instructions in crypto.c */ +DEF_INST(cipher_message_r); +DEF_INST(cipher_message_with_chaining_r); +DEF_INST(compute_intermediate_message_digest_r); +DEF_INST(compute_last_message_digest_r); +DEF_INST(compute_message_authentication_code_r); + + /* Instructions in control.c */ DEF_INST(branch_and_set_authority); DEF_INST(branch_in_subspace_group); @@ -1659,6 +1807,10 @@ DEF_INST(set_zone_parameter); DEF_INST(test_pending_zone_interrupt); +/* Instructions in qdio.c */ +DEF_INST(signal_adapter); + + /* Instructions in float.c */ DEF_INST(load_positive_float_long_reg); DEF_INST(load_negative_float_long_reg); @@ -1740,6 +1892,26 @@ DEF_INST(loadlength_float_short_to_ext); DEF_INST(squareroot_float_short); DEF_INST(squareroot_float_long); DEF_INST(multiply_float_short); +DEF_INST(load_float_ext_reg); +DEF_INST(load_zero_float_short_reg); +DEF_INST(load_zero_float_long_reg); +DEF_INST(load_zero_float_ext_reg); +DEF_INST(convert_bfp_long_to_float_long_reg); +DEF_INST(convert_bfp_short_to_float_long_reg); +DEF_INST(convert_float_long_to_bfp_long_reg); +DEF_INST(convert_float_long_to_bfp_short_reg); +DEF_INST(multiply_add_float_short_reg); +DEF_INST(multiply_add_float_long_reg); +DEF_INST(multiply_add_float_short); +DEF_INST(multiply_add_float_long); +DEF_INST(multiply_subtract_float_short_reg); +DEF_INST(multiply_subtract_float_long_reg); +DEF_INST(multiply_subtract_float_short); +DEF_INST(multiply_subtract_float_long); +DEF_INST(load_float_long_y); +DEF_INST(load_float_short_y); +DEF_INST(store_float_long_y); +DEF_INST(store_float_short_y); /* Instructions in general.c */ @@ -2107,6 +2279,72 @@ DEF_INST(translate_one_to_two); DEF_INST(translate_one_to_one); DEF_INST(move_long_unicode); DEF_INST(compare_logical_long_unicode); +DEF_INST(add_y); +DEF_INST(add_halfword_y); +DEF_INST(add_logical_y); +DEF_INST(and_immediate_y); +DEF_INST(and_y); +DEF_INST(compare_y); +DEF_INST(compare_and_swap_y); +DEF_INST(compare_double_and_swap_y); +DEF_INST(compare_halfword_y); +DEF_INST(compare_logical_y); +DEF_INST(compare_logical_immediate_y); +DEF_INST(compare_logical_characters_under_mask_y); +DEF_INST(convert_to_binary_y); +DEF_INST(convert_to_decimal_y); +DEF_INST(exclusive_or_immediate_y); +DEF_INST(exclusive_or_y); +DEF_INST(insert_character_y); +DEF_INST(insert_characters_under_mask_y); +DEF_INST(load_y); +DEF_INST(load_access_multiple_y); +DEF_INST(load_address_y); +DEF_INST(load_byte); +DEF_INST(load_byte_long); +DEF_INST(load_halfword_y); +DEF_INST(load_multiple_y); +DEF_INST(load_real_address_y); +DEF_INST(move_immediate_y); +DEF_INST(multiply_single_y); +DEF_INST(or_immediate_y); +DEF_INST(or_y); +DEF_INST(store_y); +DEF_INST(store_access_multiple_y); +DEF_INST(store_character_y); +DEF_INST(store_characters_under_mask_y); +DEF_INST(store_halfword_y); +DEF_INST(store_multiple_y); +DEF_INST(subtract_y); +DEF_INST(subtract_halfword_y); +DEF_INST(subtract_logical_y); +DEF_INST(test_under_mask_y); + + +/* Instructions in ecpsvm.c */ +DEF_INST(ecpsvm_basic_freex); +DEF_INST(ecpsvm_basic_fretx); +DEF_INST(ecpsvm_lock_page); +DEF_INST(ecpsvm_unlock_page); +DEF_INST(ecpsvm_decode_next_ccw); +DEF_INST(ecpsvm_free_ccwstor); +DEF_INST(ecpsvm_locate_vblock); +DEF_INST(ecpsvm_disp1); +DEF_INST(ecpsvm_tpage); +DEF_INST(ecpsvm_tpage_lock); +DEF_INST(ecpsvm_inval_segtab); +DEF_INST(ecpsvm_inval_ptable); +DEF_INST(ecpsvm_decode_first_ccw); +DEF_INST(ecpsvm_dispatch_main); +DEF_INST(ecpsvm_locate_rblock); +DEF_INST(ecpsvm_comm_ccwproc); +DEF_INST(ecpsvm_unxlate_ccw); +DEF_INST(ecpsvm_disp2); +DEF_INST(ecpsvm_store_level); +DEF_INST(ecpsvm_loc_chgshrpg); +DEF_INST(ecpsvm_extended_freex); +DEF_INST(ecpsvm_extended_fretx); +DEF_INST(ecpsvm_prefmach_assist); /* Instructions in ieee.c */ diff --git a/panel.c b/panel.c index f48a885..5afc5f8 100644 --- a/panel.c +++ b/panel.c @@ -4,12 +4,8 @@ /* Modified for New Panel Display =NP= */ /*-------------------------------------------------------------------*/ /* This module is the control panel for the ESA/390 emulator. */ -/* It provides functions for displaying the PSW and registers */ -/* and a command line for requesting control operations such */ -/* as IPL, stop, start, single stepping, instruction tracing, */ -/* and storage displays. It displays messages issued by other */ -/* threads via the logmsg macro, and optionally also writes */ -/* all messages to a log file if stdout is redirected. */ +/* It provides a command interface into hercules, and it displays */ +/* messages that are issued by various hercules components. */ /*-------------------------------------------------------------------*/ /*-------------------------------------------------------------------*/ @@ -30,38 +26,12 @@ /*-------------------------------------------------------------------*/ #include "hercules.h" - #include "devtype.h" - #include "opcode.h" - // #include "inline.h" -#if defined(OPTION_FISHIO) -#include "w32chan.h" -#endif /* defined(OPTION_FISHIO) */ - -#if defined(FISH_HANG) -extern int bFishHangAtExit; // (set to true when shutting down) -extern void FishHangInit(char* pszFileCreated, int nLineCreated); -extern void FishHangReport(); -extern void FishHangAtExit(); -#endif // defined(FISH_HANG) - #define DISPLAY_INSTRUCTION_OPERANDS - -/* (Socket Devices...) */ -int bind_device (DEVBLK* dev, char* spec); -int unbind_device (DEVBLK* dev); -int unix_socket (char* path); -int inet_socket (char* spec); -int add_socket_devices_to_fd_set (fd_set* mask, int maxfd); -void check_socket_devices_for_connections (fd_set* mask); -void socket_device_connection_handler (bind_struct* bs); -char* safe_strdup (char* str); - - /*=NP================================================================*/ /* Global data for new panel display */ /* (Note: all NPD mods are identified by the string =NP= */ @@ -109,6 +79,50 @@ char* safe_strdup (char* str); #define ANSI_CLEAR_EOL "\x1B[K" #define ANSI_CURSOR "\x1B[%d;%dH" +/*-------------------------------------------------------------------*/ +/* Definitions for ANSI control sequences */ +/*-------------------------------------------------------------------*/ +#define ANSI_SAVE_CURSOR "\x1B[s" +#define ANSI_CURSOR_UP "\x1B[1A" +#define ANSI_CURSOR_DOWN "\x1B[1B" +#define ANSI_CURSOR_FORWARD "\x1B[1C" +#define ANSI_CURSOR_BACKWARD "\x1B[1D" +#define ANSI_POSITION_CURSOR "\x1B[%d;%dH" +#define ANSI_ROW1_COL1 "\x1B[1;1H" +#define ANSI_ROW1_COL80 "\x1B[1;80H" +#define ANSI_ROW22_COL80 "\x1B[22;80H" +#define ANSI_ROW23_COL1 "\x1B[23;1H" +#define ANSI_ROW24_COL1 "\x1B[24;1H" +#define ANSI_ROW24_COL79 "\x1B[24;79H" +#define ANSI_BLACK_GREEN "\x1B[30;42m" +#define ANSI_YELLOW_RED "\x1B[33;1;41m" +#define ANSI_WHITE_BLACK "\x1B[0m" +#define ANSI_HIGH_INTENSITY "\x1B[1m" +#define ANSI_ERASE_EOL "\x1B[K" +#define ANSI_ERASE_SCREEN "\x1B[2J" +#define ANSI_RESTORE_CURSOR "\x1B[u" + +/*-------------------------------------------------------------------*/ +/* Definitions for keyboard input sequences */ +/*-------------------------------------------------------------------*/ +#define KBD_HOME "\x1B[1~" +#define KBD_INSERT "\x1B[2~" +#define KBD_DELETE "\x1B[3~" +#define KBD_END "\x1B[4~" +#define KBD_PAGE_UP "\x1B[5~" +#define KBD_PAGE_DOWN "\x1B[6~" +#define KBD_UP_ARROW "\x1B[A" +#define KBD_DOWN_ARROW "\x1B[B" +#define KBD_RIGHT_ARROW "\x1B[C" +#define KBD_LEFT_ARROW "\x1B[D" +#define xKBD_UP_ARROW "\x1BOA" +#define xKBD_DOWN_ARROW "\x1BOB" +#define xKBD_RIGHT_ARROW "\x1BOC" +#define xKBD_LEFT_ARROW "\x1BOD" + +#define ANSI_RESET_WHT_BLK "\x1B[0;37;40m" +#define ANSI_CLEAR_SCREEN "\x1B[2J" + int NPDup = 0; /* 1 when new panel is up */ int NPDinit = 0; /* 1 when new panel is initialized */ int NPhelpup = 0; /* 1 when displaying help panel */ @@ -152,27 +166,98 @@ char NPcurprompt1[40]; char NPcurprompt2[40]; U32 NPaaddr; -#ifdef EXTERNALGUI -/*-------------------------------------------------------------------*/ -/* External GUI control */ -/*-------------------------------------------------------------------*/ -#ifdef OPTION_MIPS_COUNTING -U32 mipsrate = 0; -U32 siosrate = 0; -U32 prevmipsrate = 0; -U32 prevsiosrate = 0; -int gui_cpupct = 0; /* 1=cpu percentage active */ -#endif /*OPTION_MIPS_COUNTING*/ -int gui_gregs = 1; /* 1=gregs status active */ -int gui_cregs = 1; /* 1=cregs status active */ -int gui_aregs = 1; /* 1=aregs status active */ -int gui_fregs = 1; /* 1=fregs status active */ -int gui_devlist = 1; /* 1=devlist status active */ -DEVBLK* dev; -BYTE* devclass; -char devnam[256]; -int stat_online, stat_busy, stat_pend, stat_open; -#endif /*EXTERNALGUI*/ +#define MAX_MSGS 800 /* Number of slots in buffer */ +#define MSG_SIZE 80 /* Size of one message */ +#define BUF_SIZE (MAX_MSGS*MSG_SIZE) /* Total size of buffer */ +#define NUM_LINES 22 /* Number of scrolling lines */ +#define CMD_SIZE 32767 /* Length of command line */ + +static int firstmsgn = 0; /* Number of first message to + be displayed relative to + oldest message in buffer */ +static BYTE *msgbuf; /* Circular message buffer */ +static int msgslot = 0; /* Next available buffer slot*/ +static int nummsgs = 0; /* Number of msgs in buffer */ + +#if 1 +// +// +// THE FOLLOWING CODE IS HERE TO PROVIDE COMPATIBILIY WITH THE CURRENT +// PANEL IMPLEMENTATION +// +// THE PANEL DISPLAY SHOULD AT SOME POINT BE REWRITTEN TO USE LOG_LINE +// AND LOG_READ RATHER THEN THE MESSAGE PIPE PROVIDED HERE +// +// +FILE *compat_msgpipew; /* Message pipe write handle */ +int compat_msgpiper; /* Message pipe read handle */ +int compat_shutdown; /* Shutdown flag */ + +#if defined(OPTION_DYNAMIC_LOAD) +void *(*panel_command) (void *); +void (*panel_display) (void); +void (*daemon_task) (void); +int (*config_command) (int argc, char *argv[], char *cmdline); +int (*system_command) (int argc, char *argv[], char *cmdline); +void *(*debug_cpu_state) (REGS *); +void *(*debug_device_state) (DEVBLK *); +void *(*debug_program_interrupt) (REGS *, int); +void *(*debug_diagnose) (U32, int, int, REGS *); +void *(*debug_sclp_unknown_command) (U32, void *, REGS *); +void *(*debug_sclp_unknown_event) (void *, void *, REGS *); +void *(*debug_sclp_event_data) (void *, void *, REGS *); +void *(*debug_chsc_unknown_request) (void *, void *, REGS *); +#endif + +static char *lmsbuf; +static int lmsnum; +static int lmscnt; +static void *panel_compat_thread(void *arg) +{ + + UNREFERENCED(arg); + + while(!compat_shutdown) + if((lmscnt = log_read(&lmsbuf, &lmsnum, LOG_BLOCK))) + fwrite(lmsbuf,lmscnt,1,compat_msgpipew); + + fclose(compat_msgpipew); + + return NULL; +} + + +static void panel_compat_init() +{ +ATTR compat_attr; +int rc, pfd[2]; +TID compat_tid; + + rc = pipe (pfd); + if (rc < 0) + { + logmsg(_("HHCLG013S Message pipe creation failed: %s\n"), + strerror(errno)); + exit(1); + } + + compat_shutdown = 0; + compat_msgpiper = pfd[0]; + compat_msgpipew = fdopen (pfd[1], "w"); + if (compat_msgpipew == NULL) + { + compat_msgpipew = stderr; + logmsg(_("HHCLG014S Message pipe open failed: %s\n"), + strerror(errno)); + exit(1); + } + setvbuf (compat_msgpipew, NULL, _IOLBF, 0); + + initialize_detach_attr (&compat_attr); + + create_thread(&compat_tid, &compat_attr, panel_compat_thread, NULL); +} +#endif /*=NP================================================================*/ /* Initialize the NP data */ @@ -219,7 +304,7 @@ static void NP_screen(FILE *confp) fprintf(confp, ANSI_CLEAR); fprintf(confp, ANSI_WHT_BLU); fprintf(confp, ANSI_CURSOR, 1, 1); - fprintf(confp, " Hercules CPU %7.7s ", + fprintf(confp, " Hercules CPU %7.7s ", get_arch_mode_string(NULL)); fprintf(confp, ANSI_CURSOR, 1, 38); fprintf(confp, "| Peripherals "); @@ -401,6 +486,16 @@ static void NP_update(FILE *confp, char *cmdline, int cmdoff) memset (curpsw, 0x00, sizeof(curpsw)); store_psw (regs, curpsw); + if( regs->arch_mode == ARCH_900 ) + { + curpsw[1] |= 0x08; + curpsw[4] |= curpsw[12]; + curpsw[5] |= curpsw[13]; + curpsw[6] |= curpsw[14]; + curpsw[7] |= curpsw[15]; + if(regs->psw.IA_G > 0x7FFFFFFFULL) + curpsw[7] |= 0x01; + } pswwait = curpsw[1] & 0x02; fprintf (confp, ANSI_YLW_BLK); fprintf (confp, ANSI_CURSOR, 3, 2); @@ -452,7 +547,7 @@ static void NP_update(FILE *confp, char *cmdline, int cmdoff) } break; case 4: - aaddr = APPLY_PREFIXING (NPaddress, regs->PX); + aaddr = APPLY_PREFIXING ((U32)NPaddress, regs->PX); if (aaddr > regs->mainlim) break; curreg[i] = 0; @@ -495,6 +590,9 @@ static void NP_update(FILE *confp, char *cmdline, int cmdoff) mipsrate += sysblk.regs[i].mipsrate; siosrate += sysblk.regs[i].siosrate; } +#ifdef OPTION_SHARED_DEVICES + siosrate += sysblk.shrdrate; +#endif if (mipsrate > 100000) mipsrate = 0; /* ignore wildly high rate */ fprintf(confp, "%2.1d.%2.2d %5d", mipsrate / 1000, (mipsrate % 1000) / 10, @@ -565,7 +663,7 @@ static void NP_update(FILE *confp, char *cmdline, int cmdoff) (strlen(dev->filename) > 0)) online = 1; if (dev->busy) busy = 1; - if (dev->pending) pend = 1; + if (dev->pending || dev->pcipending) pend = 1; if (dev->fd > 2) open = 1; if (online != NPonline[a - 1]) { fprintf(confp, ANSI_CURSOR, p, 40); @@ -658,226 +756,62 @@ static void NP_update(FILE *confp, char *cmdline, int cmdoff) /* ============== End of the main NP block of code =============*/ -/*-------------------------------------------------------------------*/ -/* Definitions for ANSI control sequences */ -/*-------------------------------------------------------------------*/ -#define ANSI_SAVE_CURSOR "\x1B[s" -#define ANSI_CURSOR_UP "\x1B[1A" -#define ANSI_CURSOR_DOWN "\x1B[1B" -#define ANSI_CURSOR_FORWARD "\x1B[1C" -#define ANSI_CURSOR_BACKWARD "\x1B[1D" -#define ANSI_POSITION_CURSOR "\x1B[%d;%dH" -#define ANSI_ROW1_COL1 "\x1B[1;1H" -#define ANSI_ROW1_COL80 "\x1B[1;80H" -#define ANSI_ROW22_COL80 "\x1B[22;80H" -#define ANSI_ROW23_COL1 "\x1B[23;1H" -#define ANSI_ROW24_COL1 "\x1B[24;1H" -#define ANSI_ROW24_COL79 "\x1B[24;79H" -#define ANSI_BLACK_GREEN "\x1B[30;42m" -#define ANSI_YELLOW_RED "\x1B[33;1;41m" -#define ANSI_WHITE_BLACK "\x1B[0m" -#define ANSI_HIGH_INTENSITY "\x1B[1m" -#define ANSI_ERASE_EOL "\x1B[K" -#define ANSI_ERASE_SCREEN "\x1B[2J" -#define ANSI_RESTORE_CURSOR "\x1B[u" - -/*-------------------------------------------------------------------*/ -/* Definitions for keyboard input sequences */ -/*-------------------------------------------------------------------*/ -#define KBD_HOME "\x1B[1~" -#define KBD_INSERT "\x1B[2~" -#define KBD_DELETE "\x1B[3~" -#define KBD_END "\x1B[4~" -#define KBD_PAGE_UP "\x1B[5~" -#define KBD_PAGE_DOWN "\x1B[6~" -#define KBD_UP_ARROW "\x1B[A" -#define KBD_DOWN_ARROW "\x1B[B" -#define KBD_RIGHT_ARROW "\x1B[C" -#define KBD_LEFT_ARROW "\x1B[D" - -/*-------------------------------------------------------------------*/ -/* Cleanup routine */ -/*-------------------------------------------------------------------*/ -static void system_cleanup (void) +static void panel_cleanup(void *unused __attribute__ ((unused)) ) { struct termios kbattr; /* Terminal I/O structure */ +int i,n; +char c; + + compat_shutdown = 1; /* Restore the terminal mode */ tcgetattr (STDIN_FILENO, &kbattr); kbattr.c_lflag |= (ECHO | ICANON); tcsetattr (STDIN_FILENO, TCSANOW, &kbattr); -#ifdef EXTERNALGUI - if (!extgui) -#endif /*EXTERNALGUI*/ - /* Reset the cursor position */ - fprintf (stderr, - ANSI_ROW24_COL79 - ANSI_WHITE_BLACK - "\n"); - fprintf (stderr, - "HHCIN007I Hercules terminated\n"); - -} /* end function system_cleanup */ - -/*-------------------------------------------------------------------*/ -/* Process .RC file thread */ -/*-------------------------------------------------------------------*/ - -int rc_thread_done = 0; /* 1 = RC file processed */ - -void* process_rc_file (void* dummy) -{ -BYTE *rcname; /* hercules.rc name pointer */ -FILE *rcfp; /* RC file pointer */ -size_t rcbufsize = 1024; /* Size of RC file buffer */ -BYTE *rcbuf = NULL; /* RC file input buffer */ -int rclen; /* length of RC file record */ -int rc_pause_amt = 0; /* seconds to pause RC file */ -BYTE *p; /* (work) */ - - UNREFERENCED(dummy); - - /* Obtain the name of the hercules.rc file or default */ - - if(!(rcname = getenv("HERCULES_RC"))) - rcname = "hercules.rc"; - - /* Open RC file. If it doesn't exist, - then there's nothing for us to do */ - - if (!(rcfp = fopen(rcname, "r"))) - { - if (ENOENT != errno) - logmsg(_("HHCPN007E RC file %s open failed: %s\n"), - rcname, strerror(errno)); - rc_thread_done = 1; - return NULL; - } - - logmsg(_("HHCPN008I RC file processing thread started using file %s\n"), - rcname); - - /* Obtain storage for the RC file buffer */ + fprintf(stderr, ANSI_RESET_WHT_BLK ANSI_CLEAR_SCREEN ); - if (!(rcbuf = malloc (rcbufsize))) - { - logmsg(_("HHCPN009E RC file buffer malloc failed: %s\n"), - strerror(errno)); - fclose(rcfp); - rc_thread_done = 1; - return NULL; - } + /* Reset the first line to be displayed (i.e. + "scroll down to the most current message") */ + firstmsgn = nummsgs - NUM_LINES; + if (firstmsgn < 0) firstmsgn = 0; - for (;;) + /* Display messages in scrolling area */ + for (i=0; i < NUM_LINES && firstmsgn + i < nummsgs; i++) { - /* Read a complete line from the RC file */ - - if (!fgets(rcbuf, rcbufsize, rcfp)) break; - - /* Remove trailing whitespace */ - - for (rclen = strlen(rcbuf); rclen && isspace(rcbuf[rclen-1]); rclen--); - rcbuf[rclen] = 0; - - /* '#' == silent comment, '*' == loud comment */ - - if ('#' == rcbuf[0] || '*' == rcbuf[0]) - { - if ('*' == rcbuf[0]) - logmsg ("> %s",rcbuf); - continue; - } - - /* Remove any # comments on the line before processing */ - - if ((p = strchr(rcbuf,'#')) && p > rcbuf) - do *p = 0; while (isspace(*--p) && p >= rcbuf); - - if (strncasecmp(rcbuf,"pause",5) == 0) - { - sscanf(rcbuf+5, "%d", &rc_pause_amt); - - if (rc_pause_amt < 0 || rc_pause_amt > 999) - { - logmsg(_("HHCPN010W Ignoring invalid RC file pause " - "statement: %s\n"), - rcbuf+5); - continue; - } - - logmsg (_("HHCPN011I Pausing RC file processing for %d " - "seconds...\n"), - rc_pause_amt); - sleep(rc_pause_amt); - logmsg (_("HHCPN012I Resuming RC file processing...\n")); - - continue; - } - - /* Process the command */ - - for (p = rcbuf; isspace(*p); p++); - - SYNCHRONOUS_PANEL_CMD(p); + n = (nummsgs < MAX_MSGS) ? 0 : msgslot; + n += firstmsgn + i; + if (n >= MAX_MSGS) n -= MAX_MSGS; + fprintf (stderr, + ANSI_POSITION_CURSOR + ANSI_WHITE_BLACK, + i+1, 1); + fwrite (msgbuf + (n * MSG_SIZE), MSG_SIZE, 1, stderr); } - if (feof(rcfp)) - logmsg (_("HHCPN013I EOF reached on RC file. Processing complete.\n")); - else - logmsg (_("HHCPN014E I/O error reading RC file: %s\n"), - strerror(errno)); - - fclose(rcfp); + /* Read any remaining msgs from the msg pipe */ + while(read (compat_msgpiper, &c, 1) > 0) + fputc(c,stderr); - rc_thread_done = 1; - - return NULL; + /* Read any remaining msgs from the system log */ + while((lmscnt = log_read(&lmsbuf, &lmsnum, LOG_NOBLOCK))) + fwrite(lmsbuf,lmscnt,1,stderr); } /*-------------------------------------------------------------------*/ /* Panel display thread */ /* */ /* This function runs on the main thread. It receives messages */ -/* from other threads and displays them on the screen. It accepts */ +/* from the log task and displays them on the screen. It accepts */ /* panel commands from the keyboard and executes them. It samples */ /* the PSW periodically and displays it on the screen status line. */ -/* */ -/* Note that this routine must not attempt to write messages into */ -/* the message pipe by calling the logmsg function, because this */ -/* will cause a deadlock when the pipe becomes full during periods */ -/* of high message activity. For this reason a separate thread is */ -/* created to process all commands entered. */ /*-------------------------------------------------------------------*/ -int volatile initdone = 0; /* Initialization complete flag */ - -#define MAX_MSGS 800 /* Number of slots in buffer */ -#define MSG_SIZE 80 /* Size of one message */ -#define BUF_SIZE (MAX_MSGS*MSG_SIZE) /* Total size of buffer */ -#define NUM_LINES 22 /* Number of scrolling lines */ -#define CMD_SIZE 32767 /* Length of command line */ -BYTE *msgbuf; /* Circular message buffer */ -int msgslot = 0; /* Next available buffer slot*/ -int nummsgs = 0; /* Number of msgs in buffer */ -int msg_size = MSG_SIZE; -int max_msgs = MAX_MSGS; - -void get_msgbuf(BYTE **_msgbuf, int *_msgslot, int *_nummsgs, int *_msg_size, int *_max_msgs) -{ - *_msgbuf = msgbuf; - *_msgslot = msgslot; - *_nummsgs = nummsgs; - *_msg_size = msg_size; - *_max_msgs = max_msgs; -} - -/* (forward references) */ -#ifdef EXTERNALGUI -void gui_devlist_status (FILE *confp); -#endif - +#if defined(OPTION_DYNAMIC_LOAD) +void panel_display_r (void) +#else void panel_display (void) +#endif { int rc; /* Return code */ int i, n; /* Array subscripts */ @@ -886,28 +820,19 @@ QWORD curpsw; /* Current PSW */ QWORD prvpsw; /* Previous PSW */ BYTE prvstate = 0xFF; /* Previous stopped state */ U64 prvicount = 0; /* Previous instruction count*/ +#if defined(OPTION_SHARED_DEVICES) +U32 prvscount = 0; /* Previous shrdcount */ +#endif BYTE pswwait; /* PSW wait state bit */ -int firstmsgn = 0; /* Number of first message to - be displayed relative to - oldest message in buffer */ -#ifdef EXTERNALGUI -BYTE redraw_msgs = 0; /* 1=Redraw message area */ -BYTE redraw_cmd = 0; /* 1=Redraw command line */ -BYTE redraw_status = 0; /* 1=Redraw status line */ -#else /*!EXTERNALGUI*/ BYTE redraw_msgs; /* 1=Redraw message area */ BYTE redraw_cmd; /* 1=Redraw command line */ BYTE redraw_status; /* 1=Redraw status line */ -#endif /*EXTERNALGUI*/ BYTE readbuf[MSG_SIZE]; /* Message read buffer */ int readoff = 0; /* Number of bytes in readbuf*/ BYTE cmdline[CMD_SIZE+1]; /* Command line buffer */ int cmdoff = 0; /* Number of bytes in cmdline*/ -TID cmdtid; /* Command thread identifier */ -TID rctid; /* RC file thread identifier */ BYTE c; /* Character work area */ FILE *confp; /* Console file pointer */ -FILE *logfp; /* Log file pointer */ struct termios kbattr; /* Terminal I/O structure */ size_t kbbufsize = CMD_SIZE; /* Size of keyboard buffer */ BYTE *kbbuf = NULL; /* Keyboard input buffer */ @@ -918,6 +843,10 @@ int maxfd; /* Highest file descriptor */ fd_set readset; /* Select file descriptors */ struct timeval tv; /* Select timeout structure */ +#if 1 + panel_compat_init(); +#endif + /* Display thread started message on control panel */ logmsg (_("HHCPN001I Control panel thread started: " "tid="TIDPAT", pid=%d\n"), @@ -941,32 +870,15 @@ struct timeval tv; /* Select timeout structure */ return; } - /* If stdout is not redirected, then write screen output - to stdout and do not produce a log file. If stdout is - redirected, then write screen output to stderr and - write the logfile to stdout */ - if (isatty(STDOUT_FILENO)) - { - confp = stdout; - logfp = NULL; - } - else - { - confp = stderr; - logfp = stdout; - /* Logfile should be unbuffered to be always in sync */ - setvbuf(logfp, NULL, _IONBF, 0); - } - - /* Set screen output stream to fully buffered */ - setvbuf (confp, NULL, _IOFBF, 0); - /* Set up the input file descriptors */ - pipefd = sysblk.msgpiper; + confp = stderr; + pipefd = compat_msgpiper; keybfd = STDIN_FILENO; - /* Register the system cleanup exit routine */ - atexit (system_cleanup); + hdl_adsc(panel_cleanup, NULL); + + /* Set screen output stream to fully buffered */ + setvbuf (confp, NULL, _IOFBF, 0); /* Put the terminal into cbreak mode */ tcgetattr (keybfd, &kbattr); @@ -975,50 +887,20 @@ struct timeval tv; /* Select timeout structure */ kbattr.c_cc[VTIME] = 0; tcsetattr (keybfd, TCSANOW, &kbattr); -#ifdef EXTERNALGUI - if (!extgui) -#endif /*EXTERNALGUI*/ /* Clear the screen */ fprintf (confp, ANSI_WHT_BLK ANSI_ERASE_SCREEN); -#ifdef EXTERNALGUI - if (!extgui) - { -#endif /*EXTERNALGUI*/ redraw_msgs = 1; redraw_cmd = 1; -#ifdef EXTERNALGUI - } -#endif /*EXTERNALGUI*/ redraw_status = 1; - /* Wait for system to finish coming up */ - while (!initdone) sleep(1); - - /* Start up the RC file processing thread */ - create_thread(&rctid,&sysblk.detattr,process_rc_file,NULL); - /* Process messages and commands */ while (1) { /* Set target CPU for commands and displays */ regs = sysblk.regs + sysblk.pcpu; - /* If the requested CPU is offline, then take the first available CPU*/ - if(!regs->cpuonline) - /* regs = first online CPU - * sysblk.pcpu = number of online CPUs - */ - for(regs = 0, sysblk.pcpu = 0, i = 0 ; - i < MAX_CPU_ENGINES ; ++i ) - if (sysblk.regs[i].cpuonline) { - if (!regs) - regs = sysblk.regs + i; - ++sysblk.pcpu; - } - - if (!regs) regs = sysblk.regs; #if defined(_FEATURE_SIE) /* Point to SIE copy in SIE state */ @@ -1032,7 +914,6 @@ struct timeval tv; /* Select timeout structure */ FD_SET (pipefd, &readset); maxfd = keybfd; if (pipefd > maxfd) maxfd = pipefd; - maxfd = add_socket_devices_to_fd_set (&readset, maxfd); /* Wait for a message to arrive, a key to be pressed, or the inactivity interval to expire */ @@ -1089,24 +970,24 @@ struct timeval tv; /* Select timeout structure */ break; case 'S': /* START */ case 's': - ASYNCHRONOUS_PANEL_CMD("start"); + panel_command("start"); break; case 'P': /* STOP */ case 'p': - ASYNCHRONOUS_PANEL_CMD("stop"); + panel_command("stop"); break; case 'T': /* RESTART */ case 't': - ASYNCHRONOUS_PANEL_CMD("restart"); + panel_command("restart"); break; case 'E': /* Ext int */ case 'e': - ASYNCHRONOUS_PANEL_CMD("ext"); + panel_command("ext"); redraw_status = 1; break; case 'O': /* Store */ case 'o': - NPaaddr = APPLY_PREFIXING (NPaddress, regs->PX); + NPaaddr = APPLY_PREFIXING ((U32)NPaddress, regs->PX); if (NPaaddr > regs->mainlim) break; regs->mainstor[NPaaddr] = 0; @@ -1185,7 +1066,7 @@ struct timeval tv; /* Select timeout structure */ sprintf(NPdevstr, "%x", NPdevaddr[i]); strcpy(cmdline, "ipl "); strcat(cmdline, NPdevstr); - ASYNCHRONOUS_PANEL_CMD(cmdline); + panel_command(cmdline); strcpy(NPprompt2, ""); redraw_status = 1; break; @@ -1206,7 +1087,7 @@ struct timeval tv; /* Select timeout structure */ sprintf(NPdevstr, "%x", NPdevaddr[i]); strcpy(cmdline, "i "); strcat(cmdline, NPdevstr); - ASYNCHRONOUS_PANEL_CMD(cmdline); + panel_command(cmdline); strcpy(NPprompt2, ""); redraw_status = 1; break; @@ -1241,9 +1122,12 @@ struct timeval tv; /* Select timeout structure */ strcpy(NPprompt1, "Confirm Powerdown Y or N"); redraw_status = 1; break; - case 4: /* IPL - 2nd part */ + case 4: /* POWER - 2nd part */ if (NPdevice == 'y' || NPdevice == 'Y') - ASYNCHRONOUS_PANEL_CMD("quit"); + { + panel_command("quit"); + while (1) sched_yield(); + } strcpy(NPprompt1, ""); redraw_status = 1; break; @@ -1282,7 +1166,8 @@ struct timeval tv; /* Select timeout structure */ } /* Test for line up command */ - if (strcmp(kbbuf+i, KBD_UP_ARROW) == 0) + if (strcmp(kbbuf+i, KBD_UP_ARROW) == 0 + || strcmp(kbbuf+i, xKBD_UP_ARROW) == 0) { if (firstmsgn == 0) break; firstmsgn--; @@ -1291,7 +1176,8 @@ struct timeval tv; /* Select timeout structure */ } /* Test for line down command */ - if (strcmp(kbbuf+i, KBD_DOWN_ARROW) == 0) + if (strcmp(kbbuf+i, KBD_DOWN_ARROW) == 0 + || strcmp(kbbuf+i, xKBD_DOWN_ARROW) == 0) { if (firstmsgn + NUM_LINES >= nummsgs) break; firstmsgn++; @@ -1320,6 +1206,30 @@ struct timeval tv; /* Select timeout structure */ break; } + /* Process backspace character */ + /* DEL (\x7F), KBD_LEFT_ARROW and KBD_DELETE */ + /* are all equivalent to backspace */ + if (kbbuf[i] == '\b' || kbbuf[i] == '\x7F' + || strcmp(kbbuf+i, KBD_LEFT_ARROW) == 0 + || strcmp(kbbuf+i, xKBD_LEFT_ARROW) == 0 + || strcmp(kbbuf+i, KBD_DELETE) == 0) + { + if (cmdoff > 0) cmdoff--; + i++; + redraw_cmd = 1; + break; + } + + /* Test for other KBD_* strings */ + /* Just ignore them, no function assigned */ + if (strcmp(kbbuf+i, KBD_RIGHT_ARROW) == 0 + || strcmp(kbbuf+i, xKBD_RIGHT_ARROW) == 0 + || strcmp(kbbuf+i, KBD_INSERT) == 0) + { + redraw_msgs = 1; + break; + } + /* Process escape key */ if (kbbuf[i] == '\x1B') { @@ -1330,80 +1240,17 @@ struct timeval tv; /* Select timeout structure */ break; } - /* Process backspace character */ - if (kbbuf[i] == '\b' || kbbuf[i] == '\x7F' - || strcmp(kbbuf+i, KBD_LEFT_ARROW) == 0) - { - if (cmdoff > 0) cmdoff--; - i++; - redraw_cmd = 1; - break; - } - /* Process the command if newline was read */ if (kbbuf[i] == '\n') { cmdline[cmdoff] = '\0'; /* =NP= create_thread replaced with: */ if (NPDup == 0) { -#ifdef EXTERNALGUI - if (extgui && (cmdline[0] == ']')) - { - redraw_status = 1; - - if (strncmp(cmdline,"]GREGS=",7) == 0) - { - gui_gregs = atoi(cmdline+7); - } - else - if (strncmp(cmdline,"]CREGS=",7) == 0) - { - gui_cregs = atoi(cmdline+7); - } - else - if (strncmp(cmdline,"]AREGS=",7) == 0) - { - gui_aregs = atoi(cmdline+7); - } - else - if (strncmp(cmdline,"]FREGS=",7) == 0) - { - gui_fregs = atoi(cmdline+7); - } - else - if (strncmp(cmdline,"]DEVLIST=",9) == 0) - { - gui_devlist = atoi(cmdline+9); - } - else - if (strncmp(cmdline,"]MAINSTOR=",10) == 0) - { - fprintf(stderr,"MAINSTOR=%d\n",(U32)regs->mainstor); - fprintf(stderr,"MAINSIZE=%d\n",(U32)sysblk.mainsize); - } -#if defined(OPTION_MIPS_COUNTING) - else - if (strncmp(cmdline,"]CPUPCT=",8) == 0) - { - gui_cpupct = atoi(cmdline+8); - } -#endif /*defined(OPTION_MIPS_COUNTING)*/ - } - else -#endif /*EXTERNALGUI*/ - { - if ('#' == cmdline[0] || '*' == cmdline[0]) - { - if ('*' == cmdline[0]) - logmsg("%s\n", cmdline); - } - else - { - if (rc_thread_done) - { - ASYNCHRONOUS_PANEL_CMD(cmdline); - } - } + if ('#' == cmdline[0] || '*' == cmdline[0]) { + if ('*' == cmdline[0]) + logmsg("%s\n", cmdline); + } else { + panel_command(cmdline); } } else { NPdataentry = 0; @@ -1431,7 +1278,7 @@ struct timeval tv; /* Select timeout structure */ strcat(NPentered, NPdevstr); strcat(NPentered, " "); strcat(NPentered, cmdline); - ASYNCHRONOUS_PANEL_CMD(NPentered); + panel_command(NPentered); strcpy(NPprompt2, ""); break; default: @@ -1441,10 +1288,6 @@ struct timeval tv; /* Select timeout structure */ } /* =END= */ cmdoff = 0; -#ifdef EXTERNALGUI - /* Process *ALL* of the 'keyboard' (stdin) buffer data! */ - if (extgui) {i++; continue;} -#endif /*EXTERNALGUI*/ redraw_cmd = 1; break; } @@ -1468,91 +1311,84 @@ struct timeval tv; /* Select timeout structure */ /* If a message has arrived then receive it */ if (FD_ISSET(pipefd, &readset)) { - /* Clear the message buffer */ - memset (readbuf, SPACE, MSG_SIZE); - - /* Read message bytes until newline */ - while (1) + /* Read message bytes until newline... */ + c = 0; + while (c != '\n' && c != '\r') { - /* Read a byte from the message pipe */ - rc = read (pipefd, &c, 1); - if (rc < 1) - { - fprintf (stderr, - "HHCPN006E message pipe read: %s\n", - strerror(errno)); - break; + /* Initialize the read buffer */ + if (!readoff || readoff >= MSG_SIZE) { + memset (readbuf, SPACE, MSG_SIZE); + readoff = 0; } + /* Read message bytes and copy into read buffer + until we either encounter a newline character + or our buffer is completely filled with data. */ + while (c != '\n' && c != '\r') + { + /* Read a byte from the message pipe */ + rc = read (pipefd, &c, 1); + if (rc < 1) { + fprintf (stderr, + _("HHCPN006E message pipe read: %s\n"), + strerror(errno)); + break; + } - /* Exit if newline was read */ - if (c == '\n') break; + /* Break to process received message + whenever a newline is encountered */ + if (c == '\n' || c == '\r') { + readoff = 0; /* (for next time) */ + break; + } - /* Handle tab character */ - if (c == '\t') - { - readoff += 8; - readoff &= 0xFFFFFFF8; - continue; - } - - /* Eliminate non-printable characters */ - if (!isprint(c)) c = SPACE; - - /* Append the byte to the read buffer */ - if (readoff < MSG_SIZE) readbuf[readoff++] = c; + /* Handle tab character */ + if (c == '\t') { + readoff += 8; + readoff &= 0xFFFFFFF8; + /* Messages longer than one screen line will + be continued on the very next screen line */ + if (readoff >= MSG_SIZE) + break; + else continue; + } - } /* end while */ + /* Eliminate non-displayable characters */ + if (!isgraph(c)) c = SPACE; - /* Exit if read was unsuccessful */ - if (rc < 1) break; + /* Stuff byte into message processing buffer */ + readbuf[readoff++] = c; - /* Copy the message to the log file if present */ - if (logfp != NULL) - { - fprintf (logfp, "%.*s\n", readoff, readbuf); - if (ferror(logfp)) - { - fclose (logfp); - logfp = NULL; + /* Messages longer than one screen line will + be continued on the very next screen line */ + if (readoff >= MSG_SIZE) + break; } - } - /* Copy message to circular buffer and empty read buffer */ -#if defined(EXTERNALGUI) && !defined(OPTION_HTTP_SERVER) - if (!extgui) -#endif /*EXTERNALGUI*/ - memcpy (msgbuf + (msgslot * MSG_SIZE), readbuf, MSG_SIZE); - readoff = 0; + /* If we have a message to be displayed (or a complete + part of one), then copy it to the circular buffer. */ + if (!readoff || readoff >= MSG_SIZE) { + /* Set the display update indicator */ + redraw_msgs = 1; -#if defined(EXTERNALGUI) && !defined(OPTION_HTTP_SERVER) - if (!extgui) - { -#endif /*EXTERNALGUI*/ - /* Update message count and next available slot number */ - if (nummsgs < MAX_MSGS) - msgslot = ++nummsgs; - else - msgslot++; - if (msgslot == MAX_MSGS) msgslot = 0; - - /* Calculate the first line to display */ - firstmsgn = nummsgs - NUM_LINES; - if (firstmsgn < 0) firstmsgn = 0; - - /* Set the display update indicator */ - redraw_msgs = 1; -#if defined(EXTERNALGUI) && !defined(OPTION_HTTP_SERVER) - } -#endif /*EXTERNALGUI*/ - } + memcpy(msgbuf+(msgslot*MSG_SIZE),readbuf,MSG_SIZE); - /* Check if any sockets have received new connections */ - check_socket_devices_for_connections (&readset); + /* Update message count and next available slot */ + if (nummsgs < MAX_MSGS) + msgslot = ++nummsgs; + else + msgslot++; + if (msgslot >= MAX_MSGS) msgslot = 0; + + /* Calculate the first line to display */ + firstmsgn = nummsgs - NUM_LINES; + if (firstmsgn < 0) firstmsgn = 0; + } + if (rc < 1) break; /* Exit if read was unsuccessful */ + } /* end while read(pipefd) */ + if (rc < 1) break; /* Exit if read was unsuccessful */ + } /* end if (FD_ISSET(pipefd)) */ -#ifdef EXTERNALGUI - if (!extgui) -#endif /*EXTERNALGUI*/ /* =NP= : Reinit traditional panel if NP is down */ if (NPDup == 0 && NPDinit == 1) { NPDinit = 0; @@ -1579,6 +1415,9 @@ struct timeval tv; /* Select timeout structure */ regs->sie_state ? regs->hostregs->instcount : #endif /*defined(_FEATURE_SIE)*/ regs->instcount) != prvicount +#if defined(OPTION_SHARED_DEVICES) + || sysblk.shrdcount != prvscount +#endif || regs->cpustate != prvstate) { redraw_status = 1; @@ -1589,6 +1428,9 @@ struct timeval tv; /* Select timeout structure */ #endif /*defined(_FEATURE_SIE)*/ regs->instcount; prvstate = regs->cpustate; +#if defined(OPTION_SHARED_DEVICES) + prvscount = sysblk.shrdcount; +#endif } /* =NP= : Display the screen - traditional or NP */ @@ -1598,9 +1440,6 @@ struct timeval tv; /* Select timeout structure */ /* the NP display as an else after those ifs */ if (NPDup == 0) { -#ifdef EXTERNALGUI - if (!extgui) -#endif /*EXTERNALGUI*/ /* Rewrite the screen if display update indicators are set */ if (redraw_msgs && !sysblk.npquiet) { @@ -1626,23 +1465,17 @@ struct timeval tv; /* Select timeout structure */ if (redraw_status && !sysblk.npquiet) { + if(sysblk.regs[sysblk.pcpu].cpuonline) /* Display the PSW and instruction counter for CPU 0 */ fprintf (confp, "%s" -#if MAX_CPU_ENGINES > 1 "CPU%4.4X " -#endif "PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X" " %2.2X%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X" " %c%c%c%c%c%c%c%c instcount=%llu" "%s", -#ifdef EXTERNALGUI - extgui ? ("STATUS=") : -#endif /*EXTERNALGUI*/ (ANSI_ROW24_COL1 ANSI_YELLOW_RED), -#if MAX_CPU_ENGINES > 1 regs->cpuad, -#endif curpsw[0], curpsw[1], curpsw[2], curpsw[3], curpsw[4], curpsw[5], curpsw[6], curpsw[7], curpsw[8], curpsw[9], curpsw[10], curpsw[11], @@ -1667,127 +1500,15 @@ struct timeval tv; /* Select timeout structure */ regs->sie_state ? (long long) regs->hostregs->instcount : #endif /*defined(_FEATURE_SIE)*/ (long long)regs->instcount, -#ifdef EXTERNALGUI - extgui ? "\n" : -#endif /*EXTERNALGUI*/ ANSI_ERASE_EOL); - -#ifdef EXTERNALGUI - if (extgui) - { - /* SYS / WAIT lights */ - if (!(regs->cpustate == CPUSTATE_STOPPING || - regs->cpustate == CPUSTATE_STOPPED)) - fprintf(confp,"SYS=%c\n",pswwait?'0':'1'); -#ifdef OPTION_MIPS_COUNTING - /* Calculate MIPS rate */ -#ifdef FEATURE_CPU_RECONFIG - for (mipsrate = siosrate = i = 0; i < MAX_CPU_ENGINES; i++) - if(sysblk.regs[i].cpuonline) -#else /*!FEATURE_CPU_RECONFIG*/ - for(mipsrate = siosrate = i = 0; i < sysblk.numcpu; i++) -#endif /*!FEATURE_CPU_RECONFIG*/ - { - mipsrate += sysblk.regs[i].mipsrate; - siosrate += sysblk.regs[i].siosrate; - } - - if (mipsrate > 100000) mipsrate = 0; /* ignore wildly high rate */ - - /* MIPS rate */ - if (prevmipsrate != mipsrate) - { - prevmipsrate = mipsrate; - fprintf(confp, "MIPS=%2.1d.%2.2d\n", - prevmipsrate / 1000, (prevmipsrate % 1000) / 10); - } - - /* SIO rate */ - if (prevsiosrate != siosrate) - { - prevsiosrate = siosrate; - fprintf(confp, "SIOS=%5d\n",prevsiosrate); - } - -#endif /*OPTION_MIPS_COUNTING*/ - if (gui_gregs) /* GP regs */ - { - fprintf(confp,"GR0-3=%8.8X %8.8X %8.8X %8.8X\n", - regs->GR_L(0),regs->GR_L(1),regs->GR_L(2),regs->GR_L(3)); - fprintf(confp,"GR4-7=%8.8X %8.8X %8.8X %8.8X\n", - regs->GR_L(4),regs->GR_L(5),regs->GR_L(6),regs->GR_L(7)); - fprintf(confp,"GR8-B=%8.8X %8.8X %8.8X %8.8X\n", - regs->GR_L(8),regs->GR_L(9),regs->GR_L(10),regs->GR_L(11)); - fprintf(confp,"GRC-F=%8.8X %8.8X %8.8X %8.8X\n", - regs->GR_L(12),regs->GR_L(13),regs->GR_L(14),regs->GR_L(15)); - } - - if (gui_cregs) /* CR regs */ - { - fprintf(confp,"CR0-3=%8.8X %8.8X %8.8X %8.8X\n", - regs->CR_L(0),regs->CR_L(1),regs->CR_L(2),regs->CR_L(3)); - fprintf(confp,"CR4-7=%8.8X %8.8X %8.8X %8.8X\n", - regs->CR_L(4),regs->CR_L(5),regs->CR_L(6),regs->CR_L(7)); - fprintf(confp,"CR8-B=%8.8X %8.8X %8.8X %8.8X\n", - regs->CR_L(8),regs->CR_L(9),regs->CR_L(10),regs->CR_L(11)); - fprintf(confp,"CRC-F=%8.8X %8.8X %8.8X %8.8X\n", - regs->CR_L(12),regs->CR_L(13),regs->CR_L(14),regs->CR_L(15)); - } - - if (gui_aregs) /* AR regs */ - { - fprintf(confp,"AR0-3=%8.8X %8.8X %8.8X %8.8X\n", - regs->AR(0),regs->AR(1),regs->AR(2),regs->AR(3)); - fprintf(confp,"AR4-7=%8.8X %8.8X %8.8X %8.8X\n", - regs->AR(4),regs->AR(5),regs->AR(6),regs->AR(7)); - fprintf(confp,"AR8-B=%8.8X %8.8X %8.8X %8.8X\n", - regs->AR(8),regs->AR(9),regs->AR(10),regs->AR(11)); - fprintf(confp,"ARC-F=%8.8X %8.8X %8.8X %8.8X\n", - regs->AR(12),regs->AR(13),regs->AR(14),regs->AR(15)); - } - - if (gui_fregs) /* FP regs */ - { - fprintf(confp,"FR0-2=%8.8X %8.8X %8.8X %8.8X\n", - regs->fpr[0],regs->fpr[1],regs->fpr[2],regs->fpr[3]); - fprintf(confp,"FR4-6=%8.8X %8.8X %8.8X %8.8X\n", - regs->fpr[4],regs->fpr[5],regs->fpr[6],regs->fpr[7]); - } - -#if defined(OPTION_MIPS_COUNTING) - if (gui_cpupct) /* CPU Utilization */ - fprintf(confp,"CPUPCT=%d\n",(int)(100.0 * regs->cpupct)); -#endif /*defined(OPTION_MIPS_COUNTING)*/ - - if (gui_devlist) /* device status */ - gui_devlist_status (confp); - } -#endif /*EXTERNALGUI*/ + else + fprintf (confp, + ANSI_ROW24_COL1 ANSI_YELLOW_RED + "CPU%4.4X Offline" + ANSI_ERASE_EOL, + regs->cpuad); } /* end if(redraw_status) */ -#ifdef EXTERNALGUI - else /* !redraw_status */ - { - /* If we're under the control of an external GUI, - some status info we need to send ALL the time. */ - if (extgui) - { - /* SYS / WAIT lights */ - if (!(regs->cpustate == CPUSTATE_STOPPING || - regs->cpustate == CPUSTATE_STOPPED)) - fprintf(confp,"SYS=%c\n",pswwait?'0':'1'); - -#if defined(OPTION_MIPS_COUNTING) - if (gui_cpupct) /* CPU Utilization */ - fprintf(confp,"CPUPCT=%d\n",(int)(100.0 * regs->cpupct)); -#endif /*defined(OPTION_MIPS_COUNTING)*/ - - if (gui_devlist) /* device status */ - gui_devlist_status (confp); - } - } - if (!extgui) -#endif /*EXTERNALGUI*/ if (redraw_cmd) { /* Display the command line */ @@ -1809,9 +1530,6 @@ struct timeval tv; /* Select timeout structure */ /* Flush screen buffer and reset display update indicators */ if (redraw_msgs || redraw_cmd || redraw_status) { -#ifdef EXTERNALGUI - if (!extgui) -#endif /*EXTERNALGUI*/ fprintf (confp, ANSI_POSITION_CURSOR, 23, 13+cmdoff); @@ -1827,14 +1545,8 @@ struct timeval tv; /* Select timeout structure */ || (redraw_cmd && NPdataentry == 1)) { if (NPDinit == 0) { NPDinit = 1; -#ifdef EXTERNALGUI - if (!extgui) -#endif /*EXTERNALGUI*/ NP_screen(confp); } -#ifdef EXTERNALGUI - if (!extgui) -#endif /*EXTERNALGUI*/ NP_update(confp, cmdline, cmdoff); fflush (confp); redraw_msgs = 0; @@ -1850,548 +1562,3 @@ struct timeval tv; /* Select timeout structure */ return; } /* end function panel_display */ - -#if defined(EXTERNALGUI) - -void gui_devlist_status (FILE *confp) -{ - DEVBLK *dev; - - for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) - { - if (!(dev->pmcw.flag5 & PMCW5_V)) continue; - - stat_online = stat_busy = stat_pend = stat_open = 0; - - (dev->hnd->query)(dev, &devclass, sizeof(devnam), devnam); - - devnam[255] = 0; /* (ensure null termination) */ - - if ((dev->console && dev->connected) || - (strlen(dev->filename) > 0)) - stat_online = 1; - if (dev->busy) stat_busy = 1; - if (dev->pending) stat_pend = 1; - if (dev->fd > 2) stat_open = 1; - - fprintf(confp, "DEV=%4.4X %4.4X %-4.4s %d%d%d%d %s\n", - dev->devnum, - dev->devtype, - devclass, - stat_online, - stat_busy, - stat_pend, - stat_open, - devnam); - } - - fprintf(confp, "DEV=X\n"); /* (indicate end of list) */ -} - -#endif /*defined(EXTERNALGUI)*/ - - -/*===================================================================*/ -/* S o c k e t D e v i c e s ... */ -/*===================================================================*/ - -// #define DEBUG_SOCKDEV - -#ifdef DEBUG_SOCKDEV - #define logdebug(args...) logmsg(## args) -#else - #define logdebug(args...) do {} while (0) -#endif /* DEBUG_SOCKDEV */ - -/* Linked list of bind structures for bound socket devices */ - -LIST_ENTRY bind_head; /* (bind_struct list anchor) */ -LOCK bind_lock; /* (lock for accessing list) */ - -/*-------------------------------------------------------------------*/ -/* bind_device bind a device to a socket (adds entry to our list */ -/* of bound devices) (1=success, 0=failure) */ -/*-------------------------------------------------------------------*/ -int bind_device (DEVBLK* dev, char* spec) -{ - bind_struct* bs; - - logdebug("bind_device (%4.4X, %s)\n", dev->devnum, spec); - - /* Error if device already bound */ - - if (dev->bs) - { - logmsg (_("HHCSD001E Device %4.4X already bound to socket %s\n"), - dev->devnum, dev->bs->spec); - return 0; /* (failure) */ - } - - /* Create a new bind_struct entry */ - - bs = malloc(sizeof(bind_struct)); - - if (!bs) - { - logmsg (_("HHCSD002E bind_device malloc() failed for device %4.4X\n"), - dev->devnum); - return 0; /* (failure) */ - } - - memset(bs,0,sizeof(bind_struct)); - - if (!(bs->spec = safe_strdup(spec))) - { - logmsg (_("HHCSD003E bind_device safe_strdup() failed for device %4.4X\n"), - dev->devnum); - free (bs); - return 0; /* (failure) */ - } - - /* Create a listening socket */ - - if (bs->spec[0] == '/') bs->sd = unix_socket (bs->spec); - else bs->sd = inet_socket (bs->spec); - - if (bs->sd == -1) - { - /* (error message already issued) */ - free (bs); - return 0; /* (failure) */ - } - - /* Chain device and socket to each other */ - - dev->bs = bs; - bs->dev = dev; - - /* Add the new entry to our list of bound devices */ - - obtain_lock(&bind_lock); - InsertListTail(&bind_head,&bs->bind_link); - release_lock(&bind_lock); - - logmsg (_("HHCSD004I Device %4.4X bound to socket %s\n"), - dev->devnum, dev->bs->spec); - - return 1; /* (success) */ -} - -/*-------------------------------------------------------------------*/ -/* unbind_device unbind a device from a socket (removes entry from */ -/* our list and discards it) (1=success, 0=failure) */ -/*-------------------------------------------------------------------*/ -int unbind_device (DEVBLK* dev) -{ - bind_struct* bs; - - logdebug("unbind_device(%4.4X)\n", dev->devnum); - - /* Error if device not bound */ - - if (!(bs = dev->bs)) - { - logmsg (_("HHCSD005E Device %4.4X not bound to any socket\n"), - dev->devnum); - return 0; /* (failure) */ - } - - /* Error if someone still connected */ - - if (dev->fd != -1) - { - logmsg (_("HHCSD006E Client %s (%s) still connected to device %4.4X (%s)\n"), - dev->bs->clientip, dev->bs->clientname, dev->devnum, dev->bs->spec); - return 0; /* (failure) */ - } - - /* IMPORTANT! it's bad form to close a listening socket (and it - * happens to crash the Cygwin build) while another thread is still - * listening for connections on that socket (i.e. is in its FD_SET - * 'select' list). Thus we always issue a message (any message) - * immediately AFTER removing the entry from the sockdev (bind_struct) - * list and BEFORE closing our listening socket, thereby forcing - * the panel thread to rebuild its FD_SET 'select' list. (It wakes up - * from its 'select' as a result of our sending it our message and - * then before issuing another 'select' before going back to sleep, - * it then rebuilds its FD_SET 'select' list based on the current - * state of the sockdev (bind_struct) list, and since we just removed - * our entry from that list, the panel thread will thus not add our - * listening socket to its FD_SET 'select' list and thus we can then - * SAFELY close the listening socket). - */ - - /* Remove the entry from our list */ - - obtain_lock(&bind_lock); - RemoveListEntry(&bs->bind_link); - release_lock(&bind_lock); - - /* Issue message to wake up panel thread from its 'select' */ - - logmsg (_("HHCSD007I Device %4.4X unbound from socket %s\n"), - dev->devnum, bs->spec); - - /* Give panel thread time to process our message - * and rebuild its select list. */ - - usleep(100000); - - /* Now safe to close the listening socket */ - - if (bs->sd != -1) - close (bs->sd); - - /* Unchain device and socket from each another */ - - dev->bs = NULL; - bs->dev = NULL; - - /* Discard the entry */ - - if (bs->clientname) - free(bs->clientname); - bs->clientname = NULL; - - if (bs->clientip) - free(bs->clientip); - bs->clientip = NULL; - - free (bs->spec); - free (bs); - - return 1; /* (success) */ -} - -/*-------------------------------------------------------------------*/ -/* unix_socket create and bind a Unix domain socket */ -/*-------------------------------------------------------------------*/ - -#include <sys/un.h> /* (need "sockaddr_un") */ - -int unix_socket (char* path) -{ - struct sockaddr_un addr; - int sd; - - logdebug ("unix_socket(%s)\n", path); - - if (strlen (path) > sizeof(addr.sun_path) - 1) - { - logmsg (_("HHCSD008E Socket pathname \"%s\" exceeds limit of %d\n"), - path, (int) sizeof(addr.sun_path) - 1); - return -1; - } - - addr.sun_family = AF_UNIX; - strcpy (addr.sun_path, path); /* guaranteed room by above check */ - sd = socket (PF_UNIX, SOCK_STREAM, 0); - - if (sd == -1) - { - logmsg (_("HHCSD009E Error creating socket for %s: %s\n"), - path, strerror(errno)); - return -1; - } - - unlink (path); - fchmod (sd, 0700); - - if (0 - || bind (sd, (struct sockaddr*) &addr, sizeof(addr)) == -1 - || listen (sd, 5) == -1 - ) - { - logmsg (_("HHCSD010E Failed to bind or listen on socket %s: %s\n"), - path, strerror(errno)); - return -1; - } - - return sd; -} - -/*-------------------------------------------------------------------*/ -/* inet_socket create and bind a regular TCP/IP socket */ -/*-------------------------------------------------------------------*/ -int inet_socket (char* spec) -{ - /* We need a copy of the path to overwrite a ':' with '\0' */ - - char buf[sizeof(((DEVBLK*)0)->filename)]; - char* colon; - char* node; - char* service; - int sd; - int one = 1; - struct sockaddr_in sin; - - logdebug("inet_socket(%s)\n", spec); - - memset(&sin, 0, sizeof(sin)); - sin.sin_family = AF_INET; - strcpy(buf, spec); - colon = strchr(buf, ':'); - - if (colon) - { - *colon = '\0'; - node = buf; - service = colon + 1; - } - else - { - node = NULL; - service = buf; - } - - if (!node) - sin.sin_addr.s_addr = INADDR_ANY; - else - { - struct hostent* he = gethostbyname(node); - - if (!he) - { - logmsg (_("HHCSD011E Failed to determine IP address from %s\n"), - node); - return -1; - } - - memcpy(&sin.sin_addr, he->h_addr_list[0], sizeof(sin.sin_addr)); - } - - if (isdigit(service[0])) - { - sin.sin_port = htons(atoi(service)); - } - else - { - struct servent* se = getservbyname(service, "tcp"); - - if (!se) - { - logmsg (_("HHCSD012E Failed to determine port number from %s\n"), - service); - return -1; - } - - sin.sin_port = se->s_port; - } - - sd = socket (PF_INET, SOCK_STREAM, 0); - - if (sd == -1) - { - logmsg (_("HHCSD013E Error creating socket for %s: %s\n"), - spec, strerror(errno)); - return -1; - } - - setsockopt (sd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); - - if (0 - || bind (sd, (struct sockaddr*) &sin, sizeof(sin)) == -1 - || listen (sd, 5) == -1 - ) - { - logmsg (_("HHCSD014E Failed to bind or listen on socket %s: %s\n"), - spec, strerror(errno)); - return -1; - } - - return sd; -} - -/*-------------------------------------------------------------------*/ -/* add_socket_devices_to_fd_set add all bound socket devices' */ -/* listening sockets to the FD_SET */ -/*-------------------------------------------------------------------*/ -int add_socket_devices_to_fd_set (fd_set* readset, int maxfd) -{ - DEVBLK* dev; - bind_struct* bs; - LIST_ENTRY* pListEntry; - - obtain_lock(&bind_lock); - - pListEntry = bind_head.Flink; - - while (pListEntry != &bind_head) - { - bs = CONTAINING_RECORD(pListEntry,bind_struct,bind_link); - - if (bs->sd != -1) /* if listening for connections, */ - { - dev = bs->dev; - - if (dev->fd == -1) /* and not already connected, */ - { - FD_SET(bs->sd, readset); /* then add file to set */ - - if (bs->sd > maxfd) - maxfd = bs->sd; - } - } - - pListEntry = pListEntry->Flink; - } - - release_lock(&bind_lock); - - return maxfd; -} - -/*-------------------------------------------------------------------*/ -/* check_socket_devices_for_connections */ -/*-------------------------------------------------------------------*/ -void check_socket_devices_for_connections (fd_set* readset) -{ - bind_struct* bs; - LIST_ENTRY* pListEntry; - - obtain_lock(&bind_lock); - - pListEntry = bind_head.Flink; - - while (pListEntry != &bind_head) - { - bs = CONTAINING_RECORD(pListEntry,bind_struct,bind_link); - - if (bs->sd != -1 && FD_ISSET(bs->sd, readset)) - { - /* Note: there may be other connection requests - * waiting to be serviced, but we'll catch them - * the next time the panel thread calls us. */ - - release_lock(&bind_lock); - socket_device_connection_handler(bs); - return; - } - - pListEntry = pListEntry->Flink; - } - - release_lock(&bind_lock); -} - -/*-------------------------------------------------------------------*/ -/* socket_device_connection_handler */ -/*-------------------------------------------------------------------*/ -void socket_device_connection_handler (bind_struct* bs) -{ - struct sockaddr_in client; /* Client address structure */ - struct hostent* pHE; /* Addr of hostent structure */ - socklen_t namelen; /* Length of client structure*/ - char* clientip; /* Addr of client ip address */ - char* clientname; /* Addr of client hostname */ - DEVBLK* dev; /* Device Block pointer */ - int csock; /* Client socket */ - - dev = bs->dev; - - logdebug("socket_device_connection_handler(dev=%4.4X)\n", - dev->devnum); - - /* Obtain the device lock */ - - obtain_lock (&dev->lock); - - /* Reject if device is busy or interrupt pending */ - - if (dev->busy || dev->pending || (dev->scsw.flag3 & SCSW3_SC_PEND)) - { - release_lock (&dev->lock); - logmsg (_("HHCSD015E Connect to device %4.4X (%s) rejected; " - "device busy or interrupt pending\n"), - dev->devnum, bs->spec); - return; - } - - /* Reject if previous connection not closed (should not occur) */ - - if (dev->fd != -1) - { - release_lock (&dev->lock); - logmsg (_("HHCSD016E Connect to device %4.4X (%s) rejected; " - "client %s (%s) still connected\n"), - dev->devnum, bs->spec, bs->clientip, bs->clientname); - return; - } - - /* Accept the connection... */ - - csock = accept(bs->sd, 0, 0); - - if (csock == -1) - { - release_lock (&dev->lock); - logmsg (_("HHCSD017E Connect to device %4.4X (%s) failed: %s\n"), - dev->devnum, bs->spec, strerror(errno)); - return; - } - - /* Determine the connected client's IP address and hostname */ - - namelen = sizeof(client); - clientip = NULL; - clientname = "host name unknown"; - - if (1 - && getpeername(csock, (struct sockaddr*) &client, &namelen) == 0 - && (clientip = inet_ntoa(client.sin_addr)) != NULL - && (pHE = gethostbyaddr((unsigned char*)(&client.sin_addr), - sizeof(client.sin_addr), AF_INET)) != NULL - && pHE->h_name && *pHE->h_name - ) - { - clientname = (char*) pHE->h_name; - } - - /* Log the connection */ - - if (clientip) - { - logmsg (_("HHCSD018I %s (%s) connected to device %4.4X (%s)\n"), - clientip, clientname, dev->devnum, bs->spec); - } - else - { - logmsg (_("HHCSD019I <unknown> connected to device %4.4X (%s)\n"), - dev->devnum, bs->spec); - } - - /* Save the connected client information in the bind_struct */ - - if (bs->clientip) free(bs->clientip); - if (bs->clientname) free(bs->clientname); - - bs->clientip = safe_strdup(clientip); - bs->clientname = safe_strdup(clientname); - - /* Indicate that a client is now connected to device (prevents - * listening for new connections until THIS client disconnects). - */ - - dev->fd = csock; /* (indicate client connected to device) */ - - /* Release the device lock */ - - release_lock (&dev->lock); - - /* Raise unsolicited device end interrupt for the device */ - - device_attention (dev, CSW_DE); -} - -/*-------------------------------------------------------------------*/ -/* safe_strdup make copy of string and return a pointer to it */ -/*-------------------------------------------------------------------*/ -char* safe_strdup (char* str) -{ - char* newstr; - if (!str) return NULL; - newstr = malloc (strlen (str) + 1); - if (!newstr) return NULL; - strcpy (newstr, str); /* (guaranteed room) */ - return newstr; -} diff --git a/plo.c b/plo.c index 0c691fd..d3e8717 100644 --- a/plo.c +++ b/plo.c @@ -72,7 +72,7 @@ VADR op4addr; ARCH_DEP(program_interrupt)(regs, PGM_SPECIFICATION_EXCEPTION); op4alet = ARCH_DEP(vfetch4)(effective_addr4 + 68, b4, regs); regs->AR(r3) = op4alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } /* Load address of operand 4 */ @@ -165,7 +165,7 @@ VADR op4addr; ARCH_DEP(program_interrupt)(regs, PGM_SPECIFICATION_EXCEPTION); op4alet = ARCH_DEP(vfetch4)(effective_addr4 + 68, b4, regs); regs->AR(r3) = op4alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } /* Load address of operand 4 */ @@ -433,7 +433,7 @@ VADR op4addr; ARCH_DEP(program_interrupt)(regs, PGM_SPECIFICATION_EXCEPTION); op4alet = ARCH_DEP(vfetch4)(effective_addr4 + 68, b4, regs); regs->AR(r3) = op4alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } /* Load address of operand 4 */ @@ -571,7 +571,7 @@ VADR op4addr; ARCH_DEP(program_interrupt)(regs, PGM_SPECIFICATION_EXCEPTION); op4alet = ARCH_DEP(vfetch4)(effective_addr4 + 68, b4, regs); regs->AR(r3) = op4alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } /* Load address of operand 4 */ @@ -682,7 +682,7 @@ VADR op4addr; ARCH_DEP(program_interrupt)(regs, PGM_SPECIFICATION_EXCEPTION); op4alet = ARCH_DEP(vfetch4)(effective_addr4 + 68, b4, regs); regs->AR(r3) = op4alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } /* Load address of operand 4 */ @@ -783,7 +783,7 @@ VADR op4addr; ARCH_DEP(program_interrupt)(regs, PGM_SPECIFICATION_EXCEPTION); op4alet = ARCH_DEP(vfetch4)(effective_addr4 + 68, b4, regs); regs->AR(r3) = op4alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } /* Load address of operand 4 */ @@ -843,7 +843,7 @@ VADR op4addr, op4alet = ARCH_DEP(vfetch4)(effective_addr4 + 68, b4, regs); op6alet = ARCH_DEP(vfetch4)(effective_addr4 + 100, b4, regs); regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } /* Load address of operand 4 */ @@ -871,7 +871,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op4alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstore4)(op3, op4addr, r3, regs); @@ -879,7 +879,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstore4)(op5, op6addr, r3, regs); @@ -937,7 +937,7 @@ VADR op4addr, op4alet = ARCH_DEP(vfetch4)(effective_addr4 + 68, b4, regs); op6alet = ARCH_DEP(vfetch4)(effective_addr4 + 100, b4, regs); regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } /* Load address of operand 4 */ @@ -965,7 +965,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op4alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstore8)(op3, op4addr, r3, regs); @@ -973,7 +973,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstore8)(op5, op6addr, r3, regs); @@ -1027,7 +1027,7 @@ VADR op4addr, op4alet = ARCH_DEP(vfetch4)(effective_addr4 + 68, b4, regs); op6alet = ARCH_DEP(vfetch4)(effective_addr4 + 100, b4, regs); regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } /* Load address of operand 4 */ @@ -1047,7 +1047,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op4alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstore8)(op3, op4addr, r3, regs); @@ -1055,7 +1055,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstore8)(op5, op6addr, r3, regs); @@ -1115,7 +1115,7 @@ VADR op4addr, op4alet = ARCH_DEP(vfetch4)(effective_addr4 + 68, b4, regs); op6alet = ARCH_DEP(vfetch4)(effective_addr4 + 100, b4, regs); regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } /* Load address of operand 4 */ @@ -1135,7 +1135,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op4alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstorec)(op3, 16-1, op4addr, r3, regs); @@ -1143,7 +1143,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstorec)(op5, 16-1, op6addr, r3, regs); @@ -1201,7 +1201,7 @@ VADR op4addr, op6alet = ARCH_DEP(vfetch4)(effective_addr4 + 100, b4, regs); op8alet = ARCH_DEP(vfetch4)(effective_addr4 + 132, b4, regs); regs->AR(r3) = op8alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } /* Load address of operand 4 */ @@ -1238,7 +1238,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(validate_operand) (op6addr, r3, 4-1, ACCTYPE_WRITE_SKP, regs); @@ -1246,7 +1246,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op4alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstore4)(op3, op4addr, r3, regs); @@ -1254,7 +1254,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstore4)(op5, op6addr, r3, regs); @@ -1262,7 +1262,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op8alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstore4)(op7, op8addr, r3, regs); @@ -1325,7 +1325,7 @@ VADR op4addr, op6alet = ARCH_DEP(vfetch4)(effective_addr4 + 100, b4, regs); op8alet = ARCH_DEP(vfetch4)(effective_addr4 + 132, b4, regs); regs->AR(r3) = op8alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } /* Load address of operand 4 */ @@ -1362,7 +1362,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(validate_operand) (op6addr, r3, 8-1,ACCTYPE_WRITE_SKP, regs); @@ -1370,7 +1370,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op4alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstore8)(op3, op4addr, r3, regs); @@ -1378,7 +1378,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstore8)(op5, op6addr, r3, regs); @@ -1386,7 +1386,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op8alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstore8)(op7, op8addr, r3, regs); @@ -1445,7 +1445,7 @@ VADR op4addr, op6alet = ARCH_DEP(vfetch4)(effective_addr4 + 100, b4, regs); op8alet = ARCH_DEP(vfetch4)(effective_addr4 + 132, b4, regs); regs->AR(r3) = op8alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } /* Load address of operand 4 */ @@ -1470,7 +1470,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(validate_operand) (op6addr, r3, 8-1,ACCTYPE_WRITE_SKP, regs); @@ -1478,7 +1478,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op4alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstore8)(op3, op4addr, r3, regs); @@ -1486,7 +1486,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstore8)(op5, op6addr, r3, regs); @@ -1494,7 +1494,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op8alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstore8)(op7, op8addr, r3, regs); @@ -1559,7 +1559,7 @@ VADR op4addr, op6alet = ARCH_DEP(vfetch4)(effective_addr4 + 100, b4, regs); op8alet = ARCH_DEP(vfetch4)(effective_addr4 + 132, b4, regs); regs->AR(r3) = op8alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } /* Load address of operand 4 */ @@ -1584,7 +1584,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(validate_operand) (op6addr, r3, 16-1, ACCTYPE_WRITE_SKP, regs); @@ -1592,7 +1592,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op4alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstorec)(op3, 16-1, op4addr, r3, regs); @@ -1600,7 +1600,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op6alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstorec)(op5, 16-1, op6addr, r3, regs); @@ -1608,7 +1608,7 @@ VADR op4addr, if(!REAL_MODE(&regs->psw) && ACCESS_REGISTER_MODE(&regs->psw)) { regs->AR(r3) = op8alet; - INVALIDATE_AEA(r3, regs); + INVALIDATE_AEA_AR(r3, regs); } ARCH_DEP(vstorec)(op7, 16-1, op8addr, r3, regs); diff --git a/po/ChangeLog b/po/ChangeLog new file mode 100644 index 0000000..a3f8da8 --- /dev/null +++ b/po/ChangeLog @@ -0,0 +1,10 @@ +2003-08-26 gettextize <bug-gnu-gettext@gnu.org> + + * boldquot.sed: New file, from gettext-0.11.5. + * en@boldquot.header: New file, from gettext-0.11.5. + * en@quot.header: New file, from gettext-0.11.5. + * insert-header.sin: New file, from gettext-0.11.5. + * quot.sed: New file, from gettext-0.11.5. + * remove-potcdate.sin: New file, from gettext-0.11.5. + * Rules-quot: New file, from gettext-0.11.5. + diff --git a/po/POTFILES.in b/po/POTFILES.in index de98779..869e5d9 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,43 +1,98 @@ +assist.c +cache.c cardpch.c cardrdr.c cckdcdsk.c +cckdcomp.c +cckddasd.c +cckddiag.c +cckdfix.c cckdswap.c +cckdutil.c cgibin.c channel.c ckddasd.c cmpsc.c codepage.c +commadpt.c config.c console.c control.c cpu.c -ctcadpt.c +crypto.c ctc_ctci.c ctc_lcs.c +ctcadpt.c dasdcat.c dasdcopy.c dasdinit.c +dasdisup.c +dasdload.c +dasdls.c +dasdpdsu.c +dasdseq.c +dasdtab.c dasdutil.c -dat.h +dat.c +decimal.c +diagmssf.c +diagnose.c +dmap2hrc.c +dyngui.c +dyninst.c +ecpsvm.c esame.c external.c fbadasd.c +fishhang.c +float.c +fthreads.c general1.c +general2.c +hdl.c +hdlmain.c hercifc.c +hetget.c +hetinit.c +hetlib.c +hetmap.c +hetupd.c hostinfo.c hsccmd.c hscmisc.c +hscutl.c httpserv.c ieee.c +impl.c +io.c ipl.c +logger.c +logmsg.c machchk.c +memrchr.c opcode.c panel.c +parser.c +plo.c printer.c +qdio.c service.c +shared.c sie.c +sllib.c +sockdev.c stack.c +tapecopy.c tapedev.c +tapemap.c +tapesplt.c timer.c +trace.c tuntap.c +vector.c version.c +vm.c +vstore.c +w32chan.c +w32ctca.c +xstore.c diff --git a/po/de.gmo b/po/de.gmo index da125f6f1b8f8c5c774230508d704b676fb585f1..639ea4233debb9b104491f18c760471edf5fb9d8 100644 GIT binary patch delta 118 zcmaFP_K$5sjIAjn14AbeD>E=K>}O(NkO9(<fwTgUW?*JuPytekK$;gwy8&rFARPjv zrGRwu#+h1-e1-<P21W{omR3flx(23`FEU;e3ra1>FDlXXEl$r&(RC_KFV+pow^EqA HjOic%OYRqi delta 95 zcmeyz_MB}(jIA6a14AbeD>E=KtYBhbkO9(XfV2XTehH*ifHW5~0|PIR)(6sjK-v~a kO95%0jWe|v`3#J74UH6xjI4}Ibq&lWUu3*Cc^}gO0HbmcB>(^b diff --git a/po/de.po b/po/de.po index a26ec4a..8355fc1 100644 --- a/po/de.po +++ b/po/de.po @@ -1,17 +1,47 @@ -# NL.PO Hercules dutch messages -# This file is put in the public domain. -# Jan Jaeger <jj@septa.nl>, 2002. +# DE.PO Hercules German messages +# I assume this file is put in the public domain, Volker? (Fish <fish@infidels.org>) +# Volker Bandke <vbandke@bsp-gmbh.com>, 2002-2003. # msgid "" msgstr "" "Project-Id-Version: hercules 2.16\n" -"POT-Creation-Date: 2003-02-12 22:25-0600\n" +"POT-Creation-Date: 2003-10-02 19:25-0500\n" "PO-Revision-Date: 2002-05-10 16:16+0200\n" "Last-Translator: Jan Jaeger <jj@septa.nl>\n" "Language-Team: none <test@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" +"Report-Msgid-Bugs-To: \n" + +#: cache.c:384 +#, fuzzy, c-format +msgid "HHCCHxxxE calloc failed cache[%d] size %d: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: cache.c:506 +#, c-format +msgid "HHCCHxxxW realloc increase failed cache[%d] size %d: %s\n" +msgstr "" + +#: cache.c:525 +#, fuzzy, c-format +msgid "HHCCHxxxW realloc decrease failed cache[%d] size %d: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: cache.c:541 +#, fuzzy, c-format +msgid "HHCCHxxxW buf calloc failed cache[%d] size %d: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: cache.c:543 +msgid "HHCCHxxxW releasing inactive buffer space\n" +msgstr "" + +#: cache.c:548 +#, fuzzy, c-format +msgid "HHCCHxxxE Unable to calloc buf cache[%d] size %d: %s\n" +msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" #: cardpch.c:34 #, fuzzy, c-format @@ -23,107 +53,107 @@ msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" msgid "HHCPU001E File name missing or invalid\n" msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" -#: cardpch.c:89 +#: cardpch.c:92 #, fuzzy, c-format msgid "HHCPU002E Invalid argument: %s\n" msgstr "HHC422I Optie %s niet geldig\n" -#: cardpch.c:167 +#: cardpch.c:170 #, fuzzy, c-format msgid "HHCPU003E Error opening file %s: %s\n" msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" -#: cardrdr.c:58 +#: cardrdr.c:78 #, fuzzy msgid "HHCRD001E Out of memory\n" msgstr "HHC403I Niet genoeg geheugen\n" -#: cardrdr.c:156 +#: cardrdr.c:176 #, fuzzy, c-format msgid "HHCRD002E File name too long (max=%ud): \"%s\"\n" msgstr "HHC401I Bestandsnaam \"%2$s\" te lang (maximum=%1$ud)\n" -#: cardrdr.c:163 +#: cardrdr.c:183 #, fuzzy, c-format msgid "HHCRD003E Unable to access file \"%s\": %s\n" msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" -#: cardrdr.c:173 +#: cardrdr.c:193 #, fuzzy msgid "HHCRD004E Out of memory\n" msgstr "HHC403I Niet genoeg geheugen\n" -#: cardrdr.c:186 +#: cardrdr.c:206 #, fuzzy msgid "HHCRD005E Specify 'ascii' or 'ebcdic' (or neither) but not both\n" msgstr "HHC403I Specificeer 'ascii' of 'ebcdic' (of niets) maar niet beide\n" -#: cardrdr.c:195 +#: cardrdr.c:215 #, fuzzy msgid "HHCRD006E Only one filename (sock_spec) allowed for socket devices\n" msgstr "HHC403I Maar een bestandsnaam toegestaan voor socket apparaten\n" -#: cardrdr.c:210 +#: cardrdr.c:230 #, fuzzy, c-format msgid "HHCRD007I Defaulting to 'ascii' for socket device %4.4X\n" msgstr "HHC403I standaard waarde 'ascii' aan socket apparaat %4.4X toegekend\n" -#: cardrdr.c:218 +#: cardrdr.c:238 #, fuzzy msgid "HHCRD008W 'multifile' option ignored: only one file specified\n" msgstr "HHC403I 'multifile' optie niet gebruikt\n" -#: cardrdr.c:231 +#: cardrdr.c:251 #, fuzzy, c-format msgid "HHCRD009E File name too long (max=%ud): \"%s\"\n" msgstr "HHC401I Bestandsnaam \"%2$s\" te lang (maximum=%1$ud)\n" -#: cardrdr.c:245 +#: cardrdr.c:265 #, fuzzy, c-format msgid "HHCRD010E Unable to access file \"%s\": %s\n" msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" -#: cardrdr.c:320 +#: cardrdr.c:342 #, fuzzy, c-format msgid "HHCRD011E Close error on file \"%s\": %s\n" msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" -#: cardrdr.c:329 +#: cardrdr.c:351 #, fuzzy, c-format msgid "HHCRD012I %s (%s) disconnected from device %4.4X (%s)\n" msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: cardrdr.c:458 +#: cardrdr.c:492 #, fuzzy, c-format msgid "HHCRD013E Error opening file %s: %s\n" msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" -#: cardrdr.c:482 +#: cardrdr.c:516 #, fuzzy, c-format msgid "HHCRD014E Error reading file %s: %s\n" msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: cardrdr.c:515 +#: cardrdr.c:549 #, fuzzy, c-format msgid "HHCRD015E Seek error in file %s: %s\n" msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: cardrdr.c:582 +#: cardrdr.c:617 #, fuzzy, c-format msgid "HHCRD016E Error reading file %s: %s\n" msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: cardrdr.c:585 +#: cardrdr.c:620 #, fuzzy, c-format msgid "HHCRD017E Unexpected end of file on %s\n" msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" -#: cardrdr.c:649 +#: cardrdr.c:685 #, fuzzy, c-format msgid "HHCRD018E Error reading file %s: %s\n" msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: cardrdr.c:677 +#: cardrdr.c:713 #, fuzzy, c-format msgid "HHCRD019E Card image exceeds %d bytes in file %s\n" msgstr "HHC410I Ponskaart %d bytes te groot in bestand \"%s\"\n" @@ -180,3736 +210,7098 @@ msgid "" "\n" msgstr "" -#: cckdswap.c:56 +#: cckdcomp.c:79 #, fuzzy, c-format -msgid "cckdswap: error opening %s: %s\n" +msgid "cckdcomp: lseek error: %s\n" msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" -#: cckdswap.c:65 cckdswap.c:82 -#, c-format -msgid "cckdswap: %s read error: %s\n" +#: cckdcomp.c:85 +#, fuzzy, c-format +msgid "cckdcomp: read error: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: cckdcomp.c:91 +msgid "cckdcomp: OPENED bit is on, use `-f'\n" msgstr "" -#: cckdswap.c:73 +#: cckddasd.c:270 +#, fuzzy, c-format +msgid "HHCCD100E malloc failed for cckd extension: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: cckddasd.c:305 +#, fuzzy +msgid "HHCCD101E error initializing shadow files\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: cckddasd.c:1251 +#, fuzzy, c-format +msgid "HHCCD001I Readahead thread %d started: tid=" +msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" + +#: cckddasd.c:1251 cckddasd.c:1301 cckddasd.c:1445 cckddasd.c:1552 +#: cckddasd.c:4256 console.c:1311 cpu.c:1085 httpserv.c:585 panel.c:852 +#: shared.c:2481 shared.c:2644 sockdev.c:387 #, c-format -msgid "cckdswap: %s is not a compressed ckd file\n" +msgid ", pid=%d\n" msgstr "" -#: cckdswap.c:94 -msgid "cckdswap: error during swap\n" -msgstr "" +#: cckddasd.c:1301 +#, fuzzy, c-format +msgid "HHCCD011I Readahead thread %d stopping: tid=" +msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" -#: cckdswap.c:98 +#: cckddasd.c:1445 +#, fuzzy, c-format +msgid "HHCCD002I Writer thread %d started: tid=" +msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" + +#: cckddasd.c:1552 +#, fuzzy, c-format +msgid "HHCCD012I Writer thread %d stopping: tid=" +msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" + +#: cckddasd.c:1596 #, c-format -msgid "cckdswap: %s changed from %s to %s\n" +msgid "HHCCD102E file[%d] get space error, size exceeds 4G\n" msgstr "" -#: cckdswap.c:109 -msgid "" -"usage: cckdswap cckd-file\n" -"\n" -" cckd-file -- name of the compressed ckd\n" -" file which will have its\n" -" byte order swapped\n" +#: cckddasd.c:1603 +#, fuzzy, c-format +msgid "HHCCD103E file[%d] get space fstat error, size %llx: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: cckddasd.c:1623 +#, fuzzy, c-format +msgid "HHCCD104E truncate re-open error: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: cckddasd.c:1651 +#, c-format +msgid "HHCCD105E file[%d] get space ftruncate error, size %llx: %s\n" msgstr "" -#: channel.c:95 +#: cckddasd.c:1982 +#, fuzzy, c-format +msgid "HHCCD106E file[%d] hdr lseek error, offset %llx: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: cckddasd.c:1991 +#, fuzzy, c-format +msgid "HHCCD107E file[%d] chdr read error, offset %llx: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: cckddasd.c:2035 +#, fuzzy, c-format +msgid "HHCCD108E file[%d] chdr lseek error, offset %llx: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: cckddasd.c:2042 +#, fuzzy, c-format +msgid "HHCCD109E file[%d] chdr write error, offset %llx: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: cckddasd.c:2073 +#, fuzzy, c-format +msgid "HHCCD110E l1 table malloc error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: cckddasd.c:2082 +#, fuzzy, c-format +msgid "HHCCD111E file[%d] l1 lseek error, offset %llx: %s\n" +msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" + +#: cckddasd.c:2089 +#, fuzzy, c-format +msgid "HHCCD112E file[%d] l1 read error, offset %llx: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: cckddasd.c:2121 +#, fuzzy, c-format +msgid "HHCCD113E file[%d] l1 lseek error, offset %llx: %s\n" +msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" + +#: cckddasd.c:2128 +#, fuzzy, c-format +msgid "HHCCD114E file[%d] l1 write error, offset %llx: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: cckddasd.c:2158 #, c-format -msgid "HHCCP048I %4.4X:CCW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X%s\n" +msgid "HHCCD115E file[%d] l1[%d] lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:109 +#: cckddasd.c:2165 #, c-format -msgid "HHCCP049I %4.4X:Stat=%2.2X%2.2X Count=%2.2X%2.2X CCW=%2.2X%2.2X%2.2X\n" +msgid "HHCCD116E file[%d] l1[%d] write error, offset %llx: %s\n" msgstr "" -#: channel.c:124 +#: cckddasd.c:2195 #, c-format -msgid "" -"HHCCP050I %4.4X:SCSW=%2.2X%2.2X%2.2X%2.2X Stat=%2.2X%2.2X Count=%2.2X%2.2X " -"CCW=%2.2X%2.2X%2.2X%2.2X\n" +msgid "HHCCD117E file[%d] devhdr lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:229 +#: cckddasd.c:2202 +#, fuzzy, c-format +msgid "HHCCD118E file[%d] devhdr read error, offset %llx: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: cckddasd.c:2215 #, c-format -msgid "HHCCP051I %4.4X: Test I/O\n" +msgid "HHCCD119E file[%d] devhdr id error\n" msgstr "" -#: channel.c:288 -#, fuzzy -msgid "HHCCP052I TIO modification executed CC=1\n" -msgstr "HIO modificatie uitgevoerd CC=1\n" +#: cckddasd.c:2257 +#, fuzzy, c-format +msgid "HHCCD120E calloc failed for free space, size %d: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: channel.c:329 +#: cckddasd.c:2272 #, c-format -msgid "HHCCP053I %4.4X: Halt I/O\n" +msgid "HHCCD121E file[%d] free space lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:374 -#, fuzzy -msgid "HHCCP054I HIO modification executed CC=1\n" -msgstr "HIO modificatie uitgevoerd CC=1\n" +#: cckddasd.c:2279 +#, c-format +msgid "HHCCD122E file[%d] free space read error, offset %llx: %d,%d %s\n" +msgstr "" -#: channel.c:715 +#: cckddasd.c:2292 #, c-format -msgid "HHCCP055I %4.4X: Clear subchannel\n" +msgid "HHCCD123E file[%d] free space ftruncate error, size %llx: %s\n" msgstr "" -#: channel.c:831 +#: cckddasd.c:2309 #, c-format -msgid "HHCCP056I %4.4X: Halt subchannel\n" +msgid "HHCCD124E file[%d] free space lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:854 +#: cckddasd.c:2316 #, c-format -msgid "HHCCP057I %4.4X: Halt subchannel: cc=1\n" +msgid "HHCCD125E file[%d] free space read error, offset %llx: %d,%d,%d %s\n" msgstr "" -#: channel.c:864 +#: cckddasd.c:2373 #, c-format -msgid "HHCCP058I %4.4X: Halt subchannel: cc=2\n" +msgid "HHCCD126E file[%d] free space lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:940 +#: cckddasd.c:2380 #, c-format -msgid "HHCCP059I %4.4X: Halt subchannel: cc=0\n" +msgid "HHCCD127E file[%d] free space write error, offset %llx: %s\n" msgstr "" -#: channel.c:978 +#: cckddasd.c:2467 #, c-format -msgid "HHCCP060I %4.4X: Resume subchannel: cc=1\n" +msgid "HHCCD128E file[%d] l2[%d] lseek error offset %lld: %s\n" msgstr "" -#: channel.c:992 +#: cckddasd.c:2478 +#, fuzzy, c-format +msgid "HHCCD129E file[%d] l2[%d] read error offset %lld: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: cckddasd.c:2597 #, c-format -msgid "HHCCP061I %4.4X: Resume subchannel: cc=2\n" +msgid "HHCCD130E file[%d] l2[%d] lseek error offset %lld: %s\n" msgstr "" -#: channel.c:1012 +#: cckddasd.c:2604 #, c-format -msgid "HHCCP062I %4.4X: Resume subchannel: cc=0\n" +msgid "HHCCD131E file[%d] l2[%d] write error offset %lld: %s\n" msgstr "" -#: channel.c:1532 +#: cckddasd.c:2690 #, c-format -msgid "HHCCP063I %4.4X:IDAW=%8.8X Len=%3.3hX%s\n" +msgid "HHCCD132E file[%d] l2[%d,%d] lseek error offset %lld: %s\n" msgstr "" -#: channel.c:1537 +#: cckddasd.c:2697 #, c-format -msgid "" -"HHCCP064I %4.4X:IDAW=%16.16llX Len=%4.4hX\n" -"%4.4X:---------------------%s\n" +msgid "HHCCD133E file[%d] l2[%d,%d] write error offset %lld: %s\n" msgstr "" -#: channel.c:1641 +#: cckddasd.c:2730 #, fuzzy, c-format -msgid "HHCCP065I DEV%4.4X: attention signalled\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +msgid "HHCCD134E file[%d] trk %d lseek error offset %llx: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: channel.c:1652 +#: cckddasd.c:2737 #, fuzzy, c-format -msgid "HHCCP066I DEV%4.4X: attention\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +msgid "HHCCD135E file[%d] trk %d read error offset %llx: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: channel.c:1852 -#, fuzzy, c-format -msgid "HHCCP067E %4.4X create_thread error: %s" -msgstr "HHC760I %4.4X create_thread fout: %s" +#: cckddasd.c:2794 +#, c-format +msgid "HHCCD136E file[%d] trk %d not written, invalid format\n" +msgstr "" -#: channel.c:1870 +#: cckddasd.c:2824 #, fuzzy, c-format -msgid "HHCCP068E %4.4X create_thread error: %s" -msgstr "HHC760I %4.4X create_thread fout: %s" +msgid "HHCCD137E file[%d] trk %d lseek error offset %llx: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: channel.c:2026 -#, fuzzy, c-format -msgid "HHCCP069I Device %4.4X initial status interrupt\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +#: cckddasd.c:2831 +#, c-format +msgid "HHCCD138E file[%d] trk %d write error offset %llx len %d rc %d: %s\n" +msgstr "" -#: channel.c:2067 +#: cckddasd.c:2924 #, fuzzy, c-format -msgid "HHCCP070I Device %4.4X attention completed\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +msgid "HHCCD139E trklen err for %2.2x%2.2x%2.2x%2.2x%2.2x\n" +msgstr "*** Spur %d HA Validierungsfehler! %2.2x%2.2x%2.2x%2.2x%2.2x\n" -#: channel.c:2131 +#: cckddasd.c:2953 #, fuzzy, c-format -msgid "HHCCP071I Device %4.4X clear completed\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" +msgid "HHCCD140E truncate fstat error: %s\n" +msgstr "%d Bytes gelesen von %s\n" -#: channel.c:2179 +#: cckddasd.c:2974 #, fuzzy, c-format -msgid "HHCCP072I Device %4.4X halt completed\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +msgid "HHCCD141E truncate re-open error: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" -#: channel.c:2345 +#: cckddasd.c:2983 #, fuzzy, c-format -msgid "HHCCP073I Device %4.4X suspended\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +msgid "HHCCD142E truncate ftruncate error: %s\n" +msgstr "%d Bytes gelesen von %s\n" -#: channel.c:2364 +#: cckddasd.c:3078 #, fuzzy, c-format -msgid "HHCCP074I Device %4.4X resumed\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +msgid "HHCCD143E invalid byte 0 trk %d: buf %2.2x%2.2x%2.2x%2.2x%2.2x\n" +msgstr "" +"%4.4X ckddasd: Kopfdaten ungültig für Zyl. %d Spur %d %2.2x%2.2x%2.2x%2.2x%" +"2.2x\n" -#: channel.c:2628 -#, c-format -msgid "HHCCP075I %4.4X:Stat=%2.2X%2.2X Count=%4.4X %s\n" +#: cckddasd.c:3100 +#, fuzzy, c-format +msgid "HHCCD144E invalid byte 0 blkgrp %d: buf %2.2x%2.2x%2.2x%2.2x%2.2x\n" msgstr "" +"%4.4X ckddasd: Kopfdaten ungültig für Zyl. %d Spur %d %2.2x%2.2x%2.2x%2.2x%" +"2.2x\n" -#: channel.c:2634 +#: cckddasd.c:3115 #, c-format -msgid "" -"HHCCP076I %4.4X:Sense=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%" -"2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X\n" +msgid "HHCCD145E invalid %s hdr %s %d: %s compression unsupported\n" msgstr "" -#: channel.c:2649 -#, c-format -msgid "HHCCP077I %4.4X:Sense=%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n" +#: cckddasd.c:3122 +#, fuzzy, c-format +msgid "HHCCD146E invalid %s hdr %s %d buf %2.2x%2.2x%2.2x%2.2x%2.2x\n" msgstr "" +"%4.4X ckddasd: Kopfdaten ungültig für Zyl. %d Spur %d %2.2x%2.2x%2.2x%2.2x%" +"2.2x\n" -#: ckddasd.c:231 +#: cckddasd.c:3237 #, fuzzy -msgid "HHCDA001E File name missing or invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgid "HHCCD147E no shadow file name specified\n" +msgstr "Ongeldig apparaat nummer\n" + +#: cckddasd.c:3244 +#, c-format +msgid "HHCCD148E [%d] number of shadow files exceeded: %d\n" +msgstr "" -#: ckddasd.c:339 +#: cckddasd.c:3304 #, c-format -msgid "HHCDA002E parameter %d is invalid: %s\n" +msgid "" +"HHCCD149E shadow file[%d] name %s\n" +" collides with %4.4X file[%d] name %s\n" msgstr "" -#: ckddasd.c:350 +#: cckddasd.c:3366 #, fuzzy, c-format -msgid "HHCDA003I opening %s readonly%s\n" +msgid "" +"HHCCD150E error re-opening %s readonly\n" +" %s\n" msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" -#: ckddasd.c:363 +#: cckddasd.c:3405 #, fuzzy, c-format -msgid "HHCDA004E %s open error: %s\n" +msgid "HHCCD151E shadow file[%d] open error: %s\n" msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" -#: ckddasd.c:378 -#, c-format -msgid "HHCDA005E %s not in a single file for shadowing\n" -msgstr "" +#: cckddasd.c:3414 +#, fuzzy, c-format +msgid "HHCCD152E file[%d] lseek error offset %d: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: ckddasd.c:387 +#: cckddasd.c:3422 #, fuzzy, c-format -msgid "HHCDA006E %s fstat error: %s\n" +msgid "HHCCD153E file[%d] read error offset %d: %s\n" msgstr "%d Bytes gelesen von %s\n" -#: ckddasd.c:397 +#: cckddasd.c:3432 #, fuzzy, c-format -msgid "HHCDA007E %s read error: %s\n" -msgstr "%d Bytes gelesen von %s\n" +msgid "HHCCD154E shadow file[%d] write error offset %d: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: ckddasd.c:400 -#, c-format -msgid "HHCDA08E %s CKD header incomplete\n" -msgstr "" +#: cckddasd.c:3449 +#, fuzzy, c-format +msgid "HHCCD155E file[%d] l1 malloc failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: ckddasd.c:410 -#, c-format -msgid "HHCDA009E %s CKD header invalid\n" -msgstr "" +#: cckddasd.c:3489 +#, fuzzy +msgid "HHCCD156E not a cckd device\n" +msgstr "%d Geräte bearbeitet\n" + +#: cckddasd.c:3521 +#, fuzzy, c-format +msgid "HHCCD157E file[%d] error adding shadow file: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: ckddasd.c:419 +#: cckddasd.c:3544 #, c-format -msgid "HHCDA010E %s Only 1 CCKD file allowed\n" +msgid "HHCCD158E file[%d] %s added\n" msgstr "" -#: ckddasd.c:434 -#, fuzzy, c-format -msgid "HHCDA011E %s read error: %s\n" -msgstr "%d Bytes gelesen von %s\n" +#: cckddasd.c:3580 +#, fuzzy +msgid "HHCCD159E not a cckd device\n" +msgstr "%d Geräte bearbeitet\n" -#: ckddasd.c:439 +#: cckddasd.c:3586 +#, fuzzy +msgid "HHCCD160E cannot remove base file\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: cckddasd.c:3623 #, c-format -msgid "HHCDA012E %s CCKD header incomplete\n" +msgid "HHCCD161E file[%d] not merged, file[%d] cannot be opened read-write\n" msgstr "" -#: ckddasd.c:450 +#: cckddasd.c:3635 #, c-format -msgid "HHCDA013E %s CKD file out of sequence\n" +msgid "HHCCD162E file[%d] not merged, file[%d] check failed\n" msgstr "" -#: ckddasd.c:482 +#: cckddasd.c:3649 #, c-format -msgid "HHCDA014I %s seq=%d cyls=%d-%d\n" +msgid "HHCCD163E file[%d] not merged, file[%d] not hardened\n" msgstr "" -#: ckddasd.c:496 +#: cckddasd.c:3686 #, c-format -msgid "HHCDA015E %s heads=%d trklen=%d, expected heads=%d trklen=%d\n" +msgid "HHCCD164E file[%d] l2[%d] lseek error offset %lld: %s\n" msgstr "" -#: ckddasd.c:509 +#: cckddasd.c:3695 #, c-format -msgid "HHCDA016E %s CKD header inconsistent with file size\n" +msgid "HHCCD165E file[%d] l2[%d] read error offset %lld: %s\n" msgstr "" -#: ckddasd.c:517 +#: cckddasd.c:3713 #, c-format -msgid "HHCDA017E %s CKD header high cylinder incorrect\n" +msgid "HHCCD166E file[%d] l2[%d] lseek error offset %lld: %s\n" msgstr "" -#: ckddasd.c:543 +#: cckddasd.c:3722 #, c-format -msgid "HHCDA018E %s exceeds maximum %d CKD files\n" +msgid "HHCCD167E file[%d] l2[%d] read error offset %lld: %s\n" msgstr "" -#: ckddasd.c:554 +#: cckddasd.c:3748 +#, fuzzy, c-format +msgid "HHCCD168E file[%d] %s[%d] lseek error offset %lld: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: cckddasd.c:3753 #, c-format -msgid "HHCDA019I %s cyls=%d heads=%d tracks=%d trklen=%d\n" +msgid "HHCCD169E file[%d] %s[%d] not merged\n" msgstr "" -#: ckddasd.c:565 +#: cckddasd.c:3762 +#, fuzzy, c-format +msgid "HHCCD170E file[%d] %s[%d] read error offset %lld: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: cckddasd.c:3767 #, c-format -msgid "HHCDA020E %4.4X device type %4.4X not found in dasd table\n" +msgid "HHCCD171E file[%d] %s[%d] not merged\n" msgstr "" -#: ckddasd.c:574 +#: cckddasd.c:3787 #, c-format -msgid "HHCDA021E %4.4X control unit %s not found in dasd table\n" +msgid "HHCCD172E file[%d] %s[%d] lseek error offset %lld: %s\n" msgstr "" -#: ckddasd.c:647 +#: cckddasd.c:3791 #, c-format -msgid "HHCDA022I %4.4X cache hits %d, misses %d\n" +msgid "HHCCD173E file[%d] %s[%d] not merged\n" msgstr "" -#: ckddasd.c:712 -#, fuzzy, c-format -msgid "HHCDA025E error writing trk %d: lseek error: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" - -#: ckddasd.c:726 -#, fuzzy, c-format -msgid "HHCDA026E error writing trk %d: write error: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" - -#: ckddasd.c:760 -#, fuzzy, c-format -msgid "HHCDA027E calloc error for cache table size %d: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: ckddasd.c:808 -#, fuzzy, c-format -msgid "HHCDA030E malloc error for cache entry buffer size %d: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: ckddasd.c:840 +#: cckddasd.c:3800 #, fuzzy, c-format -msgid "HHCDA032E error reading trk %d: lseek error: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgid "HHCCD174E file[%d] %s[%d] write error offset %lld: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: ckddasd.c:853 -#, fuzzy, c-format -msgid "HHCDA033E error reading trk %d: read error: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: cckddasd.c:3804 +#, c-format +msgid "HHCCD175E file[%d] %s[%d] not merged\n" +msgstr "" -#: ckddasd.c:872 -#, fuzzy, c-format -msgid "" -"HHCDA035E %4.4X invalid track header for cyl %d head %d %2.2x%2.2x%2.2x%2.2x" -"%2.2x\n" +#: cckddasd.c:3841 +#, c-format +msgid "HHCCD176E file[%d] l1[%d] lseek error offset %lld: %s\n" msgstr "" -"%4.4X ckddasd: Kopfdaten ungültig für Zyl. %d Spur %d %2.2x%2.2x%2.2x%2.2x%" -"2.2x\n" -#: ckddasd.c:933 -#, fuzzy, c-format -msgid "HHCDA036E error writing trk %d: lseek error: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: cckddasd.c:3845 +#, c-format +msgid "HHCCD177E file[%d] %s[%d-%d] not merged\n" +msgstr "" -#: ckddasd.c:946 +#: cckddasd.c:3854 #, fuzzy, c-format -msgid "HHCDA037E error writing trk %d: write error: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgid "HHCCD178E file[%d] l1[%d] write error offset %lld: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: ckddasd.c:1207 -msgid "HHCDA042E attempt to read past end of track\n" +#: cckddasd.c:3858 +#, c-format +msgid "HHCCD179E file[%d] %s[%d-%d] not merged\n" msgstr "" -#: ckddasd.c:1324 -msgid "ckddasd: attempt to read past end of track\n" +#: cckddasd.c:3890 +#, c-format +msgid "HHCCD200I shadow file [%d] successfully %s%s\n" msgstr "" -#: ckddasd.c:1374 -msgid "HHCDA046E attempt to read past end of track\n" -msgstr "" +#: cckddasd.c:3918 +#, fuzzy +msgid "HHCCD201W device is not a shadow file\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: ckddasd.c:1543 -msgid "HHCDA049E Write KD orientation error\n" +#: cckddasd.c:3923 +msgid "HHCCD202W file shadowing not activated\n" msgstr "" -#: ckddasd.c:1585 -msgid "HHCDA051E Write data orientation error\n" +#: cckddasd.c:3931 +msgid "HHCCD203W shadowing is already active\n" msgstr "" -#: ckddasd.c:1658 +#: cckddasd.c:3937 #, c-format -msgid "HHCDA053E Data chaining not supported for CCW %2.2X\n" +msgid "HHCCD204I shadow file name set to %s\n" msgstr "" -#: ckddasd.c:2945 -#, c-format -msgid "HHCDA055I search key %s\n" -msgstr "" - -#: codepage.c:187 -#, fuzzy, c-format -msgid "HHCCF051E CodePage conversion table %s is not defined\n" -msgstr "HHC050I CodePage conversie tabel %s is niet gedefinieerd\n" - -#: config.c:170 -#, fuzzy, c-format -msgid "HHCCF001S Error reading file %s line %d: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: config.c:189 -#, c-format -msgid "HHCCF002S File %s line %d is too long\n" -msgstr "" - -#: config.c:337 -#, fuzzy, c-format -msgid "HHCCF003S Cannot open file %s: %s\n" -msgstr "Kann %s nicht öffnen: %s\n" - -#: config.c:374 -#, fuzzy, c-format -msgid "HHCCF004S No device records in file %s\n" +#: cckddasd.c:3954 +#, fuzzy +msgid "HHCCD205W device is not a shadow file\n" msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: config.c:517 -#, fuzzy, c-format -msgid "HHCCF005S Error in %s line %d: Unrecognized argument %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: config.c:531 -#, c-format -msgid "HHCCF006S Error in %s line %d: Userid, but no password given %s\n" -msgstr "" - -#: config.c:546 -#, fuzzy, c-format -msgid "HHCCF007S Error in %s line %d: Missing argument.\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: config.c:559 -#, fuzzy, c-format -msgid "HHCCF008S Error in %s line %d: Unrecognized keyword %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: config.c:568 -#, fuzzy, c-format -msgid "HHCCF009S Error in %s line %d: Incorrect number of operands\n" -msgstr "Geen apparaat nummer\n" +#: cckddasd.c:4021 +#, fuzzy +msgid "HHCCD206W device is not a shadow file\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: config.c:602 -#, c-format +#: cckddasd.c:4038 msgid "" -"HHCCF010S Error in %s line %d: Unknown or unsupported ARCHMODE specification " -"%s\n" -msgstr "" - -#: config.c:620 -#, fuzzy, c-format -msgid "HHCCF011S Error in %s line %d: %s is not a valid serial number\n" -msgstr "Ongeldig apparaat nummer\n" - -#: config.c:633 -#, fuzzy, c-format -msgid "HHCCF012S Error in %s line %d: %s is not a valid CPU model\n" -msgstr "Ongeldig apparaat nummer\n" - -#: config.c:646 -#, c-format -msgid "HHCCF013S Error in %s line %d: Invalid main storage size %s\n" +"HHCCD210I size free nbr st reads writes l2reads hits " +"switches\n" msgstr "" -#: config.c:659 -#, c-format -msgid "HHCCF014S Error in %s line %d: Invalid expanded storage size %s\n" -msgstr "" - -#: config.c:672 -#, fuzzy, c-format -msgid "HHCCF015S Error in %s line %d: Invalid console port number %s\n" -msgstr "Ongeldig apparaat nummer\n" - -#: config.c:684 -#, c-format -msgid "HHCCF016S Error in %s line %d: Invalid CPU thread priority %s\n" +#: cckddasd.c:4040 +msgid "" +"HHCCD211I readaheads " +"misses\n" msgstr "" -#: config.c:692 +#: cckddasd.c:4041 msgid "" -"HHCCF017W Hercules is not running as setuid root, cannot raise CPU priority\n" +"HHCCD212I " +"-------------------------------------------------------------------\n" msgstr "" -#: config.c:706 -#, fuzzy, c-format -msgid "HHCCF018S Error in %s line %d: Invalid number of CPUs %s\n" -msgstr "Ongeldig apparaat nummer\n" - -#: config.c:720 -#, fuzzy, c-format -msgid "HHCCF019S Error in %s line %d: Invalid number of VFs %s\n" -msgstr "Ongeldig apparaat nummer\n" - -#: config.c:726 -#, fuzzy -msgid "HHCCF020W Vector Facility support not configured\n" -msgstr "CPU%4.4X nicht konfiguriert\n" - -#: config.c:735 +#: cckddasd.c:4044 #, c-format -msgid "HHCCF021S Error in %s line %d: Load parameter %s exceeds 8 characters\n" +msgid "HHCCD213I [*] %10lld %3lld%% %4d %7d %7d %7d %7d %7d\n" msgstr "" -#: config.c:757 +#: cckddasd.c:4049 #, c-format -msgid "" -"HHCCF022S Error in %s line %d: %s is not a valid system epoch.\n" -"Patch config.c to expand the table\n" +msgid "HHCCD214I %7d %7d\n" msgstr "" -#: config.c:772 +#: cckddasd.c:4053 #, c-format -msgid "HHCCF023S Error in %s line %d: %s is not a valid timezone offset\n" +msgid "HHCCD215I %s\n" msgstr "" -#: config.c:786 +#: cckddasd.c:4054 #, c-format -msgid "HHCCF024S Error in %s line %d: Invalid TOD clock drag factor %s\n" +msgid "HHCCD216I [0] %10lld %3lld%% %4d %s %7d %7d %7d\n" msgstr "" -#: config.c:810 +#: cckddasd.c:4063 #, c-format -msgid "HHCCF025S Error in %s line %d: Invalid panel refresh rate %s\n" +msgid "HHCCD217I %s\n" msgstr "" -#: config.c:849 +#: cckddasd.c:4069 #, c-format -msgid "HHCCF026S Error in %s line %d: Unknown OS tailor specification %s\n" +msgid "HHCCD218I [%d] %10lld %3lld%% %4d %s %7d %7d %7d\n" msgstr "" -#: config.c:862 -#, fuzzy, c-format -msgid "HHCCF027S Error in %s line %d: Invalid maximum device threads %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: cckddasd.c:4166 +#, fuzzy +msgid "HHCCD003I Garbage collector thread started: tid=" +msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" -#: config.c:887 +#: cckddasd.c:4166 #, c-format -msgid "" -"HHCCF028S Error in %s line %d: Invalid program product OS permission %s\n" +msgid ", pid=%d \n" msgstr "" -#: config.c:901 -#, fuzzy, c-format -msgid "HHCCF029S Error in %s line %d: Invalid HTTP port number %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: cckddasd.c:4256 +#, fuzzy +msgid "HHCCD013I Garbage collector thread stopping: tid=" +msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" -#: config.c:915 +#: cckddasd.c:4393 #, fuzzy, c-format -msgid "HHCCF030S Error in %s line %d: Invalid I/O delay value: %s\n" -msgstr "Ongeldige waarde: %s\n" +msgid "HHCCD180E gcperc lseek error file[%d] offset 0x%llx: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: config.c:936 +#: cckddasd.c:4400 #, c-format -msgid "HHCCF031S Cannot obtain %dMB main storage: %s\n" +msgid "HHCCD181E gcperc read error file[%d] offset 0x%llx: %d,%d %s\n" msgstr "" -#: config.c:945 +#: cckddasd.c:4453 #, c-format -msgid "HHCCF032S Cannot obtain storage key array: %s\n" +msgid "HHCCD182E unknown space at offset 0x%llx\n" msgstr "" -#: config.c:968 +#: cckddasd.c:4455 #, c-format -msgid "HHCCF033S Cannot obtain %dMB expanded storage: %s\n" +msgid "HHCCD183E %2.2x%2.2x%2.2x%2.2x%2.2x\n" msgstr "" -#: config.c:974 -#, fuzzy -msgid "HHCCF034W Expanded storage support not installed\n" -msgstr "CPU%4.4X nicht konfiguriert\n" - -#: config.c:1160 +#: cckddasd.c:4537 #, fuzzy, c-format -msgid "HHCCF035S Error in %s line %d: Missing device number or device type\n" -msgstr "Geen apparaat nummer\n" +msgid "HHCCD190E uncompress %d calloc() error: %s\n" +msgstr "%d Bytes gelesen von %s\n" -#: config.c:1169 +#: cckddasd.c:4546 #, fuzzy, c-format -msgid "HHCCF036S Error in %s line %d: %s is not a valid device number\n" -msgstr "Ongeldig apparaat nummer\n" - -#: config.c:1195 -#, c-format -msgid "HHCCF037S Message pipe creation failed: %s\n" -msgstr "" +msgid "HHCCD191E uncompress %d calloc() error: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" -#: config.c:1209 +#: cckddasd.c:4562 #, fuzzy, c-format -msgid "HHCCF038S Message pipe open failed: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgid "HHCCD192E uncompress %d calloc() error: %s\n" +msgstr "%d Bytes gelesen von %s\n" -#: config.c:1230 -msgid "" -"HHCCF039W PGMPRDOS LICENSED specified.\n" -" Licensed program product operating systems are enabled.\n" -" You are responsible for meeting all conditions of your\n" -" software license.\n" -"\n" +#: cckddasd.c:4592 +#, fuzzy, c-format +msgid "HHCCD193E uncompress error trk %d: %2.2x%2.2x%2.2x%2.2x%2.2x\n" msgstr "" +"%4.4X ckddasd: Kopfdaten ungültig für Zyl. %d Spur %d %2.2x%2.2x%2.2x%2.2x%" +"2.2x\n" -#: config.c:1311 +#: cckddasd.c:4595 #, c-format -msgid "HHCCF040E Cannot create CPU%4.4X thread: %s\n" +msgid "HHCCD194E %s compression not supported\n" msgstr "" -#: config.c:1356 -#, c-format -msgid "HHCCF041E Device %4.4X already exists\n" +#: cckddasd.c:5104 +msgid "HHCCD900I print_itrace\n" msgstr "" -#: config.c:1366 +#: cckddiag.c:136 #, c-format -msgid "HHCCF042E Device type %s not recognized\n" +msgid "lseek to pos 0x%8.8x error: %s\n" msgstr "" -#: config.c:1381 -#, c-format -msgid "HHCCF043E Cannot obtain device block for device %4.4X: %s\n" -msgstr "" +#: cckddiag.c:146 +#, fuzzy, c-format +msgid "cckddiag: read error: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" -#: config.c:1433 +#: cckddiag.c:485 #, fuzzy, c-format -msgid "HHCCF044E Initialization failed for device %4.4X\n" -msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" +msgid "cckddiag: error opening file %s: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" -#: config.c:1450 -#, c-format -msgid "HHCCF045E Cannot obtain buffer for device %4.4X: %s\n" -msgstr "" +#: cckdswap.c:56 +#, fuzzy, c-format +msgid "cckdswap: error opening %s: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" -#: config.c:1507 +#: cckdswap.c:65 cckdswap.c:82 #, c-format -msgid "HHCCF046E Device %4.4X does not exist\n" +msgid "cckdswap: %s read error: %s\n" msgstr "" -#: config.c:1535 +#: cckdswap.c:73 #, c-format -msgid "HHCCF047I Device %4.4X detached\n" +msgid "cckdswap: %s is not a compressed ckd file\n" msgstr "" -#: config.c:1553 -#, c-format -msgid "HHCCF048E Device %4.4X does not exist\n" +#: cckdswap.c:94 +msgid "cckdswap: error during swap\n" msgstr "" -#: config.c:1560 +#: cckdswap.c:98 #, c-format -msgid "HHCCF049E Device %4.4X already exists\n" +msgid "cckdswap: %s changed from %s to %s\n" msgstr "" -#: config.c:1590 -#, fuzzy, c-format -msgid "HHCCF050I Device %4.4X defined as %4.4X\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: console.c:693 -#, c-format -msgid "HHCTE007I Device %4.4X connection closed by client %s\n" +#: cckdswap.c:109 +msgid "" +"usage: cckdswap cckd-file\n" +"\n" +" cckd-file -- name of the compressed ckd\n" +" file which will have its\n" +" byte order swapped\n" msgstr "" -#: console.c:856 +#: channel.c:97 #, c-format -msgid "HHCTE008I Device %4.4X connection closed by client %s\n" +msgid "HHCCP048I %4.4X:CCW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X%s\n" msgstr "" -#: console.c:1146 -#, fuzzy, c-format -msgid "HHCTE009I Client %s connected to %4.4X device %4.4X\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: console.c:1200 -#, fuzzy -msgid "HHCTE001I Console connection thread started: tid=" -msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" - -#: console.c:1201 cpu.c:1090 httpserv.c:562 panel.c:923 timer.c:284 +#: channel.c:111 #, c-format -msgid ", pid=%d\n" +msgid "HHCCP049I %4.4X:Stat=%2.2X%2.2X Count=%2.2X%2.2X CCW=%2.2X%2.2X%2.2X\n" msgstr "" -#: console.c:1238 +#: channel.c:126 #, c-format -msgid "HHCTE002W Waiting for port %u to become free\n" +msgid "" +"HHCCP050I %4.4X:SCSW=%2.2X%2.2X%2.2X%2.2X Stat=%2.2X%2.2X Count=%2.2X%2.2X " +"CCW=%2.2X%2.2X%2.2X%2.2X\n" msgstr "" -#: console.c:1258 +#: channel.c:237 #, c-format -msgid "HHCTE003I Waiting for console connection on port %u\n" +msgid "HHCCP051I %4.4X: Test I/O\n" msgstr "" -#: console.c:1403 +#: channel.c:302 #, fuzzy -msgid "HHCTE004I Console connection thread terminated\n" -msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" +msgid "HHCCP052I TIO modification executed CC=1\n" +msgstr "HIO modificatie uitgevoerd CC=1\n" -#: console.c:1418 +#: channel.c:339 #, c-format -msgid "HHCTE005E Cannot create console thread: %s\n" -msgstr "" - -#: console.c:1439 -msgid "console_remove() error\n" +msgid "HHCCP053I %4.4X: Halt I/O\n" msgstr "" -#: cpu.c:255 -msgid "HHCCP043I Wait state PSW loaded: " -msgstr "" +#: channel.c:393 +#, fuzzy +msgid "HHCCP054I HIO modification executed CC=1\n" +msgstr "HIO modificatie uitgevoerd CC=1\n" -#: cpu.c:399 +#: channel.c:766 #, c-format -msgid "program_int() passing to guest code=%4.4X\n" -msgstr "" - -#: cpu.c:484 -msgid "HHCCP014I " -msgstr "" - -#: cpu.c:487 hscmisc.c:596 -msgid "SIE: " +msgid "HHCCP055I %4.4X: Clear subchannel\n" msgstr "" -#: cpu.c:492 +#: channel.c:867 #, c-format -msgid "CPU%4.4X: %s CODE=%4.4X ILC=%d\n" +msgid "HHCCP056I %4.4X: Halt subchannel\n" msgstr "" -#: cpu.c:594 +#: channel.c:889 #, c-format -msgid "HHCCP015I CPU%4.4X PER event: code=%4.4X perc=%2.2X addr=" -msgstr "" - -#: cpu.c:595 sie.c:120 sie.c:234 stack.c:593 stack.c:616 stack.c:678 -#: stack.c:696 stack.c:704 stack.c:728 stack.c:751 stack.c:804 stack.c:882 -#: stack.c:916 stack.c:944 stack.c:956 stack.c:967 stack.c:1021 stack.c:1045 -#: stack.c:1277 stack.c:1303 stack.c:1311 stack.c:1348 stack.c:1443 -#: stack.c:1479 stack.c:1532 -msgid "\n" +msgid "HHCCP057I %4.4X: Halt subchannel: cc=1\n" msgstr "" -#: cpu.c:757 +#: channel.c:899 #, c-format -msgid "HHCCP016I CPU%4.4X: Program interrupt loop: " +msgid "HHCCP058I %4.4X: Halt subchannel: cc=2\n" msgstr "" -#: cpu.c:865 +#: channel.c:970 #, c-format -msgid "" -"HHCCP044I I/O interrupt code=%4.4X CSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%" -"2.2X\n" +msgid "HHCCP059I %4.4X: Halt subchannel: cc=0\n" msgstr "" -#: cpu.c:887 +#: channel.c:1008 #, c-format -msgid "HHCCP045I I/O interrupt code=%8.8X parm=%8.8X\n" +msgid "HHCCP060I %4.4X: Resume subchannel: cc=1\n" msgstr "" -#: cpu.c:890 +#: channel.c:1022 #, c-format -msgid "HHCCP046I I/O interrupt code=%8.8X parm=%8.8X id=%8.8X\n" +msgid "HHCCP061I %4.4X: Resume subchannel: cc=2\n" msgstr "" -#: cpu.c:956 +#: channel.c:1045 #, c-format -msgid "HHCCP022I Machine Check code=%16.16llu\n" +msgid "HHCCP062I %4.4X: Resume subchannel: cc=0\n" msgstr "" -#: cpu.c:1013 +#: channel.c:1596 #, c-format -msgid "HHCCP001W CPU thread set priority %d failed: %s\n" +msgid "HHCCP063I %4.4X:IDAW=%8.8X Len=%3.3hX%s\n" msgstr "" -#: cpu.c:1020 -#, fuzzy, c-format -msgid "HHCCP002I CPU%4.4X thread started: tid=" -msgstr "HHC623I CPU%4.4X thread al gestart\n" - -#: cpu.c:1020 +#: channel.c:1601 #, c-format -msgid ", pid=%d, priority=%d\n" +msgid "" +"HHCCP064I %4.4X:IDAW=%16.16llX Len=%4.4hX\n" +"%4.4X:---------------------%s\n" msgstr "" -#: cpu.c:1026 +#: channel.c:1718 #, fuzzy, c-format -msgid "HHCCP003I CPU%4.4X architecture mode %s\n" -msgstr "HHC630I CPU%4.4X Architectuur Modus %s\n" +msgid "HHCCP065I DEV%4.4X: attention signalled\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: cpu.c:1031 +#: channel.c:1730 #, fuzzy, c-format -msgid "HHCCP004I CPU%4.4X Vector Facility online\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" +msgid "HHCCP066I DEV%4.4X: attention\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: cpu.c:1042 +#: channel.c:1913 #, fuzzy, c-format -msgid "HHCCP005E CPU%4.4X thread already started\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" +msgid "HHCCP067E %4.4X create_thread error: %s" +msgstr "HHC760I %4.4X create_thread fout: %s" -#: cpu.c:1055 +#: channel.c:1931 #, fuzzy, c-format -msgid "HHCCP006E Cannot create timer thread: %s\n" -msgstr "Kann %s nicht öffnen: %s\n" +msgid "HHCCP068E %4.4X create_thread error: %s" +msgstr "HHC760I %4.4X create_thread fout: %s" -#: cpu.c:1077 +#: channel.c:2113 #, fuzzy, c-format -msgid "HHCCP007I CPU%4.4X architecture mode set to %s\n" -msgstr "HHC630I CPU%4.4X Architectuur Modus %s\n" +msgid "HHCCP069I Device %4.4X initial status interrupt\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: cpu.c:1090 +#: channel.c:2152 #, fuzzy, c-format -msgid "HHCCP008I CPU%4.4X thread ended: tid=" -msgstr "HHC624I CPU%4.4X thread geeindigd: tid=%8.8lX, pid=%d\n" +msgid "HHCCP070I Device %4.4X attention completed\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: cpu.c:1116 +#: channel.c:2218 #, fuzzy, c-format -msgid "HHCCP009E CPU MASK MISMATCH: %8.8X - %8.8X. Last instruction:\n" -msgstr "CPU MASK MISMATCH: %8.8X - %8.8X. Letzter Befehl war:\n" +msgid "HHCCP071I Device %4.4X clear completed\n" +msgstr "HHC623I CPU%4.4X thread al gestart\n" -#: cpu.c:1236 +#: channel.c:2273 #, fuzzy, c-format -msgid "HHCCP010I CPU%4.4X store status completed.\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" +msgid "HHCCP072I Device %4.4X halt completed\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: cpu.c:1303 +#: channel.c:2431 #, fuzzy, c-format -msgid "" -"HHCCP011I CPU%4.4X: Disabled wait state\n" -" " -msgstr "HHC623I CPU%4.4X thread al gestart\n" +msgid "HHCCP073I Device %4.4X suspended\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: channel.c:2474 +#, fuzzy, c-format +msgid "HHCCP074I Device %4.4X resumed\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: cpu.c:1731 +#: channel.c:2704 #, c-format -msgid "PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X\n" +msgid "HHCCP075I %4.4X:Stat=%2.2X%2.2X Count=%4.4X %s\n" msgstr "" -#: cpu.c:1738 +#: channel.c:2710 #, c-format msgid "" -"PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X%2.2X%2.2X%" -"2.2X%2.2X\n" +"HHCCP076I %4.4X:Sense=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%" +"2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X\n" msgstr "" -#: ctcadpt.c:116 -#, fuzzy, c-format -msgid "HHCCT001E %4.4X: Incorrect number of parameters\n" -msgstr "Geen apparaat nummer\n" +#: channel.c:2725 +#, c-format +msgid "HHCCP077I %4.4X:Sense=%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n" +msgstr "" -#: ctcadpt.c:458 -#, fuzzy, c-format -msgid "HHCCT002E %4.4X: Incorrect number of parameters\n" -msgstr "Geen apparaat nummer\n" +#: ckddasd.c:203 +#, fuzzy +msgid "HHCDA001E File name missing or invalid\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" -#: ctcadpt.c:470 +#: ckddasd.c:219 #, fuzzy, c-format -msgid "HHCCT003E %4.4X: Invalid port number: %s\n" -msgstr "Ongeldig apparaat nummer\n" +msgid "HHCDA002E %4.4X:File not found or invalid\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" -#: ctcadpt.c:491 +#: ckddasd.c:310 #, fuzzy, c-format -msgid "HHCCT004E %4.4X: Invalid IP address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgid "HHCDA003E parameter %d is invalid: %s\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" -#: ctcadpt.c:504 +#: ckddasd.c:321 #, fuzzy, c-format -msgid "HHCCT005E %4.4X: Invalid port number: %s\n" -msgstr "Ongeldig apparaat nummer\n" +msgid "HHCDA004I opening %s readonly%s\n" +msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" -#: ctcadpt.c:516 +#: ckddasd.c:334 #, fuzzy, c-format -msgid "HHCCT006E %4.4X: Invalid MTU size %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgid "HHCDA005E %s open error: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" -#: ctcadpt.c:537 -#, fuzzy, c-format -msgid "HHCCT007E %4.4X: Error creating socket: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: ckddasd.c:349 +#, c-format +msgid "HHCDA006E %s not in a single file for shadowing\n" +msgstr "" -#: ctcadpt.c:557 +#: ckddasd.c:358 #, fuzzy, c-format -msgid "HHCCT008E %4.4X: Error binding to socket: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgid "HHCDA007E %s fstat error: %s\n" +msgstr "%d Bytes gelesen von %s\n" -#: ctcadpt.c:578 +#: ckddasd.c:368 #, fuzzy, c-format -msgid "HHCCT009I %4.4X: Connect to %s:%s failed, starting server\n" -msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" +msgid "HHCDA008E %s read error: %s\n" +msgstr "%d Bytes gelesen von %s\n" -#: ctcadpt.c:588 -#, fuzzy, c-format -msgid "HHCCT010E %4.4X: Error creating socket: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: ckddasd.c:371 +#, c-format +msgid "HHCDA09E %s CKD header incomplete\n" +msgstr "" -#: ctcadpt.c:605 +#: ckddasd.c:381 #, fuzzy, c-format -msgid "HHCCT011E %4.4X: Error binding to socket: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgid "HHCDA010E %s CKD header invalid\n" +msgstr "%d Bytes gelesen von %s\n" -#: ctcadpt.c:613 -#, fuzzy, c-format -msgid "HHCCT012E %4.4X: Error on call to listen: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: ckddasd.c:390 +#, c-format +msgid "HHCDA011E %s Only 1 CCKD file allowed\n" +msgstr "" -#: ctcadpt.c:627 +#: ckddasd.c:405 #, fuzzy, c-format -msgid "HHCCT013I %4.4X: Connected to %s:%s\n" -msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" +msgid "HHCDA012E %s read error: %s\n" +msgstr "%d Bytes gelesen von %s\n" -#: ctcadpt.c:661 +#: ckddasd.c:410 #, c-format -msgid "HHCCT014E %4.4X Write CCW count %u is invalid\n" +msgid "HHCDA013E %s CCKD header incomplete\n" msgstr "" -#: ctcadpt.c:691 +#: ckddasd.c:421 #, c-format -msgid "HHCCT015I %4.4X: Interface command: %s %8.8X\n" +msgid "HHCDA014E %s CKD file out of sequence\n" msgstr "" -#: ctcadpt.c:716 ctc_ctci.c:684 +#: ckddasd.c:453 #, c-format -msgid "CTC101W %4.4X: Write buffer contains invalid frame offset %u\n" +msgid "HHCDA015I %s seq=%d cyls=%d-%d\n" msgstr "" -#: ctcadpt.c:737 +#: ckddasd.c:467 #, c-format -msgid "" -"HHCCT016E %4.4X: Write buffer contains incomplete segment header at offset %" -"4.4X\n" +msgid "HHCDA016E %s heads=%d trklen=%d, expected heads=%d trklen=%d\n" msgstr "" -#: ctcadpt.c:757 +#: ckddasd.c:480 #, c-format -msgid "" -"HHCCT017E %4.4X: Write buffer contains invalid segment length %u at offset %" -"4.4X\n" +msgid "HHCDA017E %s CKD header inconsistent with file size\n" +msgstr "" + +#: ckddasd.c:488 +#, c-format +msgid "HHCDA018E %s CKD header high cylinder incorrect\n" msgstr "" -#: ctcadpt.c:772 +#: ckddasd.c:514 #, fuzzy, c-format -msgid "HHCCT018I %4.4X: Sending packet to %s:\n" -msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" +msgid "HHCDA019E %s exceeds maximum %d CKD files\n" +msgstr "HHC410I Ponskaart %d bytes te groot in bestand \"%s\"\n" -#: ctcadpt.c:783 +#: ckddasd.c:525 #, fuzzy, c-format -msgid "HHCCT019E %4.4X: Error writing to %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgid "HHCDA020I %s cyls=%d heads=%d tracks=%d trklen=%d\n" +msgstr "%d Bytes gelesen von %s\n" -#: ctcadpt.c:846 +#: ckddasd.c:536 #, fuzzy, c-format -msgid "HHCCT020E %4.4X: Error reading from %s: %s\n" -msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgid "HHCDA021E %4.4X device type %4.4X not found in dasd table\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: ckddasd.c:545 +#, c-format +msgid "HHCDA022E %4.4X control unit %s not found in dasd table\n" +msgstr "" + +#: ckddasd.c:627 +#, c-format +msgid "HHCDA023I %4.4X cache hits %d, misses %d, waits %d\n" +msgstr "" -#: ctcadpt.c:863 +#: ckddasd.c:710 #, fuzzy, c-format -msgid "HHCCT021E %4.4X: Error reading from %s: %s\n" -msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgid "HHCDA024I read trk %d cur trk %d\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: ctcadpt.c:873 +#: ckddasd.c:739 #, c-format -msgid "HHCCT022I %4.4X: Received packet from %s (%d bytes):\n" +msgid "HHCDA025I read track: updating track %d\n" msgstr "" -#: ctcadpt.c:953 +#: ckddasd.c:750 #, fuzzy, c-format -msgid "HHCCT023E %4.4X: Incorrect client or config error\n" -msgstr "CPU%4.4X nicht konfiguriert\n" +msgid "HHCDA026E error writing trk %d: lseek error: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: ckddasd.c:769 +#, fuzzy, c-format +msgid "HHCDA027E error writing trk %d: write error: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: ckddasd.c:811 +#, c-format +msgid "HHCDA028I read trk %d cache hit, using cache[%d]\n" +msgstr "" -#: ctcadpt.c:955 +#: ckddasd.c:848 #, c-format -msgid " Config=%s, connecting client=%s\n" +msgid "HHCDA029I read trk %d no available cache entry, waiting\n" msgstr "" -#: ctcadpt.c:995 -msgid "HHCCT024E 4.4X: Not enough arguments to start vmnet\n" +#: ckddasd.c:856 +#, c-format +msgid "HHCDA030I read trk %d cache miss, using cache[%d]\n" msgstr "" -#: ctcadpt.c:1005 +#: ckddasd.c:879 #, fuzzy, c-format -msgid "HHCCT025E %4.4X: Failed: socketpair: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgid "HHCDA031I read trk %d reading file %d offset %lld len %d\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: ctcadpt.c:1013 +#: ckddasd.c:888 #, fuzzy, c-format -msgid "HHCCT026E %4.4X: Failed: fork: %s\n" -msgstr "HHC760I %4.4X create_thread fout: %s" +msgid "HHCDA032E error reading trk %d: lseek error: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: ctcadpt.c:1061 +#: ckddasd.c:904 #, fuzzy, c-format -msgid "HHCCT027E %4.4X: Not enough parameters\n" -msgstr "CPU%4.4X nicht konfiguriert\n" +msgid "HHCDA033E error reading trk %d: read error: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: ctcadpt.c:1066 +#: ckddasd.c:916 #, fuzzy, c-format -msgid "HHCCT028E %4.4X: Bad device number '%s'\n" +msgid "HHCDA034I read trk %d trkhdr %2.2x %2.2x%2.2x %2.2x%2.2x\n" +msgstr "" +"%4.4X ckddasd: Kopfdaten ungültig für Zyl. %d Spur %d %2.2x%2.2x%2.2x%2.2x%" +"2.2x\n" + +#: ckddasd.c:926 +#, fuzzy, c-format +msgid "" +"HHCDA035E %4.4X invalid track header for cyl %d head %d %2.2x%2.2x%2.2x%2.2x" +"%2.2x\n" +msgstr "" +"%4.4X ckddasd: Kopfdaten ungültig für Zyl. %d Spur %d %2.2x%2.2x%2.2x%2.2x%" +"2.2x\n" + +#: ckddasd.c:1122 +#, fuzzy, c-format +msgid "HHCDA038I seeking to cyl %d head %d\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: ckddasd.c:1161 +#, fuzzy, c-format +msgid "HHCDA039E MT advance error: locate record %d file mask %2.2X\n" msgstr "Ongeldig apparaat nummer\n" -#: ctcadpt.c:1103 +#: ckddasd.c:1193 +#, fuzzy, c-format +msgid "HHCDA040I MT advance to cyl %d head %d\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: ckddasd.c:1245 +#, fuzzy, c-format +msgid "HHCDA041I read count orientation is %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: ckddasd.c:1269 #, c-format -msgid "HHCCT029E %4.4X: bad block length: %d < %d\n" +msgid "HHCDA042E attempt to read past end of track %d %d\n" msgstr "" -#: ctcadpt.c:1113 -#, c-format -msgid "HHCCT030E %4.4X: bad packet length: %d < %d\n" +#: ckddasd.c:1291 +#, fuzzy, c-format +msgid "HHCDA043I cyl %d head %d record %d kl %d dl %d of %d\n" +msgstr "%d Bytes gelesen von %s\n" + +#: ckddasd.c:1379 +#, fuzzy, c-format +msgid "HHCDA044I read key %d bytes\n" +msgstr "%d Bytes gelesen von %s\n" + +#: ckddasd.c:1387 +msgid "ckddasd: attempt to read past end of track\n" msgstr "" -#: ctcadpt.c:1118 +#: ckddasd.c:1429 #, c-format -msgid "HHCCT031E %4.4X: bad packet length: %d < 6\n" +msgid "HHCDA045I read data %d bytes\n" msgstr "" -#: ctcadpt.c:1164 -#, c-format -msgid "HHCCT032E %4.4X: Error: EOF on read, CTC network down\n" +#: ckddasd.c:1437 +msgid "HHCDA046E attempt to read past end of track\n" msgstr "" -#: ctcadpt.c:1172 +#: ckddasd.c:1555 #, fuzzy, c-format -msgid "HHCCT033E %4.4X: Error: read: %s\n" -msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgid "HHCDA047I writing cyl %d head %d record %d kl %d dl %d\n" +msgstr "%d Bytes gelesen von %s\n" -#: ctcadpt.c:1330 +#: ckddasd.c:1561 #, fuzzy, c-format -msgid "HHCCT034E device %4.4X already exists\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgid "HHCDA048I setting track overflow flag for cyl %d head %d record %d\n" +msgstr "%d Bytes gelesen von %s\n" -#: ctcadpt.c:1340 -#, c-format -msgid "HHCCT035E AddDevice internal error (%s).\n" +#: ckddasd.c:1606 +msgid "HHCDA049E Write KD orientation error\n" msgstr "" -#: ctcadpt.c:1358 +#: ckddasd.c:1619 #, fuzzy, c-format -msgid "HHCCT036E Cannot obtain device block for device %4.4X: %s\n" -msgstr "Kann %s nicht öffnen: %s\n" +msgid "HHCDA050I updating cyl %d head %d record %d kl %d dl %d\n" +msgstr "%d Bytes gelesen von %s\n" -#: ctc_ctci.c:69 +#: ckddasd.c:1648 +msgid "HHCDA051E Write data orientation error\n" +msgstr "" + +#: ckddasd.c:1662 #, fuzzy, c-format -msgid "HHCCT037E %4.4X: Unable to allocate CTCBLK\n" -msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" +msgid "HHCDA052I updating cyl %d head %d record %d dl %d\n" +msgstr "%d Bytes gelesen von %s\n" + +#: ckddasd.c:1721 +#, c-format +msgid "HHCDA053E Data chaining not supported for CCW %2.2X\n" +msgstr "" -#: ctc_ctci.c:91 +#: ckddasd.c:2844 #, fuzzy, c-format -msgid "HHCCT038E %4.4X: Unable to allocate CTCBLK\n" -msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" +msgid "HHCDA054I set file mask %2.2X\n" +msgstr "Ongeldig apparaat nummer\n" + +#: ckddasd.c:3012 +#, c-format +msgid "HHCDA055I search key %s\n" +msgstr "" -#: ctc_ctci.c:136 +#: codepage.c:288 #, fuzzy, c-format -msgid "HHCCT039E %4.4X: Unable to allocate CTCBLK\n" -msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" +msgid "HHCCF051E CodePage conversion table %s is not defined\n" +msgstr "HHC050I CodePage conversie tabel %s is niet gedefinieerd\n" -#: ctc_ctci.c:541 +#: commadpt.c:59 #, c-format -msgid "HHCCT040I %4.4X: Halt or Clear Recognized\n" +msgid "HHCCA300D %4.4X:%s : Status = TEXT=%s, TRANS=%s, TWS=%s\n" msgstr "" -#: ctc_ctci.c:590 +#: commadpt.c:65 #, c-format -msgid "HHCCT041I %4.4X: CTC Received Frame (%d bytes):\n" +msgid "HHCCA300D %4.4X:%s : Dump of %d (%x) byte(s)\n" msgstr "" -#: ctc_ctci.c:628 +#: commadpt.c:74 #, c-format -msgid "HHCCT042E %4.4X Write CCW count %u is invalid\n" +msgid "HHCCA300D %4.4X:%s : %4.4X:" msgstr "" -#: ctc_ctci.c:657 +#: commadpt.c:201 #, c-format -msgid "HHCCT043I %4.4X: Interface command: %s %8.8X\n" +msgid "HHCCA300D %4.4X:clean : Control block freed\n" msgstr "" -#: ctc_ctci.c:706 +#: commadpt.c:209 #, c-format -msgid "" -"HHCCT044E %4.4X: Write buffer contains incomplete segment header at offset %" -"4.4X\n" +msgid "HHCCA300D %4.4X:clean : Control block not freed : not allocated\n" msgstr "" -#: ctc_ctci.c:726 +#: commadpt.c:223 #, c-format -msgid "" -"HHCCT045E %4.4X: Write buffer contains invalid segment length %u at offset %" -"4.4X\n" +msgid "HHCCA020E %4.4X:Memory allocation failure for main control block\n" msgstr "" -#: ctc_ctci.c:741 +#: commadpt.c:305 #, fuzzy, c-format -msgid "HHCCT046I %4.4X: Sending packet to %s:\n" +msgid "" +"HHCCA001I %4.4X:Connect out to %s:%d failed during initial status : %s\n" msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" -#: ctc_ctci.c:751 -#, fuzzy, c-format -msgid "HHCCT047E %4.4X: Error writing to %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: commadpt.c:347 +#, c-format +msgid "HHCCA300D %4.4x : Found data beyond EON\n" +msgstr "" -#: ctc_ctci.c:812 +#: commadpt.c:362 #, fuzzy, c-format -msgid "HHCCT048E %4.4X: Error reading from %s: %s\n" -msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgid "HHCCA300D %4.4x : Found incorrect IP address section at position %d\n" +msgstr "CPU%4.4X nicht konfiguriert\n" -#: ctc_ctci.c:824 +#: commadpt.c:363 #, c-format -msgid "HHCCT049I %4.4X: Received packet from %s (%d bytes):\n" +msgid "HHCCA300D %4.4x : %d greater than 255\n" msgstr "" -#: ctc_ctci.c:988 -#, fuzzy, c-format -msgid "HHCCT050E %4.4X: Invalid adapter address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: commadpt.c:377 +#, c-format +msgid "HHCCA300D %4.4x : Too many separators in dial data\n" +msgstr "" -#: ctc_ctci.c:997 -#, fuzzy, c-format -msgid "HHCCT051E %4.4X: Invalid device name %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: commadpt.c:394 +#, c-format +msgid "HHCCA300D %4.4x : Incorrect dial data byte %2.2x\n" +msgstr "" -#: ctc_ctci.c:1011 -#, fuzzy, c-format -msgid "HHCCT052E %4.4X: Invalid kernel buffer size %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: commadpt.c:415 +#, c-format +msgid "HHCCA300D %4.4x : Not enough separators (only %d found) in dial data\n" +msgstr "" -#: ctc_ctci.c:1025 -#, fuzzy, c-format -msgid "HHCCT053E %4.4X: Invalid DLL I/O buffer size %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: commadpt.c:423 +#, c-format +msgid "HHCCA300D %4.4x : Destination TCP port %d exceeds maximum of 65535\n" +msgstr "" -#: ctc_ctci.c:1038 +#: commadpt.c:554 #, fuzzy, c-format -msgid "HHCCT054E %4.4X: Invalid MTU size %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgid "HHCCA002I %4.4X:Line Communication thread " +msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" -#: ctc_ctci.c:1049 -#, fuzzy, c-format -msgid "HHCCT055E %4.4X: Invalid netmask %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: commadpt.c:554 +msgid " started\n" +msgstr "" -#: ctc_ctci.c:1060 +#: commadpt.c:566 #, fuzzy, c-format -msgid "HHCCT056E %4.4X: Invalid MAC address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgid "HHCCA003E %4.4X:Cannot obtain socket for incoming calls : %s\n" +msgstr "Kann %s nicht öffnen: %s\n" -#: ctc_ctci.c:1087 -#, fuzzy, c-format -msgid "HHCCT056E %4.4X: Incorrect number of parameters\n" -msgstr "Geen apparaat nummer\n" +#: commadpt.c:592 +#, c-format +msgid "HHCCA004W %4.4X:Waiting 5 seconds for port %d to become available\n" +msgstr "" -#: ctc_ctci.c:1097 +#: commadpt.c:643 #, fuzzy, c-format -msgid "HHCCT057E %4.4X: Incorrect number of parameters\n" -msgstr "Geen apparaat nummer\n" +msgid "HHCCA018E %4.4X:Bind failed : %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" -#: ctc_ctci.c:1105 -#, fuzzy, c-format -msgid "HHCCT058E %4.4X: Invalid IP address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: commadpt.c:657 +#, c-format +msgid "HHCCA005I %4.4X:Listening on port %d for incoming TCP connections\n" +msgstr "" -#: ctc_ctci.c:1117 -#, fuzzy, c-format -msgid "HHCCT059E %4.4X: Invalid IP address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: commadpt.c:695 +#, c-format +msgid "HHCCA300D %4.4X:cthread - Entry - DevExec = %s\n" +msgstr "" -#: ctc_ctci.c:1133 -#, fuzzy, c-format -msgid "HHCCT060E %4.4X: Incorrect number of parameters\n" -msgstr "Geen apparaat nummer\n" +#: commadpt.c:760 +#, c-format +msgid "HHCCA300D %4.4X:Poll Command abort - Poll address >7 Bytes\n" +msgstr "" -#: ctc_ctci.c:1142 +#: commadpt.c:788 #, fuzzy, c-format -msgid "HHCCT061E %4.4X invalid device name %s\n" -msgstr "Ongeldig apparaat nummer\n" +msgid "HHCCA300D %4.4X:Writing 1 byte in socket : %2.2X\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: ctc_ctci.c:1156 -#, fuzzy, c-format -msgid "HHCCT062E %4.4X: Invalid MTU size %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: commadpt.c:963 +#, c-format +msgid "HHCCA300D %4.4X:cthread - Select IN maxfd = %d / Devexec = %s\n" +msgstr "" -#: ctc_ctci.c:1167 +#: commadpt.c:969 #, fuzzy, c-format -msgid "HHCCT063E %4.4X: Invalid IP address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgid "HHCCA300D %4.4X:cthread - Select OUT rc=%d\n" +msgstr "HHC760I %4.4X create_thread fout: %s" -#: ctc_ctci.c:1179 +#: commadpt.c:976 #, fuzzy, c-format -msgid "HHCCT064E %4.4X: Invalid IP address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgid "HHCCA006T %4.4X:Select failed : %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" -#: ctc_ctci.c:1191 -#, fuzzy, c-format -msgid "HHCCT065E %4.4X: Invalid netmask %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: commadpt.c:986 +#, c-format +msgid "HHCCA300D %4.4X:cthread - Select TIME OUT\n" +msgstr "" -#: ctc_ctci.c:1202 -#, fuzzy, c-format -msgid "HHCCT066E %4.4X: Incorrect number of parameters\n" -msgstr "Geen apparaat nummer\n" +#: commadpt.c:1004 +#, c-format +msgid "HHCCA300D %4.4X:cthread - IPC Pipe closed\n" +msgstr "" -#: ctc_ctci.c:1220 -#, fuzzy, c-format -msgid "HHCCT067E %4.4X: Invalid IP address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: commadpt.c:1012 +#, c-format +msgid "HHCCA300D %4.4X:cthread - IPC Pipe Data ; code = %d\n" +msgstr "" -#: ctc_ctci.c:1235 +#: commadpt.c:1044 #, fuzzy, c-format -msgid "HHCCT068E %4.4X: Invalid MAC address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgid "HHCCA300D %4.4X:cthread - inbound socket data\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: ctc_ctci.c:1267 -#, fuzzy, c-format -msgid "HHCCT069E %4.4X: Invalid kernel buffer size %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: commadpt.c:1086 +#, c-format +msgid "HHCCA300D %4.4X:cthread - socket write available\n" +msgstr "" + +#: commadpt.c:1100 +#, c-format +msgid "HHCCA007W %4.4X:Outgoing call failed during %s command : %s\n" +msgstr "" -#: ctc_ctci.c:1284 +#: commadpt.c:1130 +#, c-format +msgid "HHCCA008I %4.4X:cthread - Incoming Call\n" +msgstr "" + +#: commadpt.c:1191 #, fuzzy, c-format -msgid "HHCCT070E %4.4X: Invalid DLL I/O buffer size %s\n" -msgstr "Ongeldig apparaat nummer\n" +msgid "HHCCA009I %4.4X:BSC utility thread terminated\n" +msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" -#: ctc_ctci.c:1295 +#: commadpt.c:1242 #, fuzzy, c-format -msgid "HHCCT071E %4.4X: Incorrect number of parameters\n" -msgstr "Geen apparaat nummer\n" +msgid "HHCCA013E %4.4X:Incorrect %s specification %s\n" +msgstr "CPU%4.4X nicht konfiguriert\n" + +#: commadpt.c:1246 +#, c-format +msgid "HHCCA015E %4.4X:Missing parameter : DIAL=%s and %s not specified\n" +msgstr "" -#: ctc_lcs.c:81 +#: commadpt.c:1250 +#, c-format +msgid "HHCCA016W %4.4X:Conflicting parameter : DIAL=%s and %s=%s specified\n" +msgstr "" + +#: commadpt.c:1251 #, fuzzy, c-format -msgid "HHCLC001E %4.4X unable to allocate LCSBLK\n" -msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" +msgid "HHCCA017I %4.4X:RPORT parameter ignored\n" +msgstr "CPU%4.4X nicht konfiguriert\n" -#: ctc_lcs.c:652 +#: commadpt.c:1273 #, fuzzy, c-format -msgid "HHCLC002I %4.4X: Halt or Clear Recognized\n" +msgid "HHCCA300D %4.4X:Initialisation starting\n" msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: ctc_lcs.c:695 +#: commadpt.c:1283 #, fuzzy, c-format -msgid "HHCLC003I %4.4X: LCS Read Buffer:\n" -msgstr "Ongeldig apparaat nummer\n" +msgid "HHCCA010I %4.4X:initialisation not performed\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: ctc_lcs.c:799 +#: commadpt.c:1289 #, fuzzy, c-format -msgid "HHCLC004I %4.4X: Sending packet to %s:\n" -msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" +msgid "HHCCA300D %4.4X:Initialisation : Control block allocated\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: ctc_lcs.c:808 +#: commadpt.c:1312 #, fuzzy, c-format -msgid "HHCLC005E %4.4X: Error writing to %s: %s\n" +msgid "HHCCA011E %4.4X:Error parsing %s\n" msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: ctc_lcs.c:827 +#: commadpt.c:1318 #, fuzzy, c-format -msgid "HHCLC006I %4.4X Triggering Event.\n" -msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" +msgid "HHCCA012E %4.4X:Unrecognized parameter %s\n" +msgstr "CPU%4.4X nicht konfiguriert\n" + +#: commadpt.c:1406 +#, c-format +msgid "" +"HHCCA014E %4.4X:Incorrect switched/dial specification %s; defaulting to " +"DIAL=OUT\n" +msgstr "" -#: ctc_lcs.c:1117 +#: commadpt.c:1525 #, fuzzy, c-format -msgid "HHCLC007E Error in call to socket: %s.\n" +msgid "HHCCA021I %4.4X:Initialisation failed due to previous errors\n" +msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" + +#: commadpt.c:1579 +#, c-format +msgid "HHCCA019E %4.4x : BSC comm thread did not initialise\n" +msgstr "" + +#: commadpt.c:1621 +#, fuzzy, c-format +msgid "HHCCA300D %4.4X:Closing down\n" msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: ctc_lcs.c:1128 +#: commadpt.c:1654 #, fuzzy, c-format -msgid "HHCLC008E ioctl error on device %s: %s.\n" -msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" +msgid "HHCCA300D %4.4X:Closed down\n" +msgstr "HHC760I %4.4X create_thread fout: %s" -#: ctc_lcs.c:1200 +#: commadpt.c:1683 #, c-format -msgid "HHCLC009I Port %2.2X: Read Buffer:\n" +msgid "HHCCA300D %4.4X:CCW Exec - Entry code = %x\n" msgstr "" -#: ctc_lcs.c:1229 +#: commadpt.c:1794 +#, fuzzy, c-format +msgid "HHCCA300D %4.4X Set Mode : %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" + +#: config.c:220 #, c-format -msgid "HHCLC010I Port %2.2X: IPV4 frame for %8.8X\n" +msgid "HHCCF031S Cannot obtain %dMB main storage: %s\n" msgstr "" -#: ctc_lcs.c:1256 +#: config.c:229 #, c-format -msgid "HHCLC011I Port %2.2X: ARP frame for %8.8X\n" +msgid "HHCCF032S Cannot obtain storage key array: %s\n" msgstr "" -#: ctc_lcs.c:1280 +#: config.c:256 #, c-format -msgid "HHCLC012I Port %2.2X: SNA frame\n" +msgid "HHCCF033S Cannot obtain %dMB expanded storage: %s\n" msgstr "" -#: ctc_lcs.c:1310 +#: config.c:264 +#, fuzzy +msgid "HHCCF034W Expanded storage support not installed\n" +msgstr "CPU%4.4X nicht konfiguriert\n" + +#: config.c:303 +#, fuzzy, c-format +msgid "HHCCF001S Error reading file %s line %d: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: config.c:326 #, c-format -msgid "HHCLC013I Port %2.2X: No match found - selecting primary %4.4X\n" +msgid "HHCCF002S File %s line %d is too long\n" msgstr "" -#: ctc_lcs.c:1320 +#: config.c:450 #, c-format -msgid "HHCLC014I Port %2.2X: No match found - selecting secondary %4.4X\n" +msgid "" +"HHCCF053E Incorrect second device number in device range near character %c\n" msgstr "" -#: ctc_lcs.c:1331 +#: config.c:460 #, c-format -msgid "HHCLC015I Port %2.2X: No match found - Discarding frame\n" +msgid "HHCCF054E Incorrect Device count near character %c\n" msgstr "" -#: ctc_lcs.c:1339 -#, fuzzy, c-format -msgid "HHCLC016I Port %2.2X: Enqueing frame to device %4.4X (%8.8X)\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: ctc_lcs.c:1547 -#, fuzzy, c-format -msgid "HHCLC017E %4.4X invalid device name %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: config.c:466 +#, c-format +msgid "HHCCF055E Incorrect device address specification near character %c\n" +msgstr "" -#: ctc_lcs.c:1563 -#, fuzzy, c-format -msgid "HHCLC018E %4.4X invalid MAC address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: config.c:473 +#, c-format +msgid "HHCCF056E Incorrect device address range. %4.4X < %4.4X\n" +msgstr "" -#: ctc_lcs.c:1587 +#: config.c:495 #, c-format -msgid "HHCLC019E %4.4X too many arguments in statement.\n" +msgid "" +"HHCCF057E %4.4X is on wrong channel (1st device defined on channel %2.2X)\n" msgstr "" -#: ctc_lcs.c:1597 -#, fuzzy, c-format -msgid "HHCLC020E %4.4X invalid IP address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: config.c:524 +#, c-format +msgid "" +"HHCCF058E Some or all devices in %4.4X-%4.4X duplicate devices already " +"defined\n" +msgstr "" -#: ctc_lcs.c:1644 +#: config.c:653 #, fuzzy, c-format -msgid "HHCLC039E Cannot open file %s: %s\n" +msgid "HHCCF003S Cannot open file %s: %s\n" msgstr "Kann %s nicht öffnen: %s\n" -#: ctc_lcs.c:1693 +#: config.c:716 #, fuzzy, c-format -msgid "HHCLC021E Invalid HWADD statement in %s: %s\n" -msgstr "HHC422I Optie %s niet geldig\n" +msgid "HHCCF004S No device records in file %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: ctc_lcs.c:1702 +#: config.c:910 #, c-format msgid "" -"HHCLC022E Invalid MAC in HWADD statement in %s: %s (%s)\n" -" " +"HHCCF061W Warning in %s line %d: ECPS:VM Statement deprecated. Use ECPSVM " +"instead\n" msgstr "" -#: ctc_lcs.c:1719 +#: config.c:934 #, fuzzy, c-format -msgid "HHCLC023E Invalid ROUTE statement in %s: %s\n" -msgstr "HHC422I Optie %s niet geldig\n" +msgid "" +"HHCCF059S Error in %s line %d: Missing symbol name on DEFSYM statement\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: config.c:941 +#, c-format +msgid "" +"HHCCF060S Error in %s line %d: DEFSYM requires a single symbol value " +"(include quotation marks if necessary)\n" +msgstr "" -#: ctc_lcs.c:1726 +#: config.c:964 config.c:1014 #, fuzzy, c-format -msgid "HHCLC024E Invalid net address in ROUTE %s: %s (%s)\n" -msgstr "Ongeldig bereik: %s\n" +msgid "HHCCF007S Error in %s line %d: Missing argument.\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: ctc_lcs.c:1735 +#: config.c:972 #, fuzzy, c-format -msgid "HHCLC025E Invalid net mask in ROUTE %s: %s (%s)\n" +msgid "HHCCF029S Error in %s line %d: Invalid HTTP port number %s\n" msgstr "Ongeldig apparaat nummer\n" -#: ctc_lcs.c:1767 +#: config.c:983 #, fuzzy, c-format -msgid "HHCLC026E Error in %s: Missing device number or mode\n" -msgstr "Geen apparaat nummer\n" +msgid "HHCCF005S Error in %s line %d: Unrecognized argument %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: config.c:1001 +#, c-format +msgid "HHCCF006S Error in %s line %d: Userid, but no password given %s\n" +msgstr "" -#: ctc_lcs.c:1776 +#: config.c:1036 #, fuzzy, c-format -msgid "HHCLC027E Error in %s: %s: Invalid device number\n" -msgstr "Ongeldig apparaat nummer\n" +msgid "HHCCF008E Error in %s line %d: Unrecognized keyword %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: ctc_lcs.c:1788 +#: config.c:1046 #, fuzzy, c-format -msgid "HHCLC028E Error in %s: %s:Missing PORT number\n" +msgid "HHCCF009E Error in %s line %d: Incorrect number of operands\n" msgstr "Geen apparaat nummer\n" -#: ctc_lcs.c:1796 +#: config.c:1076 +#, c-format +msgid "" +"HHCCF010S Error in %s line %d: Unknown or unsupported ARCHMODE specification " +"%s\n" +msgstr "" + +#: config.c:1094 #, fuzzy, c-format -msgid "HHCLC029E Error in %s: %s: Invalid PORT number\n" +msgid "HHCCF012S Error in %s line %d: %s is not a valid CPU version code\n" msgstr "Ongeldig apparaat nummer\n" -#: ctc_lcs.c:1806 +#: config.c:1108 #, fuzzy, c-format -msgid "HHCLC030E Error in %s: %s: Invalid number of arguments\n" +msgid "HHCCF051S Error in %s line %d: %s is not a valid serial number\n" msgstr "Ongeldig apparaat nummer\n" -#: ctc_lcs.c:1820 +#: config.c:1121 #, fuzzy, c-format -msgid "HHCLC031E Error in %s: %s: Invalid entry starting at %s\n" +msgid "HHCCF012S Error in %s line %d: %s is not a valid CPU model\n" msgstr "Ongeldig apparaat nummer\n" -#: ctc_lcs.c:1830 -#, fuzzy, c-format -msgid "HHCLC032E Error is %s: %s: Invalid IP address (%s)\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: config.c:1134 +#, c-format +msgid "HHCCF013S Error in %s line %d: Invalid main storage size %s\n" +msgstr "" -#: ctc_lcs.c:1845 -#, fuzzy, c-format -msgid "HHCLC033E Error in %s: %s: Missing PORT number\n" -msgstr "Geen apparaat nummer\n" +#: config.c:1147 +#, c-format +msgid "HHCCF014S Error in %s line %d: Invalid expanded storage size %s\n" +msgstr "" -#: ctc_lcs.c:1853 +#: config.c:1158 #, fuzzy, c-format -msgid "HHCLC034E Error in %s: %s:Invalid PORT number\n" +msgid "" +"HHCCF016S Error in %s line %d: Invalid Hercules process group thread " +"priority %s\n" msgstr "Ongeldig apparaat nummer\n" -#: ctc_lcs.c:1861 -#, fuzzy, c-format -msgid "HHCLC035E Error in %s: %s: SNA does not accept any arguments\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: config.c:1167 +msgid "" +"HHCCF017W Hercules is not running as setuid root, cannot raise Hercules " +"process group thread priority\n" +msgstr "" -#: ctc_lcs.c:1869 +#: config.c:1179 #, fuzzy, c-format -msgid "HHCLC036E Error in %s: %s: Invalid MODE\n" +msgid "HHCCF016S Error in %s line %d: Invalid TOD Clock thread priority %s\n" msgstr "Ongeldig apparaat nummer\n" -#: ctc_lcs.c:1929 -#, fuzzy, c-format -msgid "HHCLC037E Error reading file %s line %d: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: ctc_lcs.c:1953 -#, c-format -msgid "HHCLC038E File %s line %d is too long\n" +#: config.c:1188 +msgid "" +"HHCCF017W Hercules is not running as setuid root, cannot raise TOD Clock " +"thread priority\n" msgstr "" -#: dasdcat.c:34 +#: config.c:1200 #, c-format -msgid "HHCDT002E Can't make 80 column card images from block length %d\n" -msgstr "" - -#: dasdcat.c:117 -msgid "HHCDT003E Directory block byte count is invalid\n" -msgstr "" - -#: dasdcat.c:219 -msgid "HHCDT004E non-PDS-members not yet supported\n" +msgid "HHCCF016S Error in %s line %d: Invalid CPU thread priority %s\n" msgstr "" -#: dasdcat.c:249 -#, c-format -msgid "HHCDT005E unknown dataset name option: '%c'\n" +#: config.c:1209 +msgid "" +"HHCCF017W Hercules is not running as setuid root, cannot raise CPU priority\n" msgstr "" -#: dasdcat.c:344 +#: config.c:1221 config.c:1239 #, fuzzy, c-format -msgid "HHCDT001E failed to open image %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgid "HHCCF016S Error in %s line %d: Invalid device thread priority %s\n" +msgstr "Ongeldig apparaat nummer\n" -#: dasdcopy.c:101 -#, c-format -msgid "Hercules %s copy program " +#: config.c:1229 config.c:1247 +msgid "" +"HHCCF017W Hercules is not running as setuid root, cannot raise device thread " +"priority\n" msgstr "" -#: dasdcopy.c:184 +#: config.c:1259 #, fuzzy, c-format -msgid "HHCDC001E %s: %s open error: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgid "HHCCF018S Error in %s line %d: Invalid number of CPUs %s\n" +msgstr "Ongeldig apparaat nummer\n" -#: dasdcopy.c:191 +#: config.c:1273 #, fuzzy, c-format -msgid "HHCDC002E %s: %s read error: %s\n" -msgstr "%d Bytes gelesen von %s\n" +msgid "HHCCF019S Error in %s line %d: Invalid number of VFs %s\n" +msgstr "Ongeldig apparaat nummer\n" -#: dasdcopy.c:254 -#, fuzzy, c-format -msgid "HHCDC003E %s: %s open failed\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +#: config.c:1279 +#, fuzzy +msgid "HHCCF020W Vector Facility support not configured\n" +msgstr "CPU%4.4X nicht konfiguriert\n" -#: dasdcopy.c:267 +#: config.c:1288 #, c-format -msgid "HHCDC004E %s: ckd lookup failed for %4.4X cyls %d\n" +msgid "HHCCF021S Error in %s line %d: Load parameter %s exceeds 8 characters\n" msgstr "" -#: dasdcopy.c:286 +#: config.c:1310 #, c-format -msgid "HHCDC005E %s: fba lookup failed, blks %d\n" +msgid "" +"HHCCF022S Error in %s line %d: %s is not a valid system epoch.\n" +"Patch config.c to expand the table\n" msgstr "" -#: dasdcopy.c:305 +#: config.c:1325 #, c-format -msgid "HHCDC006E %s: %s create failed\n" +msgid "HHCCF023S Error in %s line %d: %s is not a valid timezone offset\n" msgstr "" -#: dasdcopy.c:317 +#: config.c:1342 #, fuzzy, c-format -msgid "HHCDC007E %s: %s open failed\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgid "HHCCF052S Error in %s line %d: %s: invalid argument\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: dasdcopy.c:324 -#, fuzzy, c-format -msgid " %3d%% %7d of %d" -msgstr "%c %3d%% Spur %6d von %6d" +#: config.c:1356 +#, c-format +msgid "HHCCF024S Error in %s line %d: Invalid TOD clock drag factor %s\n" +msgstr "" -#: dasdcopy.c:345 -#, fuzzy, c-format -msgid "HHCDC008E %s: %s read error %s %d stat=%2.2X\n" -msgstr "%d Bytes gelesen von %s\n" +#: config.c:1380 +#, c-format +msgid "HHCCF025S Error in %s line %d: Invalid panel refresh rate %s\n" +msgstr "" -#: dasdcopy.c:365 +#: config.c:1419 #, c-format -msgid "HHCDC009E %s: %s write error %s %d stat=%2.2X\n" +msgid "HHCCF026S Error in %s line %d: Unknown OS tailor specification %s\n" msgstr "" -#: dasdcopy.c:376 +#: config.c:1432 +#, fuzzy, c-format +msgid "HHCCF027S Error in %s line %d: Invalid maximum device threads %s\n" +msgstr "Ongeldig apparaat nummer\n" + +#: config.c:1457 +#, c-format msgid "" -"\n" -"HHCDC010I Copy successful !!! \n" +"HHCCF028S Error in %s line %d: Invalid program product OS permission %s\n" msgstr "" -#: dasdcopy.c:418 +#: config.c:1488 +#, fuzzy, c-format +msgid "" +"HHCCF062W Warning in %s line %d: Missing ECPSVM level value. 20 Assumed\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: config.c:1497 +#, fuzzy, c-format +msgid "" +"HHCCF051W Warning in %s line %d: Invalid ECPSVM level value : %s. 20 " +"Assumed\n" +msgstr "Ongeldige waarde: %s\n" + +#: config.c:1509 +#, fuzzy, c-format +msgid "" +"HHCCF051W Error in %s line %d: Invalid ECPSVM keyword : %s. NO Assumed\n" +msgstr "Ongeldig apparaat nummer\n" + +#: config.c:1518 #, c-format msgid "" -"usage: ckd2cckd [-options] ifile ofile\n" -"\n" -" copy a ckd dasd file to a compressed ckd dasd file\n" -"\n" -" ifile -- input ckd dasd file\n" -" ofile -- output compressed ckd dasd file\n" -"\n" -" options:\n" -" -v display program version and quit\n" -" -h display this help and quit\n" -" -q quiet mode, don't display status\n" -" -r replace the output file if it exists\n" -"%s%s -0 don't compress track images\n" -" -cyls n size of output file\n" -" -a output file will have alt cyls\n" +"HHCCF063W Warning in %s line %d: Specifying ECPSVM level directly is " +"deprecated. Use the 'LEVEL' keyword instead.\n" msgstr "" -#: dasdcopy.c:438 dasdcopy.c:492 dasdcopy.c:552 -msgid " -z compress using zlib [default]\n" -msgstr "" +#: config.c:1537 +#, fuzzy, c-format +msgid "HHCCF029S Error in %s line %d: Invalid SHRDPORT port number %s\n" +msgstr "Ongeldig apparaat nummer\n" -#: dasdcopy.c:445 dasdcopy.c:499 -msgid " -bz2 compress using bzip2\n" -msgstr "" +#: config.c:1551 +#, fuzzy, c-format +msgid "HHCCF030S Error in %s line %d: Invalid I/O delay value: %s\n" +msgstr "Ongeldige waarde: %s\n" -#: dasdcopy.c:453 -msgid "" -"usage: cckd2ckd [-options] ifile [sf=sfile] ofile\n" -"\n" -" copy a compressed ckd file to a ckd file\n" -"\n" -" ifile -- input compressed ckd dasd file\n" -" sfile -- input compressed ckd shadow file\n" -" (optional)\n" -" ofile -- output ckd dasd file\n" -"\n" -" options:\n" -" -v display program version and quit\n" -" -h display this help and quit\n" -" -q quiet mode, don't display status\n" -" -r replace the output file if it exists\n" -" -lfs create single large output file\n" -" -cyls n size of output file\n" -" -a output file will have alt cyls\n" +#: config.c:1571 +#, fuzzy, c-format +msgid "HHCCF064W Hercules set priority %d failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: config.c:1578 +msgid "HHCCF065I Hercules: tid=" msgstr "" -#: dasdcopy.c:473 +#: config.c:1578 #, c-format -msgid "" -"usage: fba2cfba [-options] ifile ofile\n" -"\n" -" copy a fba dasd file to a compressed fba dasd file\n" -"\n" -" ifile -- input fba dasd file\n" -" ofile -- output compressed fba dasd file\n" -"\n" -" options:\n" -" -v display program version and quit\n" -" -h display this help and quit\n" -" -q quiet mode, don't display status\n" -" -r replace the output file if it exists\n" -"%s%s -0 don't compress track images\n" -" -blks n size of output file\n" +msgid ", pid=%d, pgid=%d, priority=%d\n" msgstr "" -#: dasdcopy.c:507 +#: config.c:1769 +#, fuzzy, c-format +msgid "HHCCF035S Error in %s line %d: Missing device number or device type\n" +msgstr "Geen apparaat nummer\n" + +#: config.c:1779 +#, fuzzy, c-format +msgid "" +"HHCCF036S Error in %s line %d: %s is not a valid device number(s) " +"specification\n" +msgstr "Ongeldig apparaat nummer\n" + +#: config.c:1847 msgid "" -"usage: cfba2fba [-options] ifile [sf=sfile] ofile\n" -"\n" -" copy a compressed fba file to a fba file\n" "\n" -" ifile -- input compressed fba dasd file\n" -" sfile -- input compressed fba shadow file\n" -" (optional)\n" -" ofile -- output fba dasd file\n" +"HHCCF039W PGMPRDOS LICENSED specified.\n" +" Licensed program product operating systems are enabled.\n" +" You are responsible for meeting all conditions of your\n" +" software license.\n" "\n" -" options:\n" -" -v display program version and quit\n" -" -h display this help and quit\n" -" -q quiet mode, don't display status\n" -" -r replace the output file if it exists\n" -" -lfs create single large output file\n" -" -blks n size of output file\n" msgstr "" -#: dasdcopy.c:526 +#: config.c:1934 #, c-format -msgid "" -"usage: %s [-options] ifile [sf=sfile] ofile\n" -"\n" -" copy a dasd file to another dasd file\n" -"\n" -" ifile -- input dasd file\n" -" sfile -- input shadow file [optional]\n" -" ofile -- output dasd file\n" -"\n" -" options:\n" -" -v display program version and quit\n" -" -h display this help and quit\n" -" -q quiet mode, don't display status\n" -" -r replace the output file if it exists\n" -"%s%s -0 don't compress output\n" -" -blks n size of output fba file\n" -" -cyls n size of output ckd file\n" -" -a output ckd file will have alt cyls\n" -" -lfs output ckd file will be a single file\n" -" even if it exceeds 2G in size\n" -" -o type output file type (CKD, CCKD, FBA, CFBA)\n" +msgid "HHCCF040E Cannot create CPU%4.4X thread: %s\n" msgstr "" -#: dasdcopy.c:559 -msgid " -bz2 compress output using bzip2\n" +#: config.c:2050 +#, fuzzy +msgid "HHCCF043E Cannot obtain device block\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: config.c:2144 +#, c-format +msgid "HHCCF041E Device %4.4X already exists\n" msgstr "" -#: dasdinit.c:231 -msgid "HHCDI001I DASD initialization successfully completed.\n" +#: config.c:2153 +#, c-format +msgid "HHCCF042E Device type %s not recognized\n" msgstr "" -#: dat.h:1894 +#: config.c:2167 +#, fuzzy, c-format +msgid "HHCCF044E Initialization failed for device %4.4X\n" +msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" + +#: config.c:2183 #, c-format -msgid "dat.c: Interval timer accessed: %2.2X%2.2X%2.2X%2.2X\n" +msgid "HHCCF045E Cannot obtain buffer for device %4.4X: %s\n" msgstr "" -#: external.c:251 -msgid "HHCCP023I External interrupt: Interrupt key\n" +#: config.c:2217 +#, c-format +msgid "HHCCF046E Device %4.4X does not exist\n" msgstr "" -#: external.c:364 -msgid "HHCCP024I External interrupt: Clock comparator\n" +#: config.c:2243 +#, c-format +msgid "HHCCF047I Device %4.4X detached\n" msgstr "" -#: external.c:375 +#: config.c:2261 #, c-format -msgid "HHCCP025I External interrupt: CPU timer=%16.16llX\n" +msgid "HHCCF048E Device %4.4X does not exist\n" msgstr "" -#: external.c:392 -msgid "HHCCP026I External interrupt: Interval timer\n" +#: config.c:2268 +#, c-format +msgid "HHCCF049E Device %4.4X already exists\n" msgstr "" -#: fbadasd.c:90 +#: console.c:288 #, fuzzy, c-format -msgid "HHCDA058E Read error in file %s: %s\n" +msgid "HHCGI001I Unable to determine IP address from %s\n" msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: fbadasd.c:93 -#, fuzzy, c-format -msgid "HHCDA059E Unexpected end of file in %s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" - -#: fbadasd.c:111 +#: console.c:309 #, fuzzy, c-format -msgid "HHCDA060E Read error in file %s: %s\n" +msgid "HHCGI002I Unable to determine port number from %s\n" msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: fbadasd.c:114 +#: console.c:323 #, fuzzy, c-format -msgid "HHCDA061E Unexpected end of file in %s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +msgid "HHCGI003E Invalid parameter: %s\n" +msgstr "HHC422I Optie %s niet geldig\n" -#: fbadasd.c:156 +#: console.c:780 #, c-format -msgid "HHCDA062E parameter %d is invalid: %s\n" +msgid "HHCTE007I Device %4.4X connection closed by client %s\n" msgstr "" -#: fbadasd.c:291 -#, fuzzy, c-format -msgid "HHCDA068E Seek error in file %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" - -#: fbadasd.c:305 -#, fuzzy, c-format -msgid "HHCDA069E Read error in file %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +#: console.c:943 +#, c-format +msgid "HHCTE008I Device %4.4X connection closed by client %s\n" +msgstr "" -#: fbadasd.c:308 +#: console.c:1244 #, fuzzy, c-format -msgid "HHCDA070E Unexpected end of file in %s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +msgid "HHCTE009I Client %s connected to %4.4X device %4.4X\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: fbadasd.c:335 -#, fuzzy, c-format -msgid "HHCDA071E Seek error in file %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +#: console.c:1310 +#, fuzzy +msgid "HHCTE001I Console connection thread started: tid=" +msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" -#: fbadasd.c:348 +#: console.c:1334 #, fuzzy, c-format -msgid "HHCDA072E Write error in file %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgid "HHCTE010E CNSLPORT statement invalid: %s\n" +msgstr "HHC422I Optie %s niet geldig\n" -#: fbadasd.c:697 +#: console.c:1346 #, c-format -msgid "HHCDA074E define extent data too short: %d bytes\n" -msgstr "" - -#: fbadasd.c:707 -msgid "HHCDA075E second define extent in chain\n" +msgid "HHCTE002W Waiting for port %u to become free\n" msgstr "" -#: fbadasd.c:718 +#: console.c:1366 #, c-format -msgid "HHCDA076E invalid file mask %2.2X\n" +msgid "HHCTE003I Waiting for console connection on port %u\n" msgstr "" -#: fbadasd.c:759 -#, c-format -msgid "HHCDA077E invalid extent: first block %d, last block %d,\n" -msgstr "" +#: console.c:1544 +#, fuzzy +msgid "HHCTE004I Console connection thread terminated\n" +msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" -#: fbadasd.c:761 +#: console.c:1559 #, c-format -msgid " numblks %d, device size %d\n" -msgstr " Blöcke: %d, Gesamtgröße %d\n" - -#: general1.c:3287 -msgid "MVCL destructive overlap: " +msgid "HHCTE005E Cannot create console thread: %s\n" msgstr "" -#: hercifc.c:48 -#, c-format -msgid "HHCIF001E %s: Must be called from within Hercules.\n" +#: console.c:1577 +msgid "console_remove() error\n" msgstr "" -#: hercifc.c:59 +#: console.c:2432 #, fuzzy, c-format -msgid "HHCIF002E %s: Cannot obtain socket: %s\n" -msgstr "Kann %s nicht öffnen: %s\n" +msgid "HHCTE006A Enter input for console device %4.4X%c\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: hercifc.c:74 -#, fuzzy, c-format -msgid "HHCIF003E %s: I/O error on read: %s.\n" -msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" +#: cpu.c:247 +msgid "HHCCP043I Wait state PSW loaded: " +msgstr "" -#: hercifc.c:151 +#: cpu.c:389 #, c-format -msgid "HHCIF004W %s: Unknown request: %8.8X.\n" +msgid "program_int() passing to guest code=%4.4X\n" msgstr "" -#: hercifc.c:164 -#, fuzzy, c-format -msgid "HHCIF005E %s: ioctl error doing %s on %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: hostinfo.c:64 -#, c-format -msgid "Running on %s %s%s %s %s\n" -msgstr "Draaiend op %s %s%s %s %s\n" +#: cpu.c:477 +msgid "HHCCP014I " +msgstr "" -#: hsccmd.c:110 -#, fuzzy -msgid "HHCPN015E Invalid device number\n" -msgstr "Ongeldig apparaat nummer\n" +#: cpu.c:480 hscmisc.c:697 +msgid "SIE: " +msgstr "" -#: hsccmd.c:116 +#: cpu.c:485 #, c-format -msgid "HHCPN016E Device number %4.4X not found\n" +msgid "CPU%4.4X: %s CODE=%4.4X ILC=%d\n" msgstr "" -#: hsccmd.c:124 +#: cpu.c:587 #, c-format -msgid "HHCPN017E Device %4.4X is not a printer device\n" +msgid "HHCCP015I CPU%4.4X PER event: code=%4.4X perc=%2.2X addr=" msgstr "" -#: hsccmd.c:138 -#, c-format -msgid "HHCPN018I Printer %4.4X started\n" +#: cpu.c:588 ecpsvm.c:359 ecpsvm.c:1138 ecpsvm.c:1143 sie.c:120 sie.c:231 +#: stack.c:593 stack.c:616 stack.c:678 stack.c:696 stack.c:704 stack.c:728 +#: stack.c:751 stack.c:804 stack.c:882 stack.c:916 stack.c:944 stack.c:956 +#: stack.c:967 stack.c:1021 stack.c:1045 stack.c:1277 stack.c:1303 +#: stack.c:1311 stack.c:1348 stack.c:1443 stack.c:1479 stack.c:1532 +msgid "\n" msgstr "" -#: hsccmd.c:140 +#: cpu.c:750 #, c-format -msgid "HHCPN019E Printer %4.4X not started: busy or interrupt pending\n" +msgid "HHCCP016I CPU%4.4X: Program interrupt loop: " msgstr "" -#: hsccmd.c:143 +#: cpu.c:858 #, c-format -msgid "HHCPN020E Printer %4.4X not started: attention request rejected\n" +msgid "" +"HHCCP044I I/O interrupt code=%4.4X CSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%" +"2.2X\n" msgstr "" -#: hsccmd.c:146 +#: cpu.c:880 #, c-format -msgid "HHCPN021E Printer %4.4X not started: subchannel not enabled\n" +msgid "HHCCP045I I/O interrupt code=%8.8X parm=%8.8X\n" msgstr "" -#: hsccmd.c:202 -#, fuzzy -msgid "HHCPN022E Invalid device number\n" -msgstr "Ongeldig apparaat nummer\n" - -#: hsccmd.c:208 +#: cpu.c:883 #, c-format -msgid "HHCPN023E Device number %4.4X not found\n" +msgid "HHCCP046I I/O interrupt code=%8.8X parm=%8.8X id=%8.8X\n" msgstr "" -#: hsccmd.c:216 +#: cpu.c:949 #, c-format -msgid "HHCPN024E Device %4.4X is not a printer device\n" +msgid "HHCCP022I Machine Check code=%16.16llu\n" msgstr "" -#: hsccmd.c:223 -#, c-format -msgid "HHCPN025I Printer %4.4X stopped\n" -msgstr "" +#: cpu.c:1005 +#, fuzzy, c-format +msgid "HHCCP001W CPU thread set priority %d failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: hsccmd.c:295 -msgid "HHCPN026W Ignored. (external GUI active)\n" -msgstr "" +#: cpu.c:1012 +#, fuzzy, c-format +msgid "HHCCP002I CPU%4.4X thread started: tid=" +msgstr "HHC623I CPU%4.4X thread al gestart\n" -#: hsccmd.c:300 +#: cpu.c:1012 timer.c:315 #, c-format -msgid "HHCPN027I Automatic refresh %s.\n" -msgstr "" - -#: hsccmd.c:301 -msgid "disabled" -msgstr "" - -#: hsccmd.c:301 -msgid "enabled" +msgid ", pid=%d, priority=%d\n" msgstr "" -#: hsccmd.c:349 +#: cpu.c:1017 #, fuzzy, c-format -msgid "HHCPN029E Invalid I/O delay value: %s\n" -msgstr "Ongeldige waarde: %s\n" +msgid "HHCCP003I CPU%4.4X architecture mode %s\n" +msgstr "HHC630I CPU%4.4X Architectuur Modus %s\n" -#: hsccmd.c:354 -#, c-format -msgid "HHCPN030I I/O delay = %d\n" -msgstr "" +#: cpu.c:1022 +#, fuzzy, c-format +msgid "HHCCP004I CPU%4.4X Vector Facility online\n" +msgstr "HHC623I CPU%4.4X thread al gestart\n" -#: hsccmd.c:390 -#, fuzzy -msgid "HHCPN031E Missing device number\n" -msgstr "Geen apparaat nummer\n" +#: cpu.c:1033 +#, fuzzy, c-format +msgid "HHCCP005E CPU%4.4X thread already started\n" +msgstr "HHC623I CPU%4.4X thread al gestart\n" -#: hsccmd.c:396 +#: cpu.c:1047 #, fuzzy, c-format -msgid "HHCPN032E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgid "HHCCP006S Cannot create timer thread: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" -#: hsccmd.c:402 +#: cpu.c:1074 #, fuzzy, c-format -msgid "HHCPN033E Device number %4.4X not found\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgid "HHCCP007I CPU%4.4X architecture mode set to %s\n" +msgstr "HHC630I CPU%4.4X Architectuur Modus %s\n" -#: hsccmd.c:408 +#: cpu.c:1085 #, fuzzy, c-format -msgid "HHCPN034E Device %4.4X is not a CTCI or LCS device\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +msgid "HHCCP008I CPU%4.4X thread ended: tid=" +msgstr "HHC623I CPU%4.4X thread al gestart\n" -#: hsccmd.c:415 -msgid "(error)\n" -msgstr "" +#: cpu.c:1113 +#, fuzzy, c-format +msgid "HHCCP009E CPU MASK MISMATCH: %8.8X - %8.8X. Last instruction:\n" +msgstr "CPU MASK MISMATCH: %8.8X - %8.8X. Letzter Befehl war:\n" -#: hsccmd.c:439 -msgid "HHCPN035E store status rejected: CPU not stopped\n" -msgstr "" +#: cpu.c:1216 +#, fuzzy, c-format +msgid "HHCCP010I CPU%4.4X store status completed.\n" +msgstr "HHC623I CPU%4.4X thread al gestart\n" -#: hsccmd.c:468 -#, c-format -msgid "HHCPN036I TOD clock drag factor = %d\n" -msgstr "" +#: cpu.c:1280 +#, fuzzy, c-format +msgid "" +"HHCCP011I CPU%4.4X: Disabled wait state\n" +" " +msgstr "HHC623I CPU%4.4X thread al gestart\n" -#: hsccmd.c:501 +#: cpu.c:1522 #, c-format -msgid "HHCPN037I Panel refresh rate = %d millisecond(s)\n" +msgid "PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X\n" msgstr "" -#: hsccmd.c:617 -#, fuzzy -msgid "HHCPN038I Restart key depressed\n" -msgstr "Restart key ingedrukt\n" - -#: hsccmd.c:677 -#, fuzzy -msgid "HHCPN039E Missing argument\n" -msgstr "Geen apparaat nummer\n" - -#: hsccmd.c:683 +#: cpu.c:1529 #, c-format -msgid "HHCPN040I Setting breakpoint at %16.16llX\n" +msgid "" +"PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X%2.2X%2.2X%" +"2.2X%2.2X\n" msgstr "" -#: hsccmd.c:701 -msgid "HHCPN041I Deleting breakpoint\n" -msgstr "" +#: ctc_ctci.c:78 +#, fuzzy, c-format +msgid "HHCCT037E %4.4X: Unable to allocate CTCBLK\n" +msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" -#: hsccmd.c:723 -#, fuzzy -msgid "HHCPN042E Missing device number\n" -msgstr "Geen apparaat nummer\n" +#: ctc_ctci.c:100 +#, fuzzy, c-format +msgid "HHCCT038E %4.4X: Unable to allocate CTCBLK\n" +msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" -#: hsccmd.c:729 +#: ctc_ctci.c:148 #, fuzzy, c-format -msgid "HHCPN043E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgid "HHCCT039E %4.4X: Unable to allocate CTCBLK\n" +msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" -#: hsccmd.c:735 +#: ctc_ctci.c:557 #, c-format -msgid "HHCPN044E Device number %4.4X not found\n" +msgid "HHCCT040I %4.4X: Halt or Clear Recognized\n" msgstr "" -#: hsccmd.c:742 -#, fuzzy, c-format -msgid "HHCPN045I Device %4.4X attention request raised\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: hsccmd.c:745 +#: ctc_ctci.c:606 #, c-format -msgid "HHCPN046E Device %4.4X busy or interrupt pending\n" +msgid "HHCCT041I %4.4X: CTC Received Frame (%d bytes):\n" msgstr "" -#: hsccmd.c:748 +#: ctc_ctci.c:644 #, c-format -msgid "HHCPN047E Device %4.4X attention request rejected\n" +msgid "HHCCT042E %4.4X Write CCW count %u is invalid\n" msgstr "" -#: hsccmd.c:751 +#: ctc_ctci.c:673 #, c-format -msgid "HHCPN048E Device %4.4X subchannel not enabled\n" +msgid "HHCCT043I %4.4X: Interface command: %s %8.8X\n" msgstr "" -#: hsccmd.c:757 +#: ctc_ctci.c:700 ctcadpt.c:686 #, c-format -msgid "HHCPN049W Are you sure you didn't mean 'ipl %4.4X' instead?\n" +msgid "CTC101W %4.4X: Write buffer contains invalid frame offset %u\n" msgstr "" -#: hsccmd.c:776 -#, fuzzy -msgid "HHCPN050I Interrupt key depressed\n" -msgstr "Restart key ingedrukt\n" - -#: hsccmd.c:839 -#, fuzzy -msgid "HHCPN052E Missing device number\n" -msgstr "Geen apparaat nummer\n" - -#: hsccmd.c:847 -msgid "HHCPN053E ipl rejected: All CPU's must be stopped\n" +#: ctc_ctci.c:722 +#, c-format +msgid "" +"HHCCT044E %4.4X: Write buffer contains incomplete segment header at offset %" +"4.4X\n" msgstr "" -#: hsccmd.c:873 -#, fuzzy -msgid "HHCPN054E Missing argument\n" -msgstr "Geen apparaat nummer\n" - -#: hsccmd.c:879 +#: ctc_ctci.c:742 #, c-format -msgid "HHCPN055E Target CPU %s is invalid\n" +msgid "" +"HHCCT045E %4.4X: Write buffer contains invalid segment length %u at offset %" +"4.4X\n" msgstr "" -#: hsccmd.c:890 +#: ctc_ctci.c:757 #, fuzzy, c-format -msgid "HHCPN056E CPU%4.4X not configured\n" -msgstr "CPU%4.4X nicht konfiguriert\n" - -#: hsccmd.c:940 -msgid "open " -msgstr "" +msgid "HHCCT046I %4.4X: Sending packet to %s:\n" +msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" -#: hsccmd.c:941 -msgid "busy " -msgstr "" +#: ctc_ctci.c:767 +#, fuzzy, c-format +msgid "HHCCT047E %4.4X: Error writing to %s: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: hsccmd.c:942 -msgid "pending " -msgstr "" +#: ctc_ctci.c:829 +#, fuzzy, c-format +msgid "HHCCT048E %4.4X: Error reading from %s: %s\n" +msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: hsccmd.c:953 +#: ctc_ctci.c:851 #, c-format -msgid " (client %s (%s) connected)\n" -msgstr " (verbunden mit %s (%s))\n" - -#: hsccmd.c:959 -msgid " (no one currently connected)\n" -msgstr " (zur Zeit keine Verbindung)\n" +msgid "HHCCT049I %4.4X: Received packet from %s (%d bytes):\n" +msgstr "" -#: hsccmd.c:982 -#, fuzzy -msgid "HHCPN057E Missing argument(s)\n" +#: ctc_ctci.c:972 ctc_ctci.c:1145 +#, fuzzy, c-format +msgid "HHCCT056E %4.4X: Incorrect number of parameters\n" msgstr "Geen apparaat nummer\n" -#: hsccmd.c:988 +#: ctc_ctci.c:1047 #, fuzzy, c-format -msgid "HHCPN059E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgid "HHCCT050E %4.4X: Invalid adapter address %s\n" +msgstr "Ongeldig frame adres %8.8X\n" -#: hsccmd.c:995 +#: ctc_ctci.c:1056 #, fuzzy, c-format -msgid "Device type %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgid "HHCCT051E %4.4X: Invalid device name %s\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1015 -#, fuzzy -msgid "HHCPN060E Missing device number\n" -msgstr "Geen apparaat nummer\n" +#: ctc_ctci.c:1069 +#, fuzzy, c-format +msgid "HHCCT052E %4.4X: Invalid kernel buffer size %s\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1021 +#: ctc_ctci.c:1083 #, fuzzy, c-format -msgid "HHCPN061E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgid "HHCCT053E %4.4X: Invalid DLL I/O buffer size %s\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1040 -#, fuzzy -msgid "HHCPN062E Missing argument(s)\n" -msgstr "Geen apparaat nummer\n" +#: ctc_ctci.c:1096 +#, fuzzy, c-format +msgid "HHCCT054E %4.4X: Invalid MTU size %s\n" +msgstr "Ongeldig frame adres %8.8X\n" -#: hsccmd.c:1046 +#: ctc_ctci.c:1107 #, fuzzy, c-format -msgid "HHCPN063E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgid "HHCCT055E %4.4X: Invalid netmask %s\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1052 +#: ctc_ctci.c:1118 #, fuzzy, c-format -msgid "HHCPN064E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgid "HHCCT056E %4.4X: Invalid MAC address %s\n" +msgstr "Ongeldig frame adres %8.8X\n" -#: hsccmd.c:1071 -#, fuzzy -msgid "HHCPN065E Missing argument(s)\n" +#: ctc_ctci.c:1155 +#, fuzzy, c-format +msgid "HHCCT057E %4.4X: Incorrect number of parameters\n" msgstr "Geen apparaat nummer\n" -#: hsccmd.c:1077 -#, c-format -msgid "HHCPN066E Program interrupt number %s is invalid\n" -msgstr "" - -#: hsccmd.c:1084 -#, c-format -msgid "HHCPN067E Program interrupt number out of range (%4.4X)\n" -msgstr "" +#: ctc_ctci.c:1163 +#, fuzzy, c-format +msgid "HHCCT058E %4.4X: Invalid IP address %s\n" +msgstr "Ongeldig frame adres %8.8X\n" -#: hsccmd.c:1119 +#: ctc_ctci.c:1175 #, fuzzy, c-format -msgid "HHCPN068E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgid "HHCCT059E %4.4X: Invalid IP address %s\n" +msgstr "Ongeldig frame adres %8.8X\n" -#: hsccmd.c:1160 -#, fuzzy -msgid "HHCPN069E Missing device number\n" +#: ctc_ctci.c:1191 +#, fuzzy, c-format +msgid "HHCCT060E %4.4X: Incorrect number of parameters\n" msgstr "Geen apparaat nummer\n" -#: hsccmd.c:1166 +#: ctc_ctci.c:1200 #, fuzzy, c-format -msgid "HHCPN070E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" - -#: hsccmd.c:1172 -#, c-format -msgid "HHCPN071E Device number %4.4X not found\n" -msgstr "" +msgid "HHCCT061E %4.4X invalid device name %s\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1202 +#: ctc_ctci.c:1214 #, fuzzy, c-format -msgid "HHCPN072I %4.4X synchronous: %12lld asynchronous: %12lld\n" -msgstr "%4.4X synchron: %12lld asynchron: %12lld\n" +msgid "HHCCT062E %4.4X: Invalid MTU size %s\n" +msgstr "Ongeldig frame adres %8.8X\n" -#: hsccmd.c:1213 -msgid "HHCPN073I No synchronous I/O devices found\n" -msgstr "" +#: ctc_ctci.c:1225 +#, fuzzy, c-format +msgid "HHCCT063E %4.4X: Invalid IP address %s\n" +msgstr "Ongeldig frame adres %8.8X\n" -#: hsccmd.c:1215 +#: ctc_ctci.c:1237 #, fuzzy, c-format -msgid "HHCPN074I TOTAL synchronous: %12lld asynchronous: %12lld %3lld%%\n" -msgstr "%4.4X synchron: %12lld asynchron: %12lld\n" +msgid "HHCCT064E %4.4X: Invalid IP address %s\n" +msgstr "Ongeldig frame adres %8.8X\n" -#: hsccmd.c:1256 -#, fuzzy -msgid "HHCPN075E Invalid max device threads value (must be -1 to n)\n" +#: ctc_ctci.c:1249 +#, fuzzy, c-format +msgid "HHCCT065E %4.4X: Invalid netmask %s\n" msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1263 -#, c-format -msgid "" -"HHCPN076I Max device threads: %d, current: %d, most: %d, waiting: %d, max " -"exceeded: %d\n" -msgstr "" - -#: hsccmd.c:1284 -msgid "HHCPN077E Invalid max device threads value (must be -1 to n)\n" -msgstr "" - -#: hsccmd.c:1308 -#, c-format -msgid "" -"HHCPN078E Max device threads %d current %d most %d waiting %d total I/Os " -"queued %d\n" -msgstr "" - -#: hsccmd.c:1342 -#, fuzzy -msgid "HHCPN079E Missing device number\n" -msgstr "Geen apparaat nummer\n" - -#: hsccmd.c:1349 -#, fuzzy -msgid "HHCPN080E Invalid device number\n" -msgstr "Ongeldig apparaat nummer\n" - -#: hsccmd.c:1356 -#, fuzzy -msgid "HHCPN081E No cckd devices found\n" -msgstr "%d Geräte bearbeitet\n" - -#: hsccmd.c:1365 -#, fuzzy -msgid "HHCPN082E Invalid device number\n" -msgstr "Ongeldig apparaat nummer\n" - -#: hsccmd.c:1371 -#, c-format -msgid "HHCPN083E Device number %4.4X not found\n" -msgstr "" - -#: hsccmd.c:1377 -#, c-format -msgid "HHCPN084E Device number %4.4X is not a cckd device\n" -msgstr "" - -#: hsccmd.c:1388 +#: ctc_ctci.c:1260 #, fuzzy, c-format -msgid "HHCPN085I Processing device %4.4X\n" +msgid "HHCCT066E %4.4X: Incorrect number of parameters\n" msgstr "Geen apparaat nummer\n" -#: hsccmd.c:1394 +#: ctc_ctci.c:1278 #, fuzzy, c-format -msgid "HHCPN086E Unexpected operand: %s\n" -msgstr "Ongeldig operand: %s\n" - -#: hsccmd.c:1408 -msgid "HHCPN087E Operand must be `merge' or `nomerge'\n" -msgstr "" - -#: hsccmd.c:1417 -msgid "HHCPN088E Shadow file name not specified\n" -msgstr "" +msgid "HHCCT067E %4.4X: Invalid IP address %s\n" +msgstr "Ongeldig frame adres %8.8X\n" -#: hsccmd.c:1423 +#: ctc_ctci.c:1293 #, fuzzy, c-format -msgid "HHCPN089E Unexpected operand: %s\n" -msgstr "Ongeldig operand: %s\n" +msgid "HHCCT068E %4.4X: Invalid MAC address %s\n" +msgstr "Ongeldig frame adres %8.8X\n" -#: hsccmd.c:1432 +#: ctc_ctci.c:1325 #, fuzzy, c-format -msgid "HHCPN090E Unexpected operand: %s\n" -msgstr "Ongeldig operand: %s\n" - -#: hsccmd.c:1439 -msgid "HHCPN091E Command must be `sf+', `sf-', `sf=', `sfc', or `sfd'\n" -msgstr "" +msgid "HHCCT069E %4.4X: Invalid kernel buffer size %s\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1453 +#: ctc_ctci.c:1342 #, fuzzy, c-format -msgid "HHCPN092I %d devices processed\n" -msgstr "%d Geräte bearbeitet\n" +msgid "HHCCT070E %4.4X: Invalid DLL I/O buffer size %s\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1473 -#, fuzzy -msgid "HHCPN093E Missing argument(s)\n" +#: ctc_ctci.c:1353 +#, fuzzy, c-format +msgid "HHCCT071E %4.4X: Incorrect number of parameters\n" msgstr "Geen apparaat nummer\n" -#: hsccmd.c:1479 +#: ctc_lcs.c:71 #, fuzzy, c-format -msgid "HHCPN094E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" - -#: hsccmd.c:1485 -#, c-format -msgid "HHCPN095E Device number %4.4X not found\n" -msgstr "" - -#: hsccmd.c:1497 -#, c-format -msgid "HHCPN096E Device %4.4X busy or interrupt pending\n" -msgstr "" +msgid "HHCLC001E %4.4X unable to allocate LCSBLK\n" +msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" -#: hsccmd.c:1513 +#: ctc_lcs.c:151 #, fuzzy, c-format -msgid "HHCPN097E Initialization failed for device %4.4X\n" +msgid "HHCLC040E %4.4X AddDevice failed for LCSDEV %4.4X\n" msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" -#: hsccmd.c:1516 +#: ctc_lcs.c:640 #, fuzzy, c-format -msgid "HHCPN098I Device %4.4X initialized\n" +msgid "HHCLC002I %4.4X: Halt or Clear Recognized\n" msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: hsccmd.c:1545 -msgid "HHCPN099E savecore rejected: filename missing\n" -msgstr "" - -#: hsccmd.c:1566 +#: ctc_lcs.c:683 #, fuzzy, c-format -msgid "HHCPN100E savecore: invalid starting address: %s \n" -msgstr "Ongeldig frame adres %8.8X\n" +msgid "HHCLC003I %4.4X: LCS Read Buffer:\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1585 +#: ctc_lcs.c:787 #, fuzzy, c-format -msgid "HHCPN101E savecore: invalid ending address: %s \n" -msgstr "Ongeldig frame adres %8.8X\n" - -#: hsccmd.c:1593 -msgid "HHCPN102E savecore rejected: CPU not stopped\n" -msgstr "" +msgid "HHCLC004I %4.4X: Sending packet to %s:\n" +msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" -#: hsccmd.c:1599 +#: ctc_lcs.c:796 #, fuzzy, c-format -msgid "HHCPN103E invalid range: %8.8X-%8.8X\n" -msgstr "Ongeldig bereik: %s\n" +msgid "HHCLC005E %4.4X: Error writing to %s: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: hsccmd.c:1604 -#, c-format -msgid "HHCPN104I Saving locations %8.8X-%8.8X to %s\n" -msgstr "" +#: ctc_lcs.c:815 +#, fuzzy, c-format +msgid "HHCLC006I %4.4X Triggering Event.\n" +msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" -#: hsccmd.c:1609 +#: ctc_lcs.c:1105 #, fuzzy, c-format -msgid "HHCPN105E savecore error creating %s: %s\n" +msgid "HHCLC007E Error in call to socket: %s.\n" msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: hsccmd.c:1615 +#: ctc_lcs.c:1118 #, fuzzy, c-format -msgid "HHCPN106E savecore error writing to %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgid "HHCLC008E ioctl error on device %s: %s.\n" +msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" -#: hsccmd.c:1618 +#: ctc_lcs.c:1191 #, c-format -msgid "HHCPN107E savecore: unable to save %d bytes\n" +msgid "HHCLC009I Port %2.2X: Read Buffer:\n" msgstr "" -#: hsccmd.c:1644 -msgid "HHCPN108E loadcore rejected: filename missing\n" +#: ctc_lcs.c:1220 +#, c-format +msgid "HHCLC010I Port %2.2X: IPV4 frame for %8.8X\n" msgstr "" -#: hsccmd.c:1652 -#, fuzzy, c-format -msgid "HHCPN109E Cannot open %s: %s\n" -msgstr "Kann %s nicht öffnen: %s\n" - -#: hsccmd.c:1665 -#, fuzzy, c-format -msgid "HHCPN110E invalid address: %s \n" -msgstr "Ongeldig bereik: %s\n" +#: ctc_lcs.c:1247 +#, c-format +msgid "HHCLC011I Port %2.2X: ARP frame for %8.8X\n" +msgstr "" -#: hsccmd.c:1673 -msgid "HHCPN111E loadcore rejected: CPU not stopped\n" +#: ctc_lcs.c:1271 +#, c-format +msgid "HHCLC012I Port %2.2X: SNA frame\n" msgstr "" -#: hsccmd.c:1678 +#: ctc_lcs.c:1301 #, c-format -msgid "HHCPN112I Loading %s to location %x \n" +msgid "HHCLC013I Port %2.2X: No match found - selecting primary %4.4X\n" msgstr "" -#: hsccmd.c:1682 -#, fuzzy, c-format -msgid "HHCPN113I %d bytes read from %s\n" -msgstr "%d Bytes gelesen von %s\n" +#: ctc_lcs.c:1311 +#, c-format +msgid "HHCLC014I Port %2.2X: No match found - selecting secondary %4.4X\n" +msgstr "" -#: hsccmd.c:1705 -msgid "HHCPN114E loadtext rejected: filename missing\n" +#: ctc_lcs.c:1322 +#, c-format +msgid "HHCLC015I Port %2.2X: No match found - Discarding frame\n" msgstr "" -#: hsccmd.c:1718 +#: ctc_lcs.c:1330 #, fuzzy, c-format -msgid "HHCPN115E invalid address: %s \n" -msgstr "Ongeldig bereik: %s\n" +msgid "HHCLC016I Port %2.2X: Enqueing frame to device %4.4X (%8.8X)\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: hsccmd.c:1725 -#, fuzzy -msgid "HHCPN116E Address greater than mainstore size\n" -msgstr "Adresse ist höher als Speicherobergrenze\n" +#: ctc_lcs.c:1546 +#, fuzzy, c-format +msgid "HHCLC017E %4.4X invalid device name %s\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1732 -msgid "HHCPN117E loadtext rejected: CPU not stopped\n" +#: ctc_lcs.c:1562 +#, fuzzy, c-format +msgid "HHCLC018E %4.4X invalid MAC address %s\n" +msgstr "Ongeldig frame adres %8.8X\n" + +#: ctc_lcs.c:1586 +#, c-format +msgid "HHCLC019E %4.4X too many arguments in statement.\n" msgstr "" -#: hsccmd.c:1739 +#: ctc_lcs.c:1596 #, fuzzy, c-format -msgid "HHCPN118E Cannot open %s: %s\n" -msgstr "Kann %s nicht öffnen: %s\n" +msgid "HHCLC020E %4.4X invalid IP address %s\n" +msgstr "Ongeldig frame adres %8.8X\n" -#: hsccmd.c:1750 +#: ctc_lcs.c:1643 #, fuzzy, c-format -msgid "HHCPN119E Cannot read %s: %s\n" +msgid "HHCLC039E Cannot open file %s: %s\n" msgstr "Kann %s nicht öffnen: %s\n" -#: hsccmd.c:1774 -msgid "HHCPN120I Finished loading TEXT deck file\n" -msgstr "" - -#: hsccmd.c:1775 +#: ctc_lcs.c:1692 #, fuzzy, c-format -msgid " Last 'TXT' record had address: %3.3X\n" -msgstr "Laatste 'TXT' record had adres: %3.3X\n" +msgid "HHCLC021E Invalid HWADD statement in %s: %s\n" +msgstr "HHC422I Optie %s niet geldig\n" -#: hsccmd.c:1804 +#: ctc_lcs.c:1701 #, c-format -msgid "HHCPN121E ipending expects {+|-}debug as operand. %s is invalid\n" +msgid "" +"HHCLC022E Invalid MAC in HWADD statement in %s: %s (%s)\n" +" " msgstr "" -#: hsccmd.c:1820 -msgid "HHCPN122I Interrupt checking debug mode set to " -msgstr "" +#: ctc_lcs.c:1718 +#, fuzzy, c-format +msgid "HHCLC023E Invalid ROUTE statement in %s: %s\n" +msgstr "HHC422I Optie %s niet geldig\n" -#: hsccmd.c:1825 -msgid "ON\n" -msgstr "" +#: ctc_lcs.c:1725 +#, fuzzy, c-format +msgid "HHCLC024E Invalid net address in ROUTE %s: %s (%s)\n" +msgstr "Ongeldig bereik: %s\n" -#: hsccmd.c:1830 -msgid "OFF\n" -msgstr "" +#: ctc_lcs.c:1734 +#, fuzzy, c-format +msgid "HHCLC025E Invalid net mask in ROUTE %s: %s (%s)\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1835 -#, c-format -msgid "HHCPN123I CPU%4.4X: CPUint=%8.8X (r:%8.8X|s:%8.8X)&(Mask:%8.8X)\n" -msgstr "" +#: ctc_lcs.c:1766 +#, fuzzy, c-format +msgid "HHCLC026E Error in %s: Missing device number or mode\n" +msgstr "Geen apparaat nummer\n" -#: hsccmd.c:1841 +#: ctc_lcs.c:1775 #, fuzzy, c-format -msgid " CPU%4.4X: Clock comparator %spending\n" -msgstr "CPU%4.4X: CPU Status: %s\n" +msgid "HHCLC027E Error in %s: %s: Invalid device number\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1843 hsccmd.c:1847 hsccmd.c:1851 hsccmd.c:1855 hsccmd.c:1859 -#: hsccmd.c:1863 hsccmd.c:1867 hsccmd.c:1897 hsccmd.c:1900 hsccmd.c:1903 -#: hsccmd.c:1906 hsccmd.c:1909 hsccmd.c:1912 hsccmd.c:1916 hsccmd.c:1920 -msgid "not " -msgstr "" +#: ctc_lcs.c:1787 +#, fuzzy, c-format +msgid "HHCLC028E Error in %s: %s:Missing PORT number\n" +msgstr "Geen apparaat nummer\n" -#: hsccmd.c:1845 +#: ctc_lcs.c:1795 #, fuzzy, c-format -msgid " CPU%4.4X: CPU timer %spending\n" -msgstr "CPU%4.4X: CPU Status: %s\n" +msgid "HHCLC029E Error in %s: %s: Invalid PORT number\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1849 +#: ctc_lcs.c:1805 #, fuzzy, c-format -msgid " CPU%4.4X: Interval timer %spending\n" -msgstr "CPU%4.4X: CPU Status: %s\n" +msgid "HHCLC030E Error in %s: %s: Invalid number of arguments\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1853 +#: ctc_lcs.c:1819 #, fuzzy, c-format -msgid " CPU%4.4X: External call %spending\n" -msgstr "CPU%4.4X: CPU Status: %s\n" +msgid "HHCLC031E Error in %s: %s: Invalid entry starting at %s\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1857 +#: ctc_lcs.c:1829 #, fuzzy, c-format -msgid " CPU%4.4X: Emergency signal %spending\n" -msgstr "CPU%4.4X: CPU Status: %s\n" +msgid "HHCLC032E Error is %s: %s: Invalid IP address (%s)\n" +msgstr "Ongeldig frame adres %8.8X\n" -#: hsccmd.c:1861 +#: ctc_lcs.c:1844 #, fuzzy, c-format -msgid " CPU%4.4X: CPU %swaiting for interlock\n" -msgstr "CPU%4.4X: CPU Status: %s\n" +msgid "HHCLC033E Error in %s: %s: Missing PORT number\n" +msgstr "Geen apparaat nummer\n" -#: hsccmd.c:1865 +#: ctc_lcs.c:1852 #, fuzzy, c-format -msgid " CPU%4.4X: CPU interlock %sheld\n" -msgstr "CPU%4.4X: CPU Status: %s\n" +msgid "HHCLC034E Error in %s: %s:Invalid PORT number\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1869 +#: ctc_lcs.c:1860 #, fuzzy, c-format -msgid " CPU%4.4X: CPU state is %s\n" -msgstr "CPU%4.4X: CPU Status: %s\n" +msgid "HHCLC035E Error in %s: %s: SNA does not accept any arguments\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: hsccmd.c:1877 +#: ctc_lcs.c:1868 #, fuzzy, c-format -msgid " CPU%4.4X: No channelset connected\n" -msgstr "CPU%4.4X: Mit keinem Channel-Set verbunden\n" +msgid "HHCLC036E Error in %s: %s: Invalid MODE\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1881 +#: ctc_lcs.c:1928 #, fuzzy, c-format -msgid " CPU%4.4X: Connected to channelset %4.4X\n" -msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" +msgid "HHCLC037E Error reading file %s line %d: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: hsccmd.c:1888 +#: ctc_lcs.c:1952 #, c-format -msgid " Started mask %8.8X waiting mask %8.8X\n" +msgid "HHCLC038E File %s line %d is too long\n" msgstr "" -#: hsccmd.c:1892 -#, c-format -msgid " Broadcast mask %8.8X code %d\n" -msgstr "" +#: ctcadpt.c:113 +#, fuzzy, c-format +msgid "HHCCT001E %4.4X: Incorrect number of parameters\n" +msgstr "Geen apparaat nummer\n" -#: hsccmd.c:1896 -#, c-format -msgid " Machine check interrupt %spending\n" -msgstr "" +#: ctcadpt.c:428 +#, fuzzy, c-format +msgid "HHCCT002E %4.4X: Incorrect number of parameters\n" +msgstr "Geen apparaat nummer\n" -#: hsccmd.c:1899 +#: ctcadpt.c:440 #, fuzzy, c-format -msgid " Service signal %spending\n" -msgstr " Blöcke: %d, Gesamtgröße %d\n" +msgid "HHCCT003E %4.4X: Invalid port number: %s\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1902 -#, c-format -msgid " Signaling facility %sbusy\n" -msgstr "" +#: ctcadpt.c:461 +#, fuzzy, c-format +msgid "HHCCT004E %4.4X: Invalid IP address %s\n" +msgstr "Ongeldig frame adres %8.8X\n" -#: hsccmd.c:1905 -#, c-format -msgid " TOD lock %sheld\n" -msgstr "" +#: ctcadpt.c:474 +#, fuzzy, c-format +msgid "HHCCT005E %4.4X: Invalid port number: %s\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:1908 -#, c-format -msgid " Main lock %sheld\n" -msgstr "" +#: ctcadpt.c:486 +#, fuzzy, c-format +msgid "HHCCT006E %4.4X: Invalid MTU size %s\n" +msgstr "Ongeldig frame adres %8.8X\n" -#: hsccmd.c:1911 -#, c-format -msgid " Int lock %sheld\n" -msgstr "" +#: ctcadpt.c:507 +#, fuzzy, c-format +msgid "HHCCT007E %4.4X: Error creating socket: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: hsccmd.c:1915 -#, c-format -msgid " Ioq lock %sheld\n" -msgstr "" +#: ctcadpt.c:527 +#, fuzzy, c-format +msgid "HHCCT008E %4.4X: Error binding to socket: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: hsccmd.c:1919 -#, c-format -msgid " I/O interrupt %spending\n" -msgstr "" +#: ctcadpt.c:548 +#, fuzzy, c-format +msgid "HHCCT009I %4.4X: Connect to %s:%s failed, starting server\n" +msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" -#: hsccmd.c:1926 -#, c-format -msgid " DEV%4.4X: I/O pending\n" -msgstr "" +#: ctcadpt.c:558 +#, fuzzy, c-format +msgid "HHCCT010E %4.4X: Error creating socket: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: hsccmd.c:1928 -#, c-format -msgid " DEV%4.4X: PCI pending\n" -msgstr "" +#: ctcadpt.c:575 +#, fuzzy, c-format +msgid "HHCCT011E %4.4X: Error binding to socket: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: hsccmd.c:1930 -#, c-format -msgid " DEV%4.4X: CRW pending\n" -msgstr "" +#: ctcadpt.c:583 +#, fuzzy, c-format +msgid "HHCCT012E %4.4X: Error on call to listen: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: ctcadpt.c:597 +#, fuzzy, c-format +msgid "HHCCT013I %4.4X: Connected to %s:%s\n" +msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" -#: hsccmd.c:1932 +#: ctcadpt.c:631 #, c-format -msgid " DEV%4.4X: lock held\n" +msgid "HHCCT014E %4.4X Write CCW count %u is invalid\n" msgstr "" -#: hsccmd.c:1935 -msgid " I/O interrupt queue: " +#: ctcadpt.c:661 +#, c-format +msgid "HHCCT015I %4.4X: Interface command: %s %8.8X\n" msgstr "" -#: hsccmd.c:1938 -msgid "(NULL)\n" +#: ctcadpt.c:707 +#, c-format +msgid "" +"HHCCT016E %4.4X: Write buffer contains incomplete segment header at offset %" +"4.4X\n" msgstr "" -#: hsccmd.c:1941 +#: ctcadpt.c:727 #, c-format -msgid " DEV%4.4X\n" +msgid "" +"HHCCT017E %4.4X: Write buffer contains invalid segment length %u at offset %" +"4.4X\n" msgstr "" -#: hsccmd.c:1960 -#, fuzzy -msgid "HHCPN124I Instruction counts reset to zero.\n" -msgstr "%sFehler beim Lesen der Instruktion\n" - -#: hsccmd.c:1964 -#, fuzzy -msgid "HHCPN125I Instruction count display:\n" -msgstr "%sFehler beim Lesen der Instruktion\n" - -#: hsccmd.c:2082 +#: ctcadpt.c:742 #, fuzzy, c-format -msgid "HHCPN126I Architecture mode = %s\n" -msgstr "Modus: %s\n" - -#: hsccmd.c:2091 -msgid "HHCPN127E All CPU's must be stopped to change architecture\n" -msgstr "" +msgid "HHCCT018I %4.4X: Sending packet to %s:\n" +msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" -#: hsccmd.c:2111 +#: ctcadpt.c:753 #, fuzzy, c-format -msgid "HHCPN128E Invalid architecture mode %s\n" -msgstr "Ongeldige achitectuur modus %s\n" +msgid "HHCCT019E %4.4X: Error writing to %s: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: hsccmd.c:2122 +#: ctcadpt.c:816 #, fuzzy, c-format -msgid "HHCPN129I Architecture successfully set to %s mode.\n" -msgstr "Modus umgeschaltef auf %s\n" - -#: hsccmd.c:2147 -msgid "on" -msgstr "" - -#: hsccmd.c:2150 -msgid "off" -msgstr "" +msgid "HHCCT020E %4.4X: Error reading from %s: %s\n" +msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: hsccmd.c:2160 +#: ctcadpt.c:833 #, fuzzy, c-format -msgid "HHCPN130E Invalid frame address %8.8X\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgid "HHCCT021E %4.4X: Error reading from %s: %s\n" +msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: hsccmd.c:2166 +#: ctcadpt.c:843 #, c-format -msgid "HHCPN131I Frame %8.8X marked %s\n" -msgstr "" - -#: hsccmd.c:2167 -msgid "usable" -msgstr "" - -#: hsccmd.c:2167 -msgid "unusable" +msgid "HHCCT022I %4.4X: Received packet from %s (%d bytes):\n" msgstr "" -#: hsccmd.c:2179 +#: ctcadpt.c:925 #, fuzzy, c-format -msgid "HHCPN132I Instruction tracing is now %s\n" -msgstr "%sFehler beim Lesen der Instruktion\n" +msgid "" +"HHCCT023E %4.4X: Incorrect client or config error\n" +" Config=%s, connecting client=%s\n" +msgstr "CPU%4.4X nicht konfiguriert\n" -#: hsccmd.c:2190 +#: ctcadpt.c:969 #, fuzzy, c-format -msgid "HHCPN133I Instruction stepping is now %s\n" -msgstr "%sFehler beim Lesen der Instruktion\n" +msgid "HHCCT024E %4.4X: Not enough arguments to start vmnet\n" +msgstr "CPU%4.4X nicht konfiguriert\n" -#: hsccmd.c:2205 +#: ctcadpt.c:979 #, fuzzy, c-format -msgid "HHCPN134I CKD KEY trace is now %s\n" -msgstr "CKD KEY Ablaufverfolgung ist %s\n" - -#: hsccmd.c:2220 -#, c-format -msgid "HHCPN135E Device number %4.4X not found\n" -msgstr "" +msgid "HHCCT025E %4.4X: Failed: socketpair: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: hsccmd.c:2227 +#: ctcadpt.c:987 #, fuzzy, c-format -msgid "HHCPN136I CCW tracing is now %s for device %4.4X\n" -msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" +msgid "HHCCT026E %4.4X: Failed: fork: %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" -#: hsccmd.c:2232 +#: ctcadpt.c:1037 #, fuzzy, c-format -msgid "HHCPN137I CCW stepping is now %s for device %4.4X\n" -msgstr "CCW Einzelschritt ist %s für %4.4X\n" +msgid "HHCCT027E %4.4X: Not enough parameters\n" +msgstr "CPU%4.4X nicht konfiguriert\n" -#: hsccmd.c:2239 -msgid "HHCPN138E Unrecognized +/- command.\n" -msgstr "" +#: ctcadpt.c:1042 +#, fuzzy, c-format +msgid "HHCCT028E %4.4X: Bad device number '%s'\n" +msgstr "Ongeldig apparaat nummer\n" -#: hsccmd.c:2425 +#: ctcadpt.c:1079 #, c-format -msgid "HHCPN139E Command \"%s\" not found; enter '?' for list.\n" -msgstr "" - -#: hsccmd.c:2445 -msgid "" -"HHCPN140I Valid panel commands are...\n" -" \n" -msgstr "" - -#: hsccmd.c:2458 -msgid "add shadow file" -msgstr "" - -#: hsccmd.c:2459 -msgid "delete shadow file" +msgid "HHCCT029E %4.4X: bad block length: %d < %d\n" msgstr "" -#: hsccmd.c:2460 -msgid "rename shadow file" +#: ctcadpt.c:1089 +#, c-format +msgid "HHCCT030E %4.4X: bad packet length: %d < %d\n" msgstr "" -#: hsccmd.c:2461 -msgid "compress shadow files" +#: ctcadpt.c:1094 +#, c-format +msgid "HHCCT031E %4.4X: bad packet length: %d < 6\n" msgstr "" -#: hsccmd.c:2462 -msgid "display shadow file stats" +#: ctcadpt.c:1140 +#, c-format +msgid "HHCCT032E %4.4X: Error: EOF on read, CTC network down\n" msgstr "" -#: hsccmd.c:2466 -msgid "turn instruction tracing on/off" -msgstr "" +#: ctcadpt.c:1148 +#, fuzzy, c-format +msgid "HHCCT033E %4.4X: Error: read: %s\n" +msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: hsccmd.c:2467 -msgid "turn instruction stepping on/off" -msgstr "" +#: ctcadpt.c:1301 +#, fuzzy, c-format +msgid "HHCCT034E device %4.4X already exists\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: hsccmd.c:2468 -msgid "turn CCW tracing on/off" +#: dasdcat.c:36 +#, c-format +msgid "HHCDT002E Can't make 80 column card images from block length %d\n" msgstr "" -#: hsccmd.c:2469 -msgid "turn CCW stepping on/off" +#: dasdcat.c:109 +msgid "HHCDT003E Directory block byte count is invalid\n" msgstr "" -#: hsccmd.c:2471 -msgid "turn CKD_KEY tracing on/off" +#: dasdcat.c:211 +msgid "HHCDT004E non-PDS-members not yet supported\n" msgstr "" -#: hsccmd.c:2473 -msgid "mark frames unusable/usable" +#: dasdcat.c:241 +#, c-format +msgid "HHCDT005E unknown dataset name option: '%c'\n" msgstr "" -#: hsccmd.c:2622 -#, fuzzy -msgid "HHCPN141E Missing argument\n" -msgstr "Geen apparaat nummer\n" +#: dasdcat.c:336 +#, fuzzy, c-format +msgid "HHCDT001E failed to open image %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: hsccmd.c:2635 -msgid "HHCPN142I No additional help available.\n" +#: dasdcopy.c:108 +#, c-format +msgid "Hercules %s copy program " msgstr "" -#: hscmisc.c:205 -#, fuzzy, c-format -msgid "HHCPN143E Invalid value: %s\n" -msgstr "Ongeldige waarde: %s\n" - -#: hscmisc.c:229 +#: dasdcopy.c:192 #, fuzzy, c-format -msgid "HHCPN144E Invalid operand: %s\n" -msgstr "Ongeldig operand: %s\n" +msgid "HHCDC001E %s: %s open error: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" -#: hscmisc.c:241 +#: dasdcopy.c:199 #, fuzzy, c-format -msgid "HHCPN145E Invalid range: %s\n" -msgstr "Ongeldig bereik: %s\n" - -#: hscmisc.c:626 -#, c-format -msgid "%sInstruction fetch error\n" -msgstr "%sFehler beim Lesen der Instruktion\n" +msgid "HHCDC002E %s: %s read error: %s\n" +msgstr "%d Bytes gelesen von %s\n" -#: httpserv.c:64 +#: dasdcopy.c:262 #, fuzzy, c-format -msgid "HHCHT011E html_include: Cannot open %s: %s\n" -msgstr "Kann %s nicht öffnen: %s\n" +msgid "HHCDC003E %s: %s open failed\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: httpserv.c:66 +#: dasdcopy.c:275 #, c-format -msgid "ERROR: Cannot open %s: %s\n" +msgid "HHCDC004E %s: ckd lookup failed for %4.4X cyls %d\n" msgstr "" -#: httpserv.c:262 +#: dasdcopy.c:295 #, c-format -msgid "HHCHT012I cgi_var_dump: pointer(%p) name(%s) value(%s) type(%d)\n" +msgid "HHCDC005E %s: fba lookup failed, blks %d\n" msgstr "" -#: httpserv.c:561 -#, fuzzy -msgid "HHCHT001I HTTP listener thread started: tid=" -msgstr "HHC620I CPU%4.4X thread gestart: tid=%8.8lX, pid=%d, prioriteit=%d\n" - -#: httpserv.c:570 +#: dasdcopy.c:316 #, c-format -msgid "HHCHT002E socket: %s\n" +msgid "HHCDC006E %s: %s create failed\n" msgstr "" -#: httpserv.c:593 -#, c-format -msgid "HHCHT003W Waiting for port %u to become free\n" -msgstr "" +#: dasdcopy.c:328 +#, fuzzy, c-format +msgid "HHCDC007E %s: %s open failed\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: httpserv.c:600 -#, c-format -msgid "HHCHT004E bind: %s\n" -msgstr "" +#: dasdcopy.c:341 +#, fuzzy, c-format +msgid " %3d%% %7d of %d" +msgstr "%c %3d%% Spur %6d von %6d" -#: httpserv.c:609 -#, c-format -msgid "HHCHT005E listen: %s\n" -msgstr "" +#: dasdcopy.c:361 +#, fuzzy, c-format +msgid "HHCDC008E %s: %s read error %s %d stat=%2.2X\n" +msgstr "%d Bytes gelesen von %s\n" -#: httpserv.c:613 +#: dasdcopy.c:392 #, c-format -msgid "HHCHT006I Waiting for HTTP requests on port %u\n" +msgid "HHCDC009E %s: %s write error %s %d stat=%2.2X\n" msgstr "" -#: httpserv.c:638 -#, c-format -msgid "HHCHT007E select: %s\n" +#: dasdcopy.c:403 +msgid "" +"\n" +"HHCDC010I Copy successful !!! \n" msgstr "" -#: httpserv.c:650 +#: dasdcopy.c:444 #, c-format -msgid "HHCHT008E accept: %s\n" -msgstr "" +msgid "" +"usage: ckd2cckd [-options] ifile ofile\n" +"\n" +" copy a ckd dasd file to a compressed ckd dasd file\n" +"\n" +" ifile -- input ckd dasd file\n" +" ofile -- output compressed ckd dasd file\n" +"\n" +" options:\n" +" -v display program version and quit\n" +" -h display this help and quit\n" +" -q quiet mode, don't display status\n" +" -r replace the output file if it exists\n" +"%s%s -0 don't compress track images\n" +" -cyls n size of output file\n" +" -a output file will have alt cyls\n" +msgstr "" -#: httpserv.c:656 -#, fuzzy, c-format -msgid "HHCHT009E fdopen: %s\n" -msgstr "HHC760I %4.4X create_thread fout: %s" +#: dasdcopy.c:464 dasdcopy.c:518 dasdcopy.c:578 +msgid " -z compress using zlib [default]\n" +msgstr "" -#: httpserv.c:665 -#, fuzzy, c-format -msgid "HHCHT010E http_request create_thread: %s\n" -msgstr "Kann %s nicht öffnen: %s\n" +#: dasdcopy.c:471 dasdcopy.c:525 +msgid " -bz2 compress using bzip2\n" +msgstr "" -#: ieee.c:392 -msgid "ebfpston: unexpectedly converting a NaN\n" +#: dasdcopy.c:479 +msgid "" +"usage: cckd2ckd [-options] ifile [sf=sfile] ofile\n" +"\n" +" copy a compressed ckd file to a ckd file\n" +"\n" +" ifile -- input compressed ckd dasd file\n" +" sfile -- input compressed ckd shadow file\n" +" (optional)\n" +" ofile -- output ckd dasd file\n" +"\n" +" options:\n" +" -v display program version and quit\n" +" -h display this help and quit\n" +" -q quiet mode, don't display status\n" +" -r replace the output file if it exists\n" +" -lfs create single large output file\n" +" -cyls n size of output file\n" +" -a output file will have alt cyls\n" msgstr "" -#: ieee.c:396 -msgid "ebfpston: unexpectedly converting an Infinite\n" +#: dasdcopy.c:499 +#, c-format +msgid "" +"usage: fba2cfba [-options] ifile ofile\n" +"\n" +" copy a fba dasd file to a compressed fba dasd file\n" +"\n" +" ifile -- input fba dasd file\n" +" ofile -- output compressed fba dasd file\n" +"\n" +" options:\n" +" -v display program version and quit\n" +" -h display this help and quit\n" +" -q quiet mode, don't display status\n" +" -r replace the output file if it exists\n" +"%s%s -0 don't compress track images\n" +" -blks n size of output file\n" msgstr "" -#: ieee.c:443 -msgid "lbfpston: unexpectedly converting a NaN\n" +#: dasdcopy.c:533 +msgid "" +"usage: cfba2fba [-options] ifile [sf=sfile] ofile\n" +"\n" +" copy a compressed fba file to a fba file\n" +"\n" +" ifile -- input compressed fba dasd file\n" +" sfile -- input compressed fba shadow file\n" +" (optional)\n" +" ofile -- output fba dasd file\n" +"\n" +" options:\n" +" -v display program version and quit\n" +" -h display this help and quit\n" +" -q quiet mode, don't display status\n" +" -r replace the output file if it exists\n" +" -lfs create single large output file\n" +" -blks n size of output file\n" msgstr "" -#: ieee.c:447 -msgid "lbfpston: unexpectedly converting an Infinite\n" +#: dasdcopy.c:552 +#, c-format +msgid "" +"usage: %s [-options] ifile [sf=sfile] ofile\n" +"\n" +" copy a dasd file to another dasd file\n" +"\n" +" ifile -- input dasd file\n" +" sfile -- input shadow file [optional]\n" +" ofile -- output dasd file\n" +"\n" +" options:\n" +" -v display program version and quit\n" +" -h display this help and quit\n" +" -q quiet mode, don't display status\n" +" -r replace the output file if it exists\n" +"%s%s -0 don't compress output\n" +" -blks n size of output fba file\n" +" -cyls n size of output ckd file\n" +" -a output ckd file will have alt cyls\n" +" -lfs output ckd file will be a single file\n" +" even if it exceeds 2G in size\n" +" -o type output file type (CKD, CCKD, FBA, CFBA)\n" msgstr "" -#: ieee.c:488 -msgid "sbfpston: unexpectedly converting a NaN\n" +#: dasdcopy.c:585 +msgid " -bz2 compress output using bzip2\n" msgstr "" -#: ieee.c:492 -msgid "sbfpston: unexpectedly converting an Infinite\n" +#: dasdinit.c:261 +msgid "HHCDI001I DASD initialization successfully completed.\n" msgstr "" -#: ipl.c:63 +#: dasdisup.c:246 +#, fuzzy +msgid "HHCDS003E Directory block byte count is invalid\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: dasdisup.c:291 #, fuzzy, c-format -msgid "HHCCP027E Device %4.4X not in configuration\n" -msgstr "CPU%4.4X nicht konfiguriert\n" +msgid "HHCDS018I %s %s skipped\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: ipl.c:74 -msgid "HHCCP028E Device not connected to channelset\n" +#: dasdisup.c:304 +msgid "HHCDS004E Number of members exceeds MAX_MEMBERS\n" msgstr "" -#: ipl.c:124 +#: dasdisup.c:313 #, c-format -msgid "HHCCP029E %s mode IPL failed: CSW status=%2.2X%2.2X\n" -msgstr "" - -#: ipl.c:126 -msgid " Sense=" +msgid "HHCDS005E Member %s TTR count is zero\n" msgstr "" -#: ipl.c:174 +#: dasdisup.c:342 #, c-format -msgid "" -"HHCCP030E %s mode IPL failed: Invalid IPL PSW: %2.2X%2.2X%2.2X%2.2X %2.2X%" -"2.2X%2.2X%2.2X\n" +msgid "HHCDS006W Member %s is not single text record\n" msgstr "" -#: ipl.c:278 -#, fuzzy, c-format -msgid "HHCCP031E Load from %s failed: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" - -#: ipl.c:328 +#: dasdisup.c:351 #, c-format -msgid "" -"HHCCP032E %s mode IPL failed: Invalid IPL PSW: %2.2X%2.2X%2.2X%2.2X %2.2X%" -"2.2X%2.2X%2.2X\n" +msgid "HHCDS007W Member %s size %4.4X exceeds X'7F8' bytes\n" msgstr "" -#: ipl.c:478 +#: dasdisup.c:360 #, c-format -msgid "HHCCP033E load_main: %s: %s\n" +msgid "HHCDS008W Member %s size %4.4X is not a multiple of 8\n" msgstr "" -#: ipl.c:487 -msgid "HHCCP034W load_main: terminated at end of mainstor\n" +#: dasdisup.c:414 +#, c-format +msgid "HHCDS009I Alias %s skipped\n" msgstr "" -#: machchk.c:229 +#: dasdisup.c:421 #, c-format -msgid "HHCCP019I Machine Check code=%16.16llu\n" +msgid "HHCDS010I Member %s skipped\n" msgstr "" -#: machchk.c:291 -msgid "HHCCP020E signal USR2 received for undetermined device\n" +#: dasdisup.c:429 +#, c-format +msgid "HHCDS011E Member %s has multiple text records\n" msgstr "" -#: machchk.c:295 -#, fuzzy, c-format -msgid "HHCCP021E signal USR2 received for device %4.4X\n" -msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" - -#: machchk.c:323 machchk.c:327 +#: dasdisup.c:441 #, fuzzy, c-format -msgid "HHCCP017I CPU%4.4X: Machine check due to host error: %s\n" -msgstr "CPU%4.4X: Ceck-stop. Host Fehler: %s\n" +msgid "HHCDS012E Member %s has invalid TTR %4.4X%2.2X\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" -#: machchk.c:362 machchk.c:366 -#, fuzzy, c-format -msgid "HHCCP018I CPU%4.4X: Check-Stop due to host error: %s\n" -msgstr "CPU%4.4X: Ceck-stop. Host Fehler: %s\n" +#: dasdisup.c:447 +#, c-format +msgid "" +"HHCDS013I Processing member %s text record TTR=%4.4X%2.2X CCHHR=%4.4X%4.4X%" +"2.2X\n" +msgstr "" -#: panel.c:752 +#: dasdisup.c:457 #, fuzzy, c-format -msgid "HHCPN007E RC file %s open failed: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgid "HHCDS014E Member %s error reading TTR %4.4X%2.2X\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: panel.c:758 +#: dasdisup.c:466 #, c-format -msgid "HHCPN008I RC file processing thread started using file %s\n" +msgid "" +"HHCDS015E Member %s TTR %4.4X%2.2X text record length %4.4X is not valid\n" msgstr "" -#: panel.c:765 +#: dasdisup.c:476 #, c-format -msgid "HHCPN009E RC file buffer malloc failed: %s\n" +msgid "" +"HHCDS016E Member %s TTR %4.4X%2.2X text record length %4.4X does not match " +"length %4.4X in directory\n" msgstr "" -#: panel.c:803 -#, fuzzy, c-format -msgid "HHCPN010W Ignoring invalid RC file pause statement: %s\n" -msgstr "HHC422I Optie %s niet geldig\n" - -#: panel.c:809 +#: dasdisup.c:521 #, c-format -msgid "HHCPN011I Pausing RC file processing for %d seconds...\n" -msgstr "" - -#: panel.c:813 -msgid "HHCPN012I Resuming RC file processing...\n" +msgid "HHCDS017E Member %s TTR %4.4X%2.2X XCTL table improperly terminated\n" msgstr "" -#: panel.c:826 -msgid "HHCPN013I EOF reached on RC file. Processing complete.\n" +#: dasdisup.c:543 +#, c-format +msgid "HHCDS019I In member %s: %s TTRL=%2.2X%2.2X%2.2X%2.2X" msgstr "" -#: panel.c:828 -#, fuzzy, c-format -msgid "HHCPN014E I/O error reading RC file: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: panel.c:922 -#, fuzzy -msgid "HHCPN001I Control panel thread started: tid=" -msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" - -#: panel.c:929 +#: dasdisup.c:659 #, fuzzy, c-format -msgid "HHCPN002S Cannot obtain keyboard buffer: %s\n" +msgid "HHCDS001E Cannot obtain storage for member array: %s\n" msgstr "Kann %s nicht öffnen: %s\n" -#: panel.c:939 +#: dasdisup.c:711 #, fuzzy, c-format -msgid "HHCPN003S Cannot obtain message buffer: %s\n" -msgstr "Kann %s nicht öffnen: %s\n" +msgid "HHCDS002I End of directory: %d members selected\n" +msgstr "HHC403I Niet genoeg geheugen\n" -#: panel.c:1046 +#: dasdutil.c:206 #, fuzzy, c-format -msgid "HHCPN004E select: %s\n" -msgstr "HHC760I %4.4X create_thread fout: %s" +msgid "HHCDU001I Updating cyl %d head %d\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: panel.c:1061 +#: dasdutil.c:212 #, fuzzy, c-format -msgid "HHCPN005E keyboard read: %s\n" -msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" +msgid "HHCDU002E %s write track error: stat=%2.2X\n" +msgstr "%d Bytes gelesen von %s\n" -#: panel.c:1925 +#: dasdutil.c:219 #, fuzzy, c-format -msgid "HHCSD001E Device %4.4X already bound to socket %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgid "HHCDU003I Reading cyl %d head %d\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: panel.c:1936 +#: dasdutil.c:225 #, fuzzy, c-format -msgid "HHCSD002E bind_device malloc() failed for device %4.4X\n" -msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" +msgid "HHCDU004E %s read track error: stat=%2.2X\n" +msgstr "%d Bytes gelesen von %s\n" -#: panel.c:1945 -#, fuzzy, c-format -msgid "HHCSD003E bind_device safe_strdup() failed for device %4.4X\n" -msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" +#: dasdutil.c:346 +#, c-format +msgid "HHCDU005I Searching extent %d begin (%d,%d) end (%d,%d)\n" +msgstr "" -#: panel.c:1974 -#, fuzzy, c-format -msgid "HHCSD004I Device %4.4X bound to socket %s\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +#: dasdutil.c:418 +#, c-format +msgid "HHCDU006I Searching extent %d begin (%d,%d) end (%d,%d)\n" +msgstr "" -#: panel.c:1994 +#: dasdutil.c:479 #, fuzzy, c-format -msgid "HHCSD005E Device %4.4X not bound to any socket\n" +msgid "HHCDU007E Track %d not found in extent table\n" msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: panel.c:2003 +#: dasdutil.c:517 #, fuzzy, c-format -msgid "HHCSD006E Client %s (%s) still connected to device %4.4X (%s)\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +msgid "HHCDU008E Cannot obtain storage for device descriptor buffer: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" -#: panel.c:2032 +#: dasdutil.c:576 #, fuzzy, c-format -msgid "HHCSD007I Device %4.4X unbound from socket %s\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: panel.c:2081 -#, c-format -msgid "HHCSD008E Socket pathname \"%s\" exceeds limit of %d\n" -msgstr "" +msgid "HHCDU009E Cannot open %s: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" -#: panel.c:2092 +#: dasdutil.c:591 #, fuzzy, c-format -msgid "HHCSD009E Error creating socket for %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgid "HHCDU010E %s read error: %s\n" +msgstr "%d Bytes gelesen von %s\n" -#: panel.c:2105 +#: dasdutil.c:602 #, fuzzy, c-format -msgid "HHCSD010E Failed to bind or listen on socket %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgid "HHCDU011E %s CKD header invalid\n" +msgstr "%d Bytes gelesen von %s\n" + +#: dasdutil.c:611 +#, c-format +msgid "HHCDU012E DASD table entry not found for devtype 0x%2.2X\n" +msgstr "" -#: panel.c:2155 +#: dasdutil.c:641 #, fuzzy, c-format -msgid "HHCSD011E Failed to determine IP address from %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgid "HHCDU013E CKD initialization failed for %s\n" +msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" -#: panel.c:2173 +#: dasdutil.c:663 #, fuzzy, c-format -msgid "HHCSD012E Failed to determine port number from %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgid "HHCDU014I %s heads=%d trklen=%d\n" +msgstr "%d Bytes gelesen von %s\n" -#: panel.c:2185 +#: dasdutil.c:697 #, fuzzy, c-format -msgid "HHCSD013E Error creating socket for %s: %s\n" +msgid "HHCDU015I Updating cyl %d head %d\n" msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: panel.c:2197 +#: dasdutil.c:703 #, fuzzy, c-format -msgid "HHCSD014E Failed to bind or listen on socket %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgid "HHCDU016E %s write track error: stat=%2.2X\n" +msgstr "%d Bytes gelesen von %s\n" -#: panel.c:2304 -#, c-format -msgid "" -"HHCSD015E Connect to device %4.4X (%s) rejected; device busy or interrupt " -"pending\n" -msgstr "" +#: dasdutil.c:746 +#, fuzzy, c-format +msgid "HHCDU017E Cannot obtain storage for device descriptor buffer: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" -#: panel.c:2315 +#: dasdutil.c:762 #, c-format -msgid "" -"HHCSD016E Connect to device %4.4X (%s) rejected; client %s (%s) still " -"connected\n" +msgid "HHCDU018E DASD table entry not found for devtype 0x%2.2X\n" msgstr "" -#: panel.c:2328 +#: dasdutil.c:789 #, fuzzy, c-format -msgid "HHCSD017E Connect to device %4.4X (%s) failed: %s\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +msgid "HHCDU019E FBA initialization failed for %s\n" +msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" -#: panel.c:2354 +#: dasdutil.c:805 #, fuzzy, c-format -msgid "HHCSD018I %s (%s) connected to device %4.4X (%s)\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +msgid "HHCDU020I %s sectors=%d size=%d\n" +msgstr "%d Bytes gelesen von %s\n" -#: panel.c:2359 -#, fuzzy, c-format -msgid "HHCSD019I <unknown> connected to device %4.4X (%s)\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +#: dasdutil.c:851 +#, fuzzy +msgid "HHCDU021E VOL1 record not found\n" +msgstr "Kann %s nicht öffnen: %s\n" -#: printer.c:40 -#, fuzzy, c-format -msgid "HHCPR004E Error opening file %s: %s\n" -msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" +#: dasdutil.c:864 +#, c-format +msgid "HHCDU022I VOLSER=%s VTOC=%4.4X%4.4X%2.2X\n" +msgstr "" -#: printer.c:56 +#: dasdutil.c:874 +msgid "HHCDU023E F4DSCB record not found\n" +msgstr "" + +#: dasdutil.c:881 #, c-format -msgid "HHCPR005E %4.4X device initialization error: pipe: %s\n" +msgid "HHCDU023I VTOC start %2.2X%2.2X%2.2X%2.2X end %2.2X%2.2X%2.2X%2.2X\n" msgstr "" -#: printer.c:65 +#: dasdutil.c:897 #, c-format -msgid "HHCPR006E %4.4X device initialization error: fork: %s\n" +msgid "HHCDU024E Dataset %s not found in VTOC\n" msgstr "" -#: printer.c:74 +#: dasdutil.c:905 #, c-format -msgid "HHCPR007I pipe receiver (pid=%d) starting for %4.4X\n" +msgid "HHCDU025I DSNAME=%s F1DSCB CCHHR=%4.4X%4.4X%2.2X\n" msgstr "" -#: printer.c:86 +#: dasdutil.c:915 +msgid "HHCDU026E F1DSCB record not found\n" +msgstr "" + +#: dasdutil.c:937 +msgid "HHCDU027E F3DSCB record not found\n" +msgstr "" + +#: dasdutil.c:1160 #, fuzzy, c-format -msgid "HHCPR008E %4.4X dup2 error: %s\n" -msgstr "HHC760I %4.4X create_thread fout: %s" +msgid "HHCDU028E %s open error: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" -#: printer.c:100 +#: dasdutil.c:1188 #, fuzzy, c-format -msgid "HHCPR009E %4.4X dup2 error: %s\n" -msgstr "HHC760I %4.4X create_thread fout: %s" +msgid "HHCDU029E %s device header write error: %s\n" +msgstr "%d Bytes gelesen von %s\n" -#: printer.c:109 +#: dasdutil.c:1216 #, fuzzy, c-format -msgid "HHCPR010E %4.4X dup2 error: %s\n" -msgstr "HHC760I %4.4X create_thread fout: %s" +msgid "HHCDU030E %s compressed device header write error: %s\n" +msgstr "%d Bytes gelesen von %s\n" -#: printer.c:146 -#, c-format -msgid "HHCPR011I pipe receiver (pid=%d) terminating for %4.4X\n" -msgstr "" +#: dasdutil.c:1226 +#, fuzzy, c-format +msgid "HHCDU031E Cannot obtain l1tab buffer: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" -#: printer.c:152 +#: dasdutil.c:1236 #, fuzzy, c-format -msgid "HHCPR012E %4.4X Unable to execute %s: %s\n" -msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" +msgid "HHCDU032E %s primary lookup table write error: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: printer.c:187 +#: dasdutil.c:1251 #, fuzzy, c-format -msgid "HHCPR003E %4.4X Error writing to %s: %s\n" +msgid "HHCDU033E %s secondary lookup table write error: %s\n" msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: printer.c:189 -msgid "incomplete" -msgstr "" +#: dasdutil.c:1265 +#, fuzzy, c-format +msgid "HHCDU034E %s dasdcopy ftruncate error: %s\n" +msgstr "%d Bytes gelesen von %s\n" -#: service.c:496 -#, fuzzy -msgid "HHCCP036E SCP not receiving priority messages\n" -msgstr "HHC703I SCP ontvangt geen prioriteits berichten\n" +#: dasdutil.c:1381 +#, fuzzy, c-format +msgid "HHCDU035E %s cylinder %u head %u write error: %s\n" +msgstr "%d Bytes gelesen von %s\n" -#: service.c:503 -#, fuzzy -msgid "HHCCP037E SCP not receiving commands\n" -msgstr "HHC704I SCP ontvangt geen commando's\n" +#: dasdutil.c:1405 +#, fuzzy, c-format +msgid "HHCDU036E %s compressed device header lseek error: %s\n" +msgstr "%d Bytes gelesen von %s\n" -#: service.c:510 -#, fuzzy -msgid "HHCCP038E No SCP command\n" -msgstr "HHC705I Geen SCP commando\n" +#: dasdutil.c:1413 +#, fuzzy, c-format +msgid "HHCDU037E %s compressed device header write error: %s\n" +msgstr "%d Bytes gelesen von %s\n" -#: service.c:521 -#, fuzzy -msgid "HHCCP039E Service Processor busy\n" -msgstr "%d Geräte bearbeitet\n" +#: dasdutil.c:1425 +#, fuzzy, c-format +msgid "HHCDU038E %s secondary lookup table lseek error: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: dasdutil.c:1433 +#, fuzzy, c-format +msgid "HHCDU039E %s secondary lookup table write error: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: dasdutil.c:1448 +#, fuzzy, c-format +msgid "HHCDU040E %s close error: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" -#: service.c:1228 +#: dasdutil.c:1455 #, c-format -msgid "HHCCP040I CPI: System Type: %s Name: %s Sysplex: %s\n" +msgid "HHCDU041I %u cylinders successfully written to file %s\n" msgstr "" -#: service.c:1232 -msgid "HHC770I Control Program Information:\n" +#: dasdutil.c:1522 +#, c-format +msgid "HHCDU042E Cylinder count %u is outside range %u-%u\n" msgstr "" -#: service.c:1233 +#: dasdutil.c:1531 +#, fuzzy, c-format +msgid "HHCDU043E Cannot obtain track buffer: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: dasdutil.c:1538 #, c-format -msgid "HHC771I System Type = %s\n" +msgid "" +"HHCDU044I Creating %4.4X volume %s: %u cyls, %u trks/cyl, %u bytes/track\n" msgstr "" -#: service.c:1234 +#: dasdutil.c:1643 #, c-format -msgid "HHC772I System Name = %s\n" +msgid "HHCDU045E Sector count %u is outside range %u-%u\n" msgstr "" -#: service.c:1235 +#: dasdutil.c:1652 +#, fuzzy, c-format +msgid "HHCDU046E Cannot obtain sector buffer: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: dasdutil.c:1659 #, c-format -msgid "HHC773I Sysplex Name = %s\n" +msgid "HHCDU047I Creating %4.4X volume %s: %u sectors, %u bytes/sector\n" msgstr "" -#: service.c:1236 +#: dasdutil.c:1671 +#, fuzzy, c-format +msgid "HHCDU048I %s open error: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: dasdutil.c:1683 +#, fuzzy, c-format +msgid "HHCDU049E %s dasdcopy ftruncate error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: dasdutil.c:1718 +#, fuzzy, c-format +msgid "HHCDU050E %s sector %u write error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: dasdutil.c:1730 +#, fuzzy, c-format +msgid "HHCDU051E %s close error: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: dasdutil.c:1740 +#, fuzzy, c-format +msgid "HHCDU052I %u sectors successfully written to file %s\n" +msgstr "Modus umgeschaltef auf %s\n" + +#: dasdutil.c:1782 +#, fuzzy, c-format +msgid "HHCDU053E File size too large: %lld [%d]\n" +msgstr "HHC401I Bestandsnaam \"%2$s\" te lang (maximum=%1$ud)\n" + +#: dasdutil.c:1795 +#, fuzzy, c-format +msgid "HHCDU054E %s open error: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: dasdutil.c:1802 #, c-format -msgid "HHC774I System Level = %16.16llX\n" +msgid "" +"HHCDU055I Creating %4.4X compressed volume %s: %u sectors, %u bytes/sector\n" msgstr "" -#: service.c:1253 +#: dasdutil.c:1812 +#, fuzzy, c-format +msgid "HHCDU056E %s devhdr write error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: dasdutil.c:1835 +#, fuzzy, c-format +msgid "HHCDU057E %s cdevhdr write error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: dasdutil.c:1847 +#, fuzzy, c-format +msgid "HHCDU058E %s l1tab write error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: dasdutil.c:1859 +#, fuzzy, c-format +msgid "HHCDU059E %s l2tab write error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: dasdutil.c:1878 +#, fuzzy, c-format +msgid "HHCDU060E %s block header write error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: dasdutil.c:1885 +#, fuzzy, c-format +msgid "HHCDU061E %s block write error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: dasdutil.c:1900 +#, fuzzy, c-format +msgid "HHCDU062E %s block write error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: dasdutil.c:1914 +#, fuzzy, c-format +msgid "HHCDU063E %s cdevhdr lseek error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: dasdutil.c:1921 +#, fuzzy, c-format +msgid "HHCDU064E %s cdevhdr rewrite error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: dasdutil.c:1930 +#, fuzzy, c-format +msgid "HHCDU065E %s l2tab lseek error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: dasdutil.c:1937 +#, fuzzy, c-format +msgid "HHCDU066E %s l2tab rewrite error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: dasdutil.c:1946 +#, fuzzy, c-format +msgid "HHCDU067E %s close error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: dasdutil.c:1953 #, c-format -msgid "HHC799I Unknown event received type = %2.2X\n" +msgid "HHCDU068I %u sectors successfully written to file %s\n" msgstr "" -#: service.c:1426 -#, fuzzy -msgid "HHCCP041I SYSCONS interface active\n" -msgstr "HHC701I SYSCONS interface actief\n" +#: dyngui.c:201 +#, fuzzy, c-format +msgid "HHCDG003S select failed on input stream: %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" -#: service.c:1428 -#, fuzzy -msgid "HHCCP042I SYSCONS interface inactive\n" -msgstr "HHC702I SYSCONS interface inactief\n" +#: dyngui.c:235 +#, fuzzy, c-format +msgid "HHCDG004S read failed on input stream: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: service.c:1552 +#: dyngui.c:756 #, fuzzy, c-format -msgid "CPU%4.4X: Vector Facility configured offline\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" +msgid "HHCDG005E Device query buffer overflow! (device=%4.4X)\n" +msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" -#: service.c:1583 +#: dyngui.c:862 #, fuzzy, c-format -msgid "CPU%4.4X: Vector Facility configured online\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" +msgid "HHCDG006S malloc pszInputBuff failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: service.c:1600 -#, c-format -msgid "Invalid service call command word:%8.8X SCCB=%8.8X\n" +#: dyngui.c:875 +#, fuzzy, c-format +msgid "HHCDG007S malloc pszCommandBuff failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: dyngui.c:902 +msgid "HHCDG001I dyngui.dll version " msgstr "" -#: sie.c:120 -msgid "SIE: state descriptor " +#: dyngui.c:902 +msgid "-" msgstr "" -#: sie.c:234 -#, c-format -msgid "SIE: zone %d: mso=" +#: dyngui.c:902 +msgid " initiated\n" msgstr "" -#: sie.c:234 -msgid " msl=" +#: dyngui.c:905 +msgid "HHCDG002I dyngui.dll terminated\n" msgstr "" -#: sie.c:535 -#, c-format -msgid "SIE: interception code %d\n" +#: ecpsvm.c:215 ecpsvm.c:220 ecpsvm.c:236 ecpsvm.c:258 ecpsvm.c:259 +#: ecpsvm.c:260 ecpsvm.c:262 +msgid "HHCEV300D : SASSIST " msgstr "" -#: stack.c:593 -msgid "stack: Current stack entry at " +#: ecpsvm.c:215 +#, fuzzy +msgid " ECPS:VM Disabled in configuration\n" +msgstr "CPU%4.4X nicht konfiguriert\n" + +#: ecpsvm.c:220 +msgid " ECPS:VM Disabled by command\n" msgstr "" -#: stack.c:594 stack.c:633 stack.c:945 stack.c:958 stack.c:1022 stack.c:1061 +#: ecpsvm.c:226 +msgid "HHCEV300D : EVMA Disabled by guest\n" +msgstr "" + +#: ecpsvm.c:236 #, c-format -msgid "stack: et=%2.2X si=%2.2X rfs=%2.2X%2.2X nes=%2.2X%2.2X\n" +msgid " Micblok @ %6.6X crosses page frame\n" msgstr "" -#: stack.c:616 -msgid "stack: Forward section header addr " +#: ecpsvm.c:258 +#, c-format +msgid " CR6= %8.8X\n" msgstr "" -#: stack.c:678 stack.c:944 -msgid "stack: New stack entry at " +#: ecpsvm.c:259 +#, c-format +msgid " MICVTMR= %8.8X\n" msgstr "" -#: stack.c:695 stack.c:703 stack.c:1302 stack.c:1310 +#: ecpsvm.c:260 #, c-format -msgid "stack: GPR%d=" +msgid " VPSWA= %8.8X Virtual " msgstr "" -#: stack.c:695 stack.c:703 stack.c:727 stack.c:915 -msgid " stored at V:" +#: ecpsvm.c:262 +msgid " Real " msgstr "" -#: stack.c:696 stack.c:704 stack.c:728 stack.c:751 stack.c:804 stack.c:882 -#: stack.c:916 stack.c:1303 stack.c:1311 stack.c:1348 stack.c:1443 -#: stack.c:1479 -msgid " A:" +#: ecpsvm.c:273 ecpsvm.c:279 +msgid "HHCEV300D : CPASSTS " msgstr "" -#: stack.c:727 stack.c:915 stack.c:1347 +#: ecpsvm.c:273 +msgid " ECPS:VM Disabled in configuration " +msgstr "" + +#: ecpsvm.c:279 +msgid " Disabled by command" +msgstr "" + +#: ecpsvm.c:287 +#, fuzzy +msgid "HHCEV300D : " +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: ecpsvm.c:287 +msgid " called\n" +msgstr "" + +#: ecpsvm.c:359 +msgid "HHCEV300D : LKPG coreptr = " +msgstr "" + +#: ecpsvm.c:359 +msgid " Frame = " +msgstr "" + +#: ecpsvm.c:362 #, c-format -msgid "stack: AR%d=" +msgid "HHCEV300D : LKPG corete = %6.6X\n" msgstr "" -#: stack.c:749 +#: ecpsvm.c:376 #, c-format -msgid "" -"stack: PKM=%2.2X%2.2X SASN=%2.2X%2.2X EAX=%2.2X%2.2X PASN=%2.2X%2.2X \n" -"stored at V:" +msgid "HHCEV300D : LKPG Page locked. Count = %6.6X\n" msgstr "" -#: stack.c:803 +#: ecpsvm.c:393 #, c-format -msgid "stack: PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X stored at V:" +msgid "HHCEV300D : LKPG PAGE=%6.6X, PTRPL=%6.6X\n" msgstr "" -#: stack.c:881 +#: ecpsvm.c:420 #, c-format -msgid "stack: PSW2=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X stored at V:" +msgid "HHCEV300D : ULKPG PAGE=%6.6X, PTRPL=%6.6X\n" msgstr "" -#: stack.c:956 -msgid "stack: Previous stack entry updated at A:" +#: ecpsvm.c:426 +#, c-format +msgid "HHCEV300D : ULKPG Page beyond core size of %6.6X\n" msgstr "" -#: stack.c:967 stack.c:1532 -msgid "stack: CR15=" +#: ecpsvm.c:438 +msgid "HHCEV300D : ULKPG Attempting to unlock page that is not locked\n" msgstr "" -#: stack.c:1021 stack.c:1045 -msgid "stack: Stack entry located at " +#: ecpsvm.c:445 +msgid "HHCEV300D : ULKPG now unlocked\n" msgstr "" -#: stack.c:1277 +#: ecpsvm.c:449 #, c-format -msgid "stack: Unstacking registers %d-%d from " +msgid "HHCEV300D : ULKPG Page still locked. Count = %6.6X\n" msgstr "" -#: stack.c:1302 stack.c:1310 stack.c:1347 -msgid " loaded from V:" +#: ecpsvm.c:485 +#, c-format +msgid "HHCEV300D SCNVU Virtual Device %4.4X has no VCHAN block\n" msgstr "" -#: stack.c:1441 +#: ecpsvm.c:493 #, c-format -msgid "" -"stack: PKM=%2.2X%2.2X SASN=%2.2X%2.2X EAX=%2.2X%2.2X PASN=%2.2X%2.2X \n" -"loaded from V:" +msgid "HHCEV300D SCNVU Virtual Device %4.4X has no VCU block\n" msgstr "" -#: stack.c:1478 +#: ecpsvm.c:501 #, c-format -msgid "stack: PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X loaded from V:" +msgid "HHCEV300D SCNVU Virtual Device %4.4X has no VDEV block\n" msgstr "" -#: tapedev.c:281 -#, fuzzy, c-format -msgid "HHCTA001E Error opening %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +#: ecpsvm.c:505 +#, c-format +msgid "HHCEV300D SCNVU %4.4X : VCH = %8.8X, VCU = %8.8X, VDEV = %8.8X\n" +msgstr "" -#: tapedev.c:314 -#, fuzzy, c-format -msgid "HHCTA002E Error seeking to offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: ecpsvm.c:866 +msgid "HHCEV004W : Abend condition detected in DISP2 instr\n" +msgstr "" -#: tapedev.c:330 -#, fuzzy, c-format -msgid "HHCTA003E Error reading block header at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: ecpsvm.c:1058 +#, c-format +msgid "HHCPEV300D : DISP2 - Next Instruction : %2.2X\n" +msgstr "" -#: tapedev.c:343 +#: ecpsvm.c:1123 #, c-format -msgid "" -"HHCTA004E End of file (uninitialized tape) at offset %8.8lX in file %s\n" +msgid "HHCEV300D : Tranbring : LRA cc = %d\n" msgstr "" -#: tapedev.c:356 -#, fuzzy, c-format -msgid "" -"HHCTA005E Unexpected end of file in block header at offset %8.8lX in file %" -"s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +#: ecpsvm.c:1132 +#, c-format +msgid "HHCEV300D : Page not shared - OK %d\n" +msgstr "" -#: tapedev.c:416 -#, fuzzy, c-format -msgid "HHCTA006E Error reading data block at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: ecpsvm.c:1138 +msgid "HHCEV300D : Checking 2K Storage keys @" +msgstr "" -#: tapedev.c:429 -#, fuzzy, c-format -msgid "" -"HHCTA007E Unexpected end of file in data block at offset %8.8lX in file %s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +#: ecpsvm.c:1138 +msgid " & " +msgstr "" -#: tapedev.c:484 -#, fuzzy, c-format -msgid "HHCTA008E Error seeking to offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: ecpsvm.c:1143 +msgid "HHCEV300D : Checking 4K Storage keys @" +msgstr "" -#: tapedev.c:507 -#, fuzzy, c-format -msgid "HHCTA009E Error writing block header at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: ecpsvm.c:1147 +msgid "HHCEV300D : Page shared and changed\n" +msgstr "" -#: tapedev.c:526 -#, fuzzy, c-format -msgid "HHCTA010E Error writing data block at offset %8.8lX in file %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: ecpsvm.c:1150 +msgid "HHCEV300D : Page shared but not changed\n" +msgstr "" -#: tapedev.c:578 -#, fuzzy, c-format -msgid "HHCTA011E Error seeking to offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: ecpsvm.c:1169 +msgid "HHCEV300D : TRANBRNG\n" +msgstr "" -#: tapedev.c:601 -#, fuzzy, c-format -msgid "HHCTA012E Error writing block header at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: ecpsvm.c:1173 +msgid "HHCEV300D : TRANBRNG - Back to CP\n" +msgstr "" -#: tapedev.c:830 -#, fuzzy, c-format -msgid "HHCTA013E Error opening %s: %s(%s)\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +#: ecpsvm.c:1191 +msgid "HHCEV300D : TRANLOCK\n" +msgstr "" + +#: ecpsvm.c:1195 +msgid "HHCEV300D : TRANLOCK - Back to CP\n" +msgstr "" -#: tapedev.c:891 +#: ecpsvm.c:1708 #, c-format -msgid "HHCTA014E End of file (uninitialized tape) at block %8.8X in file %s\n" +msgid "HHCEV300D : ECPS:VM SCNRU called; RDEV=%4.4X ARIOCT=%6.6X\n" msgstr "" -#: tapedev.c:901 -#, fuzzy, c-format -msgid "HHCTA015E Error reading data block at block %8.8X in file %s: %s(%s)\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: ecpsvm.c:1782 +#, c-format +msgid "HHCEV300D : ECPS:VM SCNRU : RCH = %6.6X, RCU = %6.6X, RDV = %6.6X\n" +msgstr "" -#: tapedev.c:933 +#: ecpsvm.c:1826 #, c-format -msgid "HHCTA016E Error writing data block at block %8.8X in file %s: %s(%s)\n" +msgid "HHCEV300D : ECPS:VM STORE LEVEL %d called\n" msgstr "" -#: tapedev.c:964 -#, fuzzy, c-format -msgid "HHCTA017E Error writing tape mark at block %8.8X in file %s: %s(%s)\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: ecpsvm.c:1866 +#, c-format +msgid "HHCEV300D : ECPS:VM FREEX DW = %4.4X\n" +msgstr "" -#: tapedev.c:1004 -#, fuzzy, c-format -msgid "HHCTA018E Error forward spacing at block %8.8X in file %s: %s(%s)\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: ecpsvm.c:1871 +#, c-format +msgid "HHCEV300D : MAXSIZE ADDR = %6.6X, SUBPOOL INDEX TABLE = %6.6X\n" +msgstr "" -#: tapedev.c:1055 -#, fuzzy, c-format -msgid "HHCTA019E Error reading data block at block %8.8X in file %s: %s(%s)\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: ecpsvm.c:1878 +msgid "HHCEV300D : FREEX request beyond subpool capacity\n" +msgstr "" -#: tapedev.c:1088 -#, fuzzy, c-format -msgid "" -"HHCTA020E Error forward spacing to next file at block %8.8X in file %s: %s(%" -"s)\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: ecpsvm.c:1883 +#, c-format +msgid "HHCEV300D : Subpool index = %X\n" +msgstr "" + +#: ecpsvm.c:1886 +#, c-format +msgid "HHCEV300D : Value in subpool table = %6.6X\n" +msgstr "" + +#: ecpsvm.c:1894 +#, c-format +msgid "HHCEV300D : New Value in subpool table = %6.6X\n" +msgstr "" + +#: ecpsvm.c:1924 +#, c-format +msgid "HHCEV300D : X fretx called AREA=%6.6X, DW=%4.4X\n" +msgstr "" -#: tapedev.c:1128 +#: ecpsvm.c:1927 +msgid "HHCEV300D : ECPS:VM Cannot FRETX : DWORDS = 0\n" +msgstr "" + +#: ecpsvm.c:1933 #, c-format +msgid "HHCEV300D : ECPS:VM Cannot FRETX : DWORDS = %d > MAXDW %d\n" +msgstr "" + +#: ecpsvm.c:1940 +msgid "HHCEV300D : ECPS:VM Cannot FRETX : Area not in Core Free area\n" +msgstr "" + +#: ecpsvm.c:1945 +msgid "HHCEV300D : ECPS:VM Cannot FRETX : Area flag != 0x02\n" +msgstr "" + +#: ecpsvm.c:1952 msgid "" -"HHCTA021E Error back spacing to previous file at block %8.8X in file %s:\n" -" %s(%s)\n" +"HHCEV300D : ECPS:VM Cannot FRETX : fretted block already on subpool chain\n" msgstr "" -#: tapedev.c:1166 -#, fuzzy, c-format -msgid "HHCTA022E Error reading status of %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: ecpsvm.c:2018 +msgid "HHCEV300D : New and Old PSW have a EC/BC transition\n" +msgstr "" -#: tapedev.c:1235 -#, fuzzy, c-format -msgid "HHCTA024E Error opening %s: %s\n" -msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" +#: ecpsvm.c:2026 +msgid "HHCEV300D : New PSW Enables DAT or PER\n" +msgstr "" -#: tapedev.c:1252 -#, fuzzy, c-format -msgid "HHCTA025E Error reading status of %s: %s\n" -msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: ecpsvm.c:2037 +msgid "HHCEV300D : New PSW Enables interrupts and MICPEND (EC)\n" +msgstr "" -#: tapedev.c:1274 -#, fuzzy, c-format -msgid "HHCTA026I %s device type: %s\n" -msgstr "%d Geräte bearbeitet\n" +#: ecpsvm.c:2045 +msgid "HHCEV300D : New PSW Enables interrupts and MICPEND (BC)\n" +msgstr "" -#: tapedev.c:1277 -#, fuzzy, c-format -msgid "HHCTA027I %s device type: 0x%lX\n" -msgstr "%d Geräte bearbeitet\n" +#: ecpsvm.c:2052 +msgid "HHCEV300D : New PSW is a WAIT PSW\n" +msgstr "" -#: tapedev.c:1287 -#, fuzzy, c-format -msgid "HHCTA028I %s tape density: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +#: ecpsvm.c:2059 +msgid "HHCEV300D : New PSW sysmask incorrect\n" +msgstr "" + +#: ecpsvm.c:2065 +msgid "HHCEV300D : New PSW has ODD IA\n" +msgstr "" -#: tapedev.c:1290 +#: ecpsvm.c:2602 ecpsvm.c:2619 #, c-format -msgid "HHCTA029I %s tape density code: 0x%lX\n" +msgid "HHCEV001I | %-9s | %8d | %8d | %3d%% |\n" +msgstr "" + +#: ecpsvm.c:2629 +#, c-format +msgid "HHCEV004I * : Unsupported, - : Disabled, %% - Debug\n" +msgstr "" + +#: ecpsvm.c:2633 +#, c-format +msgid "HHCEV005I %d Entr%s not shown (never invoked)\n" +msgstr "" + +#: ecpsvm.c:2639 +msgid "HHCEV006I 1 call was made to an unsupported function\n" +msgstr "" + +#: ecpsvm.c:2643 +#, c-format +msgid "HHCEV006I %d calls where made to unsupported functions\n" +msgstr "" + +#: ecpsvm.c:2658 ecpsvm.c:2667 +#, c-format +msgid "HHCEV002I | %-9s | %-8s | %-8s | %-5s |\n" msgstr "" -#: tapedev.c:1299 +#: ecpsvm.c:2685 #, fuzzy, c-format -msgid "HHCTA030E Error setting attributes for %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgid "HHCEV010I : %s : %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: ecpsvm.c:2700 +#, c-format +msgid "HHCEV011E Unknown subcommand %s - valid subcommands are :\n" +msgstr "" + +#: ecpsvm.c:2704 +#, c-format +msgid "HHCEV012I : %s : %s" +msgstr "" + +#: ecpsvm.c:2752 +#, c-format +msgid "HHCEV015I ECPS:VM %s feature %s %s\n" +msgstr "" + +#: ecpsvm.c:2757 +#, c-format +msgid "HHCEV015I ECPS:VM %s feature %s Debug %s\n" +msgstr "" + +#: ecpsvm.c:2762 +#, c-format +msgid "HHCEV016I All ECPS:VM %s features %s\n" +msgstr "" + +#: ecpsvm.c:2766 +#, c-format +msgid "HHCEV016I All ECPS:VM %s features Debug %s\n" +msgstr "" + +#: ecpsvm.c:2794 +#, c-format +msgid "HHCEV013I ECPS:VM Global Debug %s\n" +msgstr "" + +#: ecpsvm.c:2822 +#, c-format +msgid "HHCEV014I ECPS:VM %s feature %s %s\n" +msgstr "" + +#: ecpsvm.c:2827 +#, c-format +msgid "HHCEV014I ECPS:VM %s feature %s Debug %s\n" +msgstr "" + +#: ecpsvm.c:2832 +#, c-format +msgid "HHCEV014I Unknown ECPS:VM feature %s; Ignored\n" +msgstr "" + +#: ecpsvm.c:2859 ecpsvm.c:2863 +#, c-format +msgid "HHCEV016I Current reported ECPS:VM Level is %d\n" +msgstr "" + +#: ecpsvm.c:2864 +msgid "HHCEV017I But ECPS:VM is currently disabled\n" +msgstr "" + +#: ecpsvm.c:2869 +#, c-format +msgid "HHCEV016I Level reported to guest program is now %d\n" +msgstr "" + +#: ecpsvm.c:2874 +#, c-format +msgid "HHCEV017W WARNING ! current level (%d) is not supported\n" +msgstr "" + +#: ecpsvm.c:2875 +msgid "HHCEV018W WARNING ! Unpredictable results may occur\n" +msgstr "" + +#: ecpsvm.c:2876 +msgid "HHCEV019I The microcode support level is 20\n" +msgstr "" + +#: ecpsvm.c:2915 +msgid "HHCEV011I ECPS:VM Command processor invoked\n" +msgstr "" + +#: ecpsvm.c:2918 +msgid "" +"HHCEV008E NO EVM subcommand. Type \"evm help\" for a list of valid " +"subcommands\n" +msgstr "" + +#: ecpsvm.c:2924 +#, c-format +msgid "HHCEV008E Unknown EVM subcommand %s\n" +msgstr "" + +#: ecpsvm.c:2928 +msgid "HHCEV011I ECPS:VM Command processor complete\n" +msgstr "" + +#: external.c:257 +msgid "HHCCP023I External interrupt: Interrupt key\n" +msgstr "" + +#: external.c:370 +msgid "HHCCP024I External interrupt: Clock comparator\n" +msgstr "" + +#: external.c:381 +#, c-format +msgid "HHCCP025I External interrupt: CPU timer=%16.16llX\n" +msgstr "" -#: tapedev.c:1313 +#: external.c:412 +msgid "HHCCP026I External interrupt: Interval timer\n" +msgstr "" + +#: fbadasd.c:73 +#, fuzzy +msgid "HHCDA056E File name missing or invalid\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: fbadasd.c:89 #, fuzzy, c-format -msgid "HHCTA031E Error rewinding %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgid "HHCDA057E %4.4X:File not found or invalid\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" -#: tapedev.c:1342 +#: fbadasd.c:104 #, fuzzy, c-format -msgid "HHCTA032E Error reading data block from %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgid "HHCDA058E File %s open error: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" -#: tapedev.c:1376 +#: fbadasd.c:116 #, fuzzy, c-format -msgid "HHCTA033E Error writing data block to %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgid "HHCDA059E Read error in file %s: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: tapedev.c:1408 +#: fbadasd.c:119 #, fuzzy, c-format -msgid "HHCTA034E Error writing tapemark to %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgid "HHCDA060E Unexpected end of file in %s\n" +msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" -#: tapedev.c:1458 +#: fbadasd.c:137 #, fuzzy, c-format -msgid "HHCTA035E Forward space block error on %s: %s\n" +msgid "HHCDA061E Read error in file %s: %s\n" msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: tapedev.c:1524 +#: fbadasd.c:140 #, fuzzy, c-format -msgid "HHCTA036E Backspace block error on %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgid "HHCDA062E Unexpected end of file in %s\n" +msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" -#: tapedev.c:1559 +#: fbadasd.c:182 #, fuzzy, c-format -msgid "HHCTA037E Forward space file error on %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgid "HHCDA063E parameter %d is invalid: %s\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" -#: tapedev.c:1595 +#: fbadasd.c:195 #, fuzzy, c-format -msgid "HHCTA038E Backspace file error on %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgid "HHCDA064E File %s fstat error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: fbadasd.c:207 +#, fuzzy, c-format +msgid "HHCDA082E File %s IOCTL BLKGETSIZE error: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: fbadasd.c:237 +#, fuzzy, c-format +msgid "HHCDA065E Invalid device origin block number %s\n" +msgstr "Ongeldig apparaat nummer\n" + +#: fbadasd.c:253 +#, fuzzy, c-format +msgid "HHCDA066E Invalid device block count %s\n" +msgstr "Ongeldige waarde: %s\n" -#: tapedev.c:1649 +#: fbadasd.c:264 #, c-format -msgid "" -"HHC232I Invalid filename %s: TDF files must be in the TAPES subdirectory\n" +msgid "HHCDA067I %s origin=%d blks=%d\n" msgstr "" -#: tapedev.c:1661 +#: fbadasd.c:274 #, fuzzy, c-format -msgid "HHCTA039E Error opening TDF file %s: %s\n" -msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" +msgid "HHCDA068E %4.4X device type %4.4X not found in dasd table\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: tapedev.c:1670 +#: fbadasd.c:499 #, fuzzy, c-format -msgid "HHCTA040E %s fstat error: %s\n" -msgstr "%d Bytes gelesen von %s\n" +msgid "HHCDA069E error writing blkgrp %d: lseek error: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: tapedev.c:1681 +#: fbadasd.c:517 #, fuzzy, c-format -msgid "HHCTA041E Cannot obtain buffer for TDF file %s: %s\n" -msgstr "Kann %s nicht öffnen: %s\n" +msgid "HHCDA070E error writing blkgrp %d: write error: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: tapedev.c:1691 -#, fuzzy, c-format -msgid "HHCTA042E Error reading TDF file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: fbadasd.c:558 +#, c-format +msgid "HHCDA071I read blkgrp %d cache hit, using cache[%d]\n" +msgstr "" -#: tapedev.c:1704 +#: fbadasd.c:583 #, c-format -msgid "HHCTA043E %s is not a valid TDF file\n" +msgid "HHCDA072I read blkgrp %d no available cache entry, waiting\n" +msgstr "" + +#: fbadasd.c:591 +#, c-format +msgid "HHCDA073I read blkgrp %d cache miss, using cache[%d]\n" msgstr "" -#: tapedev.c:1721 +#: fbadasd.c:607 #, fuzzy, c-format -msgid "HHCTA044E Cannot obtain buffer for TDF array: %s\n" -msgstr "Kann %s nicht öffnen: %s\n" +msgid "HHCDA074I read blkgrp %d offset %lld len %d\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: tapedev.c:1762 +#: fbadasd.c:615 #, fuzzy, c-format -msgid "HHCTA045E Filename or format missing in line %d of file %s\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgid "HHCDA075E error reading blkgrp %d: lseek error: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: tapedev.c:1774 +#: fbadasd.c:630 #, fuzzy, c-format -msgid "HHCTA046E Filename %s too long in line %d of file %s\n" -msgstr "HHC401I Bestandsnaam \"%2$s\" te lang (maximum=%1$ud)\n" +msgid "HHCDA076E error reading blkgrp %d: read error: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: tapedev.c:1826 +#: fbadasd.c:1058 #, c-format -msgid "HHCTA047E RECSIZE keyword missing in line %d of file %s\n" +msgid "HHCDA077I Positioning to %8.8llX (%llu)\n" msgstr "" -#: tapedev.c:1839 +#: fbadasd.c:1076 #, c-format -msgid "HHCTA048E Invalid record size %s in line %d of file %s\n" +msgid "HHCDA078E define extent data too short: %d bytes\n" +msgstr "" + +#: fbadasd.c:1086 +msgid "HHCDA079E second define extent in chain\n" +msgstr "" + +#: fbadasd.c:1097 +#, fuzzy, c-format +msgid "HHCDA080E invalid file mask %2.2X\n" +msgstr "Ongeldig apparaat nummer\n" + +#: fbadasd.c:1138 +#, fuzzy, c-format +msgid "HHCDA081E invalid extent: first block %d, last block %d,\n" +msgstr "HHC422I Optie %s niet geldig\n" + +#: fbadasd.c:1140 +#, c-format +msgid " numblks %d, device size %d\n" +msgstr " Blöcke: %d, Gesamtgröße %d\n" + +#: general1.c:3226 +msgid "MVCL destructive overlap: " msgstr "" -#: tapedev.c:1853 +#: hdl.c:380 #, c-format -msgid "HHCTA049E Invalid record format %s in line %d of file %s\n" +msgid "HHCHD010I Dependency check failed for %s, version(%s) expected(%s)\n" msgstr "" -#: tapedev.c:1902 +#: hdl.c:387 #, c-format -msgid "HHCTA050E Attempt to access beyond end of tape %s\n" +msgid "HHCHD011I Dependency check failed for %s, size(%d) expected(%d)\n" msgstr "" -#: tapedev.c:1919 +#: hdl.c:429 #, fuzzy, c-format -msgid "HHCTA051E Error opening %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgid "HHCHD001E registration malloc failed for %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: hdl.c:545 +#, fuzzy, c-format +msgid "HHCHD002E cannot allocate memory for DLL descriptor: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: hdl.c:559 +#, fuzzy, c-format +msgid "HHCHD003E unable to open hercules as DLL: %s\n" +msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" + +#: hdl.c:568 +#, fuzzy, c-format +msgid "HHCHD012E No depency section in %s: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: hdl.c:640 +#, fuzzy, c-format +msgid "HHCHD005E %s already loaded\n" +msgstr "%d Bytes gelesen von %s\n" + +#: hdl.c:647 +#, c-format +msgid "HHCHD006S cannot allocate memory for DLL descriptor: %s\n" +msgstr "" + +#: hdl.c:657 +#, fuzzy, c-format +msgid "HHCHD007E unable to open DLL %s: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: hdl.c:667 +#, fuzzy, c-format +msgid "HHCHD013E No dependency section in %s: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: hdl.c:678 +#, fuzzy, c-format +msgid "HHCHD016E DLL %s is duplicate of %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: hdl.c:705 +#, c-format +msgid "HHCHD014E Dependency check failed for module %s\n" +msgstr "" + +#: hdl.c:772 +#, c-format +msgid "HHCHD015E Unloading of %s not allowed\n" +msgstr "" + +#: hdl.c:782 +#, fuzzy, c-format +msgid "HHCHD008E Device %4.4X bound to %s\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: hdl.c:794 +#, c-format +msgid "HHCHD017E Unload of %s rejected by final section\n" +msgstr "" + +#: hdl.c:854 +#, fuzzy, c-format +msgid "HHCHD009E %s not found\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: hercifc.c:59 +#, c-format +msgid "HHCIF001E %s: Must be called from within Hercules.\n" +msgstr "" + +#: hercifc.c:70 +#, fuzzy, c-format +msgid "HHCIF002E %s: Cannot obtain socket: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: hercifc.c:85 +#, fuzzy, c-format +msgid "HHCIF003E %s: I/O error on read: %s.\n" +msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" + +#: hercifc.c:162 +#, c-format +msgid "HHCIF004W %s: Unknown request: %8.8X.\n" +msgstr "" + +#: hercifc.c:175 +#, fuzzy, c-format +msgid "HHCIF005E %s: ioctl error doing %s on %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: hostinfo.c:64 +#, c-format +msgid "Running on %s %s%s %s %s\n" +msgstr "Draaiend op %s %s%s %s %s\n" + +#: hsccmd.c:65 +msgid "HHCIN099I Hercules terminated\n" +msgstr "" + +#: hsccmd.c:115 +#, fuzzy +msgid "HHCPN015E Invalid device number\n" +msgstr "Ongeldig apparaat nummer\n" + +#: hsccmd.c:121 +#, c-format +msgid "HHCPN016E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:129 +#, c-format +msgid "HHCPN017E Device %4.4X is not a printer device\n" +msgstr "" + +#: hsccmd.c:143 +#, c-format +msgid "HHCPN018I Printer %4.4X started\n" +msgstr "" + +#: hsccmd.c:145 +#, c-format +msgid "HHCPN019E Printer %4.4X not started: busy or interrupt pending\n" +msgstr "" + +#: hsccmd.c:148 +#, c-format +msgid "HHCPN020E Printer %4.4X not started: attention request rejected\n" +msgstr "" + +#: hsccmd.c:151 +#, c-format +msgid "HHCPN021E Printer %4.4X not started: subchannel not enabled\n" +msgstr "" + +#: hsccmd.c:207 +#, fuzzy +msgid "HHCPN022E Invalid device number\n" +msgstr "Ongeldig apparaat nummer\n" + +#: hsccmd.c:213 +#, c-format +msgid "HHCPN023E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:221 +#, c-format +msgid "HHCPN024E Device %4.4X is not a printer device\n" +msgstr "" + +#: hsccmd.c:228 +#, c-format +msgid "HHCPN025I Printer %4.4X stopped\n" +msgstr "" + +#: hsccmd.c:296 +msgid "HHCPN026W Ignored. (external GUI active)\n" +msgstr "" + +#: hsccmd.c:301 +#, c-format +msgid "HHCPN027I Automatic refresh %s.\n" +msgstr "" + +#: hsccmd.c:302 +msgid "disabled" +msgstr "" + +#: hsccmd.c:302 +msgid "enabled" +msgstr "" + +#: hsccmd.c:317 +#, c-format +msgid "HHCPN028I tod = %16.16llX\n" +msgstr "" + +#: hsccmd.c:350 +#, fuzzy, c-format +msgid "HHCPN029E Invalid I/O delay value: %s\n" +msgstr "Ongeldige waarde: %s\n" + +#: hsccmd.c:355 +#, c-format +msgid "HHCPN030I I/O delay = %d\n" +msgstr "" + +#: hsccmd.c:391 +#, fuzzy +msgid "HHCPN031E Missing device number\n" +msgstr "Geen apparaat nummer\n" + +#: hsccmd.c:397 +#, fuzzy, c-format +msgid "HHCPN032E Device number %s is invalid\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: hsccmd.c:404 +#, fuzzy, c-format +msgid "HHCPN033E Device number %4.4X not found\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: hsccmd.c:410 +#, fuzzy, c-format +msgid "HHCPN034E Device %4.4X is not a CTCI or LCS device\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: hsccmd.c:419 +msgid "(error)\n" +msgstr "" + +#: hsccmd.c:442 +msgid "HHCPN035E store status rejected: CPU not stopped\n" +msgstr "" + +#: hsccmd.c:471 +#, c-format +msgid "HHCPN036I TOD clock drag factor = %d\n" +msgstr "" + +#: hsccmd.c:504 +#, c-format +msgid "HHCPN037I Panel refresh rate = %d millisecond(s)\n" +msgstr "" + +#: hsccmd.c:620 +#, fuzzy +msgid "HHCPN038I Restart key depressed\n" +msgstr "Restart key ingedrukt\n" + +#: hsccmd.c:693 +#, fuzzy +msgid "HHCPN039E Missing argument\n" +msgstr "Geen apparaat nummer\n" + +#: hsccmd.c:699 +#, c-format +msgid "HHCPN040I Setting breakpoint at %16.16llX\n" +msgstr "" + +#: hsccmd.c:717 +msgid "HHCPN041I Deleting breakpoint\n" +msgstr "" + +#: hsccmd.c:739 +#, fuzzy +msgid "HHCPN042E Missing device number\n" +msgstr "Geen apparaat nummer\n" + +#: hsccmd.c:745 +#, fuzzy, c-format +msgid "HHCPN043E Device number %s is invalid\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: hsccmd.c:751 +#, c-format +msgid "HHCPN044E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:758 +#, fuzzy, c-format +msgid "HHCPN045I Device %4.4X attention request raised\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: hsccmd.c:761 +#, c-format +msgid "HHCPN046E Device %4.4X busy or interrupt pending\n" +msgstr "" + +#: hsccmd.c:764 +#, c-format +msgid "HHCPN047E Device %4.4X attention request rejected\n" +msgstr "" + +#: hsccmd.c:767 +#, c-format +msgid "HHCPN048E Device %4.4X subchannel not enabled\n" +msgstr "" + +#: hsccmd.c:773 +#, c-format +msgid "HHCPN049W Are you sure you didn't mean 'ipl %4.4X' instead?\n" +msgstr "" + +#: hsccmd.c:792 +#, fuzzy +msgid "HHCPN050I Interrupt key depressed\n" +msgstr "Restart key ingedrukt\n" + +#: hsccmd.c:828 +#, c-format +msgid "HHCPN051I LOADPARM=%c%c%c%c%c%c%c%c\n" +msgstr "" + +#: hsccmd.c:855 +#, fuzzy +msgid "HHCPN052E Missing device number\n" +msgstr "Geen apparaat nummer\n" + +#: hsccmd.c:863 +msgid "HHCPN053E ipl rejected: All CPU's must be stopped\n" +msgstr "" + +#: hsccmd.c:889 +#, fuzzy +msgid "HHCPN054E Missing argument\n" +msgstr "Geen apparaat nummer\n" + +#: hsccmd.c:895 +#, c-format +msgid "HHCPN055E Target CPU %s is invalid\n" +msgstr "" + +#: hsccmd.c:906 +#, fuzzy, c-format +msgid "HHCPN056E CPU%4.4X not configured\n" +msgstr "CPU%4.4X nicht konfiguriert\n" + +#: hsccmd.c:970 +#, fuzzy, c-format +msgid "HHCPN146E Work buffer malloc failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: hsccmd.c:1016 +msgid "open " +msgstr "" + +#: hsccmd.c:1017 +msgid "busy " +msgstr "" + +#: hsccmd.c:1018 +msgid "pending " +msgstr "" + +#: hsccmd.c:1029 +#, c-format +msgid " (client %s (%s) connected)\n" +msgstr " (verbunden mit %s (%s))\n" + +#: hsccmd.c:1035 +msgid " (no one currently connected)\n" +msgstr " (zur Zeit keine Verbindung)\n" + +#: hsccmd.c:1047 +#, c-format +msgid "HHCPN147W Warning: not all devices shown (max %d)\n" +msgstr "" + +#: hsccmd.c:1068 +#, fuzzy +msgid "HHCPN057E Missing argument(s)\n" +msgstr "Geen apparaat nummer\n" + +#: hsccmd.c:1074 +#, fuzzy, c-format +msgid "HHCPN059E Device number %s is invalid\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: hsccmd.c:1081 +#, fuzzy, c-format +msgid "Device type %s is invalid\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: hsccmd.c:1101 +#, fuzzy +msgid "HHCPN060E Missing device number\n" +msgstr "Geen apparaat nummer\n" + +#: hsccmd.c:1107 +#, fuzzy, c-format +msgid "HHCPN061E Device number %s is invalid\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: hsccmd.c:1126 +#, fuzzy +msgid "HHCPN062E Missing argument(s)\n" +msgstr "Geen apparaat nummer\n" + +#: hsccmd.c:1132 +#, fuzzy, c-format +msgid "HHCPN063E Device number %s is invalid\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: hsccmd.c:1138 +#, fuzzy, c-format +msgid "HHCPN064E Device number %s is invalid\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: hsccmd.c:1157 +#, fuzzy +msgid "HHCPN065E Missing argument(s)\n" +msgstr "Geen apparaat nummer\n" + +#: hsccmd.c:1163 +#, c-format +msgid "HHCPN066E Program interrupt number %s is invalid\n" +msgstr "" + +#: hsccmd.c:1170 +#, c-format +msgid "HHCPN067E Program interrupt number out of range (%4.4X)\n" +msgstr "" + +#: hsccmd.c:1212 +#, fuzzy +msgid "HHCPN069E Missing device number\n" +msgstr "Geen apparaat nummer\n" + +#: hsccmd.c:1218 +#, fuzzy, c-format +msgid "HHCPN070E Device number %s is invalid\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: hsccmd.c:1224 +#, c-format +msgid "HHCPN071E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:1253 +#, fuzzy, c-format +msgid "HHCPN072I %4.4X synchronous: %12lld asynchronous: %12lld\n" +msgstr "%4.4X synchron: %12lld asynchron: %12lld\n" + +#: hsccmd.c:1264 +msgid "HHCPN073I No synchronous I/O devices found\n" +msgstr "" + +#: hsccmd.c:1266 +#, fuzzy, c-format +msgid "HHCPN074I TOTAL synchronous: %12lld asynchronous: %12lld %3lld%%\n" +msgstr "%4.4X synchron: %12lld asynchron: %12lld\n" + +#: hsccmd.c:1305 +#, fuzzy +msgid "HHCPN075E Invalid max device threads value (must be -1 to n)\n" +msgstr "Ongeldig apparaat nummer\n" + +#: hsccmd.c:1312 +#, c-format +msgid "" +"HHCPN076I Max device threads: %d, current: %d, most: %d, waiting: %d, max " +"exceeded: %d\n" +msgstr "" + +#: hsccmd.c:1333 +msgid "HHCPN077E Invalid max device threads value (must be -1 to n)\n" +msgstr "" + +#: hsccmd.c:1347 +#, c-format +msgid "" +"HHCPN078E Max device threads %d current %d most %d waiting %d total I/Os " +"queued %d\n" +msgstr "" + +#: hsccmd.c:1381 +#, fuzzy +msgid "HHCPN079E Missing device number\n" +msgstr "Geen apparaat nummer\n" + +#: hsccmd.c:1388 +#, fuzzy +msgid "HHCPN080E Invalid device number\n" +msgstr "Ongeldig apparaat nummer\n" + +#: hsccmd.c:1395 +#, fuzzy +msgid "HHCPN081E No cckd devices found\n" +msgstr "%d Geräte bearbeitet\n" + +#: hsccmd.c:1404 +#, fuzzy +msgid "HHCPN082E Invalid device number\n" +msgstr "Ongeldig apparaat nummer\n" + +#: hsccmd.c:1410 +#, c-format +msgid "HHCPN083E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:1416 +#, c-format +msgid "HHCPN084E Device number %4.4X is not a cckd device\n" +msgstr "" + +#: hsccmd.c:1427 +#, fuzzy, c-format +msgid "HHCPN085I Processing device %4.4X\n" +msgstr "Geen apparaat nummer\n" + +#: hsccmd.c:1433 +#, fuzzy, c-format +msgid "HHCPN086E Unexpected operand: %s\n" +msgstr "Ongeldig operand: %s\n" + +#: hsccmd.c:1447 +msgid "HHCPN087E Operand must be `merge' or `nomerge'\n" +msgstr "" + +#: hsccmd.c:1456 +msgid "HHCPN088E Shadow file name not specified\n" +msgstr "" + +#: hsccmd.c:1462 +#, fuzzy, c-format +msgid "HHCPN089E Unexpected operand: %s\n" +msgstr "Ongeldig operand: %s\n" + +#: hsccmd.c:1471 +#, fuzzy, c-format +msgid "HHCPN090E Unexpected operand: %s\n" +msgstr "Ongeldig operand: %s\n" + +#: hsccmd.c:1478 +msgid "HHCPN091E Command must be `sf+', `sf-', `sf=', `sfc', or `sfd'\n" +msgstr "" + +#: hsccmd.c:1492 +#, fuzzy, c-format +msgid "HHCPN092I %d devices processed\n" +msgstr "%d Geräte bearbeitet\n" + +#: hsccmd.c:1512 +#, fuzzy +msgid "HHCPN093E Missing argument(s)\n" +msgstr "Geen apparaat nummer\n" + +#: hsccmd.c:1518 +#, fuzzy, c-format +msgid "HHCPN094E Device number %s is invalid\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: hsccmd.c:1524 +#, c-format +msgid "HHCPN095E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:1536 +#, c-format +msgid "HHCPN096E Device %4.4X busy or interrupt pending\n" +msgstr "" + +#: hsccmd.c:1552 +#, fuzzy, c-format +msgid "HHCPN097E Initialization failed for device %4.4X\n" +msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" + +#: hsccmd.c:1555 +#, fuzzy, c-format +msgid "HHCPN098I Device %4.4X initialized\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: hsccmd.c:1584 +msgid "HHCPN099E savecore rejected: filename missing\n" +msgstr "" + +#: hsccmd.c:1605 +#, fuzzy, c-format +msgid "HHCPN100E savecore: invalid starting address: %s \n" +msgstr "Ongeldig frame adres %8.8X\n" + +#: hsccmd.c:1624 +#, fuzzy, c-format +msgid "HHCPN101E savecore: invalid ending address: %s \n" +msgstr "Ongeldig frame adres %8.8X\n" + +#: hsccmd.c:1632 +msgid "HHCPN102E savecore rejected: CPU not stopped\n" +msgstr "" + +#: hsccmd.c:1638 +#, fuzzy, c-format +msgid "HHCPN103E invalid range: %8.8X-%8.8X\n" +msgstr "Ongeldig bereik: %s\n" + +#: hsccmd.c:1643 +#, c-format +msgid "HHCPN104I Saving locations %8.8X-%8.8X to %s\n" +msgstr "" + +#: hsccmd.c:1648 +#, fuzzy, c-format +msgid "HHCPN105E savecore error creating %s: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: hsccmd.c:1654 +#, fuzzy, c-format +msgid "HHCPN106E savecore error writing to %s: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: hsccmd.c:1657 +#, c-format +msgid "HHCPN107E savecore: unable to save %d bytes\n" +msgstr "" + +#: hsccmd.c:1683 +msgid "HHCPN108E loadcore rejected: filename missing\n" +msgstr "" + +#: hsccmd.c:1691 +#, fuzzy, c-format +msgid "HHCPN109E Cannot open %s: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: hsccmd.c:1704 +#, fuzzy, c-format +msgid "HHCPN110E invalid address: %s \n" +msgstr "Ongeldig bereik: %s\n" + +#: hsccmd.c:1712 +msgid "HHCPN111E loadcore rejected: CPU not stopped\n" +msgstr "" + +#: hsccmd.c:1717 +#, c-format +msgid "HHCPN112I Loading %s to location %x \n" +msgstr "" + +#: hsccmd.c:1721 +#, fuzzy, c-format +msgid "HHCPN113I %d bytes read from %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: hsccmd.c:1744 +msgid "HHCPN114E loadtext rejected: filename missing\n" +msgstr "" + +#: hsccmd.c:1757 +#, fuzzy, c-format +msgid "HHCPN115E invalid address: %s \n" +msgstr "Ongeldig bereik: %s\n" + +#: hsccmd.c:1764 +#, fuzzy +msgid "HHCPN116E Address greater than mainstore size\n" +msgstr "Adresse ist höher als Speicherobergrenze\n" + +#: hsccmd.c:1771 +msgid "HHCPN117E loadtext rejected: CPU not stopped\n" +msgstr "" + +#: hsccmd.c:1778 +#, fuzzy, c-format +msgid "HHCPN118E Cannot open %s: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: hsccmd.c:1789 +#, fuzzy, c-format +msgid "HHCPN119E Cannot read %s: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: hsccmd.c:1813 +msgid "HHCPN120I Finished loading TEXT deck file\n" +msgstr "" + +#: hsccmd.c:1814 +#, fuzzy, c-format +msgid " Last 'TXT' record had address: %3.3X\n" +msgstr "Laatste 'TXT' record had adres: %3.3X\n" + +#: hsccmd.c:1845 +#, c-format +msgid "HHCPN121E ipending expects {+|-}debug as operand. %s is invalid\n" +msgstr "" + +#: hsccmd.c:1861 +msgid "HHCPN122I Interrupt checking debug mode set to " +msgstr "" + +#: hsccmd.c:1866 +msgid "ON\n" +msgstr "" + +#: hsccmd.c:1871 +msgid "OFF\n" +msgstr "" + +#: hsccmd.c:1876 +#, c-format +msgid "HHCPN123I CPU%4.4X: CPUint=%8.8X (r:%8.8X|s:%8.8X)&(Mask:%8.8X)\n" +msgstr "" + +#: hsccmd.c:1882 +#, c-format +msgid " CPU%4.4X: Clock comparator %spending\n" +msgstr "" + +#: hsccmd.c:1884 hsccmd.c:1888 hsccmd.c:1892 hsccmd.c:1896 hsccmd.c:1900 +#: hsccmd.c:1904 hsccmd.c:1932 hsccmd.c:1935 hsccmd.c:1938 hsccmd.c:1941 +#: hsccmd.c:1944 hsccmd.c:1947 hsccmd.c:1951 hsccmd.c:1955 +msgid "not " +msgstr "" + +#: hsccmd.c:1886 +#, c-format +msgid " CPU%4.4X: CPU timer %spending\n" +msgstr "" + +#: hsccmd.c:1890 +#, c-format +msgid " CPU%4.4X: Interval timer %spending\n" +msgstr "" + +#: hsccmd.c:1894 +#, c-format +msgid " CPU%4.4X: External call %spending\n" +msgstr "" + +#: hsccmd.c:1898 +#, c-format +msgid " CPU%4.4X: Emergency signal %spending\n" +msgstr "" + +#: hsccmd.c:1902 +#, c-format +msgid " CPU%4.4X: CPU interlock %sheld\n" +msgstr "" + +#: hsccmd.c:1906 +#, c-format +msgid " CPU%4.4X: CPU state is %s\n" +msgstr "" + +#: hsccmd.c:1914 +#, fuzzy, c-format +msgid " CPU%4.4X: No channelset connected\n" +msgstr "CPU%4.4X: Mit keinem Channel-Set verbunden\n" + +#: hsccmd.c:1918 +#, fuzzy, c-format +msgid " CPU%4.4X: Connected to channelset %4.4X\n" +msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" + +#: hsccmd.c:1925 +#, c-format +msgid " Started mask %8.8X waiting mask %8.8X\n" +msgstr "" + +#: hsccmd.c:1928 +#, c-format +msgid " Broadcast count %d code %d\n" +msgstr "" + +#: hsccmd.c:1931 +#, c-format +msgid " Machine check interrupt %spending\n" +msgstr "" + +#: hsccmd.c:1934 +#, fuzzy, c-format +msgid " Service signal %spending\n" +msgstr " Blöcke: %d, Gesamtgröße %d\n" + +#: hsccmd.c:1937 +#, c-format +msgid " Signaling facility %sbusy\n" +msgstr "" + +#: hsccmd.c:1940 +#, c-format +msgid " TOD lock %sheld\n" +msgstr "" + +#: hsccmd.c:1943 +#, c-format +msgid " Main lock %sheld\n" +msgstr "" + +#: hsccmd.c:1946 +#, c-format +msgid " Int lock %sheld\n" +msgstr "" + +#: hsccmd.c:1950 +#, c-format +msgid " Ioq lock %sheld\n" +msgstr "" + +#: hsccmd.c:1954 +#, c-format +msgid " I/O interrupt %spending\n" +msgstr "" + +#: hsccmd.c:1967 +#, fuzzy, c-format +msgid " DEV%4.4X: busy %s\n" +msgstr "CPU%4.4X: CPU Status: %s\n" + +#: hsccmd.c:1969 +#, fuzzy, c-format +msgid " DEV%4.4X: reserved %s\n" +msgstr "CPU%4.4X: CPU Status: %s\n" + +#: hsccmd.c:1971 +#, c-format +msgid " DEV%4.4X: suspended\n" +msgstr "" + +#: hsccmd.c:1973 +#, c-format +msgid " DEV%4.4X: I/O pending\n" +msgstr "" + +#: hsccmd.c:1975 +#, c-format +msgid " DEV%4.4X: PCI pending\n" +msgstr "" + +#: hsccmd.c:1977 +#, c-format +msgid " DEV%4.4X: CRW pending\n" +msgstr "" + +#: hsccmd.c:1979 +#, c-format +msgid " DEV%4.4X: lock held\n" +msgstr "" + +#: hsccmd.c:1982 +msgid " I/O interrupt queue: " +msgstr "" + +#: hsccmd.c:1985 +msgid "(NULL)" +msgstr "" + +#: hsccmd.c:1989 +#, c-format +msgid " DEV%4.4X\n" +msgstr "" + +#: hsccmd.c:2008 +#, fuzzy +msgid "HHCPN124I Instruction counts reset to zero.\n" +msgstr "%sFehler beim Lesen der Instruktion\n" + +#: hsccmd.c:2012 +#, fuzzy +msgid "HHCPN125I Instruction count display:\n" +msgstr "%sFehler beim Lesen der Instruktion\n" + +#: hsccmd.c:2146 +msgid "HHCPN996E The script command requires a filename\n" +msgstr "" + +#: hsccmd.c:2159 +msgid "HHCPN997E Only 1 script may be invoked from the panel at any time\n" +msgstr "" + +#: hsccmd.c:2174 +msgid "HHCPN998E Script aborted : user cancel request\n" +msgstr "" + +#: hsccmd.c:2194 +msgid "HHCPN998E Script aborted : Script recursion level exceeded\n" +msgstr "" + +#: hsccmd.c:2204 +#, fuzzy, c-format +msgid "HHCPN007E Script file %s open failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: hsccmd.c:2209 +#, fuzzy, c-format +msgid "HHCPN995E Script file %s not found\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: hsccmd.c:2217 +#, c-format +msgid "HHCPN008I Script file processing started using file %s\n" +msgstr "" + +#: hsccmd.c:2225 +#, fuzzy, c-format +msgid "HHCPN009E Script file buffer malloc failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: hsccmd.c:2267 +#, fuzzy, c-format +msgid "HHCPN010W Ignoring invalid SCRIPT file pause statement: %s\n" +msgstr "HHC422I Optie %s niet geldig\n" + +#: hsccmd.c:2273 +#, c-format +msgid "HHCPN011I Pausing SCRIPT file processing for %d seconds...\n" +msgstr "" + +#: hsccmd.c:2277 +msgid "HHCPN012I Resuming SCRIPT file processing...\n" +msgstr "" + +#: hsccmd.c:2295 +msgid "HHCPN013I EOF reached on SCRIPT file. Processing complete.\n" +msgstr "" + +#: hsccmd.c:2300 +#, fuzzy, c-format +msgid "HHCPN014E I/O error reading SCRIPT file: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: hsccmd.c:2305 +#, c-format +msgid "HHCPN999I Script %s aborted due to previous conditions\n" +msgstr "" + +#: hsccmd.c:2333 +#, fuzzy, c-format +msgid "HHCPN126I Architecture mode = %s\n" +msgstr "Modus: %s\n" + +#: hsccmd.c:2342 +msgid "HHCPN127E All CPU's must be stopped to change architecture\n" +msgstr "" + +#: hsccmd.c:2362 +#, fuzzy, c-format +msgid "HHCPN128E Invalid architecture mode %s\n" +msgstr "Ongeldige achitectuur modus %s\n" + +#: hsccmd.c:2373 +#, fuzzy, c-format +msgid "HHCPN129I Architecture successfully set to %s mode.\n" +msgstr "Modus umgeschaltef auf %s\n" + +#: hsccmd.c:2398 +msgid "on" +msgstr "" + +#: hsccmd.c:2401 +msgid "off" +msgstr "" + +#: hsccmd.c:2411 +#, fuzzy, c-format +msgid "HHCPN130E Invalid frame address %8.8X\n" +msgstr "Ongeldig frame adres %8.8X\n" + +#: hsccmd.c:2417 +#, c-format +msgid "HHCPN131I Frame %8.8X marked %s\n" +msgstr "" + +#: hsccmd.c:2418 +msgid "usable" +msgstr "" + +#: hsccmd.c:2418 +msgid "unusable" +msgstr "" + +#: hsccmd.c:2430 +#, fuzzy, c-format +msgid "HHCPN132I Instruction tracing is now %s\n" +msgstr "%sFehler beim Lesen der Instruktion\n" + +#: hsccmd.c:2441 +#, fuzzy, c-format +msgid "HHCPN133I Instruction stepping is now %s\n" +msgstr "%sFehler beim Lesen der Instruktion\n" + +#: hsccmd.c:2456 +#, fuzzy, c-format +msgid "HHCPN134I CKD KEY trace is now %s\n" +msgstr "CKD KEY Ablaufverfolgung ist %s\n" + +#: hsccmd.c:2471 +#, c-format +msgid "HHCPN135E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:2478 +#, fuzzy, c-format +msgid "HHCPN136I CCW tracing is now %s for device %4.4X\n" +msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" + +#: hsccmd.c:2483 +#, fuzzy, c-format +msgid "HHCPN137I CCW stepping is now %s for device %4.4X\n" +msgstr "CCW Einzelschritt ist %s für %4.4X\n" + +#: hsccmd.c:2490 +msgid "HHCPN138E Unrecognized +/- command.\n" +msgstr "" + +#: hsccmd.c:2540 +#, fuzzy, c-format +msgid "HHCHD100I Loading %s ...\n" +msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" + +#: hsccmd.c:2542 +#, c-format +msgid "HHCHD101I Module %s loaded\n" +msgstr "" + +#: hsccmd.c:2565 +#, fuzzy, c-format +msgid "HHCHD102I Unloading %s ...\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: hsccmd.c:2567 +#, fuzzy, c-format +msgid "HHCHD103I Module %s unloaded\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: hsccmd.c:2612 +msgid "HHCPN150W evm command is deprecated. Use \"ecpsvm\" instead\n" +msgstr "" + +#: hsccmd.c:2826 +#, c-format +msgid "HHCPN139E Command \"%s\" not found; enter '?' for list.\n" +msgstr "" + +#: hsccmd.c:2846 +msgid "" +"HHCPN140I Valid panel commands are...\n" +"\n" +msgstr "" + +#: hsccmd.c:2853 +#, c-format +msgid " %-9.9s %s \n" +msgstr "" + +#: hsccmd.c:2859 +msgid "add shadow file" +msgstr "" + +#: hsccmd.c:2860 +msgid "delete shadow file" +msgstr "" + +#: hsccmd.c:2861 +msgid "rename shadow file" +msgstr "" + +#: hsccmd.c:2862 +msgid "compress shadow files" +msgstr "" + +#: hsccmd.c:2863 +msgid "display shadow file stats" +msgstr "" + +#: hsccmd.c:2867 +msgid "turn instruction tracing on/off" +msgstr "" + +#: hsccmd.c:2868 +msgid "turn instruction stepping on/off" +msgstr "" + +#: hsccmd.c:2869 +msgid "turn CCW tracing on/off" +msgstr "" + +#: hsccmd.c:2870 +msgid "turn CCW stepping on/off" +msgstr "" + +#: hsccmd.c:2872 +msgid "turn CKD_KEY tracing on/off" +msgstr "" + +#: hsccmd.c:2874 +msgid "mark frames unusable/usable" +msgstr "" + +#: hsccmd.c:3041 +#, fuzzy +msgid "HHCPN141E Missing argument\n" +msgstr "Geen apparaat nummer\n" + +#: hsccmd.c:3049 +#, c-format +msgid "%s" +msgstr "" + +#: hsccmd.c:3054 +msgid "HHCPN142I No additional help available.\n" +msgstr "" + +#: hscmisc.c:203 +#, fuzzy, c-format +msgid "HHCPN143E Invalid value: %s\n" +msgstr "Ongeldige waarde: %s\n" + +#: hscmisc.c:227 +#, fuzzy, c-format +msgid "HHCPN144E Invalid operand: %s\n" +msgstr "Ongeldig operand: %s\n" + +#: hscmisc.c:239 +#, fuzzy, c-format +msgid "HHCPN145E Invalid range: %s\n" +msgstr "Ongeldig bereik: %s\n" + +#: hscmisc.c:503 +#, c-format +msgid "Storage not accessible code = %4.4X\n" +msgstr "" + +#: hscmisc.c:511 hscmisc.c:520 +msgid "Adressing exception\n" +msgstr "" + +#: hscmisc.c:727 +#, c-format +msgid "%sInstruction fetch error\n" +msgstr "%sFehler beim Lesen der Instruktion\n" + +#: httpserv.c:66 +#, fuzzy, c-format +msgid "HHCHT011E html_include: Cannot open %s: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: httpserv.c:68 +#, c-format +msgid "ERROR: Cannot open %s: %s\n" +msgstr "" + +#: httpserv.c:264 +#, c-format +msgid "HHCHT012I cgi_var_dump: pointer(%p) name(%s) value(%s) type(%d)\n" +msgstr "" + +#: httpserv.c:584 +#, fuzzy +msgid "HHCHT001I HTTP listener thread started: tid=" +msgstr "HHC620I CPU%4.4X thread gestart: tid=%8.8lX, pid=%d, prioriteit=%d\n" + +#: httpserv.c:617 httpserv.c:626 +#, fuzzy, c-format +msgid "HHCCF066E Invalid HTTPROOT: %s\n" +msgstr "Ongeldig frame adres %8.8X\n" + +#: httpserv.c:641 +#, c-format +msgid "HHCHT002E socket: %s\n" +msgstr "" + +#: httpserv.c:664 +#, c-format +msgid "HHCHT003W Waiting for port %u to become free\n" +msgstr "" + +#: httpserv.c:671 +#, c-format +msgid "HHCHT004E bind: %s\n" +msgstr "" + +#: httpserv.c:680 +#, c-format +msgid "HHCHT005E listen: %s\n" +msgstr "" + +#: httpserv.c:684 +#, c-format +msgid "HHCHT006I Waiting for HTTP requests on port %u\n" +msgstr "" + +#: httpserv.c:709 +#, c-format +msgid "HHCHT007E select: %s\n" +msgstr "" + +#: httpserv.c:721 +#, c-format +msgid "HHCHT008E accept: %s\n" +msgstr "" + +#: httpserv.c:727 +#, fuzzy, c-format +msgid "HHCHT009E fdopen: %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" + +#: httpserv.c:736 +#, fuzzy, c-format +msgid "HHCHT010E http_request create_thread: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: ieee.c:403 +msgid "ebfpston: unexpectedly converting a NaN\n" +msgstr "" + +#: ieee.c:407 +msgid "ebfpston: unexpectedly converting an Infinite\n" +msgstr "" + +#: ieee.c:462 +msgid "lbfpston: unexpectedly converting a NaN\n" +msgstr "" + +#: ieee.c:466 +msgid "lbfpston: unexpectedly converting an Infinite\n" +msgstr "" + +#: ieee.c:515 +msgid "sbfpston: unexpectedly converting a NaN\n" +msgstr "" + +#: ieee.c:519 +msgid "sbfpston: unexpectedly converting an Infinite\n" +msgstr "" + +#: impl.c:280 +#, fuzzy, c-format +msgid "HHCIN001S Cannot register SIGINT handler: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: impl.c:290 +#, fuzzy, c-format +msgid "HHCIN002E Cannot suppress SIGPIPE signal: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: impl.c:312 +#, fuzzy, c-format +msgid "HHCIN003S Cannot register SIGILL/FPE/SEGV/BUS/USR handler: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: impl.c:329 +#, fuzzy, c-format +msgid "HHCIN004S Cannot create watchdog thread: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: impl.c:343 +#, fuzzy, c-format +msgid "HHCIN005S Cannot create http_server thread: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: impl.c:357 +#, fuzzy, c-format +msgid "HHCIN006S Cannot create shared_server thread: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: impl.c:372 +#, fuzzy, c-format +msgid "HHCIN007S Cannot create %4.4X connection thread: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: ipl.c:68 +#, fuzzy, c-format +msgid "HHCCP027E Device %4.4X not in configuration\n" +msgstr "CPU%4.4X nicht konfiguriert\n" + +#: ipl.c:79 +msgid "HHCCP028E Device not connected to channelset\n" +msgstr "" + +#: ipl.c:130 +#, c-format +msgid "" +"HHCCP029E %s mode IPL failed: CSW status=%2.2X%2.2X\n" +" Sense=" +msgstr "" + +#: ipl.c:178 +#, c-format +msgid "" +"HHCCP030E %s mode IPL failed: Invalid IPL PSW: %2.2X%2.2X%2.2X%2.2X %2.2X%" +"2.2X%2.2X%2.2X\n" +msgstr "" + +#: ipl.c:283 +#, fuzzy, c-format +msgid "HHCCP031E Load from %s failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: ipl.c:333 +#, c-format +msgid "" +"HHCCP032E %s mode IPL failed: Invalid IPL PSW: %2.2X%2.2X%2.2X%2.2X %2.2X%" +"2.2X%2.2X%2.2X\n" +msgstr "" + +#: ipl.c:483 +#, c-format +msgid "HHCCP033E load_main: %s: %s\n" +msgstr "" + +#: ipl.c:492 +msgid "HHCCP034W load_main: terminated at end of mainstor\n" +msgstr "" + +#: logger.c:167 +#, fuzzy +msgid "HHCLG014I logger thread terminating\n" +msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" + +#: logger.c:198 +#, fuzzy, c-format +msgid "HHCLG001E Error redirecting stdout: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: logger.c:225 +#, fuzzy, c-format +msgid "HHCLG002E Error reading syslog pipe: %s\n" +msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: logger.c:231 +#, fuzzy, c-format +msgid "HHCLG003E Error writing hardcopy log: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: logger.c:281 logger.c:293 +#, fuzzy, c-format +msgid "HHCLG004E Error duplicating stderr: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: logger.c:303 +#, fuzzy, c-format +msgid "HHCLG005E Error duplicating stdout: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: logger.c:313 +#, fuzzy, c-format +msgid "HHCLG006E Duplicate error redirecting hardcopy log: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: logger.c:320 +#, fuzzy, c-format +msgid "HHCLG007S Hardcopy log fdopen failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: logger.c:331 +#, c-format +msgid "HHCLG008S logbuffer malloc failed: %s\n" +msgstr "" + +#: logger.c:338 +#, fuzzy, c-format +msgid "HHCLG009S Syslog message pipe creation failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: logger.c:346 +#, fuzzy, c-format +msgid "HHCLG010S Syslog write message pipe open failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: logger.c:354 +#, fuzzy, c-format +msgid "HHCLG011S Syslog read message pipe open failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: logger.c:364 +#, fuzzy, c-format +msgid "HHCLG012E Cannot create logger thread: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: machchk.c:226 +#, c-format +msgid "HHCCP019I Machine Check code=%16.16llu\n" +msgstr "" + +#: machchk.c:290 +#, fuzzy +msgid "HHCCP020E signal USR2 received for undetermined device\n" +msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" + +#: machchk.c:294 +#, fuzzy, c-format +msgid "HHCCP021E signal USR2 received for device %4.4X\n" +msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" + +#: machchk.c:322 machchk.c:326 +#, fuzzy, c-format +msgid "HHCCP017I CPU%4.4X: Machine check due to host error: %s\n" +msgstr "CPU%4.4X: Ceck-stop. Host Fehler: %s\n" + +#: machchk.c:361 machchk.c:365 +#, fuzzy, c-format +msgid "HHCCP018I CPU%4.4X: Check-Stop due to host error: %s\n" +msgstr "CPU%4.4X: Ceck-stop. Host Fehler: %s\n" + +#: panel.c:239 +#, fuzzy, c-format +msgid "HHCLG013S Message pipe creation failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: panel.c:250 +#, fuzzy, c-format +msgid "HHCLG014S Message pipe open failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: panel.c:851 +#, fuzzy +msgid "HHCPN001I Control panel thread started: tid=" +msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" + +#: panel.c:858 +#, fuzzy, c-format +msgid "HHCPN002S Cannot obtain keyboard buffer: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: panel.c:868 +#, fuzzy, c-format +msgid "HHCPN003S Cannot obtain message buffer: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: panel.c:927 +#, fuzzy, c-format +msgid "HHCPN004E select: %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" + +#: panel.c:942 +#, fuzzy, c-format +msgid "HHCPN005E keyboard read: %s\n" +msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" + +#: panel.c:1333 +#, fuzzy, c-format +msgid "HHCPN006E message pipe read: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: printer.c:40 +#, fuzzy, c-format +msgid "HHCPR004E Error opening file %s: %s\n" +msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" + +#: printer.c:56 +#, c-format +msgid "HHCPR005E %4.4X device initialization error: pipe: %s\n" +msgstr "" + +#: printer.c:65 +#, c-format +msgid "HHCPR006E %4.4X device initialization error: fork: %s\n" +msgstr "" + +#: printer.c:74 +#, c-format +msgid "HHCPR007I pipe receiver (pid=%d) starting for %4.4X\n" +msgstr "" + +#: printer.c:86 +#, fuzzy, c-format +msgid "HHCPR008E %4.4X dup2 error: %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" + +#: printer.c:122 +#, c-format +msgid "HHCPR011I pipe receiver (pid=%d) terminating for %4.4X\n" +msgstr "" + +#: printer.c:128 +#, fuzzy, c-format +msgid "HHCPR012E %4.4X Unable to execute %s: %s\n" +msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" + +#: printer.c:163 +#, fuzzy, c-format +msgid "HHCPR003E %4.4X Error writing to %s: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: printer.c:165 +msgid "incomplete" +msgstr "" + +#: printer.c:184 +#, fuzzy, c-format +msgid "HHCPR001E File name missing or invalid for printer %4.4X\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: printer.c:213 +#, fuzzy, c-format +msgid "HHCPR002E Invalid argument for printer %4.4X: %s\n" +msgstr "HHC422I Optie %s niet geldig\n" + +#: service.c:60 +#, fuzzy +msgid "HHCCP036E SCP not receiving priority messages\n" +msgstr "HHC703I SCP ontvangt geen prioriteits berichten\n" + +#: service.c:67 +#, fuzzy +msgid "HHCCP037E SCP not receiving commands\n" +msgstr "HHC704I SCP ontvangt geen commando's\n" + +#: service.c:74 +#, fuzzy +msgid "HHCCP038E No SCP command\n" +msgstr "HHC705I Geen SCP commando\n" + +#: service.c:85 +#, fuzzy +msgid "HHCCP039E Service Processor busy\n" +msgstr "%d Geräte bearbeitet\n" + +#: service.c:792 +#, c-format +msgid "HHCCP040I CPI: System Type: %s Name: %s Sysplex: %s\n" +msgstr "" + +#: service.c:796 +msgid "HHC770I Control Program Information:\n" +msgstr "" + +#: service.c:797 +#, c-format +msgid "HHC771I System Type = %s\n" +msgstr "" + +#: service.c:798 +#, c-format +msgid "HHC772I System Name = %s\n" +msgstr "" + +#: service.c:799 +#, c-format +msgid "HHC773I Sysplex Name = %s\n" +msgstr "" + +#: service.c:800 +#, c-format +msgid "HHC774I System Level = %16.16llX\n" +msgstr "" + +#: service.c:988 +#, fuzzy +msgid "HHCCP041I SYSCONS interface active\n" +msgstr "HHC701I SYSCONS interface actief\n" + +#: service.c:990 +#, fuzzy +msgid "HHCCP042I SYSCONS interface inactive\n" +msgstr "HHC702I SYSCONS interface inactief\n" + +#: service.c:1114 +#, fuzzy, c-format +msgid "CPU%4.4X: Vector Facility configured offline\n" +msgstr "HHC623I CPU%4.4X thread al gestart\n" + +#: service.c:1145 +#, fuzzy, c-format +msgid "CPU%4.4X: Vector Facility configured online\n" +msgstr "HHC623I CPU%4.4X thread al gestart\n" + +#: shared.c:199 +#, fuzzy, c-format +msgid "HHCSH001S parameter %d is invalid: %s\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: shared.c:225 +#, fuzzy, c-format +msgid "HHCSH002W %4.4X connect pending to %s\n" +msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" + +#: shared.c:243 +#, fuzzy, c-format +msgid "HHCSH003S %4.4X Error retrieving cylinders\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: shared.c:256 +#, fuzzy, c-format +msgid "HHCSH004S %4.4X Error retrieving device characteristics\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: shared.c:274 +#, fuzzy, c-format +msgid "HHCSH005S %4.4X Remote device %4.4X is a %4.4X\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: shared.c:286 +#, fuzzy, c-format +msgid "HHCSH006S %4.4X Error retrieving device id\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: shared.c:303 +#, fuzzy, c-format +msgid "HHCSH007S %4.4X device type %4.4X not found in dasd table\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: shared.c:315 +#, fuzzy, c-format +msgid "HHCSH008S %4.4X control unit %s not found in dasd table\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: shared.c:336 +#, fuzzy, c-format +msgid "HHCSH009I %s cyls=%d heads=%d tracks=%d trklen=%d\n" +msgstr "%d Bytes gelesen von %s\n" + +#: shared.c:447 +#, fuzzy, c-format +msgid "HHCSH010S parameter %d is invalid: %s\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: shared.c:473 +#, fuzzy, c-format +msgid "HHCSH011I %4.4X connect pending to %s\n" +msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" + +#: shared.c:488 +#, fuzzy, c-format +msgid "HHCSH012S %4.4X Error retrieving fba origin\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: shared.c:500 +#, fuzzy, c-format +msgid "HHCSH013S %4.4X Error retrieving fba number blocks\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: shared.c:512 +#, fuzzy, c-format +msgid "HHCSH014S %4.4X Error retrieving fba block size\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: shared.c:526 +#, fuzzy, c-format +msgid "HHCSH015S %4.4X Error retrieving device id\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: shared.c:535 +#, fuzzy, c-format +msgid "HHCSH016S %4.4X Remote device %4.4X is a %4.4X\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: shared.c:547 +#, fuzzy, c-format +msgid "HHCSH017S %4.4X Error retrieving device characteristics\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: shared.c:564 +#, fuzzy, c-format +msgid "HHCSH018S %4.4X device type %4.4X not found in dasd table\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: shared.c:573 +#, c-format +msgid "HHCSH019I %s origin=%d blks=%d\n" +msgstr "" + +#: shared.c:618 +#, fuzzy, c-format +msgid "HHCSH020E %4.4X error during channel program start\n" +msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: shared.c:675 +#, fuzzy, c-format +msgid "HHCSH021E %4.4X error during channel program end\n" +msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: shared.c:780 +#, fuzzy, c-format +msgid "HHCSH022E %4.4X error reading track %d\n" +msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: shared.c:792 +#, fuzzy, c-format +msgid "HHCSH023E %4.4X error reading track %d\n" +msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: shared.c:991 +#, fuzzy, c-format +msgid "HHCSH024E %4.4X error reading block group %d\n" +msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: shared.c:1004 +#, fuzzy, c-format +msgid "HHCSH025E %4.4X error reading block group %d\n" +msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: shared.c:1089 +#, fuzzy, c-format +msgid "HHCSH026E %4.4X Error retrieving usage information\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: shared.c:1160 +#, fuzzy, c-format +msgid "HHCSH027E %4.4X error writing track %d\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: shared.c:1173 +#, fuzzy, c-format +msgid "HHCSH028E %4.4X remote error writing track %d: %2.2X-%2.2X\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: shared.c:1252 +#, fuzzy, c-format +msgid "HHCSH029E %4.4X socket failed: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: shared.c:1266 +#, fuzzy, c-format +msgid "HHCSH030E %4.4X socket failed: %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" + +#: shared.c:1284 +#, fuzzy, c-format +msgid "HHCSH031I %4.4X Connected to %s\n" +msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" + +#: shared.c:1318 +#, fuzzy, c-format +msgid "HHCSH032E %4.4X Connect %s %d: %s\n" +msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" + +#: shared.c:1489 +#, fuzzy, c-format +msgid "HHCSH033E %4.4X send error %d for %2.2X-%2.2X: %s\n" +msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: shared.c:1516 +#, fuzzy, c-format +msgid "HHCSH034E %4.4X Not connected to %s\n" +msgstr "CPU%4.4X: Verbunden mit Channel-Set %4.4X\n" + +#: shared.c:1526 +#, fuzzy, c-format +msgid "HHCSH035E %4.4X recv error %d: %s\n" +msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: shared.c:1538 +#, fuzzy, c-format +msgid "HHCSH036E %4.4X Remote error %2.2X-%2.2X: %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" + +#: shared.c:1644 +#, fuzzy, c-format +msgid "HHCSH037E uncompress error %d, off %d len %d\n" +msgstr "*** Fehler beim Entpacken für Spur %d: %d\n" + +#: shared.c:1649 +msgid "HHCSH038E data compressed using libz, unsupported\n" +msgstr "" + +#: shared.c:1667 +#, fuzzy, c-format +msgid "HHCSH039E decompress error %d, off %d len %d\n" +msgstr "*** Fehler beim De-Komprimieren für Spur %d: %d\n" + +#: shared.c:1672 +msgid "HHCSH040E data compressed using bzip2, unsupported\n" +msgstr "" + +#: shared.c:2247 +#, fuzzy, c-format +msgid "HHCSH041E %4.4X send error %d id=%d: %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" + +#: shared.c:2286 +#, c-format +msgid "HHCSH042W %4.4X busy client being removed id=%d %s\n" +msgstr "" + +#: shared.c:2318 +#, fuzzy, c-format +msgid "HHCSH043I %s disconnected from %4.4X id=%d\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: shared.c:2387 +#, fuzzy, c-format +msgid "HHCSH0474 %s connect failed\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: shared.c:2464 +#, fuzzy, c-format +msgid "HHCSH053I %s connected to %4.4X id=%d\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: shared.c:2480 +#, fuzzy, c-format +msgid "HHCSH045I Shared device %4.4X thread started: tid=" +msgstr "HHC620I CPU%4.4X thread gestart: tid=%8.8lX, pid=%d, prioriteit=%d\n" + +#: shared.c:2550 +#, fuzzy, c-format +msgid "HHCSH046E select: %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" + +#: shared.c:2584 +#, fuzzy, c-format +msgid "HHCSH047E %4.4X %s recv error id=%d\n" +msgstr "%d Bytes gelesen von %s\n" + +#: shared.c:2615 +#, fuzzy, c-format +msgid "HHCSH048I Shared device %4.4X thread stopping\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: shared.c:2643 +#, fuzzy, c-format +msgid "HHCSH049I Shared device %d.%d thread started: tid=" +msgstr "HHC620I CPU%4.4X thread gestart: tid=%8.8lX, pid=%d, prioriteit=%d\n" + +#: shared.c:2652 +#, fuzzy, c-format +msgid "HHCSH050E inet socket: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: shared.c:2661 +#, fuzzy, c-format +msgid "HHCSH051E unix socket: %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" + +#: shared.c:2683 +#, c-format +msgid "HHCSH052W Waiting for port %u to become free\n" +msgstr "" + +#: shared.c:2690 +#, fuzzy, c-format +msgid "HHCSH053E inet bind: %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" + +#: shared.c:2705 +#, c-format +msgid "HHCSH054E unix bind: %s\n" +msgstr "" + +#: shared.c:2715 +#, fuzzy, c-format +msgid "HHCSH055E inet listen: %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" + +#: shared.c:2724 +#, c-format +msgid "HHCSH056E unix listen: %s\n" +msgstr "" + +#: shared.c:2736 +#, c-format +msgid "HHCSH057I Waiting for shared device requests on port %u\n" +msgstr "" + +#: shared.c:2755 +#, fuzzy, c-format +msgid "HHCSH058E select: %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" + +#: shared.c:2773 +#, fuzzy, c-format +msgid "HHCSH059E accept: %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" + +#: shared.c:2780 +#, fuzzy, c-format +msgid "HHCSH060E malloc size %d: %s\n" +msgstr "Ongeldige waarde: %s\n" + +#: shared.c:2791 +#, fuzzy, c-format +msgid "HHCSH061E serverConnect create_thread: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: shared.c:2824 +#, fuzzy +msgid "HHCSH062E Invalid or missing argument 1\n" +msgstr "HHC422I Optie %s niet geldig\n" + +#: shared.c:2833 +#, fuzzy +msgid "HHCSH063E Invalid or missing keyword 2\n" +msgstr "Ongeldige waarde: %s\n" + +#: shared.c:2851 +#, fuzzy, c-format +msgid "HHCSH064E Invalid or missing value %s\n" +msgstr "Ongeldige waarde: %s\n" + +#: shared.c:2867 +#, fuzzy, c-format +msgid "HHCSH065E calloc() size=%d: %s\n" +msgstr "Ongeldige waarde: %s\n" + +#: shared.c:2893 +#, fuzzy, c-format +msgid "HHCSH066E Invalid or missing keyword %s\n" +msgstr "Ongeldige waarde: %s\n" + +#: shared.c:2957 shared.c:2964 +msgid "HHCSH999E OPTION_SHARED_DEVICES not defined" +msgstr "" + +#: sie.c:120 +msgid "SIE: state descriptor " +msgstr "" + +#: sie.c:231 +#, c-format +msgid "SIE: zone %d: mso=" +msgstr "" + +#: sie.c:231 +msgid " msl=" +msgstr "" + +#: sie.c:532 +#, c-format +msgid "SIE: interception code %d\n" +msgstr "" + +#: sockdev.c:68 +#, c-format +msgid "HHCSD008E Socket pathname \"%s\" exceeds limit of %d\n" +msgstr "" + +#: sockdev.c:79 +#, fuzzy, c-format +msgid "HHCSD009E Error creating socket for %s: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: sockdev.c:92 +#, fuzzy, c-format +msgid "HHCSD010E Failed to bind or listen on socket %s: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: sockdev.c:143 +#, fuzzy, c-format +msgid "HHCSD011E Failed to determine IP address from %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: sockdev.c:161 +#, fuzzy, c-format +msgid "HHCSD012E Failed to determine port number from %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: sockdev.c:173 +#, fuzzy, c-format +msgid "HHCSD013E Error creating socket for %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: sockdev.c:185 +#, fuzzy, c-format +msgid "HHCSD014E Failed to bind or listen on socket %s: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: sockdev.c:259 +#, c-format +msgid "" +"HHCSD015E Connect to device %4.4X (%s) rejected; device busy or interrupt " +"pending\n" +msgstr "" + +#: sockdev.c:270 +#, c-format +msgid "" +"HHCSD016E Connect to device %4.4X (%s) rejected; client %s (%s) still " +"connected\n" +msgstr "" + +#: sockdev.c:284 +#, fuzzy, c-format +msgid "HHCSD017E Connect to device %4.4X (%s) failed: %s\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: sockdev.c:310 +#, fuzzy, c-format +msgid "HHCSD018I %s (%s) connected to device %4.4X (%s)\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: sockdev.c:315 +#, fuzzy, c-format +msgid "HHCSD019I <unknown> connected to device %4.4X (%s)\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: sockdev.c:386 +#, fuzzy +msgid "HHCSD020I Socketdevice listener thread started: tid=" +msgstr "HHC620I CPU%4.4X thread gestart: tid=%8.8lX, pid=%d, prioriteit=%d\n" + +#: sockdev.c:417 +#, fuzzy, c-format +msgid "HHCSD021E select: %s\n" +msgstr "HHC760I %4.4X create_thread fout: %s" + +#: sockdev.c:431 +#, fuzzy +msgid "HHCSD022I Socketdevice listener thread terminated\n" +msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" + +#: sockdev.c:461 +#, fuzzy, c-format +msgid "HHCSD023E Cannot create socketdevice thread: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: sockdev.c:472 +#, fuzzy, c-format +msgid "HHCSD001E Device %4.4X already bound to socket %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: sockdev.c:483 +#, fuzzy, c-format +msgid "HHCSD002E bind_device malloc() failed for device %4.4X\n" +msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" + +#: sockdev.c:492 +#, fuzzy, c-format +msgid "HHCSD003E bind_device safe_strdup() failed for device %4.4X\n" +msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" + +#: sockdev.c:523 +#, fuzzy, c-format +msgid "HHCSD004I Device %4.4X bound to socket %s\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: sockdev.c:544 +#, fuzzy, c-format +msgid "HHCSD005E Device %4.4X not bound to any socket\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: sockdev.c:553 +#, fuzzy, c-format +msgid "HHCSD006E Client %s (%s) still connected to device %4.4X (%s)\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: sockdev.c:580 +#, fuzzy, c-format +msgid "HHCSD007I Device %4.4X unbound from socket %s\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: stack.c:593 +msgid "stack: Current stack entry at " +msgstr "" + +#: stack.c:594 stack.c:633 stack.c:945 stack.c:958 stack.c:1022 stack.c:1061 +#, c-format +msgid "stack: et=%2.2X si=%2.2X rfs=%2.2X%2.2X nes=%2.2X%2.2X\n" +msgstr "" + +#: stack.c:616 +msgid "stack: Forward section header addr " +msgstr "" + +#: stack.c:678 stack.c:944 +msgid "stack: New stack entry at " +msgstr "" + +#: stack.c:695 stack.c:703 stack.c:1302 stack.c:1310 +#, c-format +msgid "stack: GPR%d=" +msgstr "" + +#: stack.c:695 stack.c:703 stack.c:727 stack.c:915 +msgid " stored at V:" +msgstr "" + +#: stack.c:696 stack.c:704 stack.c:728 stack.c:751 stack.c:804 stack.c:882 +#: stack.c:916 stack.c:1303 stack.c:1311 stack.c:1348 stack.c:1443 +#: stack.c:1479 +msgid " A:" +msgstr "" + +#: stack.c:727 stack.c:915 stack.c:1347 +#, c-format +msgid "stack: AR%d=" +msgstr "" + +#: stack.c:749 +#, c-format +msgid "" +"stack: PKM=%2.2X%2.2X SASN=%2.2X%2.2X EAX=%2.2X%2.2X PASN=%2.2X%2.2X \n" +"stored at V:" +msgstr "" + +#: stack.c:803 +#, c-format +msgid "stack: PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X stored at V:" +msgstr "" + +#: stack.c:881 +#, c-format +msgid "stack: PSW2=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X stored at V:" +msgstr "" + +#: stack.c:956 +msgid "stack: Previous stack entry updated at A:" +msgstr "" + +#: stack.c:967 stack.c:1532 +msgid "stack: CR15=" +msgstr "" + +#: stack.c:1021 stack.c:1045 +msgid "stack: Stack entry located at " +msgstr "" + +#: stack.c:1277 +#, c-format +msgid "stack: Unstacking registers %d-%d from " +msgstr "" + +#: stack.c:1302 stack.c:1310 stack.c:1347 +msgid " loaded from V:" +msgstr "" + +#: stack.c:1441 +#, c-format +msgid "" +"stack: PKM=%2.2X%2.2X SASN=%2.2X%2.2X EAX=%2.2X%2.2X PASN=%2.2X%2.2X \n" +"loaded from V:" +msgstr "" + +#: stack.c:1478 +#, c-format +msgid "stack: PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X loaded from V:" +msgstr "" + +#: tapecopy.c:77 +#, c-format +msgid "HHCTC015I %s status: %8.8lX" +msgstr "" + +#: tapecopy.c:105 +#, fuzzy, c-format +msgid "HHCTC016E Error reading status of %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapecopy.c:188 +#, fuzzy, c-format +msgid "HHCTC001E Error opening %s: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: tapecopy.c:197 +#, fuzzy, c-format +msgid "HHCTC002E Error reading status of %s: %s\n" +msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapecopy.c:207 +#, fuzzy, c-format +msgid "HHCTC003I %s device type: %s\n" +msgstr "%d Geräte bearbeitet\n" + +#: tapecopy.c:209 +#, fuzzy, c-format +msgid "HHCTC003I %s device type: 0x%lX\n" +msgstr "%d Geräte bearbeitet\n" + +#: tapecopy.c:218 +#, fuzzy, c-format +msgid "HHCTC004I %s tape density: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: tapecopy.c:221 +#, fuzzy, c-format +msgid "HHCTC004I %s tape density code: 0x%lX\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: tapecopy.c:234 +#, fuzzy, c-format +msgid "HHCTC005E Error setting attributes for %s: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: tapecopy.c:245 +#, fuzzy, c-format +msgid "HHCTC006E Error rewinding %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapecopy.c:257 +#, fuzzy, c-format +msgid "HHCTC007E Error opening %s: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: tapecopy.c:279 +#, fuzzy, c-format +msgid "HHCTC008E Error reading %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapecopy.c:289 +#, c-format +msgid "HHCTC009I File %u: Blocks=%u, block size min=%u, max=%u\n" +msgstr "" + +#: tapecopy.c:308 +#, fuzzy, c-format +msgid "HHCTC010E Error writing %s: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: tapecopy.c:324 +#, fuzzy +msgid "HHCTC011I End of tape\n" +msgstr "HHC403I Niet genoeg geheugen\n" + +#: tapecopy.c:344 +#, c-format +msgid "HHCTC012I %s\n" +msgstr "" + +#: tapecopy.c:367 +#, fuzzy, c-format +msgid "HHCTC013I Error writing %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapecopy.c:376 +#, fuzzy, c-format +msgid "HHCTC014I Error writing %s: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: tapedev.c:351 +#, c-format +msgid "HHCTA996I %4.4x - AWS Tape %s closed\n" +msgstr "" + +#: tapedev.c:430 +#, fuzzy, c-format +msgid "HHCTA001E Error opening %s: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: tapedev.c:461 tapedev.c:620 +#, fuzzy, c-format +msgid "HHCTA002E Error seeking to offset %8.8lX in file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:476 +#, fuzzy, c-format +msgid "HHCTA003E Error reading block header at offset %8.8lX in file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:488 +#, c-format +msgid "" +"HHCTA004E End of file (uninitialized tape) at offset %8.8lX in file %s\n" +msgstr "" + +#: tapedev.c:500 +#, fuzzy, c-format +msgid "" +"HHCTA004E Unexpected end of file in block header at offset %8.8lX in file %" +"s\n" +msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" + +#: tapedev.c:556 +#, fuzzy, c-format +msgid "HHCTA003E Error reading data block at offset %8.8lX in file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:568 +#, fuzzy, c-format +msgid "" +"HHCTA004E Unexpected end of file in data block at offset %8.8lX in file %s\n" +msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" + +#: tapedev.c:655 tapedev.c:682 +#, fuzzy, c-format +msgid "HHCTA995E Media full condition reached at offset %8.8lX in file %s\n" +msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" + +#: tapedev.c:661 +#, fuzzy, c-format +msgid "HHCTA009E Error writing block header at offset %8.8lX in file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:688 +#, fuzzy, c-format +msgid "HHCTA010E Error writing data block at offset %8.8lX in file %s: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: tapedev.c:739 +#, fuzzy, c-format +msgid "HHCTA011E Error seeking to offset %8.8lX in file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:770 +#, fuzzy, c-format +msgid "HHCTA012E Error writing block header at offset %8.8lX in file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:1001 +#, fuzzy, c-format +msgid "HHCTA013E Error opening %s: %s(%s)\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: tapedev.c:1047 +#, fuzzy, c-format +msgid "HHCTA075E Error seeking to start of %s: %s(%s)\n" +msgstr "HHC407I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:1080 +#, c-format +msgid "HHCTA014E End of file (uninitialized tape) at block %8.8X in file %s\n" +msgstr "" + +#: tapedev.c:1089 +#, fuzzy, c-format +msgid "HHCTA015E Error reading data block at block %8.8X in file %s: %s(%s)\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:1131 +#, c-format +msgid "HHCTA016E Error writing data block at block %8.8X in file %s: %s(%s)\n" +msgstr "" + +#: tapedev.c:1147 +msgid "TAPE EOT Handling : max capacity exceeded\n" +msgstr "" + +#: tapedev.c:1150 +msgid "TAPE EOT Handling : max capacity enforced\n" +msgstr "" + +#: tapedev.c:1182 +#, fuzzy, c-format +msgid "HHCTA017E Error writing tape mark at block %8.8X in file %s: %s(%s)\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: tapedev.c:1222 +#, fuzzy, c-format +msgid "HHCTA018E Error forward spacing at block %8.8X in file %s: %s(%s)\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:1277 +#, fuzzy, c-format +msgid "HHCTA019E Error reading data block at block %8.8X in file %s: %s(%s)\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:1309 +#, fuzzy, c-format +msgid "" +"HHCTA020E Error forward spacing to next file at block %8.8X in file %s: %s(%" +"s)\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:1373 +#, c-format +msgid "" +"HHCTA021E Error back spacing to previous file at block %8.8X in file %s:\n" +" %s(%s)\n" +msgstr "" + +#: tapedev.c:1410 +#, fuzzy, c-format +msgid "HHCTA022E Error reading status of %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:1431 +#, c-format +msgid "HHCTA023I %s\n" +msgstr "" + +#: tapedev.c:1502 +#, fuzzy, c-format +msgid "HHCTA024E Error opening %s: %s\n" +msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" + +#: tapedev.c:1516 +#, fuzzy, c-format +msgid "HHCTA025E Error reading status of %s: %s\n" +msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:1535 +#, fuzzy, c-format +msgid "HHCTA026I %s device type: %s\n" +msgstr "%d Geräte bearbeitet\n" + +#: tapedev.c:1538 +#, fuzzy, c-format +msgid "HHCTA027I %s device type: 0x%lX\n" +msgstr "%d Geräte bearbeitet\n" + +#: tapedev.c:1548 +#, fuzzy, c-format +msgid "HHCTA028I %s tape density: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: tapedev.c:1551 +#, c-format +msgid "HHCTA029I %s tape density code: 0x%lX\n" +msgstr "" + +#: tapedev.c:1560 +#, fuzzy, c-format +msgid "HHCTA030E Error setting attributes for %s: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: tapedev.c:1573 +#, fuzzy, c-format +msgid "HHCTA031E Error rewinding %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:1601 +#, fuzzy, c-format +msgid "HHCTA032E Error reading data block from %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:1635 +#, fuzzy, c-format +msgid "HHCTA033E Error writing data block to %s: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: tapedev.c:1685 +#, fuzzy, c-format +msgid "HHCTA034E Error writing tapemark to %s: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: tapedev.c:1753 +#, fuzzy, c-format +msgid "HHCTA035E Forward space block error on %s: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: tapedev.c:1835 +#, fuzzy, c-format +msgid "HHCTA036E Backspace block error on %s: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: tapedev.c:1869 +#, fuzzy, c-format +msgid "HHCTA037E Forward space file error on %s: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: tapedev.c:1932 +#, fuzzy, c-format +msgid "HHCTA038E Backspace file error on %s: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: tapedev.c:1960 +#, fuzzy, c-format +msgid "HHCTA073E Error rewinding %s: %s\n" +msgstr "HHC407I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:1979 +#, fuzzy, c-format +msgid "HHCTA076E Error unloading %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:2025 +#, c-format +msgid "" +"HHC232I Invalid filename %s: TDF files must be in the TAPES subdirectory\n" +msgstr "" + +#: tapedev.c:2037 +#, fuzzy, c-format +msgid "HHCTA039E Error opening TDF file %s: %s\n" +msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" + +#: tapedev.c:2046 +#, fuzzy, c-format +msgid "HHCTA040E %s fstat error: %s\n" +msgstr "%d Bytes gelesen von %s\n" + +#: tapedev.c:2057 +#, fuzzy, c-format +msgid "HHCTA041E Cannot obtain buffer for TDF file %s: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: tapedev.c:2067 +#, fuzzy, c-format +msgid "HHCTA042E Error reading TDF file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:2080 +#, c-format +msgid "HHCTA043E %s is not a valid TDF file\n" +msgstr "" + +#: tapedev.c:2099 +#, fuzzy, c-format +msgid "HHCTA044E Cannot obtain buffer for TDF array: %s\n" +msgstr "Kann %s nicht öffnen: %s\n" + +#: tapedev.c:2147 +#, fuzzy, c-format +msgid "HHCTA045E Filename or format missing in line %d of file %s\n" +msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" + +#: tapedev.c:2159 +#, fuzzy, c-format +msgid "HHCTA046E Filename %s too long in line %d of file %s\n" +msgstr "HHC401I Bestandsnaam \"%2$s\" te lang (maximum=%1$ud)\n" + +#: tapedev.c:2211 +#, c-format +msgid "HHCTA047E RECSIZE keyword missing in line %d of file %s\n" +msgstr "" + +#: tapedev.c:2224 +#, c-format +msgid "HHCTA048E Invalid record size %s in line %d of file %s\n" +msgstr "" + +#: tapedev.c:2238 +#, c-format +msgid "HHCTA049E Invalid record format %s in line %d of file %s\n" +msgstr "" + +#: tapedev.c:2290 +#, c-format +msgid "HHCTA050E Attempt to access beyond end of tape %s\n" +msgstr "" + +#: tapedev.c:2322 +#, fuzzy, c-format +msgid "HHCTA051E Error opening %s: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: tapedev.c:2361 +#, fuzzy, c-format +msgid "HHCTA052E Error seeking to offset %8.8lX in file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:2376 +#, fuzzy, c-format +msgid "HHCTA053E Error reading block header at offset %8.8lX in file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:2389 +#, fuzzy, c-format +msgid "" +"HHCTA054E Unexpected end of file in block header at offset %8.8lX in file %" +"s\n" +msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" + +#: tapedev.c:2412 +#, c-format +msgid "HHCTA055E Invalid block header at offset %8.8lX in file %s\n" +msgstr "" + +#: tapedev.c:2479 +#, fuzzy, c-format +msgid "HHCTA056E Error reading data block at offset %8.8lX in file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:2492 +#, fuzzy, c-format +msgid "" +"HHCTA057E Unexpected end of file in data block at offset %8.8lX in file %s\n" +msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" + +#: tapedev.c:2530 +#, fuzzy, c-format +msgid "HHCTA058E Error seeking to offset %8.8lX in file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:2545 +#, fuzzy, c-format +msgid "HHCTA059E Error reading data block at offset %8.8lX in file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:2603 +#, fuzzy, c-format +msgid "HHCTA060E Error seeking to offset %8.8lX in file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:2660 +#, fuzzy, c-format +msgid "HHCTA061E Error reading data block at offset %8.8lX in file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:2672 +#, fuzzy, c-format +msgid "" +"HHCTA062E Unexpected end of file in data block at offset %8.8lX in file %s\n" +msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" + +#: tapedev.c:2684 +#, c-format +msgid "HHCTA063E Invalid zero length block at offset %8.8lX in file %s\n" +msgstr "" + +#: tapedev.c:2850 +#, fuzzy, c-format +msgid "HHCTA064E Error seeking to end of file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:2973 +#, fuzzy, c-format +msgid "HHCTA065E Error seeking to end of file %s: %s\n" +msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapedev.c:3227 +#, fuzzy, c-format +msgid "HHCTA100I %4.4X: Now Displays : %s\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: tapedev.c:3264 +#, c-format +msgid "HHCTA099I %4.4X:Tape Mount Request - (%s)\n" +msgstr "" + +#: tapedev.c:3276 +#, fuzzy, c-format +msgid "HHCTA099I %4.4X:Tape Presence - (%s)\n" +msgstr "Ongeldig frame adres %8.8X\n" + +#: tapedev.c:3287 +#, c-format +msgid "HHCTA099I %4.4X:Tape unmount/mount Request - (%s -> %s)\n" +msgstr "" + +#: tapedev.c:3888 +#, c-format +msgid "Mounted tape %s\n" +msgstr "" + +#: tapedev.c:3903 +#, c-format +msgid "" +"HHCTA999E Device %4.4X : Unable to determine tape format type for %s : " +"Internal error : Regcomp error %s on index %d\n" +msgstr "" + +#: tapedev.c:3918 +#, c-format +msgid "" +"HHCTA999E Device %4.4X : Unable to determine tape format type for %s : " +"Internal error : Regexec error %s on index %d\n" +msgstr "" + +#: tapedev.c:3922 +#, fuzzy, c-format +msgid "HHCTA998I Device %4.4X : %s is a %s\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: tapedev.c:3944 +#, c-format +msgid "XXXXXXXXX Device %4.4X : parameter: '%s'\n" +msgstr "" + +#: tapedev.c:3948 +#, fuzzy, c-format +msgid "HHCTA067E Device %4.4X : %s - Unrecognized parameter: '%s'\n" +msgstr "CPU%4.4X nicht konfiguriert\n" + +#: tapedev.c:3965 +#, c-format +msgid "HHCTA068E Method must be within %u-%u\n" +msgstr "" + +#: tapedev.c:3975 +#, c-format +msgid "HHCTA069E Level must be within %u-%u\n" +msgstr "" + +#: tapedev.c:3985 +#, c-format +msgid "HHCTA070E Chunksize must be within %u-%u\n" +msgstr "" + +#: tapedev.c:4021 +#, fuzzy, c-format +msgid "HHCTA071E Error in '%s' parameter\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: tapedev.c:4061 +#, c-format +msgid "TAPE Autoloader - Adding global parm %s\n" +msgstr "" + +#: tapedev.c:4126 +#, c-format +msgid "TAPE Autoloader : Adding tape entry %s\n" +msgstr "" + +#: tapedev.c:4171 +#, c-format +msgid "TAPE : Autoloader file request fn=%s\n" +msgstr "" + +#: tapedev.c:4457 +#, c-format +msgid "Unsupported device type specified %4.4x\n" +msgstr "" + +#: tapedev.c:4660 +#, c-format +msgid "HHCTA072E Data chaining not supported for CCW %2.2X\n" +msgstr "" + +#: tapedev.c:4860 +#, fuzzy, c-format +msgid "HHCTA077I Tape %4.4X unloaded\n" +msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: tapedev.c:5094 +#, c-format +msgid "HHCTA081I Locate block 0x%8.8lX on %4.4X\n" +msgstr "" + +#: timer.c:308 +#, fuzzy, c-format +msgid "HHCTT001W Timer thread set priority %d failed: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: timer.c:315 +#, fuzzy +msgid "HHCTT002I Timer thread started: tid=" +msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" + +#: timer.c:422 +#, fuzzy +msgid "HHCTT003I Timer thread ended\n" +msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" + +#: tuntap.c:115 +#, fuzzy, c-format +msgid "HHCTU001E Can not determine operating system: %s\n" +msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#: tuntap.c:126 +#, fuzzy, c-format +msgid "HHCTU002E Error opening TUN/TAP device: %s: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: tuntap.c:150 +#, fuzzy, c-format +msgid "HHCTU003E Error setting TUN/TAP mode: %s: %s\n" +msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" + +#: tuntap.c:171 +#, fuzzy, c-format +msgid "HHCTU004E Invalid TUN/TAP device name: %s\n" +msgstr "Ongeldig apparaat nummer\n" + +#: tuntap.c:208 +#, fuzzy, c-format +msgid "HHCTU005E Invalid net device name specified: %s\n" +msgstr "Ongeldig apparaat nummer\n" + +#: tuntap.c:218 +#, fuzzy, c-format +msgid "HHCTU006E %s: Invalid IP address: %s.\n" +msgstr "Ongeldig frame adres %8.8X\n" + +#: tuntap.c:244 +#, fuzzy, c-format +msgid "HHCTU007E Invalid net device name specified: %s\n" +msgstr "Ongeldig apparaat nummer\n" + +#: tuntap.c:254 +#, fuzzy, c-format +msgid "HHCTU008E %s: Invalid destination address: %s.\n" +msgstr "Ongeldig frame adres %8.8X\n" + +#: tuntap.c:280 +#, fuzzy, c-format +msgid "HHCTU009E Invalid net device name specified: %s\n" +msgstr "Ongeldig apparaat nummer\n" + +#: tuntap.c:290 +#, fuzzy, c-format +msgid "HHCTU010E %s: Invalid net mask: %s.\n" +msgstr "Ongeldig apparaat nummer\n" + +#: tuntap.c:317 +#, fuzzy, c-format +msgid "HHCTU011E Invalid net device name specified: %s\n" +msgstr "Ongeldig apparaat nummer\n" + +#: tuntap.c:326 +#, fuzzy, c-format +msgid "HHCTU012E %s: Invalid null or empty MTU.\n" +msgstr "Ongeldig frame adres %8.8X\n" + +#: tuntap.c:335 +#, fuzzy, c-format +msgid "HHCTU013E %s: Invalid MTU: %s.\n" +msgstr "Ongeldig frame adres %8.8X\n" + +#: tuntap.c:364 +#, fuzzy, c-format +msgid "HHCTU014E Invalid net device name specified: %s\n" +msgstr "Ongeldig apparaat nummer\n" + +#: tuntap.c:373 +#, fuzzy, c-format +msgid "HHCTU015E %s: Invalid MAC address: %s.\n" +msgstr "Ongeldig frame adres %8.8X\n" + +#: tuntap.c:401 +#, fuzzy, c-format +msgid "HHCTU016E Invalid net device name specified: %s\n" +msgstr "Ongeldig apparaat nummer\n" + +#: tuntap.c:430 +#, fuzzy, c-format +msgid "HHCTU017E Invalid net device name specified: %s\n" +msgstr "Ongeldig apparaat nummer\n" + +#: tuntap.c:443 +#, fuzzy, c-format +msgid "HHCTU018E %s: Invalid destiniation address: %s.\n" +msgstr "Ongeldig frame adres %8.8X\n" + +#: tuntap.c:454 +#, fuzzy, c-format +msgid "HHCTU019E %s: Invalid net mask: %s.\n" +msgstr "Ongeldig apparaat nummer\n" + +#: tuntap.c:466 +#, fuzzy, c-format +msgid "HHCTU020E %s: Invalid gateway address: %s.\n" +msgstr "Ongeldig frame adres %8.8X\n" + +#: tuntap.c:494 +#, fuzzy, c-format +msgid "HHCTU021E Invalid net device name specified: %s\n" +msgstr "Ongeldig apparaat nummer\n" + +#: tuntap.c:507 +#, fuzzy, c-format +msgid "HHCTU022E %s: Invalid destiniation address: %s.\n" +msgstr "Ongeldig frame adres %8.8X\n" + +#: tuntap.c:518 +#, fuzzy, c-format +msgid "HHCTU023E %s: Invalid net mask: %s.\n" +msgstr "Ongeldig apparaat nummer\n" + +#: tuntap.c:529 +#, fuzzy, c-format +msgid "HHCTU024E %s: Invalid gateway address: %s.\n" +msgstr "Ongeldig frame adres %8.8X\n" + +#: tuntap.c:576 +#, fuzzy, c-format +msgid "HHCTU025E Call to socketpair failed: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: tuntap.c:590 +#, fuzzy, c-format +msgid "HHCTU026E Call to fork failed: %s\n" +msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: tuntap.c:621 +#, fuzzy, c-format +msgid "HHCTU027E execl error on %s: %s.\n" +msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" + +#: version.c:154 +#, c-format +msgid "%sVersion %s\n" +msgstr "%sVersion %s\n" + +#: version.c:162 +#, fuzzy, c-format +msgid "Built on %s at %s\n" +msgstr "Draaiend op %s %s%s %s %s\n" + +#: version.c:166 +msgid "Build information:\n" +msgstr "Versionsdaten\n" + +#: vm.c:793 +#, c-format +msgid "HHCVM001I *%s* panel command issued by guest\n" +msgstr "" + +#: vm.c:809 +#, c-format +msgid "HHCVM002I *%s* command complete\n" +msgstr "" + +#: vm.c:813 +msgid "HHCVM003I Host command processing disabled by configuration statement" +msgstr "" + +#: vm.c:815 +msgid "HHCVM004E Host command processing not included in engine build" +msgstr "" + +#: w32chan.c:188 +#, c-format +msgid "HHC762I malloc(DEVIOREQUEST) failed; device=%4.4X, strerror=\"%s\"\n" +msgstr "" + +#: w32chan.c:251 +msgid "HHC765I *WARNING* max device threads exceeded.\n" +msgstr "" + +#: w32chan.c:348 +#, c-format +msgid "HHC761I malloc(DEVTHREADPARMS) failed; device=%4.4X, strerror=\"%s\"\n" +msgstr "" + +#: w32chan.c:357 +#, c-format +msgid "" +"HHC763I CreateEvent(hShutdownEvent) failed; device=%4.4X, strerror=\"%s\"\n" +msgstr "" + +#: w32chan.c:367 +#, c-format +msgid "" +"HHC764I CreateEvent(hRequestQueuedEvent) failed; device=%4.4X, strerror=\"%s" +"\"\n" +msgstr "" + +#: w32chan.c:388 +#, c-format +msgid "" +"HHC760I fthread_create(DeviceThread) failed; device=%4.4X, strerror=\"%s\"\n" +msgstr "" + +#, fuzzy +#~ msgid "HHCCF050I Device %4.4X defined as %4.4X\n" +#~ msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#, fuzzy +#~ msgid "HHCHD004I No registration section in %s: %s\n" +#~ msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#, fuzzy +#~ msgid "HHCHD008I No registration section in %s: %s\n" +#~ msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#, fuzzy +#~ msgid "HHCCP008I CPU%4.4X thread ended: tid=%p, pid=%d\n" +#~ msgstr "HHC624I CPU%4.4X thread geeindigd: tid=%8.8lX, pid=%d\n" + +#, fuzzy +#~ msgid "HHCDL001E Cannot open %s: %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" + +#, fuzzy +#~ msgid "HHCDL002E Volume serial statement missing from %s\n" +#~ msgstr "Ongeldig apparaat nummer\n" + +#, fuzzy +#~ msgid "HHCDL003E Volume serial %s in %s line %d is not valid\n" +#~ msgstr "Ongeldig apparaat nummer\n" + +#, fuzzy +#~ msgid "HHCDL004E Device type %s in %s line %d is not recognized\n" +#~ msgstr "Ongeldig apparaat nummer\n" + +#, fuzzy +#~ msgid "HHCDL005E %s in %s line %d is not a valid cylinder count\n" +#~ msgstr "Ongeldig apparaat nummer\n" + +#, fuzzy +#~ msgid "HHCDL006I Creating %4.4X volume %s: %u trks/cyl, %u bytes/track\n" +#~ msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" + +#, fuzzy +#~ msgid "HHCDL007E Cannot create %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" + +#, fuzzy +#~ msgid "HHCDL008E Cannot open %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" + +#, fuzzy +#~ msgid "HHCDL009I Loading %4.4X volume %s\n" +#~ msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" + +#, fuzzy +#~ msgid "HHCDL010E Cannot obtain storage for DSCB pointer array: %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" + +#, fuzzy +#~ msgid "HHCDL011E Invalid statement in %s line %d\n" +#~ msgstr "HHC422I Optie %s niet geldig\n" + +#, fuzzy +#~ msgid "HHCDL012I Creating dataset %s at cyl %d head %d\n" +#~ msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#, fuzzy +#~ msgid "HHCDL013I Dataset %s contains %d track%s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" + +#, fuzzy +#~ msgid "HHCDL014I Free space starts at cyl %d head %d\n" +#~ msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#, fuzzy +#~ msgid "HHCDL015W Volume exceeds %d cylinders\n" +#~ msgstr "HHC410I Ponskaart %d bytes te groot in bestand \"%s\"\n" + +#, fuzzy +#~ msgid "HHCDL017I Updating VTOC pointer %2.2X%2.2X%2.2X%2.2X%2.2X\n" +#~ msgstr "" +#~ "%4.4X ckddasd: Kopfdaten ungültig für Zyl. %d Spur %d %2.2x%2.2x%2.2x%" +#~ "2.2x%2.2x\n" + +#, fuzzy +#~ msgid "HHCDL018E Cannot read VOL1 record\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" + +#, fuzzy +#~ msgid "HHCDL019E Cannot read %s line %d: %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" + +#, fuzzy +#~ msgid "HHCDL020E Line too long in %s line %d\n" +#~ msgstr "HHC401I Bestandsnaam \"%2$s\" te lang (maximum=%1$ud)\n" + +#, fuzzy +#~ msgid "HHCDL021E DSNAME or initialization method missing\n" +#~ msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" + +#, fuzzy +#~ msgid "HHCDL022E Invalid initialization method: %s\n" +#~ msgstr "Ongeldig frame adres %8.8X\n" + +#, fuzzy +#~ msgid "HHCDL023E Initialization file name missing\n" +#~ msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" + +#, fuzzy +#~ msgid "HHCDL024E Invalid allocation units: %s\n" +#~ msgstr "HHC422I Optie %s niet geldig\n" + +#, fuzzy +#~ msgid "HHCDL025E Invalid primary space: %s\n" +#~ msgstr "Ongeldig bereik: %s\n" + +#, fuzzy +#~ msgid "HHCDL026E Invalid secondary space: %s\n" +#~ msgstr "Ongeldige waarde: %s\n" + +#, fuzzy +#~ msgid "HHCDL027E Invalid directory space: %s\n" +#~ msgstr "Ongeldige waarde: %s\n" + +#, fuzzy +#~ msgid "HHCDL028E Invalid dataset organization: %s\n" +#~ msgstr "HHC422I Optie %s niet geldig\n" + +#, fuzzy +#~ msgid "HHCDL029E Invalid record format: %s\n" +#~ msgstr "HHC422I Optie %s niet geldig\n" + +#, fuzzy +#~ msgid "HHCDL030E Invalid logical record length: %s\n" +#~ msgstr "HHC422I Optie %s niet geldig\n" + +#, fuzzy +#~ msgid "HHCDL031E Invalid block size: %s\n" +#~ msgstr "Ongeldige waarde: %s\n" + +#, fuzzy +#~ msgid "HHCDL032E Invalid key length: %s\n" +#~ msgstr "HHC422I Optie %s niet geldig\n" + +#, fuzzy +#~ msgid "HHCDL033E CCHH=%4.4X%4.4X not found in extent table\n" +#~ msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#, fuzzy +#~ msgid "HHCDL034E Cannot open %s: %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" + +#, fuzzy +#~ msgid "HHCDL035E Cannot read %s: %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" + +#, fuzzy +#~ msgid "HHCDL036E %s is not a valid object file\n" +#~ msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" + +#, fuzzy +#~ msgid "HHCDL038E TXT record in %s has invalid count %d\n" +#~ msgstr "Ongeldig apparaat nummer\n" + +#, fuzzy +#~ msgid "HHCDL039E IPL text in %s exceeds %d bytes\n" +#~ msgstr "HHC410I Ponskaart %d bytes te groot in bestand \"%s\"\n" + +#, fuzzy +#~ msgid "HHCDL043E %s cyl %d head %d read error\n" +#~ msgstr "%d Bytes gelesen von %s\n" + +#, fuzzy +#~ msgid "" +#~ "HHCDL044E %s cyl %d head %d invalid track header %2.2X%2.2X%2.2X%2.2X%" +#~ "2.2X\n" +#~ msgstr "" +#~ "%4.4X ckddasd: Kopfdaten ungültig für Zyl. %d Spur %d %2.2x%2.2x%2.2x%" +#~ "2.2x%2.2x\n" + +#, fuzzy +#~ msgid "HHCDL045E %s cyl %d head %d rec %d record not found\n" +#~ msgstr "%d Bytes gelesen von %s\n" + +#, fuzzy +#~ msgid "HHCDL046E Cannot update cyl %d head %d rec %d: Unmatched KL/DL\n" +#~ msgstr "%d Bytes gelesen von %s\n" + +#, fuzzy +#~ msgid "HHCDL047E %s cyl %d head %d read error\n" +#~ msgstr "%d Bytes gelesen von %s\n" + +#, fuzzy +#~ msgid "HHCDL049E Cannot obtain storage for DSCB: %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" + +#, fuzzy +#~ msgid "HHCDL050E DSCB count exceeds %d, increase MAXDSCB\n" +#~ msgstr "HHC410I Ponskaart %d bytes te groot in bestand \"%s\"\n" + +#, fuzzy +#~ msgid "HHCDL051E Cannot obtain storage for DSCB: %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" + +#, fuzzy +#~ msgid "HHCDL052E DSCB count exceeds %d, increase MAXDSCB\n" +#~ msgstr "HHC410I Ponskaart %d bytes te groot in bestand \"%s\"\n" -#: tapedev.c:1959 -#, fuzzy, c-format -msgid "HHCTA052E Error seeking to offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL053E Cannot obtain storage for DSCB: %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" -#: tapedev.c:1975 -#, fuzzy, c-format -msgid "HHCTA053E Error reading block header at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL054E DSCB count exceeds %d, increase MAXDSCB\n" +#~ msgstr "HHC410I Ponskaart %d bytes te groot in bestand \"%s\"\n" -#: tapedev.c:1989 -#, fuzzy, c-format -msgid "" -"HHCTA054E Unexpected end of file in block header at offset %8.8lX in file %" -"s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +#, fuzzy +#~ msgid "HHCDL056E Error reading VTOC cyl %d head %d\n" +#~ msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: tapedev.c:2015 -#, c-format -msgid "HHCTA055E Invalid block header at offset %8.8lX in file %s\n" -msgstr "" +#, fuzzy +#~ msgid "HHCDL057I VTOC starts at cyl %d head %d and is %d track%s\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: tapedev.c:2084 -#, fuzzy, c-format -msgid "HHCTA056E Error reading data block at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL060E Error reading track cyl %d head %d\n" +#~ msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: tapedev.c:2098 -#, fuzzy, c-format -msgid "" -"HHCTA057E Unexpected end of file in data block at offset %8.8lX in file %s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +#, fuzzy +#~ msgid "HHCDL066E %s read error: %s\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: tapedev.c:2139 -#, fuzzy, c-format -msgid "HHCTA058E Error seeking to offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL067E %s invalid segment header: %2.2X%2.2X\n" +#~ msgstr "Ongeldig frame adres %8.8X\n" -#: tapedev.c:2155 -#, fuzzy, c-format -msgid "HHCTA059E Error reading data block at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL068E %s first segment indicator expected\n" +#~ msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: tapedev.c:2215 -#, fuzzy, c-format -msgid "HHCTA060E Error seeking to offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL069E %s first segment indicator not expected\n" +#~ msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: tapedev.c:2273 -#, fuzzy, c-format -msgid "HHCTA061E Error reading data block at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL071E %s read error: %s\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: tapedev.c:2287 -#, fuzzy, c-format -msgid "" -"HHCTA062E Unexpected end of file in data block at offset %8.8lX in file %s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +#, fuzzy +#~ msgid "HHCDL072E %s read error: %s\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: tapedev.c:2302 -#, c-format -msgid "HHCTA063E Invalid zero length block at offset %8.8lX in file %s\n" -msgstr "" +#, fuzzy +#~ msgid "HHCDL073E %s read error: %s\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: tapedev.c:2425 -#, fuzzy, c-format -msgid "HHCTA064E Error seeking to end of file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL074E %s read error: %s\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: tapedev.c:2549 -#, fuzzy, c-format -msgid "HHCTA065E Error seeking to end of file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL075E %s read error: %s\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: tapedev.c:2717 -#, c-format -msgid "HHCTA066I Tape msg %4.4X: %c %s %s\n" -msgstr "" +#, fuzzy +#~ msgid "HHCDL076I File number: %d\n" +#~ msgstr "Ongeldig apparaat nummer\n" -#: tapedev.c:3082 -#, c-format -msgid "HHCTA072E Data chaining not supported for CCW %2.2X\n" -msgstr "" +#, fuzzy +#~ msgid "HHCDL077E Invalid text unit at offset %4.4X\n" +#~ msgstr "Ongeldig apparaat nummer\n" -#: tapedev.c:3264 -#, fuzzy, c-format -msgid "HHCTA073E Error rewinding %s: %s\n" -msgstr "HHC407I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL080E Invalid text unit at offset %4.4X\n" +#~ msgstr "Ongeldig apparaat nummer\n" -#: tapedev.c:3287 -#, fuzzy, c-format -msgid "HHCTA074E Error seeking to start of %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL081E COPYR1 record length is invalid\n" +#~ msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" -#: tapedev.c:3304 -#, fuzzy, c-format -msgid "HHCTA075E Error seeking to start of %s: %s(%s)\n" -msgstr "HHC407I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL087I COPYR2 record length is invalid\n" +#~ msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" -#: tapedev.c:3466 -#, fuzzy, c-format -msgid "HHCTA076E Error unloading %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL088I Invalid number of extents %d\n" +#~ msgstr "Ongeldig apparaat nummer\n" -#: tapedev.c:3479 -#, fuzzy, c-format -msgid "HHCTA077I Tape %4.4X unloaded\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +#, fuzzy +#~ msgid "HHCDL090I End of directory\n" +#~ msgstr "HHC403I Niet genoeg geheugen\n" -#: tapedev.c:3826 -#, fuzzy, c-format -msgid "HHCTA078E Error rewinding %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL091E Directory block record length is invalid\n" +#~ msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" -#: tapedev.c:3842 -#, fuzzy, c-format -msgid "HHCTA079E Error seeking to start of %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL092E Cannot obtain storage for directory block: %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" -#: tapedev.c:3859 -#, fuzzy, c-format -msgid "HHCTA080E Error seeking to start of %s: %s(%s)\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL094E Directory block byte count is invalid\n" +#~ msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" -#: tapedev.c:3877 -#, c-format -msgid "HHCTA081I Locate block 0x%8.8lX on %4.4X\n" -msgstr "" +#, fuzzy +#~ msgid "HHCDL099E %s cyl %d head %d read error\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: timer.c:284 #, fuzzy -msgid "HHCCP012I Timer thread started: tid=" -msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" +#~ msgid "" +#~ "HHCDL100E %s cyl %d head %d invalid track header %2.2X%2.2X%2.2X%2.2X%" +#~ "2.2X\n" +#~ msgstr "" +#~ "%4.4X ckddasd: Kopfdaten ungültig für Zyl. %d Spur %d %2.2x%2.2x%2.2x%" +#~ "2.2x%2.2x\n" -#: timer.c:385 -msgid "HHCCP013I Timer thread ended\n" -msgstr "" +#, fuzzy +#~ msgid "HHCDL101E %s cyl %d head %d rec %d note list record not found\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: tuntap.c:102 -#, fuzzy, c-format -msgid "HHCTU001E Can not determine operating system: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL103E %s track read error cyl %d head %d\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: tuntap.c:113 -#, fuzzy, c-format -msgid "HHCTU002E Error opening TUN/TAP device: %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL105E Directory block byte count is invalid\n" +#~ msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" -#: tuntap.c:137 -#, fuzzy, c-format -msgid "HHCTU003E Error setting TUN/TAP mode: %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL106E Cannot open %s: %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" -#: tuntap.c:158 -#, fuzzy, c-format -msgid "HHCTU004E Invalid TUN/TAP device name: %s\n" -msgstr "Ongeldig apparaat nummer\n" +#, fuzzy +#~ msgid "HHCDL107E Cannot obtain input buffer: %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" -#: tuntap.c:195 -#, fuzzy, c-format -msgid "HHCTU005E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +#, fuzzy +#~ msgid "HHCDL108E Cannot obtain storage for directory block array: %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" -#: tuntap.c:205 -#, fuzzy, c-format -msgid "HHCTU006E %s: Invalid IP address: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +#, fuzzy +#~ msgid "HHCDL109E Cannot obtain storage for TTR table: %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" -#: tuntap.c:231 -#, fuzzy, c-format -msgid "HHCTU007E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +#, fuzzy +#~ msgid "HHCDL110I Processing file %s\n" +#~ msgstr "Geen apparaat nummer\n" -#: tuntap.c:241 -#, fuzzy, c-format -msgid "HHCTU008E %s: Invalid destination address: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +#, fuzzy +#~ msgid "HHCDL111I Control record: %s length %d\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" -#: tuntap.c:267 -#, fuzzy, c-format -msgid "HHCTU009E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +#, fuzzy +#~ msgid "HHCDL113I Data record: length %d\n" +#~ msgstr "HHC422I Optie %s niet geldig\n" -#: tuntap.c:277 -#, fuzzy, c-format -msgid "HHCTU010E %s: Invalid net mask: %s.\n" -msgstr "Ongeldig apparaat nummer\n" +#, fuzzy +#~ msgid "HHCDL116E TTR count exceeds %d, increase MAXTTR\n" +#~ msgstr "HHC410I Ponskaart %d bytes te groot in bestand \"%s\"\n" -#: tuntap.c:304 -#, fuzzy, c-format -msgid "HHCTU011E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +#, fuzzy +#~ msgid "HHCDL117I Catalog block at cyl %d head %d rec %d\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: tuntap.c:313 -#, fuzzy, c-format -msgid "HHCTU012E %s: Invalid null or empty MTU.\n" -msgstr "Ongeldig frame adres %8.8X\n" +#, fuzzy +#~ msgid "HHCDL118I Catalog block at cyl %d head %d rec %d\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: tuntap.c:322 -#, fuzzy, c-format -msgid "HHCTU013E %s: Invalid MTU: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +#, fuzzy +#~ msgid "HHCDL119I Catalog block at cyl %d head %d rec %d\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: tuntap.c:351 -#, fuzzy, c-format -msgid "HHCTU014E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +#, fuzzy +#~ msgid "HHCDL120I DIP complete at cyl %d head %d rec %d\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: tuntap.c:360 -#, fuzzy, c-format -msgid "HHCTU015E %s: Invalid MAC address: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +#, fuzzy +#~ msgid "HHCDL125E Cannot open %s: %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" -#: tuntap.c:388 -#, fuzzy, c-format -msgid "HHCTU016E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +#, fuzzy +#~ msgid "HHCDL126E Cannot stat %s: %s\n" +#~ msgstr "Kann %s nicht öffnen: %s\n" -#: tuntap.c:417 -#, fuzzy, c-format -msgid "HHCTU017E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +#, fuzzy +#~ msgid "HHCDL127E %s cyl %d head %d read error\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: tuntap.c:430 -#, fuzzy, c-format -msgid "HHCTU018E %s: Invalid destiniation address: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +#, fuzzy +#~ msgid "HHCDL128E %s read error: %s\n" +#~ msgstr "%d Bytes gelesen von %s\n" -#: tuntap.c:441 -#, fuzzy, c-format -msgid "HHCTU019E %s: Invalid net mask: %s.\n" -msgstr "Ongeldig apparaat nummer\n" +#, fuzzy +#~ msgid "HHCDA025E error writing trk %d: lseek error: %s\n" +#~ msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: tuntap.c:453 -#, fuzzy, c-format -msgid "HHCTU020E %s: Invalid gateway address: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +#, fuzzy +#~ msgid "HHCDA026E error writing trk %d: write error: %s\n" +#~ msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: tuntap.c:481 -#, fuzzy, c-format -msgid "HHCTU021E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +#, fuzzy +#~ msgid "HHCDA059E Unexpected end of file in %s\n" +#~ msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" -#: tuntap.c:494 -#, fuzzy, c-format -msgid "HHCTU022E %s: Invalid destiniation address: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +#, fuzzy +#~ msgid "HHCDA060E Read error in file %s: %s\n" +#~ msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: tuntap.c:505 -#, fuzzy, c-format -msgid "HHCTU023E %s: Invalid net mask: %s.\n" -msgstr "Ongeldig apparaat nummer\n" +#, fuzzy +#~ msgid "HHCDA071E Seek error in file %s: %s\n" +#~ msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: tuntap.c:516 -#, fuzzy, c-format -msgid "HHCTU024E %s: Invalid gateway address: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +#, fuzzy +#~ msgid "HHCPN068E Device number %s is invalid\n" +#~ msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" -#: tuntap.c:564 -#, fuzzy, c-format -msgid "HHCTU025E Call to socketpair failed: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#, fuzzy +#~ msgid " CPU%4.4X: CPU %swaiting for interlock\n" +#~ msgstr "CPU%4.4X: CPU Status: %s\n" -#: tuntap.c:578 -#, fuzzy, c-format -msgid "HHCTU026E Call to fork failed: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCPR009E %4.4X dup2 error: %s\n" +#~ msgstr "HHC760I %4.4X create_thread fout: %s" -#: tuntap.c:594 -#, fuzzy, c-format -msgid "HHCTU027E execl error on %s: %s.\n" -msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "" +#~ "HHCTA005E Unexpected end of file in block header at offset %8.8lX in file " +#~ "%s\n" +#~ msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" -#: version.c:143 -#, c-format -msgid "%sVersion %s\n" -msgstr "%sVersion %s\n" +#, fuzzy +#~ msgid "HHCTA008E Error seeking to offset %8.8lX in file %s: %s\n" +#~ msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: version.c:151 -#, fuzzy, c-format -msgid "Built on %s at %s\n" -msgstr "Draaiend op %s %s%s %s %s\n" +#, fuzzy +#~ msgid "HHCTA074E Error seeking to start of %s: %s\n" +#~ msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" -#: version.c:155 -msgid "Build information:\n" -msgstr "Versionsdaten\n" +#, fuzzy +#~ msgid "HHCTA079E Error seeking to start of %s: %s\n" +#~ msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" #, fuzzy -#~ msgid "HHCCP002I CPU%4.4X thread started: tid=%8.8lX, pid=%d, priority=%d\n" -#~ msgstr "" -#~ "HHC620I CPU%4.4X thread gestart: tid=%8.8lX, pid=%d, prioriteit=%d\n" +#~ msgid "HHCTA080E Error seeking to start of %s: %s(%s)\n" +#~ msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" #, fuzzy #~ msgid "LCS002E %4.4X invalid device name %s\n" @@ -3922,10 +7314,6 @@ msgstr "Versionsdaten\n" #~ msgid "TIO modification executed CC=1\n" #~ msgstr "TIO modificatie uitgevoerd CC=1\n" -#, fuzzy -#~ msgid "HHCxxxI savecore: %s: %s\n" -#~ msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" - #, fuzzy #~ msgid "Initialization failed for device %4.4X\n" #~ msgstr "CCW Ablaufverfolgung ist %s für %4.4X\n" @@ -3959,12 +7347,6 @@ msgstr "Versionsdaten\n" #~ msgid "%s command invalid. Enter ? for help\n" #~ msgstr "%s is ungültig. ? zeigt Hilfetext\n" -#~ msgid "*** decompress error for track %d: %d\n" -#~ msgstr "*** Fehler beim De-Komprimieren für Spur %d: %d\n" - -#~ msgid "*** track %d HA validation error !! %2.2x%2.2x%2.2x%2.2x%2.2x\n" -#~ msgstr "*** Spur %d HA Validierungsfehler! %2.2x%2.2x%2.2x%2.2x%2.2x\n" - #~ msgid "" #~ "*** track %d R%d validation error !! %2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%" #~ "2.2x\n" @@ -3982,9 +7364,6 @@ msgstr "Versionsdaten\n" #~ msgid "*** track %d size mismatch !! size found %d, expected %d\n" #~ msgstr "*** Spur %d hat falsche Länge!. Gefunden: %d, erwartet %d\n" -#~ msgid "*** uncompress error for track %d: %d\n" -#~ msgstr "*** Fehler beim Entpacken für Spur %d: %d\n" - #~ msgid "*** unknown compression for track %d: %d\n" #~ msgstr "*** Komprimierungsverfahren für Spur %d: %d ist unbekannt\n" diff --git a/po/hercules.pot b/po/hercules.pot index 9751b0e..c36c8b1 100644 --- a/po/hercules.pot +++ b/po/hercules.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2003-02-12 22:25-0600\n" +"POT-Creation-Date: 2003-10-02 19:25-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -15,6 +15,35 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" +#: cache.c:384 +#, c-format +msgid "HHCCHxxxE calloc failed cache[%d] size %d: %s\n" +msgstr "" + +#: cache.c:506 +#, c-format +msgid "HHCCHxxxW realloc increase failed cache[%d] size %d: %s\n" +msgstr "" + +#: cache.c:525 +#, c-format +msgid "HHCCHxxxW realloc decrease failed cache[%d] size %d: %s\n" +msgstr "" + +#: cache.c:541 +#, c-format +msgid "HHCCHxxxW buf calloc failed cache[%d] size %d: %s\n" +msgstr "" + +#: cache.c:543 +msgid "HHCCHxxxW releasing inactive buffer space\n" +msgstr "" + +#: cache.c:548 +#, c-format +msgid "HHCCHxxxE Unable to calloc buf cache[%d] size %d: %s\n" +msgstr "" + #: cardpch.c:34 #, c-format msgid "HHCPU004E Error writing to %s: %s\n" @@ -24,102 +53,102 @@ msgstr "" msgid "HHCPU001E File name missing or invalid\n" msgstr "" -#: cardpch.c:89 +#: cardpch.c:92 #, c-format msgid "HHCPU002E Invalid argument: %s\n" msgstr "" -#: cardpch.c:167 +#: cardpch.c:170 #, c-format msgid "HHCPU003E Error opening file %s: %s\n" msgstr "" -#: cardrdr.c:58 +#: cardrdr.c:78 msgid "HHCRD001E Out of memory\n" msgstr "" -#: cardrdr.c:156 +#: cardrdr.c:176 #, c-format msgid "HHCRD002E File name too long (max=%ud): \"%s\"\n" msgstr "" -#: cardrdr.c:163 +#: cardrdr.c:183 #, c-format msgid "HHCRD003E Unable to access file \"%s\": %s\n" msgstr "" -#: cardrdr.c:173 +#: cardrdr.c:193 msgid "HHCRD004E Out of memory\n" msgstr "" -#: cardrdr.c:186 +#: cardrdr.c:206 msgid "HHCRD005E Specify 'ascii' or 'ebcdic' (or neither) but not both\n" msgstr "" -#: cardrdr.c:195 +#: cardrdr.c:215 msgid "HHCRD006E Only one filename (sock_spec) allowed for socket devices\n" msgstr "" -#: cardrdr.c:210 +#: cardrdr.c:230 #, c-format msgid "HHCRD007I Defaulting to 'ascii' for socket device %4.4X\n" msgstr "" -#: cardrdr.c:218 +#: cardrdr.c:238 msgid "HHCRD008W 'multifile' option ignored: only one file specified\n" msgstr "" -#: cardrdr.c:231 +#: cardrdr.c:251 #, c-format msgid "HHCRD009E File name too long (max=%ud): \"%s\"\n" msgstr "" -#: cardrdr.c:245 +#: cardrdr.c:265 #, c-format msgid "HHCRD010E Unable to access file \"%s\": %s\n" msgstr "" -#: cardrdr.c:320 +#: cardrdr.c:342 #, c-format msgid "HHCRD011E Close error on file \"%s\": %s\n" msgstr "" -#: cardrdr.c:329 +#: cardrdr.c:351 #, c-format msgid "HHCRD012I %s (%s) disconnected from device %4.4X (%s)\n" msgstr "" -#: cardrdr.c:458 +#: cardrdr.c:492 #, c-format msgid "HHCRD013E Error opening file %s: %s\n" msgstr "" -#: cardrdr.c:482 +#: cardrdr.c:516 #, c-format msgid "HHCRD014E Error reading file %s: %s\n" msgstr "" -#: cardrdr.c:515 +#: cardrdr.c:549 #, c-format msgid "HHCRD015E Seek error in file %s: %s\n" msgstr "" -#: cardrdr.c:582 +#: cardrdr.c:617 #, c-format msgid "HHCRD016E Error reading file %s: %s\n" msgstr "" -#: cardrdr.c:585 +#: cardrdr.c:620 #, c-format msgid "HHCRD017E Unexpected end of file on %s\n" msgstr "" -#: cardrdr.c:649 +#: cardrdr.c:685 #, c-format msgid "HHCRD018E Error reading file %s: %s\n" msgstr "" -#: cardrdr.c:677 +#: cardrdr.c:713 #, c-format msgid "HHCRD019E Card image exceeds %d bytes in file %s\n" msgstr "" @@ -176,3051 +205,5708 @@ msgid "" "\n" msgstr "" -#: cckdswap.c:56 -#, c-format -msgid "cckdswap: error opening %s: %s\n" -msgstr "" - -#: cckdswap.c:65 cckdswap.c:82 +#: cckdcomp.c:79 #, c-format -msgid "cckdswap: %s read error: %s\n" +msgid "cckdcomp: lseek error: %s\n" msgstr "" -#: cckdswap.c:73 +#: cckdcomp.c:85 #, c-format -msgid "cckdswap: %s is not a compressed ckd file\n" +msgid "cckdcomp: read error: %s\n" msgstr "" -#: cckdswap.c:94 -msgid "cckdswap: error during swap\n" +#: cckdcomp.c:91 +msgid "cckdcomp: OPENED bit is on, use `-f'\n" msgstr "" -#: cckdswap.c:98 +#: cckddasd.c:270 #, c-format -msgid "cckdswap: %s changed from %s to %s\n" +msgid "HHCCD100E malloc failed for cckd extension: %s\n" msgstr "" -#: cckdswap.c:109 -msgid "" -"usage: cckdswap cckd-file\n" -"\n" -" cckd-file -- name of the compressed ckd\n" -" file which will have its\n" -" byte order swapped\n" +#: cckddasd.c:305 +msgid "HHCCD101E error initializing shadow files\n" msgstr "" -#: channel.c:95 +#: cckddasd.c:1251 #, c-format -msgid "HHCCP048I %4.4X:CCW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X%s\n" +msgid "HHCCD001I Readahead thread %d started: tid=" msgstr "" -#: channel.c:109 +#: cckddasd.c:1251 cckddasd.c:1301 cckddasd.c:1445 cckddasd.c:1552 +#: cckddasd.c:4256 console.c:1311 cpu.c:1085 httpserv.c:585 panel.c:852 +#: shared.c:2481 shared.c:2644 sockdev.c:387 #, c-format -msgid "HHCCP049I %4.4X:Stat=%2.2X%2.2X Count=%2.2X%2.2X CCW=%2.2X%2.2X%2.2X\n" +msgid ", pid=%d\n" msgstr "" -#: channel.c:124 +#: cckddasd.c:1301 #, c-format -msgid "" -"HHCCP050I %4.4X:SCSW=%2.2X%2.2X%2.2X%2.2X Stat=%2.2X%2.2X Count=%2.2X%2.2X " -"CCW=%2.2X%2.2X%2.2X%2.2X\n" +msgid "HHCCD011I Readahead thread %d stopping: tid=" msgstr "" -#: channel.c:229 +#: cckddasd.c:1445 #, c-format -msgid "HHCCP051I %4.4X: Test I/O\n" +msgid "HHCCD002I Writer thread %d started: tid=" msgstr "" -#: channel.c:288 -msgid "HHCCP052I TIO modification executed CC=1\n" -msgstr "" - -#: channel.c:329 +#: cckddasd.c:1552 #, c-format -msgid "HHCCP053I %4.4X: Halt I/O\n" +msgid "HHCCD012I Writer thread %d stopping: tid=" msgstr "" -#: channel.c:374 -msgid "HHCCP054I HIO modification executed CC=1\n" -msgstr "" - -#: channel.c:715 +#: cckddasd.c:1596 #, c-format -msgid "HHCCP055I %4.4X: Clear subchannel\n" +msgid "HHCCD102E file[%d] get space error, size exceeds 4G\n" msgstr "" -#: channel.c:831 +#: cckddasd.c:1603 #, c-format -msgid "HHCCP056I %4.4X: Halt subchannel\n" +msgid "HHCCD103E file[%d] get space fstat error, size %llx: %s\n" msgstr "" -#: channel.c:854 +#: cckddasd.c:1623 #, c-format -msgid "HHCCP057I %4.4X: Halt subchannel: cc=1\n" +msgid "HHCCD104E truncate re-open error: %s\n" msgstr "" -#: channel.c:864 +#: cckddasd.c:1651 #, c-format -msgid "HHCCP058I %4.4X: Halt subchannel: cc=2\n" +msgid "HHCCD105E file[%d] get space ftruncate error, size %llx: %s\n" msgstr "" -#: channel.c:940 +#: cckddasd.c:1982 #, c-format -msgid "HHCCP059I %4.4X: Halt subchannel: cc=0\n" +msgid "HHCCD106E file[%d] hdr lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:978 +#: cckddasd.c:1991 #, c-format -msgid "HHCCP060I %4.4X: Resume subchannel: cc=1\n" +msgid "HHCCD107E file[%d] chdr read error, offset %llx: %s\n" msgstr "" -#: channel.c:992 +#: cckddasd.c:2035 #, c-format -msgid "HHCCP061I %4.4X: Resume subchannel: cc=2\n" +msgid "HHCCD108E file[%d] chdr lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:1012 +#: cckddasd.c:2042 #, c-format -msgid "HHCCP062I %4.4X: Resume subchannel: cc=0\n" +msgid "HHCCD109E file[%d] chdr write error, offset %llx: %s\n" msgstr "" -#: channel.c:1532 +#: cckddasd.c:2073 #, c-format -msgid "HHCCP063I %4.4X:IDAW=%8.8X Len=%3.3hX%s\n" +msgid "HHCCD110E l1 table malloc error: %s\n" msgstr "" -#: channel.c:1537 +#: cckddasd.c:2082 #, c-format -msgid "" -"HHCCP064I %4.4X:IDAW=%16.16llX Len=%4.4hX\n" -"%4.4X:---------------------%s\n" +msgid "HHCCD111E file[%d] l1 lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:1641 +#: cckddasd.c:2089 #, c-format -msgid "HHCCP065I DEV%4.4X: attention signalled\n" +msgid "HHCCD112E file[%d] l1 read error, offset %llx: %s\n" msgstr "" -#: channel.c:1652 +#: cckddasd.c:2121 #, c-format -msgid "HHCCP066I DEV%4.4X: attention\n" +msgid "HHCCD113E file[%d] l1 lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:1852 +#: cckddasd.c:2128 #, c-format -msgid "HHCCP067E %4.4X create_thread error: %s" +msgid "HHCCD114E file[%d] l1 write error, offset %llx: %s\n" msgstr "" -#: channel.c:1870 +#: cckddasd.c:2158 #, c-format -msgid "HHCCP068E %4.4X create_thread error: %s" +msgid "HHCCD115E file[%d] l1[%d] lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:2026 +#: cckddasd.c:2165 #, c-format -msgid "HHCCP069I Device %4.4X initial status interrupt\n" +msgid "HHCCD116E file[%d] l1[%d] write error, offset %llx: %s\n" msgstr "" -#: channel.c:2067 +#: cckddasd.c:2195 #, c-format -msgid "HHCCP070I Device %4.4X attention completed\n" +msgid "HHCCD117E file[%d] devhdr lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:2131 +#: cckddasd.c:2202 #, c-format -msgid "HHCCP071I Device %4.4X clear completed\n" +msgid "HHCCD118E file[%d] devhdr read error, offset %llx: %s\n" msgstr "" -#: channel.c:2179 +#: cckddasd.c:2215 #, c-format -msgid "HHCCP072I Device %4.4X halt completed\n" +msgid "HHCCD119E file[%d] devhdr id error\n" msgstr "" -#: channel.c:2345 +#: cckddasd.c:2257 #, c-format -msgid "HHCCP073I Device %4.4X suspended\n" +msgid "HHCCD120E calloc failed for free space, size %d: %s\n" msgstr "" -#: channel.c:2364 +#: cckddasd.c:2272 #, c-format -msgid "HHCCP074I Device %4.4X resumed\n" +msgid "HHCCD121E file[%d] free space lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:2628 +#: cckddasd.c:2279 #, c-format -msgid "HHCCP075I %4.4X:Stat=%2.2X%2.2X Count=%4.4X %s\n" +msgid "HHCCD122E file[%d] free space read error, offset %llx: %d,%d %s\n" msgstr "" -#: channel.c:2634 +#: cckddasd.c:2292 #, c-format -msgid "" -"HHCCP076I %4.4X:Sense=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%" -"2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X\n" +msgid "HHCCD123E file[%d] free space ftruncate error, size %llx: %s\n" msgstr "" -#: channel.c:2649 +#: cckddasd.c:2309 #, c-format -msgid "HHCCP077I %4.4X:Sense=%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n" +msgid "HHCCD124E file[%d] free space lseek error, offset %llx: %s\n" msgstr "" -#: ckddasd.c:231 -msgid "HHCDA001E File name missing or invalid\n" +#: cckddasd.c:2316 +#, c-format +msgid "HHCCD125E file[%d] free space read error, offset %llx: %d,%d,%d %s\n" msgstr "" -#: ckddasd.c:339 +#: cckddasd.c:2373 #, c-format -msgid "HHCDA002E parameter %d is invalid: %s\n" +msgid "HHCCD126E file[%d] free space lseek error, offset %llx: %s\n" msgstr "" -#: ckddasd.c:350 +#: cckddasd.c:2380 #, c-format -msgid "HHCDA003I opening %s readonly%s\n" +msgid "HHCCD127E file[%d] free space write error, offset %llx: %s\n" msgstr "" -#: ckddasd.c:363 +#: cckddasd.c:2467 #, c-format -msgid "HHCDA004E %s open error: %s\n" +msgid "HHCCD128E file[%d] l2[%d] lseek error offset %lld: %s\n" msgstr "" -#: ckddasd.c:378 +#: cckddasd.c:2478 #, c-format -msgid "HHCDA005E %s not in a single file for shadowing\n" +msgid "HHCCD129E file[%d] l2[%d] read error offset %lld: %s\n" msgstr "" -#: ckddasd.c:387 +#: cckddasd.c:2597 #, c-format -msgid "HHCDA006E %s fstat error: %s\n" +msgid "HHCCD130E file[%d] l2[%d] lseek error offset %lld: %s\n" msgstr "" -#: ckddasd.c:397 +#: cckddasd.c:2604 #, c-format -msgid "HHCDA007E %s read error: %s\n" +msgid "HHCCD131E file[%d] l2[%d] write error offset %lld: %s\n" msgstr "" -#: ckddasd.c:400 +#: cckddasd.c:2690 #, c-format -msgid "HHCDA08E %s CKD header incomplete\n" +msgid "HHCCD132E file[%d] l2[%d,%d] lseek error offset %lld: %s\n" msgstr "" -#: ckddasd.c:410 +#: cckddasd.c:2697 #, c-format -msgid "HHCDA009E %s CKD header invalid\n" +msgid "HHCCD133E file[%d] l2[%d,%d] write error offset %lld: %s\n" msgstr "" -#: ckddasd.c:419 +#: cckddasd.c:2730 #, c-format -msgid "HHCDA010E %s Only 1 CCKD file allowed\n" +msgid "HHCCD134E file[%d] trk %d lseek error offset %llx: %s\n" msgstr "" -#: ckddasd.c:434 +#: cckddasd.c:2737 #, c-format -msgid "HHCDA011E %s read error: %s\n" +msgid "HHCCD135E file[%d] trk %d read error offset %llx: %s\n" msgstr "" -#: ckddasd.c:439 +#: cckddasd.c:2794 #, c-format -msgid "HHCDA012E %s CCKD header incomplete\n" +msgid "HHCCD136E file[%d] trk %d not written, invalid format\n" msgstr "" -#: ckddasd.c:450 +#: cckddasd.c:2824 #, c-format -msgid "HHCDA013E %s CKD file out of sequence\n" +msgid "HHCCD137E file[%d] trk %d lseek error offset %llx: %s\n" msgstr "" -#: ckddasd.c:482 +#: cckddasd.c:2831 #, c-format -msgid "HHCDA014I %s seq=%d cyls=%d-%d\n" +msgid "HHCCD138E file[%d] trk %d write error offset %llx len %d rc %d: %s\n" msgstr "" -#: ckddasd.c:496 +#: cckddasd.c:2924 #, c-format -msgid "HHCDA015E %s heads=%d trklen=%d, expected heads=%d trklen=%d\n" +msgid "HHCCD139E trklen err for %2.2x%2.2x%2.2x%2.2x%2.2x\n" msgstr "" -#: ckddasd.c:509 +#: cckddasd.c:2953 #, c-format -msgid "HHCDA016E %s CKD header inconsistent with file size\n" +msgid "HHCCD140E truncate fstat error: %s\n" msgstr "" -#: ckddasd.c:517 +#: cckddasd.c:2974 #, c-format -msgid "HHCDA017E %s CKD header high cylinder incorrect\n" +msgid "HHCCD141E truncate re-open error: %s\n" msgstr "" -#: ckddasd.c:543 +#: cckddasd.c:2983 #, c-format -msgid "HHCDA018E %s exceeds maximum %d CKD files\n" +msgid "HHCCD142E truncate ftruncate error: %s\n" msgstr "" -#: ckddasd.c:554 +#: cckddasd.c:3078 #, c-format -msgid "HHCDA019I %s cyls=%d heads=%d tracks=%d trklen=%d\n" +msgid "HHCCD143E invalid byte 0 trk %d: buf %2.2x%2.2x%2.2x%2.2x%2.2x\n" msgstr "" -#: ckddasd.c:565 +#: cckddasd.c:3100 #, c-format -msgid "HHCDA020E %4.4X device type %4.4X not found in dasd table\n" +msgid "HHCCD144E invalid byte 0 blkgrp %d: buf %2.2x%2.2x%2.2x%2.2x%2.2x\n" msgstr "" -#: ckddasd.c:574 +#: cckddasd.c:3115 #, c-format -msgid "HHCDA021E %4.4X control unit %s not found in dasd table\n" +msgid "HHCCD145E invalid %s hdr %s %d: %s compression unsupported\n" msgstr "" -#: ckddasd.c:647 +#: cckddasd.c:3122 #, c-format -msgid "HHCDA022I %4.4X cache hits %d, misses %d\n" +msgid "HHCCD146E invalid %s hdr %s %d buf %2.2x%2.2x%2.2x%2.2x%2.2x\n" msgstr "" -#: ckddasd.c:712 -#, c-format -msgid "HHCDA025E error writing trk %d: lseek error: %s\n" +#: cckddasd.c:3237 +msgid "HHCCD147E no shadow file name specified\n" msgstr "" -#: ckddasd.c:726 +#: cckddasd.c:3244 #, c-format -msgid "HHCDA026E error writing trk %d: write error: %s\n" +msgid "HHCCD148E [%d] number of shadow files exceeded: %d\n" msgstr "" -#: ckddasd.c:760 +#: cckddasd.c:3304 #, c-format -msgid "HHCDA027E calloc error for cache table size %d: %s\n" +msgid "" +"HHCCD149E shadow file[%d] name %s\n" +" collides with %4.4X file[%d] name %s\n" msgstr "" -#: ckddasd.c:808 +#: cckddasd.c:3366 #, c-format -msgid "HHCDA030E malloc error for cache entry buffer size %d: %s\n" +msgid "" +"HHCCD150E error re-opening %s readonly\n" +" %s\n" msgstr "" -#: ckddasd.c:840 +#: cckddasd.c:3405 #, c-format -msgid "HHCDA032E error reading trk %d: lseek error: %s\n" +msgid "HHCCD151E shadow file[%d] open error: %s\n" msgstr "" -#: ckddasd.c:853 +#: cckddasd.c:3414 #, c-format -msgid "HHCDA033E error reading trk %d: read error: %s\n" +msgid "HHCCD152E file[%d] lseek error offset %d: %s\n" msgstr "" -#: ckddasd.c:872 +#: cckddasd.c:3422 #, c-format -msgid "" -"HHCDA035E %4.4X invalid track header for cyl %d head %d %2.2x%2.2x%2.2x%2.2x" -"%2.2x\n" +msgid "HHCCD153E file[%d] read error offset %d: %s\n" msgstr "" -#: ckddasd.c:933 +#: cckddasd.c:3432 #, c-format -msgid "HHCDA036E error writing trk %d: lseek error: %s\n" +msgid "HHCCD154E shadow file[%d] write error offset %d: %s\n" msgstr "" -#: ckddasd.c:946 +#: cckddasd.c:3449 #, c-format -msgid "HHCDA037E error writing trk %d: write error: %s\n" +msgid "HHCCD155E file[%d] l1 malloc failed: %s\n" msgstr "" -#: ckddasd.c:1207 -msgid "HHCDA042E attempt to read past end of track\n" +#: cckddasd.c:3489 +msgid "HHCCD156E not a cckd device\n" msgstr "" -#: ckddasd.c:1324 -msgid "ckddasd: attempt to read past end of track\n" +#: cckddasd.c:3521 +#, c-format +msgid "HHCCD157E file[%d] error adding shadow file: %s\n" msgstr "" -#: ckddasd.c:1374 -msgid "HHCDA046E attempt to read past end of track\n" +#: cckddasd.c:3544 +#, c-format +msgid "HHCCD158E file[%d] %s added\n" msgstr "" -#: ckddasd.c:1543 -msgid "HHCDA049E Write KD orientation error\n" +#: cckddasd.c:3580 +msgid "HHCCD159E not a cckd device\n" msgstr "" -#: ckddasd.c:1585 -msgid "HHCDA051E Write data orientation error\n" +#: cckddasd.c:3586 +msgid "HHCCD160E cannot remove base file\n" msgstr "" -#: ckddasd.c:1658 +#: cckddasd.c:3623 #, c-format -msgid "HHCDA053E Data chaining not supported for CCW %2.2X\n" +msgid "HHCCD161E file[%d] not merged, file[%d] cannot be opened read-write\n" msgstr "" -#: ckddasd.c:2945 +#: cckddasd.c:3635 #, c-format -msgid "HHCDA055I search key %s\n" +msgid "HHCCD162E file[%d] not merged, file[%d] check failed\n" msgstr "" -#: codepage.c:187 +#: cckddasd.c:3649 #, c-format -msgid "HHCCF051E CodePage conversion table %s is not defined\n" +msgid "HHCCD163E file[%d] not merged, file[%d] not hardened\n" msgstr "" -#: config.c:170 +#: cckddasd.c:3686 #, c-format -msgid "HHCCF001S Error reading file %s line %d: %s\n" +msgid "HHCCD164E file[%d] l2[%d] lseek error offset %lld: %s\n" msgstr "" -#: config.c:189 +#: cckddasd.c:3695 #, c-format -msgid "HHCCF002S File %s line %d is too long\n" +msgid "HHCCD165E file[%d] l2[%d] read error offset %lld: %s\n" msgstr "" -#: config.c:337 +#: cckddasd.c:3713 #, c-format -msgid "HHCCF003S Cannot open file %s: %s\n" +msgid "HHCCD166E file[%d] l2[%d] lseek error offset %lld: %s\n" msgstr "" -#: config.c:374 +#: cckddasd.c:3722 #, c-format -msgid "HHCCF004S No device records in file %s\n" +msgid "HHCCD167E file[%d] l2[%d] read error offset %lld: %s\n" msgstr "" -#: config.c:517 +#: cckddasd.c:3748 #, c-format -msgid "HHCCF005S Error in %s line %d: Unrecognized argument %s\n" +msgid "HHCCD168E file[%d] %s[%d] lseek error offset %lld: %s\n" msgstr "" -#: config.c:531 +#: cckddasd.c:3753 #, c-format -msgid "HHCCF006S Error in %s line %d: Userid, but no password given %s\n" +msgid "HHCCD169E file[%d] %s[%d] not merged\n" msgstr "" -#: config.c:546 +#: cckddasd.c:3762 #, c-format -msgid "HHCCF007S Error in %s line %d: Missing argument.\n" +msgid "HHCCD170E file[%d] %s[%d] read error offset %lld: %s\n" msgstr "" -#: config.c:559 +#: cckddasd.c:3767 #, c-format -msgid "HHCCF008S Error in %s line %d: Unrecognized keyword %s\n" +msgid "HHCCD171E file[%d] %s[%d] not merged\n" msgstr "" -#: config.c:568 +#: cckddasd.c:3787 #, c-format -msgid "HHCCF009S Error in %s line %d: Incorrect number of operands\n" +msgid "HHCCD172E file[%d] %s[%d] lseek error offset %lld: %s\n" msgstr "" -#: config.c:602 +#: cckddasd.c:3791 #, c-format -msgid "" -"HHCCF010S Error in %s line %d: Unknown or unsupported ARCHMODE specification " -"%s\n" +msgid "HHCCD173E file[%d] %s[%d] not merged\n" msgstr "" -#: config.c:620 +#: cckddasd.c:3800 #, c-format -msgid "HHCCF011S Error in %s line %d: %s is not a valid serial number\n" +msgid "HHCCD174E file[%d] %s[%d] write error offset %lld: %s\n" msgstr "" -#: config.c:633 +#: cckddasd.c:3804 #, c-format -msgid "HHCCF012S Error in %s line %d: %s is not a valid CPU model\n" +msgid "HHCCD175E file[%d] %s[%d] not merged\n" msgstr "" -#: config.c:646 +#: cckddasd.c:3841 #, c-format -msgid "HHCCF013S Error in %s line %d: Invalid main storage size %s\n" +msgid "HHCCD176E file[%d] l1[%d] lseek error offset %lld: %s\n" msgstr "" -#: config.c:659 +#: cckddasd.c:3845 #, c-format -msgid "HHCCF014S Error in %s line %d: Invalid expanded storage size %s\n" +msgid "HHCCD177E file[%d] %s[%d-%d] not merged\n" msgstr "" -#: config.c:672 +#: cckddasd.c:3854 #, c-format -msgid "HHCCF015S Error in %s line %d: Invalid console port number %s\n" +msgid "HHCCD178E file[%d] l1[%d] write error offset %lld: %s\n" msgstr "" -#: config.c:684 +#: cckddasd.c:3858 #, c-format -msgid "HHCCF016S Error in %s line %d: Invalid CPU thread priority %s\n" +msgid "HHCCD179E file[%d] %s[%d-%d] not merged\n" msgstr "" -#: config.c:692 -msgid "" -"HHCCF017W Hercules is not running as setuid root, cannot raise CPU priority\n" -msgstr "" - -#: config.c:706 +#: cckddasd.c:3890 #, c-format -msgid "HHCCF018S Error in %s line %d: Invalid number of CPUs %s\n" +msgid "HHCCD200I shadow file [%d] successfully %s%s\n" msgstr "" -#: config.c:720 -#, c-format -msgid "HHCCF019S Error in %s line %d: Invalid number of VFs %s\n" +#: cckddasd.c:3918 +msgid "HHCCD201W device is not a shadow file\n" msgstr "" -#: config.c:726 -msgid "HHCCF020W Vector Facility support not configured\n" +#: cckddasd.c:3923 +msgid "HHCCD202W file shadowing not activated\n" msgstr "" -#: config.c:735 -#, c-format -msgid "HHCCF021S Error in %s line %d: Load parameter %s exceeds 8 characters\n" +#: cckddasd.c:3931 +msgid "HHCCD203W shadowing is already active\n" msgstr "" -#: config.c:757 +#: cckddasd.c:3937 #, c-format -msgid "" -"HHCCF022S Error in %s line %d: %s is not a valid system epoch.\n" -"Patch config.c to expand the table\n" +msgid "HHCCD204I shadow file name set to %s\n" msgstr "" -#: config.c:772 -#, c-format -msgid "HHCCF023S Error in %s line %d: %s is not a valid timezone offset\n" +#: cckddasd.c:3954 +msgid "HHCCD205W device is not a shadow file\n" msgstr "" -#: config.c:786 -#, c-format -msgid "HHCCF024S Error in %s line %d: Invalid TOD clock drag factor %s\n" +#: cckddasd.c:4021 +msgid "HHCCD206W device is not a shadow file\n" msgstr "" -#: config.c:810 -#, c-format -msgid "HHCCF025S Error in %s line %d: Invalid panel refresh rate %s\n" +#: cckddasd.c:4038 +msgid "" +"HHCCD210I size free nbr st reads writes l2reads hits " +"switches\n" msgstr "" -#: config.c:849 -#, c-format -msgid "HHCCF026S Error in %s line %d: Unknown OS tailor specification %s\n" +#: cckddasd.c:4040 +msgid "" +"HHCCD211I readaheads " +"misses\n" msgstr "" -#: config.c:862 -#, c-format -msgid "HHCCF027S Error in %s line %d: Invalid maximum device threads %s\n" +#: cckddasd.c:4041 +msgid "" +"HHCCD212I " +"-------------------------------------------------------------------\n" msgstr "" -#: config.c:887 +#: cckddasd.c:4044 #, c-format -msgid "" -"HHCCF028S Error in %s line %d: Invalid program product OS permission %s\n" +msgid "HHCCD213I [*] %10lld %3lld%% %4d %7d %7d %7d %7d %7d\n" msgstr "" -#: config.c:901 +#: cckddasd.c:4049 #, c-format -msgid "HHCCF029S Error in %s line %d: Invalid HTTP port number %s\n" +msgid "HHCCD214I %7d %7d\n" msgstr "" -#: config.c:915 +#: cckddasd.c:4053 #, c-format -msgid "HHCCF030S Error in %s line %d: Invalid I/O delay value: %s\n" +msgid "HHCCD215I %s\n" msgstr "" -#: config.c:936 +#: cckddasd.c:4054 #, c-format -msgid "HHCCF031S Cannot obtain %dMB main storage: %s\n" +msgid "HHCCD216I [0] %10lld %3lld%% %4d %s %7d %7d %7d\n" msgstr "" -#: config.c:945 +#: cckddasd.c:4063 #, c-format -msgid "HHCCF032S Cannot obtain storage key array: %s\n" +msgid "HHCCD217I %s\n" msgstr "" -#: config.c:968 +#: cckddasd.c:4069 #, c-format -msgid "HHCCF033S Cannot obtain %dMB expanded storage: %s\n" +msgid "HHCCD218I [%d] %10lld %3lld%% %4d %s %7d %7d %7d\n" msgstr "" -#: config.c:974 -msgid "HHCCF034W Expanded storage support not installed\n" +#: cckddasd.c:4166 +msgid "HHCCD003I Garbage collector thread started: tid=" msgstr "" -#: config.c:1160 +#: cckddasd.c:4166 #, c-format -msgid "HHCCF035S Error in %s line %d: Missing device number or device type\n" +msgid ", pid=%d \n" msgstr "" -#: config.c:1169 -#, c-format -msgid "HHCCF036S Error in %s line %d: %s is not a valid device number\n" +#: cckddasd.c:4256 +msgid "HHCCD013I Garbage collector thread stopping: tid=" msgstr "" -#: config.c:1195 +#: cckddasd.c:4393 #, c-format -msgid "HHCCF037S Message pipe creation failed: %s\n" +msgid "HHCCD180E gcperc lseek error file[%d] offset 0x%llx: %s\n" msgstr "" -#: config.c:1209 +#: cckddasd.c:4400 #, c-format -msgid "HHCCF038S Message pipe open failed: %s\n" -msgstr "" - -#: config.c:1230 -msgid "" -"HHCCF039W PGMPRDOS LICENSED specified.\n" -" Licensed program product operating systems are enabled.\n" -" You are responsible for meeting all conditions of your\n" -" software license.\n" -"\n" +msgid "HHCCD181E gcperc read error file[%d] offset 0x%llx: %d,%d %s\n" msgstr "" -#: config.c:1311 +#: cckddasd.c:4453 #, c-format -msgid "HHCCF040E Cannot create CPU%4.4X thread: %s\n" +msgid "HHCCD182E unknown space at offset 0x%llx\n" msgstr "" -#: config.c:1356 +#: cckddasd.c:4455 #, c-format -msgid "HHCCF041E Device %4.4X already exists\n" +msgid "HHCCD183E %2.2x%2.2x%2.2x%2.2x%2.2x\n" msgstr "" -#: config.c:1366 +#: cckddasd.c:4537 #, c-format -msgid "HHCCF042E Device type %s not recognized\n" +msgid "HHCCD190E uncompress %d calloc() error: %s\n" msgstr "" -#: config.c:1381 +#: cckddasd.c:4546 #, c-format -msgid "HHCCF043E Cannot obtain device block for device %4.4X: %s\n" +msgid "HHCCD191E uncompress %d calloc() error: %s\n" msgstr "" -#: config.c:1433 +#: cckddasd.c:4562 #, c-format -msgid "HHCCF044E Initialization failed for device %4.4X\n" +msgid "HHCCD192E uncompress %d calloc() error: %s\n" msgstr "" -#: config.c:1450 +#: cckddasd.c:4592 #, c-format -msgid "HHCCF045E Cannot obtain buffer for device %4.4X: %s\n" +msgid "HHCCD193E uncompress error trk %d: %2.2x%2.2x%2.2x%2.2x%2.2x\n" msgstr "" -#: config.c:1507 +#: cckddasd.c:4595 #, c-format -msgid "HHCCF046E Device %4.4X does not exist\n" +msgid "HHCCD194E %s compression not supported\n" msgstr "" -#: config.c:1535 -#, c-format -msgid "HHCCF047I Device %4.4X detached\n" +#: cckddasd.c:5104 +msgid "HHCCD900I print_itrace\n" msgstr "" -#: config.c:1553 +#: cckddiag.c:136 #, c-format -msgid "HHCCF048E Device %4.4X does not exist\n" +msgid "lseek to pos 0x%8.8x error: %s\n" msgstr "" -#: config.c:1560 +#: cckddiag.c:146 #, c-format -msgid "HHCCF049E Device %4.4X already exists\n" +msgid "cckddiag: read error: %s\n" msgstr "" -#: config.c:1590 +#: cckddiag.c:485 #, c-format -msgid "HHCCF050I Device %4.4X defined as %4.4X\n" +msgid "cckddiag: error opening file %s: %s\n" msgstr "" -#: console.c:693 +#: cckdswap.c:56 #, c-format -msgid "HHCTE007I Device %4.4X connection closed by client %s\n" +msgid "cckdswap: error opening %s: %s\n" msgstr "" -#: console.c:856 +#: cckdswap.c:65 cckdswap.c:82 #, c-format -msgid "HHCTE008I Device %4.4X connection closed by client %s\n" +msgid "cckdswap: %s read error: %s\n" msgstr "" -#: console.c:1146 +#: cckdswap.c:73 #, c-format -msgid "HHCTE009I Client %s connected to %4.4X device %4.4X\n" +msgid "cckdswap: %s is not a compressed ckd file\n" msgstr "" -#: console.c:1200 -msgid "HHCTE001I Console connection thread started: tid=" +#: cckdswap.c:94 +msgid "cckdswap: error during swap\n" msgstr "" -#: console.c:1201 cpu.c:1090 httpserv.c:562 panel.c:923 timer.c:284 +#: cckdswap.c:98 #, c-format -msgid ", pid=%d\n" +msgid "cckdswap: %s changed from %s to %s\n" msgstr "" -#: console.c:1238 -#, c-format -msgid "HHCTE002W Waiting for port %u to become free\n" +#: cckdswap.c:109 +msgid "" +"usage: cckdswap cckd-file\n" +"\n" +" cckd-file -- name of the compressed ckd\n" +" file which will have its\n" +" byte order swapped\n" msgstr "" -#: console.c:1258 +#: channel.c:97 #, c-format -msgid "HHCTE003I Waiting for console connection on port %u\n" +msgid "HHCCP048I %4.4X:CCW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X%s\n" msgstr "" -#: console.c:1403 -msgid "HHCTE004I Console connection thread terminated\n" +#: channel.c:111 +#, c-format +msgid "HHCCP049I %4.4X:Stat=%2.2X%2.2X Count=%2.2X%2.2X CCW=%2.2X%2.2X%2.2X\n" msgstr "" -#: console.c:1418 +#: channel.c:126 #, c-format -msgid "HHCTE005E Cannot create console thread: %s\n" +msgid "" +"HHCCP050I %4.4X:SCSW=%2.2X%2.2X%2.2X%2.2X Stat=%2.2X%2.2X Count=%2.2X%2.2X " +"CCW=%2.2X%2.2X%2.2X%2.2X\n" msgstr "" -#: console.c:1439 -msgid "console_remove() error\n" +#: channel.c:237 +#, c-format +msgid "HHCCP051I %4.4X: Test I/O\n" msgstr "" -#: cpu.c:255 -msgid "HHCCP043I Wait state PSW loaded: " +#: channel.c:302 +msgid "HHCCP052I TIO modification executed CC=1\n" msgstr "" -#: cpu.c:399 +#: channel.c:339 #, c-format -msgid "program_int() passing to guest code=%4.4X\n" +msgid "HHCCP053I %4.4X: Halt I/O\n" msgstr "" -#: cpu.c:484 -msgid "HHCCP014I " +#: channel.c:393 +msgid "HHCCP054I HIO modification executed CC=1\n" msgstr "" -#: cpu.c:487 hscmisc.c:596 -msgid "SIE: " +#: channel.c:766 +#, c-format +msgid "HHCCP055I %4.4X: Clear subchannel\n" msgstr "" -#: cpu.c:492 +#: channel.c:867 #, c-format -msgid "CPU%4.4X: %s CODE=%4.4X ILC=%d\n" +msgid "HHCCP056I %4.4X: Halt subchannel\n" msgstr "" -#: cpu.c:594 +#: channel.c:889 #, c-format -msgid "HHCCP015I CPU%4.4X PER event: code=%4.4X perc=%2.2X addr=" +msgid "HHCCP057I %4.4X: Halt subchannel: cc=1\n" msgstr "" -#: cpu.c:595 sie.c:120 sie.c:234 stack.c:593 stack.c:616 stack.c:678 -#: stack.c:696 stack.c:704 stack.c:728 stack.c:751 stack.c:804 stack.c:882 -#: stack.c:916 stack.c:944 stack.c:956 stack.c:967 stack.c:1021 stack.c:1045 -#: stack.c:1277 stack.c:1303 stack.c:1311 stack.c:1348 stack.c:1443 -#: stack.c:1479 stack.c:1532 -msgid "\n" +#: channel.c:899 +#, c-format +msgid "HHCCP058I %4.4X: Halt subchannel: cc=2\n" msgstr "" -#: cpu.c:757 +#: channel.c:970 #, c-format -msgid "HHCCP016I CPU%4.4X: Program interrupt loop: " +msgid "HHCCP059I %4.4X: Halt subchannel: cc=0\n" msgstr "" -#: cpu.c:865 +#: channel.c:1008 #, c-format -msgid "" -"HHCCP044I I/O interrupt code=%4.4X CSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%" -"2.2X\n" +msgid "HHCCP060I %4.4X: Resume subchannel: cc=1\n" msgstr "" -#: cpu.c:887 +#: channel.c:1022 #, c-format -msgid "HHCCP045I I/O interrupt code=%8.8X parm=%8.8X\n" +msgid "HHCCP061I %4.4X: Resume subchannel: cc=2\n" msgstr "" -#: cpu.c:890 +#: channel.c:1045 #, c-format -msgid "HHCCP046I I/O interrupt code=%8.8X parm=%8.8X id=%8.8X\n" +msgid "HHCCP062I %4.4X: Resume subchannel: cc=0\n" msgstr "" -#: cpu.c:956 +#: channel.c:1596 #, c-format -msgid "HHCCP022I Machine Check code=%16.16llu\n" +msgid "HHCCP063I %4.4X:IDAW=%8.8X Len=%3.3hX%s\n" msgstr "" -#: cpu.c:1013 +#: channel.c:1601 #, c-format -msgid "HHCCP001W CPU thread set priority %d failed: %s\n" +msgid "" +"HHCCP064I %4.4X:IDAW=%16.16llX Len=%4.4hX\n" +"%4.4X:---------------------%s\n" msgstr "" -#: cpu.c:1020 +#: channel.c:1718 #, c-format -msgid "HHCCP002I CPU%4.4X thread started: tid=" +msgid "HHCCP065I DEV%4.4X: attention signalled\n" msgstr "" -#: cpu.c:1020 +#: channel.c:1730 #, c-format -msgid ", pid=%d, priority=%d\n" +msgid "HHCCP066I DEV%4.4X: attention\n" msgstr "" -#: cpu.c:1026 +#: channel.c:1913 #, c-format -msgid "HHCCP003I CPU%4.4X architecture mode %s\n" +msgid "HHCCP067E %4.4X create_thread error: %s" msgstr "" -#: cpu.c:1031 +#: channel.c:1931 #, c-format -msgid "HHCCP004I CPU%4.4X Vector Facility online\n" +msgid "HHCCP068E %4.4X create_thread error: %s" msgstr "" -#: cpu.c:1042 +#: channel.c:2113 #, c-format -msgid "HHCCP005E CPU%4.4X thread already started\n" +msgid "HHCCP069I Device %4.4X initial status interrupt\n" msgstr "" -#: cpu.c:1055 +#: channel.c:2152 #, c-format -msgid "HHCCP006E Cannot create timer thread: %s\n" +msgid "HHCCP070I Device %4.4X attention completed\n" msgstr "" -#: cpu.c:1077 +#: channel.c:2218 #, c-format -msgid "HHCCP007I CPU%4.4X architecture mode set to %s\n" +msgid "HHCCP071I Device %4.4X clear completed\n" msgstr "" -#: cpu.c:1090 +#: channel.c:2273 #, c-format -msgid "HHCCP008I CPU%4.4X thread ended: tid=" +msgid "HHCCP072I Device %4.4X halt completed\n" msgstr "" -#: cpu.c:1116 +#: channel.c:2431 #, c-format -msgid "HHCCP009E CPU MASK MISMATCH: %8.8X - %8.8X. Last instruction:\n" +msgid "HHCCP073I Device %4.4X suspended\n" msgstr "" -#: cpu.c:1236 +#: channel.c:2474 #, c-format -msgid "HHCCP010I CPU%4.4X store status completed.\n" +msgid "HHCCP074I Device %4.4X resumed\n" msgstr "" -#: cpu.c:1303 +#: channel.c:2704 #, c-format -msgid "" -"HHCCP011I CPU%4.4X: Disabled wait state\n" -" " +msgid "HHCCP075I %4.4X:Stat=%2.2X%2.2X Count=%4.4X %s\n" msgstr "" -#: cpu.c:1731 +#: channel.c:2710 #, c-format -msgid "PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X\n" +msgid "" +"HHCCP076I %4.4X:Sense=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%" +"2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X\n" msgstr "" -#: cpu.c:1738 +#: channel.c:2725 #, c-format -msgid "" -"PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X%2.2X%2.2X%" -"2.2X%2.2X\n" +msgid "HHCCP077I %4.4X:Sense=%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n" msgstr "" -#: ctcadpt.c:116 -#, c-format -msgid "HHCCT001E %4.4X: Incorrect number of parameters\n" +#: ckddasd.c:203 +msgid "HHCDA001E File name missing or invalid\n" msgstr "" -#: ctcadpt.c:458 +#: ckddasd.c:219 #, c-format -msgid "HHCCT002E %4.4X: Incorrect number of parameters\n" +msgid "HHCDA002E %4.4X:File not found or invalid\n" msgstr "" -#: ctcadpt.c:470 +#: ckddasd.c:310 #, c-format -msgid "HHCCT003E %4.4X: Invalid port number: %s\n" +msgid "HHCDA003E parameter %d is invalid: %s\n" msgstr "" -#: ctcadpt.c:491 +#: ckddasd.c:321 #, c-format -msgid "HHCCT004E %4.4X: Invalid IP address %s\n" +msgid "HHCDA004I opening %s readonly%s\n" msgstr "" -#: ctcadpt.c:504 +#: ckddasd.c:334 #, c-format -msgid "HHCCT005E %4.4X: Invalid port number: %s\n" +msgid "HHCDA005E %s open error: %s\n" msgstr "" -#: ctcadpt.c:516 +#: ckddasd.c:349 #, c-format -msgid "HHCCT006E %4.4X: Invalid MTU size %s\n" +msgid "HHCDA006E %s not in a single file for shadowing\n" msgstr "" -#: ctcadpt.c:537 +#: ckddasd.c:358 #, c-format -msgid "HHCCT007E %4.4X: Error creating socket: %s\n" +msgid "HHCDA007E %s fstat error: %s\n" msgstr "" -#: ctcadpt.c:557 +#: ckddasd.c:368 #, c-format -msgid "HHCCT008E %4.4X: Error binding to socket: %s\n" +msgid "HHCDA008E %s read error: %s\n" msgstr "" -#: ctcadpt.c:578 +#: ckddasd.c:371 #, c-format -msgid "HHCCT009I %4.4X: Connect to %s:%s failed, starting server\n" +msgid "HHCDA09E %s CKD header incomplete\n" msgstr "" -#: ctcadpt.c:588 +#: ckddasd.c:381 #, c-format -msgid "HHCCT010E %4.4X: Error creating socket: %s\n" +msgid "HHCDA010E %s CKD header invalid\n" msgstr "" -#: ctcadpt.c:605 +#: ckddasd.c:390 #, c-format -msgid "HHCCT011E %4.4X: Error binding to socket: %s\n" +msgid "HHCDA011E %s Only 1 CCKD file allowed\n" msgstr "" -#: ctcadpt.c:613 +#: ckddasd.c:405 #, c-format -msgid "HHCCT012E %4.4X: Error on call to listen: %s\n" +msgid "HHCDA012E %s read error: %s\n" msgstr "" -#: ctcadpt.c:627 +#: ckddasd.c:410 #, c-format -msgid "HHCCT013I %4.4X: Connected to %s:%s\n" +msgid "HHCDA013E %s CCKD header incomplete\n" msgstr "" -#: ctcadpt.c:661 +#: ckddasd.c:421 #, c-format -msgid "HHCCT014E %4.4X Write CCW count %u is invalid\n" +msgid "HHCDA014E %s CKD file out of sequence\n" msgstr "" -#: ctcadpt.c:691 +#: ckddasd.c:453 #, c-format -msgid "HHCCT015I %4.4X: Interface command: %s %8.8X\n" +msgid "HHCDA015I %s seq=%d cyls=%d-%d\n" msgstr "" -#: ctcadpt.c:716 ctc_ctci.c:684 +#: ckddasd.c:467 #, c-format -msgid "CTC101W %4.4X: Write buffer contains invalid frame offset %u\n" +msgid "HHCDA016E %s heads=%d trklen=%d, expected heads=%d trklen=%d\n" msgstr "" -#: ctcadpt.c:737 +#: ckddasd.c:480 #, c-format -msgid "" -"HHCCT016E %4.4X: Write buffer contains incomplete segment header at offset %" -"4.4X\n" +msgid "HHCDA017E %s CKD header inconsistent with file size\n" msgstr "" -#: ctcadpt.c:757 +#: ckddasd.c:488 #, c-format -msgid "" -"HHCCT017E %4.4X: Write buffer contains invalid segment length %u at offset %" -"4.4X\n" +msgid "HHCDA018E %s CKD header high cylinder incorrect\n" msgstr "" -#: ctcadpt.c:772 +#: ckddasd.c:514 #, c-format -msgid "HHCCT018I %4.4X: Sending packet to %s:\n" +msgid "HHCDA019E %s exceeds maximum %d CKD files\n" msgstr "" -#: ctcadpt.c:783 +#: ckddasd.c:525 #, c-format -msgid "HHCCT019E %4.4X: Error writing to %s: %s\n" +msgid "HHCDA020I %s cyls=%d heads=%d tracks=%d trklen=%d\n" msgstr "" -#: ctcadpt.c:846 +#: ckddasd.c:536 #, c-format -msgid "HHCCT020E %4.4X: Error reading from %s: %s\n" +msgid "HHCDA021E %4.4X device type %4.4X not found in dasd table\n" msgstr "" -#: ctcadpt.c:863 +#: ckddasd.c:545 #, c-format -msgid "HHCCT021E %4.4X: Error reading from %s: %s\n" +msgid "HHCDA022E %4.4X control unit %s not found in dasd table\n" msgstr "" -#: ctcadpt.c:873 +#: ckddasd.c:627 #, c-format -msgid "HHCCT022I %4.4X: Received packet from %s (%d bytes):\n" +msgid "HHCDA023I %4.4X cache hits %d, misses %d, waits %d\n" msgstr "" -#: ctcadpt.c:953 +#: ckddasd.c:710 #, c-format -msgid "HHCCT023E %4.4X: Incorrect client or config error\n" +msgid "HHCDA024I read trk %d cur trk %d\n" msgstr "" -#: ctcadpt.c:955 +#: ckddasd.c:739 #, c-format -msgid " Config=%s, connecting client=%s\n" +msgid "HHCDA025I read track: updating track %d\n" msgstr "" -#: ctcadpt.c:995 -msgid "HHCCT024E 4.4X: Not enough arguments to start vmnet\n" +#: ckddasd.c:750 +#, c-format +msgid "HHCDA026E error writing trk %d: lseek error: %s\n" msgstr "" -#: ctcadpt.c:1005 +#: ckddasd.c:769 #, c-format -msgid "HHCCT025E %4.4X: Failed: socketpair: %s\n" +msgid "HHCDA027E error writing trk %d: write error: %s\n" msgstr "" -#: ctcadpt.c:1013 +#: ckddasd.c:811 #, c-format -msgid "HHCCT026E %4.4X: Failed: fork: %s\n" +msgid "HHCDA028I read trk %d cache hit, using cache[%d]\n" msgstr "" -#: ctcadpt.c:1061 +#: ckddasd.c:848 #, c-format -msgid "HHCCT027E %4.4X: Not enough parameters\n" +msgid "HHCDA029I read trk %d no available cache entry, waiting\n" msgstr "" -#: ctcadpt.c:1066 +#: ckddasd.c:856 #, c-format -msgid "HHCCT028E %4.4X: Bad device number '%s'\n" +msgid "HHCDA030I read trk %d cache miss, using cache[%d]\n" msgstr "" -#: ctcadpt.c:1103 +#: ckddasd.c:879 #, c-format -msgid "HHCCT029E %4.4X: bad block length: %d < %d\n" +msgid "HHCDA031I read trk %d reading file %d offset %lld len %d\n" msgstr "" -#: ctcadpt.c:1113 +#: ckddasd.c:888 #, c-format -msgid "HHCCT030E %4.4X: bad packet length: %d < %d\n" +msgid "HHCDA032E error reading trk %d: lseek error: %s\n" msgstr "" -#: ctcadpt.c:1118 +#: ckddasd.c:904 #, c-format -msgid "HHCCT031E %4.4X: bad packet length: %d < 6\n" +msgid "HHCDA033E error reading trk %d: read error: %s\n" msgstr "" -#: ctcadpt.c:1164 +#: ckddasd.c:916 #, c-format -msgid "HHCCT032E %4.4X: Error: EOF on read, CTC network down\n" +msgid "HHCDA034I read trk %d trkhdr %2.2x %2.2x%2.2x %2.2x%2.2x\n" msgstr "" -#: ctcadpt.c:1172 +#: ckddasd.c:926 #, c-format -msgid "HHCCT033E %4.4X: Error: read: %s\n" +msgid "" +"HHCDA035E %4.4X invalid track header for cyl %d head %d %2.2x%2.2x%2.2x%2.2x" +"%2.2x\n" msgstr "" -#: ctcadpt.c:1330 +#: ckddasd.c:1122 #, c-format -msgid "HHCCT034E device %4.4X already exists\n" +msgid "HHCDA038I seeking to cyl %d head %d\n" msgstr "" -#: ctcadpt.c:1340 +#: ckddasd.c:1161 #, c-format -msgid "HHCCT035E AddDevice internal error (%s).\n" +msgid "HHCDA039E MT advance error: locate record %d file mask %2.2X\n" msgstr "" -#: ctcadpt.c:1358 +#: ckddasd.c:1193 #, c-format -msgid "HHCCT036E Cannot obtain device block for device %4.4X: %s\n" +msgid "HHCDA040I MT advance to cyl %d head %d\n" msgstr "" -#: ctc_ctci.c:69 +#: ckddasd.c:1245 #, c-format -msgid "HHCCT037E %4.4X: Unable to allocate CTCBLK\n" +msgid "HHCDA041I read count orientation is %s\n" msgstr "" -#: ctc_ctci.c:91 +#: ckddasd.c:1269 #, c-format -msgid "HHCCT038E %4.4X: Unable to allocate CTCBLK\n" +msgid "HHCDA042E attempt to read past end of track %d %d\n" msgstr "" -#: ctc_ctci.c:136 +#: ckddasd.c:1291 #, c-format -msgid "HHCCT039E %4.4X: Unable to allocate CTCBLK\n" +msgid "HHCDA043I cyl %d head %d record %d kl %d dl %d of %d\n" msgstr "" -#: ctc_ctci.c:541 +#: ckddasd.c:1379 #, c-format -msgid "HHCCT040I %4.4X: Halt or Clear Recognized\n" +msgid "HHCDA044I read key %d bytes\n" +msgstr "" + +#: ckddasd.c:1387 +msgid "ckddasd: attempt to read past end of track\n" msgstr "" -#: ctc_ctci.c:590 +#: ckddasd.c:1429 #, c-format -msgid "HHCCT041I %4.4X: CTC Received Frame (%d bytes):\n" +msgid "HHCDA045I read data %d bytes\n" +msgstr "" + +#: ckddasd.c:1437 +msgid "HHCDA046E attempt to read past end of track\n" msgstr "" -#: ctc_ctci.c:628 +#: ckddasd.c:1555 #, c-format -msgid "HHCCT042E %4.4X Write CCW count %u is invalid\n" +msgid "HHCDA047I writing cyl %d head %d record %d kl %d dl %d\n" msgstr "" -#: ctc_ctci.c:657 +#: ckddasd.c:1561 #, c-format -msgid "HHCCT043I %4.4X: Interface command: %s %8.8X\n" +msgid "HHCDA048I setting track overflow flag for cyl %d head %d record %d\n" msgstr "" -#: ctc_ctci.c:706 +#: ckddasd.c:1606 +msgid "HHCDA049E Write KD orientation error\n" +msgstr "" + +#: ckddasd.c:1619 #, c-format -msgid "" -"HHCCT044E %4.4X: Write buffer contains incomplete segment header at offset %" -"4.4X\n" +msgid "HHCDA050I updating cyl %d head %d record %d kl %d dl %d\n" +msgstr "" + +#: ckddasd.c:1648 +msgid "HHCDA051E Write data orientation error\n" msgstr "" -#: ctc_ctci.c:726 +#: ckddasd.c:1662 #, c-format -msgid "" -"HHCCT045E %4.4X: Write buffer contains invalid segment length %u at offset %" -"4.4X\n" +msgid "HHCDA052I updating cyl %d head %d record %d dl %d\n" msgstr "" -#: ctc_ctci.c:741 +#: ckddasd.c:1721 #, c-format -msgid "HHCCT046I %4.4X: Sending packet to %s:\n" +msgid "HHCDA053E Data chaining not supported for CCW %2.2X\n" msgstr "" -#: ctc_ctci.c:751 +#: ckddasd.c:2844 #, c-format -msgid "HHCCT047E %4.4X: Error writing to %s: %s\n" +msgid "HHCDA054I set file mask %2.2X\n" msgstr "" -#: ctc_ctci.c:812 +#: ckddasd.c:3012 #, c-format -msgid "HHCCT048E %4.4X: Error reading from %s: %s\n" +msgid "HHCDA055I search key %s\n" msgstr "" -#: ctc_ctci.c:824 +#: codepage.c:288 #, c-format -msgid "HHCCT049I %4.4X: Received packet from %s (%d bytes):\n" +msgid "HHCCF051E CodePage conversion table %s is not defined\n" msgstr "" -#: ctc_ctci.c:988 +#: commadpt.c:59 #, c-format -msgid "HHCCT050E %4.4X: Invalid adapter address %s\n" +msgid "HHCCA300D %4.4X:%s : Status = TEXT=%s, TRANS=%s, TWS=%s\n" msgstr "" -#: ctc_ctci.c:997 +#: commadpt.c:65 #, c-format -msgid "HHCCT051E %4.4X: Invalid device name %s\n" +msgid "HHCCA300D %4.4X:%s : Dump of %d (%x) byte(s)\n" msgstr "" -#: ctc_ctci.c:1011 +#: commadpt.c:74 #, c-format -msgid "HHCCT052E %4.4X: Invalid kernel buffer size %s\n" +msgid "HHCCA300D %4.4X:%s : %4.4X:" msgstr "" -#: ctc_ctci.c:1025 +#: commadpt.c:201 #, c-format -msgid "HHCCT053E %4.4X: Invalid DLL I/O buffer size %s\n" +msgid "HHCCA300D %4.4X:clean : Control block freed\n" msgstr "" -#: ctc_ctci.c:1038 +#: commadpt.c:209 #, c-format -msgid "HHCCT054E %4.4X: Invalid MTU size %s\n" +msgid "HHCCA300D %4.4X:clean : Control block not freed : not allocated\n" msgstr "" -#: ctc_ctci.c:1049 +#: commadpt.c:223 #, c-format -msgid "HHCCT055E %4.4X: Invalid netmask %s\n" +msgid "HHCCA020E %4.4X:Memory allocation failure for main control block\n" msgstr "" -#: ctc_ctci.c:1060 +#: commadpt.c:305 #, c-format -msgid "HHCCT056E %4.4X: Invalid MAC address %s\n" +msgid "" +"HHCCA001I %4.4X:Connect out to %s:%d failed during initial status : %s\n" msgstr "" -#: ctc_ctci.c:1087 +#: commadpt.c:347 #, c-format -msgid "HHCCT056E %4.4X: Incorrect number of parameters\n" +msgid "HHCCA300D %4.4x : Found data beyond EON\n" msgstr "" -#: ctc_ctci.c:1097 +#: commadpt.c:362 #, c-format -msgid "HHCCT057E %4.4X: Incorrect number of parameters\n" +msgid "HHCCA300D %4.4x : Found incorrect IP address section at position %d\n" msgstr "" -#: ctc_ctci.c:1105 +#: commadpt.c:363 #, c-format -msgid "HHCCT058E %4.4X: Invalid IP address %s\n" +msgid "HHCCA300D %4.4x : %d greater than 255\n" msgstr "" -#: ctc_ctci.c:1117 +#: commadpt.c:377 #, c-format -msgid "HHCCT059E %4.4X: Invalid IP address %s\n" +msgid "HHCCA300D %4.4x : Too many separators in dial data\n" msgstr "" -#: ctc_ctci.c:1133 +#: commadpt.c:394 #, c-format -msgid "HHCCT060E %4.4X: Incorrect number of parameters\n" +msgid "HHCCA300D %4.4x : Incorrect dial data byte %2.2x\n" msgstr "" -#: ctc_ctci.c:1142 +#: commadpt.c:415 #, c-format -msgid "HHCCT061E %4.4X invalid device name %s\n" +msgid "HHCCA300D %4.4x : Not enough separators (only %d found) in dial data\n" msgstr "" -#: ctc_ctci.c:1156 +#: commadpt.c:423 #, c-format -msgid "HHCCT062E %4.4X: Invalid MTU size %s\n" +msgid "HHCCA300D %4.4x : Destination TCP port %d exceeds maximum of 65535\n" msgstr "" -#: ctc_ctci.c:1167 +#: commadpt.c:554 #, c-format -msgid "HHCCT063E %4.4X: Invalid IP address %s\n" +msgid "HHCCA002I %4.4X:Line Communication thread " +msgstr "" + +#: commadpt.c:554 +msgid " started\n" msgstr "" -#: ctc_ctci.c:1179 +#: commadpt.c:566 #, c-format -msgid "HHCCT064E %4.4X: Invalid IP address %s\n" +msgid "HHCCA003E %4.4X:Cannot obtain socket for incoming calls : %s\n" msgstr "" -#: ctc_ctci.c:1191 +#: commadpt.c:592 #, c-format -msgid "HHCCT065E %4.4X: Invalid netmask %s\n" +msgid "HHCCA004W %4.4X:Waiting 5 seconds for port %d to become available\n" msgstr "" -#: ctc_ctci.c:1202 +#: commadpt.c:643 #, c-format -msgid "HHCCT066E %4.4X: Incorrect number of parameters\n" +msgid "HHCCA018E %4.4X:Bind failed : %s\n" msgstr "" -#: ctc_ctci.c:1220 +#: commadpt.c:657 #, c-format -msgid "HHCCT067E %4.4X: Invalid IP address %s\n" +msgid "HHCCA005I %4.4X:Listening on port %d for incoming TCP connections\n" msgstr "" -#: ctc_ctci.c:1235 +#: commadpt.c:695 #, c-format -msgid "HHCCT068E %4.4X: Invalid MAC address %s\n" +msgid "HHCCA300D %4.4X:cthread - Entry - DevExec = %s\n" msgstr "" -#: ctc_ctci.c:1267 +#: commadpt.c:760 #, c-format -msgid "HHCCT069E %4.4X: Invalid kernel buffer size %s\n" +msgid "HHCCA300D %4.4X:Poll Command abort - Poll address >7 Bytes\n" msgstr "" -#: ctc_ctci.c:1284 +#: commadpt.c:788 #, c-format -msgid "HHCCT070E %4.4X: Invalid DLL I/O buffer size %s\n" +msgid "HHCCA300D %4.4X:Writing 1 byte in socket : %2.2X\n" msgstr "" -#: ctc_ctci.c:1295 +#: commadpt.c:963 #, c-format -msgid "HHCCT071E %4.4X: Incorrect number of parameters\n" +msgid "HHCCA300D %4.4X:cthread - Select IN maxfd = %d / Devexec = %s\n" msgstr "" -#: ctc_lcs.c:81 +#: commadpt.c:969 #, c-format -msgid "HHCLC001E %4.4X unable to allocate LCSBLK\n" +msgid "HHCCA300D %4.4X:cthread - Select OUT rc=%d\n" msgstr "" -#: ctc_lcs.c:652 +#: commadpt.c:976 #, c-format -msgid "HHCLC002I %4.4X: Halt or Clear Recognized\n" +msgid "HHCCA006T %4.4X:Select failed : %s\n" msgstr "" -#: ctc_lcs.c:695 +#: commadpt.c:986 #, c-format -msgid "HHCLC003I %4.4X: LCS Read Buffer:\n" +msgid "HHCCA300D %4.4X:cthread - Select TIME OUT\n" msgstr "" -#: ctc_lcs.c:799 +#: commadpt.c:1004 #, c-format -msgid "HHCLC004I %4.4X: Sending packet to %s:\n" +msgid "HHCCA300D %4.4X:cthread - IPC Pipe closed\n" msgstr "" -#: ctc_lcs.c:808 +#: commadpt.c:1012 #, c-format -msgid "HHCLC005E %4.4X: Error writing to %s: %s\n" +msgid "HHCCA300D %4.4X:cthread - IPC Pipe Data ; code = %d\n" msgstr "" -#: ctc_lcs.c:827 +#: commadpt.c:1044 #, c-format -msgid "HHCLC006I %4.4X Triggering Event.\n" +msgid "HHCCA300D %4.4X:cthread - inbound socket data\n" msgstr "" -#: ctc_lcs.c:1117 +#: commadpt.c:1086 #, c-format -msgid "HHCLC007E Error in call to socket: %s.\n" +msgid "HHCCA300D %4.4X:cthread - socket write available\n" msgstr "" -#: ctc_lcs.c:1128 +#: commadpt.c:1100 #, c-format -msgid "HHCLC008E ioctl error on device %s: %s.\n" +msgid "HHCCA007W %4.4X:Outgoing call failed during %s command : %s\n" msgstr "" -#: ctc_lcs.c:1200 +#: commadpt.c:1130 #, c-format -msgid "HHCLC009I Port %2.2X: Read Buffer:\n" +msgid "HHCCA008I %4.4X:cthread - Incoming Call\n" msgstr "" -#: ctc_lcs.c:1229 +#: commadpt.c:1191 #, c-format -msgid "HHCLC010I Port %2.2X: IPV4 frame for %8.8X\n" +msgid "HHCCA009I %4.4X:BSC utility thread terminated\n" msgstr "" -#: ctc_lcs.c:1256 +#: commadpt.c:1242 #, c-format -msgid "HHCLC011I Port %2.2X: ARP frame for %8.8X\n" +msgid "HHCCA013E %4.4X:Incorrect %s specification %s\n" msgstr "" -#: ctc_lcs.c:1280 +#: commadpt.c:1246 #, c-format -msgid "HHCLC012I Port %2.2X: SNA frame\n" +msgid "HHCCA015E %4.4X:Missing parameter : DIAL=%s and %s not specified\n" msgstr "" -#: ctc_lcs.c:1310 +#: commadpt.c:1250 #, c-format -msgid "HHCLC013I Port %2.2X: No match found - selecting primary %4.4X\n" +msgid "HHCCA016W %4.4X:Conflicting parameter : DIAL=%s and %s=%s specified\n" msgstr "" -#: ctc_lcs.c:1320 +#: commadpt.c:1251 #, c-format -msgid "HHCLC014I Port %2.2X: No match found - selecting secondary %4.4X\n" +msgid "HHCCA017I %4.4X:RPORT parameter ignored\n" msgstr "" -#: ctc_lcs.c:1331 +#: commadpt.c:1273 #, c-format -msgid "HHCLC015I Port %2.2X: No match found - Discarding frame\n" +msgid "HHCCA300D %4.4X:Initialisation starting\n" msgstr "" -#: ctc_lcs.c:1339 +#: commadpt.c:1283 #, c-format -msgid "HHCLC016I Port %2.2X: Enqueing frame to device %4.4X (%8.8X)\n" +msgid "HHCCA010I %4.4X:initialisation not performed\n" msgstr "" -#: ctc_lcs.c:1547 +#: commadpt.c:1289 #, c-format -msgid "HHCLC017E %4.4X invalid device name %s\n" +msgid "HHCCA300D %4.4X:Initialisation : Control block allocated\n" msgstr "" -#: ctc_lcs.c:1563 +#: commadpt.c:1312 #, c-format -msgid "HHCLC018E %4.4X invalid MAC address %s\n" +msgid "HHCCA011E %4.4X:Error parsing %s\n" msgstr "" -#: ctc_lcs.c:1587 +#: commadpt.c:1318 #, c-format -msgid "HHCLC019E %4.4X too many arguments in statement.\n" +msgid "HHCCA012E %4.4X:Unrecognized parameter %s\n" msgstr "" -#: ctc_lcs.c:1597 +#: commadpt.c:1406 #, c-format -msgid "HHCLC020E %4.4X invalid IP address %s\n" +msgid "" +"HHCCA014E %4.4X:Incorrect switched/dial specification %s; defaulting to " +"DIAL=OUT\n" msgstr "" -#: ctc_lcs.c:1644 +#: commadpt.c:1525 #, c-format -msgid "HHCLC039E Cannot open file %s: %s\n" +msgid "HHCCA021I %4.4X:Initialisation failed due to previous errors\n" msgstr "" -#: ctc_lcs.c:1693 +#: commadpt.c:1579 #, c-format -msgid "HHCLC021E Invalid HWADD statement in %s: %s\n" +msgid "HHCCA019E %4.4x : BSC comm thread did not initialise\n" msgstr "" -#: ctc_lcs.c:1702 +#: commadpt.c:1621 #, c-format -msgid "" -"HHCLC022E Invalid MAC in HWADD statement in %s: %s (%s)\n" -" " +msgid "HHCCA300D %4.4X:Closing down\n" msgstr "" -#: ctc_lcs.c:1719 +#: commadpt.c:1654 #, c-format -msgid "HHCLC023E Invalid ROUTE statement in %s: %s\n" +msgid "HHCCA300D %4.4X:Closed down\n" msgstr "" -#: ctc_lcs.c:1726 +#: commadpt.c:1683 #, c-format -msgid "HHCLC024E Invalid net address in ROUTE %s: %s (%s)\n" +msgid "HHCCA300D %4.4X:CCW Exec - Entry code = %x\n" msgstr "" -#: ctc_lcs.c:1735 +#: commadpt.c:1794 #, c-format -msgid "HHCLC025E Invalid net mask in ROUTE %s: %s (%s)\n" +msgid "HHCCA300D %4.4X Set Mode : %s\n" msgstr "" -#: ctc_lcs.c:1767 +#: config.c:220 #, c-format -msgid "HHCLC026E Error in %s: Missing device number or mode\n" +msgid "HHCCF031S Cannot obtain %dMB main storage: %s\n" msgstr "" -#: ctc_lcs.c:1776 +#: config.c:229 #, c-format -msgid "HHCLC027E Error in %s: %s: Invalid device number\n" +msgid "HHCCF032S Cannot obtain storage key array: %s\n" msgstr "" -#: ctc_lcs.c:1788 +#: config.c:256 #, c-format -msgid "HHCLC028E Error in %s: %s:Missing PORT number\n" +msgid "HHCCF033S Cannot obtain %dMB expanded storage: %s\n" +msgstr "" + +#: config.c:264 +msgid "HHCCF034W Expanded storage support not installed\n" msgstr "" -#: ctc_lcs.c:1796 +#: config.c:303 #, c-format -msgid "HHCLC029E Error in %s: %s: Invalid PORT number\n" +msgid "HHCCF001S Error reading file %s line %d: %s\n" msgstr "" -#: ctc_lcs.c:1806 +#: config.c:326 #, c-format -msgid "HHCLC030E Error in %s: %s: Invalid number of arguments\n" +msgid "HHCCF002S File %s line %d is too long\n" msgstr "" -#: ctc_lcs.c:1820 +#: config.c:450 #, c-format -msgid "HHCLC031E Error in %s: %s: Invalid entry starting at %s\n" +msgid "" +"HHCCF053E Incorrect second device number in device range near character %c\n" msgstr "" -#: ctc_lcs.c:1830 +#: config.c:460 #, c-format -msgid "HHCLC032E Error is %s: %s: Invalid IP address (%s)\n" +msgid "HHCCF054E Incorrect Device count near character %c\n" msgstr "" -#: ctc_lcs.c:1845 +#: config.c:466 #, c-format -msgid "HHCLC033E Error in %s: %s: Missing PORT number\n" +msgid "HHCCF055E Incorrect device address specification near character %c\n" msgstr "" -#: ctc_lcs.c:1853 +#: config.c:473 #, c-format -msgid "HHCLC034E Error in %s: %s:Invalid PORT number\n" +msgid "HHCCF056E Incorrect device address range. %4.4X < %4.4X\n" msgstr "" -#: ctc_lcs.c:1861 +#: config.c:495 #, c-format -msgid "HHCLC035E Error in %s: %s: SNA does not accept any arguments\n" +msgid "" +"HHCCF057E %4.4X is on wrong channel (1st device defined on channel %2.2X)\n" msgstr "" -#: ctc_lcs.c:1869 +#: config.c:524 #, c-format -msgid "HHCLC036E Error in %s: %s: Invalid MODE\n" +msgid "" +"HHCCF058E Some or all devices in %4.4X-%4.4X duplicate devices already " +"defined\n" msgstr "" -#: ctc_lcs.c:1929 +#: config.c:653 #, c-format -msgid "HHCLC037E Error reading file %s line %d: %s\n" +msgid "HHCCF003S Cannot open file %s: %s\n" msgstr "" -#: ctc_lcs.c:1953 +#: config.c:716 #, c-format -msgid "HHCLC038E File %s line %d is too long\n" +msgid "HHCCF004S No device records in file %s\n" msgstr "" -#: dasdcat.c:34 +#: config.c:910 #, c-format -msgid "HHCDT002E Can't make 80 column card images from block length %d\n" +msgid "" +"HHCCF061W Warning in %s line %d: ECPS:VM Statement deprecated. Use ECPSVM " +"instead\n" msgstr "" -#: dasdcat.c:117 -msgid "HHCDT003E Directory block byte count is invalid\n" +#: config.c:934 +#, c-format +msgid "" +"HHCCF059S Error in %s line %d: Missing symbol name on DEFSYM statement\n" msgstr "" -#: dasdcat.c:219 -msgid "HHCDT004E non-PDS-members not yet supported\n" +#: config.c:941 +#, c-format +msgid "" +"HHCCF060S Error in %s line %d: DEFSYM requires a single symbol value " +"(include quotation marks if necessary)\n" msgstr "" -#: dasdcat.c:249 +#: config.c:964 config.c:1014 #, c-format -msgid "HHCDT005E unknown dataset name option: '%c'\n" +msgid "HHCCF007S Error in %s line %d: Missing argument.\n" msgstr "" -#: dasdcat.c:344 +#: config.c:972 #, c-format -msgid "HHCDT001E failed to open image %s\n" +msgid "HHCCF029S Error in %s line %d: Invalid HTTP port number %s\n" msgstr "" -#: dasdcopy.c:101 +#: config.c:983 #, c-format -msgid "Hercules %s copy program " +msgid "HHCCF005S Error in %s line %d: Unrecognized argument %s\n" msgstr "" -#: dasdcopy.c:184 +#: config.c:1001 #, c-format -msgid "HHCDC001E %s: %s open error: %s\n" +msgid "HHCCF006S Error in %s line %d: Userid, but no password given %s\n" msgstr "" -#: dasdcopy.c:191 +#: config.c:1036 #, c-format -msgid "HHCDC002E %s: %s read error: %s\n" +msgid "HHCCF008E Error in %s line %d: Unrecognized keyword %s\n" msgstr "" -#: dasdcopy.c:254 +#: config.c:1046 #, c-format -msgid "HHCDC003E %s: %s open failed\n" +msgid "HHCCF009E Error in %s line %d: Incorrect number of operands\n" msgstr "" -#: dasdcopy.c:267 +#: config.c:1076 #, c-format -msgid "HHCDC004E %s: ckd lookup failed for %4.4X cyls %d\n" +msgid "" +"HHCCF010S Error in %s line %d: Unknown or unsupported ARCHMODE specification " +"%s\n" msgstr "" -#: dasdcopy.c:286 +#: config.c:1094 #, c-format -msgid "HHCDC005E %s: fba lookup failed, blks %d\n" +msgid "HHCCF012S Error in %s line %d: %s is not a valid CPU version code\n" msgstr "" -#: dasdcopy.c:305 +#: config.c:1108 #, c-format -msgid "HHCDC006E %s: %s create failed\n" +msgid "HHCCF051S Error in %s line %d: %s is not a valid serial number\n" msgstr "" -#: dasdcopy.c:317 +#: config.c:1121 #, c-format -msgid "HHCDC007E %s: %s open failed\n" +msgid "HHCCF012S Error in %s line %d: %s is not a valid CPU model\n" msgstr "" -#: dasdcopy.c:324 +#: config.c:1134 #, c-format -msgid " %3d%% %7d of %d" +msgid "HHCCF013S Error in %s line %d: Invalid main storage size %s\n" msgstr "" -#: dasdcopy.c:345 +#: config.c:1147 #, c-format -msgid "HHCDC008E %s: %s read error %s %d stat=%2.2X\n" +msgid "HHCCF014S Error in %s line %d: Invalid expanded storage size %s\n" msgstr "" -#: dasdcopy.c:365 +#: config.c:1158 #, c-format -msgid "HHCDC009E %s: %s write error %s %d stat=%2.2X\n" +msgid "" +"HHCCF016S Error in %s line %d: Invalid Hercules process group thread " +"priority %s\n" msgstr "" -#: dasdcopy.c:376 +#: config.c:1167 msgid "" -"\n" -"HHCDC010I Copy successful !!! \n" +"HHCCF017W Hercules is not running as setuid root, cannot raise Hercules " +"process group thread priority\n" msgstr "" -#: dasdcopy.c:418 +#: config.c:1179 #, c-format -msgid "" -"usage: ckd2cckd [-options] ifile ofile\n" -"\n" -" copy a ckd dasd file to a compressed ckd dasd file\n" -"\n" -" ifile -- input ckd dasd file\n" -" ofile -- output compressed ckd dasd file\n" -"\n" -" options:\n" -" -v display program version and quit\n" -" -h display this help and quit\n" -" -q quiet mode, don't display status\n" -" -r replace the output file if it exists\n" -"%s%s -0 don't compress track images\n" -" -cyls n size of output file\n" -" -a output file will have alt cyls\n" +msgid "HHCCF016S Error in %s line %d: Invalid TOD Clock thread priority %s\n" msgstr "" -#: dasdcopy.c:438 dasdcopy.c:492 dasdcopy.c:552 -msgid " -z compress using zlib [default]\n" +#: config.c:1188 +msgid "" +"HHCCF017W Hercules is not running as setuid root, cannot raise TOD Clock " +"thread priority\n" msgstr "" -#: dasdcopy.c:445 dasdcopy.c:499 -msgid " -bz2 compress using bzip2\n" +#: config.c:1200 +#, c-format +msgid "HHCCF016S Error in %s line %d: Invalid CPU thread priority %s\n" msgstr "" -#: dasdcopy.c:453 +#: config.c:1209 msgid "" -"usage: cckd2ckd [-options] ifile [sf=sfile] ofile\n" -"\n" -" copy a compressed ckd file to a ckd file\n" -"\n" -" ifile -- input compressed ckd dasd file\n" -" sfile -- input compressed ckd shadow file\n" -" (optional)\n" -" ofile -- output ckd dasd file\n" -"\n" -" options:\n" -" -v display program version and quit\n" -" -h display this help and quit\n" -" -q quiet mode, don't display status\n" -" -r replace the output file if it exists\n" -" -lfs create single large output file\n" -" -cyls n size of output file\n" -" -a output file will have alt cyls\n" +"HHCCF017W Hercules is not running as setuid root, cannot raise CPU priority\n" msgstr "" -#: dasdcopy.c:473 +#: config.c:1221 config.c:1239 #, c-format +msgid "HHCCF016S Error in %s line %d: Invalid device thread priority %s\n" +msgstr "" + +#: config.c:1229 config.c:1247 msgid "" -"usage: fba2cfba [-options] ifile ofile\n" -"\n" -" copy a fba dasd file to a compressed fba dasd file\n" -"\n" -" ifile -- input fba dasd file\n" -" ofile -- output compressed fba dasd file\n" -"\n" -" options:\n" -" -v display program version and quit\n" -" -h display this help and quit\n" -" -q quiet mode, don't display status\n" -" -r replace the output file if it exists\n" -"%s%s -0 don't compress track images\n" -" -blks n size of output file\n" +"HHCCF017W Hercules is not running as setuid root, cannot raise device thread " +"priority\n" +msgstr "" + +#: config.c:1259 +#, c-format +msgid "HHCCF018S Error in %s line %d: Invalid number of CPUs %s\n" +msgstr "" + +#: config.c:1273 +#, c-format +msgid "HHCCF019S Error in %s line %d: Invalid number of VFs %s\n" +msgstr "" + +#: config.c:1279 +msgid "HHCCF020W Vector Facility support not configured\n" +msgstr "" + +#: config.c:1288 +#, c-format +msgid "HHCCF021S Error in %s line %d: Load parameter %s exceeds 8 characters\n" msgstr "" -#: dasdcopy.c:507 +#: config.c:1310 +#, c-format msgid "" -"usage: cfba2fba [-options] ifile [sf=sfile] ofile\n" -"\n" -" copy a compressed fba file to a fba file\n" -"\n" -" ifile -- input compressed fba dasd file\n" -" sfile -- input compressed fba shadow file\n" -" (optional)\n" -" ofile -- output fba dasd file\n" -"\n" -" options:\n" -" -v display program version and quit\n" -" -h display this help and quit\n" -" -q quiet mode, don't display status\n" -" -r replace the output file if it exists\n" -" -lfs create single large output file\n" -" -blks n size of output file\n" +"HHCCF022S Error in %s line %d: %s is not a valid system epoch.\n" +"Patch config.c to expand the table\n" +msgstr "" + +#: config.c:1325 +#, c-format +msgid "HHCCF023S Error in %s line %d: %s is not a valid timezone offset\n" +msgstr "" + +#: config.c:1342 +#, c-format +msgid "HHCCF052S Error in %s line %d: %s: invalid argument\n" +msgstr "" + +#: config.c:1356 +#, c-format +msgid "HHCCF024S Error in %s line %d: Invalid TOD clock drag factor %s\n" +msgstr "" + +#: config.c:1380 +#, c-format +msgid "HHCCF025S Error in %s line %d: Invalid panel refresh rate %s\n" +msgstr "" + +#: config.c:1419 +#, c-format +msgid "HHCCF026S Error in %s line %d: Unknown OS tailor specification %s\n" +msgstr "" + +#: config.c:1432 +#, c-format +msgid "HHCCF027S Error in %s line %d: Invalid maximum device threads %s\n" msgstr "" -#: dasdcopy.c:526 +#: config.c:1457 #, c-format msgid "" -"usage: %s [-options] ifile [sf=sfile] ofile\n" -"\n" -" copy a dasd file to another dasd file\n" +"HHCCF028S Error in %s line %d: Invalid program product OS permission %s\n" +msgstr "" + +#: config.c:1488 +#, c-format +msgid "" +"HHCCF062W Warning in %s line %d: Missing ECPSVM level value. 20 Assumed\n" +msgstr "" + +#: config.c:1497 +#, c-format +msgid "" +"HHCCF051W Warning in %s line %d: Invalid ECPSVM level value : %s. 20 " +"Assumed\n" +msgstr "" + +#: config.c:1509 +#, c-format +msgid "" +"HHCCF051W Error in %s line %d: Invalid ECPSVM keyword : %s. NO Assumed\n" +msgstr "" + +#: config.c:1518 +#, c-format +msgid "" +"HHCCF063W Warning in %s line %d: Specifying ECPSVM level directly is " +"deprecated. Use the 'LEVEL' keyword instead.\n" +msgstr "" + +#: config.c:1537 +#, c-format +msgid "HHCCF029S Error in %s line %d: Invalid SHRDPORT port number %s\n" +msgstr "" + +#: config.c:1551 +#, c-format +msgid "HHCCF030S Error in %s line %d: Invalid I/O delay value: %s\n" +msgstr "" + +#: config.c:1571 +#, c-format +msgid "HHCCF064W Hercules set priority %d failed: %s\n" +msgstr "" + +#: config.c:1578 +msgid "HHCCF065I Hercules: tid=" +msgstr "" + +#: config.c:1578 +#, c-format +msgid ", pid=%d, pgid=%d, priority=%d\n" +msgstr "" + +#: config.c:1769 +#, c-format +msgid "HHCCF035S Error in %s line %d: Missing device number or device type\n" +msgstr "" + +#: config.c:1779 +#, c-format +msgid "" +"HHCCF036S Error in %s line %d: %s is not a valid device number(s) " +"specification\n" +msgstr "" + +#: config.c:1847 +msgid "" "\n" -" ifile -- input dasd file\n" -" sfile -- input shadow file [optional]\n" -" ofile -- output dasd file\n" +"HHCCF039W PGMPRDOS LICENSED specified.\n" +" Licensed program product operating systems are enabled.\n" +" You are responsible for meeting all conditions of your\n" +" software license.\n" "\n" -" options:\n" -" -v display program version and quit\n" -" -h display this help and quit\n" -" -q quiet mode, don't display status\n" -" -r replace the output file if it exists\n" -"%s%s -0 don't compress output\n" -" -blks n size of output fba file\n" -" -cyls n size of output ckd file\n" -" -a output ckd file will have alt cyls\n" -" -lfs output ckd file will be a single file\n" -" even if it exceeds 2G in size\n" -" -o type output file type (CKD, CCKD, FBA, CFBA)\n" msgstr "" -#: dasdcopy.c:559 -msgid " -bz2 compress output using bzip2\n" +#: config.c:1934 +#, c-format +msgid "HHCCF040E Cannot create CPU%4.4X thread: %s\n" msgstr "" -#: dasdinit.c:231 -msgid "HHCDI001I DASD initialization successfully completed.\n" +#: config.c:2050 +msgid "HHCCF043E Cannot obtain device block\n" msgstr "" -#: dat.h:1894 +#: config.c:2144 #, c-format -msgid "dat.c: Interval timer accessed: %2.2X%2.2X%2.2X%2.2X\n" +msgid "HHCCF041E Device %4.4X already exists\n" msgstr "" -#: external.c:251 -msgid "HHCCP023I External interrupt: Interrupt key\n" +#: config.c:2153 +#, c-format +msgid "HHCCF042E Device type %s not recognized\n" msgstr "" -#: external.c:364 -msgid "HHCCP024I External interrupt: Clock comparator\n" +#: config.c:2167 +#, c-format +msgid "HHCCF044E Initialization failed for device %4.4X\n" +msgstr "" + +#: config.c:2183 +#, c-format +msgid "HHCCF045E Cannot obtain buffer for device %4.4X: %s\n" +msgstr "" + +#: config.c:2217 +#, c-format +msgid "HHCCF046E Device %4.4X does not exist\n" +msgstr "" + +#: config.c:2243 +#, c-format +msgid "HHCCF047I Device %4.4X detached\n" +msgstr "" + +#: config.c:2261 +#, c-format +msgid "HHCCF048E Device %4.4X does not exist\n" +msgstr "" + +#: config.c:2268 +#, c-format +msgid "HHCCF049E Device %4.4X already exists\n" +msgstr "" + +#: console.c:288 +#, c-format +msgid "HHCGI001I Unable to determine IP address from %s\n" +msgstr "" + +#: console.c:309 +#, c-format +msgid "HHCGI002I Unable to determine port number from %s\n" +msgstr "" + +#: console.c:323 +#, c-format +msgid "HHCGI003E Invalid parameter: %s\n" +msgstr "" + +#: console.c:780 +#, c-format +msgid "HHCTE007I Device %4.4X connection closed by client %s\n" +msgstr "" + +#: console.c:943 +#, c-format +msgid "HHCTE008I Device %4.4X connection closed by client %s\n" +msgstr "" + +#: console.c:1244 +#, c-format +msgid "HHCTE009I Client %s connected to %4.4X device %4.4X\n" +msgstr "" + +#: console.c:1310 +msgid "HHCTE001I Console connection thread started: tid=" +msgstr "" + +#: console.c:1334 +#, c-format +msgid "HHCTE010E CNSLPORT statement invalid: %s\n" +msgstr "" + +#: console.c:1346 +#, c-format +msgid "HHCTE002W Waiting for port %u to become free\n" +msgstr "" + +#: console.c:1366 +#, c-format +msgid "HHCTE003I Waiting for console connection on port %u\n" +msgstr "" + +#: console.c:1544 +msgid "HHCTE004I Console connection thread terminated\n" +msgstr "" + +#: console.c:1559 +#, c-format +msgid "HHCTE005E Cannot create console thread: %s\n" +msgstr "" + +#: console.c:1577 +msgid "console_remove() error\n" +msgstr "" + +#: console.c:2432 +#, c-format +msgid "HHCTE006A Enter input for console device %4.4X%c\n" +msgstr "" + +#: cpu.c:247 +msgid "HHCCP043I Wait state PSW loaded: " +msgstr "" + +#: cpu.c:389 +#, c-format +msgid "program_int() passing to guest code=%4.4X\n" +msgstr "" + +#: cpu.c:477 +msgid "HHCCP014I " +msgstr "" + +#: cpu.c:480 hscmisc.c:697 +msgid "SIE: " +msgstr "" + +#: cpu.c:485 +#, c-format +msgid "CPU%4.4X: %s CODE=%4.4X ILC=%d\n" +msgstr "" + +#: cpu.c:587 +#, c-format +msgid "HHCCP015I CPU%4.4X PER event: code=%4.4X perc=%2.2X addr=" +msgstr "" + +#: cpu.c:588 ecpsvm.c:359 ecpsvm.c:1138 ecpsvm.c:1143 sie.c:120 sie.c:231 +#: stack.c:593 stack.c:616 stack.c:678 stack.c:696 stack.c:704 stack.c:728 +#: stack.c:751 stack.c:804 stack.c:882 stack.c:916 stack.c:944 stack.c:956 +#: stack.c:967 stack.c:1021 stack.c:1045 stack.c:1277 stack.c:1303 +#: stack.c:1311 stack.c:1348 stack.c:1443 stack.c:1479 stack.c:1532 +msgid "\n" +msgstr "" + +#: cpu.c:750 +#, c-format +msgid "HHCCP016I CPU%4.4X: Program interrupt loop: " +msgstr "" + +#: cpu.c:858 +#, c-format +msgid "" +"HHCCP044I I/O interrupt code=%4.4X CSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%" +"2.2X\n" +msgstr "" + +#: cpu.c:880 +#, c-format +msgid "HHCCP045I I/O interrupt code=%8.8X parm=%8.8X\n" +msgstr "" + +#: cpu.c:883 +#, c-format +msgid "HHCCP046I I/O interrupt code=%8.8X parm=%8.8X id=%8.8X\n" +msgstr "" + +#: cpu.c:949 +#, c-format +msgid "HHCCP022I Machine Check code=%16.16llu\n" +msgstr "" + +#: cpu.c:1005 +#, c-format +msgid "HHCCP001W CPU thread set priority %d failed: %s\n" +msgstr "" + +#: cpu.c:1012 +#, c-format +msgid "HHCCP002I CPU%4.4X thread started: tid=" +msgstr "" + +#: cpu.c:1012 timer.c:315 +#, c-format +msgid ", pid=%d, priority=%d\n" +msgstr "" + +#: cpu.c:1017 +#, c-format +msgid "HHCCP003I CPU%4.4X architecture mode %s\n" +msgstr "" + +#: cpu.c:1022 +#, c-format +msgid "HHCCP004I CPU%4.4X Vector Facility online\n" +msgstr "" + +#: cpu.c:1033 +#, c-format +msgid "HHCCP005E CPU%4.4X thread already started\n" +msgstr "" + +#: cpu.c:1047 +#, c-format +msgid "HHCCP006S Cannot create timer thread: %s\n" +msgstr "" + +#: cpu.c:1074 +#, c-format +msgid "HHCCP007I CPU%4.4X architecture mode set to %s\n" +msgstr "" + +#: cpu.c:1085 +#, c-format +msgid "HHCCP008I CPU%4.4X thread ended: tid=" +msgstr "" + +#: cpu.c:1113 +#, c-format +msgid "HHCCP009E CPU MASK MISMATCH: %8.8X - %8.8X. Last instruction:\n" +msgstr "" + +#: cpu.c:1216 +#, c-format +msgid "HHCCP010I CPU%4.4X store status completed.\n" +msgstr "" + +#: cpu.c:1280 +#, c-format +msgid "" +"HHCCP011I CPU%4.4X: Disabled wait state\n" +" " +msgstr "" + +#: cpu.c:1522 +#, c-format +msgid "PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X\n" +msgstr "" + +#: cpu.c:1529 +#, c-format +msgid "" +"PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X%2.2X%2.2X%" +"2.2X%2.2X\n" +msgstr "" + +#: ctc_ctci.c:78 +#, c-format +msgid "HHCCT037E %4.4X: Unable to allocate CTCBLK\n" +msgstr "" + +#: ctc_ctci.c:100 +#, c-format +msgid "HHCCT038E %4.4X: Unable to allocate CTCBLK\n" +msgstr "" + +#: ctc_ctci.c:148 +#, c-format +msgid "HHCCT039E %4.4X: Unable to allocate CTCBLK\n" +msgstr "" + +#: ctc_ctci.c:557 +#, c-format +msgid "HHCCT040I %4.4X: Halt or Clear Recognized\n" +msgstr "" + +#: ctc_ctci.c:606 +#, c-format +msgid "HHCCT041I %4.4X: CTC Received Frame (%d bytes):\n" +msgstr "" + +#: ctc_ctci.c:644 +#, c-format +msgid "HHCCT042E %4.4X Write CCW count %u is invalid\n" +msgstr "" + +#: ctc_ctci.c:673 +#, c-format +msgid "HHCCT043I %4.4X: Interface command: %s %8.8X\n" +msgstr "" + +#: ctc_ctci.c:700 ctcadpt.c:686 +#, c-format +msgid "CTC101W %4.4X: Write buffer contains invalid frame offset %u\n" +msgstr "" + +#: ctc_ctci.c:722 +#, c-format +msgid "" +"HHCCT044E %4.4X: Write buffer contains incomplete segment header at offset %" +"4.4X\n" +msgstr "" + +#: ctc_ctci.c:742 +#, c-format +msgid "" +"HHCCT045E %4.4X: Write buffer contains invalid segment length %u at offset %" +"4.4X\n" +msgstr "" + +#: ctc_ctci.c:757 +#, c-format +msgid "HHCCT046I %4.4X: Sending packet to %s:\n" +msgstr "" + +#: ctc_ctci.c:767 +#, c-format +msgid "HHCCT047E %4.4X: Error writing to %s: %s\n" +msgstr "" + +#: ctc_ctci.c:829 +#, c-format +msgid "HHCCT048E %4.4X: Error reading from %s: %s\n" +msgstr "" + +#: ctc_ctci.c:851 +#, c-format +msgid "HHCCT049I %4.4X: Received packet from %s (%d bytes):\n" +msgstr "" + +#: ctc_ctci.c:972 ctc_ctci.c:1145 +#, c-format +msgid "HHCCT056E %4.4X: Incorrect number of parameters\n" +msgstr "" + +#: ctc_ctci.c:1047 +#, c-format +msgid "HHCCT050E %4.4X: Invalid adapter address %s\n" +msgstr "" + +#: ctc_ctci.c:1056 +#, c-format +msgid "HHCCT051E %4.4X: Invalid device name %s\n" +msgstr "" + +#: ctc_ctci.c:1069 +#, c-format +msgid "HHCCT052E %4.4X: Invalid kernel buffer size %s\n" +msgstr "" + +#: ctc_ctci.c:1083 +#, c-format +msgid "HHCCT053E %4.4X: Invalid DLL I/O buffer size %s\n" +msgstr "" + +#: ctc_ctci.c:1096 +#, c-format +msgid "HHCCT054E %4.4X: Invalid MTU size %s\n" +msgstr "" + +#: ctc_ctci.c:1107 +#, c-format +msgid "HHCCT055E %4.4X: Invalid netmask %s\n" +msgstr "" + +#: ctc_ctci.c:1118 +#, c-format +msgid "HHCCT056E %4.4X: Invalid MAC address %s\n" +msgstr "" + +#: ctc_ctci.c:1155 +#, c-format +msgid "HHCCT057E %4.4X: Incorrect number of parameters\n" +msgstr "" + +#: ctc_ctci.c:1163 +#, c-format +msgid "HHCCT058E %4.4X: Invalid IP address %s\n" +msgstr "" + +#: ctc_ctci.c:1175 +#, c-format +msgid "HHCCT059E %4.4X: Invalid IP address %s\n" +msgstr "" + +#: ctc_ctci.c:1191 +#, c-format +msgid "HHCCT060E %4.4X: Incorrect number of parameters\n" +msgstr "" + +#: ctc_ctci.c:1200 +#, c-format +msgid "HHCCT061E %4.4X invalid device name %s\n" +msgstr "" + +#: ctc_ctci.c:1214 +#, c-format +msgid "HHCCT062E %4.4X: Invalid MTU size %s\n" +msgstr "" + +#: ctc_ctci.c:1225 +#, c-format +msgid "HHCCT063E %4.4X: Invalid IP address %s\n" +msgstr "" + +#: ctc_ctci.c:1237 +#, c-format +msgid "HHCCT064E %4.4X: Invalid IP address %s\n" +msgstr "" + +#: ctc_ctci.c:1249 +#, c-format +msgid "HHCCT065E %4.4X: Invalid netmask %s\n" +msgstr "" + +#: ctc_ctci.c:1260 +#, c-format +msgid "HHCCT066E %4.4X: Incorrect number of parameters\n" +msgstr "" + +#: ctc_ctci.c:1278 +#, c-format +msgid "HHCCT067E %4.4X: Invalid IP address %s\n" +msgstr "" + +#: ctc_ctci.c:1293 +#, c-format +msgid "HHCCT068E %4.4X: Invalid MAC address %s\n" +msgstr "" + +#: ctc_ctci.c:1325 +#, c-format +msgid "HHCCT069E %4.4X: Invalid kernel buffer size %s\n" +msgstr "" + +#: ctc_ctci.c:1342 +#, c-format +msgid "HHCCT070E %4.4X: Invalid DLL I/O buffer size %s\n" +msgstr "" + +#: ctc_ctci.c:1353 +#, c-format +msgid "HHCCT071E %4.4X: Incorrect number of parameters\n" +msgstr "" + +#: ctc_lcs.c:71 +#, c-format +msgid "HHCLC001E %4.4X unable to allocate LCSBLK\n" +msgstr "" + +#: ctc_lcs.c:151 +#, c-format +msgid "HHCLC040E %4.4X AddDevice failed for LCSDEV %4.4X\n" +msgstr "" + +#: ctc_lcs.c:640 +#, c-format +msgid "HHCLC002I %4.4X: Halt or Clear Recognized\n" +msgstr "" + +#: ctc_lcs.c:683 +#, c-format +msgid "HHCLC003I %4.4X: LCS Read Buffer:\n" +msgstr "" + +#: ctc_lcs.c:787 +#, c-format +msgid "HHCLC004I %4.4X: Sending packet to %s:\n" +msgstr "" + +#: ctc_lcs.c:796 +#, c-format +msgid "HHCLC005E %4.4X: Error writing to %s: %s\n" +msgstr "" + +#: ctc_lcs.c:815 +#, c-format +msgid "HHCLC006I %4.4X Triggering Event.\n" +msgstr "" + +#: ctc_lcs.c:1105 +#, c-format +msgid "HHCLC007E Error in call to socket: %s.\n" +msgstr "" + +#: ctc_lcs.c:1118 +#, c-format +msgid "HHCLC008E ioctl error on device %s: %s.\n" +msgstr "" + +#: ctc_lcs.c:1191 +#, c-format +msgid "HHCLC009I Port %2.2X: Read Buffer:\n" +msgstr "" + +#: ctc_lcs.c:1220 +#, c-format +msgid "HHCLC010I Port %2.2X: IPV4 frame for %8.8X\n" +msgstr "" + +#: ctc_lcs.c:1247 +#, c-format +msgid "HHCLC011I Port %2.2X: ARP frame for %8.8X\n" +msgstr "" + +#: ctc_lcs.c:1271 +#, c-format +msgid "HHCLC012I Port %2.2X: SNA frame\n" +msgstr "" + +#: ctc_lcs.c:1301 +#, c-format +msgid "HHCLC013I Port %2.2X: No match found - selecting primary %4.4X\n" +msgstr "" + +#: ctc_lcs.c:1311 +#, c-format +msgid "HHCLC014I Port %2.2X: No match found - selecting secondary %4.4X\n" +msgstr "" + +#: ctc_lcs.c:1322 +#, c-format +msgid "HHCLC015I Port %2.2X: No match found - Discarding frame\n" +msgstr "" + +#: ctc_lcs.c:1330 +#, c-format +msgid "HHCLC016I Port %2.2X: Enqueing frame to device %4.4X (%8.8X)\n" +msgstr "" + +#: ctc_lcs.c:1546 +#, c-format +msgid "HHCLC017E %4.4X invalid device name %s\n" +msgstr "" + +#: ctc_lcs.c:1562 +#, c-format +msgid "HHCLC018E %4.4X invalid MAC address %s\n" +msgstr "" + +#: ctc_lcs.c:1586 +#, c-format +msgid "HHCLC019E %4.4X too many arguments in statement.\n" +msgstr "" + +#: ctc_lcs.c:1596 +#, c-format +msgid "HHCLC020E %4.4X invalid IP address %s\n" +msgstr "" + +#: ctc_lcs.c:1643 +#, c-format +msgid "HHCLC039E Cannot open file %s: %s\n" +msgstr "" + +#: ctc_lcs.c:1692 +#, c-format +msgid "HHCLC021E Invalid HWADD statement in %s: %s\n" +msgstr "" + +#: ctc_lcs.c:1701 +#, c-format +msgid "" +"HHCLC022E Invalid MAC in HWADD statement in %s: %s (%s)\n" +" " +msgstr "" + +#: ctc_lcs.c:1718 +#, c-format +msgid "HHCLC023E Invalid ROUTE statement in %s: %s\n" +msgstr "" + +#: ctc_lcs.c:1725 +#, c-format +msgid "HHCLC024E Invalid net address in ROUTE %s: %s (%s)\n" +msgstr "" + +#: ctc_lcs.c:1734 +#, c-format +msgid "HHCLC025E Invalid net mask in ROUTE %s: %s (%s)\n" +msgstr "" + +#: ctc_lcs.c:1766 +#, c-format +msgid "HHCLC026E Error in %s: Missing device number or mode\n" +msgstr "" + +#: ctc_lcs.c:1775 +#, c-format +msgid "HHCLC027E Error in %s: %s: Invalid device number\n" +msgstr "" + +#: ctc_lcs.c:1787 +#, c-format +msgid "HHCLC028E Error in %s: %s:Missing PORT number\n" +msgstr "" + +#: ctc_lcs.c:1795 +#, c-format +msgid "HHCLC029E Error in %s: %s: Invalid PORT number\n" +msgstr "" + +#: ctc_lcs.c:1805 +#, c-format +msgid "HHCLC030E Error in %s: %s: Invalid number of arguments\n" +msgstr "" + +#: ctc_lcs.c:1819 +#, c-format +msgid "HHCLC031E Error in %s: %s: Invalid entry starting at %s\n" +msgstr "" + +#: ctc_lcs.c:1829 +#, c-format +msgid "HHCLC032E Error is %s: %s: Invalid IP address (%s)\n" +msgstr "" + +#: ctc_lcs.c:1844 +#, c-format +msgid "HHCLC033E Error in %s: %s: Missing PORT number\n" +msgstr "" + +#: ctc_lcs.c:1852 +#, c-format +msgid "HHCLC034E Error in %s: %s:Invalid PORT number\n" +msgstr "" + +#: ctc_lcs.c:1860 +#, c-format +msgid "HHCLC035E Error in %s: %s: SNA does not accept any arguments\n" +msgstr "" + +#: ctc_lcs.c:1868 +#, c-format +msgid "HHCLC036E Error in %s: %s: Invalid MODE\n" +msgstr "" + +#: ctc_lcs.c:1928 +#, c-format +msgid "HHCLC037E Error reading file %s line %d: %s\n" +msgstr "" + +#: ctc_lcs.c:1952 +#, c-format +msgid "HHCLC038E File %s line %d is too long\n" +msgstr "" + +#: ctcadpt.c:113 +#, c-format +msgid "HHCCT001E %4.4X: Incorrect number of parameters\n" +msgstr "" + +#: ctcadpt.c:428 +#, c-format +msgid "HHCCT002E %4.4X: Incorrect number of parameters\n" +msgstr "" + +#: ctcadpt.c:440 +#, c-format +msgid "HHCCT003E %4.4X: Invalid port number: %s\n" +msgstr "" + +#: ctcadpt.c:461 +#, c-format +msgid "HHCCT004E %4.4X: Invalid IP address %s\n" +msgstr "" + +#: ctcadpt.c:474 +#, c-format +msgid "HHCCT005E %4.4X: Invalid port number: %s\n" +msgstr "" + +#: ctcadpt.c:486 +#, c-format +msgid "HHCCT006E %4.4X: Invalid MTU size %s\n" +msgstr "" + +#: ctcadpt.c:507 +#, c-format +msgid "HHCCT007E %4.4X: Error creating socket: %s\n" +msgstr "" + +#: ctcadpt.c:527 +#, c-format +msgid "HHCCT008E %4.4X: Error binding to socket: %s\n" +msgstr "" + +#: ctcadpt.c:548 +#, c-format +msgid "HHCCT009I %4.4X: Connect to %s:%s failed, starting server\n" +msgstr "" + +#: ctcadpt.c:558 +#, c-format +msgid "HHCCT010E %4.4X: Error creating socket: %s\n" +msgstr "" + +#: ctcadpt.c:575 +#, c-format +msgid "HHCCT011E %4.4X: Error binding to socket: %s\n" +msgstr "" + +#: ctcadpt.c:583 +#, c-format +msgid "HHCCT012E %4.4X: Error on call to listen: %s\n" +msgstr "" + +#: ctcadpt.c:597 +#, c-format +msgid "HHCCT013I %4.4X: Connected to %s:%s\n" +msgstr "" + +#: ctcadpt.c:631 +#, c-format +msgid "HHCCT014E %4.4X Write CCW count %u is invalid\n" +msgstr "" + +#: ctcadpt.c:661 +#, c-format +msgid "HHCCT015I %4.4X: Interface command: %s %8.8X\n" +msgstr "" + +#: ctcadpt.c:707 +#, c-format +msgid "" +"HHCCT016E %4.4X: Write buffer contains incomplete segment header at offset %" +"4.4X\n" +msgstr "" + +#: ctcadpt.c:727 +#, c-format +msgid "" +"HHCCT017E %4.4X: Write buffer contains invalid segment length %u at offset %" +"4.4X\n" +msgstr "" + +#: ctcadpt.c:742 +#, c-format +msgid "HHCCT018I %4.4X: Sending packet to %s:\n" +msgstr "" + +#: ctcadpt.c:753 +#, c-format +msgid "HHCCT019E %4.4X: Error writing to %s: %s\n" +msgstr "" + +#: ctcadpt.c:816 +#, c-format +msgid "HHCCT020E %4.4X: Error reading from %s: %s\n" +msgstr "" + +#: ctcadpt.c:833 +#, c-format +msgid "HHCCT021E %4.4X: Error reading from %s: %s\n" +msgstr "" + +#: ctcadpt.c:843 +#, c-format +msgid "HHCCT022I %4.4X: Received packet from %s (%d bytes):\n" +msgstr "" + +#: ctcadpt.c:925 +#, c-format +msgid "" +"HHCCT023E %4.4X: Incorrect client or config error\n" +" Config=%s, connecting client=%s\n" +msgstr "" + +#: ctcadpt.c:969 +#, c-format +msgid "HHCCT024E %4.4X: Not enough arguments to start vmnet\n" +msgstr "" + +#: ctcadpt.c:979 +#, c-format +msgid "HHCCT025E %4.4X: Failed: socketpair: %s\n" +msgstr "" + +#: ctcadpt.c:987 +#, c-format +msgid "HHCCT026E %4.4X: Failed: fork: %s\n" +msgstr "" + +#: ctcadpt.c:1037 +#, c-format +msgid "HHCCT027E %4.4X: Not enough parameters\n" +msgstr "" + +#: ctcadpt.c:1042 +#, c-format +msgid "HHCCT028E %4.4X: Bad device number '%s'\n" +msgstr "" + +#: ctcadpt.c:1079 +#, c-format +msgid "HHCCT029E %4.4X: bad block length: %d < %d\n" +msgstr "" + +#: ctcadpt.c:1089 +#, c-format +msgid "HHCCT030E %4.4X: bad packet length: %d < %d\n" +msgstr "" + +#: ctcadpt.c:1094 +#, c-format +msgid "HHCCT031E %4.4X: bad packet length: %d < 6\n" +msgstr "" + +#: ctcadpt.c:1140 +#, c-format +msgid "HHCCT032E %4.4X: Error: EOF on read, CTC network down\n" +msgstr "" + +#: ctcadpt.c:1148 +#, c-format +msgid "HHCCT033E %4.4X: Error: read: %s\n" +msgstr "" + +#: ctcadpt.c:1301 +#, c-format +msgid "HHCCT034E device %4.4X already exists\n" +msgstr "" + +#: dasdcat.c:36 +#, c-format +msgid "HHCDT002E Can't make 80 column card images from block length %d\n" +msgstr "" + +#: dasdcat.c:109 +msgid "HHCDT003E Directory block byte count is invalid\n" +msgstr "" + +#: dasdcat.c:211 +msgid "HHCDT004E non-PDS-members not yet supported\n" +msgstr "" + +#: dasdcat.c:241 +#, c-format +msgid "HHCDT005E unknown dataset name option: '%c'\n" +msgstr "" + +#: dasdcat.c:336 +#, c-format +msgid "HHCDT001E failed to open image %s\n" +msgstr "" + +#: dasdcopy.c:108 +#, c-format +msgid "Hercules %s copy program " +msgstr "" + +#: dasdcopy.c:192 +#, c-format +msgid "HHCDC001E %s: %s open error: %s\n" +msgstr "" + +#: dasdcopy.c:199 +#, c-format +msgid "HHCDC002E %s: %s read error: %s\n" +msgstr "" + +#: dasdcopy.c:262 +#, c-format +msgid "HHCDC003E %s: %s open failed\n" +msgstr "" + +#: dasdcopy.c:275 +#, c-format +msgid "HHCDC004E %s: ckd lookup failed for %4.4X cyls %d\n" +msgstr "" + +#: dasdcopy.c:295 +#, c-format +msgid "HHCDC005E %s: fba lookup failed, blks %d\n" +msgstr "" + +#: dasdcopy.c:316 +#, c-format +msgid "HHCDC006E %s: %s create failed\n" +msgstr "" + +#: dasdcopy.c:328 +#, c-format +msgid "HHCDC007E %s: %s open failed\n" +msgstr "" + +#: dasdcopy.c:341 +#, c-format +msgid " %3d%% %7d of %d" +msgstr "" + +#: dasdcopy.c:361 +#, c-format +msgid "HHCDC008E %s: %s read error %s %d stat=%2.2X\n" +msgstr "" + +#: dasdcopy.c:392 +#, c-format +msgid "HHCDC009E %s: %s write error %s %d stat=%2.2X\n" +msgstr "" + +#: dasdcopy.c:403 +msgid "" +"\n" +"HHCDC010I Copy successful !!! \n" +msgstr "" + +#: dasdcopy.c:444 +#, c-format +msgid "" +"usage: ckd2cckd [-options] ifile ofile\n" +"\n" +" copy a ckd dasd file to a compressed ckd dasd file\n" +"\n" +" ifile -- input ckd dasd file\n" +" ofile -- output compressed ckd dasd file\n" +"\n" +" options:\n" +" -v display program version and quit\n" +" -h display this help and quit\n" +" -q quiet mode, don't display status\n" +" -r replace the output file if it exists\n" +"%s%s -0 don't compress track images\n" +" -cyls n size of output file\n" +" -a output file will have alt cyls\n" +msgstr "" + +#: dasdcopy.c:464 dasdcopy.c:518 dasdcopy.c:578 +msgid " -z compress using zlib [default]\n" +msgstr "" + +#: dasdcopy.c:471 dasdcopy.c:525 +msgid " -bz2 compress using bzip2\n" +msgstr "" + +#: dasdcopy.c:479 +msgid "" +"usage: cckd2ckd [-options] ifile [sf=sfile] ofile\n" +"\n" +" copy a compressed ckd file to a ckd file\n" +"\n" +" ifile -- input compressed ckd dasd file\n" +" sfile -- input compressed ckd shadow file\n" +" (optional)\n" +" ofile -- output ckd dasd file\n" +"\n" +" options:\n" +" -v display program version and quit\n" +" -h display this help and quit\n" +" -q quiet mode, don't display status\n" +" -r replace the output file if it exists\n" +" -lfs create single large output file\n" +" -cyls n size of output file\n" +" -a output file will have alt cyls\n" +msgstr "" + +#: dasdcopy.c:499 +#, c-format +msgid "" +"usage: fba2cfba [-options] ifile ofile\n" +"\n" +" copy a fba dasd file to a compressed fba dasd file\n" +"\n" +" ifile -- input fba dasd file\n" +" ofile -- output compressed fba dasd file\n" +"\n" +" options:\n" +" -v display program version and quit\n" +" -h display this help and quit\n" +" -q quiet mode, don't display status\n" +" -r replace the output file if it exists\n" +"%s%s -0 don't compress track images\n" +" -blks n size of output file\n" +msgstr "" + +#: dasdcopy.c:533 +msgid "" +"usage: cfba2fba [-options] ifile [sf=sfile] ofile\n" +"\n" +" copy a compressed fba file to a fba file\n" +"\n" +" ifile -- input compressed fba dasd file\n" +" sfile -- input compressed fba shadow file\n" +" (optional)\n" +" ofile -- output fba dasd file\n" +"\n" +" options:\n" +" -v display program version and quit\n" +" -h display this help and quit\n" +" -q quiet mode, don't display status\n" +" -r replace the output file if it exists\n" +" -lfs create single large output file\n" +" -blks n size of output file\n" +msgstr "" + +#: dasdcopy.c:552 +#, c-format +msgid "" +"usage: %s [-options] ifile [sf=sfile] ofile\n" +"\n" +" copy a dasd file to another dasd file\n" +"\n" +" ifile -- input dasd file\n" +" sfile -- input shadow file [optional]\n" +" ofile -- output dasd file\n" +"\n" +" options:\n" +" -v display program version and quit\n" +" -h display this help and quit\n" +" -q quiet mode, don't display status\n" +" -r replace the output file if it exists\n" +"%s%s -0 don't compress output\n" +" -blks n size of output fba file\n" +" -cyls n size of output ckd file\n" +" -a output ckd file will have alt cyls\n" +" -lfs output ckd file will be a single file\n" +" even if it exceeds 2G in size\n" +" -o type output file type (CKD, CCKD, FBA, CFBA)\n" +msgstr "" + +#: dasdcopy.c:585 +msgid " -bz2 compress output using bzip2\n" +msgstr "" + +#: dasdinit.c:261 +msgid "HHCDI001I DASD initialization successfully completed.\n" +msgstr "" + +#: dasdisup.c:246 +msgid "HHCDS003E Directory block byte count is invalid\n" +msgstr "" + +#: dasdisup.c:291 +#, c-format +msgid "HHCDS018I %s %s skipped\n" +msgstr "" + +#: dasdisup.c:304 +msgid "HHCDS004E Number of members exceeds MAX_MEMBERS\n" +msgstr "" + +#: dasdisup.c:313 +#, c-format +msgid "HHCDS005E Member %s TTR count is zero\n" +msgstr "" + +#: dasdisup.c:342 +#, c-format +msgid "HHCDS006W Member %s is not single text record\n" +msgstr "" + +#: dasdisup.c:351 +#, c-format +msgid "HHCDS007W Member %s size %4.4X exceeds X'7F8' bytes\n" +msgstr "" + +#: dasdisup.c:360 +#, c-format +msgid "HHCDS008W Member %s size %4.4X is not a multiple of 8\n" +msgstr "" + +#: dasdisup.c:414 +#, c-format +msgid "HHCDS009I Alias %s skipped\n" +msgstr "" + +#: dasdisup.c:421 +#, c-format +msgid "HHCDS010I Member %s skipped\n" +msgstr "" + +#: dasdisup.c:429 +#, c-format +msgid "HHCDS011E Member %s has multiple text records\n" +msgstr "" + +#: dasdisup.c:441 +#, c-format +msgid "HHCDS012E Member %s has invalid TTR %4.4X%2.2X\n" +msgstr "" + +#: dasdisup.c:447 +#, c-format +msgid "" +"HHCDS013I Processing member %s text record TTR=%4.4X%2.2X CCHHR=%4.4X%4.4X%" +"2.2X\n" +msgstr "" + +#: dasdisup.c:457 +#, c-format +msgid "HHCDS014E Member %s error reading TTR %4.4X%2.2X\n" +msgstr "" + +#: dasdisup.c:466 +#, c-format +msgid "" +"HHCDS015E Member %s TTR %4.4X%2.2X text record length %4.4X is not valid\n" +msgstr "" + +#: dasdisup.c:476 +#, c-format +msgid "" +"HHCDS016E Member %s TTR %4.4X%2.2X text record length %4.4X does not match " +"length %4.4X in directory\n" +msgstr "" + +#: dasdisup.c:521 +#, c-format +msgid "HHCDS017E Member %s TTR %4.4X%2.2X XCTL table improperly terminated\n" +msgstr "" + +#: dasdisup.c:543 +#, c-format +msgid "HHCDS019I In member %s: %s TTRL=%2.2X%2.2X%2.2X%2.2X" +msgstr "" + +#: dasdisup.c:659 +#, c-format +msgid "HHCDS001E Cannot obtain storage for member array: %s\n" +msgstr "" + +#: dasdisup.c:711 +#, c-format +msgid "HHCDS002I End of directory: %d members selected\n" +msgstr "" + +#: dasdutil.c:206 +#, c-format +msgid "HHCDU001I Updating cyl %d head %d\n" +msgstr "" + +#: dasdutil.c:212 +#, c-format +msgid "HHCDU002E %s write track error: stat=%2.2X\n" +msgstr "" + +#: dasdutil.c:219 +#, c-format +msgid "HHCDU003I Reading cyl %d head %d\n" +msgstr "" + +#: dasdutil.c:225 +#, c-format +msgid "HHCDU004E %s read track error: stat=%2.2X\n" +msgstr "" + +#: dasdutil.c:346 +#, c-format +msgid "HHCDU005I Searching extent %d begin (%d,%d) end (%d,%d)\n" +msgstr "" + +#: dasdutil.c:418 +#, c-format +msgid "HHCDU006I Searching extent %d begin (%d,%d) end (%d,%d)\n" +msgstr "" + +#: dasdutil.c:479 +#, c-format +msgid "HHCDU007E Track %d not found in extent table\n" +msgstr "" + +#: dasdutil.c:517 +#, c-format +msgid "HHCDU008E Cannot obtain storage for device descriptor buffer: %s\n" +msgstr "" + +#: dasdutil.c:576 +#, c-format +msgid "HHCDU009E Cannot open %s: %s\n" +msgstr "" + +#: dasdutil.c:591 +#, c-format +msgid "HHCDU010E %s read error: %s\n" +msgstr "" + +#: dasdutil.c:602 +#, c-format +msgid "HHCDU011E %s CKD header invalid\n" +msgstr "" + +#: dasdutil.c:611 +#, c-format +msgid "HHCDU012E DASD table entry not found for devtype 0x%2.2X\n" +msgstr "" + +#: dasdutil.c:641 +#, c-format +msgid "HHCDU013E CKD initialization failed for %s\n" +msgstr "" + +#: dasdutil.c:663 +#, c-format +msgid "HHCDU014I %s heads=%d trklen=%d\n" +msgstr "" + +#: dasdutil.c:697 +#, c-format +msgid "HHCDU015I Updating cyl %d head %d\n" +msgstr "" + +#: dasdutil.c:703 +#, c-format +msgid "HHCDU016E %s write track error: stat=%2.2X\n" +msgstr "" + +#: dasdutil.c:746 +#, c-format +msgid "HHCDU017E Cannot obtain storage for device descriptor buffer: %s\n" +msgstr "" + +#: dasdutil.c:762 +#, c-format +msgid "HHCDU018E DASD table entry not found for devtype 0x%2.2X\n" +msgstr "" + +#: dasdutil.c:789 +#, c-format +msgid "HHCDU019E FBA initialization failed for %s\n" +msgstr "" + +#: dasdutil.c:805 +#, c-format +msgid "HHCDU020I %s sectors=%d size=%d\n" +msgstr "" + +#: dasdutil.c:851 +msgid "HHCDU021E VOL1 record not found\n" +msgstr "" + +#: dasdutil.c:864 +#, c-format +msgid "HHCDU022I VOLSER=%s VTOC=%4.4X%4.4X%2.2X\n" +msgstr "" + +#: dasdutil.c:874 +msgid "HHCDU023E F4DSCB record not found\n" +msgstr "" + +#: dasdutil.c:881 +#, c-format +msgid "HHCDU023I VTOC start %2.2X%2.2X%2.2X%2.2X end %2.2X%2.2X%2.2X%2.2X\n" +msgstr "" + +#: dasdutil.c:897 +#, c-format +msgid "HHCDU024E Dataset %s not found in VTOC\n" +msgstr "" + +#: dasdutil.c:905 +#, c-format +msgid "HHCDU025I DSNAME=%s F1DSCB CCHHR=%4.4X%4.4X%2.2X\n" +msgstr "" + +#: dasdutil.c:915 +msgid "HHCDU026E F1DSCB record not found\n" +msgstr "" + +#: dasdutil.c:937 +msgid "HHCDU027E F3DSCB record not found\n" +msgstr "" + +#: dasdutil.c:1160 +#, c-format +msgid "HHCDU028E %s open error: %s\n" +msgstr "" + +#: dasdutil.c:1188 +#, c-format +msgid "HHCDU029E %s device header write error: %s\n" +msgstr "" + +#: dasdutil.c:1216 +#, c-format +msgid "HHCDU030E %s compressed device header write error: %s\n" +msgstr "" + +#: dasdutil.c:1226 +#, c-format +msgid "HHCDU031E Cannot obtain l1tab buffer: %s\n" +msgstr "" + +#: dasdutil.c:1236 +#, c-format +msgid "HHCDU032E %s primary lookup table write error: %s\n" +msgstr "" + +#: dasdutil.c:1251 +#, c-format +msgid "HHCDU033E %s secondary lookup table write error: %s\n" +msgstr "" + +#: dasdutil.c:1265 +#, c-format +msgid "HHCDU034E %s dasdcopy ftruncate error: %s\n" +msgstr "" + +#: dasdutil.c:1381 +#, c-format +msgid "HHCDU035E %s cylinder %u head %u write error: %s\n" +msgstr "" + +#: dasdutil.c:1405 +#, c-format +msgid "HHCDU036E %s compressed device header lseek error: %s\n" +msgstr "" + +#: dasdutil.c:1413 +#, c-format +msgid "HHCDU037E %s compressed device header write error: %s\n" +msgstr "" + +#: dasdutil.c:1425 +#, c-format +msgid "HHCDU038E %s secondary lookup table lseek error: %s\n" +msgstr "" + +#: dasdutil.c:1433 +#, c-format +msgid "HHCDU039E %s secondary lookup table write error: %s\n" +msgstr "" + +#: dasdutil.c:1448 +#, c-format +msgid "HHCDU040E %s close error: %s\n" +msgstr "" + +#: dasdutil.c:1455 +#, c-format +msgid "HHCDU041I %u cylinders successfully written to file %s\n" +msgstr "" + +#: dasdutil.c:1522 +#, c-format +msgid "HHCDU042E Cylinder count %u is outside range %u-%u\n" +msgstr "" + +#: dasdutil.c:1531 +#, c-format +msgid "HHCDU043E Cannot obtain track buffer: %s\n" +msgstr "" + +#: dasdutil.c:1538 +#, c-format +msgid "" +"HHCDU044I Creating %4.4X volume %s: %u cyls, %u trks/cyl, %u bytes/track\n" +msgstr "" + +#: dasdutil.c:1643 +#, c-format +msgid "HHCDU045E Sector count %u is outside range %u-%u\n" +msgstr "" + +#: dasdutil.c:1652 +#, c-format +msgid "HHCDU046E Cannot obtain sector buffer: %s\n" +msgstr "" + +#: dasdutil.c:1659 +#, c-format +msgid "HHCDU047I Creating %4.4X volume %s: %u sectors, %u bytes/sector\n" +msgstr "" + +#: dasdutil.c:1671 +#, c-format +msgid "HHCDU048I %s open error: %s\n" +msgstr "" + +#: dasdutil.c:1683 +#, c-format +msgid "HHCDU049E %s dasdcopy ftruncate error: %s\n" +msgstr "" + +#: dasdutil.c:1718 +#, c-format +msgid "HHCDU050E %s sector %u write error: %s\n" +msgstr "" + +#: dasdutil.c:1730 +#, c-format +msgid "HHCDU051E %s close error: %s\n" +msgstr "" + +#: dasdutil.c:1740 +#, c-format +msgid "HHCDU052I %u sectors successfully written to file %s\n" +msgstr "" + +#: dasdutil.c:1782 +#, c-format +msgid "HHCDU053E File size too large: %lld [%d]\n" +msgstr "" + +#: dasdutil.c:1795 +#, c-format +msgid "HHCDU054E %s open error: %s\n" +msgstr "" + +#: dasdutil.c:1802 +#, c-format +msgid "" +"HHCDU055I Creating %4.4X compressed volume %s: %u sectors, %u bytes/sector\n" +msgstr "" + +#: dasdutil.c:1812 +#, c-format +msgid "HHCDU056E %s devhdr write error: %s\n" +msgstr "" + +#: dasdutil.c:1835 +#, c-format +msgid "HHCDU057E %s cdevhdr write error: %s\n" +msgstr "" + +#: dasdutil.c:1847 +#, c-format +msgid "HHCDU058E %s l1tab write error: %s\n" +msgstr "" + +#: dasdutil.c:1859 +#, c-format +msgid "HHCDU059E %s l2tab write error: %s\n" +msgstr "" + +#: dasdutil.c:1878 +#, c-format +msgid "HHCDU060E %s block header write error: %s\n" +msgstr "" + +#: dasdutil.c:1885 +#, c-format +msgid "HHCDU061E %s block write error: %s\n" +msgstr "" + +#: dasdutil.c:1900 +#, c-format +msgid "HHCDU062E %s block write error: %s\n" +msgstr "" + +#: dasdutil.c:1914 +#, c-format +msgid "HHCDU063E %s cdevhdr lseek error: %s\n" +msgstr "" + +#: dasdutil.c:1921 +#, c-format +msgid "HHCDU064E %s cdevhdr rewrite error: %s\n" +msgstr "" + +#: dasdutil.c:1930 +#, c-format +msgid "HHCDU065E %s l2tab lseek error: %s\n" +msgstr "" + +#: dasdutil.c:1937 +#, c-format +msgid "HHCDU066E %s l2tab rewrite error: %s\n" +msgstr "" + +#: dasdutil.c:1946 +#, c-format +msgid "HHCDU067E %s close error: %s\n" +msgstr "" + +#: dasdutil.c:1953 +#, c-format +msgid "HHCDU068I %u sectors successfully written to file %s\n" +msgstr "" + +#: dyngui.c:201 +#, c-format +msgid "HHCDG003S select failed on input stream: %s\n" +msgstr "" + +#: dyngui.c:235 +#, c-format +msgid "HHCDG004S read failed on input stream: %s\n" +msgstr "" + +#: dyngui.c:756 +#, c-format +msgid "HHCDG005E Device query buffer overflow! (device=%4.4X)\n" +msgstr "" + +#: dyngui.c:862 +#, c-format +msgid "HHCDG006S malloc pszInputBuff failed: %s\n" +msgstr "" + +#: dyngui.c:875 +#, c-format +msgid "HHCDG007S malloc pszCommandBuff failed: %s\n" +msgstr "" + +#: dyngui.c:902 +msgid "HHCDG001I dyngui.dll version " +msgstr "" + +#: dyngui.c:902 +msgid "-" +msgstr "" + +#: dyngui.c:902 +msgid " initiated\n" +msgstr "" + +#: dyngui.c:905 +msgid "HHCDG002I dyngui.dll terminated\n" +msgstr "" + +#: ecpsvm.c:215 ecpsvm.c:220 ecpsvm.c:236 ecpsvm.c:258 ecpsvm.c:259 +#: ecpsvm.c:260 ecpsvm.c:262 +msgid "HHCEV300D : SASSIST " +msgstr "" + +#: ecpsvm.c:215 +msgid " ECPS:VM Disabled in configuration\n" +msgstr "" + +#: ecpsvm.c:220 +msgid " ECPS:VM Disabled by command\n" +msgstr "" + +#: ecpsvm.c:226 +msgid "HHCEV300D : EVMA Disabled by guest\n" +msgstr "" + +#: ecpsvm.c:236 +#, c-format +msgid " Micblok @ %6.6X crosses page frame\n" +msgstr "" + +#: ecpsvm.c:258 +#, c-format +msgid " CR6= %8.8X\n" +msgstr "" + +#: ecpsvm.c:259 +#, c-format +msgid " MICVTMR= %8.8X\n" +msgstr "" + +#: ecpsvm.c:260 +#, c-format +msgid " VPSWA= %8.8X Virtual " +msgstr "" + +#: ecpsvm.c:262 +msgid " Real " +msgstr "" + +#: ecpsvm.c:273 ecpsvm.c:279 +msgid "HHCEV300D : CPASSTS " +msgstr "" + +#: ecpsvm.c:273 +msgid " ECPS:VM Disabled in configuration " +msgstr "" + +#: ecpsvm.c:279 +msgid " Disabled by command" +msgstr "" + +#: ecpsvm.c:287 +msgid "HHCEV300D : " +msgstr "" + +#: ecpsvm.c:287 +msgid " called\n" +msgstr "" + +#: ecpsvm.c:359 +msgid "HHCEV300D : LKPG coreptr = " +msgstr "" + +#: ecpsvm.c:359 +msgid " Frame = " +msgstr "" + +#: ecpsvm.c:362 +#, c-format +msgid "HHCEV300D : LKPG corete = %6.6X\n" +msgstr "" + +#: ecpsvm.c:376 +#, c-format +msgid "HHCEV300D : LKPG Page locked. Count = %6.6X\n" +msgstr "" + +#: ecpsvm.c:393 +#, c-format +msgid "HHCEV300D : LKPG PAGE=%6.6X, PTRPL=%6.6X\n" +msgstr "" + +#: ecpsvm.c:420 +#, c-format +msgid "HHCEV300D : ULKPG PAGE=%6.6X, PTRPL=%6.6X\n" +msgstr "" + +#: ecpsvm.c:426 +#, c-format +msgid "HHCEV300D : ULKPG Page beyond core size of %6.6X\n" +msgstr "" + +#: ecpsvm.c:438 +msgid "HHCEV300D : ULKPG Attempting to unlock page that is not locked\n" +msgstr "" + +#: ecpsvm.c:445 +msgid "HHCEV300D : ULKPG now unlocked\n" +msgstr "" + +#: ecpsvm.c:449 +#, c-format +msgid "HHCEV300D : ULKPG Page still locked. Count = %6.6X\n" +msgstr "" + +#: ecpsvm.c:485 +#, c-format +msgid "HHCEV300D SCNVU Virtual Device %4.4X has no VCHAN block\n" +msgstr "" + +#: ecpsvm.c:493 +#, c-format +msgid "HHCEV300D SCNVU Virtual Device %4.4X has no VCU block\n" +msgstr "" + +#: ecpsvm.c:501 +#, c-format +msgid "HHCEV300D SCNVU Virtual Device %4.4X has no VDEV block\n" +msgstr "" + +#: ecpsvm.c:505 +#, c-format +msgid "HHCEV300D SCNVU %4.4X : VCH = %8.8X, VCU = %8.8X, VDEV = %8.8X\n" +msgstr "" + +#: ecpsvm.c:866 +msgid "HHCEV004W : Abend condition detected in DISP2 instr\n" +msgstr "" + +#: ecpsvm.c:1058 +#, c-format +msgid "HHCPEV300D : DISP2 - Next Instruction : %2.2X\n" +msgstr "" + +#: ecpsvm.c:1123 +#, c-format +msgid "HHCEV300D : Tranbring : LRA cc = %d\n" +msgstr "" + +#: ecpsvm.c:1132 +#, c-format +msgid "HHCEV300D : Page not shared - OK %d\n" +msgstr "" + +#: ecpsvm.c:1138 +msgid "HHCEV300D : Checking 2K Storage keys @" +msgstr "" + +#: ecpsvm.c:1138 +msgid " & " +msgstr "" + +#: ecpsvm.c:1143 +msgid "HHCEV300D : Checking 4K Storage keys @" +msgstr "" + +#: ecpsvm.c:1147 +msgid "HHCEV300D : Page shared and changed\n" +msgstr "" + +#: ecpsvm.c:1150 +msgid "HHCEV300D : Page shared but not changed\n" +msgstr "" + +#: ecpsvm.c:1169 +msgid "HHCEV300D : TRANBRNG\n" +msgstr "" + +#: ecpsvm.c:1173 +msgid "HHCEV300D : TRANBRNG - Back to CP\n" +msgstr "" + +#: ecpsvm.c:1191 +msgid "HHCEV300D : TRANLOCK\n" +msgstr "" + +#: ecpsvm.c:1195 +msgid "HHCEV300D : TRANLOCK - Back to CP\n" +msgstr "" + +#: ecpsvm.c:1708 +#, c-format +msgid "HHCEV300D : ECPS:VM SCNRU called; RDEV=%4.4X ARIOCT=%6.6X\n" +msgstr "" + +#: ecpsvm.c:1782 +#, c-format +msgid "HHCEV300D : ECPS:VM SCNRU : RCH = %6.6X, RCU = %6.6X, RDV = %6.6X\n" +msgstr "" + +#: ecpsvm.c:1826 +#, c-format +msgid "HHCEV300D : ECPS:VM STORE LEVEL %d called\n" +msgstr "" + +#: ecpsvm.c:1866 +#, c-format +msgid "HHCEV300D : ECPS:VM FREEX DW = %4.4X\n" +msgstr "" + +#: ecpsvm.c:1871 +#, c-format +msgid "HHCEV300D : MAXSIZE ADDR = %6.6X, SUBPOOL INDEX TABLE = %6.6X\n" +msgstr "" + +#: ecpsvm.c:1878 +msgid "HHCEV300D : FREEX request beyond subpool capacity\n" +msgstr "" + +#: ecpsvm.c:1883 +#, c-format +msgid "HHCEV300D : Subpool index = %X\n" +msgstr "" + +#: ecpsvm.c:1886 +#, c-format +msgid "HHCEV300D : Value in subpool table = %6.6X\n" +msgstr "" + +#: ecpsvm.c:1894 +#, c-format +msgid "HHCEV300D : New Value in subpool table = %6.6X\n" +msgstr "" + +#: ecpsvm.c:1924 +#, c-format +msgid "HHCEV300D : X fretx called AREA=%6.6X, DW=%4.4X\n" +msgstr "" + +#: ecpsvm.c:1927 +msgid "HHCEV300D : ECPS:VM Cannot FRETX : DWORDS = 0\n" +msgstr "" + +#: ecpsvm.c:1933 +#, c-format +msgid "HHCEV300D : ECPS:VM Cannot FRETX : DWORDS = %d > MAXDW %d\n" +msgstr "" + +#: ecpsvm.c:1940 +msgid "HHCEV300D : ECPS:VM Cannot FRETX : Area not in Core Free area\n" +msgstr "" + +#: ecpsvm.c:1945 +msgid "HHCEV300D : ECPS:VM Cannot FRETX : Area flag != 0x02\n" +msgstr "" + +#: ecpsvm.c:1952 +msgid "" +"HHCEV300D : ECPS:VM Cannot FRETX : fretted block already on subpool chain\n" +msgstr "" + +#: ecpsvm.c:2018 +msgid "HHCEV300D : New and Old PSW have a EC/BC transition\n" +msgstr "" + +#: ecpsvm.c:2026 +msgid "HHCEV300D : New PSW Enables DAT or PER\n" +msgstr "" + +#: ecpsvm.c:2037 +msgid "HHCEV300D : New PSW Enables interrupts and MICPEND (EC)\n" +msgstr "" + +#: ecpsvm.c:2045 +msgid "HHCEV300D : New PSW Enables interrupts and MICPEND (BC)\n" +msgstr "" + +#: ecpsvm.c:2052 +msgid "HHCEV300D : New PSW is a WAIT PSW\n" +msgstr "" + +#: ecpsvm.c:2059 +msgid "HHCEV300D : New PSW sysmask incorrect\n" +msgstr "" + +#: ecpsvm.c:2065 +msgid "HHCEV300D : New PSW has ODD IA\n" +msgstr "" + +#: ecpsvm.c:2602 ecpsvm.c:2619 +#, c-format +msgid "HHCEV001I | %-9s | %8d | %8d | %3d%% |\n" +msgstr "" + +#: ecpsvm.c:2629 +#, c-format +msgid "HHCEV004I * : Unsupported, - : Disabled, %% - Debug\n" +msgstr "" + +#: ecpsvm.c:2633 +#, c-format +msgid "HHCEV005I %d Entr%s not shown (never invoked)\n" +msgstr "" + +#: ecpsvm.c:2639 +msgid "HHCEV006I 1 call was made to an unsupported function\n" +msgstr "" + +#: ecpsvm.c:2643 +#, c-format +msgid "HHCEV006I %d calls where made to unsupported functions\n" +msgstr "" + +#: ecpsvm.c:2658 ecpsvm.c:2667 +#, c-format +msgid "HHCEV002I | %-9s | %-8s | %-8s | %-5s |\n" +msgstr "" + +#: ecpsvm.c:2685 +#, c-format +msgid "HHCEV010I : %s : %s\n" +msgstr "" + +#: ecpsvm.c:2700 +#, c-format +msgid "HHCEV011E Unknown subcommand %s - valid subcommands are :\n" +msgstr "" + +#: ecpsvm.c:2704 +#, c-format +msgid "HHCEV012I : %s : %s" +msgstr "" + +#: ecpsvm.c:2752 +#, c-format +msgid "HHCEV015I ECPS:VM %s feature %s %s\n" +msgstr "" + +#: ecpsvm.c:2757 +#, c-format +msgid "HHCEV015I ECPS:VM %s feature %s Debug %s\n" +msgstr "" + +#: ecpsvm.c:2762 +#, c-format +msgid "HHCEV016I All ECPS:VM %s features %s\n" +msgstr "" + +#: ecpsvm.c:2766 +#, c-format +msgid "HHCEV016I All ECPS:VM %s features Debug %s\n" +msgstr "" + +#: ecpsvm.c:2794 +#, c-format +msgid "HHCEV013I ECPS:VM Global Debug %s\n" +msgstr "" + +#: ecpsvm.c:2822 +#, c-format +msgid "HHCEV014I ECPS:VM %s feature %s %s\n" +msgstr "" + +#: ecpsvm.c:2827 +#, c-format +msgid "HHCEV014I ECPS:VM %s feature %s Debug %s\n" +msgstr "" + +#: ecpsvm.c:2832 +#, c-format +msgid "HHCEV014I Unknown ECPS:VM feature %s; Ignored\n" +msgstr "" + +#: ecpsvm.c:2859 ecpsvm.c:2863 +#, c-format +msgid "HHCEV016I Current reported ECPS:VM Level is %d\n" +msgstr "" + +#: ecpsvm.c:2864 +msgid "HHCEV017I But ECPS:VM is currently disabled\n" +msgstr "" + +#: ecpsvm.c:2869 +#, c-format +msgid "HHCEV016I Level reported to guest program is now %d\n" +msgstr "" + +#: ecpsvm.c:2874 +#, c-format +msgid "HHCEV017W WARNING ! current level (%d) is not supported\n" +msgstr "" + +#: ecpsvm.c:2875 +msgid "HHCEV018W WARNING ! Unpredictable results may occur\n" +msgstr "" + +#: ecpsvm.c:2876 +msgid "HHCEV019I The microcode support level is 20\n" +msgstr "" + +#: ecpsvm.c:2915 +msgid "HHCEV011I ECPS:VM Command processor invoked\n" +msgstr "" + +#: ecpsvm.c:2918 +msgid "" +"HHCEV008E NO EVM subcommand. Type \"evm help\" for a list of valid " +"subcommands\n" +msgstr "" + +#: ecpsvm.c:2924 +#, c-format +msgid "HHCEV008E Unknown EVM subcommand %s\n" +msgstr "" + +#: ecpsvm.c:2928 +msgid "HHCEV011I ECPS:VM Command processor complete\n" +msgstr "" + +#: external.c:257 +msgid "HHCCP023I External interrupt: Interrupt key\n" +msgstr "" + +#: external.c:370 +msgid "HHCCP024I External interrupt: Clock comparator\n" +msgstr "" + +#: external.c:381 +#, c-format +msgid "HHCCP025I External interrupt: CPU timer=%16.16llX\n" +msgstr "" + +#: external.c:412 +msgid "HHCCP026I External interrupt: Interval timer\n" +msgstr "" + +#: fbadasd.c:73 +msgid "HHCDA056E File name missing or invalid\n" +msgstr "" + +#: fbadasd.c:89 +#, c-format +msgid "HHCDA057E %4.4X:File not found or invalid\n" +msgstr "" + +#: fbadasd.c:104 +#, c-format +msgid "HHCDA058E File %s open error: %s\n" +msgstr "" + +#: fbadasd.c:116 +#, c-format +msgid "HHCDA059E Read error in file %s: %s\n" +msgstr "" + +#: fbadasd.c:119 +#, c-format +msgid "HHCDA060E Unexpected end of file in %s\n" +msgstr "" + +#: fbadasd.c:137 +#, c-format +msgid "HHCDA061E Read error in file %s: %s\n" +msgstr "" + +#: fbadasd.c:140 +#, c-format +msgid "HHCDA062E Unexpected end of file in %s\n" +msgstr "" + +#: fbadasd.c:182 +#, c-format +msgid "HHCDA063E parameter %d is invalid: %s\n" +msgstr "" + +#: fbadasd.c:195 +#, c-format +msgid "HHCDA064E File %s fstat error: %s\n" +msgstr "" + +#: fbadasd.c:207 +#, c-format +msgid "HHCDA082E File %s IOCTL BLKGETSIZE error: %s\n" +msgstr "" + +#: fbadasd.c:237 +#, c-format +msgid "HHCDA065E Invalid device origin block number %s\n" +msgstr "" + +#: fbadasd.c:253 +#, c-format +msgid "HHCDA066E Invalid device block count %s\n" +msgstr "" + +#: fbadasd.c:264 +#, c-format +msgid "HHCDA067I %s origin=%d blks=%d\n" +msgstr "" + +#: fbadasd.c:274 +#, c-format +msgid "HHCDA068E %4.4X device type %4.4X not found in dasd table\n" +msgstr "" + +#: fbadasd.c:499 +#, c-format +msgid "HHCDA069E error writing blkgrp %d: lseek error: %s\n" +msgstr "" + +#: fbadasd.c:517 +#, c-format +msgid "HHCDA070E error writing blkgrp %d: write error: %s\n" +msgstr "" + +#: fbadasd.c:558 +#, c-format +msgid "HHCDA071I read blkgrp %d cache hit, using cache[%d]\n" +msgstr "" + +#: fbadasd.c:583 +#, c-format +msgid "HHCDA072I read blkgrp %d no available cache entry, waiting\n" +msgstr "" + +#: fbadasd.c:591 +#, c-format +msgid "HHCDA073I read blkgrp %d cache miss, using cache[%d]\n" +msgstr "" + +#: fbadasd.c:607 +#, c-format +msgid "HHCDA074I read blkgrp %d offset %lld len %d\n" +msgstr "" + +#: fbadasd.c:615 +#, c-format +msgid "HHCDA075E error reading blkgrp %d: lseek error: %s\n" +msgstr "" + +#: fbadasd.c:630 +#, c-format +msgid "HHCDA076E error reading blkgrp %d: read error: %s\n" +msgstr "" + +#: fbadasd.c:1058 +#, c-format +msgid "HHCDA077I Positioning to %8.8llX (%llu)\n" +msgstr "" + +#: fbadasd.c:1076 +#, c-format +msgid "HHCDA078E define extent data too short: %d bytes\n" +msgstr "" + +#: fbadasd.c:1086 +msgid "HHCDA079E second define extent in chain\n" +msgstr "" + +#: fbadasd.c:1097 +#, c-format +msgid "HHCDA080E invalid file mask %2.2X\n" +msgstr "" + +#: fbadasd.c:1138 +#, c-format +msgid "HHCDA081E invalid extent: first block %d, last block %d,\n" +msgstr "" + +#: fbadasd.c:1140 +#, c-format +msgid " numblks %d, device size %d\n" +msgstr "" + +#: general1.c:3226 +msgid "MVCL destructive overlap: " +msgstr "" + +#: hdl.c:380 +#, c-format +msgid "HHCHD010I Dependency check failed for %s, version(%s) expected(%s)\n" +msgstr "" + +#: hdl.c:387 +#, c-format +msgid "HHCHD011I Dependency check failed for %s, size(%d) expected(%d)\n" +msgstr "" + +#: hdl.c:429 +#, c-format +msgid "HHCHD001E registration malloc failed for %s\n" +msgstr "" + +#: hdl.c:545 +#, c-format +msgid "HHCHD002E cannot allocate memory for DLL descriptor: %s\n" +msgstr "" + +#: hdl.c:559 +#, c-format +msgid "HHCHD003E unable to open hercules as DLL: %s\n" +msgstr "" + +#: hdl.c:568 +#, c-format +msgid "HHCHD012E No depency section in %s: %s\n" +msgstr "" + +#: hdl.c:640 +#, c-format +msgid "HHCHD005E %s already loaded\n" +msgstr "" + +#: hdl.c:647 +#, c-format +msgid "HHCHD006S cannot allocate memory for DLL descriptor: %s\n" +msgstr "" + +#: hdl.c:657 +#, c-format +msgid "HHCHD007E unable to open DLL %s: %s\n" +msgstr "" + +#: hdl.c:667 +#, c-format +msgid "HHCHD013E No dependency section in %s: %s\n" +msgstr "" + +#: hdl.c:678 +#, c-format +msgid "HHCHD016E DLL %s is duplicate of %s\n" +msgstr "" + +#: hdl.c:705 +#, c-format +msgid "HHCHD014E Dependency check failed for module %s\n" +msgstr "" + +#: hdl.c:772 +#, c-format +msgid "HHCHD015E Unloading of %s not allowed\n" +msgstr "" + +#: hdl.c:782 +#, c-format +msgid "HHCHD008E Device %4.4X bound to %s\n" +msgstr "" + +#: hdl.c:794 +#, c-format +msgid "HHCHD017E Unload of %s rejected by final section\n" +msgstr "" + +#: hdl.c:854 +#, c-format +msgid "HHCHD009E %s not found\n" +msgstr "" + +#: hercifc.c:59 +#, c-format +msgid "HHCIF001E %s: Must be called from within Hercules.\n" +msgstr "" + +#: hercifc.c:70 +#, c-format +msgid "HHCIF002E %s: Cannot obtain socket: %s\n" +msgstr "" + +#: hercifc.c:85 +#, c-format +msgid "HHCIF003E %s: I/O error on read: %s.\n" +msgstr "" + +#: hercifc.c:162 +#, c-format +msgid "HHCIF004W %s: Unknown request: %8.8X.\n" +msgstr "" + +#: hercifc.c:175 +#, c-format +msgid "HHCIF005E %s: ioctl error doing %s on %s: %s\n" +msgstr "" + +#: hostinfo.c:64 +#, c-format +msgid "Running on %s %s%s %s %s\n" +msgstr "" + +#: hsccmd.c:65 +msgid "HHCIN099I Hercules terminated\n" +msgstr "" + +#: hsccmd.c:115 +msgid "HHCPN015E Invalid device number\n" +msgstr "" + +#: hsccmd.c:121 +#, c-format +msgid "HHCPN016E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:129 +#, c-format +msgid "HHCPN017E Device %4.4X is not a printer device\n" +msgstr "" + +#: hsccmd.c:143 +#, c-format +msgid "HHCPN018I Printer %4.4X started\n" +msgstr "" + +#: hsccmd.c:145 +#, c-format +msgid "HHCPN019E Printer %4.4X not started: busy or interrupt pending\n" +msgstr "" + +#: hsccmd.c:148 +#, c-format +msgid "HHCPN020E Printer %4.4X not started: attention request rejected\n" +msgstr "" + +#: hsccmd.c:151 +#, c-format +msgid "HHCPN021E Printer %4.4X not started: subchannel not enabled\n" +msgstr "" + +#: hsccmd.c:207 +msgid "HHCPN022E Invalid device number\n" +msgstr "" + +#: hsccmd.c:213 +#, c-format +msgid "HHCPN023E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:221 +#, c-format +msgid "HHCPN024E Device %4.4X is not a printer device\n" +msgstr "" + +#: hsccmd.c:228 +#, c-format +msgid "HHCPN025I Printer %4.4X stopped\n" +msgstr "" + +#: hsccmd.c:296 +msgid "HHCPN026W Ignored. (external GUI active)\n" +msgstr "" + +#: hsccmd.c:301 +#, c-format +msgid "HHCPN027I Automatic refresh %s.\n" +msgstr "" + +#: hsccmd.c:302 +msgid "disabled" +msgstr "" + +#: hsccmd.c:302 +msgid "enabled" +msgstr "" + +#: hsccmd.c:317 +#, c-format +msgid "HHCPN028I tod = %16.16llX\n" +msgstr "" + +#: hsccmd.c:350 +#, c-format +msgid "HHCPN029E Invalid I/O delay value: %s\n" +msgstr "" + +#: hsccmd.c:355 +#, c-format +msgid "HHCPN030I I/O delay = %d\n" +msgstr "" + +#: hsccmd.c:391 +msgid "HHCPN031E Missing device number\n" +msgstr "" + +#: hsccmd.c:397 +#, c-format +msgid "HHCPN032E Device number %s is invalid\n" +msgstr "" + +#: hsccmd.c:404 +#, c-format +msgid "HHCPN033E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:410 +#, c-format +msgid "HHCPN034E Device %4.4X is not a CTCI or LCS device\n" +msgstr "" + +#: hsccmd.c:419 +msgid "(error)\n" +msgstr "" + +#: hsccmd.c:442 +msgid "HHCPN035E store status rejected: CPU not stopped\n" +msgstr "" + +#: hsccmd.c:471 +#, c-format +msgid "HHCPN036I TOD clock drag factor = %d\n" +msgstr "" + +#: hsccmd.c:504 +#, c-format +msgid "HHCPN037I Panel refresh rate = %d millisecond(s)\n" +msgstr "" + +#: hsccmd.c:620 +msgid "HHCPN038I Restart key depressed\n" +msgstr "" + +#: hsccmd.c:693 +msgid "HHCPN039E Missing argument\n" +msgstr "" + +#: hsccmd.c:699 +#, c-format +msgid "HHCPN040I Setting breakpoint at %16.16llX\n" +msgstr "" + +#: hsccmd.c:717 +msgid "HHCPN041I Deleting breakpoint\n" +msgstr "" + +#: hsccmd.c:739 +msgid "HHCPN042E Missing device number\n" +msgstr "" + +#: hsccmd.c:745 +#, c-format +msgid "HHCPN043E Device number %s is invalid\n" +msgstr "" + +#: hsccmd.c:751 +#, c-format +msgid "HHCPN044E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:758 +#, c-format +msgid "HHCPN045I Device %4.4X attention request raised\n" +msgstr "" + +#: hsccmd.c:761 +#, c-format +msgid "HHCPN046E Device %4.4X busy or interrupt pending\n" +msgstr "" + +#: hsccmd.c:764 +#, c-format +msgid "HHCPN047E Device %4.4X attention request rejected\n" +msgstr "" + +#: hsccmd.c:767 +#, c-format +msgid "HHCPN048E Device %4.4X subchannel not enabled\n" +msgstr "" + +#: hsccmd.c:773 +#, c-format +msgid "HHCPN049W Are you sure you didn't mean 'ipl %4.4X' instead?\n" +msgstr "" + +#: hsccmd.c:792 +msgid "HHCPN050I Interrupt key depressed\n" +msgstr "" + +#: hsccmd.c:828 +#, c-format +msgid "HHCPN051I LOADPARM=%c%c%c%c%c%c%c%c\n" +msgstr "" + +#: hsccmd.c:855 +msgid "HHCPN052E Missing device number\n" +msgstr "" + +#: hsccmd.c:863 +msgid "HHCPN053E ipl rejected: All CPU's must be stopped\n" +msgstr "" + +#: hsccmd.c:889 +msgid "HHCPN054E Missing argument\n" +msgstr "" + +#: hsccmd.c:895 +#, c-format +msgid "HHCPN055E Target CPU %s is invalid\n" +msgstr "" + +#: hsccmd.c:906 +#, c-format +msgid "HHCPN056E CPU%4.4X not configured\n" +msgstr "" + +#: hsccmd.c:970 +#, c-format +msgid "HHCPN146E Work buffer malloc failed: %s\n" +msgstr "" + +#: hsccmd.c:1016 +msgid "open " +msgstr "" + +#: hsccmd.c:1017 +msgid "busy " +msgstr "" + +#: hsccmd.c:1018 +msgid "pending " +msgstr "" + +#: hsccmd.c:1029 +#, c-format +msgid " (client %s (%s) connected)\n" +msgstr "" + +#: hsccmd.c:1035 +msgid " (no one currently connected)\n" +msgstr "" + +#: hsccmd.c:1047 +#, c-format +msgid "HHCPN147W Warning: not all devices shown (max %d)\n" +msgstr "" + +#: hsccmd.c:1068 +msgid "HHCPN057E Missing argument(s)\n" +msgstr "" + +#: hsccmd.c:1074 +#, c-format +msgid "HHCPN059E Device number %s is invalid\n" +msgstr "" + +#: hsccmd.c:1081 +#, c-format +msgid "Device type %s is invalid\n" +msgstr "" + +#: hsccmd.c:1101 +msgid "HHCPN060E Missing device number\n" +msgstr "" + +#: hsccmd.c:1107 +#, c-format +msgid "HHCPN061E Device number %s is invalid\n" +msgstr "" + +#: hsccmd.c:1126 +msgid "HHCPN062E Missing argument(s)\n" +msgstr "" + +#: hsccmd.c:1132 +#, c-format +msgid "HHCPN063E Device number %s is invalid\n" +msgstr "" + +#: hsccmd.c:1138 +#, c-format +msgid "HHCPN064E Device number %s is invalid\n" +msgstr "" + +#: hsccmd.c:1157 +msgid "HHCPN065E Missing argument(s)\n" +msgstr "" + +#: hsccmd.c:1163 +#, c-format +msgid "HHCPN066E Program interrupt number %s is invalid\n" +msgstr "" + +#: hsccmd.c:1170 +#, c-format +msgid "HHCPN067E Program interrupt number out of range (%4.4X)\n" +msgstr "" + +#: hsccmd.c:1212 +msgid "HHCPN069E Missing device number\n" +msgstr "" + +#: hsccmd.c:1218 +#, c-format +msgid "HHCPN070E Device number %s is invalid\n" +msgstr "" + +#: hsccmd.c:1224 +#, c-format +msgid "HHCPN071E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:1253 +#, c-format +msgid "HHCPN072I %4.4X synchronous: %12lld asynchronous: %12lld\n" +msgstr "" + +#: hsccmd.c:1264 +msgid "HHCPN073I No synchronous I/O devices found\n" +msgstr "" + +#: hsccmd.c:1266 +#, c-format +msgid "HHCPN074I TOTAL synchronous: %12lld asynchronous: %12lld %3lld%%\n" +msgstr "" + +#: hsccmd.c:1305 +msgid "HHCPN075E Invalid max device threads value (must be -1 to n)\n" +msgstr "" + +#: hsccmd.c:1312 +#, c-format +msgid "" +"HHCPN076I Max device threads: %d, current: %d, most: %d, waiting: %d, max " +"exceeded: %d\n" +msgstr "" + +#: hsccmd.c:1333 +msgid "HHCPN077E Invalid max device threads value (must be -1 to n)\n" +msgstr "" + +#: hsccmd.c:1347 +#, c-format +msgid "" +"HHCPN078E Max device threads %d current %d most %d waiting %d total I/Os " +"queued %d\n" +msgstr "" + +#: hsccmd.c:1381 +msgid "HHCPN079E Missing device number\n" +msgstr "" + +#: hsccmd.c:1388 +msgid "HHCPN080E Invalid device number\n" +msgstr "" + +#: hsccmd.c:1395 +msgid "HHCPN081E No cckd devices found\n" +msgstr "" + +#: hsccmd.c:1404 +msgid "HHCPN082E Invalid device number\n" +msgstr "" + +#: hsccmd.c:1410 +#, c-format +msgid "HHCPN083E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:1416 +#, c-format +msgid "HHCPN084E Device number %4.4X is not a cckd device\n" +msgstr "" + +#: hsccmd.c:1427 +#, c-format +msgid "HHCPN085I Processing device %4.4X\n" +msgstr "" + +#: hsccmd.c:1433 +#, c-format +msgid "HHCPN086E Unexpected operand: %s\n" +msgstr "" + +#: hsccmd.c:1447 +msgid "HHCPN087E Operand must be `merge' or `nomerge'\n" +msgstr "" + +#: hsccmd.c:1456 +msgid "HHCPN088E Shadow file name not specified\n" +msgstr "" + +#: hsccmd.c:1462 +#, c-format +msgid "HHCPN089E Unexpected operand: %s\n" +msgstr "" + +#: hsccmd.c:1471 +#, c-format +msgid "HHCPN090E Unexpected operand: %s\n" +msgstr "" + +#: hsccmd.c:1478 +msgid "HHCPN091E Command must be `sf+', `sf-', `sf=', `sfc', or `sfd'\n" +msgstr "" + +#: hsccmd.c:1492 +#, c-format +msgid "HHCPN092I %d devices processed\n" +msgstr "" + +#: hsccmd.c:1512 +msgid "HHCPN093E Missing argument(s)\n" +msgstr "" + +#: hsccmd.c:1518 +#, c-format +msgid "HHCPN094E Device number %s is invalid\n" +msgstr "" + +#: hsccmd.c:1524 +#, c-format +msgid "HHCPN095E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:1536 +#, c-format +msgid "HHCPN096E Device %4.4X busy or interrupt pending\n" +msgstr "" + +#: hsccmd.c:1552 +#, c-format +msgid "HHCPN097E Initialization failed for device %4.4X\n" msgstr "" -#: external.c:375 +#: hsccmd.c:1555 #, c-format -msgid "HHCCP025I External interrupt: CPU timer=%16.16llX\n" +msgid "HHCPN098I Device %4.4X initialized\n" msgstr "" -#: external.c:392 -msgid "HHCCP026I External interrupt: Interval timer\n" +#: hsccmd.c:1584 +msgid "HHCPN099E savecore rejected: filename missing\n" msgstr "" -#: fbadasd.c:90 +#: hsccmd.c:1605 #, c-format -msgid "HHCDA058E Read error in file %s: %s\n" +msgid "HHCPN100E savecore: invalid starting address: %s \n" msgstr "" -#: fbadasd.c:93 +#: hsccmd.c:1624 #, c-format -msgid "HHCDA059E Unexpected end of file in %s\n" +msgid "HHCPN101E savecore: invalid ending address: %s \n" msgstr "" -#: fbadasd.c:111 -#, c-format -msgid "HHCDA060E Read error in file %s: %s\n" +#: hsccmd.c:1632 +msgid "HHCPN102E savecore rejected: CPU not stopped\n" msgstr "" -#: fbadasd.c:114 +#: hsccmd.c:1638 #, c-format -msgid "HHCDA061E Unexpected end of file in %s\n" +msgid "HHCPN103E invalid range: %8.8X-%8.8X\n" msgstr "" -#: fbadasd.c:156 +#: hsccmd.c:1643 #, c-format -msgid "HHCDA062E parameter %d is invalid: %s\n" +msgid "HHCPN104I Saving locations %8.8X-%8.8X to %s\n" msgstr "" -#: fbadasd.c:291 +#: hsccmd.c:1648 #, c-format -msgid "HHCDA068E Seek error in file %s: %s\n" +msgid "HHCPN105E savecore error creating %s: %s\n" msgstr "" -#: fbadasd.c:305 +#: hsccmd.c:1654 #, c-format -msgid "HHCDA069E Read error in file %s: %s\n" +msgid "HHCPN106E savecore error writing to %s: %s\n" msgstr "" -#: fbadasd.c:308 +#: hsccmd.c:1657 #, c-format -msgid "HHCDA070E Unexpected end of file in %s\n" +msgid "HHCPN107E savecore: unable to save %d bytes\n" msgstr "" -#: fbadasd.c:335 -#, c-format -msgid "HHCDA071E Seek error in file %s: %s\n" +#: hsccmd.c:1683 +msgid "HHCPN108E loadcore rejected: filename missing\n" msgstr "" -#: fbadasd.c:348 +#: hsccmd.c:1691 #, c-format -msgid "HHCDA072E Write error in file %s: %s\n" +msgid "HHCPN109E Cannot open %s: %s\n" msgstr "" -#: fbadasd.c:697 +#: hsccmd.c:1704 #, c-format -msgid "HHCDA074E define extent data too short: %d bytes\n" +msgid "HHCPN110E invalid address: %s \n" msgstr "" -#: fbadasd.c:707 -msgid "HHCDA075E second define extent in chain\n" +#: hsccmd.c:1712 +msgid "HHCPN111E loadcore rejected: CPU not stopped\n" msgstr "" -#: fbadasd.c:718 +#: hsccmd.c:1717 #, c-format -msgid "HHCDA076E invalid file mask %2.2X\n" +msgid "HHCPN112I Loading %s to location %x \n" msgstr "" -#: fbadasd.c:759 +#: hsccmd.c:1721 #, c-format -msgid "HHCDA077E invalid extent: first block %d, last block %d,\n" +msgid "HHCPN113I %d bytes read from %s\n" +msgstr "" + +#: hsccmd.c:1744 +msgid "HHCPN114E loadtext rejected: filename missing\n" msgstr "" -#: fbadasd.c:761 +#: hsccmd.c:1757 #, c-format -msgid " numblks %d, device size %d\n" +msgid "HHCPN115E invalid address: %s \n" msgstr "" -#: general1.c:3287 -msgid "MVCL destructive overlap: " +#: hsccmd.c:1764 +msgid "HHCPN116E Address greater than mainstore size\n" msgstr "" -#: hercifc.c:48 -#, c-format -msgid "HHCIF001E %s: Must be called from within Hercules.\n" +#: hsccmd.c:1771 +msgid "HHCPN117E loadtext rejected: CPU not stopped\n" msgstr "" -#: hercifc.c:59 +#: hsccmd.c:1778 #, c-format -msgid "HHCIF002E %s: Cannot obtain socket: %s\n" +msgid "HHCPN118E Cannot open %s: %s\n" msgstr "" -#: hercifc.c:74 +#: hsccmd.c:1789 #, c-format -msgid "HHCIF003E %s: I/O error on read: %s.\n" +msgid "HHCPN119E Cannot read %s: %s\n" msgstr "" -#: hercifc.c:151 -#, c-format -msgid "HHCIF004W %s: Unknown request: %8.8X.\n" +#: hsccmd.c:1813 +msgid "HHCPN120I Finished loading TEXT deck file\n" msgstr "" -#: hercifc.c:164 +#: hsccmd.c:1814 #, c-format -msgid "HHCIF005E %s: ioctl error doing %s on %s: %s\n" +msgid " Last 'TXT' record had address: %3.3X\n" msgstr "" -#: hostinfo.c:64 +#: hsccmd.c:1845 #, c-format -msgid "Running on %s %s%s %s %s\n" +msgid "HHCPN121E ipending expects {+|-}debug as operand. %s is invalid\n" msgstr "" -#: hsccmd.c:110 -msgid "HHCPN015E Invalid device number\n" +#: hsccmd.c:1861 +msgid "HHCPN122I Interrupt checking debug mode set to " msgstr "" -#: hsccmd.c:116 -#, c-format -msgid "HHCPN016E Device number %4.4X not found\n" +#: hsccmd.c:1866 +msgid "ON\n" msgstr "" -#: hsccmd.c:124 -#, c-format -msgid "HHCPN017E Device %4.4X is not a printer device\n" +#: hsccmd.c:1871 +msgid "OFF\n" msgstr "" -#: hsccmd.c:138 +#: hsccmd.c:1876 #, c-format -msgid "HHCPN018I Printer %4.4X started\n" +msgid "HHCPN123I CPU%4.4X: CPUint=%8.8X (r:%8.8X|s:%8.8X)&(Mask:%8.8X)\n" msgstr "" -#: hsccmd.c:140 +#: hsccmd.c:1882 #, c-format -msgid "HHCPN019E Printer %4.4X not started: busy or interrupt pending\n" +msgid " CPU%4.4X: Clock comparator %spending\n" msgstr "" -#: hsccmd.c:143 -#, c-format -msgid "HHCPN020E Printer %4.4X not started: attention request rejected\n" +#: hsccmd.c:1884 hsccmd.c:1888 hsccmd.c:1892 hsccmd.c:1896 hsccmd.c:1900 +#: hsccmd.c:1904 hsccmd.c:1932 hsccmd.c:1935 hsccmd.c:1938 hsccmd.c:1941 +#: hsccmd.c:1944 hsccmd.c:1947 hsccmd.c:1951 hsccmd.c:1955 +msgid "not " msgstr "" -#: hsccmd.c:146 +#: hsccmd.c:1886 #, c-format -msgid "HHCPN021E Printer %4.4X not started: subchannel not enabled\n" -msgstr "" - -#: hsccmd.c:202 -msgid "HHCPN022E Invalid device number\n" +msgid " CPU%4.4X: CPU timer %spending\n" msgstr "" -#: hsccmd.c:208 +#: hsccmd.c:1890 #, c-format -msgid "HHCPN023E Device number %4.4X not found\n" +msgid " CPU%4.4X: Interval timer %spending\n" msgstr "" -#: hsccmd.c:216 +#: hsccmd.c:1894 #, c-format -msgid "HHCPN024E Device %4.4X is not a printer device\n" +msgid " CPU%4.4X: External call %spending\n" msgstr "" -#: hsccmd.c:223 +#: hsccmd.c:1898 #, c-format -msgid "HHCPN025I Printer %4.4X stopped\n" +msgid " CPU%4.4X: Emergency signal %spending\n" msgstr "" -#: hsccmd.c:295 -msgid "HHCPN026W Ignored. (external GUI active)\n" +#: hsccmd.c:1902 +#, c-format +msgid " CPU%4.4X: CPU interlock %sheld\n" msgstr "" -#: hsccmd.c:300 +#: hsccmd.c:1906 #, c-format -msgid "HHCPN027I Automatic refresh %s.\n" +msgid " CPU%4.4X: CPU state is %s\n" msgstr "" -#: hsccmd.c:301 -msgid "disabled" +#: hsccmd.c:1914 +#, c-format +msgid " CPU%4.4X: No channelset connected\n" msgstr "" -#: hsccmd.c:301 -msgid "enabled" +#: hsccmd.c:1918 +#, c-format +msgid " CPU%4.4X: Connected to channelset %4.4X\n" msgstr "" -#: hsccmd.c:349 +#: hsccmd.c:1925 #, c-format -msgid "HHCPN029E Invalid I/O delay value: %s\n" +msgid " Started mask %8.8X waiting mask %8.8X\n" msgstr "" -#: hsccmd.c:354 +#: hsccmd.c:1928 #, c-format -msgid "HHCPN030I I/O delay = %d\n" +msgid " Broadcast count %d code %d\n" msgstr "" -#: hsccmd.c:390 -msgid "HHCPN031E Missing device number\n" +#: hsccmd.c:1931 +#, c-format +msgid " Machine check interrupt %spending\n" msgstr "" -#: hsccmd.c:396 +#: hsccmd.c:1934 #, c-format -msgid "HHCPN032E Device number %s is invalid\n" +msgid " Service signal %spending\n" msgstr "" -#: hsccmd.c:402 +#: hsccmd.c:1937 #, c-format -msgid "HHCPN033E Device number %4.4X not found\n" +msgid " Signaling facility %sbusy\n" msgstr "" -#: hsccmd.c:408 +#: hsccmd.c:1940 #, c-format -msgid "HHCPN034E Device %4.4X is not a CTCI or LCS device\n" +msgid " TOD lock %sheld\n" msgstr "" -#: hsccmd.c:415 -msgid "(error)\n" +#: hsccmd.c:1943 +#, c-format +msgid " Main lock %sheld\n" msgstr "" -#: hsccmd.c:439 -msgid "HHCPN035E store status rejected: CPU not stopped\n" +#: hsccmd.c:1946 +#, c-format +msgid " Int lock %sheld\n" msgstr "" -#: hsccmd.c:468 +#: hsccmd.c:1950 #, c-format -msgid "HHCPN036I TOD clock drag factor = %d\n" +msgid " Ioq lock %sheld\n" msgstr "" -#: hsccmd.c:501 +#: hsccmd.c:1954 #, c-format -msgid "HHCPN037I Panel refresh rate = %d millisecond(s)\n" +msgid " I/O interrupt %spending\n" msgstr "" -#: hsccmd.c:617 -msgid "HHCPN038I Restart key depressed\n" +#: hsccmd.c:1967 +#, c-format +msgid " DEV%4.4X: busy %s\n" msgstr "" -#: hsccmd.c:677 -msgid "HHCPN039E Missing argument\n" +#: hsccmd.c:1969 +#, c-format +msgid " DEV%4.4X: reserved %s\n" msgstr "" -#: hsccmd.c:683 +#: hsccmd.c:1971 #, c-format -msgid "HHCPN040I Setting breakpoint at %16.16llX\n" +msgid " DEV%4.4X: suspended\n" msgstr "" -#: hsccmd.c:701 -msgid "HHCPN041I Deleting breakpoint\n" +#: hsccmd.c:1973 +#, c-format +msgid " DEV%4.4X: I/O pending\n" msgstr "" -#: hsccmd.c:723 -msgid "HHCPN042E Missing device number\n" +#: hsccmd.c:1975 +#, c-format +msgid " DEV%4.4X: PCI pending\n" msgstr "" -#: hsccmd.c:729 +#: hsccmd.c:1977 #, c-format -msgid "HHCPN043E Device number %s is invalid\n" +msgid " DEV%4.4X: CRW pending\n" msgstr "" -#: hsccmd.c:735 +#: hsccmd.c:1979 #, c-format -msgid "HHCPN044E Device number %4.4X not found\n" +msgid " DEV%4.4X: lock held\n" msgstr "" -#: hsccmd.c:742 -#, c-format -msgid "HHCPN045I Device %4.4X attention request raised\n" +#: hsccmd.c:1982 +msgid " I/O interrupt queue: " msgstr "" -#: hsccmd.c:745 -#, c-format -msgid "HHCPN046E Device %4.4X busy or interrupt pending\n" +#: hsccmd.c:1985 +msgid "(NULL)" msgstr "" -#: hsccmd.c:748 +#: hsccmd.c:1989 #, c-format -msgid "HHCPN047E Device %4.4X attention request rejected\n" +msgid " DEV%4.4X\n" msgstr "" -#: hsccmd.c:751 -#, c-format -msgid "HHCPN048E Device %4.4X subchannel not enabled\n" +#: hsccmd.c:2008 +msgid "HHCPN124I Instruction counts reset to zero.\n" msgstr "" -#: hsccmd.c:757 -#, c-format -msgid "HHCPN049W Are you sure you didn't mean 'ipl %4.4X' instead?\n" +#: hsccmd.c:2012 +msgid "HHCPN125I Instruction count display:\n" msgstr "" -#: hsccmd.c:776 -msgid "HHCPN050I Interrupt key depressed\n" +#: hsccmd.c:2146 +msgid "HHCPN996E The script command requires a filename\n" msgstr "" -#: hsccmd.c:839 -msgid "HHCPN052E Missing device number\n" +#: hsccmd.c:2159 +msgid "HHCPN997E Only 1 script may be invoked from the panel at any time\n" msgstr "" -#: hsccmd.c:847 -msgid "HHCPN053E ipl rejected: All CPU's must be stopped\n" +#: hsccmd.c:2174 +msgid "HHCPN998E Script aborted : user cancel request\n" msgstr "" -#: hsccmd.c:873 -msgid "HHCPN054E Missing argument\n" +#: hsccmd.c:2194 +msgid "HHCPN998E Script aborted : Script recursion level exceeded\n" msgstr "" -#: hsccmd.c:879 +#: hsccmd.c:2204 #, c-format -msgid "HHCPN055E Target CPU %s is invalid\n" +msgid "HHCPN007E Script file %s open failed: %s\n" msgstr "" -#: hsccmd.c:890 +#: hsccmd.c:2209 #, c-format -msgid "HHCPN056E CPU%4.4X not configured\n" +msgid "HHCPN995E Script file %s not found\n" msgstr "" -#: hsccmd.c:940 -msgid "open " +#: hsccmd.c:2217 +#, c-format +msgid "HHCPN008I Script file processing started using file %s\n" msgstr "" -#: hsccmd.c:941 -msgid "busy " +#: hsccmd.c:2225 +#, c-format +msgid "HHCPN009E Script file buffer malloc failed: %s\n" msgstr "" -#: hsccmd.c:942 -msgid "pending " +#: hsccmd.c:2267 +#, c-format +msgid "HHCPN010W Ignoring invalid SCRIPT file pause statement: %s\n" msgstr "" -#: hsccmd.c:953 +#: hsccmd.c:2273 #, c-format -msgid " (client %s (%s) connected)\n" +msgid "HHCPN011I Pausing SCRIPT file processing for %d seconds...\n" msgstr "" -#: hsccmd.c:959 -msgid " (no one currently connected)\n" +#: hsccmd.c:2277 +msgid "HHCPN012I Resuming SCRIPT file processing...\n" msgstr "" -#: hsccmd.c:982 -msgid "HHCPN057E Missing argument(s)\n" +#: hsccmd.c:2295 +msgid "HHCPN013I EOF reached on SCRIPT file. Processing complete.\n" msgstr "" -#: hsccmd.c:988 +#: hsccmd.c:2300 #, c-format -msgid "HHCPN059E Device number %s is invalid\n" +msgid "HHCPN014E I/O error reading SCRIPT file: %s\n" msgstr "" -#: hsccmd.c:995 +#: hsccmd.c:2305 #, c-format -msgid "Device type %s is invalid\n" -msgstr "" - -#: hsccmd.c:1015 -msgid "HHCPN060E Missing device number\n" +msgid "HHCPN999I Script %s aborted due to previous conditions\n" msgstr "" -#: hsccmd.c:1021 +#: hsccmd.c:2333 #, c-format -msgid "HHCPN061E Device number %s is invalid\n" +msgid "HHCPN126I Architecture mode = %s\n" msgstr "" -#: hsccmd.c:1040 -msgid "HHCPN062E Missing argument(s)\n" +#: hsccmd.c:2342 +msgid "HHCPN127E All CPU's must be stopped to change architecture\n" msgstr "" -#: hsccmd.c:1046 +#: hsccmd.c:2362 #, c-format -msgid "HHCPN063E Device number %s is invalid\n" +msgid "HHCPN128E Invalid architecture mode %s\n" msgstr "" -#: hsccmd.c:1052 +#: hsccmd.c:2373 #, c-format -msgid "HHCPN064E Device number %s is invalid\n" +msgid "HHCPN129I Architecture successfully set to %s mode.\n" msgstr "" -#: hsccmd.c:1071 -msgid "HHCPN065E Missing argument(s)\n" +#: hsccmd.c:2398 +msgid "on" msgstr "" -#: hsccmd.c:1077 -#, c-format -msgid "HHCPN066E Program interrupt number %s is invalid\n" +#: hsccmd.c:2401 +msgid "off" msgstr "" -#: hsccmd.c:1084 +#: hsccmd.c:2411 #, c-format -msgid "HHCPN067E Program interrupt number out of range (%4.4X)\n" +msgid "HHCPN130E Invalid frame address %8.8X\n" msgstr "" -#: hsccmd.c:1119 +#: hsccmd.c:2417 #, c-format -msgid "HHCPN068E Device number %s is invalid\n" +msgid "HHCPN131I Frame %8.8X marked %s\n" msgstr "" -#: hsccmd.c:1160 -msgid "HHCPN069E Missing device number\n" +#: hsccmd.c:2418 +msgid "usable" msgstr "" -#: hsccmd.c:1166 -#, c-format -msgid "HHCPN070E Device number %s is invalid\n" +#: hsccmd.c:2418 +msgid "unusable" msgstr "" -#: hsccmd.c:1172 +#: hsccmd.c:2430 #, c-format -msgid "HHCPN071E Device number %4.4X not found\n" +msgid "HHCPN132I Instruction tracing is now %s\n" msgstr "" -#: hsccmd.c:1202 +#: hsccmd.c:2441 #, c-format -msgid "HHCPN072I %4.4X synchronous: %12lld asynchronous: %12lld\n" +msgid "HHCPN133I Instruction stepping is now %s\n" msgstr "" -#: hsccmd.c:1213 -msgid "HHCPN073I No synchronous I/O devices found\n" +#: hsccmd.c:2456 +#, c-format +msgid "HHCPN134I CKD KEY trace is now %s\n" msgstr "" -#: hsccmd.c:1215 +#: hsccmd.c:2471 #, c-format -msgid "HHCPN074I TOTAL synchronous: %12lld asynchronous: %12lld %3lld%%\n" +msgid "HHCPN135E Device number %4.4X not found\n" msgstr "" -#: hsccmd.c:1256 -msgid "HHCPN075E Invalid max device threads value (must be -1 to n)\n" +#: hsccmd.c:2478 +#, c-format +msgid "HHCPN136I CCW tracing is now %s for device %4.4X\n" msgstr "" -#: hsccmd.c:1263 +#: hsccmd.c:2483 #, c-format -msgid "" -"HHCPN076I Max device threads: %d, current: %d, most: %d, waiting: %d, max " -"exceeded: %d\n" +msgid "HHCPN137I CCW stepping is now %s for device %4.4X\n" msgstr "" -#: hsccmd.c:1284 -msgid "HHCPN077E Invalid max device threads value (must be -1 to n)\n" +#: hsccmd.c:2490 +msgid "HHCPN138E Unrecognized +/- command.\n" msgstr "" -#: hsccmd.c:1308 +#: hsccmd.c:2540 #, c-format -msgid "" -"HHCPN078E Max device threads %d current %d most %d waiting %d total I/Os " -"queued %d\n" +msgid "HHCHD100I Loading %s ...\n" msgstr "" -#: hsccmd.c:1342 -msgid "HHCPN079E Missing device number\n" +#: hsccmd.c:2542 +#, c-format +msgid "HHCHD101I Module %s loaded\n" msgstr "" -#: hsccmd.c:1349 -msgid "HHCPN080E Invalid device number\n" +#: hsccmd.c:2565 +#, c-format +msgid "HHCHD102I Unloading %s ...\n" msgstr "" -#: hsccmd.c:1356 -msgid "HHCPN081E No cckd devices found\n" +#: hsccmd.c:2567 +#, c-format +msgid "HHCHD103I Module %s unloaded\n" msgstr "" -#: hsccmd.c:1365 -msgid "HHCPN082E Invalid device number\n" +#: hsccmd.c:2612 +msgid "HHCPN150W evm command is deprecated. Use \"ecpsvm\" instead\n" msgstr "" -#: hsccmd.c:1371 +#: hsccmd.c:2826 #, c-format -msgid "HHCPN083E Device number %4.4X not found\n" +msgid "HHCPN139E Command \"%s\" not found; enter '?' for list.\n" msgstr "" -#: hsccmd.c:1377 -#, c-format -msgid "HHCPN084E Device number %4.4X is not a cckd device\n" +#: hsccmd.c:2846 +msgid "" +"HHCPN140I Valid panel commands are...\n" +"\n" msgstr "" -#: hsccmd.c:1388 +#: hsccmd.c:2853 #, c-format -msgid "HHCPN085I Processing device %4.4X\n" +msgid " %-9.9s %s \n" msgstr "" -#: hsccmd.c:1394 -#, c-format -msgid "HHCPN086E Unexpected operand: %s\n" +#: hsccmd.c:2859 +msgid "add shadow file" msgstr "" -#: hsccmd.c:1408 -msgid "HHCPN087E Operand must be `merge' or `nomerge'\n" +#: hsccmd.c:2860 +msgid "delete shadow file" msgstr "" -#: hsccmd.c:1417 -msgid "HHCPN088E Shadow file name not specified\n" +#: hsccmd.c:2861 +msgid "rename shadow file" msgstr "" -#: hsccmd.c:1423 -#, c-format -msgid "HHCPN089E Unexpected operand: %s\n" +#: hsccmd.c:2862 +msgid "compress shadow files" msgstr "" -#: hsccmd.c:1432 -#, c-format -msgid "HHCPN090E Unexpected operand: %s\n" +#: hsccmd.c:2863 +msgid "display shadow file stats" msgstr "" -#: hsccmd.c:1439 -msgid "HHCPN091E Command must be `sf+', `sf-', `sf=', `sfc', or `sfd'\n" +#: hsccmd.c:2867 +msgid "turn instruction tracing on/off" msgstr "" -#: hsccmd.c:1453 -#, c-format -msgid "HHCPN092I %d devices processed\n" +#: hsccmd.c:2868 +msgid "turn instruction stepping on/off" msgstr "" -#: hsccmd.c:1473 -msgid "HHCPN093E Missing argument(s)\n" +#: hsccmd.c:2869 +msgid "turn CCW tracing on/off" msgstr "" -#: hsccmd.c:1479 -#, c-format -msgid "HHCPN094E Device number %s is invalid\n" +#: hsccmd.c:2870 +msgid "turn CCW stepping on/off" msgstr "" -#: hsccmd.c:1485 -#, c-format -msgid "HHCPN095E Device number %4.4X not found\n" +#: hsccmd.c:2872 +msgid "turn CKD_KEY tracing on/off" msgstr "" -#: hsccmd.c:1497 -#, c-format -msgid "HHCPN096E Device %4.4X busy or interrupt pending\n" +#: hsccmd.c:2874 +msgid "mark frames unusable/usable" msgstr "" -#: hsccmd.c:1513 -#, c-format -msgid "HHCPN097E Initialization failed for device %4.4X\n" +#: hsccmd.c:3041 +msgid "HHCPN141E Missing argument\n" msgstr "" -#: hsccmd.c:1516 +#: hsccmd.c:3049 #, c-format -msgid "HHCPN098I Device %4.4X initialized\n" +msgid "%s" +msgstr "" + +#: hsccmd.c:3054 +msgid "HHCPN142I No additional help available.\n" msgstr "" -#: hsccmd.c:1545 -msgid "HHCPN099E savecore rejected: filename missing\n" +#: hscmisc.c:203 +#, c-format +msgid "HHCPN143E Invalid value: %s\n" msgstr "" -#: hsccmd.c:1566 +#: hscmisc.c:227 #, c-format -msgid "HHCPN100E savecore: invalid starting address: %s \n" +msgid "HHCPN144E Invalid operand: %s\n" msgstr "" -#: hsccmd.c:1585 +#: hscmisc.c:239 #, c-format -msgid "HHCPN101E savecore: invalid ending address: %s \n" +msgid "HHCPN145E Invalid range: %s\n" msgstr "" -#: hsccmd.c:1593 -msgid "HHCPN102E savecore rejected: CPU not stopped\n" +#: hscmisc.c:503 +#, c-format +msgid "Storage not accessible code = %4.4X\n" msgstr "" -#: hsccmd.c:1599 -#, c-format -msgid "HHCPN103E invalid range: %8.8X-%8.8X\n" +#: hscmisc.c:511 hscmisc.c:520 +msgid "Adressing exception\n" msgstr "" -#: hsccmd.c:1604 +#: hscmisc.c:727 #, c-format -msgid "HHCPN104I Saving locations %8.8X-%8.8X to %s\n" +msgid "%sInstruction fetch error\n" msgstr "" -#: hsccmd.c:1609 +#: httpserv.c:66 #, c-format -msgid "HHCPN105E savecore error creating %s: %s\n" +msgid "HHCHT011E html_include: Cannot open %s: %s\n" msgstr "" -#: hsccmd.c:1615 +#: httpserv.c:68 #, c-format -msgid "HHCPN106E savecore error writing to %s: %s\n" +msgid "ERROR: Cannot open %s: %s\n" msgstr "" -#: hsccmd.c:1618 +#: httpserv.c:264 #, c-format -msgid "HHCPN107E savecore: unable to save %d bytes\n" +msgid "HHCHT012I cgi_var_dump: pointer(%p) name(%s) value(%s) type(%d)\n" msgstr "" -#: hsccmd.c:1644 -msgid "HHCPN108E loadcore rejected: filename missing\n" +#: httpserv.c:584 +msgid "HHCHT001I HTTP listener thread started: tid=" msgstr "" -#: hsccmd.c:1652 +#: httpserv.c:617 httpserv.c:626 #, c-format -msgid "HHCPN109E Cannot open %s: %s\n" +msgid "HHCCF066E Invalid HTTPROOT: %s\n" msgstr "" -#: hsccmd.c:1665 +#: httpserv.c:641 #, c-format -msgid "HHCPN110E invalid address: %s \n" -msgstr "" - -#: hsccmd.c:1673 -msgid "HHCPN111E loadcore rejected: CPU not stopped\n" +msgid "HHCHT002E socket: %s\n" msgstr "" -#: hsccmd.c:1678 +#: httpserv.c:664 #, c-format -msgid "HHCPN112I Loading %s to location %x \n" +msgid "HHCHT003W Waiting for port %u to become free\n" msgstr "" -#: hsccmd.c:1682 +#: httpserv.c:671 #, c-format -msgid "HHCPN113I %d bytes read from %s\n" +msgid "HHCHT004E bind: %s\n" msgstr "" -#: hsccmd.c:1705 -msgid "HHCPN114E loadtext rejected: filename missing\n" +#: httpserv.c:680 +#, c-format +msgid "HHCHT005E listen: %s\n" msgstr "" -#: hsccmd.c:1718 +#: httpserv.c:684 #, c-format -msgid "HHCPN115E invalid address: %s \n" +msgid "HHCHT006I Waiting for HTTP requests on port %u\n" msgstr "" -#: hsccmd.c:1725 -msgid "HHCPN116E Address greater than mainstore size\n" +#: httpserv.c:709 +#, c-format +msgid "HHCHT007E select: %s\n" msgstr "" -#: hsccmd.c:1732 -msgid "HHCPN117E loadtext rejected: CPU not stopped\n" +#: httpserv.c:721 +#, c-format +msgid "HHCHT008E accept: %s\n" msgstr "" -#: hsccmd.c:1739 +#: httpserv.c:727 #, c-format -msgid "HHCPN118E Cannot open %s: %s\n" +msgid "HHCHT009E fdopen: %s\n" msgstr "" -#: hsccmd.c:1750 +#: httpserv.c:736 #, c-format -msgid "HHCPN119E Cannot read %s: %s\n" +msgid "HHCHT010E http_request create_thread: %s\n" msgstr "" -#: hsccmd.c:1774 -msgid "HHCPN120I Finished loading TEXT deck file\n" +#: ieee.c:403 +msgid "ebfpston: unexpectedly converting a NaN\n" msgstr "" -#: hsccmd.c:1775 -#, c-format -msgid " Last 'TXT' record had address: %3.3X\n" +#: ieee.c:407 +msgid "ebfpston: unexpectedly converting an Infinite\n" msgstr "" -#: hsccmd.c:1804 -#, c-format -msgid "HHCPN121E ipending expects {+|-}debug as operand. %s is invalid\n" +#: ieee.c:462 +msgid "lbfpston: unexpectedly converting a NaN\n" msgstr "" -#: hsccmd.c:1820 -msgid "HHCPN122I Interrupt checking debug mode set to " +#: ieee.c:466 +msgid "lbfpston: unexpectedly converting an Infinite\n" msgstr "" -#: hsccmd.c:1825 -msgid "ON\n" +#: ieee.c:515 +msgid "sbfpston: unexpectedly converting a NaN\n" msgstr "" -#: hsccmd.c:1830 -msgid "OFF\n" +#: ieee.c:519 +msgid "sbfpston: unexpectedly converting an Infinite\n" msgstr "" -#: hsccmd.c:1835 +#: impl.c:280 #, c-format -msgid "HHCPN123I CPU%4.4X: CPUint=%8.8X (r:%8.8X|s:%8.8X)&(Mask:%8.8X)\n" +msgid "HHCIN001S Cannot register SIGINT handler: %s\n" msgstr "" -#: hsccmd.c:1841 +#: impl.c:290 #, c-format -msgid " CPU%4.4X: Clock comparator %spending\n" +msgid "HHCIN002E Cannot suppress SIGPIPE signal: %s\n" msgstr "" -#: hsccmd.c:1843 hsccmd.c:1847 hsccmd.c:1851 hsccmd.c:1855 hsccmd.c:1859 -#: hsccmd.c:1863 hsccmd.c:1867 hsccmd.c:1897 hsccmd.c:1900 hsccmd.c:1903 -#: hsccmd.c:1906 hsccmd.c:1909 hsccmd.c:1912 hsccmd.c:1916 hsccmd.c:1920 -msgid "not " +#: impl.c:312 +#, c-format +msgid "HHCIN003S Cannot register SIGILL/FPE/SEGV/BUS/USR handler: %s\n" msgstr "" -#: hsccmd.c:1845 +#: impl.c:329 #, c-format -msgid " CPU%4.4X: CPU timer %spending\n" +msgid "HHCIN004S Cannot create watchdog thread: %s\n" msgstr "" -#: hsccmd.c:1849 +#: impl.c:343 #, c-format -msgid " CPU%4.4X: Interval timer %spending\n" +msgid "HHCIN005S Cannot create http_server thread: %s\n" msgstr "" -#: hsccmd.c:1853 +#: impl.c:357 #, c-format -msgid " CPU%4.4X: External call %spending\n" +msgid "HHCIN006S Cannot create shared_server thread: %s\n" msgstr "" -#: hsccmd.c:1857 +#: impl.c:372 #, c-format -msgid " CPU%4.4X: Emergency signal %spending\n" +msgid "HHCIN007S Cannot create %4.4X connection thread: %s\n" msgstr "" -#: hsccmd.c:1861 +#: ipl.c:68 #, c-format -msgid " CPU%4.4X: CPU %swaiting for interlock\n" +msgid "HHCCP027E Device %4.4X not in configuration\n" msgstr "" -#: hsccmd.c:1865 -#, c-format -msgid " CPU%4.4X: CPU interlock %sheld\n" +#: ipl.c:79 +msgid "HHCCP028E Device not connected to channelset\n" msgstr "" -#: hsccmd.c:1869 +#: ipl.c:130 #, c-format -msgid " CPU%4.4X: CPU state is %s\n" +msgid "" +"HHCCP029E %s mode IPL failed: CSW status=%2.2X%2.2X\n" +" Sense=" msgstr "" -#: hsccmd.c:1877 +#: ipl.c:178 #, c-format -msgid " CPU%4.4X: No channelset connected\n" +msgid "" +"HHCCP030E %s mode IPL failed: Invalid IPL PSW: %2.2X%2.2X%2.2X%2.2X %2.2X%" +"2.2X%2.2X%2.2X\n" msgstr "" -#: hsccmd.c:1881 +#: ipl.c:283 #, c-format -msgid " CPU%4.4X: Connected to channelset %4.4X\n" +msgid "HHCCP031E Load from %s failed: %s\n" msgstr "" -#: hsccmd.c:1888 +#: ipl.c:333 #, c-format -msgid " Started mask %8.8X waiting mask %8.8X\n" +msgid "" +"HHCCP032E %s mode IPL failed: Invalid IPL PSW: %2.2X%2.2X%2.2X%2.2X %2.2X%" +"2.2X%2.2X%2.2X\n" msgstr "" -#: hsccmd.c:1892 +#: ipl.c:483 #, c-format -msgid " Broadcast mask %8.8X code %d\n" +msgid "HHCCP033E load_main: %s: %s\n" msgstr "" -#: hsccmd.c:1896 -#, c-format -msgid " Machine check interrupt %spending\n" +#: ipl.c:492 +msgid "HHCCP034W load_main: terminated at end of mainstor\n" msgstr "" -#: hsccmd.c:1899 -#, c-format -msgid " Service signal %spending\n" +#: logger.c:167 +msgid "HHCLG014I logger thread terminating\n" msgstr "" -#: hsccmd.c:1902 +#: logger.c:198 #, c-format -msgid " Signaling facility %sbusy\n" +msgid "HHCLG001E Error redirecting stdout: %s\n" msgstr "" -#: hsccmd.c:1905 +#: logger.c:225 #, c-format -msgid " TOD lock %sheld\n" +msgid "HHCLG002E Error reading syslog pipe: %s\n" msgstr "" -#: hsccmd.c:1908 +#: logger.c:231 #, c-format -msgid " Main lock %sheld\n" +msgid "HHCLG003E Error writing hardcopy log: %s\n" msgstr "" -#: hsccmd.c:1911 +#: logger.c:281 logger.c:293 #, c-format -msgid " Int lock %sheld\n" +msgid "HHCLG004E Error duplicating stderr: %s\n" msgstr "" -#: hsccmd.c:1915 +#: logger.c:303 #, c-format -msgid " Ioq lock %sheld\n" +msgid "HHCLG005E Error duplicating stdout: %s\n" msgstr "" -#: hsccmd.c:1919 +#: logger.c:313 #, c-format -msgid " I/O interrupt %spending\n" +msgid "HHCLG006E Duplicate error redirecting hardcopy log: %s\n" msgstr "" -#: hsccmd.c:1926 +#: logger.c:320 #, c-format -msgid " DEV%4.4X: I/O pending\n" +msgid "HHCLG007S Hardcopy log fdopen failed: %s\n" msgstr "" -#: hsccmd.c:1928 +#: logger.c:331 #, c-format -msgid " DEV%4.4X: PCI pending\n" +msgid "HHCLG008S logbuffer malloc failed: %s\n" msgstr "" -#: hsccmd.c:1930 +#: logger.c:338 #, c-format -msgid " DEV%4.4X: CRW pending\n" +msgid "HHCLG009S Syslog message pipe creation failed: %s\n" msgstr "" -#: hsccmd.c:1932 +#: logger.c:346 #, c-format -msgid " DEV%4.4X: lock held\n" +msgid "HHCLG010S Syslog write message pipe open failed: %s\n" msgstr "" -#: hsccmd.c:1935 -msgid " I/O interrupt queue: " +#: logger.c:354 +#, c-format +msgid "HHCLG011S Syslog read message pipe open failed: %s\n" msgstr "" -#: hsccmd.c:1938 -msgid "(NULL)\n" +#: logger.c:364 +#, c-format +msgid "HHCLG012E Cannot create logger thread: %s\n" msgstr "" -#: hsccmd.c:1941 +#: machchk.c:226 #, c-format -msgid " DEV%4.4X\n" +msgid "HHCCP019I Machine Check code=%16.16llu\n" msgstr "" -#: hsccmd.c:1960 -msgid "HHCPN124I Instruction counts reset to zero.\n" +#: machchk.c:290 +msgid "HHCCP020E signal USR2 received for undetermined device\n" msgstr "" -#: hsccmd.c:1964 -msgid "HHCPN125I Instruction count display:\n" +#: machchk.c:294 +#, c-format +msgid "HHCCP021E signal USR2 received for device %4.4X\n" msgstr "" -#: hsccmd.c:2082 +#: machchk.c:322 machchk.c:326 #, c-format -msgid "HHCPN126I Architecture mode = %s\n" +msgid "HHCCP017I CPU%4.4X: Machine check due to host error: %s\n" msgstr "" -#: hsccmd.c:2091 -msgid "HHCPN127E All CPU's must be stopped to change architecture\n" +#: machchk.c:361 machchk.c:365 +#, c-format +msgid "HHCCP018I CPU%4.4X: Check-Stop due to host error: %s\n" msgstr "" -#: hsccmd.c:2111 +#: panel.c:239 #, c-format -msgid "HHCPN128E Invalid architecture mode %s\n" +msgid "HHCLG013S Message pipe creation failed: %s\n" msgstr "" -#: hsccmd.c:2122 +#: panel.c:250 #, c-format -msgid "HHCPN129I Architecture successfully set to %s mode.\n" +msgid "HHCLG014S Message pipe open failed: %s\n" msgstr "" -#: hsccmd.c:2147 -msgid "on" +#: panel.c:851 +msgid "HHCPN001I Control panel thread started: tid=" msgstr "" -#: hsccmd.c:2150 -msgid "off" +#: panel.c:858 +#, c-format +msgid "HHCPN002S Cannot obtain keyboard buffer: %s\n" msgstr "" -#: hsccmd.c:2160 +#: panel.c:868 #, c-format -msgid "HHCPN130E Invalid frame address %8.8X\n" +msgid "HHCPN003S Cannot obtain message buffer: %s\n" msgstr "" -#: hsccmd.c:2166 +#: panel.c:927 #, c-format -msgid "HHCPN131I Frame %8.8X marked %s\n" +msgid "HHCPN004E select: %s\n" msgstr "" -#: hsccmd.c:2167 -msgid "usable" +#: panel.c:942 +#, c-format +msgid "HHCPN005E keyboard read: %s\n" msgstr "" -#: hsccmd.c:2167 -msgid "unusable" +#: panel.c:1333 +#, c-format +msgid "HHCPN006E message pipe read: %s\n" msgstr "" -#: hsccmd.c:2179 +#: printer.c:40 #, c-format -msgid "HHCPN132I Instruction tracing is now %s\n" +msgid "HHCPR004E Error opening file %s: %s\n" msgstr "" -#: hsccmd.c:2190 +#: printer.c:56 #, c-format -msgid "HHCPN133I Instruction stepping is now %s\n" +msgid "HHCPR005E %4.4X device initialization error: pipe: %s\n" msgstr "" -#: hsccmd.c:2205 +#: printer.c:65 #, c-format -msgid "HHCPN134I CKD KEY trace is now %s\n" +msgid "HHCPR006E %4.4X device initialization error: fork: %s\n" msgstr "" -#: hsccmd.c:2220 +#: printer.c:74 #, c-format -msgid "HHCPN135E Device number %4.4X not found\n" +msgid "HHCPR007I pipe receiver (pid=%d) starting for %4.4X\n" msgstr "" -#: hsccmd.c:2227 +#: printer.c:86 #, c-format -msgid "HHCPN136I CCW tracing is now %s for device %4.4X\n" +msgid "HHCPR008E %4.4X dup2 error: %s\n" msgstr "" -#: hsccmd.c:2232 +#: printer.c:122 #, c-format -msgid "HHCPN137I CCW stepping is now %s for device %4.4X\n" +msgid "HHCPR011I pipe receiver (pid=%d) terminating for %4.4X\n" msgstr "" -#: hsccmd.c:2239 -msgid "HHCPN138E Unrecognized +/- command.\n" +#: printer.c:128 +#, c-format +msgid "HHCPR012E %4.4X Unable to execute %s: %s\n" msgstr "" -#: hsccmd.c:2425 +#: printer.c:163 #, c-format -msgid "HHCPN139E Command \"%s\" not found; enter '?' for list.\n" +msgid "HHCPR003E %4.4X Error writing to %s: %s\n" msgstr "" -#: hsccmd.c:2445 -msgid "" -"HHCPN140I Valid panel commands are...\n" -" \n" +#: printer.c:165 +msgid "incomplete" msgstr "" -#: hsccmd.c:2458 -msgid "add shadow file" +#: printer.c:184 +#, c-format +msgid "HHCPR001E File name missing or invalid for printer %4.4X\n" msgstr "" -#: hsccmd.c:2459 -msgid "delete shadow file" +#: printer.c:213 +#, c-format +msgid "HHCPR002E Invalid argument for printer %4.4X: %s\n" msgstr "" -#: hsccmd.c:2460 -msgid "rename shadow file" +#: service.c:60 +msgid "HHCCP036E SCP not receiving priority messages\n" msgstr "" -#: hsccmd.c:2461 -msgid "compress shadow files" +#: service.c:67 +msgid "HHCCP037E SCP not receiving commands\n" msgstr "" -#: hsccmd.c:2462 -msgid "display shadow file stats" +#: service.c:74 +msgid "HHCCP038E No SCP command\n" msgstr "" -#: hsccmd.c:2466 -msgid "turn instruction tracing on/off" +#: service.c:85 +msgid "HHCCP039E Service Processor busy\n" msgstr "" -#: hsccmd.c:2467 -msgid "turn instruction stepping on/off" +#: service.c:792 +#, c-format +msgid "HHCCP040I CPI: System Type: %s Name: %s Sysplex: %s\n" msgstr "" -#: hsccmd.c:2468 -msgid "turn CCW tracing on/off" +#: service.c:796 +msgid "HHC770I Control Program Information:\n" msgstr "" -#: hsccmd.c:2469 -msgid "turn CCW stepping on/off" +#: service.c:797 +#, c-format +msgid "HHC771I System Type = %s\n" msgstr "" -#: hsccmd.c:2471 -msgid "turn CKD_KEY tracing on/off" +#: service.c:798 +#, c-format +msgid "HHC772I System Name = %s\n" msgstr "" -#: hsccmd.c:2473 -msgid "mark frames unusable/usable" +#: service.c:799 +#, c-format +msgid "HHC773I Sysplex Name = %s\n" msgstr "" -#: hsccmd.c:2622 -msgid "HHCPN141E Missing argument\n" +#: service.c:800 +#, c-format +msgid "HHC774I System Level = %16.16llX\n" msgstr "" -#: hsccmd.c:2635 -msgid "HHCPN142I No additional help available.\n" +#: service.c:988 +msgid "HHCCP041I SYSCONS interface active\n" msgstr "" -#: hscmisc.c:205 -#, c-format -msgid "HHCPN143E Invalid value: %s\n" +#: service.c:990 +msgid "HHCCP042I SYSCONS interface inactive\n" msgstr "" -#: hscmisc.c:229 +#: service.c:1114 #, c-format -msgid "HHCPN144E Invalid operand: %s\n" +msgid "CPU%4.4X: Vector Facility configured offline\n" msgstr "" -#: hscmisc.c:241 +#: service.c:1145 #, c-format -msgid "HHCPN145E Invalid range: %s\n" +msgid "CPU%4.4X: Vector Facility configured online\n" msgstr "" -#: hscmisc.c:626 +#: shared.c:199 #, c-format -msgid "%sInstruction fetch error\n" +msgid "HHCSH001S parameter %d is invalid: %s\n" msgstr "" -#: httpserv.c:64 +#: shared.c:225 #, c-format -msgid "HHCHT011E html_include: Cannot open %s: %s\n" +msgid "HHCSH002W %4.4X connect pending to %s\n" msgstr "" -#: httpserv.c:66 +#: shared.c:243 #, c-format -msgid "ERROR: Cannot open %s: %s\n" +msgid "HHCSH003S %4.4X Error retrieving cylinders\n" msgstr "" -#: httpserv.c:262 +#: shared.c:256 #, c-format -msgid "HHCHT012I cgi_var_dump: pointer(%p) name(%s) value(%s) type(%d)\n" -msgstr "" - -#: httpserv.c:561 -msgid "HHCHT001I HTTP listener thread started: tid=" +msgid "HHCSH004S %4.4X Error retrieving device characteristics\n" msgstr "" -#: httpserv.c:570 +#: shared.c:274 #, c-format -msgid "HHCHT002E socket: %s\n" +msgid "HHCSH005S %4.4X Remote device %4.4X is a %4.4X\n" msgstr "" -#: httpserv.c:593 +#: shared.c:286 #, c-format -msgid "HHCHT003W Waiting for port %u to become free\n" +msgid "HHCSH006S %4.4X Error retrieving device id\n" msgstr "" -#: httpserv.c:600 +#: shared.c:303 #, c-format -msgid "HHCHT004E bind: %s\n" +msgid "HHCSH007S %4.4X device type %4.4X not found in dasd table\n" msgstr "" -#: httpserv.c:609 +#: shared.c:315 #, c-format -msgid "HHCHT005E listen: %s\n" +msgid "HHCSH008S %4.4X control unit %s not found in dasd table\n" msgstr "" -#: httpserv.c:613 +#: shared.c:336 #, c-format -msgid "HHCHT006I Waiting for HTTP requests on port %u\n" +msgid "HHCSH009I %s cyls=%d heads=%d tracks=%d trklen=%d\n" msgstr "" -#: httpserv.c:638 +#: shared.c:447 #, c-format -msgid "HHCHT007E select: %s\n" +msgid "HHCSH010S parameter %d is invalid: %s\n" msgstr "" -#: httpserv.c:650 +#: shared.c:473 #, c-format -msgid "HHCHT008E accept: %s\n" +msgid "HHCSH011I %4.4X connect pending to %s\n" msgstr "" -#: httpserv.c:656 +#: shared.c:488 #, c-format -msgid "HHCHT009E fdopen: %s\n" +msgid "HHCSH012S %4.4X Error retrieving fba origin\n" msgstr "" -#: httpserv.c:665 +#: shared.c:500 #, c-format -msgid "HHCHT010E http_request create_thread: %s\n" -msgstr "" - -#: ieee.c:392 -msgid "ebfpston: unexpectedly converting a NaN\n" +msgid "HHCSH013S %4.4X Error retrieving fba number blocks\n" msgstr "" -#: ieee.c:396 -msgid "ebfpston: unexpectedly converting an Infinite\n" +#: shared.c:512 +#, c-format +msgid "HHCSH014S %4.4X Error retrieving fba block size\n" msgstr "" -#: ieee.c:443 -msgid "lbfpston: unexpectedly converting a NaN\n" +#: shared.c:526 +#, c-format +msgid "HHCSH015S %4.4X Error retrieving device id\n" msgstr "" -#: ieee.c:447 -msgid "lbfpston: unexpectedly converting an Infinite\n" +#: shared.c:535 +#, c-format +msgid "HHCSH016S %4.4X Remote device %4.4X is a %4.4X\n" msgstr "" -#: ieee.c:488 -msgid "sbfpston: unexpectedly converting a NaN\n" +#: shared.c:547 +#, c-format +msgid "HHCSH017S %4.4X Error retrieving device characteristics\n" msgstr "" -#: ieee.c:492 -msgid "sbfpston: unexpectedly converting an Infinite\n" +#: shared.c:564 +#, c-format +msgid "HHCSH018S %4.4X device type %4.4X not found in dasd table\n" msgstr "" -#: ipl.c:63 +#: shared.c:573 #, c-format -msgid "HHCCP027E Device %4.4X not in configuration\n" +msgid "HHCSH019I %s origin=%d blks=%d\n" msgstr "" -#: ipl.c:74 -msgid "HHCCP028E Device not connected to channelset\n" +#: shared.c:618 +#, c-format +msgid "HHCSH020E %4.4X error during channel program start\n" msgstr "" -#: ipl.c:124 +#: shared.c:675 #, c-format -msgid "HHCCP029E %s mode IPL failed: CSW status=%2.2X%2.2X\n" +msgid "HHCSH021E %4.4X error during channel program end\n" msgstr "" -#: ipl.c:126 -msgid " Sense=" +#: shared.c:780 +#, c-format +msgid "HHCSH022E %4.4X error reading track %d\n" msgstr "" -#: ipl.c:174 +#: shared.c:792 #, c-format -msgid "" -"HHCCP030E %s mode IPL failed: Invalid IPL PSW: %2.2X%2.2X%2.2X%2.2X %2.2X%" -"2.2X%2.2X%2.2X\n" +msgid "HHCSH023E %4.4X error reading track %d\n" msgstr "" -#: ipl.c:278 +#: shared.c:991 #, c-format -msgid "HHCCP031E Load from %s failed: %s\n" +msgid "HHCSH024E %4.4X error reading block group %d\n" msgstr "" -#: ipl.c:328 +#: shared.c:1004 #, c-format -msgid "" -"HHCCP032E %s mode IPL failed: Invalid IPL PSW: %2.2X%2.2X%2.2X%2.2X %2.2X%" -"2.2X%2.2X%2.2X\n" +msgid "HHCSH025E %4.4X error reading block group %d\n" msgstr "" -#: ipl.c:478 +#: shared.c:1089 #, c-format -msgid "HHCCP033E load_main: %s: %s\n" +msgid "HHCSH026E %4.4X Error retrieving usage information\n" msgstr "" -#: ipl.c:487 -msgid "HHCCP034W load_main: terminated at end of mainstor\n" +#: shared.c:1160 +#, c-format +msgid "HHCSH027E %4.4X error writing track %d\n" msgstr "" -#: machchk.c:229 +#: shared.c:1173 #, c-format -msgid "HHCCP019I Machine Check code=%16.16llu\n" +msgid "HHCSH028E %4.4X remote error writing track %d: %2.2X-%2.2X\n" msgstr "" -#: machchk.c:291 -msgid "HHCCP020E signal USR2 received for undetermined device\n" +#: shared.c:1252 +#, c-format +msgid "HHCSH029E %4.4X socket failed: %s\n" msgstr "" -#: machchk.c:295 +#: shared.c:1266 #, c-format -msgid "HHCCP021E signal USR2 received for device %4.4X\n" +msgid "HHCSH030E %4.4X socket failed: %s\n" msgstr "" -#: machchk.c:323 machchk.c:327 +#: shared.c:1284 #, c-format -msgid "HHCCP017I CPU%4.4X: Machine check due to host error: %s\n" +msgid "HHCSH031I %4.4X Connected to %s\n" msgstr "" -#: machchk.c:362 machchk.c:366 +#: shared.c:1318 #, c-format -msgid "HHCCP018I CPU%4.4X: Check-Stop due to host error: %s\n" +msgid "HHCSH032E %4.4X Connect %s %d: %s\n" msgstr "" -#: panel.c:752 +#: shared.c:1489 #, c-format -msgid "HHCPN007E RC file %s open failed: %s\n" +msgid "HHCSH033E %4.4X send error %d for %2.2X-%2.2X: %s\n" msgstr "" -#: panel.c:758 +#: shared.c:1516 #, c-format -msgid "HHCPN008I RC file processing thread started using file %s\n" +msgid "HHCSH034E %4.4X Not connected to %s\n" msgstr "" -#: panel.c:765 +#: shared.c:1526 #, c-format -msgid "HHCPN009E RC file buffer malloc failed: %s\n" +msgid "HHCSH035E %4.4X recv error %d: %s\n" msgstr "" -#: panel.c:803 +#: shared.c:1538 #, c-format -msgid "HHCPN010W Ignoring invalid RC file pause statement: %s\n" +msgid "HHCSH036E %4.4X Remote error %2.2X-%2.2X: %s\n" msgstr "" -#: panel.c:809 +#: shared.c:1644 #, c-format -msgid "HHCPN011I Pausing RC file processing for %d seconds...\n" +msgid "HHCSH037E uncompress error %d, off %d len %d\n" msgstr "" -#: panel.c:813 -msgid "HHCPN012I Resuming RC file processing...\n" +#: shared.c:1649 +msgid "HHCSH038E data compressed using libz, unsupported\n" msgstr "" -#: panel.c:826 -msgid "HHCPN013I EOF reached on RC file. Processing complete.\n" +#: shared.c:1667 +#, c-format +msgid "HHCSH039E decompress error %d, off %d len %d\n" msgstr "" -#: panel.c:828 -#, c-format -msgid "HHCPN014E I/O error reading RC file: %s\n" +#: shared.c:1672 +msgid "HHCSH040E data compressed using bzip2, unsupported\n" msgstr "" -#: panel.c:922 -msgid "HHCPN001I Control panel thread started: tid=" +#: shared.c:2247 +#, c-format +msgid "HHCSH041E %4.4X send error %d id=%d: %s\n" msgstr "" -#: panel.c:929 +#: shared.c:2286 #, c-format -msgid "HHCPN002S Cannot obtain keyboard buffer: %s\n" +msgid "HHCSH042W %4.4X busy client being removed id=%d %s\n" msgstr "" -#: panel.c:939 +#: shared.c:2318 #, c-format -msgid "HHCPN003S Cannot obtain message buffer: %s\n" +msgid "HHCSH043I %s disconnected from %4.4X id=%d\n" msgstr "" -#: panel.c:1046 +#: shared.c:2387 #, c-format -msgid "HHCPN004E select: %s\n" +msgid "HHCSH0474 %s connect failed\n" msgstr "" -#: panel.c:1061 +#: shared.c:2464 #, c-format -msgid "HHCPN005E keyboard read: %s\n" +msgid "HHCSH053I %s connected to %4.4X id=%d\n" msgstr "" -#: panel.c:1925 +#: shared.c:2480 #, c-format -msgid "HHCSD001E Device %4.4X already bound to socket %s\n" +msgid "HHCSH045I Shared device %4.4X thread started: tid=" msgstr "" -#: panel.c:1936 +#: shared.c:2550 #, c-format -msgid "HHCSD002E bind_device malloc() failed for device %4.4X\n" +msgid "HHCSH046E select: %s\n" msgstr "" -#: panel.c:1945 +#: shared.c:2584 #, c-format -msgid "HHCSD003E bind_device safe_strdup() failed for device %4.4X\n" +msgid "HHCSH047E %4.4X %s recv error id=%d\n" msgstr "" -#: panel.c:1974 +#: shared.c:2615 #, c-format -msgid "HHCSD004I Device %4.4X bound to socket %s\n" +msgid "HHCSH048I Shared device %4.4X thread stopping\n" msgstr "" -#: panel.c:1994 +#: shared.c:2643 #, c-format -msgid "HHCSD005E Device %4.4X not bound to any socket\n" +msgid "HHCSH049I Shared device %d.%d thread started: tid=" msgstr "" -#: panel.c:2003 +#: shared.c:2652 #, c-format -msgid "HHCSD006E Client %s (%s) still connected to device %4.4X (%s)\n" +msgid "HHCSH050E inet socket: %s\n" msgstr "" -#: panel.c:2032 +#: shared.c:2661 #, c-format -msgid "HHCSD007I Device %4.4X unbound from socket %s\n" +msgid "HHCSH051E unix socket: %s\n" msgstr "" -#: panel.c:2081 +#: shared.c:2683 #, c-format -msgid "HHCSD008E Socket pathname \"%s\" exceeds limit of %d\n" +msgid "HHCSH052W Waiting for port %u to become free\n" msgstr "" -#: panel.c:2092 +#: shared.c:2690 #, c-format -msgid "HHCSD009E Error creating socket for %s: %s\n" +msgid "HHCSH053E inet bind: %s\n" msgstr "" -#: panel.c:2105 +#: shared.c:2705 #, c-format -msgid "HHCSD010E Failed to bind or listen on socket %s: %s\n" +msgid "HHCSH054E unix bind: %s\n" msgstr "" -#: panel.c:2155 +#: shared.c:2715 #, c-format -msgid "HHCSD011E Failed to determine IP address from %s\n" +msgid "HHCSH055E inet listen: %s\n" msgstr "" -#: panel.c:2173 +#: shared.c:2724 #, c-format -msgid "HHCSD012E Failed to determine port number from %s\n" +msgid "HHCSH056E unix listen: %s\n" msgstr "" -#: panel.c:2185 +#: shared.c:2736 #, c-format -msgid "HHCSD013E Error creating socket for %s: %s\n" +msgid "HHCSH057I Waiting for shared device requests on port %u\n" msgstr "" -#: panel.c:2197 +#: shared.c:2755 #, c-format -msgid "HHCSD014E Failed to bind or listen on socket %s: %s\n" +msgid "HHCSH058E select: %s\n" msgstr "" -#: panel.c:2304 +#: shared.c:2773 #, c-format -msgid "" -"HHCSD015E Connect to device %4.4X (%s) rejected; device busy or interrupt " -"pending\n" +msgid "HHCSH059E accept: %s\n" msgstr "" -#: panel.c:2315 +#: shared.c:2780 #, c-format -msgid "" -"HHCSD016E Connect to device %4.4X (%s) rejected; client %s (%s) still " -"connected\n" +msgid "HHCSH060E malloc size %d: %s\n" msgstr "" -#: panel.c:2328 +#: shared.c:2791 #, c-format -msgid "HHCSD017E Connect to device %4.4X (%s) failed: %s\n" +msgid "HHCSH061E serverConnect create_thread: %s\n" msgstr "" -#: panel.c:2354 -#, c-format -msgid "HHCSD018I %s (%s) connected to device %4.4X (%s)\n" +#: shared.c:2824 +msgid "HHCSH062E Invalid or missing argument 1\n" msgstr "" -#: panel.c:2359 -#, c-format -msgid "HHCSD019I <unknown> connected to device %4.4X (%s)\n" +#: shared.c:2833 +msgid "HHCSH063E Invalid or missing keyword 2\n" msgstr "" -#: printer.c:40 +#: shared.c:2851 #, c-format -msgid "HHCPR004E Error opening file %s: %s\n" +msgid "HHCSH064E Invalid or missing value %s\n" msgstr "" -#: printer.c:56 +#: shared.c:2867 #, c-format -msgid "HHCPR005E %4.4X device initialization error: pipe: %s\n" +msgid "HHCSH065E calloc() size=%d: %s\n" msgstr "" -#: printer.c:65 +#: shared.c:2893 #, c-format -msgid "HHCPR006E %4.4X device initialization error: fork: %s\n" +msgid "HHCSH066E Invalid or missing keyword %s\n" msgstr "" -#: printer.c:74 -#, c-format -msgid "HHCPR007I pipe receiver (pid=%d) starting for %4.4X\n" +#: shared.c:2957 shared.c:2964 +msgid "HHCSH999E OPTION_SHARED_DEVICES not defined" msgstr "" -#: printer.c:86 -#, c-format -msgid "HHCPR008E %4.4X dup2 error: %s\n" +#: sie.c:120 +msgid "SIE: state descriptor " msgstr "" -#: printer.c:100 +#: sie.c:231 #, c-format -msgid "HHCPR009E %4.4X dup2 error: %s\n" +msgid "SIE: zone %d: mso=" msgstr "" -#: printer.c:109 -#, c-format -msgid "HHCPR010E %4.4X dup2 error: %s\n" +#: sie.c:231 +msgid " msl=" msgstr "" -#: printer.c:146 +#: sie.c:532 #, c-format -msgid "HHCPR011I pipe receiver (pid=%d) terminating for %4.4X\n" +msgid "SIE: interception code %d\n" msgstr "" -#: printer.c:152 +#: sockdev.c:68 #, c-format -msgid "HHCPR012E %4.4X Unable to execute %s: %s\n" +msgid "HHCSD008E Socket pathname \"%s\" exceeds limit of %d\n" msgstr "" -#: printer.c:187 +#: sockdev.c:79 #, c-format -msgid "HHCPR003E %4.4X Error writing to %s: %s\n" +msgid "HHCSD009E Error creating socket for %s: %s\n" msgstr "" -#: printer.c:189 -msgid "incomplete" +#: sockdev.c:92 +#, c-format +msgid "HHCSD010E Failed to bind or listen on socket %s: %s\n" msgstr "" -#: service.c:496 -msgid "HHCCP036E SCP not receiving priority messages\n" +#: sockdev.c:143 +#, c-format +msgid "HHCSD011E Failed to determine IP address from %s\n" msgstr "" -#: service.c:503 -msgid "HHCCP037E SCP not receiving commands\n" +#: sockdev.c:161 +#, c-format +msgid "HHCSD012E Failed to determine port number from %s\n" msgstr "" -#: service.c:510 -msgid "HHCCP038E No SCP command\n" +#: sockdev.c:173 +#, c-format +msgid "HHCSD013E Error creating socket for %s: %s\n" msgstr "" -#: service.c:521 -msgid "HHCCP039E Service Processor busy\n" +#: sockdev.c:185 +#, c-format +msgid "HHCSD014E Failed to bind or listen on socket %s: %s\n" msgstr "" -#: service.c:1228 +#: sockdev.c:259 #, c-format -msgid "HHCCP040I CPI: System Type: %s Name: %s Sysplex: %s\n" +msgid "" +"HHCSD015E Connect to device %4.4X (%s) rejected; device busy or interrupt " +"pending\n" msgstr "" -#: service.c:1232 -msgid "HHC770I Control Program Information:\n" +#: sockdev.c:270 +#, c-format +msgid "" +"HHCSD016E Connect to device %4.4X (%s) rejected; client %s (%s) still " +"connected\n" msgstr "" -#: service.c:1233 +#: sockdev.c:284 #, c-format -msgid "HHC771I System Type = %s\n" +msgid "HHCSD017E Connect to device %4.4X (%s) failed: %s\n" msgstr "" -#: service.c:1234 +#: sockdev.c:310 #, c-format -msgid "HHC772I System Name = %s\n" +msgid "HHCSD018I %s (%s) connected to device %4.4X (%s)\n" msgstr "" -#: service.c:1235 +#: sockdev.c:315 #, c-format -msgid "HHC773I Sysplex Name = %s\n" +msgid "HHCSD019I <unknown> connected to device %4.4X (%s)\n" msgstr "" -#: service.c:1236 -#, c-format -msgid "HHC774I System Level = %16.16llX\n" +#: sockdev.c:386 +msgid "HHCSD020I Socketdevice listener thread started: tid=" msgstr "" -#: service.c:1253 +#: sockdev.c:417 #, c-format -msgid "HHC799I Unknown event received type = %2.2X\n" +msgid "HHCSD021E select: %s\n" msgstr "" -#: service.c:1426 -msgid "HHCCP041I SYSCONS interface active\n" +#: sockdev.c:431 +msgid "HHCSD022I Socketdevice listener thread terminated\n" msgstr "" -#: service.c:1428 -msgid "HHCCP042I SYSCONS interface inactive\n" +#: sockdev.c:461 +#, c-format +msgid "HHCSD023E Cannot create socketdevice thread: %s\n" msgstr "" -#: service.c:1552 +#: sockdev.c:472 #, c-format -msgid "CPU%4.4X: Vector Facility configured offline\n" +msgid "HHCSD001E Device %4.4X already bound to socket %s\n" msgstr "" -#: service.c:1583 +#: sockdev.c:483 #, c-format -msgid "CPU%4.4X: Vector Facility configured online\n" +msgid "HHCSD002E bind_device malloc() failed for device %4.4X\n" msgstr "" -#: service.c:1600 +#: sockdev.c:492 #, c-format -msgid "Invalid service call command word:%8.8X SCCB=%8.8X\n" +msgid "HHCSD003E bind_device safe_strdup() failed for device %4.4X\n" msgstr "" -#: sie.c:120 -msgid "SIE: state descriptor " +#: sockdev.c:523 +#, c-format +msgid "HHCSD004I Device %4.4X bound to socket %s\n" msgstr "" -#: sie.c:234 +#: sockdev.c:544 #, c-format -msgid "SIE: zone %d: mso=" +msgid "HHCSD005E Device %4.4X not bound to any socket\n" msgstr "" -#: sie.c:234 -msgid " msl=" +#: sockdev.c:553 +#, c-format +msgid "HHCSD006E Client %s (%s) still connected to device %4.4X (%s)\n" msgstr "" -#: sie.c:535 +#: sockdev.c:580 #, c-format -msgid "SIE: interception code %d\n" +msgid "HHCSD007I Device %4.4X unbound from socket %s\n" msgstr "" #: stack.c:593 @@ -3310,552 +5996,784 @@ msgstr "" msgid "stack: PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X loaded from V:" msgstr "" -#: tapedev.c:281 +#: tapecopy.c:77 +#, c-format +msgid "HHCTC015I %s status: %8.8lX" +msgstr "" + +#: tapecopy.c:105 +#, c-format +msgid "HHCTC016E Error reading status of %s: %s\n" +msgstr "" + +#: tapecopy.c:188 +#, c-format +msgid "HHCTC001E Error opening %s: %s\n" +msgstr "" + +#: tapecopy.c:197 +#, c-format +msgid "HHCTC002E Error reading status of %s: %s\n" +msgstr "" + +#: tapecopy.c:207 +#, c-format +msgid "HHCTC003I %s device type: %s\n" +msgstr "" + +#: tapecopy.c:209 +#, c-format +msgid "HHCTC003I %s device type: 0x%lX\n" +msgstr "" + +#: tapecopy.c:218 +#, c-format +msgid "HHCTC004I %s tape density: %s\n" +msgstr "" + +#: tapecopy.c:221 +#, c-format +msgid "HHCTC004I %s tape density code: 0x%lX\n" +msgstr "" + +#: tapecopy.c:234 +#, c-format +msgid "HHCTC005E Error setting attributes for %s: %s\n" +msgstr "" + +#: tapecopy.c:245 +#, c-format +msgid "HHCTC006E Error rewinding %s: %s\n" +msgstr "" + +#: tapecopy.c:257 +#, c-format +msgid "HHCTC007E Error opening %s: %s\n" +msgstr "" + +#: tapecopy.c:279 +#, c-format +msgid "HHCTC008E Error reading %s: %s\n" +msgstr "" + +#: tapecopy.c:289 +#, c-format +msgid "HHCTC009I File %u: Blocks=%u, block size min=%u, max=%u\n" +msgstr "" + +#: tapecopy.c:308 +#, c-format +msgid "HHCTC010E Error writing %s: %s\n" +msgstr "" + +#: tapecopy.c:324 +msgid "HHCTC011I End of tape\n" +msgstr "" + +#: tapecopy.c:344 +#, c-format +msgid "HHCTC012I %s\n" +msgstr "" + +#: tapecopy.c:367 +#, c-format +msgid "HHCTC013I Error writing %s: %s\n" +msgstr "" + +#: tapecopy.c:376 +#, c-format +msgid "HHCTC014I Error writing %s: %s\n" +msgstr "" + +#: tapedev.c:351 +#, c-format +msgid "HHCTA996I %4.4x - AWS Tape %s closed\n" +msgstr "" + +#: tapedev.c:430 #, c-format msgid "HHCTA001E Error opening %s: %s\n" msgstr "" -#: tapedev.c:314 +#: tapedev.c:461 tapedev.c:620 #, c-format msgid "HHCTA002E Error seeking to offset %8.8lX in file %s: %s\n" msgstr "" -#: tapedev.c:330 +#: tapedev.c:476 #, c-format msgid "HHCTA003E Error reading block header at offset %8.8lX in file %s: %s\n" msgstr "" -#: tapedev.c:343 +#: tapedev.c:488 #, c-format msgid "" "HHCTA004E End of file (uninitialized tape) at offset %8.8lX in file %s\n" msgstr "" -#: tapedev.c:356 +#: tapedev.c:500 #, c-format msgid "" -"HHCTA005E Unexpected end of file in block header at offset %8.8lX in file %" +"HHCTA004E Unexpected end of file in block header at offset %8.8lX in file %" "s\n" msgstr "" -#: tapedev.c:416 +#: tapedev.c:556 #, c-format -msgid "HHCTA006E Error reading data block at offset %8.8lX in file %s: %s\n" +msgid "HHCTA003E Error reading data block at offset %8.8lX in file %s: %s\n" msgstr "" -#: tapedev.c:429 +#: tapedev.c:568 #, c-format msgid "" -"HHCTA007E Unexpected end of file in data block at offset %8.8lX in file %s\n" +"HHCTA004E Unexpected end of file in data block at offset %8.8lX in file %s\n" msgstr "" -#: tapedev.c:484 +#: tapedev.c:655 tapedev.c:682 #, c-format -msgid "HHCTA008E Error seeking to offset %8.8lX in file %s: %s\n" +msgid "HHCTA995E Media full condition reached at offset %8.8lX in file %s\n" msgstr "" -#: tapedev.c:507 +#: tapedev.c:661 #, c-format msgid "HHCTA009E Error writing block header at offset %8.8lX in file %s: %s\n" msgstr "" -#: tapedev.c:526 +#: tapedev.c:688 #, c-format msgid "HHCTA010E Error writing data block at offset %8.8lX in file %s: %s\n" msgstr "" -#: tapedev.c:578 +#: tapedev.c:739 #, c-format msgid "HHCTA011E Error seeking to offset %8.8lX in file %s: %s\n" msgstr "" -#: tapedev.c:601 +#: tapedev.c:770 #, c-format msgid "HHCTA012E Error writing block header at offset %8.8lX in file %s: %s\n" msgstr "" -#: tapedev.c:830 +#: tapedev.c:1001 #, c-format msgid "HHCTA013E Error opening %s: %s(%s)\n" msgstr "" -#: tapedev.c:891 +#: tapedev.c:1047 +#, c-format +msgid "HHCTA075E Error seeking to start of %s: %s(%s)\n" +msgstr "" + +#: tapedev.c:1080 #, c-format msgid "HHCTA014E End of file (uninitialized tape) at block %8.8X in file %s\n" msgstr "" -#: tapedev.c:901 +#: tapedev.c:1089 #, c-format msgid "HHCTA015E Error reading data block at block %8.8X in file %s: %s(%s)\n" msgstr "" -#: tapedev.c:933 +#: tapedev.c:1131 #, c-format msgid "HHCTA016E Error writing data block at block %8.8X in file %s: %s(%s)\n" msgstr "" -#: tapedev.c:964 +#: tapedev.c:1147 +msgid "TAPE EOT Handling : max capacity exceeded\n" +msgstr "" + +#: tapedev.c:1150 +msgid "TAPE EOT Handling : max capacity enforced\n" +msgstr "" + +#: tapedev.c:1182 #, c-format msgid "HHCTA017E Error writing tape mark at block %8.8X in file %s: %s(%s)\n" msgstr "" -#: tapedev.c:1004 +#: tapedev.c:1222 #, c-format msgid "HHCTA018E Error forward spacing at block %8.8X in file %s: %s(%s)\n" msgstr "" -#: tapedev.c:1055 +#: tapedev.c:1277 #, c-format msgid "HHCTA019E Error reading data block at block %8.8X in file %s: %s(%s)\n" msgstr "" -#: tapedev.c:1088 +#: tapedev.c:1309 #, c-format msgid "" "HHCTA020E Error forward spacing to next file at block %8.8X in file %s: %s(%" "s)\n" msgstr "" -#: tapedev.c:1128 +#: tapedev.c:1373 #, c-format msgid "" "HHCTA021E Error back spacing to previous file at block %8.8X in file %s:\n" " %s(%s)\n" msgstr "" -#: tapedev.c:1166 +#: tapedev.c:1410 #, c-format msgid "HHCTA022E Error reading status of %s: %s\n" msgstr "" -#: tapedev.c:1235 +#: tapedev.c:1431 +#, c-format +msgid "HHCTA023I %s\n" +msgstr "" + +#: tapedev.c:1502 #, c-format msgid "HHCTA024E Error opening %s: %s\n" msgstr "" -#: tapedev.c:1252 +#: tapedev.c:1516 #, c-format msgid "HHCTA025E Error reading status of %s: %s\n" msgstr "" -#: tapedev.c:1274 +#: tapedev.c:1535 #, c-format msgid "HHCTA026I %s device type: %s\n" msgstr "" -#: tapedev.c:1277 +#: tapedev.c:1538 #, c-format msgid "HHCTA027I %s device type: 0x%lX\n" msgstr "" -#: tapedev.c:1287 +#: tapedev.c:1548 #, c-format msgid "HHCTA028I %s tape density: %s\n" msgstr "" -#: tapedev.c:1290 +#: tapedev.c:1551 #, c-format msgid "HHCTA029I %s tape density code: 0x%lX\n" msgstr "" -#: tapedev.c:1299 +#: tapedev.c:1560 #, c-format msgid "HHCTA030E Error setting attributes for %s: %s\n" msgstr "" -#: tapedev.c:1313 +#: tapedev.c:1573 #, c-format msgid "HHCTA031E Error rewinding %s: %s\n" msgstr "" -#: tapedev.c:1342 +#: tapedev.c:1601 #, c-format msgid "HHCTA032E Error reading data block from %s: %s\n" msgstr "" -#: tapedev.c:1376 +#: tapedev.c:1635 #, c-format msgid "HHCTA033E Error writing data block to %s: %s\n" msgstr "" -#: tapedev.c:1408 +#: tapedev.c:1685 #, c-format msgid "HHCTA034E Error writing tapemark to %s: %s\n" msgstr "" -#: tapedev.c:1458 +#: tapedev.c:1753 #, c-format msgid "HHCTA035E Forward space block error on %s: %s\n" msgstr "" -#: tapedev.c:1524 +#: tapedev.c:1835 #, c-format msgid "HHCTA036E Backspace block error on %s: %s\n" msgstr "" -#: tapedev.c:1559 +#: tapedev.c:1869 #, c-format msgid "HHCTA037E Forward space file error on %s: %s\n" msgstr "" -#: tapedev.c:1595 +#: tapedev.c:1932 #, c-format msgid "HHCTA038E Backspace file error on %s: %s\n" msgstr "" -#: tapedev.c:1649 +#: tapedev.c:1960 +#, c-format +msgid "HHCTA073E Error rewinding %s: %s\n" +msgstr "" + +#: tapedev.c:1979 +#, c-format +msgid "HHCTA076E Error unloading %s: %s\n" +msgstr "" + +#: tapedev.c:2025 #, c-format msgid "" "HHC232I Invalid filename %s: TDF files must be in the TAPES subdirectory\n" msgstr "" -#: tapedev.c:1661 +#: tapedev.c:2037 #, c-format msgid "HHCTA039E Error opening TDF file %s: %s\n" msgstr "" -#: tapedev.c:1670 +#: tapedev.c:2046 #, c-format msgid "HHCTA040E %s fstat error: %s\n" msgstr "" -#: tapedev.c:1681 +#: tapedev.c:2057 #, c-format msgid "HHCTA041E Cannot obtain buffer for TDF file %s: %s\n" msgstr "" -#: tapedev.c:1691 +#: tapedev.c:2067 #, c-format msgid "HHCTA042E Error reading TDF file %s: %s\n" msgstr "" -#: tapedev.c:1704 +#: tapedev.c:2080 #, c-format msgid "HHCTA043E %s is not a valid TDF file\n" msgstr "" -#: tapedev.c:1721 +#: tapedev.c:2099 #, c-format msgid "HHCTA044E Cannot obtain buffer for TDF array: %s\n" msgstr "" -#: tapedev.c:1762 +#: tapedev.c:2147 #, c-format msgid "HHCTA045E Filename or format missing in line %d of file %s\n" msgstr "" -#: tapedev.c:1774 +#: tapedev.c:2159 #, c-format msgid "HHCTA046E Filename %s too long in line %d of file %s\n" msgstr "" -#: tapedev.c:1826 +#: tapedev.c:2211 #, c-format msgid "HHCTA047E RECSIZE keyword missing in line %d of file %s\n" msgstr "" -#: tapedev.c:1839 +#: tapedev.c:2224 #, c-format msgid "HHCTA048E Invalid record size %s in line %d of file %s\n" msgstr "" -#: tapedev.c:1853 +#: tapedev.c:2238 #, c-format msgid "HHCTA049E Invalid record format %s in line %d of file %s\n" msgstr "" -#: tapedev.c:1902 +#: tapedev.c:2290 #, c-format msgid "HHCTA050E Attempt to access beyond end of tape %s\n" msgstr "" -#: tapedev.c:1919 +#: tapedev.c:2322 #, c-format msgid "HHCTA051E Error opening %s: %s\n" msgstr "" -#: tapedev.c:1959 +#: tapedev.c:2361 #, c-format msgid "HHCTA052E Error seeking to offset %8.8lX in file %s: %s\n" msgstr "" -#: tapedev.c:1975 +#: tapedev.c:2376 #, c-format msgid "HHCTA053E Error reading block header at offset %8.8lX in file %s: %s\n" msgstr "" -#: tapedev.c:1989 +#: tapedev.c:2389 #, c-format msgid "" "HHCTA054E Unexpected end of file in block header at offset %8.8lX in file %" "s\n" msgstr "" -#: tapedev.c:2015 +#: tapedev.c:2412 #, c-format msgid "HHCTA055E Invalid block header at offset %8.8lX in file %s\n" msgstr "" -#: tapedev.c:2084 +#: tapedev.c:2479 #, c-format msgid "HHCTA056E Error reading data block at offset %8.8lX in file %s: %s\n" msgstr "" -#: tapedev.c:2098 +#: tapedev.c:2492 #, c-format msgid "" "HHCTA057E Unexpected end of file in data block at offset %8.8lX in file %s\n" msgstr "" -#: tapedev.c:2139 +#: tapedev.c:2530 #, c-format msgid "HHCTA058E Error seeking to offset %8.8lX in file %s: %s\n" msgstr "" -#: tapedev.c:2155 +#: tapedev.c:2545 #, c-format msgid "HHCTA059E Error reading data block at offset %8.8lX in file %s: %s\n" msgstr "" -#: tapedev.c:2215 +#: tapedev.c:2603 #, c-format msgid "HHCTA060E Error seeking to offset %8.8lX in file %s: %s\n" msgstr "" -#: tapedev.c:2273 +#: tapedev.c:2660 #, c-format msgid "HHCTA061E Error reading data block at offset %8.8lX in file %s: %s\n" msgstr "" -#: tapedev.c:2287 +#: tapedev.c:2672 #, c-format msgid "" "HHCTA062E Unexpected end of file in data block at offset %8.8lX in file %s\n" msgstr "" -#: tapedev.c:2302 +#: tapedev.c:2684 #, c-format msgid "HHCTA063E Invalid zero length block at offset %8.8lX in file %s\n" msgstr "" -#: tapedev.c:2425 +#: tapedev.c:2850 #, c-format msgid "HHCTA064E Error seeking to end of file %s: %s\n" msgstr "" -#: tapedev.c:2549 +#: tapedev.c:2973 #, c-format msgid "HHCTA065E Error seeking to end of file %s: %s\n" msgstr "" -#: tapedev.c:2717 +#: tapedev.c:3227 #, c-format -msgid "HHCTA066I Tape msg %4.4X: %c %s %s\n" +msgid "HHCTA100I %4.4X: Now Displays : %s\n" msgstr "" -#: tapedev.c:3082 +#: tapedev.c:3264 #, c-format -msgid "HHCTA072E Data chaining not supported for CCW %2.2X\n" +msgid "HHCTA099I %4.4X:Tape Mount Request - (%s)\n" msgstr "" -#: tapedev.c:3264 +#: tapedev.c:3276 #, c-format -msgid "HHCTA073E Error rewinding %s: %s\n" +msgid "HHCTA099I %4.4X:Tape Presence - (%s)\n" msgstr "" #: tapedev.c:3287 #, c-format -msgid "HHCTA074E Error seeking to start of %s: %s\n" +msgid "HHCTA099I %4.4X:Tape unmount/mount Request - (%s -> %s)\n" msgstr "" -#: tapedev.c:3304 +#: tapedev.c:3888 #, c-format -msgid "HHCTA075E Error seeking to start of %s: %s(%s)\n" +msgid "Mounted tape %s\n" msgstr "" -#: tapedev.c:3466 +#: tapedev.c:3903 #, c-format -msgid "HHCTA076E Error unloading %s: %s\n" +msgid "" +"HHCTA999E Device %4.4X : Unable to determine tape format type for %s : " +"Internal error : Regcomp error %s on index %d\n" msgstr "" -#: tapedev.c:3479 +#: tapedev.c:3918 #, c-format -msgid "HHCTA077I Tape %4.4X unloaded\n" +msgid "" +"HHCTA999E Device %4.4X : Unable to determine tape format type for %s : " +"Internal error : Regexec error %s on index %d\n" +msgstr "" + +#: tapedev.c:3922 +#, c-format +msgid "HHCTA998I Device %4.4X : %s is a %s\n" +msgstr "" + +#: tapedev.c:3944 +#, c-format +msgid "XXXXXXXXX Device %4.4X : parameter: '%s'\n" +msgstr "" + +#: tapedev.c:3948 +#, c-format +msgid "HHCTA067E Device %4.4X : %s - Unrecognized parameter: '%s'\n" +msgstr "" + +#: tapedev.c:3965 +#, c-format +msgid "HHCTA068E Method must be within %u-%u\n" +msgstr "" + +#: tapedev.c:3975 +#, c-format +msgid "HHCTA069E Level must be within %u-%u\n" +msgstr "" + +#: tapedev.c:3985 +#, c-format +msgid "HHCTA070E Chunksize must be within %u-%u\n" +msgstr "" + +#: tapedev.c:4021 +#, c-format +msgid "HHCTA071E Error in '%s' parameter\n" msgstr "" -#: tapedev.c:3826 +#: tapedev.c:4061 #, c-format -msgid "HHCTA078E Error rewinding %s: %s\n" +msgid "TAPE Autoloader - Adding global parm %s\n" msgstr "" -#: tapedev.c:3842 +#: tapedev.c:4126 #, c-format -msgid "HHCTA079E Error seeking to start of %s: %s\n" +msgid "TAPE Autoloader : Adding tape entry %s\n" msgstr "" -#: tapedev.c:3859 +#: tapedev.c:4171 #, c-format -msgid "HHCTA080E Error seeking to start of %s: %s(%s)\n" +msgid "TAPE : Autoloader file request fn=%s\n" msgstr "" -#: tapedev.c:3877 +#: tapedev.c:4457 +#, c-format +msgid "Unsupported device type specified %4.4x\n" +msgstr "" + +#: tapedev.c:4660 +#, c-format +msgid "HHCTA072E Data chaining not supported for CCW %2.2X\n" +msgstr "" + +#: tapedev.c:4860 +#, c-format +msgid "HHCTA077I Tape %4.4X unloaded\n" +msgstr "" + +#: tapedev.c:5094 #, c-format msgid "HHCTA081I Locate block 0x%8.8lX on %4.4X\n" msgstr "" -#: timer.c:284 -msgid "HHCCP012I Timer thread started: tid=" +#: timer.c:308 +#, c-format +msgid "HHCTT001W Timer thread set priority %d failed: %s\n" +msgstr "" + +#: timer.c:315 +msgid "HHCTT002I Timer thread started: tid=" msgstr "" -#: timer.c:385 -msgid "HHCCP013I Timer thread ended\n" +#: timer.c:422 +msgid "HHCTT003I Timer thread ended\n" msgstr "" -#: tuntap.c:102 +#: tuntap.c:115 #, c-format msgid "HHCTU001E Can not determine operating system: %s\n" msgstr "" -#: tuntap.c:113 +#: tuntap.c:126 #, c-format msgid "HHCTU002E Error opening TUN/TAP device: %s: %s\n" msgstr "" -#: tuntap.c:137 +#: tuntap.c:150 #, c-format msgid "HHCTU003E Error setting TUN/TAP mode: %s: %s\n" msgstr "" -#: tuntap.c:158 +#: tuntap.c:171 #, c-format msgid "HHCTU004E Invalid TUN/TAP device name: %s\n" msgstr "" -#: tuntap.c:195 +#: tuntap.c:208 #, c-format msgid "HHCTU005E Invalid net device name specified: %s\n" msgstr "" -#: tuntap.c:205 +#: tuntap.c:218 #, c-format msgid "HHCTU006E %s: Invalid IP address: %s.\n" msgstr "" -#: tuntap.c:231 +#: tuntap.c:244 #, c-format msgid "HHCTU007E Invalid net device name specified: %s\n" msgstr "" -#: tuntap.c:241 +#: tuntap.c:254 #, c-format msgid "HHCTU008E %s: Invalid destination address: %s.\n" msgstr "" -#: tuntap.c:267 +#: tuntap.c:280 #, c-format msgid "HHCTU009E Invalid net device name specified: %s\n" msgstr "" -#: tuntap.c:277 +#: tuntap.c:290 #, c-format msgid "HHCTU010E %s: Invalid net mask: %s.\n" msgstr "" -#: tuntap.c:304 +#: tuntap.c:317 #, c-format msgid "HHCTU011E Invalid net device name specified: %s\n" msgstr "" -#: tuntap.c:313 +#: tuntap.c:326 #, c-format msgid "HHCTU012E %s: Invalid null or empty MTU.\n" msgstr "" -#: tuntap.c:322 +#: tuntap.c:335 #, c-format msgid "HHCTU013E %s: Invalid MTU: %s.\n" msgstr "" -#: tuntap.c:351 +#: tuntap.c:364 #, c-format msgid "HHCTU014E Invalid net device name specified: %s\n" msgstr "" -#: tuntap.c:360 +#: tuntap.c:373 #, c-format msgid "HHCTU015E %s: Invalid MAC address: %s.\n" msgstr "" -#: tuntap.c:388 +#: tuntap.c:401 #, c-format msgid "HHCTU016E Invalid net device name specified: %s\n" msgstr "" -#: tuntap.c:417 +#: tuntap.c:430 #, c-format msgid "HHCTU017E Invalid net device name specified: %s\n" msgstr "" -#: tuntap.c:430 +#: tuntap.c:443 #, c-format msgid "HHCTU018E %s: Invalid destiniation address: %s.\n" msgstr "" -#: tuntap.c:441 +#: tuntap.c:454 #, c-format msgid "HHCTU019E %s: Invalid net mask: %s.\n" msgstr "" -#: tuntap.c:453 +#: tuntap.c:466 #, c-format msgid "HHCTU020E %s: Invalid gateway address: %s.\n" msgstr "" -#: tuntap.c:481 +#: tuntap.c:494 #, c-format msgid "HHCTU021E Invalid net device name specified: %s\n" msgstr "" -#: tuntap.c:494 +#: tuntap.c:507 #, c-format msgid "HHCTU022E %s: Invalid destiniation address: %s.\n" msgstr "" -#: tuntap.c:505 +#: tuntap.c:518 #, c-format msgid "HHCTU023E %s: Invalid net mask: %s.\n" msgstr "" -#: tuntap.c:516 +#: tuntap.c:529 #, c-format msgid "HHCTU024E %s: Invalid gateway address: %s.\n" msgstr "" -#: tuntap.c:564 +#: tuntap.c:576 #, c-format msgid "HHCTU025E Call to socketpair failed: %s\n" msgstr "" -#: tuntap.c:578 +#: tuntap.c:590 #, c-format msgid "HHCTU026E Call to fork failed: %s\n" msgstr "" -#: tuntap.c:594 +#: tuntap.c:621 #, c-format msgid "HHCTU027E execl error on %s: %s.\n" msgstr "" -#: version.c:143 +#: version.c:154 #, c-format msgid "%sVersion %s\n" msgstr "" -#: version.c:151 +#: version.c:162 #, c-format msgid "Built on %s at %s\n" msgstr "" -#: version.c:155 +#: version.c:166 msgid "Build information:\n" msgstr "" + +#: vm.c:793 +#, c-format +msgid "HHCVM001I *%s* panel command issued by guest\n" +msgstr "" + +#: vm.c:809 +#, c-format +msgid "HHCVM002I *%s* command complete\n" +msgstr "" + +#: vm.c:813 +msgid "HHCVM003I Host command processing disabled by configuration statement" +msgstr "" + +#: vm.c:815 +msgid "HHCVM004E Host command processing not included in engine build" +msgstr "" + +#: w32chan.c:188 +#, c-format +msgid "HHC762I malloc(DEVIOREQUEST) failed; device=%4.4X, strerror=\"%s\"\n" +msgstr "" + +#: w32chan.c:251 +msgid "HHC765I *WARNING* max device threads exceeded.\n" +msgstr "" + +#: w32chan.c:348 +#, c-format +msgid "HHC761I malloc(DEVTHREADPARMS) failed; device=%4.4X, strerror=\"%s\"\n" +msgstr "" + +#: w32chan.c:357 +#, c-format +msgid "" +"HHC763I CreateEvent(hShutdownEvent) failed; device=%4.4X, strerror=\"%s\"\n" +msgstr "" + +#: w32chan.c:367 +#, c-format +msgid "" +"HHC764I CreateEvent(hRequestQueuedEvent) failed; device=%4.4X, strerror=\"%s" +"\"\n" +msgstr "" + +#: w32chan.c:388 +#, c-format +msgid "" +"HHC760I fthread_create(DeviceThread) failed; device=%4.4X, strerror=\"%s\"\n" +msgstr "" diff --git a/po/nl.gmo b/po/nl.gmo index 39a5fc95ccdaa142df9685358f4d02f8a6d8d47a..c131e0fb22ff259e586a62dfbafec27e1d920188 100644 GIT binary patch literal 1221 zcmah{&2G~`7&K7+EVyt21kzRzdVo#sq={NnszMrQC?!?uqKezr{*t<NcdgxZ)r#lf z#0wxEfD_Mv#0&5YaNvp<JB^Y;C03b?lO2EG?6>p%#?*TU%LVQLDR3S50u<{9@BsJ; z)PS4k9On^u4Ll1z0vGy^;M?HO;CtY2;41hR_!jv7dB<tsc?n$9vloW-K7fllU%?*u zH~1QOcFJ+?f)~LI{1#l)dj~H1d;+6f>H8}9GB8?b;amYAaV`QVS*}aPx4XL9T4{N{ z*I_M{9W#?h5gF6ZQ#L(4&4$Z$P98w5jjhUDb#6O=UP_8A#mp)e?F#%#4Ov!hpZ&_~ zQ^IIeU{d@_7|UkD?Qn)^ij<Dou85h4V+~sYtJJIYZP%%oH>6FXB&!(LY4>{F9t^>P zvP@-E{0%L(aJ<%2&ufN5Tfru!@XY!mNnw0a<Ja3KnvO(YG{;d4GZ{rmKZ%4Lb?fC) zCUU^a=8!;Ceq3imt3ABNJ25}87qDH@QJ#`vwW{BAH@YEjX)25H6=5l0HP5Sa-{W45 z`3pg<!M%p(LCAY_m=s4G>uT78l=;oTZ$9+!rdy1QhgwLJ3afO$UJ41&fHYg&+gmo2 zSy7eg5|na~ivjVF#6iHMlEfA*8M~Y&Riy_@?s{jvJvQ!FJr`GONut4V2B(&e>}-~b zL_RL=TjR2ybT+$ue!j85{js=k(<jZ_m}87d1#EsNv2Kqtr7d4KgCyq9@`2%@3Ya?? z!8Mg7#5VJNL*`KZKZ2O@j*>C%`vAe)7gC7-MeqedJyr@#g-oh&%+o0p)>t|#h{)mJ zF{CnT&%0Y;z}7H-#6c!7R3wq)WXS#vqRQ>0;EWU&)kiVhM{<VUR<sZa$rw$B@hdY} G8u<gNpe!W- delta 143 zcmX@gd4W0oo)F7a1|VPtVi_Pd0b*7l_5orLNC0A9AWj5gNg&P#VmU?zhE5>O1H>zU zY$+hU6-WaS*c>Jx4F{^lVW~yMlVzA<_zaA64UH6xjI4}Ibq&lWw=rE~XMjpCW>EqF DOJx&C diff --git a/po/nl.po b/po/nl.po index 9119328..446ae1b 100644 --- a/po/nl.po +++ b/po/nl.po @@ -1,147 +1,178 @@ # NL.PO Hercules dutch messages # This file is put in the public domain. -# Jan Jaeger <jj@septa.nl>, 2002. +# Jan Jaeger <jj@septa.nl>, 2002-2003. # msgid "" msgstr "" "Project-Id-Version: hercules 2.16\n" -"POT-Creation-Date: 2003-02-12 22:25-0600\n" +"POT-Creation-Date: 2003-10-02 19:25-0500\n" "PO-Revision-Date: 2002-05-10 16:16+0200\n" "Last-Translator: Jan Jaeger <jj@septa.nl>\n" "Language-Team: none <test@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" +"Report-Msgid-Bugs-To: \n" + +#: cache.c:384 +#, c-format +msgid "HHCCHxxxE calloc failed cache[%d] size %d: %s\n" +msgstr "" + +#: cache.c:506 +#, c-format +msgid "HHCCHxxxW realloc increase failed cache[%d] size %d: %s\n" +msgstr "" + +#: cache.c:525 +#, c-format +msgid "HHCCHxxxW realloc decrease failed cache[%d] size %d: %s\n" +msgstr "" + +#: cache.c:541 +#, c-format +msgid "HHCCHxxxW buf calloc failed cache[%d] size %d: %s\n" +msgstr "" + +#: cache.c:543 +msgid "HHCCHxxxW releasing inactive buffer space\n" +msgstr "" + +#: cache.c:548 +#, c-format +msgid "HHCCHxxxE Unable to calloc buf cache[%d] size %d: %s\n" +msgstr "" #: cardpch.c:34 #, fuzzy, c-format msgid "HHCPU004E Error writing to %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgstr "HHCPU004E Fout %2$s bij schrijven naar bestand \"%1$s\"\n" #: cardpch.c:54 #, fuzzy msgid "HHCPU001E File name missing or invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgstr "HHCPU001E Bestandsnaam niet opgegeven of ongeldig\n" -#: cardpch.c:89 +#: cardpch.c:92 #, fuzzy, c-format msgid "HHCPU002E Invalid argument: %s\n" -msgstr "HHC422I Optie %s niet geldig\n" +msgstr "HHCPU002E Optie %s niet geldig\n" -#: cardpch.c:167 +#: cardpch.c:170 #, fuzzy, c-format msgid "HHCPU003E Error opening file %s: %s\n" -msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" +msgstr "HHCPU003E Fout %2$s bij openen van bestand \"%1$s\"\n" -#: cardrdr.c:58 +#: cardrdr.c:78 #, fuzzy msgid "HHCRD001E Out of memory\n" -msgstr "HHC403I Niet genoeg geheugen\n" +msgstr "HHCRD001E Niet genoeg geheugen\n" -#: cardrdr.c:156 +#: cardrdr.c:176 #, fuzzy, c-format msgid "HHCRD002E File name too long (max=%ud): \"%s\"\n" -msgstr "HHC401I Bestandsnaam \"%2$s\" te lang (maximum=%1$ud)\n" +msgstr "HHCRD002E Bestandsnaam \"%2$s\" te lang (maximum=%1$ud)\n" -#: cardrdr.c:163 +#: cardrdr.c:183 #, fuzzy, c-format msgid "HHCRD003E Unable to access file \"%s\": %s\n" -msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" +msgstr "HHCRD003E Fout %2$s bij benaderen bestand \"%1$s\"\n" -#: cardrdr.c:173 +#: cardrdr.c:193 #, fuzzy msgid "HHCRD004E Out of memory\n" -msgstr "HHC403I Niet genoeg geheugen\n" +msgstr "HHCRD004E Niet genoeg geheugen\n" -#: cardrdr.c:186 +#: cardrdr.c:206 #, fuzzy msgid "HHCRD005E Specify 'ascii' or 'ebcdic' (or neither) but not both\n" -msgstr "HHC403I Specificeer 'ascii' of 'ebcdic' (of niets) maar niet beide\n" +msgstr "HHCRD005E Specificeer 'ascii' of 'ebcdic' (of niets) maar niet beide\n" -#: cardrdr.c:195 +#: cardrdr.c:215 #, fuzzy msgid "HHCRD006E Only one filename (sock_spec) allowed for socket devices\n" -msgstr "HHC403I Maar een bestandsnaam toegestaan voor socket apparaten\n" +msgstr "HHCRD006E Maar een bestandsnaam toegestaan voor socket apparaten\n" -#: cardrdr.c:210 +#: cardrdr.c:230 #, fuzzy, c-format msgid "HHCRD007I Defaulting to 'ascii' for socket device %4.4X\n" -msgstr "HHC403I standaard waarde 'ascii' aan socket apparaat %4.4X toegekend\n" +msgstr "" +"HHCRD007I standaard waarde 'ascii' aan socket apparaat %4.4X toegekend\n" -#: cardrdr.c:218 +#: cardrdr.c:238 #, fuzzy msgid "HHCRD008W 'multifile' option ignored: only one file specified\n" -msgstr "HHC403I 'multifile' optie niet gebruikt\n" +msgstr "HHCRD008W 'multifile' optie niet gebruikt\n" -#: cardrdr.c:231 +#: cardrdr.c:251 #, fuzzy, c-format msgid "HHCRD009E File name too long (max=%ud): \"%s\"\n" -msgstr "HHC401I Bestandsnaam \"%2$s\" te lang (maximum=%1$ud)\n" +msgstr "HHCRD009E Bestandsnaam \"%2$s\" te lang (maximum=%1$ud)\n" -#: cardrdr.c:245 +#: cardrdr.c:265 #, fuzzy, c-format msgid "HHCRD010E Unable to access file \"%s\": %s\n" -msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" +msgstr "HHCRD010E Fout %2$s bij benaderen bestand \"%1$s\"\n" -#: cardrdr.c:320 +#: cardrdr.c:342 #, fuzzy, c-format msgid "HHCRD011E Close error on file \"%s\": %s\n" -msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" +msgstr "HHCRD011E Fout %2$s bij sluiten van bestand \"%1$s\"\n" -#: cardrdr.c:329 +#: cardrdr.c:351 #, fuzzy, c-format msgid "HHCRD012I %s (%s) disconnected from device %4.4X (%s)\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +msgstr "HHCRD012I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: cardrdr.c:458 +#: cardrdr.c:492 #, fuzzy, c-format msgid "HHCRD013E Error opening file %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgstr "HHCRD013E Fout %2$s bij openen bestand \"%1$s\"\n" -#: cardrdr.c:482 +#: cardrdr.c:516 #, fuzzy, c-format msgid "HHCRD014E Error reading file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "HHCRD014E Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: cardrdr.c:515 +#: cardrdr.c:549 #, fuzzy, c-format msgid "HHCRD015E Seek error in file %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgstr "HHCRD015E Fout %2$s bij zoeken in bestand \"%1$s\"\n" -#: cardrdr.c:582 +#: cardrdr.c:617 #, fuzzy, c-format msgid "HHCRD016E Error reading file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "HHCRD016E Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: cardrdr.c:585 +#: cardrdr.c:620 #, fuzzy, c-format msgid "HHCRD017E Unexpected end of file on %s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +msgstr "HHCRD017E Onverwacht einde van bestand \"%s\"\n" -#: cardrdr.c:649 +#: cardrdr.c:685 #, fuzzy, c-format msgid "HHCRD018E Error reading file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "HHCRD018E Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: cardrdr.c:677 +#: cardrdr.c:713 #, fuzzy, c-format msgid "HHCRD019E Card image exceeds %d bytes in file %s\n" -msgstr "HHC410I Ponskaart %d bytes te groot in bestand \"%s\"\n" +msgstr "HHCRD019E Ponskaart %d bytes te groot in bestand \"%s\"\n" #: cckdcdsk.c:86 #, fuzzy, c-format msgid "cckdcdsk: error opening file %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgstr "cckdcdsk: Fout %2$s bij openen bestand \"%1$s\"\n" #: cckdcdsk.c:96 -#, fuzzy, c-format +#, c-format msgid "cckdcdsk: lseek error: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgstr "" #: cckdcdsk.c:102 -#, fuzzy, c-format +#, c-format msgid "cckdcdsk: read error: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgstr "" #: cckdcdsk.c:108 msgid "cckdcdsk: OPENED bit is on, use `-f'\n" @@ -180,3084 +211,5740 @@ msgid "" "\n" msgstr "" -#: cckdswap.c:56 -#, fuzzy, c-format -msgid "cckdswap: error opening %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" - -#: cckdswap.c:65 cckdswap.c:82 +#: cckdcomp.c:79 #, c-format -msgid "cckdswap: %s read error: %s\n" +msgid "cckdcomp: lseek error: %s\n" msgstr "" -#: cckdswap.c:73 +#: cckdcomp.c:85 #, c-format -msgid "cckdswap: %s is not a compressed ckd file\n" +msgid "cckdcomp: read error: %s\n" msgstr "" -#: cckdswap.c:94 -msgid "cckdswap: error during swap\n" +#: cckdcomp.c:91 +msgid "cckdcomp: OPENED bit is on, use `-f'\n" msgstr "" -#: cckdswap.c:98 +#: cckddasd.c:270 #, c-format -msgid "cckdswap: %s changed from %s to %s\n" +msgid "HHCCD100E malloc failed for cckd extension: %s\n" msgstr "" -#: cckdswap.c:109 -msgid "" -"usage: cckdswap cckd-file\n" -"\n" -" cckd-file -- name of the compressed ckd\n" -" file which will have its\n" -" byte order swapped\n" +#: cckddasd.c:305 +msgid "HHCCD101E error initializing shadow files\n" msgstr "" -#: channel.c:95 +#: cckddasd.c:1251 +#, fuzzy, c-format +msgid "HHCCD001I Readahead thread %d started: tid=" +msgstr "HHCCP012I Timer thread gestart: tid=%p, pid=%d\n" + +#: cckddasd.c:1251 cckddasd.c:1301 cckddasd.c:1445 cckddasd.c:1552 +#: cckddasd.c:4256 console.c:1311 cpu.c:1085 httpserv.c:585 panel.c:852 +#: shared.c:2481 shared.c:2644 sockdev.c:387 #, c-format -msgid "HHCCP048I %4.4X:CCW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X%s\n" +msgid ", pid=%d\n" msgstr "" -#: channel.c:109 +#: cckddasd.c:1301 #, c-format -msgid "HHCCP049I %4.4X:Stat=%2.2X%2.2X Count=%2.2X%2.2X CCW=%2.2X%2.2X%2.2X\n" +msgid "HHCCD011I Readahead thread %d stopping: tid=" msgstr "" -#: channel.c:124 +#: cckddasd.c:1445 +#, fuzzy, c-format +msgid "HHCCD002I Writer thread %d started: tid=" +msgstr "HHCCP012I Timer thread gestart: tid=%p, pid=%d\n" + +#: cckddasd.c:1552 +#, fuzzy, c-format +msgid "HHCCD012I Writer thread %d stopping: tid=" +msgstr "HHCCP012I Timer thread gestart: tid=%p, pid=%d\n" + +#: cckddasd.c:1596 #, c-format -msgid "" -"HHCCP050I %4.4X:SCSW=%2.2X%2.2X%2.2X%2.2X Stat=%2.2X%2.2X Count=%2.2X%2.2X " -"CCW=%2.2X%2.2X%2.2X%2.2X\n" +msgid "HHCCD102E file[%d] get space error, size exceeds 4G\n" msgstr "" -#: channel.c:229 +#: cckddasd.c:1603 #, c-format -msgid "HHCCP051I %4.4X: Test I/O\n" +msgid "HHCCD103E file[%d] get space fstat error, size %llx: %s\n" msgstr "" -#: channel.c:288 -#, fuzzy -msgid "HHCCP052I TIO modification executed CC=1\n" -msgstr "HIO modificatie uitgevoerd CC=1\n" - -#: channel.c:329 +#: cckddasd.c:1623 #, c-format -msgid "HHCCP053I %4.4X: Halt I/O\n" +msgid "HHCCD104E truncate re-open error: %s\n" msgstr "" -#: channel.c:374 -#, fuzzy -msgid "HHCCP054I HIO modification executed CC=1\n" -msgstr "HIO modificatie uitgevoerd CC=1\n" - -#: channel.c:715 +#: cckddasd.c:1651 #, c-format -msgid "HHCCP055I %4.4X: Clear subchannel\n" +msgid "HHCCD105E file[%d] get space ftruncate error, size %llx: %s\n" msgstr "" -#: channel.c:831 +#: cckddasd.c:1982 #, c-format -msgid "HHCCP056I %4.4X: Halt subchannel\n" +msgid "HHCCD106E file[%d] hdr lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:854 +#: cckddasd.c:1991 #, c-format -msgid "HHCCP057I %4.4X: Halt subchannel: cc=1\n" +msgid "HHCCD107E file[%d] chdr read error, offset %llx: %s\n" msgstr "" -#: channel.c:864 +#: cckddasd.c:2035 #, c-format -msgid "HHCCP058I %4.4X: Halt subchannel: cc=2\n" +msgid "HHCCD108E file[%d] chdr lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:940 +#: cckddasd.c:2042 #, c-format -msgid "HHCCP059I %4.4X: Halt subchannel: cc=0\n" +msgid "HHCCD109E file[%d] chdr write error, offset %llx: %s\n" msgstr "" -#: channel.c:978 +#: cckddasd.c:2073 #, c-format -msgid "HHCCP060I %4.4X: Resume subchannel: cc=1\n" +msgid "HHCCD110E l1 table malloc error: %s\n" msgstr "" -#: channel.c:992 +#: cckddasd.c:2082 #, c-format -msgid "HHCCP061I %4.4X: Resume subchannel: cc=2\n" +msgid "HHCCD111E file[%d] l1 lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:1012 +#: cckddasd.c:2089 #, c-format -msgid "HHCCP062I %4.4X: Resume subchannel: cc=0\n" +msgid "HHCCD112E file[%d] l1 read error, offset %llx: %s\n" msgstr "" -#: channel.c:1532 +#: cckddasd.c:2121 #, c-format -msgid "HHCCP063I %4.4X:IDAW=%8.8X Len=%3.3hX%s\n" +msgid "HHCCD113E file[%d] l1 lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:1537 +#: cckddasd.c:2128 #, c-format -msgid "" -"HHCCP064I %4.4X:IDAW=%16.16llX Len=%4.4hX\n" -"%4.4X:---------------------%s\n" +msgid "HHCCD114E file[%d] l1 write error, offset %llx: %s\n" msgstr "" -#: channel.c:1641 -#, fuzzy, c-format -msgid "HHCCP065I DEV%4.4X: attention signalled\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: channel.c:1652 -#, fuzzy, c-format -msgid "HHCCP066I DEV%4.4X: attention\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: channel.c:1852 -#, fuzzy, c-format -msgid "HHCCP067E %4.4X create_thread error: %s" -msgstr "HHC760I %4.4X create_thread fout: %s" - -#: channel.c:1870 -#, fuzzy, c-format -msgid "HHCCP068E %4.4X create_thread error: %s" -msgstr "HHC760I %4.4X create_thread fout: %s" - -#: channel.c:2026 -#, fuzzy, c-format -msgid "HHCCP069I Device %4.4X initial status interrupt\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: channel.c:2067 -#, fuzzy, c-format -msgid "HHCCP070I Device %4.4X attention completed\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: channel.c:2131 -#, fuzzy, c-format -msgid "HHCCP071I Device %4.4X clear completed\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" - -#: channel.c:2179 -#, fuzzy, c-format -msgid "HHCCP072I Device %4.4X halt completed\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: channel.c:2345 -#, fuzzy, c-format -msgid "HHCCP073I Device %4.4X suspended\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: channel.c:2364 -#, fuzzy, c-format -msgid "HHCCP074I Device %4.4X resumed\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: channel.c:2628 +#: cckddasd.c:2158 #, c-format -msgid "HHCCP075I %4.4X:Stat=%2.2X%2.2X Count=%4.4X %s\n" +msgid "HHCCD115E file[%d] l1[%d] lseek error, offset %llx: %s\n" msgstr "" -#: channel.c:2634 +#: cckddasd.c:2165 #, c-format -msgid "" -"HHCCP076I %4.4X:Sense=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%" -"2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X\n" +msgid "HHCCD116E file[%d] l1[%d] write error, offset %llx: %s\n" msgstr "" -#: channel.c:2649 +#: cckddasd.c:2195 #, c-format -msgid "HHCCP077I %4.4X:Sense=%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n" +msgid "HHCCD117E file[%d] devhdr lseek error, offset %llx: %s\n" msgstr "" -#: ckddasd.c:231 -#, fuzzy -msgid "HHCDA001E File name missing or invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" - -#: ckddasd.c:339 +#: cckddasd.c:2202 #, c-format -msgid "HHCDA002E parameter %d is invalid: %s\n" +msgid "HHCCD118E file[%d] devhdr read error, offset %llx: %s\n" msgstr "" -#: ckddasd.c:350 -#, fuzzy, c-format -msgid "HHCDA003I opening %s readonly%s\n" -msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" - -#: ckddasd.c:363 -#, fuzzy, c-format -msgid "HHCDA004E %s open error: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" - -#: ckddasd.c:378 +#: cckddasd.c:2215 #, c-format -msgid "HHCDA005E %s not in a single file for shadowing\n" +msgid "HHCCD119E file[%d] devhdr id error\n" msgstr "" -#: ckddasd.c:387 -#, fuzzy, c-format -msgid "HHCDA006E %s fstat error: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" - -#: ckddasd.c:397 -#, fuzzy, c-format -msgid "HHCDA007E %s read error: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" - -#: ckddasd.c:400 +#: cckddasd.c:2257 #, c-format -msgid "HHCDA08E %s CKD header incomplete\n" +msgid "HHCCD120E calloc failed for free space, size %d: %s\n" msgstr "" -#: ckddasd.c:410 +#: cckddasd.c:2272 #, c-format -msgid "HHCDA009E %s CKD header invalid\n" +msgid "HHCCD121E file[%d] free space lseek error, offset %llx: %s\n" msgstr "" -#: ckddasd.c:419 +#: cckddasd.c:2279 #, c-format -msgid "HHCDA010E %s Only 1 CCKD file allowed\n" +msgid "HHCCD122E file[%d] free space read error, offset %llx: %d,%d %s\n" msgstr "" -#: ckddasd.c:434 -#, fuzzy, c-format -msgid "HHCDA011E %s read error: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" - -#: ckddasd.c:439 +#: cckddasd.c:2292 #, c-format -msgid "HHCDA012E %s CCKD header incomplete\n" +msgid "HHCCD123E file[%d] free space ftruncate error, size %llx: %s\n" msgstr "" -#: ckddasd.c:450 +#: cckddasd.c:2309 #, c-format -msgid "HHCDA013E %s CKD file out of sequence\n" +msgid "HHCCD124E file[%d] free space lseek error, offset %llx: %s\n" msgstr "" -#: ckddasd.c:482 +#: cckddasd.c:2316 #, c-format -msgid "HHCDA014I %s seq=%d cyls=%d-%d\n" +msgid "HHCCD125E file[%d] free space read error, offset %llx: %d,%d,%d %s\n" msgstr "" -#: ckddasd.c:496 +#: cckddasd.c:2373 #, c-format -msgid "HHCDA015E %s heads=%d trklen=%d, expected heads=%d trklen=%d\n" +msgid "HHCCD126E file[%d] free space lseek error, offset %llx: %s\n" msgstr "" -#: ckddasd.c:509 +#: cckddasd.c:2380 #, c-format -msgid "HHCDA016E %s CKD header inconsistent with file size\n" +msgid "HHCCD127E file[%d] free space write error, offset %llx: %s\n" msgstr "" -#: ckddasd.c:517 +#: cckddasd.c:2467 #, c-format -msgid "HHCDA017E %s CKD header high cylinder incorrect\n" +msgid "HHCCD128E file[%d] l2[%d] lseek error offset %lld: %s\n" msgstr "" -#: ckddasd.c:543 +#: cckddasd.c:2478 #, c-format -msgid "HHCDA018E %s exceeds maximum %d CKD files\n" +msgid "HHCCD129E file[%d] l2[%d] read error offset %lld: %s\n" msgstr "" -#: ckddasd.c:554 +#: cckddasd.c:2597 #, c-format -msgid "HHCDA019I %s cyls=%d heads=%d tracks=%d trklen=%d\n" +msgid "HHCCD130E file[%d] l2[%d] lseek error offset %lld: %s\n" msgstr "" -#: ckddasd.c:565 +#: cckddasd.c:2604 #, c-format -msgid "HHCDA020E %4.4X device type %4.4X not found in dasd table\n" +msgid "HHCCD131E file[%d] l2[%d] write error offset %lld: %s\n" msgstr "" -#: ckddasd.c:574 +#: cckddasd.c:2690 #, c-format -msgid "HHCDA021E %4.4X control unit %s not found in dasd table\n" +msgid "HHCCD132E file[%d] l2[%d,%d] lseek error offset %lld: %s\n" msgstr "" -#: ckddasd.c:647 +#: cckddasd.c:2697 #, c-format -msgid "HHCDA022I %4.4X cache hits %d, misses %d\n" +msgid "HHCCD133E file[%d] l2[%d,%d] write error offset %lld: %s\n" msgstr "" -#: ckddasd.c:712 -#, fuzzy, c-format -msgid "HHCDA025E error writing trk %d: lseek error: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" - -#: ckddasd.c:726 -#, fuzzy, c-format -msgid "HHCDA026E error writing trk %d: write error: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" - -#: ckddasd.c:760 -#, fuzzy, c-format -msgid "HHCDA027E calloc error for cache table size %d: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: ckddasd.c:808 -#, fuzzy, c-format -msgid "HHCDA030E malloc error for cache entry buffer size %d: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: ckddasd.c:840 -#, fuzzy, c-format -msgid "HHCDA032E error reading trk %d: lseek error: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: ckddasd.c:853 -#, fuzzy, c-format -msgid "HHCDA033E error reading trk %d: read error: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: ckddasd.c:872 +#: cckddasd.c:2730 #, c-format -msgid "" -"HHCDA035E %4.4X invalid track header for cyl %d head %d %2.2x%2.2x%2.2x%2.2x" -"%2.2x\n" +msgid "HHCCD134E file[%d] trk %d lseek error offset %llx: %s\n" msgstr "" -#: ckddasd.c:933 -#, fuzzy, c-format -msgid "HHCDA036E error writing trk %d: lseek error: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" - -#: ckddasd.c:946 -#, fuzzy, c-format -msgid "HHCDA037E error writing trk %d: write error: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" - -#: ckddasd.c:1207 -msgid "HHCDA042E attempt to read past end of track\n" +#: cckddasd.c:2737 +#, c-format +msgid "HHCCD135E file[%d] trk %d read error offset %llx: %s\n" msgstr "" -#: ckddasd.c:1324 -msgid "ckddasd: attempt to read past end of track\n" +#: cckddasd.c:2794 +#, c-format +msgid "HHCCD136E file[%d] trk %d not written, invalid format\n" msgstr "" -#: ckddasd.c:1374 -msgid "HHCDA046E attempt to read past end of track\n" +#: cckddasd.c:2824 +#, c-format +msgid "HHCCD137E file[%d] trk %d lseek error offset %llx: %s\n" msgstr "" -#: ckddasd.c:1543 -msgid "HHCDA049E Write KD orientation error\n" +#: cckddasd.c:2831 +#, c-format +msgid "HHCCD138E file[%d] trk %d write error offset %llx len %d rc %d: %s\n" msgstr "" -#: ckddasd.c:1585 -msgid "HHCDA051E Write data orientation error\n" +#: cckddasd.c:2924 +#, c-format +msgid "HHCCD139E trklen err for %2.2x%2.2x%2.2x%2.2x%2.2x\n" msgstr "" -#: ckddasd.c:1658 +#: cckddasd.c:2953 #, c-format -msgid "HHCDA053E Data chaining not supported for CCW %2.2X\n" +msgid "HHCCD140E truncate fstat error: %s\n" msgstr "" -#: ckddasd.c:2945 +#: cckddasd.c:2974 #, c-format -msgid "HHCDA055I search key %s\n" +msgid "HHCCD141E truncate re-open error: %s\n" msgstr "" -#: codepage.c:187 -#, fuzzy, c-format -msgid "HHCCF051E CodePage conversion table %s is not defined\n" -msgstr "HHC050I CodePage conversie tabel %s is niet gedefinieerd\n" - -#: config.c:170 -#, fuzzy, c-format -msgid "HHCCF001S Error reading file %s line %d: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: config.c:189 +#: cckddasd.c:2983 #, c-format -msgid "HHCCF002S File %s line %d is too long\n" +msgid "HHCCD142E truncate ftruncate error: %s\n" msgstr "" -#: config.c:337 -#, fuzzy, c-format -msgid "HHCCF003S Cannot open file %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" - -#: config.c:374 -#, fuzzy, c-format -msgid "HHCCF004S No device records in file %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" - -#: config.c:517 -#, fuzzy, c-format -msgid "HHCCF005S Error in %s line %d: Unrecognized argument %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: config.c:531 +#: cckddasd.c:3078 #, c-format -msgid "HHCCF006S Error in %s line %d: Userid, but no password given %s\n" +msgid "HHCCD143E invalid byte 0 trk %d: buf %2.2x%2.2x%2.2x%2.2x%2.2x\n" msgstr "" -#: config.c:546 -#, fuzzy, c-format -msgid "HHCCF007S Error in %s line %d: Missing argument.\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: config.c:559 -#, fuzzy, c-format -msgid "HHCCF008S Error in %s line %d: Unrecognized keyword %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: config.c:568 -#, fuzzy, c-format -msgid "HHCCF009S Error in %s line %d: Incorrect number of operands\n" -msgstr "Geen apparaat nummer\n" - -#: config.c:602 +#: cckddasd.c:3100 #, c-format -msgid "" -"HHCCF010S Error in %s line %d: Unknown or unsupported ARCHMODE specification " -"%s\n" +msgid "HHCCD144E invalid byte 0 blkgrp %d: buf %2.2x%2.2x%2.2x%2.2x%2.2x\n" msgstr "" -#: config.c:620 -#, fuzzy, c-format -msgid "HHCCF011S Error in %s line %d: %s is not a valid serial number\n" -msgstr "Ongeldig apparaat nummer\n" - -#: config.c:633 -#, fuzzy, c-format -msgid "HHCCF012S Error in %s line %d: %s is not a valid CPU model\n" -msgstr "Ongeldig apparaat nummer\n" - -#: config.c:646 +#: cckddasd.c:3115 #, c-format -msgid "HHCCF013S Error in %s line %d: Invalid main storage size %s\n" +msgid "HHCCD145E invalid %s hdr %s %d: %s compression unsupported\n" msgstr "" -#: config.c:659 +#: cckddasd.c:3122 #, c-format -msgid "HHCCF014S Error in %s line %d: Invalid expanded storage size %s\n" +msgid "HHCCD146E invalid %s hdr %s %d buf %2.2x%2.2x%2.2x%2.2x%2.2x\n" msgstr "" -#: config.c:672 -#, fuzzy, c-format -msgid "HHCCF015S Error in %s line %d: Invalid console port number %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: cckddasd.c:3237 +msgid "HHCCD147E no shadow file name specified\n" +msgstr "" -#: config.c:684 +#: cckddasd.c:3244 #, c-format -msgid "HHCCF016S Error in %s line %d: Invalid CPU thread priority %s\n" +msgid "HHCCD148E [%d] number of shadow files exceeded: %d\n" msgstr "" -#: config.c:692 +#: cckddasd.c:3304 +#, c-format msgid "" -"HHCCF017W Hercules is not running as setuid root, cannot raise CPU priority\n" +"HHCCD149E shadow file[%d] name %s\n" +" collides with %4.4X file[%d] name %s\n" msgstr "" -#: config.c:706 -#, fuzzy, c-format -msgid "HHCCF018S Error in %s line %d: Invalid number of CPUs %s\n" -msgstr "Ongeldig apparaat nummer\n" - -#: config.c:720 -#, fuzzy, c-format -msgid "HHCCF019S Error in %s line %d: Invalid number of VFs %s\n" -msgstr "Ongeldig apparaat nummer\n" - -#: config.c:726 -msgid "HHCCF020W Vector Facility support not configured\n" +#: cckddasd.c:3366 +#, c-format +msgid "" +"HHCCD150E error re-opening %s readonly\n" +" %s\n" msgstr "" -#: config.c:735 +#: cckddasd.c:3405 #, c-format -msgid "HHCCF021S Error in %s line %d: Load parameter %s exceeds 8 characters\n" +msgid "HHCCD151E shadow file[%d] open error: %s\n" msgstr "" -#: config.c:757 +#: cckddasd.c:3414 #, c-format -msgid "" -"HHCCF022S Error in %s line %d: %s is not a valid system epoch.\n" -"Patch config.c to expand the table\n" +msgid "HHCCD152E file[%d] lseek error offset %d: %s\n" msgstr "" -#: config.c:772 +#: cckddasd.c:3422 #, c-format -msgid "HHCCF023S Error in %s line %d: %s is not a valid timezone offset\n" +msgid "HHCCD153E file[%d] read error offset %d: %s\n" msgstr "" -#: config.c:786 +#: cckddasd.c:3432 #, c-format -msgid "HHCCF024S Error in %s line %d: Invalid TOD clock drag factor %s\n" +msgid "HHCCD154E shadow file[%d] write error offset %d: %s\n" msgstr "" -#: config.c:810 +#: cckddasd.c:3449 #, c-format -msgid "HHCCF025S Error in %s line %d: Invalid panel refresh rate %s\n" +msgid "HHCCD155E file[%d] l1 malloc failed: %s\n" msgstr "" -#: config.c:849 -#, c-format -msgid "HHCCF026S Error in %s line %d: Unknown OS tailor specification %s\n" +#: cckddasd.c:3489 +msgid "HHCCD156E not a cckd device\n" msgstr "" -#: config.c:862 -#, fuzzy, c-format -msgid "HHCCF027S Error in %s line %d: Invalid maximum device threads %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: cckddasd.c:3521 +#, c-format +msgid "HHCCD157E file[%d] error adding shadow file: %s\n" +msgstr "" -#: config.c:887 +#: cckddasd.c:3544 #, c-format -msgid "" -"HHCCF028S Error in %s line %d: Invalid program product OS permission %s\n" +msgid "HHCCD158E file[%d] %s added\n" msgstr "" -#: config.c:901 -#, fuzzy, c-format -msgid "HHCCF029S Error in %s line %d: Invalid HTTP port number %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: cckddasd.c:3580 +msgid "HHCCD159E not a cckd device\n" +msgstr "" -#: config.c:915 -#, fuzzy, c-format -msgid "HHCCF030S Error in %s line %d: Invalid I/O delay value: %s\n" -msgstr "Ongeldige waarde: %s\n" +#: cckddasd.c:3586 +msgid "HHCCD160E cannot remove base file\n" +msgstr "" -#: config.c:936 +#: cckddasd.c:3623 #, c-format -msgid "HHCCF031S Cannot obtain %dMB main storage: %s\n" +msgid "HHCCD161E file[%d] not merged, file[%d] cannot be opened read-write\n" msgstr "" -#: config.c:945 +#: cckddasd.c:3635 #, c-format -msgid "HHCCF032S Cannot obtain storage key array: %s\n" +msgid "HHCCD162E file[%d] not merged, file[%d] check failed\n" msgstr "" -#: config.c:968 +#: cckddasd.c:3649 #, c-format -msgid "HHCCF033S Cannot obtain %dMB expanded storage: %s\n" +msgid "HHCCD163E file[%d] not merged, file[%d] not hardened\n" msgstr "" -#: config.c:974 -msgid "HHCCF034W Expanded storage support not installed\n" +#: cckddasd.c:3686 +#, c-format +msgid "HHCCD164E file[%d] l2[%d] lseek error offset %lld: %s\n" msgstr "" -#: config.c:1160 -#, fuzzy, c-format -msgid "HHCCF035S Error in %s line %d: Missing device number or device type\n" -msgstr "Geen apparaat nummer\n" - -#: config.c:1169 -#, fuzzy, c-format -msgid "HHCCF036S Error in %s line %d: %s is not a valid device number\n" -msgstr "Ongeldig apparaat nummer\n" - -#: config.c:1195 +#: cckddasd.c:3695 #, c-format -msgid "HHCCF037S Message pipe creation failed: %s\n" +msgid "HHCCD165E file[%d] l2[%d] read error offset %lld: %s\n" msgstr "" -#: config.c:1209 -#, fuzzy, c-format -msgid "HHCCF038S Message pipe open failed: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" - -#: config.c:1230 -msgid "" -"HHCCF039W PGMPRDOS LICENSED specified.\n" -" Licensed program product operating systems are enabled.\n" -" You are responsible for meeting all conditions of your\n" -" software license.\n" -"\n" +#: cckddasd.c:3713 +#, c-format +msgid "HHCCD166E file[%d] l2[%d] lseek error offset %lld: %s\n" msgstr "" -#: config.c:1311 +#: cckddasd.c:3722 #, c-format -msgid "HHCCF040E Cannot create CPU%4.4X thread: %s\n" +msgid "HHCCD167E file[%d] l2[%d] read error offset %lld: %s\n" msgstr "" -#: config.c:1356 +#: cckddasd.c:3748 #, c-format -msgid "HHCCF041E Device %4.4X already exists\n" +msgid "HHCCD168E file[%d] %s[%d] lseek error offset %lld: %s\n" msgstr "" -#: config.c:1366 +#: cckddasd.c:3753 #, c-format -msgid "HHCCF042E Device type %s not recognized\n" +msgid "HHCCD169E file[%d] %s[%d] not merged\n" msgstr "" -#: config.c:1381 +#: cckddasd.c:3762 #, c-format -msgid "HHCCF043E Cannot obtain device block for device %4.4X: %s\n" +msgid "HHCCD170E file[%d] %s[%d] read error offset %lld: %s\n" msgstr "" -#: config.c:1433 -#, fuzzy, c-format -msgid "HHCCF044E Initialization failed for device %4.4X\n" -msgstr "HHC403I standaard waarde 'ascii' aan socket apparaat %4.4X toegekend\n" - -#: config.c:1450 +#: cckddasd.c:3767 #, c-format -msgid "HHCCF045E Cannot obtain buffer for device %4.4X: %s\n" +msgid "HHCCD171E file[%d] %s[%d] not merged\n" msgstr "" -#: config.c:1507 +#: cckddasd.c:3787 #, c-format -msgid "HHCCF046E Device %4.4X does not exist\n" +msgid "HHCCD172E file[%d] %s[%d] lseek error offset %lld: %s\n" msgstr "" -#: config.c:1535 +#: cckddasd.c:3791 #, c-format -msgid "HHCCF047I Device %4.4X detached\n" +msgid "HHCCD173E file[%d] %s[%d] not merged\n" msgstr "" -#: config.c:1553 +#: cckddasd.c:3800 #, c-format -msgid "HHCCF048E Device %4.4X does not exist\n" +msgid "HHCCD174E file[%d] %s[%d] write error offset %lld: %s\n" msgstr "" -#: config.c:1560 +#: cckddasd.c:3804 #, c-format -msgid "HHCCF049E Device %4.4X already exists\n" +msgid "HHCCD175E file[%d] %s[%d] not merged\n" msgstr "" -#: config.c:1590 -#, fuzzy, c-format -msgid "HHCCF050I Device %4.4X defined as %4.4X\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: console.c:693 +#: cckddasd.c:3841 #, c-format -msgid "HHCTE007I Device %4.4X connection closed by client %s\n" +msgid "HHCCD176E file[%d] l1[%d] lseek error offset %lld: %s\n" msgstr "" -#: console.c:856 +#: cckddasd.c:3845 #, c-format -msgid "HHCTE008I Device %4.4X connection closed by client %s\n" +msgid "HHCCD177E file[%d] %s[%d-%d] not merged\n" msgstr "" -#: console.c:1146 -#, fuzzy, c-format -msgid "HHCTE009I Client %s connected to %4.4X device %4.4X\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: console.c:1200 -#, fuzzy -msgid "HHCTE001I Console connection thread started: tid=" -msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" - -#: console.c:1201 cpu.c:1090 httpserv.c:562 panel.c:923 timer.c:284 +#: cckddasd.c:3854 #, c-format -msgid ", pid=%d\n" +msgid "HHCCD178E file[%d] l1[%d] write error offset %lld: %s\n" msgstr "" -#: console.c:1238 +#: cckddasd.c:3858 #, c-format -msgid "HHCTE002W Waiting for port %u to become free\n" +msgid "HHCCD179E file[%d] %s[%d-%d] not merged\n" msgstr "" -#: console.c:1258 +#: cckddasd.c:3890 #, c-format -msgid "HHCTE003I Waiting for console connection on port %u\n" +msgid "HHCCD200I shadow file [%d] successfully %s%s\n" msgstr "" -#: console.c:1403 -#, fuzzy -msgid "HHCTE004I Console connection thread terminated\n" -msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" - -#: console.c:1418 -#, c-format -msgid "HHCTE005E Cannot create console thread: %s\n" +#: cckddasd.c:3918 +msgid "HHCCD201W device is not a shadow file\n" msgstr "" -#: console.c:1439 -msgid "console_remove() error\n" +#: cckddasd.c:3923 +msgid "HHCCD202W file shadowing not activated\n" msgstr "" -#: cpu.c:255 -msgid "HHCCP043I Wait state PSW loaded: " +#: cckddasd.c:3931 +msgid "HHCCD203W shadowing is already active\n" msgstr "" -#: cpu.c:399 +#: cckddasd.c:3937 #, c-format -msgid "program_int() passing to guest code=%4.4X\n" +msgid "HHCCD204I shadow file name set to %s\n" msgstr "" -#: cpu.c:484 -msgid "HHCCP014I " +#: cckddasd.c:3954 +msgid "HHCCD205W device is not a shadow file\n" msgstr "" -#: cpu.c:487 hscmisc.c:596 -msgid "SIE: " +#: cckddasd.c:4021 +msgid "HHCCD206W device is not a shadow file\n" msgstr "" -#: cpu.c:492 -#, c-format -msgid "CPU%4.4X: %s CODE=%4.4X ILC=%d\n" +#: cckddasd.c:4038 +msgid "" +"HHCCD210I size free nbr st reads writes l2reads hits " +"switches\n" msgstr "" -#: cpu.c:594 -#, c-format -msgid "HHCCP015I CPU%4.4X PER event: code=%4.4X perc=%2.2X addr=" +#: cckddasd.c:4040 +msgid "" +"HHCCD211I readaheads " +"misses\n" msgstr "" -#: cpu.c:595 sie.c:120 sie.c:234 stack.c:593 stack.c:616 stack.c:678 -#: stack.c:696 stack.c:704 stack.c:728 stack.c:751 stack.c:804 stack.c:882 -#: stack.c:916 stack.c:944 stack.c:956 stack.c:967 stack.c:1021 stack.c:1045 -#: stack.c:1277 stack.c:1303 stack.c:1311 stack.c:1348 stack.c:1443 -#: stack.c:1479 stack.c:1532 -msgid "\n" +#: cckddasd.c:4041 +msgid "" +"HHCCD212I " +"-------------------------------------------------------------------\n" msgstr "" -#: cpu.c:757 +#: cckddasd.c:4044 #, c-format -msgid "HHCCP016I CPU%4.4X: Program interrupt loop: " +msgid "HHCCD213I [*] %10lld %3lld%% %4d %7d %7d %7d %7d %7d\n" msgstr "" -#: cpu.c:865 +#: cckddasd.c:4049 #, c-format -msgid "" -"HHCCP044I I/O interrupt code=%4.4X CSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%" -"2.2X\n" +msgid "HHCCD214I %7d %7d\n" msgstr "" -#: cpu.c:887 +#: cckddasd.c:4053 #, c-format -msgid "HHCCP045I I/O interrupt code=%8.8X parm=%8.8X\n" +msgid "HHCCD215I %s\n" msgstr "" -#: cpu.c:890 +#: cckddasd.c:4054 #, c-format -msgid "HHCCP046I I/O interrupt code=%8.8X parm=%8.8X id=%8.8X\n" +msgid "HHCCD216I [0] %10lld %3lld%% %4d %s %7d %7d %7d\n" msgstr "" -#: cpu.c:956 +#: cckddasd.c:4063 #, c-format -msgid "HHCCP022I Machine Check code=%16.16llu\n" +msgid "HHCCD217I %s\n" msgstr "" -#: cpu.c:1013 +#: cckddasd.c:4069 #, c-format -msgid "HHCCP001W CPU thread set priority %d failed: %s\n" +msgid "HHCCD218I [%d] %10lld %3lld%% %4d %s %7d %7d %7d\n" msgstr "" -#: cpu.c:1020 -#, fuzzy, c-format -msgid "HHCCP002I CPU%4.4X thread started: tid=" -msgstr "HHC623I CPU%4.4X thread al gestart\n" +#: cckddasd.c:4166 +#, fuzzy +msgid "HHCCD003I Garbage collector thread started: tid=" +msgstr "HHCTE001I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" -#: cpu.c:1020 +#: cckddasd.c:4166 #, c-format -msgid ", pid=%d, priority=%d\n" +msgid ", pid=%d \n" msgstr "" -#: cpu.c:1026 -#, fuzzy, c-format -msgid "HHCCP003I CPU%4.4X architecture mode %s\n" -msgstr "HHC630I CPU%4.4X Architectuur Modus %s\n" - -#: cpu.c:1031 -#, fuzzy, c-format -msgid "HHCCP004I CPU%4.4X Vector Facility online\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" - -#: cpu.c:1042 -#, fuzzy, c-format -msgid "HHCCP005E CPU%4.4X thread already started\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" - -#: cpu.c:1055 -#, fuzzy, c-format -msgid "HHCCP006E Cannot create timer thread: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" - -#: cpu.c:1077 -#, fuzzy, c-format -msgid "HHCCP007I CPU%4.4X architecture mode set to %s\n" -msgstr "HHC630I CPU%4.4X Architectuur Modus %s\n" - -#: cpu.c:1090 -#, fuzzy, c-format -msgid "HHCCP008I CPU%4.4X thread ended: tid=" -msgstr "HHC624I CPU%4.4X thread geeindigd: tid=%8.8lX, pid=%d\n" +#: cckddasd.c:4256 +msgid "HHCCD013I Garbage collector thread stopping: tid=" +msgstr "" -#: cpu.c:1116 +#: cckddasd.c:4393 #, c-format -msgid "HHCCP009E CPU MASK MISMATCH: %8.8X - %8.8X. Last instruction:\n" +msgid "HHCCD180E gcperc lseek error file[%d] offset 0x%llx: %s\n" msgstr "" -#: cpu.c:1236 -#, fuzzy, c-format -msgid "HHCCP010I CPU%4.4X store status completed.\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" - -#: cpu.c:1303 -#, fuzzy, c-format -msgid "" -"HHCCP011I CPU%4.4X: Disabled wait state\n" -" " -msgstr "HHC623I CPU%4.4X thread al gestart\n" +#: cckddasd.c:4400 +#, c-format +msgid "HHCCD181E gcperc read error file[%d] offset 0x%llx: %d,%d %s\n" +msgstr "" -#: cpu.c:1731 +#: cckddasd.c:4453 #, c-format -msgid "PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X\n" +msgid "HHCCD182E unknown space at offset 0x%llx\n" msgstr "" -#: cpu.c:1738 +#: cckddasd.c:4455 #, c-format -msgid "" -"PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X%2.2X%2.2X%" -"2.2X%2.2X\n" +msgid "HHCCD183E %2.2x%2.2x%2.2x%2.2x%2.2x\n" msgstr "" -#: ctcadpt.c:116 -#, fuzzy, c-format -msgid "HHCCT001E %4.4X: Incorrect number of parameters\n" -msgstr "Geen apparaat nummer\n" +#: cckddasd.c:4537 +#, c-format +msgid "HHCCD190E uncompress %d calloc() error: %s\n" +msgstr "" -#: ctcadpt.c:458 -#, fuzzy, c-format -msgid "HHCCT002E %4.4X: Incorrect number of parameters\n" -msgstr "Geen apparaat nummer\n" +#: cckddasd.c:4546 +#, c-format +msgid "HHCCD191E uncompress %d calloc() error: %s\n" +msgstr "" -#: ctcadpt.c:470 -#, fuzzy, c-format -msgid "HHCCT003E %4.4X: Invalid port number: %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: cckddasd.c:4562 +#, c-format +msgid "HHCCD192E uncompress %d calloc() error: %s\n" +msgstr "" -#: ctcadpt.c:491 -#, fuzzy, c-format -msgid "HHCCT004E %4.4X: Invalid IP address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: cckddasd.c:4592 +#, c-format +msgid "HHCCD193E uncompress error trk %d: %2.2x%2.2x%2.2x%2.2x%2.2x\n" +msgstr "" -#: ctcadpt.c:504 -#, fuzzy, c-format -msgid "HHCCT005E %4.4X: Invalid port number: %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: cckddasd.c:4595 +#, c-format +msgid "HHCCD194E %s compression not supported\n" +msgstr "" -#: ctcadpt.c:516 -#, fuzzy, c-format -msgid "HHCCT006E %4.4X: Invalid MTU size %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: cckddasd.c:5104 +msgid "HHCCD900I print_itrace\n" +msgstr "" -#: ctcadpt.c:537 -#, fuzzy, c-format -msgid "HHCCT007E %4.4X: Error creating socket: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: cckddiag.c:136 +#, c-format +msgid "lseek to pos 0x%8.8x error: %s\n" +msgstr "" -#: ctcadpt.c:557 -#, fuzzy, c-format -msgid "HHCCT008E %4.4X: Error binding to socket: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: cckddiag.c:146 +#, c-format +msgid "cckddiag: read error: %s\n" +msgstr "" -#: ctcadpt.c:578 +#: cckddiag.c:485 #, c-format -msgid "HHCCT009I %4.4X: Connect to %s:%s failed, starting server\n" +msgid "cckddiag: error opening file %s: %s\n" msgstr "" -#: ctcadpt.c:588 -#, fuzzy, c-format -msgid "HHCCT010E %4.4X: Error creating socket: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: cckdswap.c:56 +#, c-format +msgid "cckdswap: error opening %s: %s\n" +msgstr "" -#: ctcadpt.c:605 -#, fuzzy, c-format -msgid "HHCCT011E %4.4X: Error binding to socket: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: cckdswap.c:65 cckdswap.c:82 +#, c-format +msgid "cckdswap: %s read error: %s\n" +msgstr "" -#: ctcadpt.c:613 -#, fuzzy, c-format -msgid "HHCCT012E %4.4X: Error on call to listen: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: cckdswap.c:73 +#, c-format +msgid "cckdswap: %s is not a compressed ckd file\n" +msgstr "" -#: ctcadpt.c:627 -#, fuzzy, c-format -msgid "HHCCT013I %4.4X: Connected to %s:%s\n" -msgstr "HHC630I CPU%4.4X Architectuur Modus %s\n" +#: cckdswap.c:94 +msgid "cckdswap: error during swap\n" +msgstr "" -#: ctcadpt.c:661 +#: cckdswap.c:98 #, c-format -msgid "HHCCT014E %4.4X Write CCW count %u is invalid\n" +msgid "cckdswap: %s changed from %s to %s\n" msgstr "" -#: ctcadpt.c:691 -#, c-format -msgid "HHCCT015I %4.4X: Interface command: %s %8.8X\n" +#: cckdswap.c:109 +msgid "" +"usage: cckdswap cckd-file\n" +"\n" +" cckd-file -- name of the compressed ckd\n" +" file which will have its\n" +" byte order swapped\n" msgstr "" -#: ctcadpt.c:716 ctc_ctci.c:684 +#: channel.c:97 #, c-format -msgid "CTC101W %4.4X: Write buffer contains invalid frame offset %u\n" +msgid "HHCCP048I %4.4X:CCW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X%s\n" msgstr "" -#: ctcadpt.c:737 +#: channel.c:111 #, c-format -msgid "" -"HHCCT016E %4.4X: Write buffer contains incomplete segment header at offset %" -"4.4X\n" +msgid "HHCCP049I %4.4X:Stat=%2.2X%2.2X Count=%2.2X%2.2X CCW=%2.2X%2.2X%2.2X\n" msgstr "" -#: ctcadpt.c:757 +#: channel.c:126 #, c-format msgid "" -"HHCCT017E %4.4X: Write buffer contains invalid segment length %u at offset %" -"4.4X\n" +"HHCCP050I %4.4X:SCSW=%2.2X%2.2X%2.2X%2.2X Stat=%2.2X%2.2X Count=%2.2X%2.2X " +"CCW=%2.2X%2.2X%2.2X%2.2X\n" msgstr "" -#: ctcadpt.c:772 -#, fuzzy, c-format -msgid "HHCCT018I %4.4X: Sending packet to %s:\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" - -#: ctcadpt.c:783 -#, fuzzy, c-format -msgid "HHCCT019E %4.4X: Error writing to %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" - -#: ctcadpt.c:846 -#, fuzzy, c-format -msgid "HHCCT020E %4.4X: Error reading from %s: %s\n" -msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: channel.c:237 +#, c-format +msgid "HHCCP051I %4.4X: Test I/O\n" +msgstr "" -#: ctcadpt.c:863 -#, fuzzy, c-format -msgid "HHCCT021E %4.4X: Error reading from %s: %s\n" -msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: channel.c:302 +#, fuzzy +msgid "HHCCP052I TIO modification executed CC=1\n" +msgstr "HHCCP052I TIO modificatie uitgevoerd CC=1\n" -#: ctcadpt.c:873 +#: channel.c:339 #, c-format -msgid "HHCCT022I %4.4X: Received packet from %s (%d bytes):\n" +msgid "HHCCP053I %4.4X: Halt I/O\n" msgstr "" -#: ctcadpt.c:953 -#, fuzzy, c-format -msgid "HHCCT023E %4.4X: Incorrect client or config error\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" +#: channel.c:393 +#, fuzzy +msgid "HHCCP054I HIO modification executed CC=1\n" +msgstr "HHCCP054I HIO modificatie uitgevoerd CC=1\n" -#: ctcadpt.c:955 +#: channel.c:766 #, c-format -msgid " Config=%s, connecting client=%s\n" +msgid "HHCCP055I %4.4X: Clear subchannel\n" msgstr "" -#: ctcadpt.c:995 -msgid "HHCCT024E 4.4X: Not enough arguments to start vmnet\n" +#: channel.c:867 +#, c-format +msgid "HHCCP056I %4.4X: Halt subchannel\n" msgstr "" -#: ctcadpt.c:1005 -#, fuzzy, c-format -msgid "HHCCT025E %4.4X: Failed: socketpair: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" - -#: ctcadpt.c:1013 -#, fuzzy, c-format -msgid "HHCCT026E %4.4X: Failed: fork: %s\n" -msgstr "HHC760I %4.4X create_thread fout: %s" +#: channel.c:889 +#, c-format +msgid "HHCCP057I %4.4X: Halt subchannel: cc=1\n" +msgstr "" -#: ctcadpt.c:1061 -#, fuzzy, c-format -msgid "HHCCT027E %4.4X: Not enough parameters\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" +#: channel.c:899 +#, c-format +msgid "HHCCP058I %4.4X: Halt subchannel: cc=2\n" +msgstr "" -#: ctcadpt.c:1066 -#, fuzzy, c-format -msgid "HHCCT028E %4.4X: Bad device number '%s'\n" -msgstr "Ongeldig apparaat nummer\n" +#: channel.c:970 +#, c-format +msgid "HHCCP059I %4.4X: Halt subchannel: cc=0\n" +msgstr "" -#: ctcadpt.c:1103 +#: channel.c:1008 #, c-format -msgid "HHCCT029E %4.4X: bad block length: %d < %d\n" +msgid "HHCCP060I %4.4X: Resume subchannel: cc=1\n" msgstr "" -#: ctcadpt.c:1113 +#: channel.c:1022 #, c-format -msgid "HHCCT030E %4.4X: bad packet length: %d < %d\n" +msgid "HHCCP061I %4.4X: Resume subchannel: cc=2\n" msgstr "" -#: ctcadpt.c:1118 +#: channel.c:1045 #, c-format -msgid "HHCCT031E %4.4X: bad packet length: %d < 6\n" +msgid "HHCCP062I %4.4X: Resume subchannel: cc=0\n" msgstr "" -#: ctcadpt.c:1164 +#: channel.c:1596 #, c-format -msgid "HHCCT032E %4.4X: Error: EOF on read, CTC network down\n" +msgid "HHCCP063I %4.4X:IDAW=%8.8X Len=%3.3hX%s\n" msgstr "" -#: ctcadpt.c:1172 -#, fuzzy, c-format -msgid "HHCCT033E %4.4X: Error: read: %s\n" -msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: channel.c:1601 +#, c-format +msgid "" +"HHCCP064I %4.4X:IDAW=%16.16llX Len=%4.4hX\n" +"%4.4X:---------------------%s\n" +msgstr "" -#: ctcadpt.c:1330 -#, fuzzy, c-format -msgid "HHCCT034E device %4.4X already exists\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: channel.c:1718 +#, c-format +msgid "HHCCP065I DEV%4.4X: attention signalled\n" +msgstr "" -#: ctcadpt.c:1340 +#: channel.c:1730 #, c-format -msgid "HHCCT035E AddDevice internal error (%s).\n" +msgid "HHCCP066I DEV%4.4X: attention\n" msgstr "" -#: ctcadpt.c:1358 +#: channel.c:1913 #, fuzzy, c-format -msgid "HHCCT036E Cannot obtain device block for device %4.4X: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgid "HHCCP067E %4.4X create_thread error: %s" +msgstr "HHCCP067E %4.4X create_thread fout: %s" -#: ctc_ctci.c:69 +#: channel.c:1931 #, fuzzy, c-format -msgid "HHCCT037E %4.4X: Unable to allocate CTCBLK\n" -msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" +msgid "HHCCP068E %4.4X create_thread error: %s" +msgstr "HHCCP068E %4.4X create_thread fout: %s" -#: ctc_ctci.c:91 -#, fuzzy, c-format -msgid "HHCCT038E %4.4X: Unable to allocate CTCBLK\n" -msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" +#: channel.c:2113 +#, c-format +msgid "HHCCP069I Device %4.4X initial status interrupt\n" +msgstr "" -#: ctc_ctci.c:136 -#, fuzzy, c-format -msgid "HHCCT039E %4.4X: Unable to allocate CTCBLK\n" -msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" +#: channel.c:2152 +#, c-format +msgid "HHCCP070I Device %4.4X attention completed\n" +msgstr "" -#: ctc_ctci.c:541 +#: channel.c:2218 #, c-format -msgid "HHCCT040I %4.4X: Halt or Clear Recognized\n" +msgid "HHCCP071I Device %4.4X clear completed\n" msgstr "" -#: ctc_ctci.c:590 +#: channel.c:2273 #, c-format -msgid "HHCCT041I %4.4X: CTC Received Frame (%d bytes):\n" +msgid "HHCCP072I Device %4.4X halt completed\n" msgstr "" -#: ctc_ctci.c:628 +#: channel.c:2431 #, c-format -msgid "HHCCT042E %4.4X Write CCW count %u is invalid\n" +msgid "HHCCP073I Device %4.4X suspended\n" msgstr "" -#: ctc_ctci.c:657 +#: channel.c:2474 #, c-format -msgid "HHCCT043I %4.4X: Interface command: %s %8.8X\n" +msgid "HHCCP074I Device %4.4X resumed\n" msgstr "" -#: ctc_ctci.c:706 +#: channel.c:2704 #, c-format -msgid "" -"HHCCT044E %4.4X: Write buffer contains incomplete segment header at offset %" -"4.4X\n" +msgid "HHCCP075I %4.4X:Stat=%2.2X%2.2X Count=%4.4X %s\n" msgstr "" -#: ctc_ctci.c:726 +#: channel.c:2710 #, c-format msgid "" -"HHCCT045E %4.4X: Write buffer contains invalid segment length %u at offset %" -"4.4X\n" +"HHCCP076I %4.4X:Sense=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%" +"2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X\n" msgstr "" -#: ctc_ctci.c:741 -#, fuzzy, c-format -msgid "HHCCT046I %4.4X: Sending packet to %s:\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: channel.c:2725 +#, c-format +msgid "HHCCP077I %4.4X:Sense=%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n" +msgstr "" -#: ctc_ctci.c:751 -#, fuzzy, c-format -msgid "HHCCT047E %4.4X: Error writing to %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: ckddasd.c:203 +#, fuzzy +msgid "HHCDA001E File name missing or invalid\n" +msgstr "HHCDA001E Bestandsnaam niet opgegeven of ongeldig\n" -#: ctc_ctci.c:812 +#: ckddasd.c:219 #, fuzzy, c-format -msgid "HHCCT048E %4.4X: Error reading from %s: %s\n" -msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgid "HHCDA002E %4.4X:File not found or invalid\n" +msgstr "HHCDA002E %4.4X:Bestandsnaam niet opgegeven of ongeldig\n" -#: ctc_ctci.c:824 +#: ckddasd.c:310 #, c-format -msgid "HHCCT049I %4.4X: Received packet from %s (%d bytes):\n" +msgid "HHCDA003E parameter %d is invalid: %s\n" msgstr "" -#: ctc_ctci.c:988 -#, fuzzy, c-format -msgid "HHCCT050E %4.4X: Invalid adapter address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: ckddasd.c:321 +#, c-format +msgid "HHCDA004I opening %s readonly%s\n" +msgstr "" -#: ctc_ctci.c:997 +#: ckddasd.c:334 #, fuzzy, c-format -msgid "HHCCT051E %4.4X: Invalid device name %s\n" -msgstr "Ongeldig apparaat nummer\n" +msgid "HHCDA005E %s open error: %s\n" +msgstr "HHCDA005E Fout %2$s bij openen bestand \"%1$s\"\n" -#: ctc_ctci.c:1011 -#, fuzzy, c-format -msgid "HHCCT052E %4.4X: Invalid kernel buffer size %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: ckddasd.c:349 +#, c-format +msgid "HHCDA006E %s not in a single file for shadowing\n" +msgstr "" -#: ctc_ctci.c:1025 -#, fuzzy, c-format -msgid "HHCCT053E %4.4X: Invalid DLL I/O buffer size %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: ckddasd.c:358 +#, c-format +msgid "HHCDA007E %s fstat error: %s\n" +msgstr "" -#: ctc_ctci.c:1038 -#, fuzzy, c-format -msgid "HHCCT054E %4.4X: Invalid MTU size %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: ckddasd.c:368 +#, c-format +msgid "HHCDA008E %s read error: %s\n" +msgstr "" -#: ctc_ctci.c:1049 -#, fuzzy, c-format -msgid "HHCCT055E %4.4X: Invalid netmask %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: ckddasd.c:371 +#, c-format +msgid "HHCDA09E %s CKD header incomplete\n" +msgstr "" -#: ctc_ctci.c:1060 -#, fuzzy, c-format -msgid "HHCCT056E %4.4X: Invalid MAC address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: ckddasd.c:381 +#, c-format +msgid "HHCDA010E %s CKD header invalid\n" +msgstr "" -#: ctc_ctci.c:1087 -#, fuzzy, c-format -msgid "HHCCT056E %4.4X: Incorrect number of parameters\n" -msgstr "Geen apparaat nummer\n" +#: ckddasd.c:390 +#, c-format +msgid "HHCDA011E %s Only 1 CCKD file allowed\n" +msgstr "" -#: ctc_ctci.c:1097 +#: ckddasd.c:405 #, fuzzy, c-format -msgid "HHCCT057E %4.4X: Incorrect number of parameters\n" -msgstr "Geen apparaat nummer\n" +msgid "HHCDA012E %s read error: %s\n" +msgstr "HHCDA012E Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: ctc_ctci.c:1105 -#, fuzzy, c-format -msgid "HHCCT058E %4.4X: Invalid IP address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: ckddasd.c:410 +#, c-format +msgid "HHCDA013E %s CCKD header incomplete\n" +msgstr "" -#: ctc_ctci.c:1117 -#, fuzzy, c-format -msgid "HHCCT059E %4.4X: Invalid IP address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: ckddasd.c:421 +#, c-format +msgid "HHCDA014E %s CKD file out of sequence\n" +msgstr "" -#: ctc_ctci.c:1133 -#, fuzzy, c-format -msgid "HHCCT060E %4.4X: Incorrect number of parameters\n" -msgstr "Geen apparaat nummer\n" +#: ckddasd.c:453 +#, c-format +msgid "HHCDA015I %s seq=%d cyls=%d-%d\n" +msgstr "" -#: ctc_ctci.c:1142 -#, fuzzy, c-format -msgid "HHCCT061E %4.4X invalid device name %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: ckddasd.c:467 +#, c-format +msgid "HHCDA016E %s heads=%d trklen=%d, expected heads=%d trklen=%d\n" +msgstr "" -#: ctc_ctci.c:1156 -#, fuzzy, c-format -msgid "HHCCT062E %4.4X: Invalid MTU size %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: ckddasd.c:480 +#, c-format +msgid "HHCDA017E %s CKD header inconsistent with file size\n" +msgstr "" -#: ctc_ctci.c:1167 -#, fuzzy, c-format -msgid "HHCCT063E %4.4X: Invalid IP address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: ckddasd.c:488 +#, c-format +msgid "HHCDA018E %s CKD header high cylinder incorrect\n" +msgstr "" -#: ctc_ctci.c:1179 -#, fuzzy, c-format -msgid "HHCCT064E %4.4X: Invalid IP address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: ckddasd.c:514 +#, c-format +msgid "HHCDA019E %s exceeds maximum %d CKD files\n" +msgstr "" -#: ctc_ctci.c:1191 -#, fuzzy, c-format -msgid "HHCCT065E %4.4X: Invalid netmask %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: ckddasd.c:525 +#, c-format +msgid "HHCDA020I %s cyls=%d heads=%d tracks=%d trklen=%d\n" +msgstr "" -#: ctc_ctci.c:1202 -#, fuzzy, c-format -msgid "HHCCT066E %4.4X: Incorrect number of parameters\n" -msgstr "Geen apparaat nummer\n" +#: ckddasd.c:536 +#, c-format +msgid "HHCDA021E %4.4X device type %4.4X not found in dasd table\n" +msgstr "" -#: ctc_ctci.c:1220 -#, fuzzy, c-format -msgid "HHCCT067E %4.4X: Invalid IP address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: ckddasd.c:545 +#, c-format +msgid "HHCDA022E %4.4X control unit %s not found in dasd table\n" +msgstr "" -#: ctc_ctci.c:1235 -#, fuzzy, c-format -msgid "HHCCT068E %4.4X: Invalid MAC address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: ckddasd.c:627 +#, c-format +msgid "HHCDA023I %4.4X cache hits %d, misses %d, waits %d\n" +msgstr "" -#: ctc_ctci.c:1267 -#, fuzzy, c-format -msgid "HHCCT069E %4.4X: Invalid kernel buffer size %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: ckddasd.c:710 +#, c-format +msgid "HHCDA024I read trk %d cur trk %d\n" +msgstr "" -#: ctc_ctci.c:1284 -#, fuzzy, c-format -msgid "HHCCT070E %4.4X: Invalid DLL I/O buffer size %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: ckddasd.c:739 +#, c-format +msgid "HHCDA025I read track: updating track %d\n" +msgstr "" -#: ctc_ctci.c:1295 -#, fuzzy, c-format -msgid "HHCCT071E %4.4X: Incorrect number of parameters\n" -msgstr "Geen apparaat nummer\n" +#: ckddasd.c:750 +#, c-format +msgid "HHCDA026E error writing trk %d: lseek error: %s\n" +msgstr "" -#: ctc_lcs.c:81 -#, fuzzy, c-format -msgid "HHCLC001E %4.4X unable to allocate LCSBLK\n" -msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" +#: ckddasd.c:769 +#, c-format +msgid "HHCDA027E error writing trk %d: write error: %s\n" +msgstr "" -#: ctc_lcs.c:652 -#, fuzzy, c-format -msgid "HHCLC002I %4.4X: Halt or Clear Recognized\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +#: ckddasd.c:811 +#, c-format +msgid "HHCDA028I read trk %d cache hit, using cache[%d]\n" +msgstr "" -#: ctc_lcs.c:695 -#, fuzzy, c-format -msgid "HHCLC003I %4.4X: LCS Read Buffer:\n" -msgstr "Ongeldig apparaat nummer\n" +#: ckddasd.c:848 +#, c-format +msgid "HHCDA029I read trk %d no available cache entry, waiting\n" +msgstr "" -#: ctc_lcs.c:799 -#, fuzzy, c-format -msgid "HHCLC004I %4.4X: Sending packet to %s:\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: ckddasd.c:856 +#, c-format +msgid "HHCDA030I read trk %d cache miss, using cache[%d]\n" +msgstr "" -#: ctc_lcs.c:808 -#, fuzzy, c-format -msgid "HHCLC005E %4.4X: Error writing to %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: ckddasd.c:879 +#, c-format +msgid "HHCDA031I read trk %d reading file %d offset %lld len %d\n" +msgstr "" -#: ctc_lcs.c:827 -#, fuzzy, c-format -msgid "HHCLC006I %4.4X Triggering Event.\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: ckddasd.c:888 +#, c-format +msgid "HHCDA032E error reading trk %d: lseek error: %s\n" +msgstr "" -#: ctc_lcs.c:1117 -#, fuzzy, c-format -msgid "HHCLC007E Error in call to socket: %s.\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: ckddasd.c:904 +#, c-format +msgid "HHCDA033E error reading trk %d: read error: %s\n" +msgstr "" -#: ctc_lcs.c:1128 -#, fuzzy, c-format -msgid "HHCLC008E ioctl error on device %s: %s.\n" -msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" +#: ckddasd.c:916 +#, c-format +msgid "HHCDA034I read trk %d trkhdr %2.2x %2.2x%2.2x %2.2x%2.2x\n" +msgstr "" -#: ctc_lcs.c:1200 +#: ckddasd.c:926 #, c-format -msgid "HHCLC009I Port %2.2X: Read Buffer:\n" +msgid "" +"HHCDA035E %4.4X invalid track header for cyl %d head %d %2.2x%2.2x%2.2x%2.2x" +"%2.2x\n" msgstr "" -#: ctc_lcs.c:1229 +#: ckddasd.c:1122 #, c-format -msgid "HHCLC010I Port %2.2X: IPV4 frame for %8.8X\n" +msgid "HHCDA038I seeking to cyl %d head %d\n" msgstr "" -#: ctc_lcs.c:1256 +#: ckddasd.c:1161 #, c-format -msgid "HHCLC011I Port %2.2X: ARP frame for %8.8X\n" +msgid "HHCDA039E MT advance error: locate record %d file mask %2.2X\n" msgstr "" -#: ctc_lcs.c:1280 +#: ckddasd.c:1193 #, c-format -msgid "HHCLC012I Port %2.2X: SNA frame\n" +msgid "HHCDA040I MT advance to cyl %d head %d\n" msgstr "" -#: ctc_lcs.c:1310 +#: ckddasd.c:1245 #, c-format -msgid "HHCLC013I Port %2.2X: No match found - selecting primary %4.4X\n" +msgid "HHCDA041I read count orientation is %s\n" msgstr "" -#: ctc_lcs.c:1320 +#: ckddasd.c:1269 #, c-format -msgid "HHCLC014I Port %2.2X: No match found - selecting secondary %4.4X\n" +msgid "HHCDA042E attempt to read past end of track %d %d\n" msgstr "" -#: ctc_lcs.c:1331 +#: ckddasd.c:1291 #, c-format -msgid "HHCLC015I Port %2.2X: No match found - Discarding frame\n" +msgid "HHCDA043I cyl %d head %d record %d kl %d dl %d of %d\n" msgstr "" -#: ctc_lcs.c:1339 -#, fuzzy, c-format -msgid "HHCLC016I Port %2.2X: Enqueing frame to device %4.4X (%8.8X)\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +#: ckddasd.c:1379 +#, c-format +msgid "HHCDA044I read key %d bytes\n" +msgstr "" -#: ctc_lcs.c:1547 -#, fuzzy, c-format -msgid "HHCLC017E %4.4X invalid device name %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: ckddasd.c:1387 +msgid "ckddasd: attempt to read past end of track\n" +msgstr "" -#: ctc_lcs.c:1563 -#, fuzzy, c-format -msgid "HHCLC018E %4.4X invalid MAC address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: ckddasd.c:1429 +#, c-format +msgid "HHCDA045I read data %d bytes\n" +msgstr "" -#: ctc_lcs.c:1587 +#: ckddasd.c:1437 +msgid "HHCDA046E attempt to read past end of track\n" +msgstr "" + +#: ckddasd.c:1555 #, c-format -msgid "HHCLC019E %4.4X too many arguments in statement.\n" +msgid "HHCDA047I writing cyl %d head %d record %d kl %d dl %d\n" msgstr "" -#: ctc_lcs.c:1597 -#, fuzzy, c-format -msgid "HHCLC020E %4.4X invalid IP address %s\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: ckddasd.c:1561 +#, c-format +msgid "HHCDA048I setting track overflow flag for cyl %d head %d record %d\n" +msgstr "" -#: ctc_lcs.c:1644 -#, fuzzy, c-format -msgid "HHCLC039E Cannot open file %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +#: ckddasd.c:1606 +msgid "HHCDA049E Write KD orientation error\n" +msgstr "" -#: ctc_lcs.c:1693 -#, fuzzy, c-format -msgid "HHCLC021E Invalid HWADD statement in %s: %s\n" -msgstr "HHC422I Optie %s niet geldig\n" +#: ckddasd.c:1619 +#, c-format +msgid "HHCDA050I updating cyl %d head %d record %d kl %d dl %d\n" +msgstr "" -#: ctc_lcs.c:1702 +#: ckddasd.c:1648 +msgid "HHCDA051E Write data orientation error\n" +msgstr "" + +#: ckddasd.c:1662 #, c-format -msgid "" -"HHCLC022E Invalid MAC in HWADD statement in %s: %s (%s)\n" -" " +msgid "HHCDA052I updating cyl %d head %d record %d dl %d\n" msgstr "" -#: ctc_lcs.c:1719 -#, fuzzy, c-format -msgid "HHCLC023E Invalid ROUTE statement in %s: %s\n" -msgstr "HHC422I Optie %s niet geldig\n" +#: ckddasd.c:1721 +#, c-format +msgid "HHCDA053E Data chaining not supported for CCW %2.2X\n" +msgstr "" -#: ctc_lcs.c:1726 -#, fuzzy, c-format -msgid "HHCLC024E Invalid net address in ROUTE %s: %s (%s)\n" -msgstr "Ongeldig bereik: %s\n" +#: ckddasd.c:2844 +#, c-format +msgid "HHCDA054I set file mask %2.2X\n" +msgstr "" -#: ctc_lcs.c:1735 -#, fuzzy, c-format -msgid "HHCLC025E Invalid net mask in ROUTE %s: %s (%s)\n" -msgstr "Ongeldig apparaat nummer\n" +#: ckddasd.c:3012 +#, c-format +msgid "HHCDA055I search key %s\n" +msgstr "" -#: ctc_lcs.c:1767 -#, fuzzy, c-format -msgid "HHCLC026E Error in %s: Missing device number or mode\n" -msgstr "Geen apparaat nummer\n" +#: codepage.c:288 +#, c-format +msgid "HHCCF051E CodePage conversion table %s is not defined\n" +msgstr "" -#: ctc_lcs.c:1776 -#, fuzzy, c-format -msgid "HHCLC027E Error in %s: %s: Invalid device number\n" -msgstr "Ongeldig apparaat nummer\n" +#: commadpt.c:59 +#, c-format +msgid "HHCCA300D %4.4X:%s : Status = TEXT=%s, TRANS=%s, TWS=%s\n" +msgstr "" -#: ctc_lcs.c:1788 -#, fuzzy, c-format -msgid "HHCLC028E Error in %s: %s:Missing PORT number\n" -msgstr "Geen apparaat nummer\n" +#: commadpt.c:65 +#, c-format +msgid "HHCCA300D %4.4X:%s : Dump of %d (%x) byte(s)\n" +msgstr "" -#: ctc_lcs.c:1796 -#, fuzzy, c-format -msgid "HHCLC029E Error in %s: %s: Invalid PORT number\n" -msgstr "Ongeldig apparaat nummer\n" +#: commadpt.c:74 +#, c-format +msgid "HHCCA300D %4.4X:%s : %4.4X:" +msgstr "" -#: ctc_lcs.c:1806 -#, fuzzy, c-format -msgid "HHCLC030E Error in %s: %s: Invalid number of arguments\n" -msgstr "Ongeldig apparaat nummer\n" +#: commadpt.c:201 +#, c-format +msgid "HHCCA300D %4.4X:clean : Control block freed\n" +msgstr "" -#: ctc_lcs.c:1820 -#, fuzzy, c-format -msgid "HHCLC031E Error in %s: %s: Invalid entry starting at %s\n" -msgstr "Ongeldig apparaat nummer\n" +#: commadpt.c:209 +#, c-format +msgid "HHCCA300D %4.4X:clean : Control block not freed : not allocated\n" +msgstr "" -#: ctc_lcs.c:1830 -#, fuzzy, c-format -msgid "HHCLC032E Error is %s: %s: Invalid IP address (%s)\n" -msgstr "Ongeldig frame adres %8.8X\n" +#: commadpt.c:223 +#, c-format +msgid "HHCCA020E %4.4X:Memory allocation failure for main control block\n" +msgstr "" -#: ctc_lcs.c:1845 -#, fuzzy, c-format -msgid "HHCLC033E Error in %s: %s: Missing PORT number\n" -msgstr "Geen apparaat nummer\n" +#: commadpt.c:305 +#, c-format +msgid "" +"HHCCA001I %4.4X:Connect out to %s:%d failed during initial status : %s\n" +msgstr "" -#: ctc_lcs.c:1853 -#, fuzzy, c-format -msgid "HHCLC034E Error in %s: %s:Invalid PORT number\n" -msgstr "Ongeldig apparaat nummer\n" +#: commadpt.c:347 +#, c-format +msgid "HHCCA300D %4.4x : Found data beyond EON\n" +msgstr "" -#: ctc_lcs.c:1861 -#, fuzzy, c-format -msgid "HHCLC035E Error in %s: %s: SNA does not accept any arguments\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: commadpt.c:362 +#, c-format +msgid "HHCCA300D %4.4x : Found incorrect IP address section at position %d\n" +msgstr "" -#: ctc_lcs.c:1869 -#, fuzzy, c-format -msgid "HHCLC036E Error in %s: %s: Invalid MODE\n" -msgstr "Ongeldig apparaat nummer\n" +#: commadpt.c:363 +#, c-format +msgid "HHCCA300D %4.4x : %d greater than 255\n" +msgstr "" + +#: commadpt.c:377 +#, c-format +msgid "HHCCA300D %4.4x : Too many separators in dial data\n" +msgstr "" + +#: commadpt.c:394 +#, c-format +msgid "HHCCA300D %4.4x : Incorrect dial data byte %2.2x\n" +msgstr "" + +#: commadpt.c:415 +#, c-format +msgid "HHCCA300D %4.4x : Not enough separators (only %d found) in dial data\n" +msgstr "" + +#: commadpt.c:423 +#, c-format +msgid "HHCCA300D %4.4x : Destination TCP port %d exceeds maximum of 65535\n" +msgstr "" + +#: commadpt.c:554 +#, c-format +msgid "HHCCA002I %4.4X:Line Communication thread " +msgstr "" + +#: commadpt.c:554 +msgid " started\n" +msgstr "" + +#: commadpt.c:566 +#, c-format +msgid "HHCCA003E %4.4X:Cannot obtain socket for incoming calls : %s\n" +msgstr "" + +#: commadpt.c:592 +#, c-format +msgid "HHCCA004W %4.4X:Waiting 5 seconds for port %d to become available\n" +msgstr "" -#: ctc_lcs.c:1929 +#: commadpt.c:643 #, fuzzy, c-format -msgid "HHCLC037E Error reading file %s line %d: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgid "HHCCA018E %4.4X:Bind failed : %s\n" +msgstr "HHCCA018E %4.4X:Bind fout: %s\n" -#: ctc_lcs.c:1953 +#: commadpt.c:657 #, c-format -msgid "HHCLC038E File %s line %d is too long\n" +msgid "HHCCA005I %4.4X:Listening on port %d for incoming TCP connections\n" msgstr "" -#: dasdcat.c:34 +#: commadpt.c:695 #, c-format -msgid "HHCDT002E Can't make 80 column card images from block length %d\n" +msgid "HHCCA300D %4.4X:cthread - Entry - DevExec = %s\n" msgstr "" -#: dasdcat.c:117 -msgid "HHCDT003E Directory block byte count is invalid\n" +#: commadpt.c:760 +#, c-format +msgid "HHCCA300D %4.4X:Poll Command abort - Poll address >7 Bytes\n" msgstr "" -#: dasdcat.c:219 -msgid "HHCDT004E non-PDS-members not yet supported\n" +#: commadpt.c:788 +#, c-format +msgid "HHCCA300D %4.4X:Writing 1 byte in socket : %2.2X\n" +msgstr "" + +#: commadpt.c:963 +#, c-format +msgid "HHCCA300D %4.4X:cthread - Select IN maxfd = %d / Devexec = %s\n" +msgstr "" + +#: commadpt.c:969 +#, c-format +msgid "HHCCA300D %4.4X:cthread - Select OUT rc=%d\n" +msgstr "" + +#: commadpt.c:976 +#, c-format +msgid "HHCCA006T %4.4X:Select failed : %s\n" +msgstr "HHCCA006T %4.4X:Select fout: %s\n" + +#: commadpt.c:986 +#, c-format +msgid "HHCCA300D %4.4X:cthread - Select TIME OUT\n" +msgstr "" + +#: commadpt.c:1004 +#, c-format +msgid "HHCCA300D %4.4X:cthread - IPC Pipe closed\n" +msgstr "" + +#: commadpt.c:1012 +#, c-format +msgid "HHCCA300D %4.4X:cthread - IPC Pipe Data ; code = %d\n" +msgstr "" + +#: commadpt.c:1044 +#, c-format +msgid "HHCCA300D %4.4X:cthread - inbound socket data\n" +msgstr "" + +#: commadpt.c:1086 +#, c-format +msgid "HHCCA300D %4.4X:cthread - socket write available\n" +msgstr "" + +#: commadpt.c:1100 +#, c-format +msgid "HHCCA007W %4.4X:Outgoing call failed during %s command : %s\n" +msgstr "" + +#: commadpt.c:1130 +#, c-format +msgid "HHCCA008I %4.4X:cthread - Incoming Call\n" +msgstr "" + +#: commadpt.c:1191 +#, c-format +msgid "HHCCA009I %4.4X:BSC utility thread terminated\n" +msgstr "" + +#: commadpt.c:1242 +#, c-format +msgid "HHCCA013E %4.4X:Incorrect %s specification %s\n" +msgstr "HHCCA013E %4.4X:Incorrecte %s specifikatie %s\n" + +#: commadpt.c:1246 +#, c-format +msgid "HHCCA015E %4.4X:Missing parameter : DIAL=%s and %s not specified\n" +msgstr "" + +#: commadpt.c:1250 +#, c-format +msgid "HHCCA016W %4.4X:Conflicting parameter : DIAL=%s and %s=%s specified\n" +msgstr "" + +#: commadpt.c:1251 +#, c-format +msgid "HHCCA017I %4.4X:RPORT parameter ignored\n" +msgstr "" + +#: commadpt.c:1273 +#, c-format +msgid "HHCCA300D %4.4X:Initialisation starting\n" +msgstr "" + +#: commadpt.c:1283 +#, c-format +msgid "HHCCA010I %4.4X:initialisation not performed\n" +msgstr "" + +#: commadpt.c:1289 +#, c-format +msgid "HHCCA300D %4.4X:Initialisation : Control block allocated\n" +msgstr "" + +#: commadpt.c:1312 +#, c-format +msgid "HHCCA011E %4.4X:Error parsing %s\n" +msgstr "" + +#: commadpt.c:1318 +#, c-format +msgid "HHCCA012E %4.4X:Unrecognized parameter %s\n" +msgstr "" + +#: commadpt.c:1406 +#, c-format +msgid "" +"HHCCA014E %4.4X:Incorrect switched/dial specification %s; defaulting to " +"DIAL=OUT\n" +msgstr "" + +#: commadpt.c:1525 +#, c-format +msgid "HHCCA021I %4.4X:Initialisation failed due to previous errors\n" +msgstr "" + +#: commadpt.c:1579 +#, c-format +msgid "HHCCA019E %4.4x : BSC comm thread did not initialise\n" +msgstr "" + +#: commadpt.c:1621 +#, c-format +msgid "HHCCA300D %4.4X:Closing down\n" +msgstr "" + +#: commadpt.c:1654 +#, c-format +msgid "HHCCA300D %4.4X:Closed down\n" +msgstr "" + +#: commadpt.c:1683 +#, c-format +msgid "HHCCA300D %4.4X:CCW Exec - Entry code = %x\n" +msgstr "" + +#: commadpt.c:1794 +#, c-format +msgid "HHCCA300D %4.4X Set Mode : %s\n" +msgstr "" + +#: config.c:220 +#, c-format +msgid "HHCCF031S Cannot obtain %dMB main storage: %s\n" +msgstr "" + +#: config.c:229 +#, c-format +msgid "HHCCF032S Cannot obtain storage key array: %s\n" +msgstr "" + +#: config.c:256 +#, c-format +msgid "HHCCF033S Cannot obtain %dMB expanded storage: %s\n" +msgstr "" + +#: config.c:264 +msgid "HHCCF034W Expanded storage support not installed\n" +msgstr "" + +#: config.c:303 +#, c-format +msgid "HHCCF001S Error reading file %s line %d: %s\n" +msgstr "" + +#: config.c:326 +#, c-format +msgid "HHCCF002S File %s line %d is too long\n" +msgstr "" + +#: config.c:450 +#, c-format +msgid "" +"HHCCF053E Incorrect second device number in device range near character %c\n" +msgstr "" + +#: config.c:460 +#, c-format +msgid "HHCCF054E Incorrect Device count near character %c\n" +msgstr "" + +#: config.c:466 +#, c-format +msgid "HHCCF055E Incorrect device address specification near character %c\n" +msgstr "" + +#: config.c:473 +#, c-format +msgid "HHCCF056E Incorrect device address range. %4.4X < %4.4X\n" +msgstr "" + +#: config.c:495 +#, c-format +msgid "" +"HHCCF057E %4.4X is on wrong channel (1st device defined on channel %2.2X)\n" +msgstr "" + +#: config.c:524 +#, c-format +msgid "" +"HHCCF058E Some or all devices in %4.4X-%4.4X duplicate devices already " +"defined\n" +msgstr "" + +#: config.c:653 +#, c-format +msgid "HHCCF003S Cannot open file %s: %s\n" +msgstr "" + +#: config.c:716 +#, c-format +msgid "HHCCF004S No device records in file %s\n" +msgstr "" + +#: config.c:910 +#, c-format +msgid "" +"HHCCF061W Warning in %s line %d: ECPS:VM Statement deprecated. Use ECPSVM " +"instead\n" +msgstr "" + +#: config.c:934 +#, c-format +msgid "" +"HHCCF059S Error in %s line %d: Missing symbol name on DEFSYM statement\n" +msgstr "" + +#: config.c:941 +#, c-format +msgid "" +"HHCCF060S Error in %s line %d: DEFSYM requires a single symbol value " +"(include quotation marks if necessary)\n" +msgstr "" + +#: config.c:964 config.c:1014 +#, c-format +msgid "HHCCF007S Error in %s line %d: Missing argument.\n" +msgstr "" + +#: config.c:972 +#, c-format +msgid "HHCCF029S Error in %s line %d: Invalid HTTP port number %s\n" +msgstr "" + +#: config.c:983 +#, c-format +msgid "HHCCF005S Error in %s line %d: Unrecognized argument %s\n" +msgstr "" + +#: config.c:1001 +#, c-format +msgid "HHCCF006S Error in %s line %d: Userid, but no password given %s\n" +msgstr "" + +#: config.c:1036 +#, c-format +msgid "HHCCF008E Error in %s line %d: Unrecognized keyword %s\n" +msgstr "" + +#: config.c:1046 +#, c-format +msgid "HHCCF009E Error in %s line %d: Incorrect number of operands\n" +msgstr "" + +#: config.c:1076 +#, c-format +msgid "" +"HHCCF010S Error in %s line %d: Unknown or unsupported ARCHMODE specification " +"%s\n" +msgstr "" + +#: config.c:1094 +#, c-format +msgid "HHCCF012S Error in %s line %d: %s is not a valid CPU version code\n" +msgstr "" + +#: config.c:1108 +#, c-format +msgid "HHCCF051S Error in %s line %d: %s is not a valid serial number\n" +msgstr "" + +#: config.c:1121 +#, c-format +msgid "HHCCF012S Error in %s line %d: %s is not a valid CPU model\n" +msgstr "" + +#: config.c:1134 +#, c-format +msgid "HHCCF013S Error in %s line %d: Invalid main storage size %s\n" +msgstr "" + +#: config.c:1147 +#, c-format +msgid "HHCCF014S Error in %s line %d: Invalid expanded storage size %s\n" +msgstr "" + +#: config.c:1158 +#, c-format +msgid "" +"HHCCF016S Error in %s line %d: Invalid Hercules process group thread " +"priority %s\n" +msgstr "" + +#: config.c:1167 +msgid "" +"HHCCF017W Hercules is not running as setuid root, cannot raise Hercules " +"process group thread priority\n" +msgstr "" + +#: config.c:1179 +#, c-format +msgid "HHCCF016S Error in %s line %d: Invalid TOD Clock thread priority %s\n" +msgstr "" + +#: config.c:1188 +msgid "" +"HHCCF017W Hercules is not running as setuid root, cannot raise TOD Clock " +"thread priority\n" +msgstr "" + +#: config.c:1200 +#, c-format +msgid "HHCCF016S Error in %s line %d: Invalid CPU thread priority %s\n" +msgstr "" + +#: config.c:1209 +msgid "" +"HHCCF017W Hercules is not running as setuid root, cannot raise CPU priority\n" +msgstr "" + +#: config.c:1221 config.c:1239 +#, c-format +msgid "HHCCF016S Error in %s line %d: Invalid device thread priority %s\n" +msgstr "" + +#: config.c:1229 config.c:1247 +msgid "" +"HHCCF017W Hercules is not running as setuid root, cannot raise device thread " +"priority\n" +msgstr "" + +#: config.c:1259 +#, c-format +msgid "HHCCF018S Error in %s line %d: Invalid number of CPUs %s\n" +msgstr "" + +#: config.c:1273 +#, c-format +msgid "HHCCF019S Error in %s line %d: Invalid number of VFs %s\n" +msgstr "" + +#: config.c:1279 +msgid "HHCCF020W Vector Facility support not configured\n" +msgstr "" + +#: config.c:1288 +#, c-format +msgid "HHCCF021S Error in %s line %d: Load parameter %s exceeds 8 characters\n" +msgstr "" + +#: config.c:1310 +#, c-format +msgid "" +"HHCCF022S Error in %s line %d: %s is not a valid system epoch.\n" +"Patch config.c to expand the table\n" +msgstr "" + +#: config.c:1325 +#, c-format +msgid "HHCCF023S Error in %s line %d: %s is not a valid timezone offset\n" +msgstr "" + +#: config.c:1342 +#, c-format +msgid "HHCCF052S Error in %s line %d: %s: invalid argument\n" +msgstr "" + +#: config.c:1356 +#, c-format +msgid "HHCCF024S Error in %s line %d: Invalid TOD clock drag factor %s\n" +msgstr "" + +#: config.c:1380 +#, c-format +msgid "HHCCF025S Error in %s line %d: Invalid panel refresh rate %s\n" +msgstr "" + +#: config.c:1419 +#, c-format +msgid "HHCCF026S Error in %s line %d: Unknown OS tailor specification %s\n" +msgstr "" + +#: config.c:1432 +#, c-format +msgid "HHCCF027S Error in %s line %d: Invalid maximum device threads %s\n" +msgstr "" + +#: config.c:1457 +#, c-format +msgid "" +"HHCCF028S Error in %s line %d: Invalid program product OS permission %s\n" +msgstr "" + +#: config.c:1488 +#, c-format +msgid "" +"HHCCF062W Warning in %s line %d: Missing ECPSVM level value. 20 Assumed\n" +msgstr "" + +#: config.c:1497 +#, c-format +msgid "" +"HHCCF051W Warning in %s line %d: Invalid ECPSVM level value : %s. 20 " +"Assumed\n" +msgstr "" + +#: config.c:1509 +#, c-format +msgid "" +"HHCCF051W Error in %s line %d: Invalid ECPSVM keyword : %s. NO Assumed\n" +msgstr "" + +#: config.c:1518 +#, c-format +msgid "" +"HHCCF063W Warning in %s line %d: Specifying ECPSVM level directly is " +"deprecated. Use the 'LEVEL' keyword instead.\n" +msgstr "" + +#: config.c:1537 +#, c-format +msgid "HHCCF029S Error in %s line %d: Invalid SHRDPORT port number %s\n" +msgstr "" + +#: config.c:1551 +#, c-format +msgid "HHCCF030S Error in %s line %d: Invalid I/O delay value: %s\n" +msgstr "" + +#: config.c:1571 +#, fuzzy, c-format +msgid "HHCCF064W Hercules set priority %d failed: %s\n" +msgstr "HHCCP002I CPU%4.4X thread al gestart\n" + +#: config.c:1578 +msgid "HHCCF065I Hercules: tid=" +msgstr "" + +#: config.c:1578 +#, c-format +msgid ", pid=%d, pgid=%d, priority=%d\n" +msgstr "" + +#: config.c:1769 +#, c-format +msgid "HHCCF035S Error in %s line %d: Missing device number or device type\n" +msgstr "" + +#: config.c:1779 +#, c-format +msgid "" +"HHCCF036S Error in %s line %d: %s is not a valid device number(s) " +"specification\n" +msgstr "" + +#: config.c:1847 +msgid "" +"\n" +"HHCCF039W PGMPRDOS LICENSED specified.\n" +" Licensed program product operating systems are enabled.\n" +" You are responsible for meeting all conditions of your\n" +" software license.\n" +"\n" +msgstr "" + +#: config.c:1934 +#, c-format +msgid "HHCCF040E Cannot create CPU%4.4X thread: %s\n" +msgstr "" + +#: config.c:2050 +#, fuzzy +msgid "HHCCF043E Cannot obtain device block\n" +msgstr "HHCLC039E Fout %2$s bij openen bestand \"%1$s\"\n" + +#: config.c:2144 +#, c-format +msgid "HHCCF041E Device %4.4X already exists\n" +msgstr "" + +#: config.c:2153 +#, c-format +msgid "HHCCF042E Device type %s not recognized\n" +msgstr "" + +#: config.c:2167 +#, c-format +msgid "HHCCF044E Initialization failed for device %4.4X\n" +msgstr "" + +#: config.c:2183 +#, c-format +msgid "HHCCF045E Cannot obtain buffer for device %4.4X: %s\n" +msgstr "" + +#: config.c:2217 +#, c-format +msgid "HHCCF046E Device %4.4X does not exist\n" +msgstr "" + +#: config.c:2243 +#, c-format +msgid "HHCCF047I Device %4.4X detached\n" +msgstr "" + +#: config.c:2261 +#, c-format +msgid "HHCCF048E Device %4.4X does not exist\n" +msgstr "" + +#: config.c:2268 +#, c-format +msgid "HHCCF049E Device %4.4X already exists\n" +msgstr "" + +#: console.c:288 +#, c-format +msgid "HHCGI001I Unable to determine IP address from %s\n" +msgstr "" + +#: console.c:309 +#, c-format +msgid "HHCGI002I Unable to determine port number from %s\n" +msgstr "" + +#: console.c:323 +#, fuzzy, c-format +msgid "HHCGI003E Invalid parameter: %s\n" +msgstr "HHCGI003E Optie %s niet geldig\n" + +#: console.c:780 +#, c-format +msgid "HHCTE007I Device %4.4X connection closed by client %s\n" +msgstr "" + +#: console.c:943 +#, c-format +msgid "HHCTE008I Device %4.4X connection closed by client %s\n" +msgstr "" + +#: console.c:1244 +#, c-format +msgid "HHCTE009I Client %s connected to %4.4X device %4.4X\n" +msgstr "" + +#: console.c:1310 +#, fuzzy +msgid "HHCTE001I Console connection thread started: tid=" +msgstr "HHCTE001I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" + +#: console.c:1334 +#, fuzzy, c-format +msgid "HHCTE010E CNSLPORT statement invalid: %s\n" +msgstr "HHCTE010E CNSLPORT statement %s niet geldig\n" + +#: console.c:1346 +#, c-format +msgid "HHCTE002W Waiting for port %u to become free\n" +msgstr "" + +#: console.c:1366 +#, c-format +msgid "HHCTE003I Waiting for console connection on port %u\n" +msgstr "" + +#: console.c:1544 +#, fuzzy +msgid "HHCTE004I Console connection thread terminated\n" +msgstr "HHCTE004I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" + +#: console.c:1559 +#, c-format +msgid "HHCTE005E Cannot create console thread: %s\n" +msgstr "" + +#: console.c:1577 +msgid "console_remove() error\n" +msgstr "" + +#: console.c:2432 +#, c-format +msgid "HHCTE006A Enter input for console device %4.4X%c\n" +msgstr "" + +#: cpu.c:247 +msgid "HHCCP043I Wait state PSW loaded: " +msgstr "" + +#: cpu.c:389 +#, c-format +msgid "program_int() passing to guest code=%4.4X\n" +msgstr "" + +#: cpu.c:477 +msgid "HHCCP014I " +msgstr "" + +#: cpu.c:480 hscmisc.c:697 +msgid "SIE: " +msgstr "" + +#: cpu.c:485 +#, c-format +msgid "CPU%4.4X: %s CODE=%4.4X ILC=%d\n" +msgstr "" + +#: cpu.c:587 +#, c-format +msgid "HHCCP015I CPU%4.4X PER event: code=%4.4X perc=%2.2X addr=" +msgstr "" + +#: cpu.c:588 ecpsvm.c:359 ecpsvm.c:1138 ecpsvm.c:1143 sie.c:120 sie.c:231 +#: stack.c:593 stack.c:616 stack.c:678 stack.c:696 stack.c:704 stack.c:728 +#: stack.c:751 stack.c:804 stack.c:882 stack.c:916 stack.c:944 stack.c:956 +#: stack.c:967 stack.c:1021 stack.c:1045 stack.c:1277 stack.c:1303 +#: stack.c:1311 stack.c:1348 stack.c:1443 stack.c:1479 stack.c:1532 +msgid "\n" +msgstr "" + +#: cpu.c:750 +#, c-format +msgid "HHCCP016I CPU%4.4X: Program interrupt loop: " +msgstr "" + +#: cpu.c:858 +#, c-format +msgid "" +"HHCCP044I I/O interrupt code=%4.4X CSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%" +"2.2X\n" +msgstr "" + +#: cpu.c:880 +#, c-format +msgid "HHCCP045I I/O interrupt code=%8.8X parm=%8.8X\n" +msgstr "" + +#: cpu.c:883 +#, c-format +msgid "HHCCP046I I/O interrupt code=%8.8X parm=%8.8X id=%8.8X\n" +msgstr "" + +#: cpu.c:949 +#, c-format +msgid "HHCCP022I Machine Check code=%16.16llu\n" +msgstr "" + +#: cpu.c:1005 +#, fuzzy, c-format +msgid "HHCCP001W CPU thread set priority %d failed: %s\n" +msgstr "HHCCP002I CPU%4.4X thread al gestart\n" + +#: cpu.c:1012 +#, fuzzy, c-format +msgid "HHCCP002I CPU%4.4X thread started: tid=" +msgstr "HHCCP002I CPU%4.4X thread al gestart\n" + +#: cpu.c:1012 timer.c:315 +#, c-format +msgid ", pid=%d, priority=%d\n" +msgstr "" + +#: cpu.c:1017 +#, fuzzy, c-format +msgid "HHCCP003I CPU%4.4X architecture mode %s\n" +msgstr "HHCCP003I CPU%4.4X Architectuur Modus %s\n" + +#: cpu.c:1022 +#, fuzzy, c-format +msgid "HHCCP004I CPU%4.4X Vector Facility online\n" +msgstr "HHCCP003I CPU%4.4X Architectuur Modus %s\n" + +#: cpu.c:1033 +#, fuzzy, c-format +msgid "HHCCP005E CPU%4.4X thread already started\n" +msgstr "HHCCP005E CPU%4.4X thread al gestart\n" + +#: cpu.c:1047 +#, fuzzy, c-format +msgid "HHCCP006S Cannot create timer thread: %s\n" +msgstr "HHCPN119E Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: cpu.c:1074 +#, fuzzy, c-format +msgid "HHCCP007I CPU%4.4X architecture mode set to %s\n" +msgstr "HHCCP007I CPU%4.4X Architectuur Modus %s\n" + +#: cpu.c:1085 +#, fuzzy, c-format +msgid "HHCCP008I CPU%4.4X thread ended: tid=" +msgstr "HHCCP008I CPU%4.4X thread geeindigd: tid=%8.8lX, pid=%d\n" + +#: cpu.c:1113 +#, c-format +msgid "HHCCP009E CPU MASK MISMATCH: %8.8X - %8.8X. Last instruction:\n" +msgstr "" + +#: cpu.c:1216 +#, c-format +msgid "HHCCP010I CPU%4.4X store status completed.\n" +msgstr "" + +#: cpu.c:1280 +#, c-format +msgid "" +"HHCCP011I CPU%4.4X: Disabled wait state\n" +" " +msgstr "" + +#: cpu.c:1522 +#, c-format +msgid "PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X\n" +msgstr "" + +#: cpu.c:1529 +#, c-format +msgid "" +"PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X%2.2X%2.2X%" +"2.2X%2.2X\n" +msgstr "" + +#: ctc_ctci.c:78 +#, c-format +msgid "HHCCT037E %4.4X: Unable to allocate CTCBLK\n" +msgstr "" + +#: ctc_ctci.c:100 +#, c-format +msgid "HHCCT038E %4.4X: Unable to allocate CTCBLK\n" +msgstr "" + +#: ctc_ctci.c:148 +#, c-format +msgid "HHCCT039E %4.4X: Unable to allocate CTCBLK\n" +msgstr "" + +#: ctc_ctci.c:557 +#, c-format +msgid "HHCCT040I %4.4X: Halt or Clear Recognized\n" +msgstr "" + +#: ctc_ctci.c:606 +#, c-format +msgid "HHCCT041I %4.4X: CTC Received Frame (%d bytes):\n" +msgstr "" + +#: ctc_ctci.c:644 +#, c-format +msgid "HHCCT042E %4.4X Write CCW count %u is invalid\n" +msgstr "" + +#: ctc_ctci.c:673 +#, c-format +msgid "HHCCT043I %4.4X: Interface command: %s %8.8X\n" +msgstr "" + +#: ctc_ctci.c:700 ctcadpt.c:686 +#, c-format +msgid "CTC101W %4.4X: Write buffer contains invalid frame offset %u\n" +msgstr "" + +#: ctc_ctci.c:722 +#, c-format +msgid "" +"HHCCT044E %4.4X: Write buffer contains incomplete segment header at offset %" +"4.4X\n" +msgstr "" + +#: ctc_ctci.c:742 +#, c-format +msgid "" +"HHCCT045E %4.4X: Write buffer contains invalid segment length %u at offset %" +"4.4X\n" +msgstr "" + +#: ctc_ctci.c:757 +#, c-format +msgid "HHCCT046I %4.4X: Sending packet to %s:\n" +msgstr "" + +#: ctc_ctci.c:767 +#, c-format +msgid "HHCCT047E %4.4X: Error writing to %s: %s\n" +msgstr "" + +#: ctc_ctci.c:829 +#, c-format +msgid "HHCCT048E %4.4X: Error reading from %s: %s\n" +msgstr "" + +#: ctc_ctci.c:851 +#, c-format +msgid "HHCCT049I %4.4X: Received packet from %s (%d bytes):\n" +msgstr "" + +#: ctc_ctci.c:972 ctc_ctci.c:1145 +#, c-format +msgid "HHCCT056E %4.4X: Incorrect number of parameters\n" +msgstr "" + +#: ctc_ctci.c:1047 +#, c-format +msgid "HHCCT050E %4.4X: Invalid adapter address %s\n" +msgstr "" + +#: ctc_ctci.c:1056 +#, fuzzy, c-format +msgid "HHCCT051E %4.4X: Invalid device name %s\n" +msgstr "HHCPN015E Ongeldig apparaat nummer\n" + +#: ctc_ctci.c:1069 +#, c-format +msgid "HHCCT052E %4.4X: Invalid kernel buffer size %s\n" +msgstr "" + +#: ctc_ctci.c:1083 +#, c-format +msgid "HHCCT053E %4.4X: Invalid DLL I/O buffer size %s\n" +msgstr "" + +#: ctc_ctci.c:1096 +#, c-format +msgid "HHCCT054E %4.4X: Invalid MTU size %s\n" +msgstr "" + +#: ctc_ctci.c:1107 +#, c-format +msgid "HHCCT055E %4.4X: Invalid netmask %s\n" +msgstr "" + +#: ctc_ctci.c:1118 +#, c-format +msgid "HHCCT056E %4.4X: Invalid MAC address %s\n" +msgstr "" + +#: ctc_ctci.c:1155 +#, c-format +msgid "HHCCT057E %4.4X: Incorrect number of parameters\n" +msgstr "" + +#: ctc_ctci.c:1163 +#, c-format +msgid "HHCCT058E %4.4X: Invalid IP address %s\n" +msgstr "" + +#: ctc_ctci.c:1175 +#, c-format +msgid "HHCCT059E %4.4X: Invalid IP address %s\n" +msgstr "" + +#: ctc_ctci.c:1191 +#, fuzzy, c-format +msgid "HHCCT060E %4.4X: Incorrect number of parameters\n" +msgstr "HHCCA013E %4.4X:Incorrecte %s specifikatie %s\n" + +#: ctc_ctci.c:1200 +#, fuzzy, c-format +msgid "HHCCT061E %4.4X invalid device name %s\n" +msgstr "HHCPN015E Ongeldig apparaat nummer\n" + +#: ctc_ctci.c:1214 +#, fuzzy, c-format +msgid "HHCCT062E %4.4X: Invalid MTU size %s\n" +msgstr "HHCCA018E %4.4X:Bind fout: %s\n" + +#: ctc_ctci.c:1225 +#, fuzzy, c-format +msgid "HHCCT063E %4.4X: Invalid IP address %s\n" +msgstr "HHCPN130E Ongeldig frame adres %8.8X\n" + +#: ctc_ctci.c:1237 +#, fuzzy, c-format +msgid "HHCCT064E %4.4X: Invalid IP address %s\n" +msgstr "HHCPN130E Ongeldig frame adres %8.8X\n" + +#: ctc_ctci.c:1249 +#, fuzzy, c-format +msgid "HHCCT065E %4.4X: Invalid netmask %s\n" +msgstr "HHCCA018E %4.4X:Bind fout: %s\n" + +#: ctc_ctci.c:1260 +#, fuzzy, c-format +msgid "HHCCT066E %4.4X: Incorrect number of parameters\n" +msgstr "HHCCA013E %4.4X:Incorrecte %s specifikatie %s\n" + +#: ctc_ctci.c:1278 +#, c-format +msgid "HHCCT067E %4.4X: Invalid IP address %s\n" +msgstr "" + +#: ctc_ctci.c:1293 +#, c-format +msgid "HHCCT068E %4.4X: Invalid MAC address %s\n" +msgstr "" + +#: ctc_ctci.c:1325 +#, c-format +msgid "HHCCT069E %4.4X: Invalid kernel buffer size %s\n" +msgstr "" + +#: ctc_ctci.c:1342 +#, c-format +msgid "HHCCT070E %4.4X: Invalid DLL I/O buffer size %s\n" +msgstr "" + +#: ctc_ctci.c:1353 +#, c-format +msgid "HHCCT071E %4.4X: Incorrect number of parameters\n" +msgstr "" + +#: ctc_lcs.c:71 +#, c-format +msgid "HHCLC001E %4.4X unable to allocate LCSBLK\n" +msgstr "" + +#: ctc_lcs.c:151 +#, c-format +msgid "HHCLC040E %4.4X AddDevice failed for LCSDEV %4.4X\n" +msgstr "" + +#: ctc_lcs.c:640 +#, c-format +msgid "HHCLC002I %4.4X: Halt or Clear Recognized\n" +msgstr "" + +#: ctc_lcs.c:683 +#, c-format +msgid "HHCLC003I %4.4X: LCS Read Buffer:\n" +msgstr "" + +#: ctc_lcs.c:787 +#, c-format +msgid "HHCLC004I %4.4X: Sending packet to %s:\n" +msgstr "" + +#: ctc_lcs.c:796 +#, c-format +msgid "HHCLC005E %4.4X: Error writing to %s: %s\n" +msgstr "" + +#: ctc_lcs.c:815 +#, c-format +msgid "HHCLC006I %4.4X Triggering Event.\n" +msgstr "" + +#: ctc_lcs.c:1105 +#, c-format +msgid "HHCLC007E Error in call to socket: %s.\n" +msgstr "" + +#: ctc_lcs.c:1118 +#, c-format +msgid "HHCLC008E ioctl error on device %s: %s.\n" +msgstr "" + +#: ctc_lcs.c:1191 +#, c-format +msgid "HHCLC009I Port %2.2X: Read Buffer:\n" +msgstr "" + +#: ctc_lcs.c:1220 +#, c-format +msgid "HHCLC010I Port %2.2X: IPV4 frame for %8.8X\n" +msgstr "" + +#: ctc_lcs.c:1247 +#, c-format +msgid "HHCLC011I Port %2.2X: ARP frame for %8.8X\n" +msgstr "" + +#: ctc_lcs.c:1271 +#, c-format +msgid "HHCLC012I Port %2.2X: SNA frame\n" +msgstr "" + +#: ctc_lcs.c:1301 +#, c-format +msgid "HHCLC013I Port %2.2X: No match found - selecting primary %4.4X\n" +msgstr "" + +#: ctc_lcs.c:1311 +#, c-format +msgid "HHCLC014I Port %2.2X: No match found - selecting secondary %4.4X\n" +msgstr "" + +#: ctc_lcs.c:1322 +#, c-format +msgid "HHCLC015I Port %2.2X: No match found - Discarding frame\n" +msgstr "" + +#: ctc_lcs.c:1330 +#, c-format +msgid "HHCLC016I Port %2.2X: Enqueing frame to device %4.4X (%8.8X)\n" +msgstr "" + +#: ctc_lcs.c:1546 +#, c-format +msgid "HHCLC017E %4.4X invalid device name %s\n" +msgstr "" + +#: ctc_lcs.c:1562 +#, c-format +msgid "HHCLC018E %4.4X invalid MAC address %s\n" +msgstr "" + +#: ctc_lcs.c:1586 +#, c-format +msgid "HHCLC019E %4.4X too many arguments in statement.\n" +msgstr "" + +#: ctc_lcs.c:1596 +#, c-format +msgid "HHCLC020E %4.4X invalid IP address %s\n" +msgstr "" + +#: ctc_lcs.c:1643 +#, fuzzy, c-format +msgid "HHCLC039E Cannot open file %s: %s\n" +msgstr "HHCLC039E Fout %2$s bij openen bestand \"%1$s\"\n" + +#: ctc_lcs.c:1692 +#, c-format +msgid "HHCLC021E Invalid HWADD statement in %s: %s\n" +msgstr "" + +#: ctc_lcs.c:1701 +#, c-format +msgid "" +"HHCLC022E Invalid MAC in HWADD statement in %s: %s (%s)\n" +" " +msgstr "" + +#: ctc_lcs.c:1718 +#, c-format +msgid "HHCLC023E Invalid ROUTE statement in %s: %s\n" +msgstr "" + +#: ctc_lcs.c:1725 +#, c-format +msgid "HHCLC024E Invalid net address in ROUTE %s: %s (%s)\n" +msgstr "" + +#: ctc_lcs.c:1734 +#, c-format +msgid "HHCLC025E Invalid net mask in ROUTE %s: %s (%s)\n" +msgstr "" + +#: ctc_lcs.c:1766 +#, c-format +msgid "HHCLC026E Error in %s: Missing device number or mode\n" +msgstr "" + +#: ctc_lcs.c:1775 +#, c-format +msgid "HHCLC027E Error in %s: %s: Invalid device number\n" +msgstr "" + +#: ctc_lcs.c:1787 +#, c-format +msgid "HHCLC028E Error in %s: %s:Missing PORT number\n" +msgstr "" + +#: ctc_lcs.c:1795 +#, c-format +msgid "HHCLC029E Error in %s: %s: Invalid PORT number\n" +msgstr "" + +#: ctc_lcs.c:1805 +#, c-format +msgid "HHCLC030E Error in %s: %s: Invalid number of arguments\n" +msgstr "" + +#: ctc_lcs.c:1819 +#, c-format +msgid "HHCLC031E Error in %s: %s: Invalid entry starting at %s\n" +msgstr "" + +#: ctc_lcs.c:1829 +#, c-format +msgid "HHCLC032E Error is %s: %s: Invalid IP address (%s)\n" +msgstr "" + +#: ctc_lcs.c:1844 +#, c-format +msgid "HHCLC033E Error in %s: %s: Missing PORT number\n" +msgstr "" + +#: ctc_lcs.c:1852 +#, c-format +msgid "HHCLC034E Error in %s: %s:Invalid PORT number\n" +msgstr "" + +#: ctc_lcs.c:1860 +#, c-format +msgid "HHCLC035E Error in %s: %s: SNA does not accept any arguments\n" +msgstr "" + +#: ctc_lcs.c:1868 +#, c-format +msgid "HHCLC036E Error in %s: %s: Invalid MODE\n" +msgstr "" + +#: ctc_lcs.c:1928 +#, c-format +msgid "HHCLC037E Error reading file %s line %d: %s\n" +msgstr "" + +#: ctc_lcs.c:1952 +#, c-format +msgid "HHCLC038E File %s line %d is too long\n" +msgstr "" + +#: ctcadpt.c:113 +#, c-format +msgid "HHCCT001E %4.4X: Incorrect number of parameters\n" +msgstr "" + +#: ctcadpt.c:428 +#, c-format +msgid "HHCCT002E %4.4X: Incorrect number of parameters\n" +msgstr "" + +#: ctcadpt.c:440 +#, c-format +msgid "HHCCT003E %4.4X: Invalid port number: %s\n" +msgstr "" + +#: ctcadpt.c:461 +#, c-format +msgid "HHCCT004E %4.4X: Invalid IP address %s\n" +msgstr "" + +#: ctcadpt.c:474 +#, c-format +msgid "HHCCT005E %4.4X: Invalid port number: %s\n" +msgstr "" + +#: ctcadpt.c:486 +#, c-format +msgid "HHCCT006E %4.4X: Invalid MTU size %s\n" +msgstr "" + +#: ctcadpt.c:507 +#, c-format +msgid "HHCCT007E %4.4X: Error creating socket: %s\n" +msgstr "" + +#: ctcadpt.c:527 +#, c-format +msgid "HHCCT008E %4.4X: Error binding to socket: %s\n" +msgstr "" + +#: ctcadpt.c:548 +#, c-format +msgid "HHCCT009I %4.4X: Connect to %s:%s failed, starting server\n" +msgstr "" + +#: ctcadpt.c:558 +#, c-format +msgid "HHCCT010E %4.4X: Error creating socket: %s\n" +msgstr "" + +#: ctcadpt.c:575 +#, c-format +msgid "HHCCT011E %4.4X: Error binding to socket: %s\n" +msgstr "" + +#: ctcadpt.c:583 +#, c-format +msgid "HHCCT012E %4.4X: Error on call to listen: %s\n" +msgstr "" + +#: ctcadpt.c:597 +#, c-format +msgid "HHCCT013I %4.4X: Connected to %s:%s\n" +msgstr "" + +#: ctcadpt.c:631 +#, c-format +msgid "HHCCT014E %4.4X Write CCW count %u is invalid\n" +msgstr "" + +#: ctcadpt.c:661 +#, c-format +msgid "HHCCT015I %4.4X: Interface command: %s %8.8X\n" +msgstr "" + +#: ctcadpt.c:707 +#, c-format +msgid "" +"HHCCT016E %4.4X: Write buffer contains incomplete segment header at offset %" +"4.4X\n" +msgstr "" + +#: ctcadpt.c:727 +#, c-format +msgid "" +"HHCCT017E %4.4X: Write buffer contains invalid segment length %u at offset %" +"4.4X\n" +msgstr "" + +#: ctcadpt.c:742 +#, c-format +msgid "HHCCT018I %4.4X: Sending packet to %s:\n" +msgstr "" + +#: ctcadpt.c:753 +#, c-format +msgid "HHCCT019E %4.4X: Error writing to %s: %s\n" +msgstr "" + +#: ctcadpt.c:816 +#, c-format +msgid "HHCCT020E %4.4X: Error reading from %s: %s\n" +msgstr "" + +#: ctcadpt.c:833 +#, c-format +msgid "HHCCT021E %4.4X: Error reading from %s: %s\n" +msgstr "" + +#: ctcadpt.c:843 +#, c-format +msgid "HHCCT022I %4.4X: Received packet from %s (%d bytes):\n" +msgstr "" + +#: ctcadpt.c:925 +#, c-format +msgid "" +"HHCCT023E %4.4X: Incorrect client or config error\n" +" Config=%s, connecting client=%s\n" +msgstr "" + +#: ctcadpt.c:969 +#, c-format +msgid "HHCCT024E %4.4X: Not enough arguments to start vmnet\n" +msgstr "" + +#: ctcadpt.c:979 +#, c-format +msgid "HHCCT025E %4.4X: Failed: socketpair: %s\n" +msgstr "" + +#: ctcadpt.c:987 +#, c-format +msgid "HHCCT026E %4.4X: Failed: fork: %s\n" +msgstr "" + +#: ctcadpt.c:1037 +#, c-format +msgid "HHCCT027E %4.4X: Not enough parameters\n" +msgstr "" + +#: ctcadpt.c:1042 +#, c-format +msgid "HHCCT028E %4.4X: Bad device number '%s'\n" +msgstr "" + +#: ctcadpt.c:1079 +#, c-format +msgid "HHCCT029E %4.4X: bad block length: %d < %d\n" +msgstr "" + +#: ctcadpt.c:1089 +#, c-format +msgid "HHCCT030E %4.4X: bad packet length: %d < %d\n" +msgstr "" + +#: ctcadpt.c:1094 +#, c-format +msgid "HHCCT031E %4.4X: bad packet length: %d < 6\n" +msgstr "" + +#: ctcadpt.c:1140 +#, c-format +msgid "HHCCT032E %4.4X: Error: EOF on read, CTC network down\n" +msgstr "" + +#: ctcadpt.c:1148 +#, c-format +msgid "HHCCT033E %4.4X: Error: read: %s\n" +msgstr "" + +#: ctcadpt.c:1301 +#, c-format +msgid "HHCCT034E device %4.4X already exists\n" +msgstr "" + +#: dasdcat.c:36 +#, c-format +msgid "HHCDT002E Can't make 80 column card images from block length %d\n" +msgstr "" + +#: dasdcat.c:109 +msgid "HHCDT003E Directory block byte count is invalid\n" +msgstr "" + +#: dasdcat.c:211 +msgid "HHCDT004E non-PDS-members not yet supported\n" +msgstr "" + +#: dasdcat.c:241 +#, c-format +msgid "HHCDT005E unknown dataset name option: '%c'\n" +msgstr "" + +#: dasdcat.c:336 +#, c-format +msgid "HHCDT001E failed to open image %s\n" +msgstr "" + +#: dasdcopy.c:108 +#, c-format +msgid "Hercules %s copy program " +msgstr "" + +#: dasdcopy.c:192 +#, fuzzy, c-format +msgid "HHCDC001E %s: %s open error: %s\n" +msgstr "HHCDC001E %1$s:Fout %3$s bij openen bestand \"%2$s\"\n" + +#: dasdcopy.c:199 +#, fuzzy, c-format +msgid "HHCDC002E %s: %s read error: %s\n" +msgstr "HHCDC002E %$1s:Leesfout %3$s op bestand \"%2$s\"\n" + +#: dasdcopy.c:262 +#, fuzzy, c-format +msgid "HHCDC003E %s: %s open failed\n" +msgstr "HHCDC003E Fout %2$s bij openen van bestand \"%1$s\"\n" + +#: dasdcopy.c:275 +#, c-format +msgid "HHCDC004E %s: ckd lookup failed for %4.4X cyls %d\n" +msgstr "" + +#: dasdcopy.c:295 +#, c-format +msgid "HHCDC005E %s: fba lookup failed, blks %d\n" +msgstr "" + +#: dasdcopy.c:316 +#, c-format +msgid "HHCDC006E %s: %s create failed\n" +msgstr "" + +#: dasdcopy.c:328 +#, fuzzy, c-format +msgid "HHCDC007E %s: %s open failed\n" +msgstr "HHCDC007E %$1s: Fout %3$s bij openen van bestand \"%2$s\"\n" + +#: dasdcopy.c:341 +#, c-format +msgid " %3d%% %7d of %d" +msgstr "" + +#: dasdcopy.c:361 +#, c-format +msgid "HHCDC008E %s: %s read error %s %d stat=%2.2X\n" +msgstr "" + +#: dasdcopy.c:392 +#, c-format +msgid "HHCDC009E %s: %s write error %s %d stat=%2.2X\n" +msgstr "" + +#: dasdcopy.c:403 +msgid "" +"\n" +"HHCDC010I Copy successful !!! \n" +msgstr "" +"\n" +"HHCDC010I Kopie Suksesvol !!! \n" + +#: dasdcopy.c:444 +#, c-format +msgid "" +"usage: ckd2cckd [-options] ifile ofile\n" +"\n" +" copy a ckd dasd file to a compressed ckd dasd file\n" +"\n" +" ifile -- input ckd dasd file\n" +" ofile -- output compressed ckd dasd file\n" +"\n" +" options:\n" +" -v display program version and quit\n" +" -h display this help and quit\n" +" -q quiet mode, don't display status\n" +" -r replace the output file if it exists\n" +"%s%s -0 don't compress track images\n" +" -cyls n size of output file\n" +" -a output file will have alt cyls\n" +msgstr "" + +#: dasdcopy.c:464 dasdcopy.c:518 dasdcopy.c:578 +msgid " -z compress using zlib [default]\n" +msgstr "" + +#: dasdcopy.c:471 dasdcopy.c:525 +msgid " -bz2 compress using bzip2\n" +msgstr "" + +#: dasdcopy.c:479 +msgid "" +"usage: cckd2ckd [-options] ifile [sf=sfile] ofile\n" +"\n" +" copy a compressed ckd file to a ckd file\n" +"\n" +" ifile -- input compressed ckd dasd file\n" +" sfile -- input compressed ckd shadow file\n" +" (optional)\n" +" ofile -- output ckd dasd file\n" +"\n" +" options:\n" +" -v display program version and quit\n" +" -h display this help and quit\n" +" -q quiet mode, don't display status\n" +" -r replace the output file if it exists\n" +" -lfs create single large output file\n" +" -cyls n size of output file\n" +" -a output file will have alt cyls\n" +msgstr "" + +#: dasdcopy.c:499 +#, c-format +msgid "" +"usage: fba2cfba [-options] ifile ofile\n" +"\n" +" copy a fba dasd file to a compressed fba dasd file\n" +"\n" +" ifile -- input fba dasd file\n" +" ofile -- output compressed fba dasd file\n" +"\n" +" options:\n" +" -v display program version and quit\n" +" -h display this help and quit\n" +" -q quiet mode, don't display status\n" +" -r replace the output file if it exists\n" +"%s%s -0 don't compress track images\n" +" -blks n size of output file\n" +msgstr "" + +#: dasdcopy.c:533 +msgid "" +"usage: cfba2fba [-options] ifile [sf=sfile] ofile\n" +"\n" +" copy a compressed fba file to a fba file\n" +"\n" +" ifile -- input compressed fba dasd file\n" +" sfile -- input compressed fba shadow file\n" +" (optional)\n" +" ofile -- output fba dasd file\n" +"\n" +" options:\n" +" -v display program version and quit\n" +" -h display this help and quit\n" +" -q quiet mode, don't display status\n" +" -r replace the output file if it exists\n" +" -lfs create single large output file\n" +" -blks n size of output file\n" +msgstr "" + +#: dasdcopy.c:552 +#, c-format +msgid "" +"usage: %s [-options] ifile [sf=sfile] ofile\n" +"\n" +" copy a dasd file to another dasd file\n" +"\n" +" ifile -- input dasd file\n" +" sfile -- input shadow file [optional]\n" +" ofile -- output dasd file\n" +"\n" +" options:\n" +" -v display program version and quit\n" +" -h display this help and quit\n" +" -q quiet mode, don't display status\n" +" -r replace the output file if it exists\n" +"%s%s -0 don't compress output\n" +" -blks n size of output fba file\n" +" -cyls n size of output ckd file\n" +" -a output ckd file will have alt cyls\n" +" -lfs output ckd file will be a single file\n" +" even if it exceeds 2G in size\n" +" -o type output file type (CKD, CCKD, FBA, CFBA)\n" +msgstr "" + +#: dasdcopy.c:585 +msgid " -bz2 compress output using bzip2\n" +msgstr "" + +#: dasdinit.c:261 +msgid "HHCDI001I DASD initialization successfully completed.\n" +msgstr "" + +#: dasdisup.c:246 +msgid "HHCDS003E Directory block byte count is invalid\n" +msgstr "" + +#: dasdisup.c:291 +#, c-format +msgid "HHCDS018I %s %s skipped\n" +msgstr "" + +#: dasdisup.c:304 +msgid "HHCDS004E Number of members exceeds MAX_MEMBERS\n" +msgstr "" + +#: dasdisup.c:313 +#, c-format +msgid "HHCDS005E Member %s TTR count is zero\n" +msgstr "" + +#: dasdisup.c:342 +#, c-format +msgid "HHCDS006W Member %s is not single text record\n" +msgstr "" + +#: dasdisup.c:351 +#, c-format +msgid "HHCDS007W Member %s size %4.4X exceeds X'7F8' bytes\n" +msgstr "" + +#: dasdisup.c:360 +#, c-format +msgid "HHCDS008W Member %s size %4.4X is not a multiple of 8\n" +msgstr "" + +#: dasdisup.c:414 +#, c-format +msgid "HHCDS009I Alias %s skipped\n" +msgstr "" + +#: dasdisup.c:421 +#, c-format +msgid "HHCDS010I Member %s skipped\n" +msgstr "" + +#: dasdisup.c:429 +#, c-format +msgid "HHCDS011E Member %s has multiple text records\n" +msgstr "" + +#: dasdisup.c:441 +#, c-format +msgid "HHCDS012E Member %s has invalid TTR %4.4X%2.2X\n" +msgstr "" + +#: dasdisup.c:447 +#, c-format +msgid "" +"HHCDS013I Processing member %s text record TTR=%4.4X%2.2X CCHHR=%4.4X%4.4X%" +"2.2X\n" +msgstr "" + +#: dasdisup.c:457 +#, c-format +msgid "HHCDS014E Member %s error reading TTR %4.4X%2.2X\n" +msgstr "" + +#: dasdisup.c:466 +#, c-format +msgid "" +"HHCDS015E Member %s TTR %4.4X%2.2X text record length %4.4X is not valid\n" +msgstr "" + +#: dasdisup.c:476 +#, c-format +msgid "" +"HHCDS016E Member %s TTR %4.4X%2.2X text record length %4.4X does not match " +"length %4.4X in directory\n" +msgstr "" + +#: dasdisup.c:521 +#, c-format +msgid "HHCDS017E Member %s TTR %4.4X%2.2X XCTL table improperly terminated\n" +msgstr "" + +#: dasdisup.c:543 +#, c-format +msgid "HHCDS019I In member %s: %s TTRL=%2.2X%2.2X%2.2X%2.2X" +msgstr "" + +#: dasdisup.c:659 +#, c-format +msgid "HHCDS001E Cannot obtain storage for member array: %s\n" +msgstr "" + +#: dasdisup.c:711 +#, c-format +msgid "HHCDS002I End of directory: %d members selected\n" +msgstr "" + +#: dasdutil.c:206 +#, c-format +msgid "HHCDU001I Updating cyl %d head %d\n" +msgstr "" + +#: dasdutil.c:212 +#, c-format +msgid "HHCDU002E %s write track error: stat=%2.2X\n" +msgstr "" + +#: dasdutil.c:219 +#, c-format +msgid "HHCDU003I Reading cyl %d head %d\n" +msgstr "" + +#: dasdutil.c:225 +#, c-format +msgid "HHCDU004E %s read track error: stat=%2.2X\n" +msgstr "" + +#: dasdutil.c:346 +#, c-format +msgid "HHCDU005I Searching extent %d begin (%d,%d) end (%d,%d)\n" +msgstr "" + +#: dasdutil.c:418 +#, c-format +msgid "HHCDU006I Searching extent %d begin (%d,%d) end (%d,%d)\n" +msgstr "" + +#: dasdutil.c:479 +#, c-format +msgid "HHCDU007E Track %d not found in extent table\n" +msgstr "" + +#: dasdutil.c:517 +#, c-format +msgid "HHCDU008E Cannot obtain storage for device descriptor buffer: %s\n" +msgstr "" + +#: dasdutil.c:576 +#, c-format +msgid "HHCDU009E Cannot open %s: %s\n" +msgstr "" + +#: dasdutil.c:591 +#, fuzzy, c-format +msgid "HHCDU010E %s read error: %s\n" +msgstr "HHCDU010E Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: dasdutil.c:602 +#, c-format +msgid "HHCDU011E %s CKD header invalid\n" +msgstr "" + +#: dasdutil.c:611 +#, c-format +msgid "HHCDU012E DASD table entry not found for devtype 0x%2.2X\n" +msgstr "" + +#: dasdutil.c:641 +#, c-format +msgid "HHCDU013E CKD initialization failed for %s\n" +msgstr "" + +#: dasdutil.c:663 +#, c-format +msgid "HHCDU014I %s heads=%d trklen=%d\n" +msgstr "" + +#: dasdutil.c:697 +#, c-format +msgid "HHCDU015I Updating cyl %d head %d\n" +msgstr "" + +#: dasdutil.c:703 +#, c-format +msgid "HHCDU016E %s write track error: stat=%2.2X\n" +msgstr "" + +#: dasdutil.c:746 +#, c-format +msgid "HHCDU017E Cannot obtain storage for device descriptor buffer: %s\n" +msgstr "" + +#: dasdutil.c:762 +#, c-format +msgid "HHCDU018E DASD table entry not found for devtype 0x%2.2X\n" +msgstr "" + +#: dasdutil.c:789 +#, c-format +msgid "HHCDU019E FBA initialization failed for %s\n" +msgstr "" + +#: dasdutil.c:805 +#, c-format +msgid "HHCDU020I %s sectors=%d size=%d\n" +msgstr "" + +#: dasdutil.c:851 +msgid "HHCDU021E VOL1 record not found\n" +msgstr "" + +#: dasdutil.c:864 +#, c-format +msgid "HHCDU022I VOLSER=%s VTOC=%4.4X%4.4X%2.2X\n" +msgstr "" + +#: dasdutil.c:874 +msgid "HHCDU023E F4DSCB record not found\n" +msgstr "" + +#: dasdutil.c:881 +#, c-format +msgid "HHCDU023I VTOC start %2.2X%2.2X%2.2X%2.2X end %2.2X%2.2X%2.2X%2.2X\n" +msgstr "" + +#: dasdutil.c:897 +#, c-format +msgid "HHCDU024E Dataset %s not found in VTOC\n" +msgstr "" + +#: dasdutil.c:905 +#, c-format +msgid "HHCDU025I DSNAME=%s F1DSCB CCHHR=%4.4X%4.4X%2.2X\n" +msgstr "" + +#: dasdutil.c:915 +msgid "HHCDU026E F1DSCB record not found\n" +msgstr "" + +#: dasdutil.c:937 +msgid "HHCDU027E F3DSCB record not found\n" +msgstr "" + +#: dasdutil.c:1160 +#, fuzzy, c-format +msgid "HHCDU028E %s open error: %s\n" +msgstr "HHCDU028E Fout %2$s bij openen bestand \"%1$s\"\n" + +#: dasdutil.c:1188 +#, c-format +msgid "HHCDU029E %s device header write error: %s\n" +msgstr "" + +#: dasdutil.c:1216 +#, c-format +msgid "HHCDU030E %s compressed device header write error: %s\n" +msgstr "" + +#: dasdutil.c:1226 +#, c-format +msgid "HHCDU031E Cannot obtain l1tab buffer: %s\n" +msgstr "" + +#: dasdutil.c:1236 +#, c-format +msgid "HHCDU032E %s primary lookup table write error: %s\n" +msgstr "" + +#: dasdutil.c:1251 +#, c-format +msgid "HHCDU033E %s secondary lookup table write error: %s\n" +msgstr "" + +#: dasdutil.c:1265 +#, c-format +msgid "HHCDU034E %s dasdcopy ftruncate error: %s\n" +msgstr "" + +#: dasdutil.c:1381 +#, c-format +msgid "HHCDU035E %s cylinder %u head %u write error: %s\n" +msgstr "" + +#: dasdutil.c:1405 +#, c-format +msgid "HHCDU036E %s compressed device header lseek error: %s\n" +msgstr "" + +#: dasdutil.c:1413 +#, c-format +msgid "HHCDU037E %s compressed device header write error: %s\n" +msgstr "" + +#: dasdutil.c:1425 +#, c-format +msgid "HHCDU038E %s secondary lookup table lseek error: %s\n" +msgstr "" + +#: dasdutil.c:1433 +#, c-format +msgid "HHCDU039E %s secondary lookup table write error: %s\n" +msgstr "" + +#: dasdutil.c:1448 +#, fuzzy, c-format +msgid "HHCDU040E %s close error: %s\n" +msgstr "HHCDU040E Fout %2$s bij sluiten van bestand \"%1$s\"\n" + +#: dasdutil.c:1455 +#, c-format +msgid "HHCDU041I %u cylinders successfully written to file %s\n" +msgstr "" + +#: dasdutil.c:1522 +#, c-format +msgid "HHCDU042E Cylinder count %u is outside range %u-%u\n" +msgstr "" + +#: dasdutil.c:1531 +#, c-format +msgid "HHCDU043E Cannot obtain track buffer: %s\n" +msgstr "" + +#: dasdutil.c:1538 +#, c-format +msgid "" +"HHCDU044I Creating %4.4X volume %s: %u cyls, %u trks/cyl, %u bytes/track\n" +msgstr "" + +#: dasdutil.c:1643 +#, c-format +msgid "HHCDU045E Sector count %u is outside range %u-%u\n" +msgstr "" + +#: dasdutil.c:1652 +#, c-format +msgid "HHCDU046E Cannot obtain sector buffer: %s\n" +msgstr "" + +#: dasdutil.c:1659 +#, c-format +msgid "HHCDU047I Creating %4.4X volume %s: %u sectors, %u bytes/sector\n" +msgstr "" + +#: dasdutil.c:1671 +#, c-format +msgid "HHCDU048I %s open error: %s\n" +msgstr "" + +#: dasdutil.c:1683 +#, c-format +msgid "HHCDU049E %s dasdcopy ftruncate error: %s\n" +msgstr "" + +#: dasdutil.c:1718 +#, c-format +msgid "HHCDU050E %s sector %u write error: %s\n" +msgstr "" + +#: dasdutil.c:1730 +#, fuzzy, c-format +msgid "HHCDU051E %s close error: %s\n" +msgstr "HHCDU051E Fout %2$s bij sluiten van bestand \"%1$s\"\n" + +#: dasdutil.c:1740 +#, c-format +msgid "HHCDU052I %u sectors successfully written to file %s\n" +msgstr "" + +#: dasdutil.c:1782 +#, c-format +msgid "HHCDU053E File size too large: %lld [%d]\n" +msgstr "" + +#: dasdutil.c:1795 +#, fuzzy, c-format +msgid "HHCDU054E %s open error: %s\n" +msgstr "HHCDU054E Fout %2$s bij openen bestand \"%1$s\"\n" + +#: dasdutil.c:1802 +#, c-format +msgid "" +"HHCDU055I Creating %4.4X compressed volume %s: %u sectors, %u bytes/sector\n" +msgstr "" + +#: dasdutil.c:1812 +#, c-format +msgid "HHCDU056E %s devhdr write error: %s\n" +msgstr "" + +#: dasdutil.c:1835 +#, c-format +msgid "HHCDU057E %s cdevhdr write error: %s\n" +msgstr "" + +#: dasdutil.c:1847 +#, c-format +msgid "HHCDU058E %s l1tab write error: %s\n" +msgstr "" + +#: dasdutil.c:1859 +#, c-format +msgid "HHCDU059E %s l2tab write error: %s\n" +msgstr "" + +#: dasdutil.c:1878 +#, c-format +msgid "HHCDU060E %s block header write error: %s\n" +msgstr "" + +#: dasdutil.c:1885 +#, c-format +msgid "HHCDU061E %s block write error: %s\n" +msgstr "" + +#: dasdutil.c:1900 +#, c-format +msgid "HHCDU062E %s block write error: %s\n" +msgstr "" + +#: dasdutil.c:1914 +#, c-format +msgid "HHCDU063E %s cdevhdr lseek error: %s\n" +msgstr "" + +#: dasdutil.c:1921 +#, c-format +msgid "HHCDU064E %s cdevhdr rewrite error: %s\n" +msgstr "" + +#: dasdutil.c:1930 +#, c-format +msgid "HHCDU065E %s l2tab lseek error: %s\n" +msgstr "" + +#: dasdutil.c:1937 +#, c-format +msgid "HHCDU066E %s l2tab rewrite error: %s\n" +msgstr "" + +#: dasdutil.c:1946 +#, c-format +msgid "HHCDU067E %s close error: %s\n" +msgstr "" + +#: dasdutil.c:1953 +#, c-format +msgid "HHCDU068I %u sectors successfully written to file %s\n" +msgstr "" + +#: dyngui.c:201 +#, c-format +msgid "HHCDG003S select failed on input stream: %s\n" +msgstr "" + +#: dyngui.c:235 +#, c-format +msgid "HHCDG004S read failed on input stream: %s\n" +msgstr "" + +#: dyngui.c:756 +#, c-format +msgid "HHCDG005E Device query buffer overflow! (device=%4.4X)\n" +msgstr "" + +#: dyngui.c:862 +#, c-format +msgid "HHCDG006S malloc pszInputBuff failed: %s\n" +msgstr "" + +#: dyngui.c:875 +#, c-format +msgid "HHCDG007S malloc pszCommandBuff failed: %s\n" +msgstr "" + +#: dyngui.c:902 +msgid "HHCDG001I dyngui.dll version " +msgstr "" + +#: dyngui.c:902 +msgid "-" +msgstr "" + +#: dyngui.c:902 +msgid " initiated\n" +msgstr "" + +#: dyngui.c:905 +msgid "HHCDG002I dyngui.dll terminated\n" +msgstr "" + +#: ecpsvm.c:215 ecpsvm.c:220 ecpsvm.c:236 ecpsvm.c:258 ecpsvm.c:259 +#: ecpsvm.c:260 ecpsvm.c:262 +msgid "HHCEV300D : SASSIST " +msgstr "" + +#: ecpsvm.c:215 +msgid " ECPS:VM Disabled in configuration\n" +msgstr "" + +#: ecpsvm.c:220 +msgid " ECPS:VM Disabled by command\n" +msgstr "" + +#: ecpsvm.c:226 +msgid "HHCEV300D : EVMA Disabled by guest\n" +msgstr "" + +#: ecpsvm.c:236 +#, c-format +msgid " Micblok @ %6.6X crosses page frame\n" +msgstr "" + +#: ecpsvm.c:258 +#, c-format +msgid " CR6= %8.8X\n" +msgstr "" + +#: ecpsvm.c:259 +#, c-format +msgid " MICVTMR= %8.8X\n" +msgstr "" + +#: ecpsvm.c:260 +#, c-format +msgid " VPSWA= %8.8X Virtual " +msgstr "" + +#: ecpsvm.c:262 +msgid " Real " +msgstr "" + +#: ecpsvm.c:273 ecpsvm.c:279 +msgid "HHCEV300D : CPASSTS " +msgstr "" + +#: ecpsvm.c:273 +msgid " ECPS:VM Disabled in configuration " +msgstr "" + +#: ecpsvm.c:279 +msgid " Disabled by command" +msgstr "" + +#: ecpsvm.c:287 +msgid "HHCEV300D : " +msgstr "" + +#: ecpsvm.c:287 +msgid " called\n" +msgstr "" + +#: ecpsvm.c:359 +msgid "HHCEV300D : LKPG coreptr = " +msgstr "" + +#: ecpsvm.c:359 +msgid " Frame = " +msgstr "" + +#: ecpsvm.c:362 +#, c-format +msgid "HHCEV300D : LKPG corete = %6.6X\n" +msgstr "" + +#: ecpsvm.c:376 +#, c-format +msgid "HHCEV300D : LKPG Page locked. Count = %6.6X\n" +msgstr "" + +#: ecpsvm.c:393 +#, c-format +msgid "HHCEV300D : LKPG PAGE=%6.6X, PTRPL=%6.6X\n" +msgstr "" + +#: ecpsvm.c:420 +#, c-format +msgid "HHCEV300D : ULKPG PAGE=%6.6X, PTRPL=%6.6X\n" +msgstr "" + +#: ecpsvm.c:426 +#, c-format +msgid "HHCEV300D : ULKPG Page beyond core size of %6.6X\n" +msgstr "" + +#: ecpsvm.c:438 +msgid "HHCEV300D : ULKPG Attempting to unlock page that is not locked\n" +msgstr "" + +#: ecpsvm.c:445 +msgid "HHCEV300D : ULKPG now unlocked\n" +msgstr "" + +#: ecpsvm.c:449 +#, c-format +msgid "HHCEV300D : ULKPG Page still locked. Count = %6.6X\n" +msgstr "" + +#: ecpsvm.c:485 +#, c-format +msgid "HHCEV300D SCNVU Virtual Device %4.4X has no VCHAN block\n" +msgstr "" + +#: ecpsvm.c:493 +#, c-format +msgid "HHCEV300D SCNVU Virtual Device %4.4X has no VCU block\n" +msgstr "" + +#: ecpsvm.c:501 +#, c-format +msgid "HHCEV300D SCNVU Virtual Device %4.4X has no VDEV block\n" +msgstr "" + +#: ecpsvm.c:505 +#, c-format +msgid "HHCEV300D SCNVU %4.4X : VCH = %8.8X, VCU = %8.8X, VDEV = %8.8X\n" +msgstr "" + +#: ecpsvm.c:866 +msgid "HHCEV004W : Abend condition detected in DISP2 instr\n" +msgstr "" + +#: ecpsvm.c:1058 +#, c-format +msgid "HHCPEV300D : DISP2 - Next Instruction : %2.2X\n" +msgstr "" + +#: ecpsvm.c:1123 +#, c-format +msgid "HHCEV300D : Tranbring : LRA cc = %d\n" +msgstr "" + +#: ecpsvm.c:1132 +#, c-format +msgid "HHCEV300D : Page not shared - OK %d\n" +msgstr "" + +#: ecpsvm.c:1138 +msgid "HHCEV300D : Checking 2K Storage keys @" +msgstr "" + +#: ecpsvm.c:1138 +msgid " & " +msgstr "" + +#: ecpsvm.c:1143 +msgid "HHCEV300D : Checking 4K Storage keys @" +msgstr "" + +#: ecpsvm.c:1147 +msgid "HHCEV300D : Page shared and changed\n" +msgstr "" + +#: ecpsvm.c:1150 +msgid "HHCEV300D : Page shared but not changed\n" +msgstr "" + +#: ecpsvm.c:1169 +msgid "HHCEV300D : TRANBRNG\n" +msgstr "" + +#: ecpsvm.c:1173 +msgid "HHCEV300D : TRANBRNG - Back to CP\n" +msgstr "" + +#: ecpsvm.c:1191 +msgid "HHCEV300D : TRANLOCK\n" +msgstr "" + +#: ecpsvm.c:1195 +msgid "HHCEV300D : TRANLOCK - Back to CP\n" +msgstr "" + +#: ecpsvm.c:1708 +#, c-format +msgid "HHCEV300D : ECPS:VM SCNRU called; RDEV=%4.4X ARIOCT=%6.6X\n" +msgstr "" + +#: ecpsvm.c:1782 +#, c-format +msgid "HHCEV300D : ECPS:VM SCNRU : RCH = %6.6X, RCU = %6.6X, RDV = %6.6X\n" +msgstr "" + +#: ecpsvm.c:1826 +#, c-format +msgid "HHCEV300D : ECPS:VM STORE LEVEL %d called\n" +msgstr "" + +#: ecpsvm.c:1866 +#, c-format +msgid "HHCEV300D : ECPS:VM FREEX DW = %4.4X\n" +msgstr "" + +#: ecpsvm.c:1871 +#, c-format +msgid "HHCEV300D : MAXSIZE ADDR = %6.6X, SUBPOOL INDEX TABLE = %6.6X\n" +msgstr "" + +#: ecpsvm.c:1878 +msgid "HHCEV300D : FREEX request beyond subpool capacity\n" +msgstr "" + +#: ecpsvm.c:1883 +#, c-format +msgid "HHCEV300D : Subpool index = %X\n" +msgstr "" + +#: ecpsvm.c:1886 +#, c-format +msgid "HHCEV300D : Value in subpool table = %6.6X\n" +msgstr "" + +#: ecpsvm.c:1894 +#, c-format +msgid "HHCEV300D : New Value in subpool table = %6.6X\n" +msgstr "" + +#: ecpsvm.c:1924 +#, c-format +msgid "HHCEV300D : X fretx called AREA=%6.6X, DW=%4.4X\n" +msgstr "" + +#: ecpsvm.c:1927 +msgid "HHCEV300D : ECPS:VM Cannot FRETX : DWORDS = 0\n" +msgstr "" + +#: ecpsvm.c:1933 +#, c-format +msgid "HHCEV300D : ECPS:VM Cannot FRETX : DWORDS = %d > MAXDW %d\n" +msgstr "" + +#: ecpsvm.c:1940 +msgid "HHCEV300D : ECPS:VM Cannot FRETX : Area not in Core Free area\n" +msgstr "" + +#: ecpsvm.c:1945 +msgid "HHCEV300D : ECPS:VM Cannot FRETX : Area flag != 0x02\n" +msgstr "" + +#: ecpsvm.c:1952 +msgid "" +"HHCEV300D : ECPS:VM Cannot FRETX : fretted block already on subpool chain\n" +msgstr "" + +#: ecpsvm.c:2018 +msgid "HHCEV300D : New and Old PSW have a EC/BC transition\n" +msgstr "" + +#: ecpsvm.c:2026 +msgid "HHCEV300D : New PSW Enables DAT or PER\n" +msgstr "" + +#: ecpsvm.c:2037 +msgid "HHCEV300D : New PSW Enables interrupts and MICPEND (EC)\n" +msgstr "" + +#: ecpsvm.c:2045 +msgid "HHCEV300D : New PSW Enables interrupts and MICPEND (BC)\n" +msgstr "" + +#: ecpsvm.c:2052 +msgid "HHCEV300D : New PSW is a WAIT PSW\n" +msgstr "" + +#: ecpsvm.c:2059 +msgid "HHCEV300D : New PSW sysmask incorrect\n" +msgstr "" + +#: ecpsvm.c:2065 +msgid "HHCEV300D : New PSW has ODD IA\n" +msgstr "" + +#: ecpsvm.c:2602 ecpsvm.c:2619 +#, c-format +msgid "HHCEV001I | %-9s | %8d | %8d | %3d%% |\n" +msgstr "" + +#: ecpsvm.c:2629 +#, c-format +msgid "HHCEV004I * : Unsupported, - : Disabled, %% - Debug\n" +msgstr "" + +#: ecpsvm.c:2633 +#, c-format +msgid "HHCEV005I %d Entr%s not shown (never invoked)\n" +msgstr "" + +#: ecpsvm.c:2639 +msgid "HHCEV006I 1 call was made to an unsupported function\n" +msgstr "" + +#: ecpsvm.c:2643 +#, c-format +msgid "HHCEV006I %d calls where made to unsupported functions\n" +msgstr "" + +#: ecpsvm.c:2658 ecpsvm.c:2667 +#, c-format +msgid "HHCEV002I | %-9s | %-8s | %-8s | %-5s |\n" +msgstr "" + +#: ecpsvm.c:2685 +#, c-format +msgid "HHCEV010I : %s : %s\n" +msgstr "" + +#: ecpsvm.c:2700 +#, c-format +msgid "HHCEV011E Unknown subcommand %s - valid subcommands are :\n" +msgstr "" + +#: ecpsvm.c:2704 +#, c-format +msgid "HHCEV012I : %s : %s" +msgstr "" + +#: ecpsvm.c:2752 +#, c-format +msgid "HHCEV015I ECPS:VM %s feature %s %s\n" +msgstr "" + +#: ecpsvm.c:2757 +#, c-format +msgid "HHCEV015I ECPS:VM %s feature %s Debug %s\n" +msgstr "" + +#: ecpsvm.c:2762 +#, c-format +msgid "HHCEV016I All ECPS:VM %s features %s\n" +msgstr "" + +#: ecpsvm.c:2766 +#, c-format +msgid "HHCEV016I All ECPS:VM %s features Debug %s\n" +msgstr "" + +#: ecpsvm.c:2794 +#, c-format +msgid "HHCEV013I ECPS:VM Global Debug %s\n" +msgstr "" + +#: ecpsvm.c:2822 +#, c-format +msgid "HHCEV014I ECPS:VM %s feature %s %s\n" +msgstr "" + +#: ecpsvm.c:2827 +#, c-format +msgid "HHCEV014I ECPS:VM %s feature %s Debug %s\n" +msgstr "" + +#: ecpsvm.c:2832 +#, c-format +msgid "HHCEV014I Unknown ECPS:VM feature %s; Ignored\n" +msgstr "" + +#: ecpsvm.c:2859 ecpsvm.c:2863 +#, c-format +msgid "HHCEV016I Current reported ECPS:VM Level is %d\n" +msgstr "" + +#: ecpsvm.c:2864 +msgid "HHCEV017I But ECPS:VM is currently disabled\n" +msgstr "" + +#: ecpsvm.c:2869 +#, c-format +msgid "HHCEV016I Level reported to guest program is now %d\n" +msgstr "" + +#: ecpsvm.c:2874 +#, c-format +msgid "HHCEV017W WARNING ! current level (%d) is not supported\n" +msgstr "" + +#: ecpsvm.c:2875 +msgid "HHCEV018W WARNING ! Unpredictable results may occur\n" +msgstr "" + +#: ecpsvm.c:2876 +msgid "HHCEV019I The microcode support level is 20\n" +msgstr "" + +#: ecpsvm.c:2915 +msgid "HHCEV011I ECPS:VM Command processor invoked\n" +msgstr "" + +#: ecpsvm.c:2918 +msgid "" +"HHCEV008E NO EVM subcommand. Type \"evm help\" for a list of valid " +"subcommands\n" +msgstr "" + +#: ecpsvm.c:2924 +#, c-format +msgid "HHCEV008E Unknown EVM subcommand %s\n" +msgstr "" + +#: ecpsvm.c:2928 +msgid "HHCEV011I ECPS:VM Command processor complete\n" +msgstr "" + +#: external.c:257 +msgid "HHCCP023I External interrupt: Interrupt key\n" +msgstr "" + +#: external.c:370 +msgid "HHCCP024I External interrupt: Clock comparator\n" +msgstr "" + +#: external.c:381 +#, c-format +msgid "HHCCP025I External interrupt: CPU timer=%16.16llX\n" +msgstr "" + +#: external.c:412 +msgid "HHCCP026I External interrupt: Interval timer\n" +msgstr "" + +#: fbadasd.c:73 +#, fuzzy +msgid "HHCDA056E File name missing or invalid\n" +msgstr "HHCDA056E Bestandsnaam niet opgegeven of ongeldig\n" + +#: fbadasd.c:89 +#, fuzzy, c-format +msgid "HHCDA057E %4.4X:File not found or invalid\n" +msgstr "HHCDA057E %4.4X:Bestandsnaam niet opgegeven of ongeldig\n" + +#: fbadasd.c:104 +#, fuzzy, c-format +msgid "HHCDA058E File %s open error: %s\n" +msgstr "HHCDA058E Fout %2$s bij openen bestand \"%1$s\"\n" + +#: fbadasd.c:116 +#, fuzzy, c-format +msgid "HHCDA059E Read error in file %s: %s\n" +msgstr "HHCDA059E Fout %2$s bij leven van bestand \"%1$s\"\n" + +#: fbadasd.c:119 +#, fuzzy, c-format +msgid "HHCDA060E Unexpected end of file in %s\n" +msgstr "HHCDA060E Onverwacht einde van bestand \"%s\"\n" + +#: fbadasd.c:137 +#, fuzzy, c-format +msgid "HHCDA061E Read error in file %s: %s\n" +msgstr "HHCDA061E Fout %2$s bij leven van bestand \"%1$s\"\n" + +#: fbadasd.c:140 +#, fuzzy, c-format +msgid "HHCDA062E Unexpected end of file in %s\n" +msgstr "HHCDA062E Onverwacht einde van bestand \"%s\"\n" + +#: fbadasd.c:182 +#, c-format +msgid "HHCDA063E parameter %d is invalid: %s\n" +msgstr "" + +#: fbadasd.c:195 +#, c-format +msgid "HHCDA064E File %s fstat error: %s\n" +msgstr "" + +#: fbadasd.c:207 +#, fuzzy, c-format +msgid "HHCDA082E File %s IOCTL BLKGETSIZE error: %s\n" +msgstr "HHCDA058E Fout %2$s bij openen bestand \"%1$s\"\n" + +#: fbadasd.c:237 +#, c-format +msgid "HHCDA065E Invalid device origin block number %s\n" +msgstr "" + +#: fbadasd.c:253 +#, c-format +msgid "HHCDA066E Invalid device block count %s\n" +msgstr "" + +#: fbadasd.c:264 +#, c-format +msgid "HHCDA067I %s origin=%d blks=%d\n" +msgstr "" + +#: fbadasd.c:274 +#, c-format +msgid "HHCDA068E %4.4X device type %4.4X not found in dasd table\n" +msgstr "" + +#: fbadasd.c:499 +#, c-format +msgid "HHCDA069E error writing blkgrp %d: lseek error: %s\n" +msgstr "" + +#: fbadasd.c:517 +#, c-format +msgid "HHCDA070E error writing blkgrp %d: write error: %s\n" +msgstr "" + +#: fbadasd.c:558 +#, c-format +msgid "HHCDA071I read blkgrp %d cache hit, using cache[%d]\n" +msgstr "" + +#: fbadasd.c:583 +#, c-format +msgid "HHCDA072I read blkgrp %d no available cache entry, waiting\n" +msgstr "" + +#: fbadasd.c:591 +#, c-format +msgid "HHCDA073I read blkgrp %d cache miss, using cache[%d]\n" +msgstr "" + +#: fbadasd.c:607 +#, c-format +msgid "HHCDA074I read blkgrp %d offset %lld len %d\n" +msgstr "" + +#: fbadasd.c:615 +#, c-format +msgid "HHCDA075E error reading blkgrp %d: lseek error: %s\n" +msgstr "" + +#: fbadasd.c:630 +#, c-format +msgid "HHCDA076E error reading blkgrp %d: read error: %s\n" +msgstr "" + +#: fbadasd.c:1058 +#, c-format +msgid "HHCDA077I Positioning to %8.8llX (%llu)\n" +msgstr "" + +#: fbadasd.c:1076 +#, c-format +msgid "HHCDA078E define extent data too short: %d bytes\n" +msgstr "" + +#: fbadasd.c:1086 +msgid "HHCDA079E second define extent in chain\n" +msgstr "" + +#: fbadasd.c:1097 +#, c-format +msgid "HHCDA080E invalid file mask %2.2X\n" +msgstr "" + +#: fbadasd.c:1138 +#, c-format +msgid "HHCDA081E invalid extent: first block %d, last block %d,\n" +msgstr "" + +#: fbadasd.c:1140 +#, c-format +msgid " numblks %d, device size %d\n" +msgstr "" + +#: general1.c:3226 +msgid "MVCL destructive overlap: " +msgstr "" + +#: hdl.c:380 +#, c-format +msgid "HHCHD010I Dependency check failed for %s, version(%s) expected(%s)\n" +msgstr "" + +#: hdl.c:387 +#, c-format +msgid "HHCHD011I Dependency check failed for %s, size(%d) expected(%d)\n" +msgstr "" + +#: hdl.c:429 +#, c-format +msgid "HHCHD001E registration malloc failed for %s\n" +msgstr "" + +#: hdl.c:545 +#, c-format +msgid "HHCHD002E cannot allocate memory for DLL descriptor: %s\n" +msgstr "" + +#: hdl.c:559 +#, c-format +msgid "HHCHD003E unable to open hercules as DLL: %s\n" +msgstr "" + +#: hdl.c:568 +#, c-format +msgid "HHCHD012E No depency section in %s: %s\n" +msgstr "" + +#: hdl.c:640 +#, c-format +msgid "HHCHD005E %s already loaded\n" +msgstr "" + +#: hdl.c:647 +#, c-format +msgid "HHCHD006S cannot allocate memory for DLL descriptor: %s\n" +msgstr "" + +#: hdl.c:657 +#, fuzzy, c-format +msgid "HHCHD007E unable to open DLL %s: %s\n" +msgstr "HHCHD007E Fout %2$s bij openen DLL bestand \"%1$s\"\n" + +#: hdl.c:667 +#, fuzzy, c-format +msgid "HHCHD013E No dependency section in %s: %s\n" +msgstr "HHCRD013E Fout %2$s bij openen bestand \"%1$s\"\n" + +#: hdl.c:678 +#, c-format +msgid "HHCHD016E DLL %s is duplicate of %s\n" +msgstr "" + +#: hdl.c:705 +#, c-format +msgid "HHCHD014E Dependency check failed for module %s\n" +msgstr "" + +#: hdl.c:772 +#, c-format +msgid "HHCHD015E Unloading of %s not allowed\n" +msgstr "" + +#: hdl.c:782 +#, fuzzy, c-format +msgid "HHCHD008E Device %4.4X bound to %s\n" +msgstr "HHCSD007I %s (%s) afgesloten van apparaat %4.4X (%s)\n" + +#: hdl.c:794 +#, c-format +msgid "HHCHD017E Unload of %s rejected by final section\n" +msgstr "" + +#: hdl.c:854 +#, c-format +msgid "HHCHD009E %s not found\n" +msgstr "" + +#: hercifc.c:59 +#, c-format +msgid "HHCIF001E %s: Must be called from within Hercules.\n" +msgstr "" + +#: hercifc.c:70 +#, c-format +msgid "HHCIF002E %s: Cannot obtain socket: %s\n" +msgstr "" + +#: hercifc.c:85 +#, c-format +msgid "HHCIF003E %s: I/O error on read: %s.\n" +msgstr "" + +#: hercifc.c:162 +#, c-format +msgid "HHCIF004W %s: Unknown request: %8.8X.\n" +msgstr "" + +#: hercifc.c:175 +#, c-format +msgid "HHCIF005E %s: ioctl error doing %s on %s: %s\n" +msgstr "" + +#: hostinfo.c:64 +#, c-format +msgid "Running on %s %s%s %s %s\n" +msgstr "Draaiend op %s %s%s %s %s\n" + +#: hsccmd.c:65 +msgid "HHCIN099I Hercules terminated\n" +msgstr "" + +#: hsccmd.c:115 +#, fuzzy +msgid "HHCPN015E Invalid device number\n" +msgstr "HHCPN015E Ongeldig apparaat nummer\n" + +#: hsccmd.c:121 +#, c-format +msgid "HHCPN016E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:129 +#, c-format +msgid "HHCPN017E Device %4.4X is not a printer device\n" +msgstr "" + +#: hsccmd.c:143 +#, c-format +msgid "HHCPN018I Printer %4.4X started\n" +msgstr "" + +#: hsccmd.c:145 +#, c-format +msgid "HHCPN019E Printer %4.4X not started: busy or interrupt pending\n" +msgstr "" + +#: hsccmd.c:148 +#, c-format +msgid "HHCPN020E Printer %4.4X not started: attention request rejected\n" +msgstr "" + +#: hsccmd.c:151 +#, c-format +msgid "HHCPN021E Printer %4.4X not started: subchannel not enabled\n" +msgstr "" + +#: hsccmd.c:207 +#, fuzzy +msgid "HHCPN022E Invalid device number\n" +msgstr "HHCPN022E Ongeldig apparaat nummer\n" + +#: hsccmd.c:213 +#, c-format +msgid "HHCPN023E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:221 +#, c-format +msgid "HHCPN024E Device %4.4X is not a printer device\n" +msgstr "" + +#: hsccmd.c:228 +#, c-format +msgid "HHCPN025I Printer %4.4X stopped\n" +msgstr "" + +#: hsccmd.c:296 +msgid "HHCPN026W Ignored. (external GUI active)\n" +msgstr "" + +#: hsccmd.c:301 +#, c-format +msgid "HHCPN027I Automatic refresh %s.\n" +msgstr "" + +#: hsccmd.c:302 +msgid "disabled" +msgstr "" + +#: hsccmd.c:302 +msgid "enabled" +msgstr "" + +#: hsccmd.c:317 +#, c-format +msgid "HHCPN028I tod = %16.16llX\n" +msgstr "" + +#: hsccmd.c:350 +#, fuzzy, c-format +msgid "HHCPN029E Invalid I/O delay value: %s\n" +msgstr "HHCPN029E Ongeldige I/O delay waarde: %s\n" + +#: hsccmd.c:355 +#, c-format +msgid "HHCPN030I I/O delay = %d\n" +msgstr "" + +#: hsccmd.c:391 +#, fuzzy +msgid "HHCPN031E Missing device number\n" +msgstr "HHCPN031E Geen apparaat nummer\n" + +#: hsccmd.c:397 +#, c-format +msgid "HHCPN032E Device number %s is invalid\n" +msgstr "" + +#: hsccmd.c:404 +#, c-format +msgid "HHCPN033E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:410 +#, c-format +msgid "HHCPN034E Device %4.4X is not a CTCI or LCS device\n" +msgstr "" + +#: hsccmd.c:419 +msgid "(error)\n" +msgstr "" + +#: hsccmd.c:442 +msgid "HHCPN035E store status rejected: CPU not stopped\n" +msgstr "" + +#: hsccmd.c:471 +#, c-format +msgid "HHCPN036I TOD clock drag factor = %d\n" +msgstr "" + +#: hsccmd.c:504 +#, c-format +msgid "HHCPN037I Panel refresh rate = %d millisecond(s)\n" +msgstr "" + +#: hsccmd.c:620 +#, fuzzy +msgid "HHCPN038I Restart key depressed\n" +msgstr "HHCPN038I Restart key ingedrukt\n" + +#: hsccmd.c:693 +msgid "HHCPN039E Missing argument\n" +msgstr "" + +#: hsccmd.c:699 +#, c-format +msgid "HHCPN040I Setting breakpoint at %16.16llX\n" +msgstr "" + +#: hsccmd.c:717 +msgid "HHCPN041I Deleting breakpoint\n" +msgstr "" + +#: hsccmd.c:739 +#, fuzzy +msgid "HHCPN042E Missing device number\n" +msgstr "HHCPN042E Geen apparaat nummer\n" + +#: hsccmd.c:745 +#, fuzzy, c-format +msgid "HHCPN043E Device number %s is invalid\n" +msgstr "HHCPN043E Apparaat nummer %s is ongeldig\n" + +#: hsccmd.c:751 +#, c-format +msgid "HHCPN044E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:758 +#, c-format +msgid "HHCPN045I Device %4.4X attention request raised\n" +msgstr "" + +#: hsccmd.c:761 +#, c-format +msgid "HHCPN046E Device %4.4X busy or interrupt pending\n" +msgstr "" + +#: hsccmd.c:764 +#, c-format +msgid "HHCPN047E Device %4.4X attention request rejected\n" +msgstr "" + +#: hsccmd.c:767 +#, c-format +msgid "HHCPN048E Device %4.4X subchannel not enabled\n" +msgstr "" + +#: hsccmd.c:773 +#, c-format +msgid "HHCPN049W Are you sure you didn't mean 'ipl %4.4X' instead?\n" +msgstr "" + +#: hsccmd.c:792 +#, fuzzy +msgid "HHCPN050I Interrupt key depressed\n" +msgstr "HHCPN050I Interrupt key ingedrukt\n" + +#: hsccmd.c:828 +#, c-format +msgid "HHCPN051I LOADPARM=%c%c%c%c%c%c%c%c\n" +msgstr "" + +#: hsccmd.c:855 +#, fuzzy +msgid "HHCPN052E Missing device number\n" +msgstr "HHCPN052E Geen apparaat nummer\n" + +#: hsccmd.c:863 +msgid "HHCPN053E ipl rejected: All CPU's must be stopped\n" +msgstr "" + +#: hsccmd.c:889 +#, fuzzy +msgid "HHCPN054E Missing argument\n" +msgstr "HHCPN054E Geen apparaat nummer\n" + +#: hsccmd.c:895 +#, c-format +msgid "HHCPN055E Target CPU %s is invalid\n" +msgstr "" + +#: hsccmd.c:906 +#, c-format +msgid "HHCPN056E CPU%4.4X not configured\n" +msgstr "" + +#: hsccmd.c:970 +#, c-format +msgid "HHCPN146E Work buffer malloc failed: %s\n" +msgstr "" + +#: hsccmd.c:1016 +msgid "open " +msgstr "" + +#: hsccmd.c:1017 +msgid "busy " +msgstr "" + +#: hsccmd.c:1018 +msgid "pending " +msgstr "" + +#: hsccmd.c:1029 +#, c-format +msgid " (client %s (%s) connected)\n" +msgstr "" + +#: hsccmd.c:1035 +msgid " (no one currently connected)\n" +msgstr "" + +#: hsccmd.c:1047 +#, c-format +msgid "HHCPN147W Warning: not all devices shown (max %d)\n" +msgstr "" + +#: hsccmd.c:1068 +msgid "HHCPN057E Missing argument(s)\n" +msgstr "" + +#: hsccmd.c:1074 +#, c-format +msgid "HHCPN059E Device number %s is invalid\n" +msgstr "" + +#: hsccmd.c:1081 +#, fuzzy, c-format +msgid "Device type %s is invalid\n" +msgstr "HHCPN043E Apparaat nummer %s is ongeldig\n" + +#: hsccmd.c:1101 +#, fuzzy +msgid "HHCPN060E Missing device number\n" +msgstr "HHCPN060E Geen apparaat nummer\n" + +#: hsccmd.c:1107 +#, c-format +msgid "HHCPN061E Device number %s is invalid\n" +msgstr "" + +#: hsccmd.c:1126 +msgid "HHCPN062E Missing argument(s)\n" +msgstr "" + +#: hsccmd.c:1132 +#, c-format +msgid "HHCPN063E Device number %s is invalid\n" +msgstr "" + +#: hsccmd.c:1138 +#, c-format +msgid "HHCPN064E Device number %s is invalid\n" +msgstr "" + +#: hsccmd.c:1157 +msgid "HHCPN065E Missing argument(s)\n" +msgstr "" + +#: hsccmd.c:1163 +#, c-format +msgid "HHCPN066E Program interrupt number %s is invalid\n" +msgstr "" + +#: hsccmd.c:1170 +#, c-format +msgid "HHCPN067E Program interrupt number out of range (%4.4X)\n" +msgstr "" + +#: hsccmd.c:1212 +#, fuzzy +msgid "HHCPN069E Missing device number\n" +msgstr "HHCPN069E Geen apparaat nummer\n" + +#: hsccmd.c:1218 +#, c-format +msgid "HHCPN070E Device number %s is invalid\n" +msgstr "" + +#: hsccmd.c:1224 +#, c-format +msgid "HHCPN071E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:1253 +#, c-format +msgid "HHCPN072I %4.4X synchronous: %12lld asynchronous: %12lld\n" +msgstr "" + +#: hsccmd.c:1264 +msgid "HHCPN073I No synchronous I/O devices found\n" +msgstr "" + +#: hsccmd.c:1266 +#, c-format +msgid "HHCPN074I TOTAL synchronous: %12lld asynchronous: %12lld %3lld%%\n" +msgstr "" + +#: hsccmd.c:1305 +#, fuzzy +msgid "HHCPN075E Invalid max device threads value (must be -1 to n)\n" +msgstr "HHCPN015E Ongeldig apparaat nummer\n" + +#: hsccmd.c:1312 +#, c-format +msgid "" +"HHCPN076I Max device threads: %d, current: %d, most: %d, waiting: %d, max " +"exceeded: %d\n" +msgstr "" + +#: hsccmd.c:1333 +msgid "HHCPN077E Invalid max device threads value (must be -1 to n)\n" +msgstr "" + +#: hsccmd.c:1347 +#, c-format +msgid "" +"HHCPN078E Max device threads %d current %d most %d waiting %d total I/Os " +"queued %d\n" +msgstr "" + +#: hsccmd.c:1381 +msgid "HHCPN079E Missing device number\n" +msgstr "" + +#: hsccmd.c:1388 +#, fuzzy +msgid "HHCPN080E Invalid device number\n" +msgstr "HHCPN080E Ongeldig apparaat nummer\n" + +#: hsccmd.c:1395 +msgid "HHCPN081E No cckd devices found\n" +msgstr "" + +#: hsccmd.c:1404 +#, fuzzy +msgid "HHCPN082E Invalid device number\n" +msgstr "HHCPN082E Ongeldig apparaat nummer\n" + +#: hsccmd.c:1410 +#, c-format +msgid "HHCPN083E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:1416 +#, c-format +msgid "HHCPN084E Device number %4.4X is not a cckd device\n" +msgstr "" + +#: hsccmd.c:1427 +#, c-format +msgid "HHCPN085I Processing device %4.4X\n" +msgstr "" + +#: hsccmd.c:1433 +#, c-format +msgid "HHCPN086E Unexpected operand: %s\n" +msgstr "" + +#: hsccmd.c:1447 +msgid "HHCPN087E Operand must be `merge' or `nomerge'\n" +msgstr "" + +#: hsccmd.c:1456 +msgid "HHCPN088E Shadow file name not specified\n" +msgstr "" + +#: hsccmd.c:1462 +#, c-format +msgid "HHCPN089E Unexpected operand: %s\n" +msgstr "" + +#: hsccmd.c:1471 +#, c-format +msgid "HHCPN090E Unexpected operand: %s\n" +msgstr "" + +#: hsccmd.c:1478 +msgid "HHCPN091E Command must be `sf+', `sf-', `sf=', `sfc', or `sfd'\n" +msgstr "" + +#: hsccmd.c:1492 +#, c-format +msgid "HHCPN092I %d devices processed\n" +msgstr "" + +#: hsccmd.c:1512 +msgid "HHCPN093E Missing argument(s)\n" +msgstr "" + +#: hsccmd.c:1518 +#, c-format +msgid "HHCPN094E Device number %s is invalid\n" +msgstr "" + +#: hsccmd.c:1524 +#, c-format +msgid "HHCPN095E Device number %4.4X not found\n" +msgstr "" + +#: hsccmd.c:1536 +#, c-format +msgid "HHCPN096E Device %4.4X busy or interrupt pending\n" +msgstr "" + +#: hsccmd.c:1552 +#, c-format +msgid "HHCPN097E Initialization failed for device %4.4X\n" +msgstr "" + +#: hsccmd.c:1555 +#, c-format +msgid "HHCPN098I Device %4.4X initialized\n" +msgstr "" + +#: hsccmd.c:1584 +msgid "HHCPN099E savecore rejected: filename missing\n" +msgstr "" + +#: hsccmd.c:1605 +#, c-format +msgid "HHCPN100E savecore: invalid starting address: %s \n" +msgstr "" + +#: hsccmd.c:1624 +#, c-format +msgid "HHCPN101E savecore: invalid ending address: %s \n" +msgstr "" + +#: hsccmd.c:1632 +msgid "HHCPN102E savecore rejected: CPU not stopped\n" +msgstr "" + +#: hsccmd.c:1638 +#, c-format +msgid "HHCPN103E invalid range: %8.8X-%8.8X\n" +msgstr "" + +#: hsccmd.c:1643 +#, c-format +msgid "HHCPN104I Saving locations %8.8X-%8.8X to %s\n" +msgstr "" + +#: hsccmd.c:1648 +#, c-format +msgid "HHCPN105E savecore error creating %s: %s\n" +msgstr "" + +#: hsccmd.c:1654 +#, c-format +msgid "HHCPN106E savecore error writing to %s: %s\n" +msgstr "" + +#: hsccmd.c:1657 +#, c-format +msgid "HHCPN107E savecore: unable to save %d bytes\n" +msgstr "" + +#: hsccmd.c:1683 +msgid "HHCPN108E loadcore rejected: filename missing\n" +msgstr "" + +#: hsccmd.c:1691 +#, fuzzy, c-format +msgid "HHCPN109E Cannot open %s: %s\n" +msgstr "HHCPN109E Fout %2$s bij openen bestand \"%1$s\"\n" + +#: hsccmd.c:1704 +#, c-format +msgid "HHCPN110E invalid address: %s \n" +msgstr "" + +#: hsccmd.c:1712 +msgid "HHCPN111E loadcore rejected: CPU not stopped\n" +msgstr "" + +#: hsccmd.c:1717 +#, c-format +msgid "HHCPN112I Loading %s to location %x \n" +msgstr "" + +#: hsccmd.c:1721 +#, c-format +msgid "HHCPN113I %d bytes read from %s\n" +msgstr "" + +#: hsccmd.c:1744 +msgid "HHCPN114E loadtext rejected: filename missing\n" +msgstr "" + +#: hsccmd.c:1757 +#, c-format +msgid "HHCPN115E invalid address: %s \n" +msgstr "" + +#: hsccmd.c:1764 +msgid "HHCPN116E Address greater than mainstore size\n" +msgstr "" + +#: hsccmd.c:1771 +msgid "HHCPN117E loadtext rejected: CPU not stopped\n" +msgstr "" + +#: hsccmd.c:1778 +#, fuzzy, c-format +msgid "HHCPN118E Cannot open %s: %s\n" +msgstr "HHCPN118E Fout %2$s bij openen bestand \"%1$s\"\n" + +#: hsccmd.c:1789 +#, fuzzy, c-format +msgid "HHCPN119E Cannot read %s: %s\n" +msgstr "HHCPN119E Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: hsccmd.c:1813 +msgid "HHCPN120I Finished loading TEXT deck file\n" +msgstr "" + +#: hsccmd.c:1814 +#, c-format +msgid " Last 'TXT' record had address: %3.3X\n" +msgstr " Laatste 'TXT' record had adres: %3.3X\n" + +#: hsccmd.c:1845 +#, c-format +msgid "HHCPN121E ipending expects {+|-}debug as operand. %s is invalid\n" +msgstr "" + +#: hsccmd.c:1861 +msgid "HHCPN122I Interrupt checking debug mode set to " +msgstr "" + +#: hsccmd.c:1866 +msgid "ON\n" +msgstr "" + +#: hsccmd.c:1871 +msgid "OFF\n" +msgstr "" + +#: hsccmd.c:1876 +#, c-format +msgid "HHCPN123I CPU%4.4X: CPUint=%8.8X (r:%8.8X|s:%8.8X)&(Mask:%8.8X)\n" +msgstr "" + +#: hsccmd.c:1882 +#, c-format +msgid " CPU%4.4X: Clock comparator %spending\n" +msgstr "" + +#: hsccmd.c:1884 hsccmd.c:1888 hsccmd.c:1892 hsccmd.c:1896 hsccmd.c:1900 +#: hsccmd.c:1904 hsccmd.c:1932 hsccmd.c:1935 hsccmd.c:1938 hsccmd.c:1941 +#: hsccmd.c:1944 hsccmd.c:1947 hsccmd.c:1951 hsccmd.c:1955 +msgid "not " +msgstr "" + +#: hsccmd.c:1886 +#, c-format +msgid " CPU%4.4X: CPU timer %spending\n" +msgstr "" + +#: hsccmd.c:1890 +#, c-format +msgid " CPU%4.4X: Interval timer %spending\n" +msgstr "" + +#: hsccmd.c:1894 +#, c-format +msgid " CPU%4.4X: External call %spending\n" +msgstr "" + +#: hsccmd.c:1898 +#, c-format +msgid " CPU%4.4X: Emergency signal %spending\n" +msgstr "" + +#: hsccmd.c:1902 +#, c-format +msgid " CPU%4.4X: CPU interlock %sheld\n" +msgstr "" + +#: hsccmd.c:1906 +#, c-format +msgid " CPU%4.4X: CPU state is %s\n" +msgstr "" + +#: hsccmd.c:1914 +#, c-format +msgid " CPU%4.4X: No channelset connected\n" +msgstr " CPU%4.4X: Geen kanaalset aangesloten\n" + +#: hsccmd.c:1918 +#, c-format +msgid " CPU%4.4X: Connected to channelset %4.4X\n" +msgstr " CPU%4.4X: Verbonden met kanaalset %4.4X\n" + +#: hsccmd.c:1925 +#, c-format +msgid " Started mask %8.8X waiting mask %8.8X\n" +msgstr "" + +#: hsccmd.c:1928 +#, c-format +msgid " Broadcast count %d code %d\n" +msgstr "" + +#: hsccmd.c:1931 +#, c-format +msgid " Machine check interrupt %spending\n" +msgstr "" + +#: hsccmd.c:1934 +#, c-format +msgid " Service signal %spending\n" +msgstr "" + +#: hsccmd.c:1937 +#, c-format +msgid " Signaling facility %sbusy\n" +msgstr "" + +#: hsccmd.c:1940 +#, c-format +msgid " TOD lock %sheld\n" +msgstr "" + +#: hsccmd.c:1943 +#, c-format +msgid " Main lock %sheld\n" +msgstr "" + +#: hsccmd.c:1946 +#, c-format +msgid " Int lock %sheld\n" +msgstr "" + +#: hsccmd.c:1950 +#, c-format +msgid " Ioq lock %sheld\n" +msgstr "" + +#: hsccmd.c:1954 +#, c-format +msgid " I/O interrupt %spending\n" +msgstr "" + +#: hsccmd.c:1967 +#, c-format +msgid " DEV%4.4X: busy %s\n" +msgstr "" + +#: hsccmd.c:1969 +#, c-format +msgid " DEV%4.4X: reserved %s\n" msgstr "" -#: dasdcat.c:249 +#: hsccmd.c:1971 #, c-format -msgid "HHCDT005E unknown dataset name option: '%c'\n" +msgid " DEV%4.4X: suspended\n" msgstr "" -#: dasdcat.c:344 -#, fuzzy, c-format -msgid "HHCDT001E failed to open image %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" - -#: dasdcopy.c:101 +#: hsccmd.c:1973 #, c-format -msgid "Hercules %s copy program " +msgid " DEV%4.4X: I/O pending\n" msgstr "" -#: dasdcopy.c:184 -#, fuzzy, c-format -msgid "HHCDC001E %s: %s open error: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" - -#: dasdcopy.c:191 -#, fuzzy, c-format -msgid "HHCDC002E %s: %s read error: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" - -#: dasdcopy.c:254 -#, fuzzy, c-format -msgid "HHCDC003E %s: %s open failed\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" - -#: dasdcopy.c:267 +#: hsccmd.c:1975 #, c-format -msgid "HHCDC004E %s: ckd lookup failed for %4.4X cyls %d\n" +msgid " DEV%4.4X: PCI pending\n" msgstr "" -#: dasdcopy.c:286 +#: hsccmd.c:1977 #, c-format -msgid "HHCDC005E %s: fba lookup failed, blks %d\n" +msgid " DEV%4.4X: CRW pending\n" msgstr "" -#: dasdcopy.c:305 +#: hsccmd.c:1979 #, c-format -msgid "HHCDC006E %s: %s create failed\n" +msgid " DEV%4.4X: lock held\n" msgstr "" -#: dasdcopy.c:317 -#, fuzzy, c-format -msgid "HHCDC007E %s: %s open failed\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" - -#: dasdcopy.c:324 -#, c-format -msgid " %3d%% %7d of %d" +#: hsccmd.c:1982 +msgid " I/O interrupt queue: " msgstr "" -#: dasdcopy.c:345 -#, fuzzy, c-format -msgid "HHCDC008E %s: %s read error %s %d stat=%2.2X\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +#: hsccmd.c:1985 +msgid "(NULL)" +msgstr "" -#: dasdcopy.c:365 +#: hsccmd.c:1989 #, c-format -msgid "HHCDC009E %s: %s write error %s %d stat=%2.2X\n" +msgid " DEV%4.4X\n" msgstr "" -#: dasdcopy.c:376 -msgid "" -"\n" -"HHCDC010I Copy successful !!! \n" +#: hsccmd.c:2008 +msgid "HHCPN124I Instruction counts reset to zero.\n" msgstr "" -#: dasdcopy.c:418 -#, c-format -msgid "" -"usage: ckd2cckd [-options] ifile ofile\n" -"\n" -" copy a ckd dasd file to a compressed ckd dasd file\n" -"\n" -" ifile -- input ckd dasd file\n" -" ofile -- output compressed ckd dasd file\n" -"\n" -" options:\n" -" -v display program version and quit\n" -" -h display this help and quit\n" -" -q quiet mode, don't display status\n" -" -r replace the output file if it exists\n" -"%s%s -0 don't compress track images\n" -" -cyls n size of output file\n" -" -a output file will have alt cyls\n" +#: hsccmd.c:2012 +msgid "HHCPN125I Instruction count display:\n" msgstr "" -#: dasdcopy.c:438 dasdcopy.c:492 dasdcopy.c:552 -msgid " -z compress using zlib [default]\n" +#: hsccmd.c:2146 +msgid "HHCPN996E The script command requires a filename\n" msgstr "" -#: dasdcopy.c:445 dasdcopy.c:499 -msgid " -bz2 compress using bzip2\n" +#: hsccmd.c:2159 +msgid "HHCPN997E Only 1 script may be invoked from the panel at any time\n" msgstr "" -#: dasdcopy.c:453 -msgid "" -"usage: cckd2ckd [-options] ifile [sf=sfile] ofile\n" -"\n" -" copy a compressed ckd file to a ckd file\n" -"\n" -" ifile -- input compressed ckd dasd file\n" -" sfile -- input compressed ckd shadow file\n" -" (optional)\n" -" ofile -- output ckd dasd file\n" -"\n" -" options:\n" -" -v display program version and quit\n" -" -h display this help and quit\n" -" -q quiet mode, don't display status\n" -" -r replace the output file if it exists\n" -" -lfs create single large output file\n" -" -cyls n size of output file\n" -" -a output file will have alt cyls\n" +#: hsccmd.c:2174 +msgid "HHCPN998E Script aborted : user cancel request\n" +msgstr "" + +#: hsccmd.c:2194 +msgid "HHCPN998E Script aborted : Script recursion level exceeded\n" msgstr "" -#: dasdcopy.c:473 +#: hsccmd.c:2204 #, c-format -msgid "" -"usage: fba2cfba [-options] ifile ofile\n" -"\n" -" copy a fba dasd file to a compressed fba dasd file\n" -"\n" -" ifile -- input fba dasd file\n" -" ofile -- output compressed fba dasd file\n" -"\n" -" options:\n" -" -v display program version and quit\n" -" -h display this help and quit\n" -" -q quiet mode, don't display status\n" -" -r replace the output file if it exists\n" -"%s%s -0 don't compress track images\n" -" -blks n size of output file\n" +msgid "HHCPN007E Script file %s open failed: %s\n" msgstr "" -#: dasdcopy.c:507 -msgid "" -"usage: cfba2fba [-options] ifile [sf=sfile] ofile\n" -"\n" -" copy a compressed fba file to a fba file\n" -"\n" -" ifile -- input compressed fba dasd file\n" -" sfile -- input compressed fba shadow file\n" -" (optional)\n" -" ofile -- output fba dasd file\n" -"\n" -" options:\n" -" -v display program version and quit\n" -" -h display this help and quit\n" -" -q quiet mode, don't display status\n" -" -r replace the output file if it exists\n" -" -lfs create single large output file\n" -" -blks n size of output file\n" +#: hsccmd.c:2209 +#, c-format +msgid "HHCPN995E Script file %s not found\n" msgstr "" -#: dasdcopy.c:526 +#: hsccmd.c:2217 #, c-format -msgid "" -"usage: %s [-options] ifile [sf=sfile] ofile\n" -"\n" -" copy a dasd file to another dasd file\n" -"\n" -" ifile -- input dasd file\n" -" sfile -- input shadow file [optional]\n" -" ofile -- output dasd file\n" -"\n" -" options:\n" -" -v display program version and quit\n" -" -h display this help and quit\n" -" -q quiet mode, don't display status\n" -" -r replace the output file if it exists\n" -"%s%s -0 don't compress output\n" -" -blks n size of output fba file\n" -" -cyls n size of output ckd file\n" -" -a output ckd file will have alt cyls\n" -" -lfs output ckd file will be a single file\n" -" even if it exceeds 2G in size\n" -" -o type output file type (CKD, CCKD, FBA, CFBA)\n" +msgid "HHCPN008I Script file processing started using file %s\n" msgstr "" -#: dasdcopy.c:559 -msgid " -bz2 compress output using bzip2\n" +#: hsccmd.c:2225 +#, c-format +msgid "HHCPN009E Script file buffer malloc failed: %s\n" msgstr "" -#: dasdinit.c:231 -msgid "HHCDI001I DASD initialization successfully completed.\n" +#: hsccmd.c:2267 +#, c-format +msgid "HHCPN010W Ignoring invalid SCRIPT file pause statement: %s\n" msgstr "" -#: dat.h:1894 +#: hsccmd.c:2273 #, c-format -msgid "dat.c: Interval timer accessed: %2.2X%2.2X%2.2X%2.2X\n" +msgid "HHCPN011I Pausing SCRIPT file processing for %d seconds...\n" msgstr "" -#: external.c:251 -msgid "HHCCP023I External interrupt: Interrupt key\n" +#: hsccmd.c:2277 +msgid "HHCPN012I Resuming SCRIPT file processing...\n" msgstr "" -#: external.c:364 -msgid "HHCCP024I External interrupt: Clock comparator\n" +#: hsccmd.c:2295 +msgid "HHCPN013I EOF reached on SCRIPT file. Processing complete.\n" msgstr "" -#: external.c:375 +#: hsccmd.c:2300 #, c-format -msgid "HHCCP025I External interrupt: CPU timer=%16.16llX\n" +msgid "HHCPN014E I/O error reading SCRIPT file: %s\n" msgstr "" -#: external.c:392 -msgid "HHCCP026I External interrupt: Interval timer\n" +#: hsccmd.c:2305 +#, c-format +msgid "HHCPN999I Script %s aborted due to previous conditions\n" msgstr "" -#: fbadasd.c:90 +#: hsccmd.c:2333 #, fuzzy, c-format -msgid "HHCDA058E Read error in file %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgid "HHCPN126I Architecture mode = %s\n" +msgstr "HHCPN126I Achitectuur modus = %s\n" -#: fbadasd.c:93 -#, fuzzy, c-format -msgid "HHCDA059E Unexpected end of file in %s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +#: hsccmd.c:2342 +msgid "HHCPN127E All CPU's must be stopped to change architecture\n" +msgstr "" -#: fbadasd.c:111 +#: hsccmd.c:2362 #, fuzzy, c-format -msgid "HHCDA060E Read error in file %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgid "HHCPN128E Invalid architecture mode %s\n" +msgstr "HHCPN128E Ongeldige achitectuur modus %s\n" -#: fbadasd.c:114 +#: hsccmd.c:2373 #, fuzzy, c-format -msgid "HHCDA061E Unexpected end of file in %s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +msgid "HHCPN129I Architecture successfully set to %s mode.\n" +msgstr "HHCPN129I CPU%4.4X Architectuur Modus %s\n" -#: fbadasd.c:156 -#, c-format -msgid "HHCDA062E parameter %d is invalid: %s\n" +#: hsccmd.c:2398 +msgid "on" msgstr "" -#: fbadasd.c:291 -#, fuzzy, c-format -msgid "HHCDA068E Seek error in file %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" - -#: fbadasd.c:305 -#, fuzzy, c-format -msgid "HHCDA069E Read error in file %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +#: hsccmd.c:2401 +msgid "off" +msgstr "" -#: fbadasd.c:308 +#: hsccmd.c:2411 #, fuzzy, c-format -msgid "HHCDA070E Unexpected end of file in %s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +msgid "HHCPN130E Invalid frame address %8.8X\n" +msgstr "HHCPN130E Ongeldig frame adres %8.8X\n" -#: fbadasd.c:335 -#, fuzzy, c-format -msgid "HHCDA071E Seek error in file %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +#: hsccmd.c:2417 +#, c-format +msgid "HHCPN131I Frame %8.8X marked %s\n" +msgstr "" -#: fbadasd.c:348 -#, fuzzy, c-format -msgid "HHCDA072E Write error in file %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +#: hsccmd.c:2418 +msgid "usable" +msgstr "" -#: fbadasd.c:697 -#, c-format -msgid "HHCDA074E define extent data too short: %d bytes\n" +#: hsccmd.c:2418 +msgid "unusable" msgstr "" -#: fbadasd.c:707 -msgid "HHCDA075E second define extent in chain\n" +#: hsccmd.c:2430 +#, c-format +msgid "HHCPN132I Instruction tracing is now %s\n" msgstr "" -#: fbadasd.c:718 +#: hsccmd.c:2441 #, c-format -msgid "HHCDA076E invalid file mask %2.2X\n" +msgid "HHCPN133I Instruction stepping is now %s\n" msgstr "" -#: fbadasd.c:759 +#: hsccmd.c:2456 #, c-format -msgid "HHCDA077E invalid extent: first block %d, last block %d,\n" +msgid "HHCPN134I CKD KEY trace is now %s\n" msgstr "" -#: fbadasd.c:761 +#: hsccmd.c:2471 #, c-format -msgid " numblks %d, device size %d\n" +msgid "HHCPN135E Device number %4.4X not found\n" msgstr "" -#: general1.c:3287 -msgid "MVCL destructive overlap: " +#: hsccmd.c:2478 +#, c-format +msgid "HHCPN136I CCW tracing is now %s for device %4.4X\n" msgstr "" -#: hercifc.c:48 +#: hsccmd.c:2483 #, c-format -msgid "HHCIF001E %s: Must be called from within Hercules.\n" +msgid "HHCPN137I CCW stepping is now %s for device %4.4X\n" msgstr "" -#: hercifc.c:59 -#, fuzzy, c-format -msgid "HHCIF002E %s: Cannot obtain socket: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +#: hsccmd.c:2490 +msgid "HHCPN138E Unrecognized +/- command.\n" +msgstr "" -#: hercifc.c:74 -#, fuzzy, c-format -msgid "HHCIF003E %s: I/O error on read: %s.\n" -msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" +#: hsccmd.c:2540 +#, c-format +msgid "HHCHD100I Loading %s ...\n" +msgstr "" -#: hercifc.c:151 +#: hsccmd.c:2542 #, c-format -msgid "HHCIF004W %s: Unknown request: %8.8X.\n" +msgid "HHCHD101I Module %s loaded\n" msgstr "" -#: hercifc.c:164 -#, fuzzy, c-format -msgid "HHCIF005E %s: ioctl error doing %s on %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: hsccmd.c:2565 +#, c-format +msgid "HHCHD102I Unloading %s ...\n" +msgstr "" -#: hostinfo.c:64 +#: hsccmd.c:2567 #, c-format -msgid "Running on %s %s%s %s %s\n" -msgstr "Draaiend op %s %s%s %s %s\n" +msgid "HHCHD103I Module %s unloaded\n" +msgstr "" -#: hsccmd.c:110 -#, fuzzy -msgid "HHCPN015E Invalid device number\n" -msgstr "Ongeldig apparaat nummer\n" +#: hsccmd.c:2612 +msgid "HHCPN150W evm command is deprecated. Use \"ecpsvm\" instead\n" +msgstr "" -#: hsccmd.c:116 +#: hsccmd.c:2826 #, c-format -msgid "HHCPN016E Device number %4.4X not found\n" +msgid "HHCPN139E Command \"%s\" not found; enter '?' for list.\n" msgstr "" -#: hsccmd.c:124 -#, c-format -msgid "HHCPN017E Device %4.4X is not a printer device\n" +#: hsccmd.c:2846 +msgid "" +"HHCPN140I Valid panel commands are...\n" +"\n" msgstr "" -#: hsccmd.c:138 +#: hsccmd.c:2853 #, c-format -msgid "HHCPN018I Printer %4.4X started\n" +msgid " %-9.9s %s \n" msgstr "" -#: hsccmd.c:140 -#, c-format -msgid "HHCPN019E Printer %4.4X not started: busy or interrupt pending\n" +#: hsccmd.c:2859 +msgid "add shadow file" msgstr "" -#: hsccmd.c:143 -#, c-format -msgid "HHCPN020E Printer %4.4X not started: attention request rejected\n" +#: hsccmd.c:2860 +msgid "delete shadow file" msgstr "" -#: hsccmd.c:146 -#, c-format -msgid "HHCPN021E Printer %4.4X not started: subchannel not enabled\n" +#: hsccmd.c:2861 +msgid "rename shadow file" msgstr "" -#: hsccmd.c:202 -#, fuzzy -msgid "HHCPN022E Invalid device number\n" -msgstr "Ongeldig apparaat nummer\n" +#: hsccmd.c:2862 +msgid "compress shadow files" +msgstr "" -#: hsccmd.c:208 -#, c-format -msgid "HHCPN023E Device number %4.4X not found\n" +#: hsccmd.c:2863 +msgid "display shadow file stats" msgstr "" -#: hsccmd.c:216 -#, c-format -msgid "HHCPN024E Device %4.4X is not a printer device\n" +#: hsccmd.c:2867 +msgid "turn instruction tracing on/off" msgstr "" -#: hsccmd.c:223 -#, c-format -msgid "HHCPN025I Printer %4.4X stopped\n" +#: hsccmd.c:2868 +msgid "turn instruction stepping on/off" msgstr "" -#: hsccmd.c:295 -msgid "HHCPN026W Ignored. (external GUI active)\n" +#: hsccmd.c:2869 +msgid "turn CCW tracing on/off" msgstr "" -#: hsccmd.c:300 -#, c-format -msgid "HHCPN027I Automatic refresh %s.\n" +#: hsccmd.c:2870 +msgid "turn CCW stepping on/off" msgstr "" -#: hsccmd.c:301 -msgid "disabled" +#: hsccmd.c:2872 +msgid "turn CKD_KEY tracing on/off" msgstr "" -#: hsccmd.c:301 -msgid "enabled" +#: hsccmd.c:2874 +msgid "mark frames unusable/usable" msgstr "" -#: hsccmd.c:349 -#, fuzzy, c-format -msgid "HHCPN029E Invalid I/O delay value: %s\n" -msgstr "Ongeldige waarde: %s\n" +#: hsccmd.c:3041 +msgid "HHCPN141E Missing argument\n" +msgstr "" -#: hsccmd.c:354 +#: hsccmd.c:3049 #, c-format -msgid "HHCPN030I I/O delay = %d\n" +msgid "%s" msgstr "" -#: hsccmd.c:390 -#, fuzzy -msgid "HHCPN031E Missing device number\n" -msgstr "Geen apparaat nummer\n" - -#: hsccmd.c:396 -#, fuzzy, c-format -msgid "HHCPN032E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +#: hsccmd.c:3054 +msgid "HHCPN142I No additional help available.\n" +msgstr "" -#: hsccmd.c:402 +#: hscmisc.c:203 #, fuzzy, c-format -msgid "HHCPN033E Device number %4.4X not found\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgid "HHCPN143E Invalid value: %s\n" +msgstr "HHCPN143E Ongeldige waarde: %s\n" -#: hsccmd.c:408 +#: hscmisc.c:227 #, fuzzy, c-format -msgid "HHCPN034E Device %4.4X is not a CTCI or LCS device\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: hsccmd.c:415 -msgid "(error)\n" -msgstr "" +msgid "HHCPN144E Invalid operand: %s\n" +msgstr "HHCPN144E Ongeldig operand: %s\n" -#: hsccmd.c:439 -msgid "HHCPN035E store status rejected: CPU not stopped\n" -msgstr "" +#: hscmisc.c:239 +#, fuzzy, c-format +msgid "HHCPN145E Invalid range: %s\n" +msgstr "HHCPN145E Ongeldig bereik: %s\n" -#: hsccmd.c:468 +#: hscmisc.c:503 #, c-format -msgid "HHCPN036I TOD clock drag factor = %d\n" +msgid "Storage not accessible code = %4.4X\n" msgstr "" -#: hsccmd.c:501 -#, c-format -msgid "HHCPN037I Panel refresh rate = %d millisecond(s)\n" +#: hscmisc.c:511 hscmisc.c:520 +msgid "Adressing exception\n" msgstr "" -#: hsccmd.c:617 -#, fuzzy -msgid "HHCPN038I Restart key depressed\n" -msgstr "Restart key ingedrukt\n" +#: hscmisc.c:727 +#, c-format +msgid "%sInstruction fetch error\n" +msgstr "" -#: hsccmd.c:677 -#, fuzzy -msgid "HHCPN039E Missing argument\n" -msgstr "Geen apparaat nummer\n" +#: httpserv.c:66 +#, fuzzy, c-format +msgid "HHCHT011E html_include: Cannot open %s: %s\n" +msgstr "HHCHT011E html_include: Fout %2$s bij openen bestand \"%1$s\"\n" -#: hsccmd.c:683 +#: httpserv.c:68 #, c-format -msgid "HHCPN040I Setting breakpoint at %16.16llX\n" -msgstr "" +msgid "ERROR: Cannot open %s: %s\n" +msgstr "FOUT: Kan %s niet openen: %s\n" -#: hsccmd.c:701 -msgid "HHCPN041I Deleting breakpoint\n" +#: httpserv.c:264 +#, c-format +msgid "HHCHT012I cgi_var_dump: pointer(%p) name(%s) value(%s) type(%d)\n" msgstr "" -#: hsccmd.c:723 +#: httpserv.c:584 #, fuzzy -msgid "HHCPN042E Missing device number\n" -msgstr "Geen apparaat nummer\n" +msgid "HHCHT001I HTTP listener thread started: tid=" +msgstr "HHCCP012I Timer thread gestart: tid=%p, pid=%d\n" -#: hsccmd.c:729 +#: httpserv.c:617 httpserv.c:626 #, fuzzy, c-format -msgid "HHCPN043E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgid "HHCCF066E Invalid HTTPROOT: %s\n" +msgstr "HHCCA018E %4.4X:Bind fout: %s\n" -#: hsccmd.c:735 +#: httpserv.c:641 #, c-format -msgid "HHCPN044E Device number %4.4X not found\n" +msgid "HHCHT002E socket: %s\n" msgstr "" -#: hsccmd.c:742 -#, fuzzy, c-format -msgid "HHCPN045I Device %4.4X attention request raised\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: hsccmd.c:745 +#: httpserv.c:664 #, c-format -msgid "HHCPN046E Device %4.4X busy or interrupt pending\n" +msgid "HHCHT003W Waiting for port %u to become free\n" msgstr "" -#: hsccmd.c:748 +#: httpserv.c:671 #, c-format -msgid "HHCPN047E Device %4.4X attention request rejected\n" +msgid "HHCHT004E bind: %s\n" msgstr "" -#: hsccmd.c:751 +#: httpserv.c:680 #, c-format -msgid "HHCPN048E Device %4.4X subchannel not enabled\n" +msgid "HHCHT005E listen: %s\n" msgstr "" -#: hsccmd.c:757 +#: httpserv.c:684 #, c-format -msgid "HHCPN049W Are you sure you didn't mean 'ipl %4.4X' instead?\n" +msgid "HHCHT006I Waiting for HTTP requests on port %u\n" msgstr "" -#: hsccmd.c:776 -#, fuzzy -msgid "HHCPN050I Interrupt key depressed\n" -msgstr "Restart key ingedrukt\n" - -#: hsccmd.c:839 -#, fuzzy -msgid "HHCPN052E Missing device number\n" -msgstr "Geen apparaat nummer\n" - -#: hsccmd.c:847 -msgid "HHCPN053E ipl rejected: All CPU's must be stopped\n" +#: httpserv.c:709 +#, c-format +msgid "HHCHT007E select: %s\n" msgstr "" -#: hsccmd.c:873 -#, fuzzy -msgid "HHCPN054E Missing argument\n" -msgstr "Geen apparaat nummer\n" - -#: hsccmd.c:879 +#: httpserv.c:721 #, c-format -msgid "HHCPN055E Target CPU %s is invalid\n" +msgid "HHCHT008E accept: %s\n" msgstr "" -#: hsccmd.c:890 -#, fuzzy, c-format -msgid "HHCPN056E CPU%4.4X not configured\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" - -#: hsccmd.c:940 -msgid "open " +#: httpserv.c:727 +#, c-format +msgid "HHCHT009E fdopen: %s\n" msgstr "" -#: hsccmd.c:941 -msgid "busy " +#: httpserv.c:736 +#, c-format +msgid "HHCHT010E http_request create_thread: %s\n" msgstr "" -#: hsccmd.c:942 -msgid "pending " +#: ieee.c:403 +msgid "ebfpston: unexpectedly converting a NaN\n" msgstr "" -#: hsccmd.c:953 -#, c-format -msgid " (client %s (%s) connected)\n" +#: ieee.c:407 +msgid "ebfpston: unexpectedly converting an Infinite\n" msgstr "" -#: hsccmd.c:959 -msgid " (no one currently connected)\n" +#: ieee.c:462 +msgid "lbfpston: unexpectedly converting a NaN\n" msgstr "" -#: hsccmd.c:982 -#, fuzzy -msgid "HHCPN057E Missing argument(s)\n" -msgstr "Geen apparaat nummer\n" - -#: hsccmd.c:988 -#, fuzzy, c-format -msgid "HHCPN059E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" - -#: hsccmd.c:995 -#, fuzzy, c-format -msgid "Device type %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" - -#: hsccmd.c:1015 -#, fuzzy -msgid "HHCPN060E Missing device number\n" -msgstr "Geen apparaat nummer\n" - -#: hsccmd.c:1021 -#, fuzzy, c-format -msgid "HHCPN061E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" - -#: hsccmd.c:1040 -#, fuzzy -msgid "HHCPN062E Missing argument(s)\n" -msgstr "Geen apparaat nummer\n" +#: ieee.c:466 +msgid "lbfpston: unexpectedly converting an Infinite\n" +msgstr "" -#: hsccmd.c:1046 -#, fuzzy, c-format -msgid "HHCPN063E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +#: ieee.c:515 +msgid "sbfpston: unexpectedly converting a NaN\n" +msgstr "" -#: hsccmd.c:1052 -#, fuzzy, c-format -msgid "HHCPN064E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +#: ieee.c:519 +msgid "sbfpston: unexpectedly converting an Infinite\n" +msgstr "" -#: hsccmd.c:1071 -#, fuzzy -msgid "HHCPN065E Missing argument(s)\n" -msgstr "Geen apparaat nummer\n" +#: impl.c:280 +#, c-format +msgid "HHCIN001S Cannot register SIGINT handler: %s\n" +msgstr "" -#: hsccmd.c:1077 +#: impl.c:290 #, c-format -msgid "HHCPN066E Program interrupt number %s is invalid\n" +msgid "HHCIN002E Cannot suppress SIGPIPE signal: %s\n" msgstr "" -#: hsccmd.c:1084 +#: impl.c:312 #, c-format -msgid "HHCPN067E Program interrupt number out of range (%4.4X)\n" +msgid "HHCIN003S Cannot register SIGILL/FPE/SEGV/BUS/USR handler: %s\n" msgstr "" -#: hsccmd.c:1119 +#: impl.c:329 #, fuzzy, c-format -msgid "HHCPN068E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgid "HHCIN004S Cannot create watchdog thread: %s\n" +msgstr "HHCPN119E Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: hsccmd.c:1160 -#, fuzzy -msgid "HHCPN069E Missing device number\n" -msgstr "Geen apparaat nummer\n" +#: impl.c:343 +#, c-format +msgid "HHCIN005S Cannot create http_server thread: %s\n" +msgstr "" -#: hsccmd.c:1166 -#, fuzzy, c-format -msgid "HHCPN070E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +#: impl.c:357 +#, c-format +msgid "HHCIN006S Cannot create shared_server thread: %s\n" +msgstr "" -#: hsccmd.c:1172 +#: impl.c:372 #, c-format -msgid "HHCPN071E Device number %4.4X not found\n" +msgid "HHCIN007S Cannot create %4.4X connection thread: %s\n" msgstr "" -#: hsccmd.c:1202 +#: ipl.c:68 #, c-format -msgid "HHCPN072I %4.4X synchronous: %12lld asynchronous: %12lld\n" +msgid "HHCCP027E Device %4.4X not in configuration\n" msgstr "" -#: hsccmd.c:1213 -msgid "HHCPN073I No synchronous I/O devices found\n" +#: ipl.c:79 +msgid "HHCCP028E Device not connected to channelset\n" msgstr "" -#: hsccmd.c:1215 +#: ipl.c:130 #, c-format -msgid "HHCPN074I TOTAL synchronous: %12lld asynchronous: %12lld %3lld%%\n" +msgid "" +"HHCCP029E %s mode IPL failed: CSW status=%2.2X%2.2X\n" +" Sense=" msgstr "" -#: hsccmd.c:1256 -#, fuzzy -msgid "HHCPN075E Invalid max device threads value (must be -1 to n)\n" -msgstr "Ongeldig apparaat nummer\n" - -#: hsccmd.c:1263 +#: ipl.c:178 #, c-format msgid "" -"HHCPN076I Max device threads: %d, current: %d, most: %d, waiting: %d, max " -"exceeded: %d\n" +"HHCCP030E %s mode IPL failed: Invalid IPL PSW: %2.2X%2.2X%2.2X%2.2X %2.2X%" +"2.2X%2.2X%2.2X\n" msgstr "" -#: hsccmd.c:1284 -msgid "HHCPN077E Invalid max device threads value (must be -1 to n)\n" +#: ipl.c:283 +#, c-format +msgid "HHCCP031E Load from %s failed: %s\n" msgstr "" -#: hsccmd.c:1308 +#: ipl.c:333 #, c-format msgid "" -"HHCPN078E Max device threads %d current %d most %d waiting %d total I/Os " -"queued %d\n" +"HHCCP032E %s mode IPL failed: Invalid IPL PSW: %2.2X%2.2X%2.2X%2.2X %2.2X%" +"2.2X%2.2X%2.2X\n" msgstr "" -#: hsccmd.c:1342 -#, fuzzy -msgid "HHCPN079E Missing device number\n" -msgstr "Geen apparaat nummer\n" - -#: hsccmd.c:1349 -#, fuzzy -msgid "HHCPN080E Invalid device number\n" -msgstr "Ongeldig apparaat nummer\n" +#: ipl.c:483 +#, c-format +msgid "HHCCP033E load_main: %s: %s\n" +msgstr "" -#: hsccmd.c:1356 -msgid "HHCPN081E No cckd devices found\n" +#: ipl.c:492 +msgid "HHCCP034W load_main: terminated at end of mainstor\n" msgstr "" -#: hsccmd.c:1365 -#, fuzzy -msgid "HHCPN082E Invalid device number\n" -msgstr "Ongeldig apparaat nummer\n" +#: logger.c:167 +msgid "HHCLG014I logger thread terminating\n" +msgstr "" -#: hsccmd.c:1371 +#: logger.c:198 #, c-format -msgid "HHCPN083E Device number %4.4X not found\n" +msgid "HHCLG001E Error redirecting stdout: %s\n" msgstr "" -#: hsccmd.c:1377 +#: logger.c:225 #, c-format -msgid "HHCPN084E Device number %4.4X is not a cckd device\n" +msgid "HHCLG002E Error reading syslog pipe: %s\n" msgstr "" -#: hsccmd.c:1388 -#, fuzzy, c-format -msgid "HHCPN085I Processing device %4.4X\n" -msgstr "Geen apparaat nummer\n" - -#: hsccmd.c:1394 +#: logger.c:231 #, fuzzy, c-format -msgid "HHCPN086E Unexpected operand: %s\n" -msgstr "Ongeldig operand: %s\n" +msgid "HHCLG003E Error writing hardcopy log: %s\n" +msgstr "HHCLG003E Fout %s bij schrijven naar systeem log\n" -#: hsccmd.c:1408 -msgid "HHCPN087E Operand must be `merge' or `nomerge'\n" +#: logger.c:281 logger.c:293 +#, c-format +msgid "HHCLG004E Error duplicating stderr: %s\n" msgstr "" -#: hsccmd.c:1417 -msgid "HHCPN088E Shadow file name not specified\n" +#: logger.c:303 +#, c-format +msgid "HHCLG005E Error duplicating stdout: %s\n" msgstr "" -#: hsccmd.c:1423 -#, fuzzy, c-format -msgid "HHCPN089E Unexpected operand: %s\n" -msgstr "Ongeldig operand: %s\n" - -#: hsccmd.c:1432 -#, fuzzy, c-format -msgid "HHCPN090E Unexpected operand: %s\n" -msgstr "Ongeldig operand: %s\n" - -#: hsccmd.c:1439 -msgid "HHCPN091E Command must be `sf+', `sf-', `sf=', `sfc', or `sfd'\n" +#: logger.c:313 +#, c-format +msgid "HHCLG006E Duplicate error redirecting hardcopy log: %s\n" msgstr "" -#: hsccmd.c:1453 +#: logger.c:320 #, c-format -msgid "HHCPN092I %d devices processed\n" +msgid "HHCLG007S Hardcopy log fdopen failed: %s\n" msgstr "" -#: hsccmd.c:1473 -#, fuzzy -msgid "HHCPN093E Missing argument(s)\n" -msgstr "Geen apparaat nummer\n" - -#: hsccmd.c:1479 -#, fuzzy, c-format -msgid "HHCPN094E Device number %s is invalid\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" - -#: hsccmd.c:1485 +#: logger.c:331 #, c-format -msgid "HHCPN095E Device number %4.4X not found\n" +msgid "HHCLG008S logbuffer malloc failed: %s\n" msgstr "" -#: hsccmd.c:1497 +#: logger.c:338 #, c-format -msgid "HHCPN096E Device %4.4X busy or interrupt pending\n" +msgid "HHCLG009S Syslog message pipe creation failed: %s\n" msgstr "" -#: hsccmd.c:1513 -#, fuzzy, c-format -msgid "HHCPN097E Initialization failed for device %4.4X\n" -msgstr "HHC403I standaard waarde 'ascii' aan socket apparaat %4.4X toegekend\n" - -#: hsccmd.c:1516 -#, fuzzy, c-format -msgid "HHCPN098I Device %4.4X initialized\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: hsccmd.c:1545 -msgid "HHCPN099E savecore rejected: filename missing\n" +#: logger.c:346 +#, c-format +msgid "HHCLG010S Syslog write message pipe open failed: %s\n" msgstr "" -#: hsccmd.c:1566 -#, fuzzy, c-format -msgid "HHCPN100E savecore: invalid starting address: %s \n" -msgstr "Ongeldig frame adres %8.8X\n" +#: logger.c:354 +#, c-format +msgid "HHCLG011S Syslog read message pipe open failed: %s\n" +msgstr "" -#: hsccmd.c:1585 -#, fuzzy, c-format -msgid "HHCPN101E savecore: invalid ending address: %s \n" -msgstr "Ongeldig frame adres %8.8X\n" +#: logger.c:364 +#, c-format +msgid "HHCLG012E Cannot create logger thread: %s\n" +msgstr "" -#: hsccmd.c:1593 -msgid "HHCPN102E savecore rejected: CPU not stopped\n" +#: machchk.c:226 +#, c-format +msgid "HHCCP019I Machine Check code=%16.16llu\n" msgstr "" -#: hsccmd.c:1599 -#, fuzzy, c-format -msgid "HHCPN103E invalid range: %8.8X-%8.8X\n" -msgstr "Ongeldig bereik: %s\n" +#: machchk.c:290 +msgid "HHCCP020E signal USR2 received for undetermined device\n" +msgstr "" -#: hsccmd.c:1604 +#: machchk.c:294 #, c-format -msgid "HHCPN104I Saving locations %8.8X-%8.8X to %s\n" +msgid "HHCCP021E signal USR2 received for device %4.4X\n" msgstr "" -#: hsccmd.c:1609 +#: machchk.c:322 machchk.c:326 #, fuzzy, c-format -msgid "HHCPN105E savecore error creating %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgid "HHCCP017I CPU%4.4X: Machine check due to host error: %s\n" +msgstr "HHCCP007I CPU%4.4X Architectuur Modus %s\n" -#: hsccmd.c:1615 +#: machchk.c:361 machchk.c:365 #, fuzzy, c-format -msgid "HHCPN106E savecore error writing to %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgid "HHCCP018I CPU%4.4X: Check-Stop due to host error: %s\n" +msgstr "HHCCP007I CPU%4.4X Architectuur Modus %s\n" -#: hsccmd.c:1618 +#: panel.c:239 #, c-format -msgid "HHCPN107E savecore: unable to save %d bytes\n" +msgid "HHCLG013S Message pipe creation failed: %s\n" msgstr "" -#: hsccmd.c:1644 -msgid "HHCPN108E loadcore rejected: filename missing\n" +#: panel.c:250 +#, c-format +msgid "HHCLG014S Message pipe open failed: %s\n" msgstr "" -#: hsccmd.c:1652 -#, fuzzy, c-format -msgid "HHCPN109E Cannot open %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +#: panel.c:851 +#, fuzzy +msgid "HHCPN001I Control panel thread started: tid=" +msgstr "HHCPN001I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" -#: hsccmd.c:1665 -#, fuzzy, c-format -msgid "HHCPN110E invalid address: %s \n" -msgstr "Ongeldig bereik: %s\n" +#: panel.c:858 +#, c-format +msgid "HHCPN002S Cannot obtain keyboard buffer: %s\n" +msgstr "" -#: hsccmd.c:1673 -msgid "HHCPN111E loadcore rejected: CPU not stopped\n" +#: panel.c:868 +#, c-format +msgid "HHCPN003S Cannot obtain message buffer: %s\n" msgstr "" -#: hsccmd.c:1678 +#: panel.c:927 #, c-format -msgid "HHCPN112I Loading %s to location %x \n" +msgid "HHCPN004E select: %s\n" msgstr "" -#: hsccmd.c:1682 -#, fuzzy, c-format -msgid "HHCPN113I %d bytes read from %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +#: panel.c:942 +#, c-format +msgid "HHCPN005E keyboard read: %s\n" +msgstr "" -#: hsccmd.c:1705 -msgid "HHCPN114E loadtext rejected: filename missing\n" +#: panel.c:1333 +#, c-format +msgid "HHCPN006E message pipe read: %s\n" msgstr "" -#: hsccmd.c:1718 +#: printer.c:40 #, fuzzy, c-format -msgid "HHCPN115E invalid address: %s \n" -msgstr "Ongeldig bereik: %s\n" +msgid "HHCPR004E Error opening file %s: %s\n" +msgstr "HHCPR004E Fout %2$s bij openen van bestand \"%1$s\"\n" -#: hsccmd.c:1725 -msgid "HHCPN116E Address greater than mainstore size\n" +#: printer.c:56 +#, c-format +msgid "HHCPR005E %4.4X device initialization error: pipe: %s\n" msgstr "" -#: hsccmd.c:1732 -msgid "HHCPN117E loadtext rejected: CPU not stopped\n" +#: printer.c:65 +#, c-format +msgid "HHCPR006E %4.4X device initialization error: fork: %s\n" msgstr "" -#: hsccmd.c:1739 -#, fuzzy, c-format -msgid "HHCPN118E Cannot open %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" - -#: hsccmd.c:1750 -#, fuzzy, c-format -msgid "HHCPN119E Cannot read %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" - -#: hsccmd.c:1774 -msgid "HHCPN120I Finished loading TEXT deck file\n" +#: printer.c:74 +#, c-format +msgid "HHCPR007I pipe receiver (pid=%d) starting for %4.4X\n" msgstr "" -#: hsccmd.c:1775 -#, fuzzy, c-format -msgid " Last 'TXT' record had address: %3.3X\n" -msgstr "Laatste 'TXT' record had adres: %3.3X\n" +#: printer.c:86 +#, c-format +msgid "HHCPR008E %4.4X dup2 error: %s\n" +msgstr "" -#: hsccmd.c:1804 +#: printer.c:122 #, c-format -msgid "HHCPN121E ipending expects {+|-}debug as operand. %s is invalid\n" +msgid "HHCPR011I pipe receiver (pid=%d) terminating for %4.4X\n" msgstr "" -#: hsccmd.c:1820 -msgid "HHCPN122I Interrupt checking debug mode set to " +#: printer.c:128 +#, c-format +msgid "HHCPR012E %4.4X Unable to execute %s: %s\n" msgstr "" -#: hsccmd.c:1825 -msgid "ON\n" -msgstr "" +#: printer.c:163 +#, fuzzy, c-format +msgid "HHCPR003E %4.4X Error writing to %s: %s\n" +msgstr "HHCPR003E %$14.4X:Fout %3$s bij schrijven naar bestand \"%2$s\"\n" -#: hsccmd.c:1830 -msgid "OFF\n" +#: printer.c:165 +msgid "incomplete" msgstr "" -#: hsccmd.c:1835 +#: printer.c:184 #, c-format -msgid "HHCPN123I CPU%4.4X: CPUint=%8.8X (r:%8.8X|s:%8.8X)&(Mask:%8.8X)\n" +msgid "HHCPR001E File name missing or invalid for printer %4.4X\n" msgstr "" -#: hsccmd.c:1841 +#: printer.c:213 #, c-format -msgid " CPU%4.4X: Clock comparator %spending\n" +msgid "HHCPR002E Invalid argument for printer %4.4X: %s\n" msgstr "" -#: hsccmd.c:1843 hsccmd.c:1847 hsccmd.c:1851 hsccmd.c:1855 hsccmd.c:1859 -#: hsccmd.c:1863 hsccmd.c:1867 hsccmd.c:1897 hsccmd.c:1900 hsccmd.c:1903 -#: hsccmd.c:1906 hsccmd.c:1909 hsccmd.c:1912 hsccmd.c:1916 hsccmd.c:1920 -msgid "not " -msgstr "" +#: service.c:60 +#, fuzzy +msgid "HHCCP036E SCP not receiving priority messages\n" +msgstr "HHCCP036E SCP ontvangt geen prioriteits berichten\n" -#: hsccmd.c:1845 -#, c-format -msgid " CPU%4.4X: CPU timer %spending\n" +#: service.c:67 +#, fuzzy +msgid "HHCCP037E SCP not receiving commands\n" +msgstr "HHCCP037E SCP ontvangt geen commando's\n" + +#: service.c:74 +#, fuzzy +msgid "HHCCP038E No SCP command\n" +msgstr "HHCCP038E Geen SCP commando\n" + +#: service.c:85 +msgid "HHCCP039E Service Processor busy\n" msgstr "" -#: hsccmd.c:1849 +#: service.c:792 #, c-format -msgid " CPU%4.4X: Interval timer %spending\n" +msgid "HHCCP040I CPI: System Type: %s Name: %s Sysplex: %s\n" msgstr "" -#: hsccmd.c:1853 -#, c-format -msgid " CPU%4.4X: External call %spending\n" +#: service.c:796 +msgid "HHC770I Control Program Information:\n" msgstr "" -#: hsccmd.c:1857 +#: service.c:797 #, c-format -msgid " CPU%4.4X: Emergency signal %spending\n" +msgid "HHC771I System Type = %s\n" msgstr "" -#: hsccmd.c:1861 +#: service.c:798 #, c-format -msgid " CPU%4.4X: CPU %swaiting for interlock\n" +msgid "HHC772I System Name = %s\n" msgstr "" -#: hsccmd.c:1865 +#: service.c:799 #, c-format -msgid " CPU%4.4X: CPU interlock %sheld\n" +msgid "HHC773I Sysplex Name = %s\n" msgstr "" -#: hsccmd.c:1869 +#: service.c:800 #, c-format -msgid " CPU%4.4X: CPU state is %s\n" +msgid "HHC774I System Level = %16.16llX\n" msgstr "" -#: hsccmd.c:1877 +#: service.c:988 +#, fuzzy +msgid "HHCCP041I SYSCONS interface active\n" +msgstr "HHCCP041I SYSCONS interface actief\n" + +#: service.c:990 +#, fuzzy +msgid "HHCCP042I SYSCONS interface inactive\n" +msgstr "HHCCP042I SYSCONS interface inactief\n" + +#: service.c:1114 #, c-format -msgid " CPU%4.4X: No channelset connected\n" +msgid "CPU%4.4X: Vector Facility configured offline\n" msgstr "" -#: hsccmd.c:1881 +#: service.c:1145 #, c-format -msgid " CPU%4.4X: Connected to channelset %4.4X\n" +msgid "CPU%4.4X: Vector Facility configured online\n" msgstr "" -#: hsccmd.c:1888 +#: shared.c:199 #, c-format -msgid " Started mask %8.8X waiting mask %8.8X\n" +msgid "HHCSH001S parameter %d is invalid: %s\n" msgstr "" -#: hsccmd.c:1892 +#: shared.c:225 #, c-format -msgid " Broadcast mask %8.8X code %d\n" +msgid "HHCSH002W %4.4X connect pending to %s\n" msgstr "" -#: hsccmd.c:1896 +#: shared.c:243 #, c-format -msgid " Machine check interrupt %spending\n" +msgid "HHCSH003S %4.4X Error retrieving cylinders\n" msgstr "" -#: hsccmd.c:1899 +#: shared.c:256 #, c-format -msgid " Service signal %spending\n" +msgid "HHCSH004S %4.4X Error retrieving device characteristics\n" msgstr "" -#: hsccmd.c:1902 +#: shared.c:274 #, c-format -msgid " Signaling facility %sbusy\n" +msgid "HHCSH005S %4.4X Remote device %4.4X is a %4.4X\n" msgstr "" -#: hsccmd.c:1905 +#: shared.c:286 #, c-format -msgid " TOD lock %sheld\n" +msgid "HHCSH006S %4.4X Error retrieving device id\n" msgstr "" -#: hsccmd.c:1908 +#: shared.c:303 #, c-format -msgid " Main lock %sheld\n" +msgid "HHCSH007S %4.4X device type %4.4X not found in dasd table\n" msgstr "" -#: hsccmd.c:1911 +#: shared.c:315 #, c-format -msgid " Int lock %sheld\n" +msgid "HHCSH008S %4.4X control unit %s not found in dasd table\n" msgstr "" -#: hsccmd.c:1915 +#: shared.c:336 #, c-format -msgid " Ioq lock %sheld\n" +msgid "HHCSH009I %s cyls=%d heads=%d tracks=%d trklen=%d\n" msgstr "" -#: hsccmd.c:1919 +#: shared.c:447 #, c-format -msgid " I/O interrupt %spending\n" +msgid "HHCSH010S parameter %d is invalid: %s\n" msgstr "" -#: hsccmd.c:1926 +#: shared.c:473 #, c-format -msgid " DEV%4.4X: I/O pending\n" +msgid "HHCSH011I %4.4X connect pending to %s\n" msgstr "" -#: hsccmd.c:1928 +#: shared.c:488 #, c-format -msgid " DEV%4.4X: PCI pending\n" +msgid "HHCSH012S %4.4X Error retrieving fba origin\n" msgstr "" -#: hsccmd.c:1930 +#: shared.c:500 #, c-format -msgid " DEV%4.4X: CRW pending\n" +msgid "HHCSH013S %4.4X Error retrieving fba number blocks\n" msgstr "" -#: hsccmd.c:1932 +#: shared.c:512 #, c-format -msgid " DEV%4.4X: lock held\n" +msgid "HHCSH014S %4.4X Error retrieving fba block size\n" msgstr "" -#: hsccmd.c:1935 -msgid " I/O interrupt queue: " +#: shared.c:526 +#, c-format +msgid "HHCSH015S %4.4X Error retrieving device id\n" msgstr "" -#: hsccmd.c:1938 -msgid "(NULL)\n" +#: shared.c:535 +#, c-format +msgid "HHCSH016S %4.4X Remote device %4.4X is a %4.4X\n" msgstr "" -#: hsccmd.c:1941 +#: shared.c:547 #, c-format -msgid " DEV%4.4X\n" +msgid "HHCSH017S %4.4X Error retrieving device characteristics\n" msgstr "" -#: hsccmd.c:1960 -msgid "HHCPN124I Instruction counts reset to zero.\n" +#: shared.c:564 +#, c-format +msgid "HHCSH018S %4.4X device type %4.4X not found in dasd table\n" msgstr "" -#: hsccmd.c:1964 -msgid "HHCPN125I Instruction count display:\n" +#: shared.c:573 +#, c-format +msgid "HHCSH019I %s origin=%d blks=%d\n" msgstr "" -#: hsccmd.c:2082 -#, fuzzy, c-format -msgid "HHCPN126I Architecture mode = %s\n" -msgstr "Ongeldige achitectuur modus %s\n" - -#: hsccmd.c:2091 -msgid "HHCPN127E All CPU's must be stopped to change architecture\n" +#: shared.c:618 +#, c-format +msgid "HHCSH020E %4.4X error during channel program start\n" msgstr "" -#: hsccmd.c:2111 -#, fuzzy, c-format -msgid "HHCPN128E Invalid architecture mode %s\n" -msgstr "Ongeldige achitectuur modus %s\n" - -#: hsccmd.c:2122 -#, fuzzy, c-format -msgid "HHCPN129I Architecture successfully set to %s mode.\n" -msgstr "HHC630I CPU%4.4X Architectuur Modus %s\n" - -#: hsccmd.c:2147 -msgid "on" +#: shared.c:675 +#, c-format +msgid "HHCSH021E %4.4X error during channel program end\n" msgstr "" -#: hsccmd.c:2150 -msgid "off" +#: shared.c:780 +#, c-format +msgid "HHCSH022E %4.4X error reading track %d\n" msgstr "" -#: hsccmd.c:2160 -#, fuzzy, c-format -msgid "HHCPN130E Invalid frame address %8.8X\n" -msgstr "Ongeldig frame adres %8.8X\n" - -#: hsccmd.c:2166 +#: shared.c:792 #, c-format -msgid "HHCPN131I Frame %8.8X marked %s\n" +msgid "HHCSH023E %4.4X error reading track %d\n" msgstr "" -#: hsccmd.c:2167 -msgid "usable" +#: shared.c:991 +#, c-format +msgid "HHCSH024E %4.4X error reading block group %d\n" msgstr "" -#: hsccmd.c:2167 -msgid "unusable" +#: shared.c:1004 +#, c-format +msgid "HHCSH025E %4.4X error reading block group %d\n" msgstr "" -#: hsccmd.c:2179 +#: shared.c:1089 #, c-format -msgid "HHCPN132I Instruction tracing is now %s\n" +msgid "HHCSH026E %4.4X Error retrieving usage information\n" msgstr "" -#: hsccmd.c:2190 +#: shared.c:1160 #, c-format -msgid "HHCPN133I Instruction stepping is now %s\n" +msgid "HHCSH027E %4.4X error writing track %d\n" msgstr "" -#: hsccmd.c:2205 +#: shared.c:1173 #, c-format -msgid "HHCPN134I CKD KEY trace is now %s\n" +msgid "HHCSH028E %4.4X remote error writing track %d: %2.2X-%2.2X\n" msgstr "" -#: hsccmd.c:2220 +#: shared.c:1252 #, c-format -msgid "HHCPN135E Device number %4.4X not found\n" +msgid "HHCSH029E %4.4X socket failed: %s\n" msgstr "" -#: hsccmd.c:2227 -#, fuzzy, c-format -msgid "HHCPN136I CCW tracing is now %s for device %4.4X\n" -msgstr "HHC403I standaard waarde 'ascii' aan socket apparaat %4.4X toegekend\n" - -#: hsccmd.c:2232 -#, fuzzy, c-format -msgid "HHCPN137I CCW stepping is now %s for device %4.4X\n" -msgstr "HHC403I standaard waarde 'ascii' aan socket apparaat %4.4X toegekend\n" - -#: hsccmd.c:2239 -msgid "HHCPN138E Unrecognized +/- command.\n" +#: shared.c:1266 +#, c-format +msgid "HHCSH030E %4.4X socket failed: %s\n" msgstr "" -#: hsccmd.c:2425 +#: shared.c:1284 #, c-format -msgid "HHCPN139E Command \"%s\" not found; enter '?' for list.\n" +msgid "HHCSH031I %4.4X Connected to %s\n" msgstr "" -#: hsccmd.c:2445 -msgid "" -"HHCPN140I Valid panel commands are...\n" -" \n" +#: shared.c:1318 +#, c-format +msgid "HHCSH032E %4.4X Connect %s %d: %s\n" msgstr "" -#: hsccmd.c:2458 -msgid "add shadow file" +#: shared.c:1489 +#, c-format +msgid "HHCSH033E %4.4X send error %d for %2.2X-%2.2X: %s\n" msgstr "" -#: hsccmd.c:2459 -msgid "delete shadow file" +#: shared.c:1516 +#, c-format +msgid "HHCSH034E %4.4X Not connected to %s\n" msgstr "" -#: hsccmd.c:2460 -msgid "rename shadow file" +#: shared.c:1526 +#, c-format +msgid "HHCSH035E %4.4X recv error %d: %s\n" msgstr "" -#: hsccmd.c:2461 -msgid "compress shadow files" +#: shared.c:1538 +#, c-format +msgid "HHCSH036E %4.4X Remote error %2.2X-%2.2X: %s\n" msgstr "" -#: hsccmd.c:2462 -msgid "display shadow file stats" +#: shared.c:1644 +#, c-format +msgid "HHCSH037E uncompress error %d, off %d len %d\n" msgstr "" -#: hsccmd.c:2466 -msgid "turn instruction tracing on/off" +#: shared.c:1649 +msgid "HHCSH038E data compressed using libz, unsupported\n" msgstr "" -#: hsccmd.c:2467 -msgid "turn instruction stepping on/off" +#: shared.c:1667 +#, c-format +msgid "HHCSH039E decompress error %d, off %d len %d\n" msgstr "" -#: hsccmd.c:2468 -msgid "turn CCW tracing on/off" +#: shared.c:1672 +msgid "HHCSH040E data compressed using bzip2, unsupported\n" msgstr "" -#: hsccmd.c:2469 -msgid "turn CCW stepping on/off" +#: shared.c:2247 +#, c-format +msgid "HHCSH041E %4.4X send error %d id=%d: %s\n" msgstr "" -#: hsccmd.c:2471 -msgid "turn CKD_KEY tracing on/off" +#: shared.c:2286 +#, c-format +msgid "HHCSH042W %4.4X busy client being removed id=%d %s\n" msgstr "" -#: hsccmd.c:2473 -msgid "mark frames unusable/usable" +#: shared.c:2318 +#, c-format +msgid "HHCSH043I %s disconnected from %4.4X id=%d\n" msgstr "" -#: hsccmd.c:2622 -#, fuzzy -msgid "HHCPN141E Missing argument\n" -msgstr "Geen apparaat nummer\n" - -#: hsccmd.c:2635 -msgid "HHCPN142I No additional help available.\n" +#: shared.c:2387 +#, c-format +msgid "HHCSH0474 %s connect failed\n" msgstr "" -#: hscmisc.c:205 -#, fuzzy, c-format -msgid "HHCPN143E Invalid value: %s\n" -msgstr "Ongeldige waarde: %s\n" - -#: hscmisc.c:229 -#, fuzzy, c-format -msgid "HHCPN144E Invalid operand: %s\n" -msgstr "Ongeldig operand: %s\n" - -#: hscmisc.c:241 -#, fuzzy, c-format -msgid "HHCPN145E Invalid range: %s\n" -msgstr "Ongeldig bereik: %s\n" - -#: hscmisc.c:626 +#: shared.c:2464 #, c-format -msgid "%sInstruction fetch error\n" +msgid "HHCSH053I %s connected to %4.4X id=%d\n" msgstr "" -#: httpserv.c:64 +#: shared.c:2480 #, fuzzy, c-format -msgid "HHCHT011E html_include: Cannot open %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgid "HHCSH045I Shared device %4.4X thread started: tid=" +msgstr "HHCCP002I CPU%4.4X thread al gestart\n" -#: httpserv.c:66 +#: shared.c:2550 #, c-format -msgid "ERROR: Cannot open %s: %s\n" +msgid "HHCSH046E select: %s\n" msgstr "" -#: httpserv.c:262 +#: shared.c:2584 #, c-format -msgid "HHCHT012I cgi_var_dump: pointer(%p) name(%s) value(%s) type(%d)\n" +msgid "HHCSH047E %4.4X %s recv error id=%d\n" msgstr "" -#: httpserv.c:561 -#, fuzzy -msgid "HHCHT001I HTTP listener thread started: tid=" -msgstr "HHC620I CPU%4.4X thread gestart: tid=%8.8lX, pid=%d, prioriteit=%d\n" - -#: httpserv.c:570 +#: shared.c:2615 #, c-format -msgid "HHCHT002E socket: %s\n" +msgid "HHCSH048I Shared device %4.4X thread stopping\n" msgstr "" -#: httpserv.c:593 +#: shared.c:2643 #, c-format -msgid "HHCHT003W Waiting for port %u to become free\n" +msgid "HHCSH049I Shared device %d.%d thread started: tid=" msgstr "" -#: httpserv.c:600 +#: shared.c:2652 #, c-format -msgid "HHCHT004E bind: %s\n" +msgid "HHCSH050E inet socket: %s\n" msgstr "" -#: httpserv.c:609 +#: shared.c:2661 #, c-format -msgid "HHCHT005E listen: %s\n" +msgid "HHCSH051E unix socket: %s\n" msgstr "" -#: httpserv.c:613 +#: shared.c:2683 #, c-format -msgid "HHCHT006I Waiting for HTTP requests on port %u\n" +msgid "HHCSH052W Waiting for port %u to become free\n" msgstr "" -#: httpserv.c:638 +#: shared.c:2690 #, c-format -msgid "HHCHT007E select: %s\n" +msgid "HHCSH053E inet bind: %s\n" msgstr "" -#: httpserv.c:650 +#: shared.c:2705 #, c-format -msgid "HHCHT008E accept: %s\n" +msgid "HHCSH054E unix bind: %s\n" msgstr "" -#: httpserv.c:656 -#, fuzzy, c-format -msgid "HHCHT009E fdopen: %s\n" -msgstr "HHC760I %4.4X create_thread fout: %s" - -#: httpserv.c:665 -#, fuzzy, c-format -msgid "HHCHT010E http_request create_thread: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" - -#: ieee.c:392 -msgid "ebfpston: unexpectedly converting a NaN\n" -msgstr "" - -#: ieee.c:396 -msgid "ebfpston: unexpectedly converting an Infinite\n" -msgstr "" - -#: ieee.c:443 -msgid "lbfpston: unexpectedly converting a NaN\n" -msgstr "" - -#: ieee.c:447 -msgid "lbfpston: unexpectedly converting an Infinite\n" -msgstr "" - -#: ieee.c:488 -msgid "sbfpston: unexpectedly converting a NaN\n" -msgstr "" - -#: ieee.c:492 -msgid "sbfpston: unexpectedly converting an Infinite\n" -msgstr "" - -#: ipl.c:63 -#, fuzzy, c-format -msgid "HHCCP027E Device %4.4X not in configuration\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" - -#: ipl.c:74 -msgid "HHCCP028E Device not connected to channelset\n" -msgstr "" - -#: ipl.c:124 +#: shared.c:2715 #, c-format -msgid "HHCCP029E %s mode IPL failed: CSW status=%2.2X%2.2X\n" +msgid "HHCSH055E inet listen: %s\n" msgstr "" -#: ipl.c:126 -msgid " Sense=" +#: shared.c:2724 +#, c-format +msgid "HHCSH056E unix listen: %s\n" msgstr "" -#: ipl.c:174 +#: shared.c:2736 #, c-format -msgid "" -"HHCCP030E %s mode IPL failed: Invalid IPL PSW: %2.2X%2.2X%2.2X%2.2X %2.2X%" -"2.2X%2.2X%2.2X\n" +msgid "HHCSH057I Waiting for shared device requests on port %u\n" msgstr "" -#: ipl.c:278 -#, fuzzy, c-format -msgid "HHCCP031E Load from %s failed: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" - -#: ipl.c:328 +#: shared.c:2755 #, c-format -msgid "" -"HHCCP032E %s mode IPL failed: Invalid IPL PSW: %2.2X%2.2X%2.2X%2.2X %2.2X%" -"2.2X%2.2X%2.2X\n" +msgid "HHCSH058E select: %s\n" msgstr "" -#: ipl.c:478 +#: shared.c:2773 #, c-format -msgid "HHCCP033E load_main: %s: %s\n" +msgid "HHCSH059E accept: %s\n" msgstr "" -#: ipl.c:487 -msgid "HHCCP034W load_main: terminated at end of mainstor\n" +#: shared.c:2780 +#, c-format +msgid "HHCSH060E malloc size %d: %s\n" msgstr "" -#: machchk.c:229 +#: shared.c:2791 #, c-format -msgid "HHCCP019I Machine Check code=%16.16llu\n" +msgid "HHCSH061E serverConnect create_thread: %s\n" msgstr "" -#: machchk.c:291 -msgid "HHCCP020E signal USR2 received for undetermined device\n" +#: shared.c:2824 +msgid "HHCSH062E Invalid or missing argument 1\n" msgstr "" -#: machchk.c:295 -#, fuzzy, c-format -msgid "HHCCP021E signal USR2 received for device %4.4X\n" -msgstr "HHC403I standaard waarde 'ascii' aan socket apparaat %4.4X toegekend\n" - -#: machchk.c:323 machchk.c:327 -#, fuzzy, c-format -msgid "HHCCP017I CPU%4.4X: Machine check due to host error: %s\n" -msgstr "HHC630I CPU%4.4X Architectuur Modus %s\n" - -#: machchk.c:362 machchk.c:366 -#, fuzzy, c-format -msgid "HHCCP018I CPU%4.4X: Check-Stop due to host error: %s\n" -msgstr "HHC630I CPU%4.4X Architectuur Modus %s\n" - -#: panel.c:752 -#, fuzzy, c-format -msgid "HHCPN007E RC file %s open failed: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +#: shared.c:2833 +msgid "HHCSH063E Invalid or missing keyword 2\n" +msgstr "" -#: panel.c:758 +#: shared.c:2851 #, c-format -msgid "HHCPN008I RC file processing thread started using file %s\n" +msgid "HHCSH064E Invalid or missing value %s\n" msgstr "" -#: panel.c:765 +#: shared.c:2867 #, c-format -msgid "HHCPN009E RC file buffer malloc failed: %s\n" +msgid "HHCSH065E calloc() size=%d: %s\n" msgstr "" -#: panel.c:803 -#, fuzzy, c-format -msgid "HHCPN010W Ignoring invalid RC file pause statement: %s\n" -msgstr "HHC422I Optie %s niet geldig\n" - -#: panel.c:809 +#: shared.c:2893 #, c-format -msgid "HHCPN011I Pausing RC file processing for %d seconds...\n" +msgid "HHCSH066E Invalid or missing keyword %s\n" msgstr "" -#: panel.c:813 -msgid "HHCPN012I Resuming RC file processing...\n" +#: shared.c:2957 shared.c:2964 +msgid "HHCSH999E OPTION_SHARED_DEVICES not defined" msgstr "" -#: panel.c:826 -msgid "HHCPN013I EOF reached on RC file. Processing complete.\n" +#: sie.c:120 +msgid "SIE: state descriptor " msgstr "" -#: panel.c:828 -#, fuzzy, c-format -msgid "HHCPN014E I/O error reading RC file: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" - -#: panel.c:922 -#, fuzzy -msgid "HHCPN001I Control panel thread started: tid=" -msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" - -#: panel.c:929 -#, fuzzy, c-format -msgid "HHCPN002S Cannot obtain keyboard buffer: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" - -#: panel.c:939 -#, fuzzy, c-format -msgid "HHCPN003S Cannot obtain message buffer: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" - -#: panel.c:1046 -#, fuzzy, c-format -msgid "HHCPN004E select: %s\n" -msgstr "HHC760I %4.4X create_thread fout: %s" - -#: panel.c:1061 -#, fuzzy, c-format -msgid "HHCPN005E keyboard read: %s\n" -msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" - -#: panel.c:1925 -#, fuzzy, c-format -msgid "HHCSD001E Device %4.4X already bound to socket %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" - -#: panel.c:1936 -#, fuzzy, c-format -msgid "HHCSD002E bind_device malloc() failed for device %4.4X\n" -msgstr "HHC403I standaard waarde 'ascii' aan socket apparaat %4.4X toegekend\n" - -#: panel.c:1945 -#, fuzzy, c-format -msgid "HHCSD003E bind_device safe_strdup() failed for device %4.4X\n" -msgstr "HHC403I standaard waarde 'ascii' aan socket apparaat %4.4X toegekend\n" - -#: panel.c:1974 -#, fuzzy, c-format -msgid "HHCSD004I Device %4.4X bound to socket %s\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: panel.c:1994 -#, fuzzy, c-format -msgid "HHCSD005E Device %4.4X not bound to any socket\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +#: sie.c:231 +#, c-format +msgid "SIE: zone %d: mso=" +msgstr "" -#: panel.c:2003 -#, fuzzy, c-format -msgid "HHCSD006E Client %s (%s) still connected to device %4.4X (%s)\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +#: sie.c:231 +msgid " msl=" +msgstr "" -#: panel.c:2032 -#, fuzzy, c-format -msgid "HHCSD007I Device %4.4X unbound from socket %s\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +#: sie.c:532 +#, c-format +msgid "SIE: interception code %d\n" +msgstr "" -#: panel.c:2081 +#: sockdev.c:68 #, c-format msgid "HHCSD008E Socket pathname \"%s\" exceeds limit of %d\n" msgstr "" -#: panel.c:2092 -#, fuzzy, c-format +#: sockdev.c:79 +#, c-format msgid "HHCSD009E Error creating socket for %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgstr "" -#: panel.c:2105 -#, fuzzy, c-format +#: sockdev.c:92 +#, c-format msgid "HHCSD010E Failed to bind or listen on socket %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgstr "" -#: panel.c:2155 -#, fuzzy, c-format +#: sockdev.c:143 +#, c-format msgid "HHCSD011E Failed to determine IP address from %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgstr "" -#: panel.c:2173 -#, fuzzy, c-format +#: sockdev.c:161 +#, c-format msgid "HHCSD012E Failed to determine port number from %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgstr "" -#: panel.c:2185 -#, fuzzy, c-format +#: sockdev.c:173 +#, c-format msgid "HHCSD013E Error creating socket for %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: panel.c:2197 -#, fuzzy, c-format +#: sockdev.c:185 +#, c-format msgid "HHCSD014E Failed to bind or listen on socket %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgstr "" -#: panel.c:2304 +#: sockdev.c:259 #, c-format msgid "" "HHCSD015E Connect to device %4.4X (%s) rejected; device busy or interrupt " "pending\n" msgstr "" -#: panel.c:2315 +#: sockdev.c:270 #, c-format msgid "" "HHCSD016E Connect to device %4.4X (%s) rejected; client %s (%s) still " "connected\n" msgstr "" -#: panel.c:2328 +#: sockdev.c:284 #, fuzzy, c-format msgid "HHCSD017E Connect to device %4.4X (%s) failed: %s\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +msgstr "HHCSD017E %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: panel.c:2354 +#: sockdev.c:310 #, fuzzy, c-format msgid "HHCSD018I %s (%s) connected to device %4.4X (%s)\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: panel.c:2359 -#, fuzzy, c-format -msgid "HHCSD019I <unknown> connected to device %4.4X (%s)\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" - -#: printer.c:40 -#, fuzzy, c-format -msgid "HHCPR004E Error opening file %s: %s\n" -msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" +msgstr "HHCSD018I %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: printer.c:56 -#, c-format -msgid "HHCPR005E %4.4X device initialization error: pipe: %s\n" -msgstr "" - -#: printer.c:65 -#, c-format -msgid "HHCPR006E %4.4X device initialization error: fork: %s\n" -msgstr "" - -#: printer.c:74 +#: sockdev.c:315 #, c-format -msgid "HHCPR007I pipe receiver (pid=%d) starting for %4.4X\n" +msgid "HHCSD019I <unknown> connected to device %4.4X (%s)\n" msgstr "" -#: printer.c:86 -#, fuzzy, c-format -msgid "HHCPR008E %4.4X dup2 error: %s\n" -msgstr "HHC760I %4.4X create_thread fout: %s" - -#: printer.c:100 -#, fuzzy, c-format -msgid "HHCPR009E %4.4X dup2 error: %s\n" -msgstr "HHC760I %4.4X create_thread fout: %s" - -#: printer.c:109 -#, fuzzy, c-format -msgid "HHCPR010E %4.4X dup2 error: %s\n" -msgstr "HHC760I %4.4X create_thread fout: %s" +#: sockdev.c:386 +#, fuzzy +msgid "HHCSD020I Socketdevice listener thread started: tid=" +msgstr "HHCCP012I Timer thread gestart: tid=%p, pid=%d\n" -#: printer.c:146 +#: sockdev.c:417 #, c-format -msgid "HHCPR011I pipe receiver (pid=%d) terminating for %4.4X\n" -msgstr "" - -#: printer.c:152 -#, fuzzy, c-format -msgid "HHCPR012E %4.4X Unable to execute %s: %s\n" -msgstr "HHC402I Fout %2$s bij benaderen bestand \"%1$s\"\n" - -#: printer.c:187 -#, fuzzy, c-format -msgid "HHCPR003E %4.4X Error writing to %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" - -#: printer.c:189 -msgid "incomplete" +msgid "HHCSD021E select: %s\n" msgstr "" -#: service.c:496 -#, fuzzy -msgid "HHCCP036E SCP not receiving priority messages\n" -msgstr "HHC703I SCP ontvangt geen prioriteits berichten\n" - -#: service.c:503 -#, fuzzy -msgid "HHCCP037E SCP not receiving commands\n" -msgstr "HHC704I SCP ontvangt geen commando's\n" - -#: service.c:510 -#, fuzzy -msgid "HHCCP038E No SCP command\n" -msgstr "HHC705I Geen SCP commando\n" - -#: service.c:521 -msgid "HHCCP039E Service Processor busy\n" +#: sockdev.c:431 +msgid "HHCSD022I Socketdevice listener thread terminated\n" msgstr "" -#: service.c:1228 +#: sockdev.c:461 #, c-format -msgid "HHCCP040I CPI: System Type: %s Name: %s Sysplex: %s\n" -msgstr "" - -#: service.c:1232 -msgid "HHC770I Control Program Information:\n" +msgid "HHCSD023E Cannot create socketdevice thread: %s\n" msgstr "" -#: service.c:1233 +#: sockdev.c:472 #, c-format -msgid "HHC771I System Type = %s\n" +msgid "HHCSD001E Device %4.4X already bound to socket %s\n" msgstr "" -#: service.c:1234 +#: sockdev.c:483 #, c-format -msgid "HHC772I System Name = %s\n" +msgid "HHCSD002E bind_device malloc() failed for device %4.4X\n" msgstr "" -#: service.c:1235 +#: sockdev.c:492 #, c-format -msgid "HHC773I Sysplex Name = %s\n" +msgid "HHCSD003E bind_device safe_strdup() failed for device %4.4X\n" msgstr "" -#: service.c:1236 +#: sockdev.c:523 #, c-format -msgid "HHC774I System Level = %16.16llX\n" +msgid "HHCSD004I Device %4.4X bound to socket %s\n" msgstr "" -#: service.c:1253 +#: sockdev.c:544 #, c-format -msgid "HHC799I Unknown event received type = %2.2X\n" +msgid "HHCSD005E Device %4.4X not bound to any socket\n" msgstr "" -#: service.c:1426 -#, fuzzy -msgid "HHCCP041I SYSCONS interface active\n" -msgstr "HHC701I SYSCONS interface actief\n" - -#: service.c:1428 -#, fuzzy -msgid "HHCCP042I SYSCONS interface inactive\n" -msgstr "HHC702I SYSCONS interface inactief\n" - -#: service.c:1552 +#: sockdev.c:553 #, fuzzy, c-format -msgid "CPU%4.4X: Vector Facility configured offline\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" +msgid "HHCSD006E Client %s (%s) still connected to device %4.4X (%s)\n" +msgstr "HHCSD006E %s (%s) afgesloten van apparaat %4.4X (%s)\n" -#: service.c:1583 +#: sockdev.c:580 #, fuzzy, c-format -msgid "CPU%4.4X: Vector Facility configured online\n" -msgstr "HHC623I CPU%4.4X thread al gestart\n" - -#: service.c:1600 -#, c-format -msgid "Invalid service call command word:%8.8X SCCB=%8.8X\n" -msgstr "" - -#: sie.c:120 -msgid "SIE: state descriptor " -msgstr "" - -#: sie.c:234 -#, c-format -msgid "SIE: zone %d: mso=" -msgstr "" - -#: sie.c:234 -msgid " msl=" -msgstr "" - -#: sie.c:535 -#, c-format -msgid "SIE: interception code %d\n" -msgstr "" +msgid "HHCSD007I Device %4.4X unbound from socket %s\n" +msgstr "HHCSD007I %s (%s) afgesloten van apparaat %4.4X (%s)\n" #: stack.c:593 msgid "stack: Current stack entry at " @@ -3346,594 +6033,835 @@ msgstr "" msgid "stack: PSW=%2.2X%2.2X%2.2X%2.2X %2.2X%2.2X%2.2X%2.2X loaded from V:" msgstr "" -#: tapedev.c:281 +#: tapecopy.c:77 +#, c-format +msgid "HHCTC015I %s status: %8.8lX" +msgstr "" + +#: tapecopy.c:105 #, fuzzy, c-format -msgid "HHCTA001E Error opening %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgid "HHCTC016E Error reading status of %s: %s\n" +msgstr "HHCTC016E Fout %2$s bij lezen van bestand \"%1$s\"\n" -#: tapedev.c:314 +#: tapecopy.c:188 #, fuzzy, c-format -msgid "HHCTA002E Error seeking to offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgid "HHCTC001E Error opening %s: %s\n" +msgstr "HHCTC001E Fout %2$s bij openen bestand \"%1$s\"\n" + +#: tapecopy.c:197 +#, fuzzy, c-format +msgid "HHCTC002E Error reading status of %s: %s\n" +msgstr "HHCTC002E Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapecopy.c:207 +#, c-format +msgid "HHCTC003I %s device type: %s\n" +msgstr "" + +#: tapecopy.c:209 +#, c-format +msgid "HHCTC003I %s device type: 0x%lX\n" +msgstr "" + +#: tapecopy.c:218 +#, c-format +msgid "HHCTC004I %s tape density: %s\n" +msgstr "" + +#: tapecopy.c:221 +#, c-format +msgid "HHCTC004I %s tape density code: 0x%lX\n" +msgstr "" + +#: tapecopy.c:234 +#, c-format +msgid "HHCTC005E Error setting attributes for %s: %s\n" +msgstr "" + +#: tapecopy.c:245 +#, c-format +msgid "HHCTC006E Error rewinding %s: %s\n" +msgstr "" + +#: tapecopy.c:257 +#, c-format +msgid "HHCTC007E Error opening %s: %s\n" +msgstr "" + +#: tapecopy.c:279 +#, c-format +msgid "HHCTC008E Error reading %s: %s\n" +msgstr "" + +#: tapecopy.c:289 +#, c-format +msgid "HHCTC009I File %u: Blocks=%u, block size min=%u, max=%u\n" +msgstr "" + +#: tapecopy.c:308 +#, fuzzy, c-format +msgid "HHCTC010E Error writing %s: %s\n" +msgstr "HHCTC010E Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: tapecopy.c:324 +msgid "HHCTC011I End of tape\n" +msgstr "" + +#: tapecopy.c:344 +#, c-format +msgid "HHCTC012I %s\n" +msgstr "" + +#: tapecopy.c:367 +#, fuzzy, c-format +msgid "HHCTC013I Error writing %s: %s\n" +msgstr "HHCTC013I Fout %2$s bij lezen van bestand \"%1$s\"\n" + +#: tapecopy.c:376 +#, fuzzy, c-format +msgid "HHCTC014I Error writing %s: %s\n" +msgstr "HHCTC014I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" + +#: tapedev.c:351 +#, c-format +msgid "HHCTA996I %4.4x - AWS Tape %s closed\n" +msgstr "" -#: tapedev.c:330 +#: tapedev.c:430 #, fuzzy, c-format +msgid "HHCTA001E Error opening %s: %s\n" +msgstr "HHCTA001E Fout %2$s bij openen bestand \"%1$s\"\n" + +#: tapedev.c:461 tapedev.c:620 +#, c-format +msgid "HHCTA002E Error seeking to offset %8.8lX in file %s: %s\n" +msgstr "" + +#: tapedev.c:476 +#, c-format msgid "HHCTA003E Error reading block header at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:343 +#: tapedev.c:488 #, c-format msgid "" "HHCTA004E End of file (uninitialized tape) at offset %8.8lX in file %s\n" msgstr "" -#: tapedev.c:356 -#, fuzzy, c-format +#: tapedev.c:500 +#, c-format msgid "" -"HHCTA005E Unexpected end of file in block header at offset %8.8lX in file %" +"HHCTA004E Unexpected end of file in block header at offset %8.8lX in file %" "s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +msgstr "" -#: tapedev.c:416 -#, fuzzy, c-format -msgid "HHCTA006E Error reading data block at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: tapedev.c:556 +#, c-format +msgid "HHCTA003E Error reading data block at offset %8.8lX in file %s: %s\n" +msgstr "" -#: tapedev.c:429 -#, fuzzy, c-format +#: tapedev.c:568 +#, c-format msgid "" -"HHCTA007E Unexpected end of file in data block at offset %8.8lX in file %s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +"HHCTA004E Unexpected end of file in data block at offset %8.8lX in file %s\n" +msgstr "" -#: tapedev.c:484 -#, fuzzy, c-format -msgid "HHCTA008E Error seeking to offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: tapedev.c:655 tapedev.c:682 +#, c-format +msgid "HHCTA995E Media full condition reached at offset %8.8lX in file %s\n" +msgstr "" -#: tapedev.c:507 -#, fuzzy, c-format +#: tapedev.c:661 +#, c-format msgid "HHCTA009E Error writing block header at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:526 -#, fuzzy, c-format +#: tapedev.c:688 +#, c-format msgid "HHCTA010E Error writing data block at offset %8.8lX in file %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:578 -#, fuzzy, c-format +#: tapedev.c:739 +#, c-format msgid "HHCTA011E Error seeking to offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:601 -#, fuzzy, c-format +#: tapedev.c:770 +#, c-format msgid "HHCTA012E Error writing block header at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:830 -#, fuzzy, c-format +#: tapedev.c:1001 +#, c-format msgid "HHCTA013E Error opening %s: %s(%s)\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgstr "" + +#: tapedev.c:1047 +#, c-format +msgid "HHCTA075E Error seeking to start of %s: %s(%s)\n" +msgstr "" -#: tapedev.c:891 +#: tapedev.c:1080 #, c-format msgid "HHCTA014E End of file (uninitialized tape) at block %8.8X in file %s\n" msgstr "" -#: tapedev.c:901 -#, fuzzy, c-format +#: tapedev.c:1089 +#, c-format msgid "HHCTA015E Error reading data block at block %8.8X in file %s: %s(%s)\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:933 +#: tapedev.c:1131 #, c-format msgid "HHCTA016E Error writing data block at block %8.8X in file %s: %s(%s)\n" msgstr "" -#: tapedev.c:964 -#, fuzzy, c-format +#: tapedev.c:1147 +msgid "TAPE EOT Handling : max capacity exceeded\n" +msgstr "" + +#: tapedev.c:1150 +msgid "TAPE EOT Handling : max capacity enforced\n" +msgstr "" + +#: tapedev.c:1182 +#, c-format msgid "HHCTA017E Error writing tape mark at block %8.8X in file %s: %s(%s)\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1004 -#, fuzzy, c-format +#: tapedev.c:1222 +#, c-format msgid "HHCTA018E Error forward spacing at block %8.8X in file %s: %s(%s)\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1055 -#, fuzzy, c-format +#: tapedev.c:1277 +#, c-format msgid "HHCTA019E Error reading data block at block %8.8X in file %s: %s(%s)\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1088 -#, fuzzy, c-format +#: tapedev.c:1309 +#, c-format msgid "" "HHCTA020E Error forward spacing to next file at block %8.8X in file %s: %s(%" "s)\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1128 +#: tapedev.c:1373 #, c-format msgid "" "HHCTA021E Error back spacing to previous file at block %8.8X in file %s:\n" " %s(%s)\n" msgstr "" -#: tapedev.c:1166 -#, fuzzy, c-format +#: tapedev.c:1410 +#, c-format msgid "HHCTA022E Error reading status of %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1235 +#: tapedev.c:1431 +#, c-format +msgid "HHCTA023I %s\n" +msgstr "" + +#: tapedev.c:1502 #, fuzzy, c-format msgid "HHCTA024E Error opening %s: %s\n" -msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" +msgstr "HHCTA024E Fout %2$s bij openen van bestand \"%1$s\"\n" -#: tapedev.c:1252 -#, fuzzy, c-format +#: tapedev.c:1516 +#, c-format msgid "HHCTA025E Error reading status of %s: %s\n" -msgstr "HHC405I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1274 +#: tapedev.c:1535 #, c-format msgid "HHCTA026I %s device type: %s\n" msgstr "" -#: tapedev.c:1277 +#: tapedev.c:1538 #, c-format msgid "HHCTA027I %s device type: 0x%lX\n" msgstr "" -#: tapedev.c:1287 -#, fuzzy, c-format +#: tapedev.c:1548 +#, c-format msgid "HHCTA028I %s tape density: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1290 +#: tapedev.c:1551 #, c-format msgid "HHCTA029I %s tape density code: 0x%lX\n" msgstr "" -#: tapedev.c:1299 -#, fuzzy, c-format +#: tapedev.c:1560 +#, c-format msgid "HHCTA030E Error setting attributes for %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1313 -#, fuzzy, c-format +#: tapedev.c:1573 +#, c-format msgid "HHCTA031E Error rewinding %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1342 -#, fuzzy, c-format +#: tapedev.c:1601 +#, c-format msgid "HHCTA032E Error reading data block from %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1376 -#, fuzzy, c-format +#: tapedev.c:1635 +#, c-format msgid "HHCTA033E Error writing data block to %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1408 -#, fuzzy, c-format +#: tapedev.c:1685 +#, c-format msgid "HHCTA034E Error writing tapemark to %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1458 -#, fuzzy, c-format +#: tapedev.c:1753 +#, c-format msgid "HHCTA035E Forward space block error on %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1524 -#, fuzzy, c-format +#: tapedev.c:1835 +#, c-format msgid "HHCTA036E Backspace block error on %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1559 -#, fuzzy, c-format +#: tapedev.c:1869 +#, c-format msgid "HHCTA037E Forward space file error on %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1595 -#, fuzzy, c-format +#: tapedev.c:1932 +#, c-format msgid "HHCTA038E Backspace file error on %s: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgstr "" + +#: tapedev.c:1960 +#, c-format +msgid "HHCTA073E Error rewinding %s: %s\n" +msgstr "" + +#: tapedev.c:1979 +#, c-format +msgid "HHCTA076E Error unloading %s: %s\n" +msgstr "" -#: tapedev.c:1649 +#: tapedev.c:2025 #, c-format msgid "" "HHC232I Invalid filename %s: TDF files must be in the TAPES subdirectory\n" msgstr "" -#: tapedev.c:1661 -#, fuzzy, c-format +#: tapedev.c:2037 +#, c-format msgid "HHCTA039E Error opening TDF file %s: %s\n" -msgstr "HHC404I Fout %2$s bij openen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1670 -#, fuzzy, c-format +#: tapedev.c:2046 +#, c-format msgid "HHCTA040E %s fstat error: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1681 -#, fuzzy, c-format +#: tapedev.c:2057 +#, c-format msgid "HHCTA041E Cannot obtain buffer for TDF file %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1691 -#, fuzzy, c-format +#: tapedev.c:2067 +#, c-format msgid "HHCTA042E Error reading TDF file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1704 +#: tapedev.c:2080 #, c-format msgid "HHCTA043E %s is not a valid TDF file\n" msgstr "" -#: tapedev.c:1721 -#, fuzzy, c-format +#: tapedev.c:2099 +#, c-format msgid "HHCTA044E Cannot obtain buffer for TDF array: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1762 -#, fuzzy, c-format +#: tapedev.c:2147 +#, c-format msgid "HHCTA045E Filename or format missing in line %d of file %s\n" -msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +msgstr "" -#: tapedev.c:1774 -#, fuzzy, c-format +#: tapedev.c:2159 +#, c-format msgid "HHCTA046E Filename %s too long in line %d of file %s\n" -msgstr "HHC401I Bestandsnaam \"%2$s\" te lang (maximum=%1$ud)\n" +msgstr "" -#: tapedev.c:1826 +#: tapedev.c:2211 #, c-format msgid "HHCTA047E RECSIZE keyword missing in line %d of file %s\n" msgstr "" -#: tapedev.c:1839 +#: tapedev.c:2224 #, c-format msgid "HHCTA048E Invalid record size %s in line %d of file %s\n" msgstr "" -#: tapedev.c:1853 +#: tapedev.c:2238 #, c-format msgid "HHCTA049E Invalid record format %s in line %d of file %s\n" msgstr "" -#: tapedev.c:1902 +#: tapedev.c:2290 #, c-format msgid "HHCTA050E Attempt to access beyond end of tape %s\n" msgstr "" -#: tapedev.c:1919 +#: tapedev.c:2322 #, fuzzy, c-format msgid "HHCTA051E Error opening %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgstr "HHCTA051E Fout %2$s bij openen bestand \"%1$s\"\n" -#: tapedev.c:1959 -#, fuzzy, c-format +#: tapedev.c:2361 +#, c-format msgid "HHCTA052E Error seeking to offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1975 -#, fuzzy, c-format +#: tapedev.c:2376 +#, c-format msgid "HHCTA053E Error reading block header at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:1989 -#, fuzzy, c-format +#: tapedev.c:2389 +#, c-format msgid "" "HHCTA054E Unexpected end of file in block header at offset %8.8lX in file %" "s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +msgstr "" -#: tapedev.c:2015 +#: tapedev.c:2412 #, c-format msgid "HHCTA055E Invalid block header at offset %8.8lX in file %s\n" msgstr "" -#: tapedev.c:2084 -#, fuzzy, c-format +#: tapedev.c:2479 +#, c-format msgid "HHCTA056E Error reading data block at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:2098 -#, fuzzy, c-format +#: tapedev.c:2492 +#, c-format msgid "" "HHCTA057E Unexpected end of file in data block at offset %8.8lX in file %s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +msgstr "" -#: tapedev.c:2139 -#, fuzzy, c-format +#: tapedev.c:2530 +#, c-format msgid "HHCTA058E Error seeking to offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:2155 -#, fuzzy, c-format +#: tapedev.c:2545 +#, c-format msgid "HHCTA059E Error reading data block at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:2215 -#, fuzzy, c-format +#: tapedev.c:2603 +#, c-format msgid "HHCTA060E Error seeking to offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:2273 -#, fuzzy, c-format +#: tapedev.c:2660 +#, c-format msgid "HHCTA061E Error reading data block at offset %8.8lX in file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:2287 -#, fuzzy, c-format +#: tapedev.c:2672 +#, c-format msgid "" "HHCTA062E Unexpected end of file in data block at offset %8.8lX in file %s\n" -msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +msgstr "" -#: tapedev.c:2302 +#: tapedev.c:2684 #, c-format msgid "HHCTA063E Invalid zero length block at offset %8.8lX in file %s\n" msgstr "" -#: tapedev.c:2425 -#, fuzzy, c-format +#: tapedev.c:2850 +#, c-format msgid "HHCTA064E Error seeking to end of file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:2549 -#, fuzzy, c-format +#: tapedev.c:2973 +#, c-format msgid "HHCTA065E Error seeking to end of file %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +msgstr "" -#: tapedev.c:2717 +#: tapedev.c:3227 #, c-format -msgid "HHCTA066I Tape msg %4.4X: %c %s %s\n" +msgid "HHCTA100I %4.4X: Now Displays : %s\n" msgstr "" -#: tapedev.c:3082 +#: tapedev.c:3264 #, c-format -msgid "HHCTA072E Data chaining not supported for CCW %2.2X\n" +msgid "HHCTA099I %4.4X:Tape Mount Request - (%s)\n" msgstr "" -#: tapedev.c:3264 -#, fuzzy, c-format -msgid "HHCTA073E Error rewinding %s: %s\n" -msgstr "HHC407I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: tapedev.c:3276 +#, c-format +msgid "HHCTA099I %4.4X:Tape Presence - (%s)\n" +msgstr "" #: tapedev.c:3287 -#, fuzzy, c-format -msgid "HHCTA074E Error seeking to start of %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#, c-format +msgid "HHCTA099I %4.4X:Tape unmount/mount Request - (%s -> %s)\n" +msgstr "" -#: tapedev.c:3304 -#, fuzzy, c-format -msgid "HHCTA075E Error seeking to start of %s: %s(%s)\n" -msgstr "HHC407I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: tapedev.c:3888 +#, c-format +msgid "Mounted tape %s\n" +msgstr "" -#: tapedev.c:3466 -#, fuzzy, c-format -msgid "HHCTA076E Error unloading %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: tapedev.c:3903 +#, c-format +msgid "" +"HHCTA999E Device %4.4X : Unable to determine tape format type for %s : " +"Internal error : Regcomp error %s on index %d\n" +msgstr "" -#: tapedev.c:3479 -#, fuzzy, c-format -msgid "HHCTA077I Tape %4.4X unloaded\n" -msgstr "HHC420I %s (%s) afgesloten van apparaat %4.4X (%s)\n" +#: tapedev.c:3918 +#, c-format +msgid "" +"HHCTA999E Device %4.4X : Unable to determine tape format type for %s : " +"Internal error : Regexec error %s on index %d\n" +msgstr "" -#: tapedev.c:3826 -#, fuzzy, c-format -msgid "HHCTA078E Error rewinding %s: %s\n" -msgstr "HHC409I Fout %2$s bij lezen van bestand \"%1$s\"\n" +#: tapedev.c:3922 +#, c-format +msgid "HHCTA998I Device %4.4X : %s is a %s\n" +msgstr "" -#: tapedev.c:3842 -#, fuzzy, c-format -msgid "HHCTA079E Error seeking to start of %s: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: tapedev.c:3944 +#, c-format +msgid "XXXXXXXXX Device %4.4X : parameter: '%s'\n" +msgstr "" -#: tapedev.c:3859 -#, fuzzy, c-format -msgid "HHCTA080E Error seeking to start of %s: %s(%s)\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#: tapedev.c:3948 +#, c-format +msgid "HHCTA067E Device %4.4X : %s - Unrecognized parameter: '%s'\n" +msgstr "" -#: tapedev.c:3877 +#: tapedev.c:3965 #, c-format -msgid "HHCTA081I Locate block 0x%8.8lX on %4.4X\n" +msgid "HHCTA068E Method must be within %u-%u\n" msgstr "" -#: timer.c:284 -#, fuzzy -msgid "HHCCP012I Timer thread started: tid=" -msgstr "HHC650I Controle paneel thread gestart: tid=%8.8lX, pid=%d\n" +#: tapedev.c:3975 +#, c-format +msgid "HHCTA069E Level must be within %u-%u\n" +msgstr "" + +#: tapedev.c:3985 +#, c-format +msgid "HHCTA070E Chunksize must be within %u-%u\n" +msgstr "" + +#: tapedev.c:4021 +#, c-format +msgid "HHCTA071E Error in '%s' parameter\n" +msgstr "" + +#: tapedev.c:4061 +#, c-format +msgid "TAPE Autoloader - Adding global parm %s\n" +msgstr "" + +#: tapedev.c:4126 +#, c-format +msgid "TAPE Autoloader : Adding tape entry %s\n" +msgstr "" + +#: tapedev.c:4171 +#, c-format +msgid "TAPE : Autoloader file request fn=%s\n" +msgstr "" + +#: tapedev.c:4457 +#, c-format +msgid "Unsupported device type specified %4.4x\n" +msgstr "" + +#: tapedev.c:4660 +#, c-format +msgid "HHCTA072E Data chaining not supported for CCW %2.2X\n" +msgstr "" + +#: tapedev.c:4860 +#, c-format +msgid "HHCTA077I Tape %4.4X unloaded\n" +msgstr "" -#: timer.c:385 -msgid "HHCCP013I Timer thread ended\n" +#: tapedev.c:5094 +#, c-format +msgid "HHCTA081I Locate block 0x%8.8lX on %4.4X\n" msgstr "" -#: tuntap.c:102 +#: timer.c:308 #, fuzzy, c-format +msgid "HHCTT001W Timer thread set priority %d failed: %s\n" +msgstr "HHCCP002I CPU%4.4X thread al gestart\n" + +#: timer.c:315 +#, fuzzy +msgid "HHCTT002I Timer thread started: tid=" +msgstr "HHCCP012I Timer thread gestart: tid=%p, pid=%d\n" + +#: timer.c:422 +#, fuzzy +msgid "HHCTT003I Timer thread ended\n" +msgstr "HHCCP012I Timer thread gestart: tid=%p, pid=%d\n" + +#: tuntap.c:115 +#, c-format msgid "HHCTU001E Can not determine operating system: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgstr "" -#: tuntap.c:113 -#, fuzzy, c-format +#: tuntap.c:126 +#, c-format msgid "HHCTU002E Error opening TUN/TAP device: %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgstr "" -#: tuntap.c:137 -#, fuzzy, c-format +#: tuntap.c:150 +#, c-format msgid "HHCTU003E Error setting TUN/TAP mode: %s: %s\n" -msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +msgstr "" -#: tuntap.c:158 -#, fuzzy, c-format +#: tuntap.c:171 +#, c-format msgid "HHCTU004E Invalid TUN/TAP device name: %s\n" -msgstr "Ongeldig apparaat nummer\n" +msgstr "" -#: tuntap.c:195 -#, fuzzy, c-format +#: tuntap.c:208 +#, c-format msgid "HHCTU005E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +msgstr "" -#: tuntap.c:205 -#, fuzzy, c-format +#: tuntap.c:218 +#, c-format msgid "HHCTU006E %s: Invalid IP address: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgstr "" -#: tuntap.c:231 -#, fuzzy, c-format +#: tuntap.c:244 +#, c-format msgid "HHCTU007E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +msgstr "" -#: tuntap.c:241 -#, fuzzy, c-format +#: tuntap.c:254 +#, c-format msgid "HHCTU008E %s: Invalid destination address: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgstr "" -#: tuntap.c:267 -#, fuzzy, c-format +#: tuntap.c:280 +#, c-format msgid "HHCTU009E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +msgstr "" -#: tuntap.c:277 -#, fuzzy, c-format +#: tuntap.c:290 +#, c-format msgid "HHCTU010E %s: Invalid net mask: %s.\n" -msgstr "Ongeldig apparaat nummer\n" +msgstr "" -#: tuntap.c:304 -#, fuzzy, c-format +#: tuntap.c:317 +#, c-format msgid "HHCTU011E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +msgstr "" -#: tuntap.c:313 -#, fuzzy, c-format +#: tuntap.c:326 +#, c-format msgid "HHCTU012E %s: Invalid null or empty MTU.\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgstr "" -#: tuntap.c:322 -#, fuzzy, c-format +#: tuntap.c:335 +#, c-format msgid "HHCTU013E %s: Invalid MTU: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgstr "" -#: tuntap.c:351 -#, fuzzy, c-format +#: tuntap.c:364 +#, c-format msgid "HHCTU014E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +msgstr "" -#: tuntap.c:360 -#, fuzzy, c-format +#: tuntap.c:373 +#, c-format msgid "HHCTU015E %s: Invalid MAC address: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgstr "" -#: tuntap.c:388 -#, fuzzy, c-format +#: tuntap.c:401 +#, c-format msgid "HHCTU016E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +msgstr "" -#: tuntap.c:417 -#, fuzzy, c-format +#: tuntap.c:430 +#, c-format msgid "HHCTU017E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +msgstr "" -#: tuntap.c:430 -#, fuzzy, c-format +#: tuntap.c:443 +#, c-format msgid "HHCTU018E %s: Invalid destiniation address: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgstr "" -#: tuntap.c:441 -#, fuzzy, c-format +#: tuntap.c:454 +#, c-format msgid "HHCTU019E %s: Invalid net mask: %s.\n" -msgstr "Ongeldig apparaat nummer\n" +msgstr "" -#: tuntap.c:453 -#, fuzzy, c-format +#: tuntap.c:466 +#, c-format msgid "HHCTU020E %s: Invalid gateway address: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgstr "" -#: tuntap.c:481 -#, fuzzy, c-format +#: tuntap.c:494 +#, c-format msgid "HHCTU021E Invalid net device name specified: %s\n" -msgstr "Ongeldig apparaat nummer\n" +msgstr "" -#: tuntap.c:494 -#, fuzzy, c-format +#: tuntap.c:507 +#, c-format msgid "HHCTU022E %s: Invalid destiniation address: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgstr "" -#: tuntap.c:505 -#, fuzzy, c-format +#: tuntap.c:518 +#, c-format msgid "HHCTU023E %s: Invalid net mask: %s.\n" -msgstr "Ongeldig apparaat nummer\n" +msgstr "" -#: tuntap.c:516 -#, fuzzy, c-format +#: tuntap.c:529 +#, c-format msgid "HHCTU024E %s: Invalid gateway address: %s.\n" -msgstr "Ongeldig frame adres %8.8X\n" +msgstr "" -#: tuntap.c:564 -#, fuzzy, c-format +#: tuntap.c:576 +#, c-format msgid "HHCTU025E Call to socketpair failed: %s\n" -msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +msgstr "" -#: tuntap.c:578 +#: tuntap.c:590 #, fuzzy, c-format msgid "HHCTU026E Call to fork failed: %s\n" -msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +msgstr "HHCLC039E Fout %2$s bij openen bestand \"%1$s\"\n" -#: tuntap.c:594 +#: tuntap.c:621 #, fuzzy, c-format msgid "HHCTU027E execl error on %s: %s.\n" -msgstr "HHC419E Fout %2$s bij sluiten van bestand \"%1$s\"\n" +msgstr "HHCTA024E Fout %2$s bij openen van bestand \"%1$s\"\n" -#: version.c:143 +#: version.c:154 #, c-format msgid "%sVersion %s\n" msgstr "%sVersie %s\n" -#: version.c:151 +#: version.c:162 #, c-format msgid "Built on %s at %s\n" msgstr "" -#: version.c:155 +#: version.c:166 msgid "Build information:\n" msgstr "" +#: vm.c:793 +#, c-format +msgid "HHCVM001I *%s* panel command issued by guest\n" +msgstr "" + +#: vm.c:809 +#, c-format +msgid "HHCVM002I *%s* command complete\n" +msgstr "" + +#: vm.c:813 +msgid "HHCVM003I Host command processing disabled by configuration statement" +msgstr "" + +#: vm.c:815 +msgid "HHCVM004E Host command processing not included in engine build" +msgstr "" + +#: w32chan.c:188 +#, c-format +msgid "HHC762I malloc(DEVIOREQUEST) failed; device=%4.4X, strerror=\"%s\"\n" +msgstr "" + +#: w32chan.c:251 +msgid "HHC765I *WARNING* max device threads exceeded.\n" +msgstr "" + +#: w32chan.c:348 +#, c-format +msgid "HHC761I malloc(DEVTHREADPARMS) failed; device=%4.4X, strerror=\"%s\"\n" +msgstr "" + +#: w32chan.c:357 +#, c-format +msgid "" +"HHC763I CreateEvent(hShutdownEvent) failed; device=%4.4X, strerror=\"%s\"\n" +msgstr "" + +#: w32chan.c:367 +#, c-format +msgid "" +"HHC764I CreateEvent(hRequestQueuedEvent) failed; device=%4.4X, strerror=\"%s" +"\"\n" +msgstr "" + +#: w32chan.c:388 +#, c-format +msgid "" +"HHC760I fthread_create(DeviceThread) failed; device=%4.4X, strerror=\"%s\"\n" +msgstr "" + #, fuzzy -#~ msgid "HHCCP002I CPU%4.4X thread started: tid=%8.8lX, pid=%d, priority=%d\n" -#~ msgstr "" -#~ "HHC620I CPU%4.4X thread gestart: tid=%8.8lX, pid=%d, prioriteit=%d\n" +#~ msgid "HHCDL001E Cannot open %s: %s\n" +#~ msgstr "HHCDL001E Fout %2$s bij openen bestand \"%1$s\"\n" + +#, fuzzy +#~ msgid "HHCDL018E Cannot read VOL1 record\n" +#~ msgstr "HHDL018E Kan VOL1 record niet lezen\n" #, fuzzy -#~ msgid "LCS002E %4.4X invalid device name %s\n" -#~ msgstr "Ongeldig apparaat nummer\n" +#~ msgid "HHCDL019E Cannot read %s line %d: %s\n" +#~ msgstr "" +#~ "HHCDL019E Fout %2$s bij het lezen van regel %$2d in bestand \"%1$s\"\n" #, fuzzy -#~ msgid "LCS100W %4.4X: Error writing to %s: %s\n" -#~ msgstr "HHC423I Fout %2$s bij schrijven naar bestand \"%1$s\"\n" +#~ msgid "HHCDL020E Line too long in %s line %d\n" +#~ msgstr "HHCDL020E Regel %$2d in bestand \"%2$s\" te lang\n" -#~ msgid "TIO modification executed CC=1\n" -#~ msgstr "TIO modificatie uitgevoerd CC=1\n" +#, fuzzy +#~ msgid "HHCDL066E %s read error: %s\n" +#~ msgstr "HHCDL066E Fout %2$s bij lezen van bestand \"%1$s\"\n" #, fuzzy -#~ msgid "HHCxxxI savecore: %s: %s\n" -#~ msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +#~ msgid "HHCDL071E %s read error: %s\n" +#~ msgstr "HHCCL071E Fout %2$s bij lezan van bestand \"%1$s\"\n" #, fuzzy -#~ msgid "HHC304I Unexpected end of file in %s\n" -#~ msgstr "HHC40I Onverwacht einde van bestand \"%s\"\n" +#~ msgid "HHCDL072E %s read error: %s\n" +#~ msgstr "HHCDL072E Fout %2$s bij lezan van bestand \"%1$s\"\n" #, fuzzy -#~ msgid "HHC314I Seek error in file %s: %s\n" -#~ msgstr "HHC406I Fout %2$s bij zoeken in bestand \"%1$s\"\n" +#~ msgid "HHCDL073E %s read error: %s\n" +#~ msgstr "HHCDL073E Fout %2$s bij openen lezan van \"%1$s\"\n" -#~ msgid "HHC351I File name missing or invalid\n" -#~ msgstr "HHC351I Bestandsnaam niet opgegeven of ongeldig\n" +#, fuzzy +#~ msgid "HHCDL074E %s read error: %s\n" +#~ msgstr "HHCDL074E Fout %2$s bij openen lezan van \"%1$s\"\n" -#~ msgid "HHC421I File name missing or invalid\n" -#~ msgstr "HHC421I Bestandsnaam niet opgegeven of ongeldig\n" +#, fuzzy +#~ msgid "HHCDL075E %s read error: %s\n" +#~ msgstr "HHCDL075E Fout %2$s bij lezan van bestand \"%1$s\"\n" -#~ msgid "HHC423I Error opening file %s: %s\n" -#~ msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +#, fuzzy +#~ msgid "HHCDL090I End of directory\n" +#~ msgstr "HHCDL090I Einde van directory\n" #, fuzzy -#~ msgid "cckd2ckd: error opening input file %s: %s\n" -#~ msgstr "HHC423I Fout %2$s bij openen bestand \"%1$s\"\n" +#~ msgid "HHCDL091E Directory block record length is invalid\n" +#~ msgstr "HHCDL091E Lengte van directory block record ongeldig\n" diff --git a/printer.c b/printer.c index cbf8aeb..ee79bbf 100644 --- a/printer.c +++ b/printer.c @@ -93,23 +93,8 @@ pid_t pid; /* Child process identifier */ /* Close the original descriptor now duplicated to STDIN */ close (pipefd[0]); - /* Redirect STDOUT to the control panel message pipe */ - rc = dup2 (fileno(sysblk.msgpipew), STDOUT_FILENO); - if (rc != STDOUT_FILENO) - { - logmsg (_("HHCPR009E %4.4X dup2 error: %s\n"), - dev->devnum, strerror(errno)); - _exit(127); - } - - /* Redirect STDERR to the control panel message pipe */ - rc = dup2 (fileno(sysblk.msgpipew), STDERR_FILENO); - if (rc != STDERR_FILENO) - { - logmsg (_("HHCPR010E %4.4X dup2 error: %s\n"), - dev->devnum, strerror(errno)); - _exit(127); - } + /* Redirect stderr (screen) to hercules log task */ + dup2(STDOUT_FILENO, STDERR_FILENO); /* Relinquish any ROOT authority before calling shell */ SETMODE(TERM); @@ -123,17 +108,8 @@ pid_t pid; /* Child process identifier */ BYTE cmdline[256]; - snprintf(cmdline,256,"\"%s\" pid=%d dev=%4.4X extgui=%d", - dev->filename+1,getpid(),dev->devnum, -#ifdef EXTERNALGUI - extgui -#else /*!EXTERNALGUI*/ - 0 -#endif /*EXTERNALGUI*/ - ); - - fclose(stderr); - fclose(sysblk.msgpipew); + snprintf(cmdline,256,"\"%s\" pid=%d dev=%4.4X", + dev->filename+1,getpid(),dev->devnum); rc = system (cmdline); } @@ -205,7 +181,7 @@ int i; /* Array subscript */ if (argc == 0 || strlen(argv[0]) > sizeof(dev->filename)-1) { fprintf (stderr, - "HHCPR001E File name missing or invalid for printer %4.4X\n", + _("HHCPR001E File name missing or invalid for printer %4.4X\n"), dev->devnum); return -1; } @@ -213,6 +189,9 @@ int i; /* Array subscript */ /* Save the file name in the device block */ strcpy (dev->filename, argv[0]); + if(!sscanf(dev->typname,"%hx",&(dev->devtype))) + dev->devtype = 0x1403; + /* Initialize device dependent fields */ dev->fd = -1; dev->printpos = 0; @@ -231,7 +210,7 @@ int i; /* Array subscript */ continue; } - fprintf (stderr, "HHCPR002E Invalid argument for printer %4.4X: %s\n", + fprintf (stderr, _("HHCPR002E Invalid argument for printer %4.4X: %s\n"), dev->devnum, argv[i]); return -1; } @@ -704,10 +683,40 @@ BYTE c; /* Print character */ } /* end function printer_execute_ccw */ +#if defined(OPTION_DYNAMIC_LOAD) +static +#endif DEVHND printer_device_hndinfo = { &printer_init_handler, &printer_execute_ccw, &printer_close_device, &printer_query_device, - NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + +/* Libtool static name colision resolution */ +/* note : lt_dlopen will look for symbol & modulename_LTX_symbol */ +#if !defined(HDL_BUILD_SHARED) && defined(HDL_USE_LIBTOOL) +#define hdl_ddev hdt1403_LTX_hdl_ddev +#define hdl_depc hdt1403_LTX_hdl_depc +#define hdl_reso hdt1403_LTX_hdl_reso +#define hdl_init hdt1403_LTX_hdl_init +#define hdl_fini hdt1403_LTX_hdl_fini +#endif + +#if defined(OPTION_DYNAMIC_LOAD) +HDL_DEPENDENCY_SECTION; +{ + HDL_DEPENDENCY(HERCULES); + HDL_DEPENDENCY(DEVBLK); +} +END_DEPENDENCY_SECTION; + + +HDL_DEVICE_SECTION; +{ + HDL_DEVICE(1403, printer_device_hndinfo ); + HDL_DEVICE(3211, printer_device_hndinfo ); +} +END_DEVICE_SECTION; +#endif diff --git a/qdio.c b/qdio.c new file mode 100644 index 0000000..2e918b7 --- /dev/null +++ b/qdio.c @@ -0,0 +1,108 @@ +/* QDIO.C (c) Copyright Jan Jaeger, 2003 */ +/* Queued Direct Input Output */ + +/* This module contains the Signal Adapter instruction */ +/* and the Establish Queues CCW */ + +#include "hercules.h" + +#include "opcode.h" + +#include "inline.h" + +#if defined(FEATURE_QUEUED_DIRECT_IO) + +/*-------------------------------------------------------------------*/ +/* B274 SIGA - Signal Adapter [S] */ +/*-------------------------------------------------------------------*/ +DEF_INST(signal_adapter) +{ +int b2; +RADR effective_addr2; +DEVBLK *dev; /* -> device block */ + + S(inst, execflag, regs, b2, effective_addr2); + + PRIV_CHECK(regs); + + SIE_INTERCEPT(regs); + + /* Specification exception if invalid function code */ + if(regs->GR_L(0) > SIGA_FC_MAX) + ARCH_DEP(program_interrupt) (regs, PGM_SPECIFICATION_EXCEPTION); + + /* Operand exception if reg 1 bits 0-15 not X'0001' */ + if ( regs->GR_LHH(1) != 0x0001 ) + ARCH_DEP(program_interrupt) (regs, PGM_OPERAND_EXCEPTION); + + /* Locate the device block for this subchannel */ + dev = find_device_by_subchan (regs->GR_LHL(1)); + + /* Condition code 3 if subchannel does not exist, + is not valid, or is not enabled or is not a QDIO subchannel */ + if (dev == NULL + || (dev->pmcw.flag5 & PMCW5_V) == 0 + || (dev->pmcw.flag5 & PMCW5_E) == 0 + || (dev->pmcw.flag4 & PMCW4_Q) == 0) + { +#if defined(_FEATURE_QUEUED_DIRECT_IO_ASSIST) + SIE_INTERCEPT(regs); +#endif + regs->psw.cc = 3; + return; + } + + /* ZZ INCOMPLETE: + This code will never be reached as no devices support QDIO yet */ + + /* Obtain the device lock */ + obtain_lock (&dev->lock); + + /* Check that device is QDIO active */ + if ((dev->scsw.flag2 & SCSW2_Q) == 0) + { + release_lock (&dev->lock); + regs->psw.cc = 1; + return; + } + + switch(regs->GR_L(0)) { + + case SIGA_FC_R: + /* ZZ INCOMPLETE */ + regs->psw.cc = 0; + break; + + case SIGA_FC_W: + /* ZZ INCOMPLETE */ + regs->psw.cc = 0; + break; + + case SIGA_FC_S: + /* No signalling required for sync requests as we emulate + a real machine */ + regs->psw.cc = 0; + break; + + } + + release_lock (&dev->lock); + +} +#endif /*defined(FEATURE_QUEUED_DIRECT_IO)*/ + + +#if !defined(_GEN_ARCH) + +#if defined(_ARCHMODE2) + #define _GEN_ARCH _ARCHMODE2 + #include "qdio.c" +#endif + +#if defined(_ARCHMODE3) + #undef _GEN_ARCH + #define _GEN_ARCH _ARCHMODE3 + #include "qdio.c" +#endif + +#endif /*!defined(_GEN_ARCH)*/ diff --git a/service.c b/service.c index 3493874..f40a27a 100644 --- a/service.c +++ b/service.c @@ -27,453 +27,17 @@ #include "inline.h" -#if !defined(_SERVICE_C) - -#define _SERVICE_C - -/*-------------------------------------------------------------------*/ -/* Service Call Logical Processor command word definitions */ -/*-------------------------------------------------------------------*/ -#define SCLP_READ_SCP_INFO 0x00020001 -#define SCLP_READ_CHP_INFO 0x00030001 -#define SCLP_READ_CSI_INFO 0x001C0001 +#include "service.h" -#define SCLP_READ_XST_MAP 0x00250001 -#define SCLP_WRITE_EVENT_DATA 0x00760005 -#define SCLP_READ_EVENT_DATA 0x00770005 -#define SCLP_WRITE_EVENT_MASK 0x00780005 - -#define SCLP_DECONFIGURE_CPU 0x00100001 -#define SCLP_CONFIGURE_CPU 0x00110001 - -#define SCLP_DISCONNECT_VF 0x001A0001 -#define SCLP_CONNECT_VF 0x001B0001 - -#define SCLP_COMMAND_MASK 0xFFFF00FF -#define SCLP_COMMAND_CLASS 0x000000FF -#define SCLP_RESOURCE_MASK 0x0000FF00 -#define SCLP_RESOURCE_SHIFT 8 - -/*-------------------------------------------------------------------*/ -/* Service Call Control Block structure definitions */ -/*-------------------------------------------------------------------*/ -typedef struct _SCCB_HEADER { - HWORD length; /* Total length of SCCB */ - BYTE flag; /* Flag byte */ - BYTE resv1[2]; /* Reserved */ - BYTE type; /* Request type */ - BYTE reas; /* Reason code */ - BYTE resp; /* Response class code */ - } SCCB_HEADER; - -/* Bit definitions for SCCB header flag byte */ -#define SCCB_FLAG_SYNC 0x80 /* Synchronous request */ - -/* Bit definitions for SCCB header request type */ -#define SCCB_TYPE_VARIABLE 0x80 /* Variable request */ - -/* Bit definitions for SCCB header reason code */ -#define SCCB_REAS_NONE 0x00 /* No reason */ -#define SCCB_REAS_NOT_PGBNDRY 0x01 /* SCCB crosses page boundary*/ -#define SCCB_REAS_ODD_LENGTH 0x02 /* Length not multiple of 8 */ -#define SCCB_REAS_TOO_SHORT 0x03 /* Length is inadequate */ -#define SCCB_REAS_NOACTION 0x02 /* Resource in req. state */ -#define SCCB_REAS_STANDBY 0x04 /* Resource in standby state */ -#define SCCB_REAS_INVALID_CMD 0x01 /* Invalid SCLP command code */ -#define SCCB_REAS_INVALID_RSCP 0x03 /* Invalid resource in parm */ -#define SCCB_REAS_IMPROPER_RSC 0x05 /* Resource in improper state*/ -#define SCCB_REAS_INVALID_RSC 0x09 /* Invalid resource */ - -/* Bit definitions for SCCB header response class code */ -#define SCCB_RESP_BLOCK_ERROR 0x00 /* Data block error */ -#define SCCB_RESP_INFO 0x10 /* Information returned */ -#define SCCB_RESP_COMPLETE 0x20 /* Command complete */ -#define SCCB_RESP_BACKOUT 0x40 /* Command backed out */ -#define SCCB_RESP_REJECT 0xF0 /* Command reject */ - -// #ifdef FEATURE_SYSTEM_CONSOLE -#define SCCB_REAS_NO_EVENTS 0x60 /* No outstanding EVENTs */ -#define SCCB_RESP_NO_EVENTS 0xF0 -#define SCCB_REAS_EVENTS_SUP 0x62 /* All events suppressed */ -#define SCCB_RESP_EVENTS_SUP 0xF0 -#define SCCB_REAS_INVALID_MASK 0x70 /* Invalid events mask */ -#define SCCB_RESP_INVALID_MASK 0xF0 -#define SCCB_REAS_MAX_BUFF 0x71 /* Buffer exceeds maximum */ -#define SCCB_RESP_MAX_BUFF 0xF0 -#define SCCB_REAS_BUFF_LEN_ERR 0x72 /* Buffer len verification */ -#define SCCB_RESP_BUFF_LEN_ERR 0xF0 -#define SCCB_REAS_SYNTAX_ERROR 0x73 /* Buffer syntax error */ -#define SCCB_RESP_SYNTAX_ERROR 0xF0 -#define SCCB_REAS_INVALID_MSKL 0x74 /* Invalid mask length */ -#define SCCB_RESP_INVALID_MSKL 0xF0 -#define SCCB_REAS_EXCEEDS_SCCB 0x75 /* Exceeds SCCB max capacity */ -#define SCCB_RESP_EXCEEDS_SCCB 0xF0 -// #endif /*FEATURE_SYSTEM_CONSOLE*/ - -/* SCP information data area */ -typedef struct _SCCB_SCP_INFO { - HWORD realinum; /* Number of real storage - increments installed */ - BYTE realiszm; /* Size of each real storage - increment in MB */ - BYTE realbszk; /* Size of each real storage - block in KB */ - HWORD realiint; /* Real storage increment - block interleave interval */ - HWORD resv2; /* Reserved */ - HWORD numcpu; /* Number of CPUs installed */ - HWORD offcpu; /* Offset from start of SCCB - to CPU information array */ - HWORD numhsa; /* Number of HSAs */ - HWORD offhsa; /* Offset from start of SCCB - to HSA information array */ - BYTE loadparm[8]; /* Load parameter */ - FWORD xpndinum; /* Number of expanded storage - increments installed */ - FWORD xpndsz4K; /* Number of 4KB blocks in an - expanded storage increment*/ - HWORD xpndenum; /* Number of expanded storage - elements installed */ - HWORD resv3; /* Reserved */ - HWORD vectssiz; /* Vector section size */ - HWORD vectpsum; /* Vector partial sum number */ - BYTE ifm[8]; /* Installed facilities */ - BYTE resv4[8]; /* Reserved */ - HWORD maxresgp; /* Maximum resource group */ - BYTE resv5[6]; /* Reserved */ - HWORD nummpf; /* Number of entries in MPF - information array */ - HWORD offmpf; /* Offset from start of SCCB - to MPF information array */ - BYTE resv6[4]; /* Reserved */ - BYTE cfg[6]; /* Config characteristics */ - FWORD rcci; /* Capacity */ - BYTE resv7; /* Reserved */ - BYTE numcrl; /* Max #of copy and reassign - list elements allowed */ - FWORD etrtol; /* ETR sync check tolerance */ - BYTE resv60[3]; - BYTE maxvm; /* Max guest storage size - >= 31 and <= 64 (2**pow)-1 - is the max supported - guest real size. 0 means - not constrained. */ - FWORD grzm; /* Addess increment size in - units of 1M, valid only - if realiszm is zero */ - DWORD grnmx; /* Maximum increment number - when it is larger then - 64K or when ESAME is on */ - BYTE resv8[16]; /* Reserved */ - } SCCB_SCP_INFO; - -/* Bit definitions for installed facilities */ -#define SCCB_IFM0_CHANNEL_PATH_INFORMATION 0x80 -#define SCCB_IFM0_CHANNEL_PATH_SUBSYSTEM_COMMAND 0x40 -#define SCCB_IFM0_CHANNEL_PATH_RECONFIG 0x20 -#define SCCB_IFM0_CPU_INFORMATION 0x08 -#define SCCB_IFM0_CPU_RECONFIG 0x04 -#define SCCB_IFM1_SIGNAL_ALARM 0x80 -#define SCCB_IFM1_WRITE_OPERATOR_MESSAGE 0x40 -#define SCCB_IFM1_STORE_STATUS_ON_LOAD 0x20 -#define SCCB_IFM1_RESTART_REASONS 0x10 -#define SCCB_IFM1_INSTRUCTION_ADDRESS_TRACE_BUFFER 0x08 -#define SCCB_IFM1_LOAD_PARAMETER 0x04 -#define SCCB_IFM1_READ_AND_WRITE_DATA 0x02 -#define SCCB_IFM2_REAL_STORAGE_INCREMENT_RECONFIG 0x80 -#define SCCB_IFM2_REAL_STORAGE_ELEMENT_INFO 0x40 -#define SCCB_IFM2_REAL_STORAGE_ELEMENT_RECONFIG 0x20 -#define SCCB_IFM2_COPY_AND_REASSIGN_STORAGE 0x10 -#define SCCB_IFM2_EXTENDED_STORAGE_USABILITY_MAP 0x08 -#define SCCB_IFM2_EXTENDED_STORAGE_ELEMENT_INFO 0x04 -#define SCCB_IFM2_EXTENDED_STORAGE_ELEMENT_RECONFIG 0x02 -#define SCCB_IFM2_COPY_AND_REASSIGN_STORAGE_LIST 0x01 -#define SCCB_IFM3_VECTOR_FEATURE_RECONFIG 0x80 -#define SCCB_IFM3_READ_WRITE_EVENT_FEATURE 0x40 -#define SCCB_IFM3_EXTENDED_STORAGE_USABILITY_MAP_EXT 0x20 -#define SCCB_IFM3_READ_RESOURCE_GROUP_INFO 0x08 -#define SCCB_IFM4_READ_STORAGE_STATUS 0x80 - -/* Bit definitions for configuration characteristics */ -#define SCCB_CFG0_LOGICALLY_PARTITIONED 0x80 -#define SCCB_CFG0_SUPPRESSION_ON_PROTECTION 0x20 -#define SCCB_CFG0_INITIATE_RESET 0x10 -#define SCCB_CFG0_STORE_CHANNEL_SUBSYS_CHARACTERISTICS 0x08 -#define SCCB_CFG0_FAST_SYNCHRONOUS_DATA_MOVER 0x01 -#define SCCB_CFG0_MVPG_FOR_ALL_GUESTS 0x04 -#define SCCB_CFG0_UNKNOWN_BUT_SET_UNDER_VM 0x02 -#define SCCB_CFG1_CSLO 0x40 -#define SCCB_CFG2_DEVICE_ACTIVE_ONLY_MEASUREMENT 0x40 -#define SCCB_CFG2_CALLED_SPACE_IDENTIFICATION 0x02 -#define SCCB_CFG2_CHECKSUM_INSTRUCTION 0x01 -#define SCCB_CFG3_RESUME_PROGRAM 0x80 -#define SCCB_CFG3_PERFORM_LOCKED_OPERATION 0x40 -#define SCCB_CFG3_IMMEDIATE_AND_RELATIVE 0x10 -#define SCCB_CFG3_COMPARE_AND_MOVE_EXTENDED 0x08 -#define SCCB_CFG3_BRANCH_AND_SET_AUTHORITY 0x04 -#define SCCB_CFG3_EXTENDED_FLOATING_POINT 0x02 -#define SCCB_CFG3_EXTENDED_LOGICAL_COMPUTATION_FACILITY 0x01 -#define SCCB_CFG4_EXTENDED_TOD_CLOCK 0x80 -#define SCCB_CFG4_EXTENDED_TRANSLATION 0x40 -#define SCCB_CFG4_LOAD_REVERSED_FACILITY 0x20 -#define SCCB_CFG4_EXTENDED_TRANSLATION_FACILITY2 0x10 -#define SCCB_CFG4_STORE_SYSTEM_INFORMATION 0x08 -#define SCCB_CFG5_ESAME 0x01 - -/* CPU information array entry */ -typedef struct _SCCB_CPU_INFO { - BYTE cpa; /* CPU address */ - BYTE tod; /* TOD clock number */ - BYTE cpf[14]; /* RCPU facility map */ - } SCCB_CPU_INFO; - -/* Bit definitions for CPU installed features */ -#define SCCB_CPF0_SIE_370_MODE 0x80 -#define SCCB_CPF0_SIE_XA_MODE 0x40 -#define SCCB_CPF0_SIE_SET_II_370_MODE 0x20 -#define SCCB_CPF0_SIE_SET_II_XA_MODE 0x10 -#define SCCB_CPF0_SIE_NEW_INTERCEPT_FORMAT 0x08 -#define SCCB_CPF0_STORAGE_KEY_ASSIST 0x04 -#define SCCB_CPF0_MULTIPLE_CONTROLLED_DATA_SPACE 0x02 -#define SCCB_CPF1_IO_INTERPRETATION_LEVEL_2 0x40 -#define SCCB_CPF1_GUEST_PER_ENHANCED 0x20 -#define SCCB_CPF1_SIGP_INTERPRETATION_ASSIST 0x08 -#define SCCB_CPF1_RCP_BYPASS_FACILITY 0x04 -#define SCCB_CPF1_REGION_RELOCATE_FACILITY 0x02 -#define SCCB_CPF1_EXPEDITE_TIMER_PROCESSING 0x01 -#define SCCB_CPF2_VECTOR_FEATURE_INSTALLED 0x80 -#define SCCB_CPF2_VECTOR_FEATURE_CONNECTED 0x40 -#define SCCB_CPF2_VECTOR_FEATURE_STANDBY_STATE 0x20 -#define SCCB_CPF2_CRYPTO_FEATURE_ACCESSED 0x10 -#define SCCB_CPF2_EXPEDITE_RUN_PROCESSING 0x04 -#define SCCB_CPF3_PRIVATE_SPACE_FEATURE 0x80 -#define SCCB_CPF3_FETCH_ONLY_BIT 0x40 -#define SCCB_CPF3_PER2_INSTALLED 0x01 -#define SCCB_CPF4_OMISION_GR_ALTERATION_370 0x80 -#define SCCB_CPF5_GUEST_WAIT_STATE_ASSIST 0x40 -#define SCCB_CPF13_CRYPTO_UNIT_ID 0x01 - -/* HSA information array entry */ -typedef struct _SCCB_HSA_INFO { - HWORD hssz; /* Size of HSA in 4K blocks */ - FWORD ahsa; /* Address of HSA */ - } SCCB_HSA_INFO; - -/* MPF information array entry */ -typedef struct _SCCB_MPF_INFO { - HWORD mpfy; /* MPF info array entry */ - } SCCB_MPF_INFO; - -/* Channel path information data area */ -typedef struct _SCCB_CHP_INFO { - BYTE installed[32]; /* Channels installed bits */ - BYTE standby[32]; /* Channels standby bits */ - BYTE online[32]; /* Channels online bits */ - } SCCB_CHP_INFO; - -/* Channel path information data area */ -typedef struct _SCCB_CHSET { - BYTE chanset0a[32]; /* 370 channel set 0A */ - BYTE chanset1a[32]; /* 370 channel set 1A */ - BYTE chanset0b[32]; /* 370 channel set 0B */ - BYTE chanset1b[32]; /* 370 channel set 1B */ - BYTE csconfig; /* Channel set configuration */ - BYTE resv[23]; /* Reserved, set to zero */ - } SCCB_CHSET_INFO; - -/* Read Channel Subsystem Information data area */ -typedef struct _SCCB_CSI_INFO { - BYTE csif[8]; /* Channel Subsystem installed - facility field */ - BYTE resv[48]; - } SCCB_CSI_INFO; - -/* Bit definitions for channel subsystem installed facilities */ -#define SCCB_CSI0_CANCEL_IO_REQUEST_FACILITY 0x02 -#define SCCB_CSI0_CONCURRENT_SENSE_FACILITY 0x01 - -// #ifdef FEATURE_SYSTEM_CONSOLE -/* Write Event Mask */ -typedef struct _SCCB_EVENT_MASK { - HWORD reserved; - HWORD length; /* Event mask length */ - BYTE masks[32]; /* Event masks */ -// FWORD cp_recv_mask; /* These mask fields have */ -// FWORD cp_send_mask; /* the length defined by */ -// FWORD sclp_recv_mask; /* the length halfword */ -#define SCCB_EVENT_SUPP_RECV_MASK ( \ - (0x80000000 >> (SCCB_EVD_TYPE_MSG-1)) | \ - (0x80000000 >> (SCCB_EVD_TYPE_PRIOR-1)) | \ - (0x80000000 >> (SCCB_EVD_TYPE_CPIDENT-1)) ) -// FWORD sclp_send_mask; -#define SCCB_EVENT_SUPP_SEND_MASK ( \ - (0x80000000 >> (SCCB_EVD_TYPE_OPCMD-1)) | \ - (0x80000000 >> (SCCB_EVD_TYPE_STATECH-1)) | \ - (0x80000000 >> (SCCB_EVD_TYPE_PRIOR-1)) | \ - (0x80000000 >> (SCCB_EVD_TYPE_CPCMD-1)) ) - } SCCB_EVENT_MASK; - -/* Read/Write Event Data Header */ -typedef struct _SCCB_EVD_HDR { - HWORD totlen; /* Event Data Buffer total - length */ - BYTE type; -#define SCCB_EVD_TYPE_OPCMD 0x01 /* Operator command */ -#define SCCB_EVD_TYPE_MSG 0x02 /* Message from Control Pgm */ -#define SCCB_EVD_TYPE_STATECH 0x08 /* State Change */ -#define SCCB_EVD_TYPE_PRIOR 0x09 /* Priority message/command */ -#define SCCB_EVD_TYPE_CPIDENT 0x0B /* CntlProgIdent */ -#define SCCB_EVD_TYPE_CPCMD 0x20 /* CntlProgOpCmd */ - BYTE flag; -#define SCCB_EVD_FLAG_PROC 0x80 /* Event successful */ - HWORD resv; /* Reserved for future use */ - } SCCB_EVD_HDR; - -/* Read/Write Event Data Buffer */ -typedef struct _SCCB_EVD_BK { - HWORD msglen; - BYTE const1[51]; - HWORD cplen; /* CP message length */ - BYTE const2[24]; - HWORD tdlen; /* Text Data length */ - BYTE const3[2]; - BYTE sdtlen; - BYTE const4; /* Self defining tag */ - BYTE tmlen; - BYTE const5; /* Text Message format */ -// BYTE txtmsg[n]; - } SCCB_EVD_BK; - -/* Message Control Data Block */ -typedef struct _SCCB_MCD_BK { - HWORD length; /* Total length of MCD */ - HWORD type; /* Type must be 0x0001 */ - FWORD tag; /* Tag must be 0xD4C4C240 */ - FWORD revcd; /* Revision code 0x00000001 */ - } SCCB_MCD_BK; - -/* Message Control Data Block Header */ -typedef struct _SCCB_OBJ_HDR { - HWORD length; /* Total length of OBJ */ - HWORD type; /* Object type */ -#define SCCB_OBJ_TYPE_GENERAL 0x0001 /* General Object */ -#define SCCB_OBJ_TYPE_CPO 0x0002 /* Control Program Object */ -#define SCCB_OBJ_TYPE_NLS 0x0003 /* NLS data Object */ -#define SCCB_OBJ_TYPE_MESSAGE 0x0004 /* Message Text Object */ - } SCCB_OBJ_HDR; - -/* Message Control Data Block Message Text Object */ -typedef struct _SCCB_MTO_BK { - HWORD ltflag; /* Line type flag */ -#define SCCB_MTO_LTFLG0_CNTL 0x80 /* Control text line */ -#define SCCB_MTO_LTFLG0_LABEL 0x40 /* Label text line */ -#define SCCB_MTO_LTFLG0_DATA 0x20 /* Data text line */ -#define SCCB_MTO_LTFLG0_END 0x10 /* Last line of message */ -#define SCCB_MTO_LTFLG0_PROMPT 0x08 /* Prompt line - response - requested (WTOR) */ -#define SCCB_MTO_LTFLG0_DBCS 0x04 /* DBCS text */ -#define SCCB_MTO_LTFLG0_MIX 0x02 /* Mixed SBCS/DBCS text */ -#define SCCB_MTO_LTFLG1_OVER 0x01 /* Foreground presentation - field override */ - FWORD presattr; /* Presentation Attribute - Byte 0 - control - Byte 1 - color - Byte 2 - highlighting - Byte 3 - intensity */ -#define SCCB_MTO_PRATTR0_ALARM 0x80 /* Sound alarm (console) */ -#define SCCB_MTO_PRATTR3_HIGH 0xE8 /* Highlighted */ -#define SCCB_MTO_PRATTR3_NORM 0xE4 /* Normal */ - } SCCB_MTO_BK; - -/* Message Control Data Block General Object */ -typedef struct _SCCB_MGO_BK { - FWORD seq; /* Message DOM ID */ - BYTE time[11]; /* C'HH.MM.SS.th' */ - BYTE resv1; - BYTE date[7]; /* C'YYYYDDD' */ - BYTE resv2; - FWORD mflag; /* Message Flags */ -#define SCCB_MGO_MFLAG0_DOM 0x80 /* Delete Operator Message */ -#define SCCB_MGO_MFLAG0_ALARM 0x40 /* Sound the SCLP alarm */ -#define SCCB_MGO_MFLAG0_HOLD 0x20 /* Hold message until DOM */ - FWORD presattr; /* Presentation Attribute - Byte 0 - control - Byte 1 - color - Byte 2 - highlighting - Byte 3 - intensity */ -#define SCCB_MGO_PRATTR0_ALARM 0x80 /* Sound alarm (console) */ -#define SCCB_MGO_PRATTR3_HIGH 0xE8 /* Highlighted */ -#define SCCB_MGO_PRATTR3_NORM 0xE4 /* Normal */ - FWORD bckattr; /* Background presentation - attributes - covers all - message-test foreground - presentation attribute - field overrides */ - BYTE sysname[8]; /* Originating system name */ - BYTE jobname[8]; /* Jobname or guestname */ - } SCCB_MGO_BK; - -/* Control Program Information */ -typedef struct _SCCB_CPI_BK { - BYTE id_fmt; - BYTE resv0; - BYTE system_type[8]; - DWORD resv1; - BYTE system_name[8]; - DWORD resv2; - DWORD system_level; - DWORD resv3; - BYTE sysplex_name[8]; - BYTE resv4[16]; - } SCCB_CPI_BK; - -/* Message Control Data Block NLS Object */ -typedef struct _SCCB_NLS_BK { - HWORD scpgid; /* CPGID for SBCS (def 037) */ - HWORD scpsgid; /* CPSGID for SBCS (def 637) */ - HWORD dcpgid; /* CPGID for DBCS (def 037) */ - HWORD dcpsgid; /* CPSGID for DBCS (def 637) */ - } SCCB_NLS_BK; - -// #endif /*FEATURE_SYSTEM_CONSOLE*/ +#if !defined(_SERVICE_C) -// #ifdef FEATURE_EXPANDED_STORAGE -typedef struct _SCCB_XST_INFO { - HWORD elmid; /* Extended storage element - id */ - BYTE resv1[6]; - FWORD elmsin; /* Starting increment number */ - FWORD elmein; /* Ending increment number */ - BYTE elmchar; /* Element characteristics */ -#define SCCB_XST_INFO_ELMCHAR_REQ 0x80; /* Required element */ - BYTE resv2[39]; - } SCCB_XST_INFO; - -typedef struct _SCCB_XST_MAP { - FWORD incnum; /* Increment number */ - FWORD resv; -// BYTE map[]; /* Bitmap of all usable -// expanded storage blocks */ - } SCCB_XST_MAP; -// #endif /*FEATURE_EXPANDED_STORAGE*/ - - -// #if defined(FEATURE_CHSC) -typedef struct _CHSC_REQ { - HWORD length; /* Offset to response field */ - HWORD req; /* Request code */ - FWORD resv[3]; - } CHSC_REQ; - -typedef struct _CHSC_RSP { - HWORD length; /* Length of response field */ - HWORD rsp; /* Reponse code */ -#define CHSC_REQ_INVALID 0x0002 /* Invalid request */ - FWORD info; - } CHSC_RSP; -// #endif /*defined(FEATURE_CHSC)*/ +#define _SERVICE_C +static U32 servc_cp_recv_mask; /* Syscons CP receive mask */ +static U32 servc_cp_send_mask; /* Syscons CP send mask */ +static BYTE servc_scpcmdstr[123+1]; /* Operator command string */ +static int servc_scpcmdtype; /* Operator command type */ // #ifdef FEATURE_SYSTEM_CONSOLE /*-------------------------------------------------------------------*/ @@ -491,14 +55,14 @@ typedef struct _CHSC_RSP { void scp_command (BYTE *command, int priomsg) { /* Error if disabled for priority messages */ - if (priomsg && !(sysblk.cp_recv_mask & 0x00800000)) + if (priomsg && !(servc_cp_recv_mask & 0x00800000)) { logmsg (_("HHCCP036E SCP not receiving priority messages\n")); return; } /* Error if disabled for commands */ - if (!priomsg && !(sysblk.cp_recv_mask & 0x80000000)) + if (!priomsg && !(servc_cp_recv_mask & 0x80000000)) { logmsg (_("HHCCP037E SCP not receiving commands\n")); return; @@ -526,11 +90,11 @@ void scp_command (BYTE *command, int priomsg) } /* Save command string and message type for read event data */ - sysblk.scpcmdtype = priomsg; - strncpy (sysblk.scpcmdstr, command, sizeof(sysblk.scpcmdstr)); + servc_scpcmdtype = priomsg; + strncpy (servc_scpcmdstr, command, sizeof(servc_scpcmdstr)); /* Ensure termination of the command string */ - sysblk.scpcmdstr[sizeof(sysblk.scpcmdstr)-1] = '\0'; + servc_scpcmdstr[sizeof(servc_scpcmdstr)-1] = '\0'; /* Set event pending flag in service parameter */ sysblk.servparm |= SERVSIG_PEND; @@ -553,6 +117,189 @@ void scp_command (BYTE *command, int priomsg) // #endif /*FEATURE_SYSTEM_CONSOLE*/ #if defined(FEATURE_SERVICE_PROCESSOR) +BYTE ARCH_DEP(scpinfo_ifm)[8] = { + 0 + | SCCB_IFM0_CHANNEL_PATH_INFORMATION + | SCCB_IFM0_CHANNEL_PATH_SUBSYSTEM_COMMAND +// | SCCB_IFM0_CHANNEL_PATH_RECONFIG +// | SCCB_IFM0_CPU_INFORMATION + , + 0 +// | SCCB_IFM1_SIGNAL_ALARM +// | SCCB_IFM1_WRITE_OPERATOR_MESSAGE +// | SCCB_IFM1_STORE_STATUS_ON_LOAD +// | SCCB_IFM1_RESTART_REASONS +// | SCCB_IFM1_INSTRUCTION_ADDRESS_TRACE_BUFFER + | SCCB_IFM1_LOAD_PARAMETER +#ifdef FEATURE_CPU_RECONFIG + | SCCB_IFM0_CPU_RECONFIG +#endif /*FEATURE_CPU_RECONFIG*/ + , + 0 +// | SCCB_IFM2_REAL_STORAGE_INCREMENT_RECONFIG +// | SCCB_IFM2_REAL_STORAGE_ELEMENT_INFO +// | SCCB_IFM2_REAL_STORAGE_ELEMENT_RECONFIG +// | SCCB_IFM2_COPY_AND_REASSIGN_STORAGE +#ifdef FEATURE_EXPANDED_STORAGE + | SCCB_IFM2_EXTENDED_STORAGE_USABILITY_MAP +#endif /*FEATURE_EXPANDED_STORAGE*/ +// | SCCB_IFM2_EXTENDED_STORAGE_ELEMENT_INFO +// | SCCB_IFM2_EXTENDED_STORAGE_ELEMENT_RECONFIG + , + 0 +#if defined(FEATURE_VECTOR_FACILITY) && defined(FEATURE_CPU_RECONFIG) + | SCCB_IFM3_VECTOR_FEATURE_RECONFIG +#endif /*FEATURE_VECTOR_FACILITY*/ +#ifdef FEATURE_SYSTEM_CONSOLE + | SCCB_IFM3_READ_WRITE_EVENT_FEATURE +#endif /*FEATURE_SYSTEM_CONSOLE*/ +// | SCCB_IFM3_READ_RESOURCE_GROUP_INFO + , + 0, 0, 0, 0 }; + +BYTE ARCH_DEP(scpinfo_cfg)[6] = { + 0 +#if defined(FEATURE_HYPERVISOR) + | SCCB_CFG0_LOGICALLY_PARTITIONED +#endif /*defined(FEATURE_HYPERVISOR)*/ +#ifdef FEATURE_SUPPRESSION_ON_PROTECTION + | SCCB_CFG0_SUPPRESSION_ON_PROTECTION +#endif /*FEATURE_SUPPRESSION_ON_PROTECTION*/ +// | SCCB_CFG0_INITIATE_RESET +#if defined(FEATURE_CHSC) + | SCCB_CFG0_STORE_CHANNEL_SUBSYS_CHARACTERISTICS +#endif /*defined(FEATURE_CHSC)*/ +#if defined(FEATURE_MOVE_PAGE_FACILITY_2) + | SCCB_CFG0_MVPG_FOR_ALL_GUESTS +#endif /*defined(FEATURE_MOVE_PAGE_FACILITY_2)*/ +// | SCCB_CFG0_FAST_SYNCHRONOUS_DATA_MOVER + , + 0 +// | SCCB_CFG1_CSLO + , + 0 +// | SCCB_CFG2_DEVICE_ACTIVE_ONLY_MEASUREMENT +#ifdef FEATURE_CALLED_SPACE_IDENTIFICATION + | SCCB_CFG2_CALLED_SPACE_IDENTIFICATION +#endif /*FEATURE_CALLED_SPACE_IDENTIFICATION*/ +#ifdef FEATURE_CHECKSUM_INSTRUCTION + | SCCB_CFG2_CHECKSUM_INSTRUCTION +#endif /*FEATURE_CHECKSUM_INSTRUCTION*/ + , + 0 +#if defined(FEATURE_RESUME_PROGRAM) + | SCCB_CFG3_RESUME_PROGRAM +#endif /*defined(FEATURE_RESUME_PROGRAM)*/ +#if defined(FEATURE_PERFORM_LOCKED_OPERATION) + | SCCB_CFG3_PERFORM_LOCKED_OPERATION +#endif /*defined(FEATURE_PERFORM_LOCKED_OPERATION)*/ +#ifdef FEATURE_IMMEDIATE_AND_RELATIVE + | SCCB_CFG3_IMMEDIATE_AND_RELATIVE +#endif /*FEATURE_IMMEDIATE_AND_RELATIVE*/ +#ifdef FEATURE_COMPARE_AND_MOVE_EXTENDED + | SCCB_CFG3_COMPARE_AND_MOVE_EXTENDED +#endif /*FEATURE_COMPARE_AND_MOVE_EXTENDED*/ +#ifdef FEATURE_BRANCH_AND_SET_AUTHORITY + | SCCB_CFG3_BRANCH_AND_SET_AUTHORITY +#endif /*FEATURE_BRANCH_AND_SET_AUTHORITY*/ +#if defined(FEATURE_BASIC_FP_EXTENSIONS) + | SCCB_CFG3_EXTENDED_FLOATING_POINT +#endif /*defined(FEATURE_BASIC_FP_EXTENSIONS)*/ +/*ZZ*/ | SCCB_CFG3_EXTENDED_LOGICAL_COMPUTATION_FACILITY + , + 0 +#ifdef FEATURE_EXTENDED_TOD_CLOCK + | SCCB_CFG4_EXTENDED_TOD_CLOCK +#endif /*FEATURE_EXTENDED_TOD_CLOCK*/ +#if defined(FEATURE_EXTENDED_TRANSLATION) + | SCCB_CFG4_EXTENDED_TRANSLATION +#endif /*defined(FEATURE_EXTENDED_TRANSLATION)*/ +#if defined(FEATURE_LOAD_REVERSED) + | SCCB_CFG4_LOAD_REVERSED_FACILITY +#endif /*defined(FEATURE_LOAD_REVERSED)*/ +#if defined(FEATURE_EXTENDED_TRANSLATION_FACILITY_2) + | SCCB_CFG4_EXTENDED_TRANSLATION_FACILITY2 +#endif /*defined(FEATURE_EXTENDED_TRANSLATION_FACILITY_2)*/ +#if defined(FEATURE_STORE_SYSTEM_INFORMATION) + | SCCB_CFG4_STORE_SYSTEM_INFORMATION +#endif /*FEATURE_STORE_SYSTEM_INFORMATION*/ + , + 0 }; +BYTE ARCH_DEP(scpinfo_cpf)[14] = { + 0 +#if defined(FEATURE_INTERPRETIVE_EXECUTION) +#if defined(_370) && !defined(FEATURE_ESAME) + | SCCB_CPF0_SIE_370_MODE +#endif /*defined(_370) && !defined(FEATURE_ESAME)*/ + | SCCB_CPF0_SIE_XA_MODE +#endif /*defined(FEATURE_INTERPRETIVE_EXECUTION)*/ +// | SCCB_CPF0_SIE_SET_II_370_MODE +#if defined(FEATURE_IO_ASSIST) + | SCCB_CPF0_SIE_SET_II_XA_MODE +#endif /*defined(FEATURE_IO_ASSIST)*/ +#if defined(FEATURE_INTERPRETIVE_EXECUTION) + | SCCB_CPF0_SIE_NEW_INTERCEPT_FORMAT +#endif /*defined(FEATURE_INTERPRETIVE_EXECUTION)*/ +#if defined(FEATURE_STORAGE_KEY_ASSIST) + | SCCB_CPF0_STORAGE_KEY_ASSIST +#endif /*defined(FEATURE_STORAGE_KEY_ASSIST)*/ +#if defined(_FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE) + | SCCB_CPF0_MULTIPLE_CONTROLLED_DATA_SPACE +#endif /*defined(_FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE)*/ + , + 0 +#if defined(FEATURE_IO_ASSIST) + | SCCB_CPF1_IO_INTERPRETATION_LEVEL_2 +#endif /*defined(FEATURE_IO_ASSIST)*/ +#if defined(FEATURE_INTERPRETIVE_EXECUTION) + | SCCB_CPF1_GUEST_PER_ENHANCED +#endif /*defined(FEATURE_INTERPRETIVE_EXECUTION)*/ +// | SCCB_CPF1_SIGP_INTERPRETATION_ASSIST +#if defined(FEATURE_STORAGE_KEY_ASSIST) + | SCCB_CPF1_RCP_BYPASS_FACILITY +#endif /*defined(FEATURE_STORAGE_KEY_ASSIST)*/ +#if defined(FEATURE_REGION_RELOCATE) + | SCCB_CPF1_REGION_RELOCATE_FACILITY +#endif /*defined(FEATURE_REGION_RELOCATE)*/ +#if defined(FEATURE_EXPEDITED_SIE_SUBSET) + | SCCB_CPF1_EXPEDITE_TIMER_PROCESSING +#endif /*defined(FEATURE_EXPEDITED_SIE_SUBSET)*/ + , + 0 +#if defined(FEATURE_CRYPTO) + | SCCB_CPF2_CRYPTO_FEATURE_ACCESSED +#endif /*defined(FEATURE_CRYPTO)*/ +#if defined(FEATURE_EXPEDITED_SIE_SUBSET) + | SCCB_CPF2_EXPEDITE_RUN_PROCESSING +#endif /*defined(FEATURE_EXPEDITED_SIE_SUBSET)*/ + , + 0 +#ifdef FEATURE_PRIVATE_SPACE + | SCCB_CPF3_PRIVATE_SPACE_FEATURE + | SCCB_CPF3_FETCH_ONLY_BIT +#endif /*FEATURE_PRIVATE_SPACE*/ +#if defined(FEATURE_PER2) + | SCCB_CPF3_PER2_INSTALLED +#endif /*defined(FEATURE_PER2)*/ + , + 0 +#if defined(FEATURE_PER2) + | SCCB_CPF4_OMISION_GR_ALTERATION_370 +#endif /*defined(FEATURE_PER2)*/ + , + 0 +#if defined(FEATURE_WAITSTATE_ASSIST) + | SCCB_CPF5_GUEST_WAIT_STATE_ASSIST +#endif /*defined(FEATURE_WAITSTATE_ASSIST)*/ + , + 0, 0, 0, 0, 0, 0, 0, + 0 +#if defined(FEATURE_CRYPTO) +// | SCCB_CPF13_CRYPTO_UNIT_ID +#endif /*defined(FEATURE_CRYPTO)*/ + } ; +U32 ARCH_DEP(sclp_recv_mask) = SCCB_EVENT_SUPP_RECV_MASK; +U32 ARCH_DEP(sclp_send_mask) = SCCB_EVENT_SUPP_SEND_MASK; /*-------------------------------------------------------------------*/ /* B220 SERVC - Service Call [RRE] */ /*-------------------------------------------------------------------*/ @@ -561,7 +308,7 @@ DEF_INST(service_call) U32 r1, r2; /* Values of R fields */ U32 sclp_command; /* SCLP command code */ U32 sccb_real_addr; /* SCCB real address */ -U32 i, j; /* Array subscripts */ +U32 i; /* Array subscripts */ U32 realmb; /* Real storage size in MB */ U32 sccb_absolute_addr; /* Absolute address of SCCB */ U32 sccblen; /* Length of SCCB */ @@ -688,7 +435,7 @@ BYTE *xstmap; /* Xstore bitmap, zero means STORAGE_KEY(sccb_absolute_addr, regs) |= STORKEY_REF; /* Program check if end of SCCB falls outside main storage */ - if ( sysblk.mainsize - sccblen < sccb_absolute_addr ) + if ( sccb_absolute_addr + sccblen > regs->mainlim + 1) ARCH_DEP(program_interrupt) (regs, PGM_ADDRESSING_EXCEPTION); /* Obtain lock if immediate response is not requested */ @@ -799,113 +546,12 @@ BYTE *xstmap; /* Xstore bitmap, zero means memcpy (sccbscp->loadparm, sysblk.loadparm, 8); /* Set installed features bit mask in SCCB */ - sccbscp->ifm[0] = 0 - | SCCB_IFM0_CHANNEL_PATH_INFORMATION - | SCCB_IFM0_CHANNEL_PATH_SUBSYSTEM_COMMAND -// | SCCB_IFM0_CHANNEL_PATH_RECONFIG -// | SCCB_IFM0_CPU_INFORMATION -#ifdef FEATURE_CPU_RECONFIG - | SCCB_IFM0_CPU_RECONFIG -#endif /*FEATURE_CPU_RECONFIG*/ - ; - sccbscp->ifm[1] = 0 -// | SCCB_IFM1_SIGNAL_ALARM -// | SCCB_IFM1_WRITE_OPERATOR_MESSAGE -// | SCCB_IFM1_STORE_STATUS_ON_LOAD -// | SCCB_IFM1_RESTART_REASONS -// | SCCB_IFM1_INSTRUCTION_ADDRESS_TRACE_BUFFER - | SCCB_IFM1_LOAD_PARAMETER - ; - sccbscp->ifm[2] = 0 -// | SCCB_IFM2_REAL_STORAGE_INCREMENT_RECONFIG -// | SCCB_IFM2_REAL_STORAGE_ELEMENT_INFO -// | SCCB_IFM2_REAL_STORAGE_ELEMENT_RECONFIG -// | SCCB_IFM2_COPY_AND_REASSIGN_STORAGE -#ifdef FEATURE_EXPANDED_STORAGE - | SCCB_IFM2_EXTENDED_STORAGE_USABILITY_MAP -#endif /*FEATURE_EXPANDED_STORAGE*/ -// | SCCB_IFM2_EXTENDED_STORAGE_ELEMENT_INFO -// | SCCB_IFM2_EXTENDED_STORAGE_ELEMENT_RECONFIG - ; - sccbscp->ifm[3] = 0 -#if defined(FEATURE_VECTOR_FACILITY) && defined(FEATURE_CPU_RECONFIG) - | SCCB_IFM3_VECTOR_FEATURE_RECONFIG -#endif /*FEATURE_VECTOR_FACILITY*/ -#ifdef FEATURE_SYSTEM_CONSOLE - | SCCB_IFM3_READ_WRITE_EVENT_FEATURE -#endif /*FEATURE_SYSTEM_CONSOLE*/ -// | SCCB_IFM3_READ_RESOURCE_GROUP_INFO - ; - sccbscp->cfg[0] = 0 -#if defined(FEATURE_HYPERVISOR) - | SCCB_CFG0_LOGICALLY_PARTITIONED -#endif /*defined(FEATURE_HYPERVISOR)*/ -#ifdef FEATURE_SUPPRESSION_ON_PROTECTION - | SCCB_CFG0_SUPPRESSION_ON_PROTECTION -#endif /*FEATURE_SUPPRESSION_ON_PROTECTION*/ -// | SCCB_CFG0_INITIATE_RESET -#if defined(FEATURE_CHSC) - | SCCB_CFG0_STORE_CHANNEL_SUBSYS_CHARACTERISTICS -#endif /*defined(FEATURE_CHSC)*/ -#if defined(FEATURE_MOVE_PAGE_FACILITY_2) - | SCCB_CFG0_MVPG_FOR_ALL_GUESTS -#endif /*defined(FEATURE_MOVE_PAGE_FACILITY_2)*/ -// | SCCB_CFG0_FAST_SYNCHRONOUS_DATA_MOVER - ; - sccbscp->cfg[1] = 0 -// | SCCB_CFG1_CSLO - ; - sccbscp->cfg[2] = 0 -// | SCCB_CFG2_DEVICE_ACTIVE_ONLY_MEASUREMENT -#ifdef FEATURE_CALLED_SPACE_IDENTIFICATION - | SCCB_CFG2_CALLED_SPACE_IDENTIFICATION -#endif /*FEATURE_CALLED_SPACE_IDENTIFICATION*/ -#ifdef FEATURE_CHECKSUM_INSTRUCTION - | SCCB_CFG2_CHECKSUM_INSTRUCTION -#endif /*FEATURE_CHECKSUM_INSTRUCTION*/ - ; - sccbscp->cfg[3] = 0 -#if defined(FEATURE_RESUME_PROGRAM) - | SCCB_CFG3_RESUME_PROGRAM -#endif /*defined(FEATURE_RESUME_PROGRAM)*/ -#if defined(FEATURE_PERFORM_LOCKED_OPERATION) - | SCCB_CFG3_PERFORM_LOCKED_OPERATION -#endif /*defined(FEATURE_PERFORM_LOCKED_OPERATION)*/ -#ifdef FEATURE_IMMEDIATE_AND_RELATIVE - | SCCB_CFG3_IMMEDIATE_AND_RELATIVE -#endif /*FEATURE_IMMEDIATE_AND_RELATIVE*/ -#ifdef FEATURE_COMPARE_AND_MOVE_EXTENDED - | SCCB_CFG3_COMPARE_AND_MOVE_EXTENDED -#endif /*FEATURE_COMPARE_AND_MOVE_EXTENDED*/ -#ifdef FEATURE_BRANCH_AND_SET_AUTHORITY - | SCCB_CFG3_BRANCH_AND_SET_AUTHORITY -#endif /*FEATURE_BRANCH_AND_SET_AUTHORITY*/ -#if defined(FEATURE_BASIC_FP_EXTENSIONS) - | SCCB_CFG3_EXTENDED_FLOATING_POINT -#endif /*defined(FEATURE_BASIC_FP_EXTENSIONS)*/ -/*ZZ*/ | SCCB_CFG3_EXTENDED_LOGICAL_COMPUTATION_FACILITY - ; - sccbscp->cfg[4] = 0 -#ifdef FEATURE_EXTENDED_TOD_CLOCK - | SCCB_CFG4_EXTENDED_TOD_CLOCK -#endif /*FEATURE_EXTENDED_TOD_CLOCK*/ -#if defined(FEATURE_EXTENDED_TRANSLATION) - | SCCB_CFG4_EXTENDED_TRANSLATION -#endif /*defined(FEATURE_EXTENDED_TRANSLATION)*/ -#if defined(FEATURE_LOAD_REVERSED) - | SCCB_CFG4_LOAD_REVERSED_FACILITY -#endif /*defined(FEATURE_LOAD_REVERSED)*/ -#if defined(FEATURE_EXTENDED_TRANSLATION_FACILITY_2) - | SCCB_CFG4_EXTENDED_TRANSLATION_FACILITY2 -#endif /*defined(FEATURE_EXTENDED_TRANSLATION_FACILITY_2)*/ -#if defined(FEATURE_STORE_SYSTEM_INFORMATION) - | SCCB_CFG4_STORE_SYSTEM_INFORMATION -#endif /*FEATURE_STORE_SYSTEM_INFORMATION*/ - ; + memcpy(sccbscp->ifm, ARCH_DEP(scpinfo_ifm), sizeof(sccbscp->ifm)); - sccbscp->cfg[5] = 0 + memcpy(sccbscp->cfg, ARCH_DEP(scpinfo_cfg), sizeof(sccbscp->cfg)); #if defined(_900) || defined(FEATURE_ESAME) - | (sysblk.arch_z900 ? SCCB_CFG5_ESAME : 0) + if(sysblk.arch_z900) + sccbscp->cfg[5] |= SCCB_CFG5_ESAME; #endif /*defined(_900) || defined(FEATURE_ESAME)*/ ; @@ -920,53 +566,7 @@ BYTE *xstmap; /* Xstore bitmap, zero means memset (sccbcpu, 0, sizeof(SCCB_CPU_INFO)); sccbcpu->cpa = sysblk.regs[i].cpuad; sccbcpu->tod = 0; - sccbcpu->cpf[0] = 0 -#if defined(FEATURE_INTERPRETIVE_EXECUTION) -#if defined(_370) && !defined(FEATURE_ESAME) - | SCCB_CPF0_SIE_370_MODE -#endif /*defined(_370) && !defined(FEATURE_ESAME)*/ - | SCCB_CPF0_SIE_XA_MODE -#endif /*defined(FEATURE_INTERPRETIVE_EXECUTION)*/ -// | SCCB_CPF0_SIE_SET_II_370_MODE -#if defined(FEATURE_IO_ASSIST) - | SCCB_CPF0_SIE_SET_II_XA_MODE -#endif /*defined(FEATURE_IO_ASSIST)*/ -#if defined(FEATURE_INTERPRETIVE_EXECUTION) - | SCCB_CPF0_SIE_NEW_INTERCEPT_FORMAT -#endif /*defined(FEATURE_INTERPRETIVE_EXECUTION)*/ -#if defined(FEATURE_STORAGE_KEY_ASSIST) - | SCCB_CPF0_STORAGE_KEY_ASSIST -#endif /*defined(FEATURE_STORAGE_KEY_ASSIST)*/ -#if defined(_FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE) - | SCCB_CPF0_MULTIPLE_CONTROLLED_DATA_SPACE -#endif /*defined(_FEATURE_MULTIPLE_CONTROLLED_DATA_SPACE)*/ - ; - sccbcpu->cpf[1] = 0 -#if defined(FEATURE_IO_ASSIST) - | SCCB_CPF1_IO_INTERPRETATION_LEVEL_2 -#endif /*defined(FEATURE_IO_ASSIST)*/ -#if defined(FEATURE_INTERPRETIVE_EXECUTION) - | SCCB_CPF1_GUEST_PER_ENHANCED -#endif /*defined(FEATURE_INTERPRETIVE_EXECUTION)*/ -// | SCCB_CPF1_SIGP_INTERPRETATION_ASSIST -#if defined(FEATURE_STORAGE_KEY_ASSIST) - | SCCB_CPF1_RCP_BYPASS_FACILITY -#endif /*defined(FEATURE_STORAGE_KEY_ASSIST)*/ -#if defined(FEATURE_REGION_RELOCATE) - | SCCB_CPF1_REGION_RELOCATE_FACILITY -#endif /*defined(FEATURE_REGION_RELOCATE)*/ -#if defined(FEATURE_EXPEDITED_SIE_SUBSET) - | SCCB_CPF1_EXPEDITE_TIMER_PROCESSING -#endif /*defined(FEATURE_EXPEDITED_SIE_SUBSET)*/ - ; - sccbcpu->cpf[2] = 0 -#if defined(FEATURE_CRYPTO) - | SCCB_CPF2_CRYPTO_FEATURE_ACCESSED -#endif /*defined(FEATURE_CRYPTO)*/ -#if defined(FEATURE_EXPEDITED_SIE_SUBSET) - | SCCB_CPF2_EXPEDITE_RUN_PROCESSING -#endif /*defined(FEATURE_EXPEDITED_SIE_SUBSET)*/ - ; + memcpy(sccbcpu->cpf, ARCH_DEP(scpinfo_cpf), sizeof(sccbcpu->cpf)); #ifdef FEATURE_VECTOR_FACILITY #ifndef FEATURE_CPU_RECONFIG @@ -981,30 +581,6 @@ BYTE *xstmap; /* Xstore bitmap, zero means #endif /*FEATURE_CPU_RECONFIG*/ #endif /*FEATURE_VECTOR_FACILITY*/ - sccbcpu->cpf[3] = 0 -#ifdef FEATURE_PRIVATE_SPACE - | SCCB_CPF3_PRIVATE_SPACE_FEATURE - | SCCB_CPF3_FETCH_ONLY_BIT -#endif /*FEATURE_PRIVATE_SPACE*/ -#if defined(FEATURE_PER2) - | SCCB_CPF3_PER2_INSTALLED -#endif /*defined(FEATURE_PER2)*/ - ; - sccbcpu->cpf[4] = 0 -#if defined(FEATURE_PER2) - | SCCB_CPF4_OMISION_GR_ALTERATION_370 -#endif /*defined(FEATURE_PER2)*/ - ; - sccbcpu->cpf[5] = 0 -#if defined(FEATURE_WAITSTATE_ASSIST) - | SCCB_CPF5_GUEST_WAIT_STATE_ASSIST -#endif /*defined(FEATURE_WAITSTATE_ASSIST)*/ - ; - sccbcpu->cpf[13] = 0 -#if defined(FEATURE_CRYPTO) -// | SCCB_CPF13_CRYPTO_UNIT_ID -#endif /*defined(FEATURE_CRYPTO)*/ - ; } /* Set response code X'0010' in SCCB header */ @@ -1172,25 +748,13 @@ BYTE *xstmap; /* Xstore bitmap, zero means /* Print line unless it is a response prompt */ if (!(mto_bk->ltflag[0] & SCCB_MTO_LTFLG0_PROMPT)) { - for (i = 0, j = 0; i < event_msglen; i++) + for (i = 0; i < event_msglen; i++) { - message[j++] = isprint(guest_to_host(event_msg[i])) ? + message[i] = isprint(guest_to_host(event_msg[i])) ? guest_to_host(event_msg[i]) : 0x20; - /* Break the line if too long */ - if(j > 79) - { - message[j] = '\0'; - logmsg ("%s\n", message); - j = 0; - } } - message[j] = '\0'; - if(j > 0) - logmsg ("%s\n", message); -#if 0 - if(!memcmp(message," IEA190I",8)) { regs->cpustate = CPUSTATE_STOPPING; - ON_IC_CPU_NOT_STARTED(regs); } -#endif + message[i] = '\0'; + logmsg ("%s\n", message); } } mcd_len -= obj_len; @@ -1249,10 +813,9 @@ BYTE *xstmap; /* Xstore bitmap, zero means default: -#if 0 - logmsg(_("HHC799I Unknown event received type = %2.2X\n"), - evd_hdr->type); -#endif + if( HDC(debug_sclp_unknown_event, evd_hdr, sccb, regs) ) + break; + /* Set response code X'73F0' in SCCB header */ sccb->reas = SCCB_REAS_SYNTAX_ERROR; sccb->resp = SCCB_RESP_SYNTAX_ERROR; @@ -1278,7 +841,7 @@ BYTE *xstmap; /* Xstore bitmap, zero means } /* Set response code X'62F0' if CP receive mask is zero */ - if (sysblk.cp_recv_mask == 0) + if (servc_cp_recv_mask == 0) { sccb->reas = SCCB_REAS_EVENTS_SUP; sccb->resp = SCCB_RESP_EVENTS_SUP; @@ -1288,8 +851,11 @@ BYTE *xstmap; /* Xstore bitmap, zero means /* Point to SCCB data area following SCCB header */ evd_hdr = (SCCB_EVD_HDR*)(sccb+1); + if( HDC(debug_sclp_event_data, evd_hdr, sccb, regs) ) + break; + /* Set response code X'60F0' if no outstanding events */ - event_msglen = strlen(sysblk.scpcmdstr); + event_msglen = strlen(servc_scpcmdstr); if (event_msglen == 0) { sccb->reas = SCCB_REAS_NO_EVENTS; @@ -1330,7 +896,7 @@ BYTE *xstmap; /* Xstore bitmap, zero means STORE_HW(evd_hdr->totlen, evd_len); /* Set type in event header */ - evd_hdr->type = sysblk.scpcmdtype ? + evd_hdr->type = servc_scpcmdtype ? SCCB_EVD_TYPE_PRIOR : SCCB_EVD_TYPE_OPCMD; /* Set message length in event data block */ @@ -1355,10 +921,10 @@ BYTE *xstmap; /* Xstore bitmap, zero means /* Copy and translate command */ for (i = 0; i < event_msglen; i++) - event_msg[i] = host_to_guest(sysblk.scpcmdstr[i]); + event_msg[i] = host_to_guest(servc_scpcmdstr[i]); /* Clear the command string (It has been read) */ - sysblk.scpcmdstr[0] = '\0'; + servc_scpcmdstr[0] = '\0'; /* Set response code X'0020' in SCCB header */ sccb->reas = SCCB_REAS_NONE; @@ -1387,47 +953,43 @@ BYTE *xstmap; /* Xstore bitmap, zero means FETCH_HW(masklen, evd_mask->length); /* Save old mask settings in order to suppress superflous messages */ - old_cp_recv_mask = sysblk.cp_recv_mask & sysblk.sclp_send_mask; - old_cp_send_mask = sysblk.cp_send_mask & sysblk.sclp_recv_mask; + old_cp_recv_mask = servc_cp_recv_mask & ARCH_DEP(sclp_send_mask); + old_cp_send_mask = servc_cp_send_mask & ARCH_DEP(sclp_recv_mask); for (i = 0; i < 4; i++) { - sysblk.cp_recv_mask <<= 8; - sysblk.cp_send_mask <<= 8; + servc_cp_recv_mask <<= 8; + servc_cp_send_mask <<= 8; if (i < masklen) { - sysblk.cp_recv_mask |= evd_mask->masks[i]; - sysblk.cp_send_mask |= evd_mask->masks[i + masklen]; + servc_cp_recv_mask |= evd_mask->masks[i]; + servc_cp_send_mask |= evd_mask->masks[i + masklen]; } } - /* Initialize sclp send and receive masks */ - sysblk.sclp_recv_mask = SCCB_EVENT_SUPP_RECV_MASK; - sysblk.sclp_send_mask = SCCB_EVENT_SUPP_SEND_MASK; - /* Clear any pending command */ - sysblk.scpcmdstr[0] = '\0'; + servc_scpcmdstr[0] = '\0'; /* Write the events that we support back */ memset (&evd_mask->masks[2 * masklen], 0, 2 * masklen); for (i = 0; (i < 4) && (i < masklen); i++) { evd_mask->masks[i + (2 * masklen)] |= - (sysblk.sclp_recv_mask >> ((3-i)*8)) & 0xFF; + (ARCH_DEP(sclp_recv_mask) >> ((3-i)*8)) & 0xFF; evd_mask->masks[i + (3 * masklen)] |= - (sysblk.sclp_send_mask >> ((3-i)*8)) & 0xFF; + (ARCH_DEP(sclp_send_mask) >> ((3-i)*8)) & 0xFF; } /* Issue message only when supported mask has changed */ - if ((sysblk.cp_recv_mask & sysblk.sclp_send_mask) != old_cp_recv_mask - || (sysblk.cp_send_mask & sysblk.sclp_recv_mask) != old_cp_send_mask) + if ((servc_cp_recv_mask & ARCH_DEP(sclp_send_mask)) != old_cp_recv_mask + || (servc_cp_send_mask & ARCH_DEP(sclp_recv_mask)) != old_cp_send_mask) { - if (sysblk.cp_recv_mask != 0 || sysblk.cp_send_mask != 0) + if (servc_cp_recv_mask != 0 || servc_cp_send_mask != 0) logmsg (_("HHCCP041I SYSCONS interface active\n")); else logmsg (_("HHCCP042I SYSCONS interface inactive\n")); } -// logmsg("cp_send_mask=%8.8X cp_recv_mask=%8.8X\n",sysblk.cp_send_mask,sysblk.cp_recv_mask); +// logmsg("cp_send_mask=%8.8X cp_recv_mask=%8.8X\n",servc_cp_send_mask,servc_cp_recv_mask); /* Set response code X'0020' in SCCB header */ sccb->reas = SCCB_REAS_NONE; @@ -1596,23 +1158,8 @@ BYTE *xstmap; /* Xstore bitmap, zero means default: -#if 0 - logmsg(_("Invalid service call command word:%8.8X SCCB=%8.8X\n"), - sclp_command, sccb_absolute_addr); - - logmsg("SCCB data area:\n"); - for(i = 0; i < sccblen; i++) - { - logmsg("%2.2X",regs->mainstor[sccb_real_addr + i]); - if(i % 32 == 31) - logmsg("\n"); - else - if(i % 4 == 3) - logmsg(" "); - } - if(i % 32 != 0) - logmsg("\n"); -#endif + if( HDC(debug_sclp_unknown_command, sclp_command, sccb, regs) ) + break; /* Set response code X'01F0' for invalid SCLP command */ sccb->reas = SCCB_REAS_INVALID_CMD; @@ -1660,8 +1207,6 @@ CHSC_RSP *chsc_rsp; /* Response structure*/ RRE(inst, execflag, regs, r1, r2); -// ZZDEBUG logmsg("CHSC: "); ARCH_DEP(display_inst) (regs, regs->inst); - PRIV_CHECK(regs); SIE_INTERCEPT(regs); @@ -1689,6 +1234,9 @@ CHSC_RSP *chsc_rsp; /* Response structure*/ default: + if( HDC(debug_chsc_unknown_request, chsc_rsp, chsc_req, regs) ) + break; + ARCH_DEP(validate_operand) (n, r1, 0, ACCTYPE_WRITE, regs); /* Set response field length */ STORE_HW(chsc_rsp->length,sizeof(CHSC_RSP)); diff --git a/service.h b/service.h new file mode 100644 index 0000000..56fd401 --- /dev/null +++ b/service.h @@ -0,0 +1,452 @@ +/* SERVICE.H (c) Copyright Jan Jaeger, 1999-2003 */ +/* Service Processor Architectured fields */ + + +#if !defined(_SERVICE_H) + +#define _SERVICE_H + +/*-------------------------------------------------------------------*/ +/* Service Call Logical Processor command word definitions */ +/*-------------------------------------------------------------------*/ +#define SCLP_READ_SCP_INFO 0x00020001 +#define SCLP_READ_CHP_INFO 0x00030001 +#define SCLP_READ_CSI_INFO 0x001C0001 + +#define SCLP_READ_XST_MAP 0x00250001 + +#define SCLP_WRITE_EVENT_DATA 0x00760005 +#define SCLP_READ_EVENT_DATA 0x00770005 +#define SCLP_WRITE_EVENT_MASK 0x00780005 + +#define SCLP_DECONFIGURE_CPU 0x00100001 +#define SCLP_CONFIGURE_CPU 0x00110001 + +#define SCLP_DISCONNECT_VF 0x001A0001 +#define SCLP_CONNECT_VF 0x001B0001 + +#define SCLP_COMMAND_MASK 0xFFFF00FF +#define SCLP_COMMAND_CLASS 0x000000FF +#define SCLP_RESOURCE_MASK 0x0000FF00 +#define SCLP_RESOURCE_SHIFT 8 + +/*-------------------------------------------------------------------*/ +/* Service Call Control Block structure definitions */ +/*-------------------------------------------------------------------*/ +typedef struct _SCCB_HEADER { + HWORD length; /* Total length of SCCB */ + BYTE flag; /* Flag byte */ + BYTE resv1[2]; /* Reserved */ + BYTE type; /* Request type */ + BYTE reas; /* Reason code */ + BYTE resp; /* Response class code */ + } SCCB_HEADER; + +/* Bit definitions for SCCB header flag byte */ +#define SCCB_FLAG_SYNC 0x80 /* Synchronous request */ + +/* Bit definitions for SCCB header request type */ +#define SCCB_TYPE_VARIABLE 0x80 /* Variable request */ + +/* Bit definitions for SCCB header reason code */ +#define SCCB_REAS_NONE 0x00 /* No reason */ +#define SCCB_REAS_NOT_PGBNDRY 0x01 /* SCCB crosses page boundary*/ +#define SCCB_REAS_ODD_LENGTH 0x02 /* Length not multiple of 8 */ +#define SCCB_REAS_TOO_SHORT 0x03 /* Length is inadequate */ +#define SCCB_REAS_NOACTION 0x02 /* Resource in req. state */ +#define SCCB_REAS_STANDBY 0x04 /* Resource in standby state */ +#define SCCB_REAS_INVALID_CMD 0x01 /* Invalid SCLP command code */ +#define SCCB_REAS_INVALID_RSCP 0x03 /* Invalid resource in parm */ +#define SCCB_REAS_IMPROPER_RSC 0x05 /* Resource in improper state*/ +#define SCCB_REAS_INVALID_RSC 0x09 /* Invalid resource */ + +/* Bit definitions for SCCB header response class code */ +#define SCCB_RESP_BLOCK_ERROR 0x00 /* Data block error */ +#define SCCB_RESP_INFO 0x10 /* Information returned */ +#define SCCB_RESP_COMPLETE 0x20 /* Command complete */ +#define SCCB_RESP_BACKOUT 0x40 /* Command backed out */ +#define SCCB_RESP_REJECT 0xF0 /* Command reject */ + +// #ifdef FEATURE_SYSTEM_CONSOLE +#define SCCB_REAS_NO_EVENTS 0x60 /* No outstanding EVENTs */ +#define SCCB_RESP_NO_EVENTS 0xF0 +#define SCCB_REAS_EVENTS_SUP 0x62 /* All events suppressed */ +#define SCCB_RESP_EVENTS_SUP 0xF0 +#define SCCB_REAS_INVALID_MASK 0x70 /* Invalid events mask */ +#define SCCB_RESP_INVALID_MASK 0xF0 +#define SCCB_REAS_MAX_BUFF 0x71 /* Buffer exceeds maximum */ +#define SCCB_RESP_MAX_BUFF 0xF0 +#define SCCB_REAS_BUFF_LEN_ERR 0x72 /* Buffer len verification */ +#define SCCB_RESP_BUFF_LEN_ERR 0xF0 +#define SCCB_REAS_SYNTAX_ERROR 0x73 /* Buffer syntax error */ +#define SCCB_RESP_SYNTAX_ERROR 0xF0 +#define SCCB_REAS_INVALID_MSKL 0x74 /* Invalid mask length */ +#define SCCB_RESP_INVALID_MSKL 0xF0 +#define SCCB_REAS_EXCEEDS_SCCB 0x75 /* Exceeds SCCB max capacity */ +#define SCCB_RESP_EXCEEDS_SCCB 0xF0 +// #endif /*FEATURE_SYSTEM_CONSOLE*/ + +/* SCP information data area */ +typedef struct _SCCB_SCP_INFO { + HWORD realinum; /* Number of real storage + increments installed */ + BYTE realiszm; /* Size of each real storage + increment in MB */ + BYTE realbszk; /* Size of each real storage + block in KB */ + HWORD realiint; /* Real storage increment + block interleave interval */ + HWORD resv2; /* Reserved */ + HWORD numcpu; /* Number of CPUs installed */ + HWORD offcpu; /* Offset from start of SCCB + to CPU information array */ + HWORD numhsa; /* Number of HSAs */ + HWORD offhsa; /* Offset from start of SCCB + to HSA information array */ + BYTE loadparm[8]; /* Load parameter */ + FWORD xpndinum; /* Number of expanded storage + increments installed */ + FWORD xpndsz4K; /* Number of 4KB blocks in an + expanded storage increment*/ + HWORD xpndenum; /* Number of expanded storage + elements installed */ + HWORD resv3; /* Reserved */ + HWORD vectssiz; /* Vector section size */ + HWORD vectpsum; /* Vector partial sum number */ + BYTE ifm[8]; /* Installed facilities */ + BYTE resv4[8]; /* Reserved */ + HWORD maxresgp; /* Maximum resource group */ + BYTE resv5[6]; /* Reserved */ + HWORD nummpf; /* Number of entries in MPF + information array */ + HWORD offmpf; /* Offset from start of SCCB + to MPF information array */ + BYTE resv6[4]; /* Reserved */ + BYTE cfg[6]; /* Config characteristics */ + FWORD rcci; /* Capacity */ + BYTE resv7; /* Reserved */ + BYTE numcrl; /* Max #of copy and reassign + list elements allowed */ + FWORD etrtol; /* ETR sync check tolerance */ + BYTE resv60[3]; + BYTE maxvm; /* Max guest storage size + >= 31 and <= 64 (2**pow)-1 + is the max supported + guest real size. 0 means + not constrained. */ + FWORD grzm; /* Addess increment size in + units of 1M, valid only + if realiszm is zero */ + DWORD grnmx; /* Maximum increment number + when it is larger then + 64K or when ESAME is on */ + BYTE resv8[16]; /* Reserved */ + } SCCB_SCP_INFO; + +/* Bit definitions for installed facilities */ +#define SCCB_IFM0_CHANNEL_PATH_INFORMATION 0x80 +#define SCCB_IFM0_CHANNEL_PATH_SUBSYSTEM_COMMAND 0x40 +#define SCCB_IFM0_CHANNEL_PATH_RECONFIG 0x20 +#define SCCB_IFM0_CPU_INFORMATION 0x08 +#define SCCB_IFM0_CPU_RECONFIG 0x04 +#define SCCB_IFM1_SIGNAL_ALARM 0x80 +#define SCCB_IFM1_WRITE_OPERATOR_MESSAGE 0x40 +#define SCCB_IFM1_STORE_STATUS_ON_LOAD 0x20 +#define SCCB_IFM1_RESTART_REASONS 0x10 +#define SCCB_IFM1_INSTRUCTION_ADDRESS_TRACE_BUFFER 0x08 +#define SCCB_IFM1_LOAD_PARAMETER 0x04 +#define SCCB_IFM1_READ_AND_WRITE_DATA 0x02 +#define SCCB_IFM2_REAL_STORAGE_INCREMENT_RECONFIG 0x80 +#define SCCB_IFM2_REAL_STORAGE_ELEMENT_INFO 0x40 +#define SCCB_IFM2_REAL_STORAGE_ELEMENT_RECONFIG 0x20 +#define SCCB_IFM2_COPY_AND_REASSIGN_STORAGE 0x10 +#define SCCB_IFM2_EXTENDED_STORAGE_USABILITY_MAP 0x08 +#define SCCB_IFM2_EXTENDED_STORAGE_ELEMENT_INFO 0x04 +#define SCCB_IFM2_EXTENDED_STORAGE_ELEMENT_RECONFIG 0x02 +#define SCCB_IFM2_COPY_AND_REASSIGN_STORAGE_LIST 0x01 +#define SCCB_IFM3_VECTOR_FEATURE_RECONFIG 0x80 +#define SCCB_IFM3_READ_WRITE_EVENT_FEATURE 0x40 +#define SCCB_IFM3_EXTENDED_STORAGE_USABILITY_MAP_EXT 0x20 +#define SCCB_IFM3_READ_RESOURCE_GROUP_INFO 0x08 +#define SCCB_IFM4_READ_STORAGE_STATUS 0x80 + +/* Bit definitions for configuration characteristics */ +#define SCCB_CFG0_LOGICALLY_PARTITIONED 0x80 +#define SCCB_CFG0_SUPPRESSION_ON_PROTECTION 0x20 +#define SCCB_CFG0_INITIATE_RESET 0x10 +#define SCCB_CFG0_STORE_CHANNEL_SUBSYS_CHARACTERISTICS 0x08 +#define SCCB_CFG0_FAST_SYNCHRONOUS_DATA_MOVER 0x01 +#define SCCB_CFG0_MVPG_FOR_ALL_GUESTS 0x04 +#define SCCB_CFG0_UNKNOWN_BUT_SET_UNDER_VM 0x02 +#define SCCB_CFG1_CSLO 0x40 +#define SCCB_CFG2_DEVICE_ACTIVE_ONLY_MEASUREMENT 0x40 +#define SCCB_CFG2_CALLED_SPACE_IDENTIFICATION 0x02 +#define SCCB_CFG2_CHECKSUM_INSTRUCTION 0x01 +#define SCCB_CFG3_RESUME_PROGRAM 0x80 +#define SCCB_CFG3_PERFORM_LOCKED_OPERATION 0x40 +#define SCCB_CFG3_IMMEDIATE_AND_RELATIVE 0x10 +#define SCCB_CFG3_COMPARE_AND_MOVE_EXTENDED 0x08 +#define SCCB_CFG3_BRANCH_AND_SET_AUTHORITY 0x04 +#define SCCB_CFG3_EXTENDED_FLOATING_POINT 0x02 +#define SCCB_CFG3_EXTENDED_LOGICAL_COMPUTATION_FACILITY 0x01 +#define SCCB_CFG4_EXTENDED_TOD_CLOCK 0x80 +#define SCCB_CFG4_EXTENDED_TRANSLATION 0x40 +#define SCCB_CFG4_LOAD_REVERSED_FACILITY 0x20 +#define SCCB_CFG4_EXTENDED_TRANSLATION_FACILITY2 0x10 +#define SCCB_CFG4_STORE_SYSTEM_INFORMATION 0x08 +#define SCCB_CFG5_ESAME 0x01 + +/* CPU information array entry */ +typedef struct _SCCB_CPU_INFO { + BYTE cpa; /* CPU address */ + BYTE tod; /* TOD clock number */ + BYTE cpf[14]; /* RCPU facility map */ + } SCCB_CPU_INFO; + +/* Bit definitions for CPU installed features */ +#define SCCB_CPF0_SIE_370_MODE 0x80 +#define SCCB_CPF0_SIE_XA_MODE 0x40 +#define SCCB_CPF0_SIE_SET_II_370_MODE 0x20 +#define SCCB_CPF0_SIE_SET_II_XA_MODE 0x10 +#define SCCB_CPF0_SIE_NEW_INTERCEPT_FORMAT 0x08 +#define SCCB_CPF0_STORAGE_KEY_ASSIST 0x04 +#define SCCB_CPF0_MULTIPLE_CONTROLLED_DATA_SPACE 0x02 +#define SCCB_CPF1_IO_INTERPRETATION_LEVEL_2 0x40 +#define SCCB_CPF1_GUEST_PER_ENHANCED 0x20 +#define SCCB_CPF1_SIGP_INTERPRETATION_ASSIST 0x08 +#define SCCB_CPF1_RCP_BYPASS_FACILITY 0x04 +#define SCCB_CPF1_REGION_RELOCATE_FACILITY 0x02 +#define SCCB_CPF1_EXPEDITE_TIMER_PROCESSING 0x01 +#define SCCB_CPF2_VECTOR_FEATURE_INSTALLED 0x80 +#define SCCB_CPF2_VECTOR_FEATURE_CONNECTED 0x40 +#define SCCB_CPF2_VECTOR_FEATURE_STANDBY_STATE 0x20 +#define SCCB_CPF2_CRYPTO_FEATURE_ACCESSED 0x10 +#define SCCB_CPF2_EXPEDITE_RUN_PROCESSING 0x04 +#define SCCB_CPF3_PRIVATE_SPACE_FEATURE 0x80 +#define SCCB_CPF3_FETCH_ONLY_BIT 0x40 +#define SCCB_CPF3_PER2_INSTALLED 0x01 +#define SCCB_CPF4_OMISION_GR_ALTERATION_370 0x80 +#define SCCB_CPF5_GUEST_WAIT_STATE_ASSIST 0x40 +#define SCCB_CPF13_CRYPTO_UNIT_ID 0x01 + +/* HSA information array entry */ +typedef struct _SCCB_HSA_INFO { + HWORD hssz; /* Size of HSA in 4K blocks */ + FWORD ahsa; /* Address of HSA */ + } SCCB_HSA_INFO; + +/* MPF information array entry */ +typedef struct _SCCB_MPF_INFO { + HWORD mpfy; /* MPF info array entry */ + } SCCB_MPF_INFO; + +/* Channel path information data area */ +typedef struct _SCCB_CHP_INFO { + BYTE installed[32]; /* Channels installed bits */ + BYTE standby[32]; /* Channels standby bits */ + BYTE online[32]; /* Channels online bits */ + } SCCB_CHP_INFO; + +/* Channel path information data area */ +typedef struct _SCCB_CHSET { + BYTE chanset0a[32]; /* 370 channel set 0A */ + BYTE chanset1a[32]; /* 370 channel set 1A */ + BYTE chanset0b[32]; /* 370 channel set 0B */ + BYTE chanset1b[32]; /* 370 channel set 1B */ + BYTE csconfig; /* Channel set configuration */ + BYTE resv[23]; /* Reserved, set to zero */ + } SCCB_CHSET_INFO; + +/* Read Channel Subsystem Information data area */ +typedef struct _SCCB_CSI_INFO { + BYTE csif[8]; /* Channel Subsystem installed + facility field */ + BYTE resv[48]; + } SCCB_CSI_INFO; + +/* Bit definitions for channel subsystem installed facilities */ +#define SCCB_CSI0_CANCEL_IO_REQUEST_FACILITY 0x02 +#define SCCB_CSI0_CONCURRENT_SENSE_FACILITY 0x01 + +// #ifdef FEATURE_SYSTEM_CONSOLE +/* Write Event Mask */ +typedef struct _SCCB_EVENT_MASK { + HWORD reserved; + HWORD length; /* Event mask length */ + BYTE masks[32]; /* Event masks */ +// FWORD cp_recv_mask; /* These mask fields have */ +// FWORD cp_send_mask; /* the length defined by */ +// FWORD sclp_recv_mask; /* the length halfword */ +#define SCCB_EVENT_SUPP_RECV_MASK ( \ + (0x80000000 >> (SCCB_EVD_TYPE_MSG-1)) | \ + (0x80000000 >> (SCCB_EVD_TYPE_PRIOR-1)) | \ + (0x80000000 >> (SCCB_EVD_TYPE_CPIDENT-1)) ) +// FWORD sclp_send_mask; +#define SCCB_EVENT_SUPP_SEND_MASK ( \ + (0x80000000 >> (SCCB_EVD_TYPE_OPCMD-1)) | \ + (0x80000000 >> (SCCB_EVD_TYPE_STATECH-1)) | \ + (0x80000000 >> (SCCB_EVD_TYPE_PRIOR-1)) | \ + (0x80000000 >> (SCCB_EVD_TYPE_CPCMD-1)) ) + } SCCB_EVENT_MASK; + +/* Read/Write Event Data Header */ +typedef struct _SCCB_EVD_HDR { + HWORD totlen; /* Event Data Buffer total + length */ + BYTE type; +#define SCCB_EVD_TYPE_OPCMD 0x01 /* Operator command */ +#define SCCB_EVD_TYPE_MSG 0x02 /* Message from Control Pgm */ +#define SCCB_EVD_TYPE_STATECH 0x08 /* State Change */ +#define SCCB_EVD_TYPE_PRIOR 0x09 /* Priority message/command */ +#define SCCB_EVD_TYPE_CPIDENT 0x0B /* CntlProgIdent */ +#define SCCB_EVD_TYPE_CPCMD 0x20 /* CntlProgOpCmd */ + BYTE flag; +#define SCCB_EVD_FLAG_PROC 0x80 /* Event successful */ + HWORD resv; /* Reserved for future use */ + } SCCB_EVD_HDR; + +/* Read/Write Event Data Buffer */ +typedef struct _SCCB_EVD_BK { + HWORD msglen; + BYTE const1[51]; + HWORD cplen; /* CP message length */ + BYTE const2[24]; + HWORD tdlen; /* Text Data length */ + BYTE const3[2]; + BYTE sdtlen; + BYTE const4; /* Self defining tag */ + BYTE tmlen; + BYTE const5; /* Text Message format */ +// BYTE txtmsg[n]; + } SCCB_EVD_BK; + +/* Message Control Data Block */ +typedef struct _SCCB_MCD_BK { + HWORD length; /* Total length of MCD */ + HWORD type; /* Type must be 0x0001 */ + FWORD tag; /* Tag must be 0xD4C4C240 */ + FWORD revcd; /* Revision code 0x00000001 */ + } SCCB_MCD_BK; + +/* Message Control Data Block Header */ +typedef struct _SCCB_OBJ_HDR { + HWORD length; /* Total length of OBJ */ + HWORD type; /* Object type */ +#define SCCB_OBJ_TYPE_GENERAL 0x0001 /* General Object */ +#define SCCB_OBJ_TYPE_CPO 0x0002 /* Control Program Object */ +#define SCCB_OBJ_TYPE_NLS 0x0003 /* NLS data Object */ +#define SCCB_OBJ_TYPE_MESSAGE 0x0004 /* Message Text Object */ + } SCCB_OBJ_HDR; + +/* Message Control Data Block Message Text Object */ +typedef struct _SCCB_MTO_BK { + HWORD ltflag; /* Line type flag */ +#define SCCB_MTO_LTFLG0_CNTL 0x80 /* Control text line */ +#define SCCB_MTO_LTFLG0_LABEL 0x40 /* Label text line */ +#define SCCB_MTO_LTFLG0_DATA 0x20 /* Data text line */ +#define SCCB_MTO_LTFLG0_END 0x10 /* Last line of message */ +#define SCCB_MTO_LTFLG0_PROMPT 0x08 /* Prompt line - response + requested (WTOR) */ +#define SCCB_MTO_LTFLG0_DBCS 0x04 /* DBCS text */ +#define SCCB_MTO_LTFLG0_MIX 0x02 /* Mixed SBCS/DBCS text */ +#define SCCB_MTO_LTFLG1_OVER 0x01 /* Foreground presentation + field override */ + FWORD presattr; /* Presentation Attribute + Byte 0 - control + Byte 1 - color + Byte 2 - highlighting + Byte 3 - intensity */ +#define SCCB_MTO_PRATTR0_ALARM 0x80 /* Sound alarm (console) */ +#define SCCB_MTO_PRATTR3_HIGH 0xE8 /* Highlighted */ +#define SCCB_MTO_PRATTR3_NORM 0xE4 /* Normal */ + } SCCB_MTO_BK; + +/* Message Control Data Block General Object */ +typedef struct _SCCB_MGO_BK { + FWORD seq; /* Message DOM ID */ + BYTE time[11]; /* C'HH.MM.SS.th' */ + BYTE resv1; + BYTE date[7]; /* C'YYYYDDD' */ + BYTE resv2; + FWORD mflag; /* Message Flags */ +#define SCCB_MGO_MFLAG0_DOM 0x80 /* Delete Operator Message */ +#define SCCB_MGO_MFLAG0_ALARM 0x40 /* Sound the SCLP alarm */ +#define SCCB_MGO_MFLAG0_HOLD 0x20 /* Hold message until DOM */ + FWORD presattr; /* Presentation Attribute + Byte 0 - control + Byte 1 - color + Byte 2 - highlighting + Byte 3 - intensity */ +#define SCCB_MGO_PRATTR0_ALARM 0x80 /* Sound alarm (console) */ +#define SCCB_MGO_PRATTR3_HIGH 0xE8 /* Highlighted */ +#define SCCB_MGO_PRATTR3_NORM 0xE4 /* Normal */ + FWORD bckattr; /* Background presentation + attributes - covers all + message-test foreground + presentation attribute + field overrides */ + BYTE sysname[8]; /* Originating system name */ + BYTE jobname[8]; /* Jobname or guestname */ + } SCCB_MGO_BK; + +/* Control Program Information */ +typedef struct _SCCB_CPI_BK { + BYTE id_fmt; + BYTE resv0; + BYTE system_type[8]; + DWORD resv1; + BYTE system_name[8]; + DWORD resv2; + DWORD system_level; + DWORD resv3; + BYTE sysplex_name[8]; + BYTE resv4[16]; + } SCCB_CPI_BK; + +/* Message Control Data Block NLS Object */ +typedef struct _SCCB_NLS_BK { + HWORD scpgid; /* CPGID for SBCS (def 037) */ + HWORD scpsgid; /* CPSGID for SBCS (def 637) */ + HWORD dcpgid; /* CPGID for DBCS (def 037) */ + HWORD dcpsgid; /* CPSGID for DBCS (def 637) */ + } SCCB_NLS_BK; + +// #endif /*FEATURE_SYSTEM_CONSOLE*/ + +// #ifdef FEATURE_EXPANDED_STORAGE +typedef struct _SCCB_XST_INFO { + HWORD elmid; /* Extended storage element + id */ + BYTE resv1[6]; + FWORD elmsin; /* Starting increment number */ + FWORD elmein; /* Ending increment number */ + BYTE elmchar; /* Element characteristics */ +#define SCCB_XST_INFO_ELMCHAR_REQ 0x80; /* Required element */ + BYTE resv2[39]; + } SCCB_XST_INFO; + +typedef struct _SCCB_XST_MAP { + FWORD incnum; /* Increment number */ + FWORD resv; +// BYTE map[]; /* Bitmap of all usable +// expanded storage blocks */ + } SCCB_XST_MAP; +// #endif /*FEATURE_EXPANDED_STORAGE*/ + + +// #if defined(FEATURE_CHSC) +typedef struct _CHSC_REQ { + HWORD length; /* Offset to response field */ + HWORD req; /* Request code */ + FWORD resv[3]; + } CHSC_REQ; + +typedef struct _CHSC_RSP { + HWORD length; /* Length of response field */ + HWORD rsp; /* Reponse code */ +#define CHSC_REQ_INVALID 0x0002 /* Invalid request */ + FWORD info; + } CHSC_RSP; +// #endif /*defined(FEATURE_CHSC)*/ + +#endif /*!defined(_SERVICE_H)*/ diff --git a/shared.c b/shared.c new file mode 100644 index 0000000..4b75f89 --- /dev/null +++ b/shared.c @@ -0,0 +1,2967 @@ +/* SHARED.C (c)Copyright Greg Smith, 2002-2003 */ +/* Shared Device Server */ + +#define _HERCULES_SHARED_C +#include "hercules.h" +#include "opcode.h" +#include "devtype.h" +#include <sys/un.h> /* (need "sockaddr_un") */ + +#define FBA_BLKGRP_SIZE (120*512) + +/*-------------------------------------------------------------------*/ +/* Definitions for sense data format codes and message codes */ +/*-------------------------------------------------------------------*/ +#define FORMAT_0 0 /* Program or System Checks */ +#define FORMAT_1 1 /* Device Equipment Checks */ +#define FORMAT_2 2 /* 3990 Equipment Checks */ +#define FORMAT_3 3 /* 3990 Control Checks */ +#define FORMAT_4 4 /* Data Checks */ +#define FORMAT_5 5 /* Data Check + Displacement */ +#define FORMAT_6 6 /* Usage Stats/Overrun Errors*/ +#define FORMAT_7 7 /* Device Control Checks */ +#define FORMAT_8 8 /* Device Equipment Checks */ +#define FORMAT_9 9 /* Device Rd/Wrt/Seek Checks */ +#define FORMAT_F 15 /* Cache Storage Checks */ +#define MESSAGE_0 0 /* Message 0 */ +#define MESSAGE_1 1 /* Message 1 */ +#define MESSAGE_2 2 /* Message 2 */ +#define MESSAGE_3 3 /* Message 3 */ +#define MESSAGE_4 4 /* Message 4 */ +#define MESSAGE_5 5 /* Message 5 */ +#define MESSAGE_6 6 /* Message 6 */ +#define MESSAGE_7 7 /* Message 7 */ +#define MESSAGE_8 8 /* Message 8 */ +#define MESSAGE_9 9 /* Message 9 */ +#define MESSAGE_A 10 /* Message A */ +#define MESSAGE_B 11 /* Message B */ +#define MESSAGE_C 12 /* Message C */ +#define MESSAGE_D 13 /* Message D */ +#define MESSAGE_E 14 /* Message E */ +#define MESSAGE_F 15 /* Message F */ + +#if defined(OPTION_SHARED_DEVICES) + +DEVHND shared_ckd_device_hndinfo; +DEVHND shared_fba_device_hndinfo; + +static BYTE eighthexFF[] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; + +/*------------------------------------------------------------------- + * Update notify - called by device handlers for sharable devices + *-------------------------------------------------------------------*/ +int shared_update_notify (DEVBLK *dev, int block) +{ +int i, j; /* Indexes */ + + /* Return if no remotes are connected */ + if (dev->shrdconn == 0) + return 0; + + for (i = 0; i < SHARED_MAX_SYS; i++) + { + + /* Ignore the entry if it doesn't exist or if it's ours + our if it's already maxed out */ + if (dev->shrd[i] == NULL || dev->shrd[i]->id == dev->ioactive + || dev->shrd[i]->purgen < 0) + continue; + + /* Check if the block is already entered */ + for (j = 0; j < dev->shrd[i]->purgen; j++) + if (fetch_fw(dev->shrd[i]->purge[j]) == (U32)block) break; + + /* Add the block if it's not already there */ + if (j >= dev->shrd[i]->purgen) + { + if (dev->shrd[i]->purgen >= SHARED_PURGE_MAX) + dev->shrd[i]->purgen = -1; + else + store_fw (dev->shrd[i]->purge[dev->shrd[i]->purgen++], + block); + shrdtrc("notify %d added for id=%d, n=%d\n", + block, dev->shrd[i]->id, dev->shrd[i]->purgen); + } + + } /* for each possible remote system */ + + return 0; + +} /* shared_update_notify */ + + +/*------------------------------------------------------------------- + * CKD init exit (client side) + *-------------------------------------------------------------------*/ +int shared_ckd_init (DEVBLK *dev, int argc, BYTE *argv[] ) +{ +int rc; /* Return code */ +int i; /* Loop index */ +int retry; /* 1=Connection being retried*/ +BYTE *ipname; /* Remote name or address */ +BYTE *port = NULL; /* Remote port */ +BYTE *rmtnum = NULL; /* Remote device number */ +struct hostent *he; /* -> hostent structure */ +BYTE *kw; /* Argument keyword */ +BYTE *op; /* Argument operand */ +BYTE c; /* Used for parsing */ +BYTE *cu = NULL; /* Specified control unit */ +FWORD cyls; /* Remote number cylinders */ +BYTE *p, buf[1024]; /* Work buffer */ + + retry = dev->connecting; + + /* Process the arguments */ + if (!retry) + { + if (argc < 1 || strlen(argv[0]) >= sizeof(buf)) + return -1; + strcpy (buf, argv[0]); + + /* First argument is `ipname:port:devnum' */ + ipname = buf; + p = strchr (buf, ':'); + if (p) + { + *p = '\0'; + port = p + 1; + p = strchr (port, ':'); + } + if (p) + { + *p = '\0'; + rmtnum = p + 1; + } + + if ( strcmp (ipname, "localhost") == 0) + dev->localhost = 1; + else + { + if ( (he = gethostbyname (ipname)) == NULL ) + return -1; + memcpy(&dev->rmtaddr, he->h_addr_list[0], sizeof(dev->rmtaddr)); + } + + if (port && strlen(port)) + { + if (sscanf(port, "%hu%c", &dev->rmtport, &c) != 1) + return -1; + } + else + dev->rmtport = SHARED_DEFAULT_PORT; + + if (rmtnum && strlen(rmtnum)) + { + if (strlen (rmtnum) > 4 + || sscanf (rmtnum, "%hx%c", &dev->rmtnum, &c) != 1) + return -1; + } + else + dev->rmtnum = dev->devnum; + + /* Process the remaining arguments */ + for (i = 1; i < argc; i++) + { + if (strcasecmp ("readonly", argv[i]) == 0 || + strcasecmp ("rdonly", argv[i]) == 0 || + strcasecmp ("ro", argv[i]) == 0) + { + dev->ckdrdonly = 1; + continue; + } + if (strcasecmp ("fakewrite", argv[i]) == 0 || + strcasecmp ("fakewrt", argv[i]) == 0 || + strcasecmp ("fw", argv[i]) == 0) + { + dev->ckdfakewr = 1; + continue; + } + if (strlen (argv[i]) > 3 + && memcmp("cu=", argv[i], 3) == 0) + { + kw = strtok (argv[i], "="); + op = strtok (NULL, " \t"); + cu = op; + continue; + } +#ifdef HAVE_LIBZ + if (strlen (argv[i]) > 5 + && memcmp("comp=", argv[i], 5) == 0) + { + kw = strtok (argv[i], "="); + op = strtok (NULL, " \t"); + dev->rmtcomp = atoi (op); + if (dev->rmtcomp < 0 || dev->rmtcomp > 9) + dev->rmtcomp = 0; + continue; + } +#endif + logmsg (_("HHCSH001S parameter %d is invalid: %s\n"), + i + 1, argv[i]); + return -1; + } + } + + /* Set suported compression */ + dev->rmtcomps = 0; +#ifdef HAVE_LIBZ + dev->rmtcomps |= SHRD_LIBZ; +#endif +#ifdef CCKD_BZIP2 + dev->rmtcomps |= SHRD_BZIP2; +#endif + + /* Update the device handler vector */ + dev->hnd = &shared_ckd_device_hndinfo; + + dev->connecting = 1; + +init_retry: + + do { + rc = clientConnect (dev, retry); + if (rc < 0) + { + logmsg (_("HHCSH002W %4.4X connect pending to %s\n"), + dev->devnum, dev->filename); + if (retry) sleep(5); + } + } while (retry && rc < 0); + + /* Return if unable to connect */ + if (rc < 0) return 0; + + dev->ckdnumfd = 1; + dev->ckdfd[0] = dev->fd; + + /* Get the number of cylinders */ + rc = clientRequest (dev, cyls, 4, SHRD_QUERY, SHRD_CKDCYLS, NULL, NULL); + if (rc < 0) + goto init_retry; + else if (rc != 4) + { + logmsg (_("HHCSH003S %4.4X Error retrieving cylinders\n"), + dev->devnum); + return -1; + } + dev->ckdcyls = fetch_fw (cyls); + + /* Get the device characteristics */ + rc = clientRequest (dev, dev->devchar, sizeof(dev->devchar), + SHRD_QUERY, SHRD_DEVCHAR, NULL, NULL); + if (rc < 0) + goto init_retry; + else if (rc == 0 || rc > (int)sizeof(dev->devchar)) + { + logmsg (_("HHCSH004S %4.4X Error retrieving device" + " characteristics\n"), dev->devnum); + return -1; + } + dev->numdevchar = rc; + + /* Get number of heads from devchar */ + dev->ckdheads = fetch_hw (dev->devchar + 14); + + /* Calculate number of tracks */ + dev->ckdtrks = dev->ckdcyls * dev->ckdheads; + dev->ckdhitrk[0] = dev->ckdtrks; + + /* Check the device type */ + if (dev->devtype == 0) + dev->devtype = fetch_hw (dev->devchar + 3); + else if (dev->devtype != fetch_hw (dev->devchar + 3)) + { + logmsg (_("HHCSH005S %4.4X Remote device %4.4X is a %4.4X\n"), + dev->devnum, dev->rmtnum, fetch_hw (dev->devchar + 3)); + return -1; + } + + /* Get the device id */ + rc = clientRequest (dev, dev->devid, sizeof(dev->devid), + SHRD_QUERY, SHRD_DEVID, NULL, NULL); + if (rc < 0) + goto init_retry; + else if (rc == 0 || rc > (int)sizeof(dev->devid)) + { + logmsg (_("HHCSH006S %4.4X Error retrieving device id\n"), + dev->devnum); + return -1; + } + dev->numdevid = rc; + + /* Indicate no active track */ + dev->cache = dev->bufcur = -1; + dev->buf = NULL; + + /* Set number of sense bytes */ + dev->numsense = 32; + + /* Locate the CKD dasd table entry */ + dev->ckdtab = dasd_lookup (DASD_CKDDEV, NULL, dev->devtype, dev->ckdcyls); + if (dev->ckdtab == NULL) + { + logmsg (_("HHCSH007S %4.4X device type %4.4X not found in dasd table\n"), + dev->devnum, dev->devtype); + return -1; + } + + /* Set the track size */ + dev->ckdtrksz = (dev->ckdtab->r1 + 511) & ~511; + + /* Locate the CKD control unit dasd table entry */ + dev->ckdcu = dasd_lookup (DASD_CKDCU, cu ? cu : dev->ckdtab->cu, 0, 0); + if (dev->ckdcu == NULL) + { + logmsg (_("HHCSH008S %4.4X control unit %s not found in dasd table\n"), + dev->devnum, cu ? cu : dev->ckdtab->cu); + return -1; + } + + /* Set flag bit if 3990 controller */ + if (dev->ckdcu->devt == 0x3990) + dev->ckd3990 = 1; + + /* Clear the DPA */ + memset(dev->pgid, 0, sizeof(dev->pgid)); + + /* Request the channel to merge data chained write CCWs into + a single buffer before passing data to the device handler */ + dev->cdwmerge = 1; + + /* Purge the cache */ + clientPurge (dev, 0, NULL); + + /* Log the device geometry */ + if (!dev->batch) + logmsg (_("HHCSH009I %s cyls=%d heads=%d tracks=%d trklen=%d\n"), + dev->filename, dev->ckdcyls, + dev->ckdheads, dev->ckdtrks, dev->ckdtrksz); + + dev->connecting = 0; + + return 0; +} /* shared_ckd_init */ + +/*------------------------------------------------------------------- + * CKD close exit (client side) + *-------------------------------------------------------------------*/ +static int shared_ckd_close ( DEVBLK *dev ) +{ + /* Purge the cached entries */ + clientPurge (dev, 0, NULL); + + /* Disconnect and close */ + if (dev->fd >= 0) + { + clientRequest (dev, NULL, 0, SHRD_DISCONNECT, 0, NULL, NULL); + close (dev->fd); + dev->fd = -1; + } + + return 0; +} /* shared_ckd_close */ + +/*------------------------------------------------------------------- + * FBA init exit (client side) + *-------------------------------------------------------------------*/ +int shared_fba_init (DEVBLK *dev, int argc, BYTE *argv[] ) +{ +int rc; /* Return code */ +int i; /* Loop index */ +int retry; /* 1=Connection being retried*/ +BYTE *ipname; /* Remote name or address */ +BYTE *port = NULL; /* Remote port */ +BYTE *rmtnum = NULL; /* Remote device number */ +struct hostent *he; /* -> hostent structure */ +BYTE *kw; /* Argument keyword */ +BYTE *op; /* Argument operand */ +BYTE c; /* Work for sscanf */ +FWORD origin; /* FBA origin */ +FWORD numblks; /* FBA number blocks */ +FWORD blksiz; /* FBA block size */ +BYTE *p, buf[1024]; /* Work buffer */ + + retry = dev->connecting; + + /* Process the arguments */ + if (!retry) + { + + kw = op = NULL; + + if (argc < 1 || strlen(argv[0]) >= sizeof(buf)) + return -1; + strcpy (buf, argv[0]); + + /* First argument is `ipname:port:devnum' */ + ipname = buf; + p = strchr (buf, ':'); + if (p) + { + *p = '\0'; + port = p + 1; + p = strchr (port, ':'); + } + if (p) + { + *p = '\0'; + rmtnum = p + 1; + } + + if ( (he = gethostbyname (ipname)) == NULL ) + return -1; + memcpy(&dev->rmtaddr, he->h_addr_list[0], sizeof(dev->rmtaddr)); + + if (port) + { + if (sscanf(port, "%hu%c", &dev->rmtport, &c) != 1) + return -1; + } + else + dev->rmtport = SHARED_DEFAULT_PORT; + + if (rmtnum) + { + if (strlen (rmtnum) > 4 + || sscanf (rmtnum, "%hx%c", &dev->rmtnum, &c) != 0) + return -1; + } + else + dev->rmtnum = dev->devnum; + + /* Process the remaining arguments */ + for (i = 1; i < argc; i++) + { +#ifdef HAVE_LIBZ + if (strlen (argv[i]) > 5 + && memcmp("comp=", argv[i], 5) == 0) + { + kw = strtok (argv[i], "="); + op = strtok (NULL, " \t"); + dev->rmtcomp = atoi (op); + if (dev->rmtcomp < 0 || dev->rmtcomp > 9) + dev->rmtcomp = 0; + continue; + } +#endif + logmsg (_("HHCSH010S parameter %d is invalid: %s\n"), + i + 1, argv[i]); + return -1; + } + } + + /* Set suported compression */ + dev->rmtcomps = 0; +#ifdef HAVE_LIBZ + dev->rmtcomps |= SHRD_LIBZ; +#endif +#ifdef CCKD_BZIP2 + dev->rmtcomps |= SHRD_BZIP2; +#endif + + /* Update the device handler vector */ + dev->hnd = &shared_fba_device_hndinfo; + + dev->connecting = 1; + +init_retry: + + do { + rc = clientConnect (dev, retry); + if (rc < 0) + { + logmsg (_("HHCSH011I %4.4X connect pending to %s\n"), + dev->devnum, dev->filename); + if (retry) sleep(5); + } + } while (retry && rc < 0); + + /* Return if unable to connect */ + if (rc < 0) return 0; + + /* Get the fba origin */ + rc = clientRequest (dev, origin, 4, SHRD_QUERY, SHRD_FBAORIGIN, NULL, NULL); + if (rc < 0) + goto init_retry; + else if (rc != 4) + { + logmsg (_("HHCSH012S %4.4X Error retrieving fba origin\n"), + dev->devnum); + return -1; + } + dev->fbaorigin = fetch_fw (origin); + + /* Get the number of blocks */ + rc = clientRequest (dev, numblks, 4, SHRD_QUERY, SHRD_FBANUMBLK, NULL, NULL); + if (rc < 0) + goto init_retry; + else if (rc != 4) + { + logmsg (_("HHCSH013S %4.4X Error retrieving fba number blocks\n"), + dev->devnum); + return -1; + } + dev->fbanumblk = fetch_fw (numblks); + + /* Get the block size */ + rc = clientRequest (dev, blksiz, 4, SHRD_QUERY, SHRD_FBABLKSIZ, NULL, NULL); + if (rc < 0) + goto init_retry; + else if (rc != 4) + { + logmsg (_("HHCSH014S %4.4X Error retrieving fba block size\n"), + dev->devnum); + return -1; + } + dev->fbablksiz = fetch_fw (blksiz); + dev->fbaend = (dev->fbaorigin + dev->fbanumblk) * dev->fbablksiz; + + /* Get the device id */ + rc = clientRequest (dev, dev->devid, sizeof(dev->devid), + SHRD_QUERY, SHRD_DEVID, NULL, NULL); + if (rc < 0) + goto init_retry; + else if (rc == 0 || rc > (int)sizeof(dev->devid)) + { + logmsg (_("HHCSH015S %4.4X Error retrieving device id\n"), + dev->devnum); + return -1; + } + dev->numdevid = rc; + + /* Check the device type */ + if (dev->devtype != fetch_hw (dev->devid + 4)) + { + logmsg (_("HHCSH016S %4.4X Remote device %4.4X is a %4.4X\n"), + dev->devnum, dev->rmtnum, fetch_hw (dev->devid + 4)); + return -1; + } + + /* Get the device characteristics */ + rc = clientRequest (dev, dev->devchar, sizeof(dev->devchar), + SHRD_QUERY, SHRD_DEVCHAR, NULL, NULL); + if (rc < 0) + goto init_retry; + else if (rc == 0 || rc > (int)sizeof(dev->devchar)) + { + logmsg (_("HHCSH017S %4.4X Error retrieving device" + " characteristics\n"), dev->devnum); + return -1; + } + dev->numdevchar = rc; + + /* Indicate no active track */ + dev->cache = dev->bufcur = -1; + dev->buf = NULL; + + /* Set number of sense bytes */ + dev->numsense = 32; + + /* Locate the FBA dasd table entry */ + dev->fbatab = dasd_lookup (DASD_FBADEV, NULL, dev->devtype, dev->fbanumblk); + if (dev->fbatab == NULL) + { + logmsg (_("HHCSH018S %4.4X device type %4.4X not found in dasd table\n"), + dev->devnum, dev->devtype); + return -1; + } + + /* Purge the cache */ + clientPurge (dev, 0, NULL); + + /* Log the device geometry */ + logmsg (_("HHCSH019I %s origin=%d blks=%d\n"), + dev->filename, dev->fbaorigin, dev->fbanumblk); + + dev->connecting = 0; + + return 0; +} + +/*------------------------------------------------------------------- + * FBA close exit (client side) + *-------------------------------------------------------------------*/ +static int shared_fba_close (DEVBLK *dev) +{ + /* Purge the cached entries */ + clientPurge (dev, 0, NULL); + + /* Disconnect and close */ + if (dev->fd >= 0) + { + clientRequest (dev, NULL, 0, SHRD_DISCONNECT, 0, NULL, NULL); + close (dev->fd); + dev->fd = -1; + } + + return 0; +} + +/*------------------------------------------------------------------- + * Start I/O exit (client side) + *-------------------------------------------------------------------*/ +static void shared_start(DEVBLK *dev) +{ +int rc; /* Return code */ +U16 devnum; /* Cache device number */ +int trk; /* Cache track number */ +int code; /* Response code */ +BYTE buf[SHARED_PURGE_MAX * 4]; /* Purge list */ + + shrdtrc("start cur %d cache %d\n",dev->bufcur,dev->cache); + + /* Send the START request */ + rc = clientRequest (dev, buf, sizeof(buf), + SHRD_START, 0, &code, NULL); + if (rc < 0) + { + logmsg(_("HHCSH020E %4.4X error during channel program start\n"), + dev->devnum); + clientPurge (dev, 0, NULL); + dev->cache = dev->bufcur = -1; + dev->buf = NULL; + return; + } + + /* Check for purge */ + if (code & SHRD_PURGE) + { + if (rc / 4 > SHARED_PURGE_MAX) rc = 0; + clientPurge (dev, rc / 4, buf); + } + + /* Make previous active entry active again */ + if (dev->cache >= 0) + { + cache_lock (CACHE_DEVBUF); + SHRD_CACHE_GETKEY (dev->cache, devnum, trk); + if (dev->devnum == devnum && dev->bufcur == trk) + cache_setflag(CACHE_DEVBUF, dev->cache, ~0, SHRD_CACHE_ACTIVE); + else + { + dev->cache = dev->bufcur = -1; + dev->buf = NULL; + } + cache_unlock (CACHE_DEVBUF); + } +} /* shared_start */ + +/*------------------------------------------------------------------- + * End I/O exit (client side) + *-------------------------------------------------------------------*/ +static void shared_end (DEVBLK *dev) +{ +int rc; /* Return code */ + + shrdtrc("end cur %d cache %d\n",dev->bufcur,dev->cache); + + /* Write the previous active entry if it was updated */ + if (dev->bufupd) + clientWrite (dev, dev->bufcur); + dev->bufupd = 0; + + /* Mark the active entry inactive */ + if (dev->cache >= 0) + { + cache_lock (CACHE_DEVBUF); + cache_setflag (CACHE_DEVBUF, dev->cache, ~SHRD_CACHE_ACTIVE, 0); + cache_unlock (CACHE_DEVBUF); + } + + /* Send the END request */ + rc = clientRequest (dev, NULL, 0, SHRD_END, 0, NULL, NULL); + if (rc < 0) + { + logmsg(_("HHCSH021E %4.4X error during channel program end\n"), + dev->devnum); + clientPurge (dev, 0, NULL); + dev->cache = dev->bufcur = -1; + dev->buf = NULL; + return; + } +} /* shared_end */ + +/*------------------------------------------------------------------- + * Shared ckd read track exit (client side) + *-------------------------------------------------------------------*/ +static int shared_ckd_read (DEVBLK *dev, int trk, BYTE *unitstat) +{ +int rc; /* Return code */ +int retries = 10; /* Number read retries */ +int cache; /* Lookup index */ +int lru; /* Available index */ +int len; /* Response length */ +int id; /* Response id */ +BYTE *buf; /* Cache buffer */ +BYTE code; /* Response code */ +U16 devnum; /* Response device number */ +BYTE hdr[SHRD_HDR_SIZE + 4]; /* Read request header */ + + /* Initialize the unit status */ + *unitstat = 0; + + /* Return if reading the same track image */ + if (trk == dev->bufcur && dev->cache >= 0) + { + dev->bufoff = 0; + dev->bufoffhi = dev->ckdtrksz; + return 0; + } + + shrdtrc("ckd_read trk %d\n",trk); + + /* Write the previous active entry if it was updated */ + if (dev->bufupd) + clientWrite (dev, dev->bufcur); + dev->bufupd = 0; + + /* Reset buffer offsets */ + dev->bufoff = 0; + dev->bufoffhi = dev->ckdtrksz; + + cache_lock (CACHE_DEVBUF); + + /* Inactivate the previous image */ + if (dev->cache >= 0) + cache_setflag (CACHE_DEVBUF, dev->cache, ~SHRD_CACHE_ACTIVE, 0); + dev->cache = dev->bufcur = -1; + +cache_retry: + + /* Lookup the track in the cache */ + cache = cache_lookup (CACHE_DEVBUF, SHRD_CACHE_SETKEY(dev->devnum, trk), &lru); + + /* Process cache hit */ + if (cache >= 0) + { + cache_setflag (CACHE_DEVBUF, cache, ~0, SHRD_CACHE_ACTIVE); + cache_unlock (CACHE_DEVBUF); + dev->cachehits++; + dev->cache = cache; + dev->buf = cache_getbuf (CACHE_DEVBUF, cache, 0); + dev->bufcur = trk; + dev->bufoff = 0; + dev->bufoffhi = dev->ckdtrksz; + dev->buflen = shared_ckd_trklen (dev, dev->buf); + dev->bufsize = cache_getlen (CACHE_DEVBUF, cache); + shrdtrc("ckd_read trk %d cache hit %d\n",trk,dev->cache); + return 0; + } + + /* Special processing if no available cache entry */ + if (lru < 0) + { + shrdtrc("ckd_read trk %d cache wait\n",trk); + dev->cachewaits++; + cache_wait (CACHE_DEVBUF); + goto cache_retry; + } + + /* Process cache miss */ + shrdtrc("ckd_read trk %d cache miss %d\n",trk,dev->cache); + dev->cachemisses++; + cache_setflag (CACHE_DEVBUF, lru, 0, SHRD_CACHE_ACTIVE|DEVBUF_TYPE_SCKD); + cache_setkey (CACHE_DEVBUF, lru, SHRD_CACHE_SETKEY(dev->devnum, trk)); + cache_setage (CACHE_DEVBUF, lru); + buf = cache_getbuf (CACHE_DEVBUF, lru, dev->ckdtrksz); + + cache_unlock (CACHE_DEVBUF); + +read_retry: + + /* Send the read request for the track to the remote host */ + SHRD_SET_HDR (hdr, SHRD_READ, 0, dev->rmtnum, dev->rmtid, 4); + store_fw (hdr + SHRD_HDR_SIZE, trk); + rc = clientSend (dev, hdr, NULL, 0); + if (rc < 0) + { + ckd_build_sense (dev, SENSE_EC, 0, 0, FORMAT_1, MESSAGE_0); + *unitstat = CSW_CE | CSW_DE | CSW_UC; + logmsg(_("HHCSH022E %4.4X error reading track %d\n"), dev->devnum, trk); + return -1; + } + + /* Read the track from the remote host */ + rc = clientRecv (dev, hdr, buf, dev->ckdtrksz); + SHRD_GET_HDR (hdr, code, *unitstat, devnum, id, len); + if (rc < 0 || code & SHRD_ERROR) + { + if (rc < 0 && retries--) goto read_retry; + ckd_build_sense (dev, SENSE_EC, 0, 0, FORMAT_1, MESSAGE_0); + *unitstat = CSW_CE | CSW_DE | CSW_UC; + logmsg(_("HHCSH023E %4.4X error reading track %d\n"), + dev->devnum, trk); + return -1; + } + + /* Read the sense data if an i/o error occurred */ + if (code & SHRD_IOERR) + clientRequest (dev, dev->sense, dev->numsense, + SHRD_SENSE, 0, NULL, NULL); + + /* Read complete */ + dev->cache = lru; + dev->buf = cache_getbuf (CACHE_DEVBUF, lru, 0); + dev->bufcur = trk; + dev->bufoff = 0; + dev->bufoffhi = dev->ckdtrksz; + dev->buflen = shared_ckd_trklen (dev, dev->buf); + dev->bufsize = cache_getlen (CACHE_DEVBUF, lru); + dev->buf[0] = 0; + + return 0; +} /* shared_ckd_read */ + +/*------------------------------------------------------------------- + * Shared ckd write track exit (client side) + *-------------------------------------------------------------------*/ +static int shared_ckd_write (DEVBLK *dev, int trk, int off, + BYTE *buf, int len, BYTE *unitstat) +{ +int rc; /* Return code */ + + /* Immediately return if fake writing */ + if (dev->ckdfakewr) + return len; + + /* Error if opened read-only */ + if (dev->ckdrdonly) + { + ckd_build_sense (dev, SENSE_EC, SENSE1_WRI, 0, + FORMAT_1, MESSAGE_0); + *unitstat = CSW_CE | CSW_DE | CSW_UC; + return -1; + } + + shrdtrc("ckd_write trk %d off %d len %d\n",trk,off,len); + + /* If the track is not current then read it */ + if (trk != dev->bufcur) + { + rc = (dev->hnd->read) (dev, trk, unitstat); + if (rc < 0) + { + dev->bufcur = dev->cache = -1; + return -1; + } + } + + /* Invalid track format if going past buffer end */ + if (off + len > dev->bufoffhi) + { + ckd_build_sense (dev, 0, SENSE1_ITF, 0, 0, 0); + *unitstat = CSW_CE | CSW_DE | CSW_UC; + return -1; + } + + /* Copy the data into the buffer */ + if (buf) memcpy (dev->buf + off, buf, len); + + /* Set low and high updated offsets */ + if (!dev->bufupd || off < dev->bufupdlo) + dev->bufupdlo = off; + if (dev->bufoff + len > dev->bufupdhi) + dev->bufupdhi = off + len; + + /* Indicate track image has been modified */ + if (!dev->bufupd) + { + dev->bufupd = 1; + shared_update_notify (dev, trk); + } + + return len; +} /* shared_ckd_write */ + +/*------------------------------------------------------------------- + * Return track image length + *-------------------------------------------------------------------*/ +static int shared_ckd_trklen (DEVBLK *dev, BYTE *buf) +{ +int sz; /* Size so far */ + + for (sz = CKDDASD_TRKHDR_SIZE; + memcmp (buf + sz, &eighthexFF, 8) != 0; ) + { + /* add length of count, key, and data fields */ + sz += CKDDASD_RECHDR_SIZE + + buf[sz+5] + + (buf[sz+6] << 8) + buf[sz+7]; + if (sz > dev->ckdtrksz - 8) break; + } + + /* add length for end-of-track indicator */ + sz += CKDDASD_RECHDR_SIZE; + + if (sz > dev->ckdtrksz) + sz = dev->ckdtrksz; + + return sz; +} + +/*------------------------------------------------------------------- + * Shared fba read block exit (client side) + *-------------------------------------------------------------------*/ +static int shared_fba_read (DEVBLK *dev, int blkgrp, BYTE *unitstat) +{ +int rc; /* Return code */ +int retries = 10; /* Number read retries */ +int i, o; /* Cache indexes */ +BYTE code; /* Response code */ +U16 devnum; /* Response device number */ +int len; /* Response length */ +int id; /* Response id */ +BYTE hdr[SHRD_HDR_SIZE + 4]; /* Read request header */ + + + /* Return if reading the same block group */ + if (blkgrp >= 0 && blkgrp == dev->bufcur) + return 0; + + shrdtrc("fba_read blkrp %d\n",blkgrp); + + /* Write the previous active entry if it was updated */ + if (dev->bufupd) + clientWrite (dev, dev->bufcur); + dev->bufupd = 0; + + /* Reset buffer offsets */ + dev->bufoff = 0; + dev->bufoffhi = FBA_BLKGRP_SIZE; + + cache_lock (CACHE_DEVBUF); + + /* Make the previous cache entry inactive */ + if (dev->cache >= 0) + cache_setflag(CACHE_DEVBUF, dev->cache, ~FBA_CACHE_ACTIVE, 0); + dev->bufcur = dev->cache = -1; + +cache_retry: + + /* Search the cache */ + i = cache_lookup (CACHE_DEVBUF, FBA_CACHE_SETKEY(dev->devnum, blkgrp), &o); + + /* Cache hit */ + if (i >= 0) + { + cache_setflag(CACHE_DEVBUF, dev->cache, ~0, FBA_CACHE_ACTIVE); + cache_setage(CACHE_DEVBUF, dev->cache); + cache_unlock(CACHE_DEVBUF); + dev->cachehits++; + dev->cache = i; + dev->buf = cache_getbuf(CACHE_DEVBUF, dev->cache, 0); + dev->bufcur = blkgrp; + dev->bufoff = 0; + dev->bufoffhi = shared_fba_blkgrp_len (dev, blkgrp); + dev->buflen = shared_fba_blkgrp_len (dev, blkgrp); + dev->bufsize = cache_getlen(CACHE_DEVBUF, dev->cache); + shrdtrc("fba_read blkgrp %d cache hit %d\n",blkgrp,dev->cache); + return 0; + } + + /* Wait if no available cache entry */ + if (o < 0) + { + shrdtrc("fba_read blkgrp %d cache wait\n",blkgrp); + dev->cachewaits++; + cache_wait(CACHE_DEVBUF); + goto cache_retry; + } + + /* Cache miss */ + shrdtrc("fba_read blkgrp %d cache miss %d\n",blkgrp,dev->cache); + dev->cachemisses++; + cache_setflag(CACHE_DEVBUF, o, 0, FBA_CACHE_ACTIVE|DEVBUF_TYPE_SFBA); + cache_setkey (CACHE_DEVBUF, o, FBA_CACHE_SETKEY(dev->devnum, blkgrp)); + cache_setage (CACHE_DEVBUF, o); + dev->buf = cache_getbuf(CACHE_DEVBUF, o, FBA_BLKGRP_SIZE); + + cache_unlock (CACHE_DEVBUF); + +read_retry: + + /* Send the read request for the blkgrp to the remote host */ + SHRD_SET_HDR (hdr, SHRD_READ, 0, dev->rmtnum, dev->rmtid, 4); + store_fw (hdr + SHRD_HDR_SIZE, blkgrp); + rc = clientSend (dev, hdr, NULL, 0); + if (rc < 0) + { + dev->sense[0] = SENSE_EC; + *unitstat = CSW_CE | CSW_DE | CSW_UC; + logmsg(_("HHCSH024E %4.4X error reading block group %d\n"), + dev->devnum, blkgrp); + return -1; + } + + /* Read the blkgrp from the remote host */ + rc = clientRecv (dev, hdr, dev->buf, FBA_BLKGRP_SIZE); + SHRD_GET_HDR (hdr, code, *unitstat, devnum, id, len); + if (rc < 0 || code & SHRD_ERROR) + { + if (rc < 0 && retries--) goto read_retry; + dev->sense[0] = SENSE_EC; + *unitstat = CSW_CE | CSW_DE | CSW_UC; + logmsg(_("HHCSH025E %4.4X error reading block group %d\n"), + dev->devnum, blkgrp); + return -1; + } + + /* Read the sense data if an i/o error occurred */ + if (code & SHRD_IOERR) + clientRequest (dev, dev->sense, dev->numsense, + SHRD_SENSE, 0, NULL, NULL); + + dev->cache = o; + dev->buf = cache_getbuf(CACHE_DEVBUF, dev->cache, 0); + dev->buf[0] = 0; + dev->bufcur = blkgrp; + dev->bufoff = 0; + dev->bufoffhi = shared_fba_blkgrp_len (dev, blkgrp); + dev->buflen = shared_fba_blkgrp_len (dev, blkgrp); + dev->bufsize = cache_getlen(CACHE_DEVBUF, dev->cache); + + return 0; +} + +/*------------------------------------------------------------------- + * Shared fba write block exit (client side) + *-------------------------------------------------------------------*/ +static int shared_fba_write (DEVBLK *dev, int blkgrp, int off, + BYTE *buf, int len, BYTE *unitstat) +{ +int rc; /* Return code */ + + /* Read the block group */ + if (blkgrp != dev->bufcur) + { + rc = (dev->hnd->read) (dev, blkgrp, unitstat); + if (rc < 0) { + dev->bufcur = dev->cache = -1; + return -1; + } + } + + /* Copy to the device buffer */ + if (buf) memcpy (dev->buf + off, buf, len); + + /* Update high/low offsets */ + if (!dev->bufupd || off < dev->bufupdlo) + dev->bufupdlo = off; + if (off + len > dev-> bufupdhi) + dev->bufupdhi = off + len; + + /* Indicate block group has been modified */ + if (!dev->bufupd) + { + dev->bufupd = 1; + shared_update_notify (dev, blkgrp); + } + + return len; +} + +/*-------------------------------------------------------------------*/ +/* Calculate length of an FBA block group */ +/*-------------------------------------------------------------------*/ +static int shared_fba_blkgrp_len (DEVBLK *dev, int blkgrp) +{ +off_t offset; /* Offset of block group */ + + offset = blkgrp * FBA_BLKGRP_SIZE; + if (dev->fbaend - offset < FBA_BLKGRP_SIZE) + return (int)(dev->fbaend - offset); + else + return FBA_BLKGRP_SIZE; +} + +/*------------------------------------------------------------------- + * Shared usage exit (client side) + *-------------------------------------------------------------------*/ +static int shared_used (DEVBLK *dev) +{ +int rc; /* Return code */ +FWORD usage; /* Usage buffer */ + + /* Get usage information */ + rc = clientRequest (dev, usage, 4, SHRD_USED, 0, NULL, NULL); + if (rc != 4) + { + logmsg (_("HHCSH026E %4.4X Error retrieving usage information\n"), + dev->devnum); + return -1; + } + return fetch_fw (usage); +} /* shared_used */ + +/*------------------------------------------------------------------- + * Shared reserve exit (client side) + *-------------------------------------------------------------------*/ +static void shared_reserve (DEVBLK *dev) +{ +int rc; /* Return code */ + + /* Issue reserve request */ + rc = clientRequest (dev, NULL, 0, SHRD_RESERVE, 0, NULL, NULL); + +} /* shared_reserve */ + +/*------------------------------------------------------------------- + * Shared release exit (client side) + *-------------------------------------------------------------------*/ +static void shared_release (DEVBLK *dev) +{ +int rc; /* Return code */ + + /* Issue release request */ + rc = clientRequest (dev, NULL, 0, SHRD_RELEASE, 0, NULL, NULL); + +} /* shared_release */ + +/*------------------------------------------------------------------- + * Write to host + * + * NOTE - writes are deferred until a switch occurs or the + * channel program ends. We are called from either the + * read exit or the end channel program exit. + *-------------------------------------------------------------------*/ +static int clientWrite (DEVBLK *dev, int block) +{ +int rc; /* Return code */ +int retries = 10; /* Number write retries */ +int len; /* Data length */ +BYTE hdr[SHRD_HDR_SIZE + 2 + 4]; /* Write header */ +BYTE code; /* Response code */ +int status; /* Response status */ +int id; /* Response identifier */ +U16 devnum; /* Response device number */ +BYTE errmsg[SHARED_MAX_MSGLEN+1];/* Error message */ + + /* Calculate length to write */ + len = dev->bufupdhi - dev->bufupdlo; + if (len <= 0 || dev->bufcur < 0) + { + dev->bufupdlo = dev->bufupdhi = 0; + return 0; + } + + shrdtrc("write rcd %d off %d len %d\n",block,dev->bufupdlo,len); + +write_retry: + + /* The write request contains a 2 byte offset and 4 byte id, + followed by the data */ + SHRD_SET_HDR (hdr, SHRD_WRITE, 0, dev->rmtnum, dev->rmtid, len + 6); + store_hw (hdr + SHRD_HDR_SIZE, dev->bufupdlo); + store_fw (hdr + SHRD_HDR_SIZE + 2, block); + + rc = clientSend (dev, hdr, dev->buf + dev->bufupdlo, len); + if (rc < 0) + { + logmsg(_("HHCSH027E %4.4X error writing track %d\n"), + dev->devnum, dev->bufcur); + dev->bufupdlo = dev->bufupdhi = 0; + clientPurge (dev, 0, NULL); + return -1; + } + + /* Get the response */ + rc = clientRecv (dev, hdr, errmsg, sizeof(errmsg)); + SHRD_GET_HDR (hdr, code, status, devnum, id, len); + if (rc < 0 || (code & SHRD_ERROR) || (code & SHRD_IOERR)) + { + if (rc < 0 && retries--) goto write_retry; + logmsg(_("HHCSH028E %4.4X remote error writing track %d: " + "%2.2X-%2.2X\n"), dev->devnum, dev->bufcur, code, status); + dev->bufupdlo = dev->bufupdhi = 0; + clientPurge (dev, 0, NULL); + return -1; + } + + dev->bufupdlo = dev->bufupdhi = 0; + return rc; +} /* clientWrite */ + +/*------------------------------------------------------------------- + * Purge cache entries (client side) + *-------------------------------------------------------------------*/ +static void clientPurge (DEVBLK *dev, int n, void *buf) +{ + cache_lock(CACHE_DEVBUF); + dev->rmtpurgen = n; + dev->rmtpurge = (FWORD *)buf; + cache_scan (CACHE_DEVBUF, clientPurgescan, dev); + cache_unlock(CACHE_DEVBUF); +} +static int clientPurgescan (int *answer, int ix, int i, void *data) +{ +U16 devnum; /* Cached device number */ +int trk; /* Cached track */ +int p; /* Purge index */ +DEVBLK *dev = data; /* -> device block */ + + UNREFERENCED(answer); + SHRD_CACHE_GETKEY(i, devnum, trk); + if (devnum == dev->devnum) + { + if (dev->rmtpurgen == 0) { + cache_release (ix, i, 0); + shrdtrc("purge %d\n",trk); + } + else + { + for (p = 0; p < dev->rmtpurgen; p++) + { + if (trk == (int)fetch_fw (dev->rmtpurge[p])) + { + shrdtrc("purge %d\n",trk); + cache_release (ix, i, 0); + break; + } + } + } + } + return 0; +} /* clientPurge */ + +/*------------------------------------------------------------------- + * Connect to the server (client side) + *-------------------------------------------------------------------*/ +static int clientConnect (DEVBLK *dev, int retry) +{ +int rc; /* Return code */ +struct sockaddr *server; /* -> server descriptor */ +int flag; /* Flags (version | release) */ +int len; /* Length server descriptor */ +struct sockaddr_in iserver; /* inet server descriptor */ +struct sockaddr_un userver; /* unix server descriptor */ +int retries = 10; /* Number of retries */ +HWORD id; /* Returned identifier */ +HWORD comp; /* Returned compression parm */ + + do { + + /* Close previous connection */ + if (dev->fd >= 0) close (dev->fd); + + /* Get a socket */ + if (dev->localhost) + { + dev->fd = dev->ckdfd[0] = socket (AF_UNIX, SOCK_STREAM, 0); + if (dev->fd < 0) + { + logmsg (_("HHCSH029E %4.4X socket failed: %s\n"), + dev->devnum, strerror(errno)); + return -1; + } + userver.sun_family = AF_UNIX; + sprintf(userver.sun_path, "/tmp/hercules_shared.%d", dev->rmtport); + server = (struct sockaddr *)&userver; + len = sizeof(userver); + } + else + { + dev->fd = dev->ckdfd[0] = socket (AF_INET, SOCK_STREAM, 0); + if (dev->fd < 0) + { + logmsg (_("HHCSH030E %4.4X socket failed: %s\n"), + dev->devnum, strerror(errno)); + return -1; + } + iserver.sin_family = AF_INET; + iserver.sin_port = htons(dev->rmtport); + memcpy(&iserver.sin_addr.s_addr,&dev->rmtaddr,sizeof(struct in_addr)); + server = (struct sockaddr *)&iserver; + len = sizeof(iserver); + } + + /* Connect to the server */ + store_hw (id, dev->rmtid); + rc = connect (dev->fd, server, len); + shrdtrc("connect rc=%d errno=%d\n",rc, errno); + if (rc >= 0) + { + if (!dev->batch) + logmsg(_("HHCSH031I %4.4X Connected to %s\n"), + dev->devnum, dev->filename); + + /* Request device connection */ + flag = (SHARED_VERSION << 4) | SHARED_RELEASE; + rc = clientRequest (dev, id, 2, SHRD_CONNECT, flag, NULL, &flag); + if (rc >= 0) + { + dev->rmtid = fetch_hw (id); + dev->rmtrel = flag & 0x0f; + } + + /* + * Negotiate compression - top 4 bits have the compression + * algorithms we support (00010000 -> libz; 00100000 ->bzip2, + * 00110000 -> both) and the bottom 4 bits indicates the + * libz parm we want to use when sending data back & forth. + * If the server returns `0' back, then we won't use libz to + * compress data to the server. What the `compression + * algorithms we support' means is that if the data source is + * cckd or cfba then the server doesn't have to uncompress + * the data for us if we support the compression algorithm. + */ + + if (rc >= 0 && (dev->rmtcomp || dev->rmtcomps)) + { + rc = clientRequest (dev, comp, 2, SHRD_COMPRESS, + (dev->rmtcomps << 4) | dev->rmtcomp, NULL, NULL); + if (rc >= 0) + dev->rmtcomp = fetch_hw (comp); + } + + } + else if (!retry) + logmsg(_("HHCSH032E %4.4X Connect %s %d: %s\n"), + dev->devnum, dev->filename, errno, strerror(errno)); + + if (rc < 0 && retry) usleep (20000); + + } while (retry && retries-- && rc < 0); + + return rc; + +} /* clientConnect */ + +/*------------------------------------------------------------------- + * Send request to host and get the response + * + * No data is sent on the request, buf gets the response. + * If an uncorrectable connection error occurs -1 is returned. + * Otherwise *code and *status is set from the response header + * + * Since `buf' may be NULL or not very long, response data is + * received in a temporary buffer. This enables us to receive + * an error message from the remote system. + *-------------------------------------------------------------------*/ +static int clientRequest (DEVBLK *dev, BYTE *buf, int len, int cmd, + int flags, int *code, int *status) +{ +int rc; /* Return code */ +int retries = 10; /* Number retries */ +BYTE rcode; /* Request return code */ +BYTE rstatus; /* Request return status */ +U16 rdevnum; /* Request return devnum */ +int rid; /* Request return id */ +int rlen; /* Request return length */ +BYTE hdr[SHRD_HDR_SIZE]; /* Header */ +BYTE temp[256]; /* Temporary buffer */ + +retry : + + /* Send the request */ + SHRD_SET_HDR(hdr, cmd, flags, dev->rmtnum, dev->rmtid, 0); + shrdtrc("client_request %2.2x %2.2x %2.2x %d\n", + cmd,flags,dev->rmtnum,dev->rmtid); + rc = clientSend (dev, hdr, NULL, 0); + if (rc < 0) return rc; + + /* Receive the response */ + rc = clientRecv (dev, hdr, temp, sizeof(temp)); + + /* Retry recv errors */ + if (rc < 0) + { + if (cmd != SHRD_CONNECT && retries--) + { + sleep (1); + clientConnect (dev, 1); + goto retry; + } + return -1; + } + + /* Set code and status */ + SHRD_GET_HDR(hdr, rcode, rstatus, rdevnum, rid, rlen); + shrdtrc("client_response %2.2x %2.2x %2.2x %d %d\n", + rcode,rstatus,rdevnum,rid,rlen); + if (code) *code = rcode; + if (status) *status = rstatus; + + /* Copy the data into the caller's buffer */ + if (buf && len > 0 && rlen > 0) + memcpy (buf, temp, len < rlen ? len : rlen); + + return rlen; +} /* clientRequest */ + +/*------------------------------------------------------------------- + * Send a request to the host + * + * `buf' may be NULL + * `buflen' is the length in `buf' (should be 0 if `buf' is NULL) + * `hdr' may contain additional data; this is detected by the + * difference between `buflen' and the length in the header + * + * If `buf' is adjacent to `hdr' then `buf' should be NULL + * + *-------------------------------------------------------------------*/ +static int clientSend (DEVBLK *dev, BYTE *hdr, BYTE *buf, int buflen) +{ +int rc; /* Return code */ +BYTE cmd; /* Header command */ +BYTE flag; /* Header flags */ +U16 devnum; /* Header device nu */ +int len; /* Header length */ +int id; /* Header identifier */ +int hdrlen; /* Header length + other data*/ +int off; /* Offset to buffer data */ +BYTE *sendbuf; /* Send buffer */ +int sendlen; /* Send length */ +BYTE cbuf[SHRD_HDR_SIZE + 65536]; /* Combined buffer */ + + /* Make buf, buflen consistent if no additional data to be sent */ + if (buf == NULL) buflen = 0; + else if (buflen == 0) buf = NULL; + + /* Calculate length of header, may contain additional data */ + SHRD_GET_HDR(hdr, cmd, flag, devnum, id, len); + shrdtrc("client_send %2.2x %2.2x %2.2x %d %d\n", + cmd,flag,devnum,id,len); + hdrlen = SHRD_HDR_SIZE + (len - buflen); + off = len - buflen; + + if (dev->fd < 0) + { + rc = clientConnect (dev, 1); + if (rc < 0) return -1; + } + +#ifdef HAVE_LIBZ + /* Compress the buf */ + if (dev->rmtcomp != 0 + && flag == 0 && off <= SHRD_COMP_MAX_OFF + && buflen >= SHARED_COMPRESS_MINLEN) + { + unsigned long newlen; + newlen = 65536 - hdrlen; + memcpy (cbuf, hdr, hdrlen); + rc = compress2 (cbuf + hdrlen, &newlen, + buf, buflen, dev->rmtcomp); + if (rc == Z_OK && (int)newlen < buflen) + { + cmd |= SHRD_COMP; + flag = (SHRD_LIBZ << 4) | off; + hdr = cbuf; + hdrlen += newlen; + buf = NULL; + buflen = 0; + } + } +#endif + + /* Combine header and data unless there's no buffer */ + if (buflen == 0) + { + sendbuf = hdr; + sendlen = hdrlen; + } + else + { + memcpy (cbuf, hdr, hdrlen); + memcpy (cbuf + hdrlen, buf, buflen); + sendbuf = cbuf; + sendlen = hdrlen + buflen; + } + + SHRD_SET_HDR(sendbuf, cmd, flag, devnum, id, sendlen - SHRD_HDR_SIZE); + + if (cmd & SHRD_COMP) + shrdtrc("client_send %2.2x %2.2x %2.2x %d %d (compressed)\n", + cmd, flag, devnum, id, sendlen - SHRD_HDR_SIZE); + +retry: + + /* Send the header and data */ + rc = send (dev->fd, sendbuf, sendlen, 0); + if (rc < 0) + { + rc = clientConnect (dev, 0); + if (rc >= 0) goto retry; + } + + /* Process return code */ + if (rc < 0) + { + logmsg(_("HHCSH033E %4.4X send error %d for %2.2X-%2.2X: %s\n"), + dev->devnum, errno, cmd, flag, strerror(errno)); + return -1; + } + + return rc; + +} /* clientSend */ + +/*------------------------------------------------------------------- + * Receive a response (client side) + *-------------------------------------------------------------------*/ +static int clientRecv (DEVBLK *dev, BYTE *hdr, BYTE *buf, int buflen) +{ +int rc; /* Return code */ +BYTE code; /* Response code */ +BYTE status; /* Response status */ +U16 devnum; /* Response device number */ +int id; /* Response identifier */ +int len; /* Response length */ + + /* Clear the header to zeroes */ + memset (hdr, 0, SHRD_HDR_SIZE); + + /* Return error if not connected */ + if (dev->fd < 0) + { + logmsg(_("HHCSH034E %4.4X Not connected to %s\n"), + dev->devnum, dev->filename); + return -1; + } + + /* Receive the header */ + rc = recvData (dev->fd, hdr, buf, buflen, 0); + if (rc < 0) + { + if (rc != -ENOTCONN) + logmsg(_("HHCSH035E %4.4X recv error %d: %s\n"), + dev->devnum, -rc, strerror(-rc)); + return rc; + } + SHRD_GET_HDR(hdr, code, status, devnum, id, len); + + shrdtrc("client_recv %2.2x %2.2x %2.2x %d %d\n", + code,status,devnum,id,len); + + /* Handle remote logical error */ + if (code & SHRD_ERROR) + { + logmsg(_("HHCSH036E %4.4X Remote error %2.2X-%2.2X: %s\n"), + dev->devnum, code, status, buf); + len = 0; + } + + /* Reset code/status if response was compressed */ + if (len > 0 && code == SHRD_COMP) + { + code = SHRD_OK; + status = 0; + } + + /* Reset the header */ + SHRD_SET_HDR(hdr, code, status, devnum, id, len); + + return len; +} /* clientRecv */ + +/*------------------------------------------------------------------- + * Receive data (server or client) + *-------------------------------------------------------------------*/ +static int recvData(int sock, BYTE *hdr, BYTE *buf, int buflen, int server) +{ +int rc; /* Return code */ +int rlen; /* Data length to recv */ +int recvlen; /* Total length */ +BYTE *recvbuf; /* Receive buffer */ +BYTE cmd; /* Header command */ +BYTE flag; /* Header flags */ +U16 devnum; /* Header device number */ +int id; /* Header identifier */ +int len; /* Header length */ +int comp = 0; /* Compression type */ +int off = 0; /* Offset to compressed data */ +DEVBLK *dev = NULL; /* For `shrdtrc' */ +BYTE cbuf[65536]; /* Compressed buffer */ + + + /* Receive the header */ + for (recvlen = 0; recvlen < (int)SHRD_HDR_SIZE; recvlen += rc) + { + rc = recv (sock, hdr + recvlen, SHRD_HDR_SIZE - recvlen, 0); + if (rc < 0) + return -errno; + else if (rc == 0) + return -ENOTCONN; + } + SHRD_GET_HDR (hdr, cmd, flag, devnum, id, len); + + shrdtrc("recvData %2.2x %2.2x %2.2x %d %d\n", + cmd, flag, devnum, id, len); + + /* Return if no data */ + if (len == 0) return 0; + + /* Check for compressed data */ + if ((server && (cmd & SHRD_COMP)) + || (!server && cmd == SHRD_COMP)) + { + comp = (flag & SHRD_COMP_MASK) >> 4; + off = flag & SHRD_COMP_OFF; + cmd &= ~SHRD_COMP; + flag = 0; + recvbuf = cbuf; + rlen = len; + } + else + { + recvbuf = buf; + rlen = buflen < len ? buflen : len; + } + + /* Receive the data */ + for (recvlen = 0; recvlen < rlen; recvlen += rc) + { + rc = recv (sock, recvbuf + recvlen, len - recvlen, 0); + if (rc < 0) + return -errno; + else if (rc == 0) + return -ENOTCONN; + } + + /* Flush any remaining data */ + for (; rlen < len; rlen += rc) + { + BYTE buf[256]; + rc = recv (sock, buf, len - rlen < 256 ? len - rlen : 256, 0); + if (rc < 0) + return -errno; + else if (rc == 0) + return -ENOTCONN; + } + + /* Check for compression */ + if (comp == SHRD_LIBZ) { +#ifdef HAVE_LIBZ + unsigned long newlen; + + if (off > 0) + memcpy (buf, cbuf, off); + newlen = buflen - off; + rc = uncompress(buf + off, &newlen, cbuf + off, len - off); + if (rc == Z_OK) + recvlen = (int)newlen + off; + else + { + logmsg(_("HHCSH037E uncompress error %d, off %d len %d\n"), + rc, off, len - off); + recvlen = -1; + } +#else + logmsg(_("HHCSH038E data compressed using libz, unsupported\n")); + recvlen = -1; +#endif + } + else if (comp == SHRD_BZIP2) + { +#ifdef CCKD_BZIP2 + unsigned int newlen; + + if (off > 0) + memcpy (buf, cbuf, off); + + newlen = buflen - off; + rc = BZ2_bzBuffToBuffDecompress(buf + off, &newlen, cbuf + off, len - off, 0, 0); + if (rc == BZ_OK) + recvlen = (int)newlen + off; + else + { + logmsg(_("HHCSH039E decompress error %d, off %d len %d\n"), + rc, off, len - off); + recvlen = -1; + } +#else + logmsg(_("HHCSH040E data compressed using bzip2, unsupported\n")); + recvlen = -1; +#endif + } + + if (recvlen > 0) + { + SHRD_SET_HDR (hdr, cmd, flag, devnum, id, recvlen); + if (comp) + shrdtrc("recvData %2.2x %2.2x %2.2x %d %d (uncompressed)\n", + cmd, flag, devnum, id, recvlen); + } + + return recvlen; + +} /* recvData */ + +/*------------------------------------------------------------------- + * Process a request (server side) + *-------------------------------------------------------------------*/ +static void serverRequest (DEVBLK *dev, int ix, BYTE *hdr, BYTE *buf) +{ +int rc; /* Return code */ +int i; /* Loop index */ +BYTE cmd; /* Header command */ +BYTE flag; /* Header flags */ +U16 devnum; /* Header device number */ +int id; /* Header identifier */ +int len; /* Header length */ +int code; /* Response code */ +int rcd; /* Record to read/write */ +int off; /* Offset into record */ + + /* Extract header information */ + SHRD_GET_HDR (hdr, cmd, flag, devnum, id, len); + + shrdtrc("server_request [%d] %2.2x %2.2x %2.2x %d %d\n", + ix, cmd, flag, devnum, id, len); + + dev->shrd[ix]->time = time (NULL); + + switch (cmd) { + + case SHRD_CONNECT: + if (dev->connecting) + { + serverError (dev, ix, SHRD_ERROR_NOTINIT, cmd, + "device not initialized"); + break; + } + if ((flag >> 4) != SHARED_VERSION) + { + serverError (dev, ix, SHRD_ERROR_BADVERS, cmd, + "shared version mismatch"); + break; + } + dev->shrd[ix]->release = flag & 0x0f; + SHRD_SET_HDR (hdr, 0, (SHARED_VERSION << 4) | SHARED_RELEASE, dev->devnum, id, 2); + store_hw (buf, id); + serverSend (dev, ix, hdr, buf, 2); + break; + + case SHRD_DISCONNECT: + SHRD_SET_HDR (hdr, 0, 0, dev->devnum, id, 0); + serverSend (dev, ix, hdr, NULL, 0); + dev->shrd[ix]->disconnect = 1; + + obtain_lock (&dev->lock); + + /* Make the device available if this system active on it */ + if (dev->ioactive == id) + { + if (!dev->suspended) + { + dev->busy = 0; + dev->ioactive = DEV_SYS_NONE; + } + else + dev->ioactive = DEV_SYS_LOCAL; + if (dev->iowaiters) + signal_condition (&dev->iocond); + } + + release_lock (&dev->lock); + break; + + case SHRD_START: + case SHRD_RESUME: + + obtain_lock (&dev->lock); + + /* If the device is suspended locally then grab it */ + if (dev->ioactive == DEV_SYS_LOCAL && dev->suspended && !dev->reserved) + dev->ioactive = id; + + /* Check if the device is busy */ + if (dev->ioactive != id && dev->ioactive != DEV_SYS_NONE) + { + shrdtrc("server_request busy id=%d ioactive=%d reserved=%d\n", + id,dev->ioactive,dev->reserved); + /* If the `nowait' bit is on then respond `busy' */ + if (flag & SHRD_NOWAIT) + { + release_lock (&dev->lock); + SHRD_SET_HDR (hdr, SHRD_BUSY, 0, dev->devnum, id, 0); + serverSend (dev, ix, hdr, NULL, 0); + break; + } + + dev->shrd[ix]->waiting = 1; + + /* Wait while the device is busy by the local system */ + while (dev->ioactive == DEV_SYS_LOCAL && !dev->suspended) + { + dev->iowaiters++; + wait_condition (&dev->iocond, &dev->lock); + dev->iowaiters--; + } + + /* Return with the `waiting' bit on if busy by a remote system */ + if (dev->ioactive != DEV_SYS_NONE && dev->ioactive != DEV_SYS_LOCAL) + { + release_lock (&dev->lock); + break; + } + + dev->shrd[ix]->waiting = 0; + } + + /* Make this system active on the device */ + dev->ioactive = id; + dev->busy = 1; + dev->syncio_active = dev->syncio_retry = 0; + sysblk.shrdcount++; + shrdtrc("server_request active id=%d\n", id); + + release_lock(&dev->lock); + + /* Call the i/o start or resume exit */ + if (cmd == SHRD_START && dev->hnd->start) + (dev->hnd->start) (dev); + else if (cmd == SHRD_RESUME && dev->hnd->resume) + (dev->hnd->resume) (dev); + + /* Get the purge list */ + if (dev->shrd[ix]->purgen == 0) + code = len = 0; + else + { + code = SHRD_PURGE; + if (dev->shrd[ix]->purgen < 0) + len = 0; + else + len = 4 * dev->shrd[ix]->purgen; + } + + /* Send the response */ + SHRD_SET_HDR (hdr, code, 0, dev->devnum, id, len); + rc = serverSend (dev, ix, hdr, (BYTE *)dev->shrd[ix]->purge, len); + if (rc >= 0) + dev->shrd[ix]->purgen = 0; + break; + + case SHRD_END: + case SHRD_SUSPEND: + /* Must be active on the device for this command */ + if (dev->ioactive != id) + { + serverError (dev, ix, SHRD_ERROR_NOTACTIVE, cmd, + "not active on this device"); + break; + } + + /* Call the I/O end/suspend exit */ + if (cmd == SHRD_END && dev->hnd->end) + (dev->hnd->end) (dev); + else if (cmd == SHRD_SUSPEND && dev->hnd->suspend) + (dev->hnd->suspend) (dev); + + obtain_lock (&dev->lock); + + /* Make the device available if it's not reserved */ + if (!dev->reserved) + { + /* If locally suspended then return the device to local */ + if (dev->suspended) + { + dev->ioactive = DEV_SYS_LOCAL; + dev->busy = 1; + } + else + { + dev->ioactive = DEV_SYS_NONE; + dev->busy = 0; + } + + /* Reset any `waiting' bits */ + for (i = 0; i < SHARED_MAX_SYS; i++) + if (dev->shrd[i]) + dev->shrd[i]->waiting = 0; + + /* Notify any waiters */ + if (dev->iowaiters) + signal_condition (&dev->iocond); + } + shrdtrc("server_request inactive id=%d\n", id); + + release_lock (&dev->lock); + + /* Send response back */ + SHRD_SET_HDR (hdr, 0, 0, dev->devnum, id, 0); + serverSend (dev, ix, hdr, NULL, 0); + break; + + case SHRD_RESERVE: + /* Must be active on the device for this command */ + if (dev->ioactive != id) + { + serverError (dev, ix, SHRD_ERROR_NOTACTIVE, cmd, + "not active on this device"); + break; + } + + obtain_lock (&dev->lock); + dev->reserved = 1; + release_lock (&dev->lock); + + shrdtrc("server_request reserved id=%d\n", id); + + /* Call the I/O reserve exit */ + if (dev->hnd->reserve) (dev->hnd->reserve) (dev); + + /* Send response back */ + SHRD_SET_HDR (hdr, 0, 0, dev->devnum, id, 0); + serverSend (dev, ix, hdr, NULL, 0); + + break; + + case SHRD_RELEASE: + /* Must be active on the device for this command */ + if (dev->ioactive != id) + { + serverError (dev, ix, SHRD_ERROR_NOTACTIVE, cmd, + "not active on this device"); + break; + } + + /* Call the I/O release exit */ + if (dev->hnd->release) (dev->hnd->release) (dev); + + obtain_lock (&dev->lock); + dev->reserved = 0; + release_lock (&dev->lock); + + shrdtrc("server_request released id=%d\n", id); + + /* Send response back */ + SHRD_SET_HDR (hdr, 0, 0, dev->devnum, id, 0); + serverSend (dev, ix, hdr, NULL, 0); + + break; + + case SHRD_READ: + /* Must be active on the device for this command */ + if (dev->ioactive != id) + { + serverError (dev, ix, SHRD_ERROR_NOTACTIVE, cmd, + "not active on this device"); + break; + } + + /* Set the compressions client is willing to accept */ + dev->comps = dev->shrd[ix]->comps; + dev->comp = dev->compoff = 0; + + /* Call the I/O read exit */ + rcd = (int)fetch_fw (buf); + rc = (dev->hnd->read) (dev, rcd, &flag); + shrdtrc("server_request read rcd %d flag %2.2x rc=%d\n", + rcd, flag, rc); + + if (rc < 0) + code = SHRD_IOERR; + else + { + code = dev->comp ? SHRD_COMP : 0; + flag = (dev->comp << 4) | dev->compoff; + } + + /* Reset compression stuff */ + dev->comps = dev->comp = dev->compoff = 0; + + SHRD_SET_HDR (hdr, code, flag, dev->devnum, id, dev->buflen); + serverSend (dev, ix, hdr, dev->buf, dev->buflen); + + break; + + case SHRD_WRITE: + /* Must be active on the device for this command */ + if (dev->ioactive != id) + { + serverError (dev, ix, SHRD_ERROR_NOTACTIVE, cmd, + "not active on this device"); + break; + } + + /* Call the I/O write exit */ + off = fetch_hw (buf); + rcd = fetch_fw (buf + 2); + + rc = (dev->hnd->write) (dev, rcd, off, buf + 6, len - 6, &flag); + shrdtrc("server_request write rcd %d off %d len %d flag %2.2x rc=%d\n", + rcd, off, len - 6, flag, rc); + + if (rc < 0) + code = SHRD_IOERR; + else + code = 0; + + /* Send response back */ + SHRD_SET_HDR (hdr, code, flag, dev->devnum, id, 0); + serverSend (dev, ix, hdr, NULL, 0); + + break; + + case SHRD_SENSE: + /* Must be active on the device for this command */ + if (dev->ioactive != id) + { + serverError (dev, ix, SHRD_ERROR_NOTACTIVE, cmd, + "not active on this device"); + break; + } + + /* Send the sense */ + SHRD_SET_HDR (hdr, 0, CSW_CE | CSW_DE, dev->devnum, id, dev->numsense); + serverSend (dev, ix, hdr, dev->sense, dev->numsense); + memset (dev->sense, 0, sizeof(dev->sense)); + break; + + case SHRD_QUERY: + switch (flag) { + + case SHRD_USED: + if (dev->hnd->used) + rc = (dev->hnd->used) (dev); + else + rc = 0; + store_fw (buf, rc); + SHRD_SET_HDR (hdr, 0, 0, dev->devnum, id, 4); + serverSend (dev, ix, hdr, buf, 4); + break; + + case SHRD_DEVCHAR: + SHRD_SET_HDR (hdr, 0, 0, dev->devnum, id, dev->numdevchar); + serverSend (dev, ix, hdr, dev->devchar, dev->numdevchar); + break; + + case SHRD_DEVID: + SHRD_SET_HDR (hdr, 0, 0, dev->devnum, id, dev->numdevid); + serverSend (dev, ix, hdr, dev->devid, dev->numdevid); + break; + + case SHRD_CKDCYLS: + store_fw (buf, dev->ckdcyls); + SHRD_SET_HDR (hdr, 0, 0, dev->devnum, id, 4); + serverSend (dev, ix, hdr, buf, 4); + break; + + case SHRD_FBAORIGIN: + store_fw (buf, dev->fbaorigin); + SHRD_SET_HDR (hdr, 0, 0, dev->devnum, id, 4); + serverSend (dev, ix, hdr, buf, 4); + break; + + case SHRD_FBANUMBLK: + store_fw (buf, dev->fbanumblk); + SHRD_SET_HDR (hdr, 0, 0, dev->devnum, id, 4); + serverSend (dev, ix, hdr, buf, 4); + break; + + case SHRD_FBABLKSIZ: + store_fw (buf, dev->fbablksiz); + SHRD_SET_HDR (hdr, 0, 0, dev->devnum, id, 4); + serverSend (dev, ix, hdr, buf, 4); + break; + + default: + serverError (dev, ix, SHRD_ERROR_INVALID, cmd, + "invalid query request"); + break; + } /* switch (flag) for SHRD_QUERY */ + break; + + case SHRD_COMPRESS: +#ifdef HAVE_LIBZ + dev->shrd[ix]->comp = (flag & 0x0f); + store_hw (buf, dev->shrd[ix]->comp); +#else + store_hw (buf, 0); +#endif + dev->shrd[ix]->comps = (flag & 0xf0) >> 4; + SHRD_SET_HDR (hdr, 0, 0, dev->devnum, id, 2); + serverSend (dev, ix, hdr, buf, 2); + break; + + default: + serverError (dev, ix, SHRD_ERROR_INVALID, cmd, + "invalid request"); + break; + } /* switch (cmd) */ +} /* serverRequest */ + +/*------------------------------------------------------------------- + * Locate the SHRD block for a socket (server side) + *-------------------------------------------------------------------*/ +static int serverLocate (DEVBLK *dev, int id, int *avail) +{ +int i; /* Loop index */ + + if (avail) *avail = -1; + for (i = 0; i < SHARED_MAX_SYS; i++) + { + if (dev->shrd[i]) + { + if (dev->shrd[i]->id == id) + return i; + } + else if (avail && *avail < 0) + *avail = i; + } + return -1; +} /* serverLocate */ + +/*------------------------------------------------------------------- + * Return a new Identifier (server side) + *-------------------------------------------------------------------*/ +static int serverId (DEVBLK *dev) +{ +int i; /* Loop index */ +int id; /* Identifier */ + + do { + dev->shrdid = (++dev->shrdid) & 0xffff; + if (dev->shrdid == DEV_SYS_LOCAL + || dev->shrdid == DEV_SYS_NONE) + dev->shrdid = 1; + id = dev->shrdid; + + for (i = 0; i < SHARED_MAX_SYS; i++) + if (dev->shrd[i] && dev->shrd[i]->id == id) + break; + + } while (i < SHARED_MAX_SYS); + + return id; +} /* serverId */ + +/*------------------------------------------------------------------- + * Respond with an error message (server side) + *-------------------------------------------------------------------*/ +static int serverError (DEVBLK *dev, int ix, int code, int status, + BYTE *msg) +{ +int rc; /* Return code */ +int len; /* Message length */ +BYTE hdr[SHRD_HDR_SIZE]; /* Header */ + + /* Get message length */ + len = strlen(msg) + 1; + if (len > SHARED_MAX_MSGLEN) + len = SHARED_MAX_MSGLEN; + + SHRD_SET_HDR (hdr, code, status, dev ? dev->devnum : 0, + ix < 0 ? 0 : dev->shrd[ix]->id, len); + + shrdtrc("server_error %2.2x %2.2x: %s\n", code, status, msg); + + rc = serverSend (dev, ix, hdr, msg, len); + return rc; + +} /* serverError */ + +/*------------------------------------------------------------------- + * Send data (server side) + *-------------------------------------------------------------------*/ +static int serverSend (DEVBLK *dev, int ix, BYTE *hdr, BYTE *buf, + int buflen) +{ +int rc; /* Return code */ +int sock; /* Socket number */ +BYTE code; /* Header code */ +BYTE status; /* Header status */ +U16 devnum; /* Header device number */ +int id; /* Header identifier */ +int len; /* Header length */ +int hdrlen; /* Header length + other data*/ +BYTE *sendbuf = NULL; /* Send buffer */ +int sendlen; /* Send length */ +BYTE cbuf[SHRD_HDR_SIZE + 65536]; /* Combined buffer */ + + /* Make buf, buflen consistent if no additional data to be sent */ + if (buf == NULL) buflen = 0; + else if (buflen == 0) buf = NULL; + + /* Calculate length of header, may contain additional data */ + SHRD_GET_HDR(hdr, code, status, devnum, id, len); + hdrlen = SHRD_HDR_SIZE + (len - buflen); + sendlen = hdrlen + buflen; + + /* Check if buf is adjacent to the header */ + if (buf && hdr + hdrlen == buf) + { + hdrlen += buflen; + buf = NULL; + buflen = 0; + } + + /* Send only the header buffer if `buf' is empty */ + if (buflen == 0) sendbuf = hdr; + + /* Get socket number; if `ix' < 0 we don't have a device yet */ + if (ix >= 0) + sock = dev->shrd[ix]->fd; + else + { + sock = -ix; + dev = NULL; + } + + shrdtrc("server_send %2.2x %2.2x %2.2x %d %d\n", + code, status, devnum, id, len); + +#ifdef HAVE_LIBZ + /* Compress the buf */ + if (ix >= 0 && dev->shrd[ix]->comp != 0 + && code == SHRD_OK && status == 0 + && hdrlen - SHRD_HDR_SIZE <= SHRD_COMP_MAX_OFF + && buflen >= SHARED_COMPRESS_MINLEN) + { + unsigned long newlen; + int off = hdrlen - SHRD_HDR_SIZE; + sendbuf = cbuf; + newlen = sizeof(cbuf) - hdrlen; + memcpy (cbuf, hdr, hdrlen); + rc = compress2 (cbuf + hdrlen, &newlen, + buf, buflen, dev->shrd[ix]->comp); + if (rc == Z_OK && (int)newlen < buflen) + { + /* Setup to use the compressed buffer */ + sendlen = hdrlen + newlen; + buflen = 0; + code = SHRD_COMP; + status = (SHRD_LIBZ << 4) | off; + SHRD_SET_HDR (cbuf, code, status, devnum, id, newlen + off); + shrdtrc("server_send %2.2x %2.2x %2.2x %d %d (compressed)\n", + code,status,devnum,id,(int)newlen+off); + } + } +#endif + + /* Build combined (hdr + data) buffer */ + if (buflen > 0) + { + sendbuf = cbuf; + memcpy (cbuf, hdr, hdrlen); + memcpy (cbuf + hdrlen, buf, buflen); + } + + /* Send the combined header and data */ + rc = send (sock, sendbuf, sendlen, 0); + + /* Process return code */ + if (rc < 0) + { + logmsg(_("HHCSH041E %4.4X send error %d id=%d: %s\n"), + dev->devnum, errno, id, strerror(errno)); + dev->shrd[ix]->disconnect = 1; + } + + return rc; + +} /* serverSend */ + +/*------------------------------------------------------------------- + * Determine if a client can be disconnected (server side) + *-------------------------------------------------------------------*/ +static int serverDisconnectable (DEVBLK *dev, int ix) { + + if (dev->shrd[ix]->waiting || dev->shrd[ix]->pending + || dev->ioactive == dev->shrd[ix]->id) + return 0; + else + return 1; +} /* serverDisconnectable */ + +/*------------------------------------------------------------------- + * Disconnect a client (server side) + * dev->lock *must* be held + *-------------------------------------------------------------------*/ +static void serverDisconnect (DEVBLK *dev, int ix) { +int id; /* Client identifier */ +int i; /* Loop index */ + + id = dev->shrd[ix]->id; + +//FIXME: Handle a disconnected busy client better +// Perhaps a disconnect timeout value... this will +// give the client time to reconnect. + + /* If the device is active by the client then extricate it. + This is *not* a good situation */ + if (dev->ioactive == id) + { + logmsg(_("HHCSH042W %4.4X busy client being removed id=%d %s\n"), + dev->devnum, id, dev->reserved ? "reserved" : ""); + + /* Call the I/O release exit if reserved by this client */ + if (dev->reserved && dev->hnd->release) + (dev->hnd->release) (dev); + + /* Call the channel program end exit */ + if (dev->hnd->end) + (dev->hnd->end) (dev); + + /* Reset any `waiting' bits */ + for (i = 0; i < SHARED_MAX_SYS; i++) + if (dev->shrd[i]) + dev->shrd[i]->waiting = 0; + + /* Make the device available */ + if (dev->suspended) { + dev->ioactive = DEV_SYS_LOCAL; + dev->busy = 1; + } + else + { + dev->ioactive = DEV_SYS_NONE; + dev->busy = 0; + } + + /* Notify any waiters */ + if (dev->iowaiters) + signal_condition (&dev->iocond); + } + + logmsg(_("HHCSH043I %s disconnected from %4.4X id=%d\n"), + clientip(dev->shrd[ix]->fd), dev->devnum, id); + + /* Release the SHRD block */ + close (dev->shrd[ix]->fd); + free (dev->shrd[ix]); + dev->shrd[ix] = NULL; + + dev->shrdconn--; +} /* serverDisconnect */ + +/*------------------------------------------------------------------- + * Return client ip + *-------------------------------------------------------------------*/ +static char *clientip (int sock) +{ +int rc; /* Return code */ +struct sockaddr_in client; /* Client address structure */ +socklen_t namelen; /* Length of client structure*/ + + namelen = sizeof(client); + rc = getpeername (sock, (struct sockaddr *)&client, &namelen); + return inet_ntoa(client.sin_addr); + +} /* clientip */ + +/*------------------------------------------------------------------- + * Find device by device number + *-------------------------------------------------------------------*/ +static DEVBLK *findDevice (U16 devnum) +{ +DEVBLK *dev; /* -> Device block */ + + for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev) + if (dev->devnum == devnum) break; + return dev; + +} /* findDevice */ + +/*------------------------------------------------------------------- + * Connect a new client + *-------------------------------------------------------------------*/ +static void *serverConnect (int *psock) +{ +int csock; /* Connection socket */ +int rc; /* Return code */ +BYTE cmd; /* Request command */ +BYTE flag; /* Request flag */ +U16 devnum; /* Request device number */ +int id; /* Request id */ +int len; /* Request data length */ +int ix; /* Client index */ +DEVBLK *dev=NULL; /* -> Device block */ +struct stat st; /* Status buffer */ +time_t now; /* Current time */ +fd_set selset; /* Read bit map for select */ +int maxfd; /* Max fd for select */ +struct timeval wait; /* Wait time for select */ +BYTE hdr[SHRD_HDR_SIZE + 65536]; /* Header + buffer */ +BYTE *buf = hdr + SHRD_HDR_SIZE; /* Buffer */ + + csock = *psock; + free (psock); + + shrdtrc("server_connect %s sock %d\n",clientip(csock),csock); + + rc = recvData(csock, hdr, buf, 65536, 1); + if (rc < 0) + { + logmsg(_("HHCSH0474 %s connect failed\n"), clientip (csock)); + close (csock); + return NULL; + } + SHRD_GET_HDR (hdr, cmd, flag, devnum, id, len); + + /* Error if not a connect request */ + if (id == 0 && cmd != SHRD_CONNECT) + { + serverError (NULL, -csock, SHRD_ERROR_NOTCONN, cmd, + "not a connect request"); + close (csock); + return NULL; + } + + /* Locate the device */ + dev = findDevice (devnum); + + /* Error if device not found */ + if (dev == NULL) + { + serverError (NULL, -csock, SHRD_ERROR_NODEVICE, cmd, + "device not found"); + close (csock); + return NULL; + } + + /* Obtain the device lock */ + obtain_lock (&dev->lock); + + /* Find an available slot for the connection */ + rc = serverLocate (dev, id, &ix); + + /* Error if already connected */ + if (rc >= 0) + { + release_lock (&dev->lock); + serverError (NULL, -csock, SHRD_ERROR_NODEVICE, cmd, + "already connected"); + close (csock); + return NULL; + } + + /* Error if no available slot */ + if (ix < 0) + { + release_lock (&dev->lock); + serverError (NULL, -csock, SHRD_ERROR_NOTAVAIL, cmd, + "too many connections"); + close (csock); + return NULL; + } + + /* Obtain SHRD block */ + dev->shrd[ix] = calloc (sizeof(SHRD), 1); + + /* Error if not obtained */ + if (dev->shrd[ix] == NULL) + { + release_lock (&dev->lock); + serverError (NULL, -csock, SHRD_ERROR_NOMEM, cmd, + "calloc() failure"); + close (csock); + return NULL; + } + + /* Initialize the SHRD block */ + dev->shrd[ix]->pending = 1; + dev->shrd[ix]->havehdr = 1; + if (id == 0) id = serverId (dev); + dev->shrd[ix]->id = id; + dev->shrd[ix]->fd = csock; + dev->shrd[ix]->time = time (NULL); + dev->shrd[ix]->purgen = -1; + dev->shrdconn++; + SHRD_SET_HDR (dev->shrd[ix]->hdr, cmd, flag, devnum, id, len); + + logmsg (_("HHCSH053I %s connected to %4.4X id=%d\n"), + clientip(csock), devnum, id); + + /* Return if device thread already active */ + if (dev->shrdtid) + { + if (dev->shrdwait) + { + signal_thread (dev->shrdtid, SIGUSR2); + } + release_lock (&dev->lock); + return NULL; + } + dev->shrdtid = thread_id(); + + /* This thread will be the shared device thread */ + logmsg (_("HHCSH045I Shared device %4.4X thread started: " + "tid="TIDPAT", pid=%d\n"), + dev->devnum, thread_id(), getpid()); + + while (dev->shrdconn) + { + FD_ZERO (&selset); + maxfd = -1; + + /* Get the current time */ + now = time (NULL); + + for (ix = 0; ix < SHARED_MAX_SYS; ix++) + { + if (dev->shrd[ix]) + { + /* Exit loop if pending and not waiting */ + if (dev->shrd[ix]->pending && !dev->shrd[ix]->waiting) + break; + + /* Disconnect if not a vailid socket */ + rc = fstat (dev->shrd[ix]->fd, &st); + if (rc != 0 || !S_ISSOCK(st.st_mode)) + dev->shrd[ix]->disconnect = 1; + + /* See if the connection can be timed out */ + else if (now - dev->shrd[ix]->time > SHARED_TIMEOUT + && serverDisconnectable (dev, ix)) + dev->shrd[ix]->disconnect = 1; + + /* Disconnect if the disconnect bit is set */ + if (dev->shrd[ix]->disconnect) + serverDisconnect (dev, ix); + + /* Otherwise set the fd if not waiting */ + else if (!dev->shrd[ix]->waiting) + { + FD_SET (dev->shrd[ix]->fd, &selset); + if (dev->shrd[ix]->fd >= maxfd) + maxfd = dev->shrd[ix]->fd + 1; + shrdtrc("select set %d id=%d\n",dev->shrd[ix]->fd,dev->shrd[ix]->id); + } + } + + } + + /* Wait for a request if no pending requests */ + if (ix >= SHARED_MAX_SYS) + { + /* Exit thread if nothing to select */ + if (maxfd < 0) continue; + + /* Wait for a file descriptor to become busy */ + wait.tv_sec = 10; /*SHARED_SELECT_WAIT;*/ + wait.tv_usec = 0; + release_lock (&dev->lock); + + dev->shrdwait = 1; + rc = select ( maxfd, &selset, NULL, NULL, &wait ); + dev->shrdwait = 0; + + obtain_lock (&dev->lock); + + shrdtrc("select rc %d\n",rc); + + if (rc == 0) continue; + + if (rc < 0 ) + { + if (errno == EINTR || errno == EBADF) continue; + logmsg(_("HHCSH046E select: %s\n"), strerror(errno)); + break; + } + + /* Find any pending requests */ + for (ix = 0; ix < SHARED_MAX_SYS; ix++) + { + if (dev->shrd[ix] + && FD_ISSET(dev->shrd[ix]->fd, &selset)) + { + dev->shrd[ix]->pending = 1; + shrdtrc("select isset %d id=%d\n",dev->shrd[ix]->fd,dev->shrd[ix]->id); + } + } + continue; + } + + /* Found a pending request */ + release_lock (&dev->lock); + + shrdtrc("select ready %d id=%d\n",dev->shrd[ix]->fd,dev->shrd[ix]->id); + + if (dev->shrd[ix]->havehdr) + { + /* Copy the saved start/resume packet */ + memcpy (hdr, dev->shrd[ix]->hdr, SHRD_HDR_SIZE); + dev->shrd[ix]->havehdr = dev->shrd[ix]->waiting = 0; + } + else + { + /* Read the request packet */ + rc = recvData (dev->shrd[ix]->fd, hdr, buf, 65536, 1); + if (rc < 0) + { + logmsg(_("HHCSH047E %4.4X %s recv error id=%d\n"), + dev->devnum, clientip(dev->shrd[ix]->fd), dev->shrd[ix]->id); + dev->shrd[ix]->disconnect = 1; + dev->shrd[ix]->pending = 0; + obtain_lock (&dev->lock); + continue; + } + } + + /* Process the request */ + serverRequest (dev, ix, hdr, buf); + + obtain_lock (&dev->lock); + + /* If the `waiting' bit is on then the start/resume request + failed because the device is busy on some other remote + system. We only need to save the header because the data + is ignored for start/resume. + */ + if (dev->shrd[ix]->waiting) + { + memcpy (dev->shrd[ix]->hdr, hdr, SHRD_HDR_SIZE); + dev->shrd[ix]->havehdr = 1; + } + else + dev->shrd[ix]->pending = 0; + } + + dev->shrdtid = 0; + release_lock (&dev->lock); + + logmsg (_("HHCSH048I Shared device %4.4X thread stopping\n"), + dev->devnum); + + return NULL; + +} /* serverConnect */ + +/*------------------------------------------------------------------- + * Shared device server + *-------------------------------------------------------------------*/ +void *shared_server (void *arg) +{ +int rc; /* Return code */ +int hi; /* Hi fd for select */ +int lsock; /* inet socket for listening */ +int usock; /* unix socket for listening */ +int rsock; /* Ready socket */ +int csock; /* Socket for conversation */ +int *psock; /* Pointer to socket */ +struct sockaddr_in server; /* Server address structure */ +struct sockaddr_un userver; /* Unix address structure */ +int optval; /* Argument for setsockopt */ +fd_set selset; /* Read bit map for select */ +TID tid; /* Negotiation thread id */ + + UNREFERENCED(arg); + + /* Display thread started message on control panel */ + logmsg (_("HHCSH049I Shared device %d" "." "%d thread started: " + "tid="TIDPAT", pid=%d\n"), + SHARED_VERSION, SHARED_RELEASE, thread_id(), getpid()); + + /* Obtain a internet socket */ + lsock = socket (AF_INET, SOCK_STREAM, 0); + + if (lsock < 0) + { + logmsg(_("HHCSH050E inet socket: %s\n"), strerror(errno)); + return NULL; + } + + /* Obtain a unix socket */ + usock = socket (AF_UNIX, SOCK_STREAM, 0); + + if (usock < 0) + { + logmsg(_("HHCSH051E unix socket: %s\n"), strerror(errno)); + close(lsock); + return NULL; + } + + /* Allow previous instance of socket to be reused */ + optval = 1; + setsockopt (lsock, SOL_SOCKET, SO_REUSEADDR, + &optval, sizeof(optval)); + + /* Prepare the sockaddr structure for the bind */ + memset (&server, 0, sizeof(server)); + server.sin_family = AF_INET; + server.sin_addr.s_addr = INADDR_ANY; + server.sin_port = sysblk.shrdport; + server.sin_port = htons(server.sin_port); + + /* Attempt to bind the internet socket to the port */ + while (1) + { + rc = bind (lsock, (struct sockaddr *)&server, sizeof(server)); + if (rc == 0 || errno != EADDRINUSE) break; + logmsg (_("HHCSH052W Waiting for port %u to become free\n"), + sysblk.shrdport); + sleep(10); + } /* end while */ + + if (rc != 0) + { + logmsg(_("HHCSH053E inet bind: %s\n"), strerror(errno)); + close(lsock); close(usock); + return NULL; + } + + /* Bind the unix socket */ + userver.sun_family = AF_UNIX; + sprintf(userver.sun_path, "/tmp/hercules_shared.%d", sysblk.shrdport); + unlink(userver.sun_path); + fchmod (usock, 0700); + + rc = bind (usock, (struct sockaddr *)&userver, sizeof(userver)); + + if (rc < 0) + { + logmsg(_("HHCSH054E unix bind: %s\n"), strerror(errno)); + close(lsock); close(usock); + return NULL; + } + + /* Put the sockets into listening state */ + rc = listen (lsock, SHARED_MAX_SYS); + + if (rc < 0) + { + logmsg(_("HHCSH055E inet listen: %s\n"), strerror(errno)); + close(lsock); close(usock); + return NULL; + } + + rc = listen (usock, SHARED_MAX_SYS); + + if (rc < 0) + { + logmsg(_("HHCSH056E unix listen: %s\n"), strerror(errno)); + close(lsock); close(usock); + return NULL; + } + + sysblk.shrdtid = thread_id(); + csock = -1; + if (lsock < usock) + hi = usock + 1; + else + hi = lsock + 1; + + logmsg(_("HHCSH057I Waiting for shared device requests on port %u\n"), + sysblk.shrdport); + + /* Handle connection requests and attention interrupts */ + while (!sysblk.shutdown) + { + /* Initialize the select parameters */ + FD_ZERO (&selset); + FD_SET (lsock, &selset); + FD_SET (usock, &selset); + + /* Wait for a file descriptor to become ready */ + rc = select ( hi, &selset, NULL, NULL, NULL ); + + if (rc == 0) continue; + + if (rc < 0 ) + { + if (errno == EINTR) continue; + logmsg(_("HHCSH058E select: %s\n"), strerror(errno)); + break; + } + + /* If a client connection request has arrived then accept it */ + if (FD_ISSET(lsock, &selset)) + rsock = lsock; + else if (FD_ISSET(usock, &selset)) + rsock = usock; + else + rsock = -1; + + if (rsock > 0) + { + /* Accept a connection and create conversation socket */ + csock = accept (rsock, NULL, NULL); + if (csock < 0) + { + logmsg(_("HHCSH059E accept: %s\n"), strerror(errno)); + continue; + } + + psock = malloc (sizeof (csock)); + if (psock == NULL) + { + logmsg(_("HHCSH060E malloc size %d: %s\n"), + sizeof(csock), strerror(errno)); + close (csock); + continue; + } + *psock = csock; + + /* Create a thread to complete the client connection */ + if ( create_thread (&tid, &sysblk.detattr, + serverConnect, psock) ) + { + logmsg(_("HHCSH061E serverConnect create_thread: %s\n"), + strerror(errno)); + close (csock); + } + + } /* end if(rsock) */ + + + } /* end while */ + + /* Close the listening sockets */ + close (lsock); close (usock); + unlink(userver.sun_path); + + sysblk.shrdtid = 0; + + return NULL; + +} /* end function shared_server */ + +/*------------------------------------------------------------------- + * Shared device command processor + *-------------------------------------------------------------------*/ +int shared_cmd(int argc, char *argv[], char *cmdline) +{ + char buf[256]; + char *kw, *op, c; + + UNREFERENCED(cmdline); + + /* Get keyword and operand */ + if (argc != 2 || strlen(argv[1]) > 255) + { + logmsg (_("HHCSH062E Invalid or missing argument 1\n")); + return 0; + } + strcpy (buf, argv[1]); + kw = strtok (buf, "="); + op = strtok (NULL, " \t"); + + if (kw == NULL) + { + logmsg (_("HHCSH063E Invalid or missing keyword 2\n")); + return 0; + } + + if (strcasecmp(kw, "trace") == 0) + { + int n; + SHRD_TRACE *s, *p, *x, *i; + s = sysblk.shrdtrace; + p = sysblk.shrdtracep; + x = sysblk.shrdtracex; + n = sysblk.shrdtracen; + + /* Get a new trace table if an operand was specified */ + if (op) + { + if (sscanf (op, "%d%c", &n, &c) != 1) + { + logmsg (_("HHCSH064E Invalid or missing value %s\n"),op); + return 0; + } + if (s != NULL) + { + sysblk.shrdtrace = sysblk.shrdtracex = sysblk.shrdtracep = NULL; + sleep (1); + free (s); + } + sysblk.shrdtrace = sysblk.shrdtracex = sysblk.shrdtracep = NULL; + sysblk.shrdtracen = 0; + if (n > 0) + { + s = calloc (sizeof(SHRD_TRACE), n); + if (s == NULL) + { + logmsg (_("HHCSH065E calloc() size=%d: %s\n"), + sizeof(SHRD_TRACE) * n, strerror(errno)); + return 0; + } + sysblk.shrdtracen = n; + sysblk.shrdtrace = sysblk.shrdtracep = s; + sysblk.shrdtracex = s + n; + } + return 0; + } + /* Print the trace table */ + sysblk.shrdtrace = sysblk.shrdtracex = sysblk.shrdtracep = NULL; + i = p; + sleep(1); + do { + if (i[0] != '\0') logmsg ("%s",(char *)i); + if (++i >= x) i = s; + } while (i != p); + memset (s, 0, n * sizeof(SHRD_TRACE)); + sysblk.shrdtrace = s; + sysblk.shrdtracep = s; + sysblk.shrdtracex = x; + sysblk.shrdtracen = n; + } + else + { + logmsg (_("HHCSH066E Invalid or missing keyword %s\n"), kw); + return 0; + } + return 0; +} + +DEVHND shared_ckd_device_hndinfo = { + &shared_ckd_init, + &ckddasd_execute_ccw, + &shared_ckd_close, + &ckddasd_query_device, + &shared_start, + &shared_end, + &shared_start, + &shared_end, + &shared_ckd_read, + &shared_ckd_write, + &shared_used, + &shared_reserve, + &shared_release +}; + + +DEVHND shared_fba_device_hndinfo = { + &shared_fba_init, + &fbadasd_execute_ccw, + &shared_fba_close, + &fbadasd_query_device, + &shared_start, + &shared_end, + &shared_start, + &shared_end, + &shared_fba_read, + &shared_fba_write, + &shared_used, + &shared_reserve, + &shared_release +}; + +#else + +int shared_update_notify (DEVBLK *dev, int block) +{ + UNREFERENCED(dev); + UNREFERENCED(block); + return 0; +} +int shared_ckd_init (DEVBLK *dev, int argc, BYTE *argv[] ) +{ + UNREFERENCED(dev); + UNREFERENCED(argc); + UNREFERENCED(argv); + return -1; +} +int shared_fba_init (DEVBLK *dev, int argc, BYTE *argv[] ) +{ + UNREFERENCED(dev); + UNREFERENCED(argc); + UNREFERENCED(argv); + return -1; +} +void *shared_server (void *arg) +{ + UNREFERENCED(arg); + logmsg (_("HHCSH999E OPTION_SHARED_DEVICES not defined")); + return NULL; +} +int shared_cmd(int argc, char *argv[], char *cmdline); + UNREFERENCED(cmdline); + UNREFERENCED(argc); + UNREFERENCED(argv); + logmsg (_("HHCSH999E OPTION_SHARED_DEVICES not defined")); + return 0; +} +#endif /*defined(OPTION_SHARED_DEVICES)*/ diff --git a/shared.h b/shared.h new file mode 100644 index 0000000..3e0e1c4 --- /dev/null +++ b/shared.h @@ -0,0 +1,501 @@ +/*------------------------------------------------------------------- + * Shared device support (c)Copyright Greg Smith, 2002-2003 + * + * Shared device support allows multiple Hercules instances to share + * devices. The device will be `local' to one instance and `remote' + * to all other instances. The local instance is the * `server' for + * that device and the remote instance is the `client'. You do not + * have to IPL an operating system on the device server. Any number + * of Hercules instances can act as a server in a Hercplex ;-) + * + * To use a device on a remote system, instead of specifying a file + * name on the device config statement, you specify + * + * ip_address_or_name:port:devnum + * + * For example: + * + * 0100 3350 localhost:3990:0100 + * + * which says there is a device server on the local host listening + * on port 3990 and we want to use its 0100 device as 0100. The + * default port is 3990 and the default remote device number is the + * local device number. So we could say + * + * 0100 3350 localhost + * + * instead, providing we don't actually have a file `localhost'. + * Interestingly, the instance on the local host listening on 3990 + * could have a statement + * + * 0100 3350 192.168.200.1::0200 + * + * which means that instance in turn will use device 0200 on the + * server at 192.168.200.1 listening on port 3990. The original + * instance will have to `hop' thru the second instance to get + * to the real device. + * + * Device sharing can be `split' between multiple instances. + * For example, suppose instance A has + * + * SHRDPORT 3990 + * 0100 3350 localhost:3991 + * 0101 3350 mvscat + * + * and instance B has + * + * SHRDPORT 3991 + * 0100 3350 mvsres + * 0101 3350 localhost + * + * Then each instance acts as both a client and as a server. + * + * When `SHRDPORT' is specified, thread `shared_server' is started + * at the end of Hercules initialization. In the example above, + * neither Hercules instance can initialize their devices until the + * server is started on each system. In this case, the device trying + * to access a server gets the `connecting' bit set on in the DEVBLK + * and the device still needs to initialize. After the shared server + * is started, a thread is attached for each device that is connecting + * to complete the connection (which is the device init handler). + * + * TECHNICAL BS: + * + * There are (at least) two approaches to sharing devices. One is to + * execute the channel program on the server system. The server will + * need to request from the client system information such as the ccw + * and the data to be written, and will need to send to the client + * data that has been read and status information. The second is to + * execute the channel program on the client system. Here the client + * system makes requests to the server system to read and write data. + * + * The second approach is currently implemented. The first approach + * arguably emulates `more correctly'. However, an advantage of the + * implemented approach is that it is easier because only the + * client sends requests and only the server sends responses. + * + * Both client and server have a DEVBLK structure for the device. + * Absurdly, perhaps, in originally designing an implementation for + * shared devices it was not clear what type of process should be the + * server. It was a quantum leap forward to realize that it could + * just be another hercules instance. + * + * PROTOCOL: + * (If this section is as boring for you to read as it was for me + * to write then please skip to the next section ;-) + * + * The client sends an 8 byte request header and maybe some data: + * + * +-----+-----+-----+-----+-----+-----+-----+-----+ + * | cmd |flag | devnum | id | length | + * +-----+-----+-----+-----+-----+-----+-----+-----+ + * + * <-------- length ---------> + * +----- . . . . . -----+ + * | data | + * +----- . . . . . -----+ + * + * `cmd' identifies the client request. The requests are: + * + * 0xe0 CONNECT Connect to the server. This requires + * the server to allocate resources to + * support the connection. Typically issued + * during device initialization or after being + * disconnected after a network error or timeout. + * 0xe1 DISCONNECT Disconnect from the server. The server + * can now release the allocated resources + * for the connection. Typically issued during + * device close or detach. + * 0xe2 START Start a channel program on the device. + * If the device is busy or reserved by + * another system then wait until the device + * is available unless the NOWAIT flag bit + * is set, then return a BUSY code. Once + * START succeeds then the device is unavailable + * until the END request. + * 0xe3 END Channel program has ended. Any waiters + * for the device can now retry. + * 0xe4 RESUME Similar to START except a suspended + * channel program has resumed. + * 0xe5 SUSPEND Similar to END except a channel program + * has suspended itself. If the channel + * program is not resumed then the END + * request is *not* issued. + * 0xe6 RESERVE Makes the device unavailable to any other + * system until a RELEASE request is issued. + * *Must* be issued within the scope of START/END. + * 0xe7 RELEASE Makes the device available to other systems + * after the next END request. + * *Must* be issued within the scope of + * START/END. + * 0xe8 READ Read from a device. A 4-byte `record' + * identifier is specified in the request + * data to identify what data to read in the + * device context. + * *Must* be issued within the scope of START/END. + * 0xe9 WRITE Write to a device. A 2-byte `offset' and + * a 4-byte `record' is specified in the request + * data, followed by the data to be written. + * `record' identifies what data is to be written + * in the device context and `offset' and `length' + * identify what to update in `record'. + * *Must* be issued within the scope of START/END. + * 0xea SENSE Retrieves the sense information after an i/o + * error has occurred on the server side. This + * is typically issued within the scope of the + * channel program having the error. Client side + * sense or concurrent sense will then pick up the + * sense data relevant to the i/o error. + * *Must* be issued within the scope of START/END. + * 0xeb QUERY Obtain device information, typically during + * device initialization. + * 0xec COMPRESS Negotiate compression parameters. Notifies the + * server what compression algorithms are supported + * by the client and whether or not data sent back + * and forth from the client or server should be + * compressed or not. Typically issued after CONNECT. + * *NOTE* This action should actually be SETOPT or + * some such; it was just easier to code a COMPRESS + * specific SETOPT (less code). + * + * `flag' qualifies the client request and varies by the request. + * + * 0x80 NOWAIT For START, if the device is unavailable then + * return BUSY instead of waiting for the device. + * 0x40 QUERY Identifies the QUERY request: + * 0x41 DEVCHAR Device characteristics data + * 0x42 DEVID Device identifier data + * 0x43 DEVUSED Hi used track/block (for dasdcopy) + * 0x48 CKDCYLS Number cylinders for CKD device + * 0x4c FBAORIGIN Origin block for FBA + * 0x4d FBANUMBLK Number of FBA blocks + * 0x4e FBABLKSIZ Size of an FBA block + * 0x3x COMP For WRITE, data is compressed at offset `x': + * 0x2x BZIP2 using bzip2 + * 0x1x LIBZ using zlib + * 0xxy For COMPRESS, identifies the compression + * algorithms supported by the client (0x2y for bzip2, + * 0x1y for zlib, 0x3y for both) and the zlib compression + * parameter `y' for sending otherwise uncompressed data + * back and forth. If `y' is zero (default) then no + * uncompressed data is compressed between client & server. + * + * `devnum' identifies the device by number on the server instance. + * The device number may be different than the + * device number on the client instance. + * `id' identifies the client to the server. Each client has a unique + * positive (non-zero) identifier. For the initial + * CONNECT request `id' is zero. After a successful + * CONNECT, the server returns in the response header + * the identifier to be used for all other requests + * (including subsequent CONNECT requests). This is + * saved in dev->rmtid. + * `length' specifies the length of the data following the request header. + * Currently length is non-zero for READ/WRITE requests. + * + * The server sends an 8 byte response header and maybe some data: + * + * +-----+-----+-----+-----+-----+-----+-----+-----+ + * |code |stat | devnum | id | length | + * +-----+-----+-----+-----+-----+-----+-----+-----+ + * + * <-------- length ---------> + * +----- . . . . . -----+ + * | data | + * +----- . . . . . -----+ + * + * `code' indicates the response to the request. OK (0x00) indicates + * success however other codes also indicate success + * but qualified in some manner: + * 0x80 ERROR An error occurred. The server provides an error + * message in the data section. + * 0x40 IOERR An i/o error occurred during a READ/WRITE + * request. The status byte has the `unitstat' + * data. This should signal the client to issue the + * SENSE request to obtain the current sense data. + * 0x20 BUSY Device was not available for a START request and + * the NOWAIT flag bit was turned on. + * 0x10 COMP Data returned is compressed. The status byte + * indicates how the data is compressed (zlib or + * bzip2) and at what offset the compressed data + * starts (0 .. 15). This bit is only turned on + * when both the `code' and `status' bytes would + * otherwise be zero. + * 0x08 PURGE START request was issued by the client. A list + * of `records' to be purged from local cache is + * returned. These are `records' that have been + * updated since the last START/END request from + * the client by other systems. Each record identifier + * is a 4-byte field in the data segment. The number + * of records then is `length'/4. If the number of + * records exceeds a threshold (16) then `length' + * will be zero indicating that the client should + * purge all locally cached records for the device. + * + * `stat' contains status information as a result of the request. + * For READ/WRITE requests this contains the `unitstat' + * information if an IOERR occurred. + * + * `devnum' specifies the server device number + * + * `id' specifies the system identifier for the request. + * + * `length' is the size of the data returned. + * + * + * CACHING + * + * Cached records (eg CKD tracks or FBA blocks) are kept independently on + * both the client and server sides. Whenever the client issues a START + * request to initiate a channel program the server will return a list + * of records to purge from the client's cache that have been updated by + * other clients since the last START request. If the list is too large + * the server will indicate that the client should purge all records for + * the device. + * + * COMPRESSION + * + * Data that would normally be transferred uncompressed between client + * and host can optionally be compressed by specifying the `comp=' + * keyword on the device configuration statement or attach command. + * For example + * + * 0100 3350 192.168.2.12 comp=3 + * + * The value of the `comp=' keyword is the zlib compression parameter + * which should be a number between 1 .. 9. A value closer to 1 means + * less compression but less processor time to perform the compression. + * A value closer to 9 means the data is compressed more but more processor + * time is required. + * + * If the server is on `localhost' then you should not specify `comp='. + * Otherwise you are just stealing processor time to do compression/ + * uncompression from hercules. If the server is on a local network + * then I would recommend specifying a low value such as 1, 2 or 3. + * We are on a curve here, trying to trade cpu cycles for network traffic + * to derive an optimal throughput. + * + * If the devices on the server are compressed devices (eg CCKD or CFBA) + * then the `records' (eg. track images or block groups) may be transferred + * compressed regardless of the `comp=' setting. This depends on whether + * the client supports the compression type (zlib or bzip2) of the record + * on the server and whether the record is actually compressed in the + * server cache. + * + * For example: + * + * Suppose on the client that you execute one or more channel programs + * to read a record on a ckd track, update a record on the same track, + * and then read another (or the same) record on the track. + * + * For the first read the server will read the track image and + * pass it to the client as it was originally compressed in the file. + * To update a portion of the track image the server must uncompress + * the track image so data in it can be updated. When the client next + * reads from the track image, the track image is uncompressed. + * + * Specifying `comp=' means that uncompressed data sent to the client + * will be compressed. If the data to be sent to the client is already + * compressed then the data is sent as is, unless the client has indicated + * that it does not support that compression algorithm. + * + * + * TODO + * + * 1. More doc (sorry, I got winded) + * 2. Delays observed during short transfers (redrive select ?) + * 3. Better server side behaviour due to disconnect + * 3. etc. + * + * + * + * + * + *-------------------------------------------------------------------*/ + +#ifndef _HERCULES_SHARED_H +#define _HERCULES_SHARED_H 1 + +#define OPTION_SHARED_DEVICES + + /* + * Differing version levels are not compatible + * Differing release levels are compatible + */ + +#define SHARED_VERSION 0 /* Version level (0 .. 15) */ +#define SHARED_RELEASE 1 /* Release level (0 .. 15) */ + +#define SHARED_MAX_SYS 8 /* Max number connections */ +typedef char SHRD_TRACE[128]; /* Trace entry */ + +#include "hercules.h" + +/* Requests */ +#define SHRD_CONNECT 0xe0 /* Connect */ +#define SHRD_DISCONNECT 0xe1 /* Disconnect */ +#define SHRD_START 0xe2 /* Start channel program */ +#define SHRD_END 0xe3 /* End channel program */ +#define SHRD_RESUME 0xe4 /* Resume channel program */ +#define SHRD_SUSPEND 0xe5 /* Suspend channel program */ +#define SHRD_RESERVE 0xe6 /* Reserve */ +#define SHRD_RELEASE 0xe7 /* Release */ +#define SHRD_READ 0xe8 /* Read data */ +#define SHRD_WRITE 0xe9 /* Write data */ +#define SHRD_SENSE 0xea /* Sense */ +#define SHRD_QUERY 0xeb /* Query */ +#define SHRD_COMPRESS 0xec /* Compress request */ + +/* Response codes */ +#define SHRD_OK 0x00 /* Success */ +#define SHRD_ERROR 0x80 /* Failure */ +#define SHRD_IOERR 0x40 /* I/O error */ +#define SHRD_BUSY 0x20 /* Resource is busy */ +#define SHRD_COMP 0x10 /* Data is compressed */ +#define SHRD_PURGE 0x08 /* Purge list provided */ + +#define SHRD_ERROR_INVALID 0xf0 /* Invalid request */ +#define SHRD_ERROR_BADVERS 0xf1 /* Version mismatch */ +#define SHRD_ERROR_NOTINIT 0xf2 /* Device not initialized */ +#define SHRD_ERROR_NOTCONN 0xf3 /* Not connected to device */ +#define SHRD_ERROR_NOTAVAIL 0xf4 /* No available SHRD */ +#define SHRD_ERROR_NOMEM 0xf5 /* Out of memory */ +#define SHRD_ERROR_NOTACTIVE 0xf6 /* Not device owner */ +#define SHRD_ERROR_NODEVICE 0xf7 /* No such device */ +#define SHRD_ERROR_CONNECTED 0xf8 /* Already connected */ + +/* Flags */ +#define SHRD_NOWAIT 0x80 /* Don't wait if busy */ +#define SHRD_QUERY_REQUEST 0x40 /* Query request */ +#define SHRD_COMP_MASK 0x30 /* Mask to detect compression*/ +#define SHRD_COMP_OFF 0x0f /* Offset to compressed data */ +#define SHRD_COMP_MAX_OFF 15 /* Max offset allowed */ +#define SHRD_LIBZ 0x01 /* Compressed using zlib */ +#define SHRD_BZIP2 0x02 /* Compressed using bzip2 */ + +/* Query Types */ +#define SHRD_DEVCHAR 0x41 /* Device characteristics */ +#define SHRD_DEVID 0x42 /* Device identifier */ +#define SHRD_USED 0x43 /* Device usage */ +#define SHRD_CKDCYLS 0x48 /* CKD number cylinders */ +#define SHRD_FBAORIGIN 0x4c /* FBA origin */ +#define SHRD_FBANUMBLK 0x4d /* FBA number blocks */ +#define SHRD_FBABLKSIZ 0x4e /* FBA block size */ + +/* Constraints */ +#define SHARED_DEFAULT_PORT 3990 /* Default shared port */ +#define SHARED_PURGE_MAX 16 /* Max size of purge list */ +#define SHARED_MAX_MSGLEN 255 /* Max message length */ +#define SHARED_TIMEOUT 120 /* Disconnect timeout (sec) */ +#define SHARED_FORCE_TIMEOUT 300 /* Force disconnect (sec) */ +#define SHARED_SELECT_WAIT 10 /* Select timeout (sec) */ +#define SHARED_COMPRESS_MINLEN 512 /* Min length for compression*/ + +typedef struct _SHRD { + int id; /* Identifier */ + int fd; /* Socket */ + time_t time; /* Time last request */ + int release; /* Client release level */ + int comp; /* Compression parameter */ + int comps; /* Compression supported */ + int pending:1, /* 1=Request pending */ + waiting:1, /* 1=Waiting for device */ + havehdr:1, /* 1=Header already read */ + disconnect:1; /* 1=Disconnect device */ + DWORD hdr; /* Header */ + int purgen; /* Number purge entries */ + FWORD purge[SHARED_PURGE_MAX];/* Purge list */ + } SHRD; + +typedef struct _SHRD_HDR { + BYTE cmd; /* 0 Command */ + BYTE code; /* 1 Flags and Codes */ + U16 devnum; /* 2 Device number */ + U16 id; /* 4 Identifier */ + U16 len; /* 6 Data length */ +} SHRD_HDR; +/* Size must be 8 bytes */ +#define SHRD_HDR_SIZE sizeof(DWORD) + +#define SHRD_SET_HDR(_buf, _cmd, _code, _devnum, _len, _id) \ +do { \ + SHRD_HDR *shdr = (SHRD_HDR *)(_buf); \ + shdr->cmd = (_cmd); \ + shdr->code = (_code); \ + store_hw (&shdr->devnum, (_devnum)); \ + store_hw (&shdr->len, (_len)); \ + store_hw (&shdr->id, (_id)); \ +} while (0) + +#define SHRD_GET_HDR(_buf, _cmd, _code, _devnum, _len, _id) \ +do { \ + SHRD_HDR *shdr = (SHRD_HDR *)(_buf); \ + (_cmd) = shdr->cmd; \ + (_code) = shdr->code; \ + (_devnum) = (U16)fetch_hw (&shdr->devnum); \ + (_len) = (int)fetch_hw (&shdr->len); \ + (_id) = (int)fetch_hw (&shdr->id); \ +} while (0) + +#define shrdtrc(format, a...) \ +do { \ + struct timeval tv; \ + gettimeofday(&tv, NULL); \ + if (dev && (dev->ccwtrace||dev->ccwstep)) \ + logmsg("%4.4X:" format, dev->devnum, a); \ + if (sysblk.shrdtrace) { \ + SHRD_TRACE *p = sysblk.shrdtracep++; \ + if (p >= sysblk.shrdtracex) { \ + p = sysblk.shrdtrace; \ + sysblk.shrdtracep = p + 1; \ + } \ + if (p) sprintf ((char *)p, "%6.6ld" "." "%6.6ld %4.4X:" format, tv.tv_sec, tv.tv_usec, dev ? dev->devnum : 0, a); \ + } \ +} while (0) + +int shared_update_notify (DEVBLK *dev, int block); +int shared_ckd_init (DEVBLK *dev, int argc, BYTE *argv[] ); +int shared_fba_init (DEVBLK *dev, int argc, BYTE *argv[] ); +void *shared_server (void *arg); +int shared_cmd(int argc, char *argv[], char *cmdline); + +#ifdef _HERCULES_SHARED_C +static int shared_ckd_close ( DEVBLK *dev ); +static int shared_fba_close (DEVBLK *dev); +static void shared_start(DEVBLK *dev); +static void shared_end (DEVBLK *dev); +static int shared_ckd_read (DEVBLK *dev, int trk, BYTE *unitstat); +static int shared_ckd_write (DEVBLK *dev, int trk, int off, + BYTE *buf, int len, BYTE *unitstat); +static int shared_ckd_trklen (DEVBLK *dev, BYTE *buf); +static int shared_fba_read (DEVBLK *dev, int blkgrp, BYTE *unitstat); +static int shared_fba_write (DEVBLK *dev, int blkgrp, int off, + BYTE *buf, int len, BYTE *unitstat); +static int shared_fba_blkgrp_len (DEVBLK *dev, int blkgrp); +static int shared_used (DEVBLK *dev); +static void shared_reserve (DEVBLK *dev); +static void shared_release (DEVBLK *dev); +static int clientWrite (DEVBLK *dev, int block); +static void clientPurge (DEVBLK *dev, int n, void *buf); +static int clientPurgescan (int *answer, int ix, int i, void *data); +static int clientConnect (DEVBLK *dev, int retry); +static int clientRequest (DEVBLK *dev, BYTE *buf, int len, int cmd, + int flags, int *code, int *status); +static int clientSend (DEVBLK *dev, BYTE *hdr, BYTE *buf, int buflen); +static int clientRecv (DEVBLK *dev, BYTE *hdr, BYTE *buf, int buflen); +static int recvData(int sock, BYTE *hdr, BYTE *buf, int buflen, int server); +static void serverRequest (DEVBLK *dev, int ix, BYTE *hdr, BYTE *buf); +static int serverLocate (DEVBLK *dev, int id, int *avail); +static int serverId (DEVBLK *dev); +static int serverError (DEVBLK *dev, int ix, int code, int status, + BYTE *msg); +static int serverSend (DEVBLK *dev, int ix, BYTE *hdr, BYTE *buf, + int buflen); +static int serverDisconnectable (DEVBLK *dev, int ix); +static void serverDisconnect (DEVBLK *dev, int ix); +static char *clientip (int sock); +static DEVBLK *findDevice (U16 devnum); +static void *serverConnect (int *psock); +#endif /* _HERCULES_SHARED_C */ + +#endif /* _HERCULES_SHARED_H */ diff --git a/sie.c b/sie.c index bc275fd..5f50e26 100644 --- a/sie.c +++ b/sie.c @@ -176,11 +176,8 @@ int icode = 0; /* Interception code */ release_lock(&sysblk.intlock); -#if defined(OPTION_REDUCED_INVAL) INVALIDATE_AIA(GUESTREGS); - INVALIDATE_AEA_ALL(GUESTREGS); -#endif /* Set host program interrupt routine */ GUESTREGS->sie_hostpi = (SIEFN)&ARCH_DEP(program_interrupt); @@ -741,7 +738,6 @@ int ARCH_DEP(run_sie) (REGS *regs) obtain_lock(&sysblk.intlock); -#if MAX_CPU_ENGINES > 1 /* Perform broadcasted purge of ALB and TLB if requested synchronize_broadcast() must be called until there are no more broadcast pending because synchronize_broadcast() @@ -749,7 +745,6 @@ int ARCH_DEP(run_sie) (REGS *regs) while ((IS_IC_BROADCAST(regs))) ARCH_DEP(synchronize_broadcast)(regs, 0, 0); -#endif /*MAX_CPU_ENGINES > 1*/ if( OPEN_IC_EXTPENDING(GUESTREGS) ) ARCH_DEP(perform_external_interrupt) (GUESTREGS); @@ -799,7 +794,7 @@ int ARCH_DEP(run_sie) (REGS *regs) sysblk.waitmask |= regs->cpumask; timed_wait_condition - (&INTCOND, &sysblk.intlock, &waittime); + (&regs->intcond, &sysblk.intlock, &waittime); sysblk.waitmask &= ~regs->cpumask; } @@ -834,7 +829,6 @@ int ARCH_DEP(run_sie) (REGS *regs) regs->instcount++; EXECUTE_INSTRUCTION(GUESTREGS->inst, 0, GUESTREGS); -#if defined(OPTION_CPU_UNROLL) #ifdef FEATURE_PER if (!PER_MODE(GUESTREGS)) #endif @@ -848,7 +842,6 @@ int ARCH_DEP(run_sie) (REGS *regs) UNROLLED_EXECUTE(GUESTREGS); UNROLLED_EXECUTE(GUESTREGS); } -#endif } while( !SIE_I_HOST(regs) ); if(icode == 0 || icode == SIE_NO_INTERCEPT) diff --git a/sllib.c b/sllib.c index d172a97..88e504a 100644 --- a/sllib.c +++ b/sllib.c @@ -9,12 +9,7 @@ || ---------------------------------------------------------------------------- */ -#include <time.h> -#include <string.h> -#include <ctype.h> -#include <stdio.h> -#include <stdlib.h> - +#include "hercules.h" #include "sllib.h" /* @@ -73,7 +68,7 @@ sl_ranges[] = /* || Text descriptions for errors */ -static const char *sl_errstr[] = +static const char *sl_errstr[] = { "No error", "Block size out of range", @@ -81,7 +76,7 @@ static const char *sl_errstr[] = "Invalid expiration date", "Missing or invalid job name", "Missing or invalid record length", - "Owner string too long", + "Owner string invalid or too long", "Missing or invalid record format", "Missing or invalid step name", "Invalid recording technique", @@ -95,12 +90,13 @@ static const char *sl_errstr[] = #define SL_ERRSTR_MAX ( sizeof( sl_errstr) / sizeof( sl_errstr[ 0 ] ) ) /* -|| Valid characters for a volume serial (well...kinda strict) +|| Valid characters for a Standard Label (from: SC26-4565-01 +|| "MVS/DFP 3.3: Using Magnetic Tape Labels and File Structure") */ static const char -volser_cset[] = +sl_cset[] = { - "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!\"%&'()*+,-./:;<=>?" }; /* @@ -145,72 +141,24 @@ valfm[] = }; #define VALFMCNT ( sizeof( valfm ) / sizeof( valfm[ 0 ] ) ) -/* -|| EBCDIC -> ASCII translation table -*/ -static const unsigned char -sl_etoatab[] = -{ - "\x00\x01\x02\x03\xA6\x09\xA7\x7F\xA9\xB0\xB1\x0B\x0C\x0D\x0E\x0F" - "\x10\x11\x12\x13\xB2\xB4\x08\xB7\x18\x19\x1A\xB8\xBA\x1D\xBB\x1F" - "\xBD\xC0\x1C\xC1\xC2\x0A\x17\x1B\xC3\xC4\xC5\xC6\xC7\x05\x06\x07" - "\xC8\xC9\x16\xCB\xCC\x1E\xCD\x04\xCE\xD0\xD1\xD2\x14\x15\xD3\xFC" - "\x20\xD4\x83\x84\x85\xA0\xD5\x86\x87\xA4\xD6\x2E\x3C\x28\x2B\xD7" - "\x26\x82\x88\x89\x8A\xA1\x8C\x8B\x8D\xD8\x21\x24\x2A\x29\x3B\x5E" - "\x2D\x2F\xD9\x8E\xDB\xDC\xDD\x8F\x80\xA5\x7C\x2C\x25\x5F\x3E\x3F" - "\xDE\x90\xDF\xE0\xE2\xE3\xE4\xE5\xE6\x60\x3A\x23\x40\x27\x3D\x22" - "\xE7\x61\x62\x63\x64\x65\x66\x67\x68\x69\xAE\xAF\xE8\xE9\xEA\xEC" - "\xF0\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\xF1\xF2\x91\xF3\x92\xF4" - "\xF5\x7E\x73\x74\x75\x76\x77\x78\x79\x7A\xAD\xA8\xF6\x5B\xF7\xF8" - "\x9B\x9C\x9D\x9E\x9F\xB5\xB6\xAC\xAB\xB9\xAA\xB3\xBC\x5D\xBE\xBF" - "\x7B\x41\x42\x43\x44\x45\x46\x47\x48\x49\xCA\x93\x94\x95\xA2\xCF" - "\x7D\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\xDA\x96\x81\x97\xA3\x98" - "\x5C\xE1\x53\x54\x55\x56\x57\x58\x59\x5A\xFD\xEB\x99\xED\xEE\xEF" - "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\xFE\xFB\x9A\xF9\xFA\xFF" -}; - -/* -|| ASCII -> EBCDIC translation table -*/ -static const unsigned char -sl_atoetab[] = -{ - "\x00\x01\x02\x03\x37\x2D\x2E\x2F\x16\x05\x25\x0B\x0C\x0D\x0E\x0F" - "\x10\x11\x12\x13\x3C\x3D\x32\x26\x18\x19\x1A\x27\x22\x1D\x35\x1F" - "\x40\x5A\x7F\x7B\x5B\x6C\x50\x7D\x4D\x5D\x5C\x4E\x6B\x60\x4B\x61" - "\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\x7A\x5E\x4C\x7E\x6E\x6F" - "\x7C\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xD1\xD2\xD3\xD4\xD5\xD6" - "\xD7\xD8\xD9\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xAD\xE0\xBD\x5F\x6D" - "\x79\x81\x82\x83\x84\x85\x86\x87\x88\x89\x91\x92\x93\x94\x95\x96" - "\x97\x98\x99\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xC0\x6A\xD0\xA1\x07" - "\x68\xDC\x51\x42\x43\x44\x47\x48\x52\x53\x54\x57\x56\x58\x63\x67" - "\x71\x9C\x9E\xCB\xCC\xCD\xDB\xDD\xDF\xEC\xFC\xB0\xB1\xB2\xB3\xB4" - "\x45\x55\xCE\xDE\x49\x69\x04\x06\xAB\x08\xBA\xB8\xB7\xAA\x8A\x8B" - "\x09\x0A\x14\xBB\x15\xB5\xB6\x17\x1B\xB9\x1C\x1E\xBC\x20\xBE\xBF" - "\x21\x23\x24\x28\x29\x2A\x2B\x2C\x30\x31\xCA\x33\x34\x36\x38\xCF" - "\x39\x3A\x3B\x3E\x41\x46\x4A\x4F\x59\x62\xDA\x64\x65\x66\x70\x72" - "\x73\xE1\x74\x75\x76\x77\x78\x80\x8C\x8D\x8E\xEB\x8F\xED\xEE\xEF" - "\x90\x9A\x9B\x9D\x9F\xA0\xAC\xAE\xAF\xFD\xFE\xFB\x3F\xEA\xFA\xFF" -}; - /*==DOC== NAME sl_atoe - Translate input buffer from ASCII to EBCDIC - + SYNOPSIS #include "sllib.h" char *sl_atoe( void *dbuf, void *sbuf, int slen ) - + DESCRIPTION Translates, and optionally copies, "sbuf" from ASCII to EBCDIC for "slen" characters. - + If "dbuf" is specified as NULL, then "sbuf" is translated in - place. Otherwise, "dbuf" specifies the buffer where the + place. Otherwise, "dbuf" specifies the buffer where the translated characters will be stored. - + RETURN VALUE The return value will be either "sbuf" or "dbuf" depending on whether "dbuf" was passed as NULL. @@ -244,7 +192,7 @@ sl_atoetab[] = { printf( "%02x ", ascii[ i ] ); } - + printf( "\nebcdic string: " ); for( i = 0 ; i < len ; i++ ) @@ -266,7 +214,7 @@ sl_atoe( void *dbuf, void *sbuf, int slen ) { unsigned char *sptr; unsigned char *dptr; - + sptr = sbuf; dptr = dbuf; @@ -278,7 +226,7 @@ sl_atoe( void *dbuf, void *sbuf, int slen ) while( slen > 0 ) { slen--; - dptr[ slen ] = sl_atoetab[ sptr[ slen ] ]; + dptr[ slen ] = host_to_guest( sptr[ slen ] ); } return( dptr ); @@ -288,20 +236,20 @@ sl_atoe( void *dbuf, void *sbuf, int slen ) NAME sl_etoa - Translate input buffer from EBCDIC to ASCII - + SYNOPSIS #include "sllib.h" char *sl_etoa( void *dbuf, void *sbuf, int slen ) - + DESCRIPTION Translates, and optionally copies, "sbuf" from EBCDIC to ASCII for "slen" characters. - + If "dbuf" is specified as NULL, then "sbuf" is translated in - place. Otherwise, "dbuf" specifies the buffer where the + place. Otherwise, "dbuf" specifies the buffer where the translated characters will be stored. - + RETURN VALUE The return value will be either "sbuf" or "dbuf" depending on whether "dbuf" was passed as NULL. @@ -335,7 +283,7 @@ sl_atoe( void *dbuf, void *sbuf, int slen ) { printf( "%02x ", ebcdic[ i ] ); } - + printf( "\nascii string: " ); for( i = 0 ; i < len ; i++ ) @@ -357,7 +305,7 @@ sl_etoa( void *dbuf, void *sbuf, int slen ) { unsigned char *sptr; unsigned char *dptr; - + sptr = sbuf; dptr = dbuf; @@ -369,7 +317,7 @@ sl_etoa( void *dbuf, void *sbuf, int slen ) while( slen > 0 ) { slen--; - dptr[ slen ] = sl_etoatab[ sptr[ slen ] ]; + dptr[ slen ] = guest_to_host( sptr[ slen ] ); } return( dptr ); @@ -379,12 +327,12 @@ sl_etoa( void *dbuf, void *sbuf, int slen ) NAME sl_islabel - Determines if passed data represents a standard label - + SYNOPSIS #include "sllib.h" int sl_islabel( SLLABEL *dlab, void *buf, int len ) - + DESCRIPTION This function performs several tests to determine if the "buf" parameter points to a valid standard label. The "len" parameter @@ -417,7 +365,7 @@ sl_etoa( void *dbuf, void *sbuf, int slen ) ( sl_islabel( NULL, &sllab, sizeof( sllab ) ? "" : " not" ) ); sl_vol1( &sllab, "HET001", "HERCULES" ); - + printf( "Label is: %s valid\n", ( sl_islabel( NULL, &sllab, sizeof( sllab ) ? "" : " not" ) ); @@ -472,7 +420,7 @@ sl_islabel( SLLABEL *lab, void *buf, int len ) } } } - + return( FALSE ); } @@ -480,20 +428,20 @@ sl_islabel( SLLABEL *lab, void *buf, int len ) NAME sl_istype - Verifies data is of specified standard label type - + SYNOPSIS #include "sllib.h" int sl_istype( void *buf, int type, int num ) - + DESCRIPTION This function verifies that the data pointed to by the "buf" - parameter contains a standard label as determined by the "type" + parameter contains a standard label as determined by the "type" and "num" parameters. - + The "type" parameter can be one of the "SLT_*" defines found in the "sllib.h" header file. - + The "num" parameter further defines the type and is usually 1 or 2. However, 0 may be specified to only test using the "type" parameter. @@ -520,7 +468,7 @@ sl_islabel( SLLABEL *lab, void *buf, int len ) SLLABEL sllab = { 0 }; sl_vol1( &sllab, "HET001", "HERCULES" ); - + printf( "Label is%s a VOL1\n", ( sl_istype( &sllab, SLT_VOL, 1 ) ? "" : " not" ) ); @@ -547,7 +495,7 @@ sl_istype( void *buf, int type, int num ) */ if( memcmp( buf, sl_elabs[ type ], 3 ) == 0 ) { - if( ( num == 0 ) || ( ptr[ 3 ] == ( ( (unsigned char) '\xF0' ) + num ) ) ) + if( ( num == 0 ) || ( ptr[ 3 ] == ( ( (unsigned char) '\xF0' ) + num ) ) ) { return( TRUE ); } @@ -571,12 +519,12 @@ sl_istype( void *buf, int type, int num ) NAME sl_fmtdate - Converts dates to/from SL format - + SYNOPSIS #include "sllib.h" char *sl_fmtdate( char *dest, char *src, int fromto ) - + DESCRIPTION Converts the "src" date from or to the SL format and places the result at the "dest" location. If the "src" parameter is specified @@ -584,15 +532,15 @@ sl_istype( void *buf, int type, int num ) The "fromto" parameter controls the type of conversion. Specify FALSE to convert to SL format and TRUE from convert from SL format. - + When converting to the SL format, the "src" parameter must contain a valid Julian date in one of the following formats: YYDDD YY.DDD YYYYDDD YYYY.DDD - - RETURN VALUE + + RETURN VALUE If "src" contains an invalid date, then NULL will be returned. Otherwise, the "dest" value is returned. @@ -671,7 +619,7 @@ sl_fmtdate( char *dest, char *src, int fromto ) strftime( sbuf, sizeof( sbuf ), "%Y%j", localtime( &curtime ) ); src = sbuf; } - + /* || Base initial guess at format on length of src date */ @@ -680,34 +628,34 @@ sl_fmtdate( char *dest, char *src, int fromto ) case 5: ptr = "%2u%3u"; break; - + case 6: ptr = "%2u.%3u"; break; - + case 7: ptr = "%4u%3u"; break; - + case 8: ptr = "%4u.%3u"; break; - + default: return( NULL ); break; } - + /* || Convert src to "tm" format */ - ret = sscanf( src, ptr, &tm.tm_year, &tm.tm_yday ); - if( ret != 2 || tm.tm_yday < 1 || tm.tm_yday > 366 ) - { + ret = sscanf( src, ptr, &tm.tm_year, &tm.tm_yday ); + if( ret != 2 || tm.tm_yday < 1 || tm.tm_yday > 366 ) + { return( NULL ); - } - tm.tm_yday--; - + } + tm.tm_yday--; + /* || Now, convert to SL tape format */ @@ -736,12 +684,12 @@ sl_fmtdate( char *dest, char *src, int fromto ) NAME sl_fmtlab - Transforms an SL label from raw to cooked format - + SYNOPSIS #include "sllib.h" void sl_fmtlab( SLFMT *fmt, SLLABEL *lab ) - + DESCRIPTION Converts the SL label specified by "lab" into a "cooked" format that's easier to process. Text descriptions are supplied for @@ -772,7 +720,7 @@ sl_fmtdate( char *dest, char *src, int fromto ) int i; sl_vol1( &sllab, "HET001", "HERCULES" ); - + sl_fmtlab( &slfmt, &sllab ); for( i = 0 ; slfmt.key[ i ] != NULL ; i++ ) @@ -879,28 +827,28 @@ sl_fmtlab( SLFMT *fmt, SLLABEL *lab ) NAME sl_vol - Generate a volume label - + SYNOPSIS #include "sllib.h" int sl_vol( SLLABEL *lab, char *volser, char *owner ) - + DESCRIPTION This function builds a volume label based on the parameters provided and places it at the location pointed to by the "lab" parameter in EBCDIC. - + The remaining parameters correspond to fields within the label and are converted to EBCDIC before storing. - + The "owner" parameter may be specified as NULL, in which case blanks are supplied. RETURN VALUE The return value will be >= 0 if no errors are detected. - + If an error is detected, then the return value will be < 0 and will be one of the following: @@ -928,7 +876,7 @@ sl_fmtlab( SLFMT *fmt, SLLABEL *lab ) int i; sl_vol( &sllab, "HET001", "HERCULES" ); - + sl_fmtlab( &slfmt, &sllab ); for( i = 0 ; slfmt.key[ i ] != NULL ; i++ ) @@ -975,26 +923,26 @@ sl_vol( SLLABEL *lab, } len = strlen( volser ); - if( ( len > 6 ) || ( (int)strspn( volser, volser_cset ) != len ) ) + if( ( len > 6 ) || ( (int)strspn( volser, sl_cset ) != len ) ) { return( SLE_VOLSER ); } memcpy( lab->slvol.volser, volser, len ); - + /* || Owner */ if( owner != NULL ) { len = strlen( owner ); - if( len > 10 ) + if( ( len > 10 ) || ( (int)strspn( owner, sl_cset ) != len ) ) { return( SLE_OWNER ); } memcpy( lab->slvol.owner, owner, len ); } - + /* || Convert to EBCDIC */ @@ -1007,7 +955,7 @@ sl_vol( SLLABEL *lab, NAME sl_ds1 - Generate a data set label 1 - + SYNOPSIS #include "sllib.h" @@ -1019,17 +967,17 @@ sl_vol( SLLABEL *lab, int dsseq, char *expdt, int blocks ) - + DESCRIPTION This function builds a data set label 1 based on the parameters provided and places it at the location pointed to by the "lab" parameter in EBCDIC. - + The "type" parameter must be "SLT_HDR", "SLT_EOF", or "SLT_EOV". - + The remaining parameters correspond to fields within the label and are converted to EBCDIC before storing. - + The "dsn" parameter may be set to "SL_INITDSN" if "SLT_HDR" is specified for the "type" parameter. This will create an IEHINITT format HDR1 label. @@ -1038,7 +986,7 @@ sl_vol( SLLABEL *lab, RETURN VALUE The return value will be >= 0 if no errors are detected. - + If an error is detected, then the return value will be < 0 and will be one of the following: @@ -1074,7 +1022,7 @@ sl_vol( SLLABEL *lab, 1, "2001.321", 289 ); - + sl_fmtlab( &slfmt, &sllab ); for( i = 0 ; slfmt.key[ i ] != NULL ; i++ ) @@ -1104,7 +1052,7 @@ sl_ds1( SLLABEL *lab, int len; int ndx; char wbuf[ 80 ]; - + /* || Initialize */ @@ -1145,7 +1093,7 @@ sl_ds1( SLLABEL *lab, len = 17; } memcpy( lab->slds1.dsid, &dsn[ ndx ], len ); - + /* || GDG generation and version */ @@ -1250,7 +1198,7 @@ sl_ds1( SLLABEL *lab, NAME sl_ds2 - Generate a data set label 2 - + SYNOPSIS #include "sllib.h" @@ -1262,14 +1210,14 @@ sl_ds1( SLLABEL *lab, char *jobname, char *stepname, char *trtch ) - + DESCRIPTION This function builds a data set label 2 based on the parameters provided and places it at the location pointed to by the "lab" parameter in EBCDIC. - + The "type" parameter must be "SLT_HDR", "SLT_EOF", or "SLT_EOV". - + The remaining parameters correspond to fields within the label and are converted to EBCDIC before storing. @@ -1280,13 +1228,13 @@ sl_ds1( SLLABEL *lab, FB FBS VB VBS FBA FBSA VBA VBSA FBM FBSM VBM VBSM - + The "trtch" parameter may be blank or one of the following: T C E ET P RETURN VALUE The return value will be >= 0 if no errors are detected. - + If an error is detected, then the return value will be < 0 and will be one of the following: @@ -1296,7 +1244,7 @@ sl_ds1( SLLABEL *lab, SLE_BLKSIZE Block size out of range SLE_JOBNAME Missing or invalid job name SLE_STEPNAME Missing or invalid step name - SLE_TRTCH Invalid recording technique + SLE_TRTCH Invalid recording technique NOTES This routine is normally accessed using the supplied "sl_hdr1", @@ -1326,7 +1274,7 @@ sl_ds1( SLLABEL *lab, "HERCJOB", "HERCSTEP", "P" ); - + sl_fmtlab( &slfmt, &sllab ); for( i = 0 ; slfmt.key[ i ] != NULL ; i++ ) @@ -1355,7 +1303,7 @@ sl_ds2( SLLABEL *lab, int i; int len; char wbuf[ 80 ]; - + /* || Initialize */ @@ -1399,7 +1347,7 @@ sl_ds2( SLLABEL *lab, lab->slds2.recfm[ 0 ] = valfm[ i ].f; lab->slds2.blkattr[ 0 ] = valfm[ i ].b; lab->slds2.ctrl[ 0 ] = valfm[ i ].c; - + /* || Block size */ @@ -1441,7 +1389,7 @@ sl_ds2( SLLABEL *lab, } } break; - + case 'V': if( valfm[ i ].b == ' ' ) { @@ -1500,12 +1448,12 @@ sl_ds2( SLLABEL *lab, } sprintf( wbuf, "%-8.8s/%-8.8s", jobname, stepname ); memcpy( lab->slds2.jobid, wbuf, 17 ); - + /* || Density */ lab->slds2.den[ 0 ] = '0'; - + /* || Dataset position */ @@ -1527,7 +1475,7 @@ sl_ds2( SLLABEL *lab, case 'T': case 'C': case 'P': case ' ': lab->slds2.trtch[ 0 ] = trtch[ 0 ]; break; - + case 'E': lab->slds2.trtch[ 0 ] = trtch[ 0 ]; if( len == 2 ) @@ -1539,19 +1487,19 @@ sl_ds2( SLLABEL *lab, lab->slds2.trtch[ 1 ] = trtch[ 1 ]; } break; - + default: return( SLE_TRTCH ); break; } } - + /* || Device serial number */ sprintf( wbuf, "%06u", rand() ); memcpy( lab->slds2.devser, wbuf, 6 ); - + /* || Checkpoint dataset identifier */ @@ -1569,7 +1517,7 @@ sl_ds2( SLLABEL *lab, NAME sl_usr - Generate a user label - + SYNOPSIS #include "sllib.h" @@ -1577,21 +1525,21 @@ sl_ds2( SLLABEL *lab, int type, int num, char *data ) - + DESCRIPTION This function builds a user label based on the parameters provided and places it at the location pointed to by the "lab" parameter in EBCDIC. - + The "type" parameter must be "SLT_UHL" or "SLT_UTL" and the "num" parameter must be 1 through 8. - + The remaining parameter corresponds to fields within the label and is converted to EBCDIC before storing. RETURN VALUE The return value will be >= 0 if no errors are detected. - + If an error is detected, then the return value will be < 0 and will be one of the following: @@ -1618,7 +1566,7 @@ sl_ds2( SLLABEL *lab, SLT_EOF, 6, "Hercules Emulated Tape" ); - + sl_fmtlab( &slfmt, &sllab ); for( i = 0 ; slfmt.key[ i ] != NULL ; i++ ) @@ -1641,7 +1589,7 @@ sl_usr( SLLABEL *lab, char *data ) { int len; - + /* || Initialize */ @@ -1692,16 +1640,16 @@ sl_usr( SLLABEL *lab, NAME sl_error - Returns a text message for an SL error code - + SYNOPSIS #include "sllib.h" char *sl_error( int rc ) - + DESCRIPTION Simply returns a pointer to a string that describes the error code passed in the "rc" parameter. - + RETURN VALUE The return value is always valid and no errors are returned. @@ -1735,7 +1683,7 @@ sl_error( int rc ) { rc = 0; } - + /* || Turn it into an index */ diff --git a/sllib.h b/sllib.h index f1c1e7f..c635210 100644 --- a/sllib.h +++ b/sllib.h @@ -266,5 +266,6 @@ int sl_vol( SLLABEL *, char *, char * ); int sl_ds1( SLLABEL *, int type, char *, char *, int, int, char *, int ); int sl_ds2( SLLABEL *, int type, char *, int, int, char *, char *, char * ); int sl_usr( SLLABEL *, int type, int num, char * ); +const char *sl_error( int rc ); #endif /* defined( _SLLIB_H_ ) */ diff --git a/sockdev.c b/sockdev.c new file mode 100644 index 0000000..e7a2bdd --- /dev/null +++ b/sockdev.c @@ -0,0 +1,609 @@ +/* SOCKDEV.C (c) Copyright Hercules development, 2003 */ +/* Socketdevice support */ + +#include "hercules.h" + +#include "opcode.h" + + +#if defined(OPTION_DYNAMIC_LOAD) && defined(WIN32) && !defined(HDL_USE_LIBTOOL) +extern SYSBLK *psysblk; + #define sysblk (*psysblk) +#endif + + +/*===================================================================*/ +/* S o c k e t D e v i c e s ... */ +/*===================================================================*/ + +// #define DEBUG_SOCKDEV + +#ifdef DEBUG_SOCKDEV + #define logdebug(args...) logmsg(## args) +#else + #define logdebug(args...) do {} while (0) +#endif /* DEBUG_SOCKDEV */ + +/* Linked list of bind structures for bound socket devices */ + +static LIST_ENTRY bind_head; /* (bind_struct list anchor) */ +static LOCK bind_lock; /* (lock for accessing list) */ + +static void init_sockdev() +{ + InitializeListHead(&bind_head); + initialize_lock(&bind_lock); +} + + +/*-------------------------------------------------------------------*/ +/* safe_strdup make copy of string and return a pointer to it */ +/*-------------------------------------------------------------------*/ +char* safe_strdup (char* str) +{ + char* newstr; + if (!str) return NULL; + newstr = malloc (strlen (str) + 1); + if (!newstr) return NULL; + strcpy (newstr, str); /* (guaranteed room) */ + return newstr; +} + + +/*-------------------------------------------------------------------*/ +/* unix_socket create and bind a Unix domain socket */ +/*-------------------------------------------------------------------*/ + +#include <sys/un.h> /* (need "sockaddr_un") */ + +int unix_socket (char* path) +{ + struct sockaddr_un addr; + int sd; + + logdebug ("unix_socket(%s)\n", path); + + if (strlen (path) > sizeof(addr.sun_path) - 1) + { + logmsg (_("HHCSD008E Socket pathname \"%s\" exceeds limit of %d\n"), + path, (int) sizeof(addr.sun_path) - 1); + return -1; + } + + addr.sun_family = AF_UNIX; + strcpy (addr.sun_path, path); /* guaranteed room by above check */ + sd = socket (PF_UNIX, SOCK_STREAM, 0); + + if (sd == -1) + { + logmsg (_("HHCSD009E Error creating socket for %s: %s\n"), + path, strerror(errno)); + return -1; + } + + unlink (path); + fchmod (sd, 0700); + + if (0 + || bind (sd, (struct sockaddr*) &addr, sizeof(addr)) == -1 + || listen (sd, 0) == -1 + ) + { + logmsg (_("HHCSD010E Failed to bind or listen on socket %s: %s\n"), + path, strerror(errno)); + return -1; + } + + return sd; +} + + +/*-------------------------------------------------------------------*/ +/* inet_socket create and bind a regular TCP/IP socket */ +/*-------------------------------------------------------------------*/ +int inet_socket (char* spec) +{ + /* We need a copy of the path to overwrite a ':' with '\0' */ + + char buf[sizeof(((DEVBLK*)0)->filename)]; + char* colon; + char* node; + char* service; + int sd; + int one = 1; + struct sockaddr_in sin; + + logdebug("inet_socket(%s)\n", spec); + + memset(&sin, 0, sizeof(sin)); + sin.sin_family = AF_INET; + strcpy(buf, spec); + colon = strchr(buf, ':'); + + if (colon) + { + *colon = '\0'; + node = buf; + service = colon + 1; + } + else + { + node = NULL; + service = buf; + } + + if (!node) + sin.sin_addr.s_addr = INADDR_ANY; + else + { + struct hostent* he = gethostbyname(node); + + if (!he) + { + logmsg (_("HHCSD011E Failed to determine IP address from %s\n"), + node); + return -1; + } + + memcpy(&sin.sin_addr, he->h_addr_list[0], sizeof(sin.sin_addr)); + } + + if (isdigit(service[0])) + { + sin.sin_port = htons(atoi(service)); + } + else + { + struct servent* se = getservbyname(service, "tcp"); + + if (!se) + { + logmsg (_("HHCSD012E Failed to determine port number from %s\n"), + service); + return -1; + } + + sin.sin_port = se->s_port; + } + + sd = socket (PF_INET, SOCK_STREAM, 0); + + if (sd == -1) + { + logmsg (_("HHCSD013E Error creating socket for %s: %s\n"), + spec, strerror(errno)); + return -1; + } + + setsockopt (sd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); + + if (0 + || bind (sd, (struct sockaddr*) &sin, sizeof(sin)) == -1 + || listen (sd, 0) == -1 + ) + { + logmsg (_("HHCSD014E Failed to bind or listen on socket %s: %s\n"), + spec, strerror(errno)); + return -1; + } + + return sd; +} + + +/*-------------------------------------------------------------------*/ +/* add_socket_devices_to_fd_set add all bound socket devices' */ +/* listening sockets to the FD_SET */ +/*-------------------------------------------------------------------*/ +int add_socket_devices_to_fd_set (fd_set* readset, int maxfd) +{ + DEVBLK* dev; + bind_struct* bs; + LIST_ENTRY* pListEntry; + + obtain_lock(&bind_lock); + + pListEntry = bind_head.Flink; + + while (pListEntry != &bind_head) + { + bs = CONTAINING_RECORD(pListEntry,bind_struct,bind_link); + + if (bs->sd != -1) /* if listening for connections, */ + { + dev = bs->dev; + + FD_SET(bs->sd, readset); /* then add file to set */ + + if (bs->sd > maxfd) + maxfd = bs->sd; + } + + pListEntry = pListEntry->Flink; + } + + release_lock(&bind_lock); + + return maxfd; +} + + +/*-------------------------------------------------------------------*/ +/* socket_device_connection_handler */ +/*-------------------------------------------------------------------*/ +void socket_device_connection_handler (bind_struct* bs) +{ + struct sockaddr_in client; /* Client address structure */ + struct hostent* pHE; /* Addr of hostent structure */ + socklen_t namelen; /* Length of client structure*/ + char* clientip; /* Addr of client ip address */ + char* clientname; /* Addr of client hostname */ + DEVBLK* dev; /* Device Block pointer */ + int csock; /* Client socket */ + + dev = bs->dev; + + logdebug("socket_device_connection_handler(dev=%4.4X)\n", + dev->devnum); + + /* Obtain the device lock */ + + obtain_lock (&dev->lock); + + /* Reject if device is busy or interrupt pending */ + + if (dev->busy || dev->pending || dev->pcipending + || (dev->scsw.flag3 & SCSW3_SC_PEND)) + { + release_lock (&dev->lock); + logmsg (_("HHCSD015E Connect to device %4.4X (%s) rejected; " + "device busy or interrupt pending\n"), + dev->devnum, bs->spec); + return; + } + + /* Reject if previous connection not closed (should not occur) */ + + if (dev->fd != -1) + { + release_lock (&dev->lock); + logmsg (_("HHCSD016E Connect to device %4.4X (%s) rejected; " + "client %s (%s) still connected\n"), + dev->devnum, bs->spec, bs->clientip, bs->clientname); + close(accept(bs->sd, 0, 0)); /* Should reject */ + return; + } + + /* Accept the connection... */ + + csock = accept(bs->sd, 0, 0); + + if (csock == -1) + { + release_lock (&dev->lock); + logmsg (_("HHCSD017E Connect to device %4.4X (%s) failed: %s\n"), + dev->devnum, bs->spec, strerror(errno)); + return; + } + + /* Determine the connected client's IP address and hostname */ + + namelen = sizeof(client); + clientip = NULL; + clientname = "host name unknown"; + + if (1 + && getpeername(csock, (struct sockaddr*) &client, &namelen) == 0 + && (clientip = inet_ntoa(client.sin_addr)) != NULL + && (pHE = gethostbyaddr((unsigned char*)(&client.sin_addr), + sizeof(client.sin_addr), AF_INET)) != NULL + && pHE->h_name && *pHE->h_name + ) + { + clientname = (char*) pHE->h_name; + } + + /* Log the connection */ + + if (clientip) + { + logmsg (_("HHCSD018I %s (%s) connected to device %4.4X (%s)\n"), + clientip, clientname, dev->devnum, bs->spec); + } + else + { + logmsg (_("HHCSD019I <unknown> connected to device %4.4X (%s)\n"), + dev->devnum, bs->spec); + } + + /* Save the connected client information in the bind_struct */ + + if (bs->clientip) free(bs->clientip); + if (bs->clientname) free(bs->clientname); + + bs->clientip = safe_strdup(clientip); + bs->clientname = safe_strdup(clientname); + + /* Indicate that a client is now connected to device (prevents + * listening for new connections until THIS client disconnects). + */ + + dev->fd = csock; /* (indicate client connected to device) */ + + /* Release the device lock */ + + release_lock (&dev->lock); + + /* Raise unsolicited device end interrupt for the device */ + + device_attention (dev, CSW_DE); +} + + +/*-------------------------------------------------------------------*/ +/* check_socket_devices_for_connections */ +/*-------------------------------------------------------------------*/ +void check_socket_devices_for_connections (fd_set* readset) +{ + bind_struct* bs; + LIST_ENTRY* pListEntry; + + obtain_lock(&bind_lock); + + pListEntry = bind_head.Flink; + + while (pListEntry != &bind_head) + { + bs = CONTAINING_RECORD(pListEntry,bind_struct,bind_link); + + if (bs->sd != -1 && FD_ISSET(bs->sd, readset)) + { + /* Note: there may be other connection requests + * waiting to be serviced, but we'll catch them + * the next time the panel thread calls us. */ + + release_lock(&bind_lock); + socket_device_connection_handler(bs); + return; + } + + pListEntry = pListEntry->Flink; + } + + release_lock(&bind_lock); +} + + +void *socket_thread(void *arg) +{ +fd_set sockset; +int maxfd = 0; +int rc; + + UNREFERENCED(arg); + + /* Display thread started message on control panel */ + logmsg (_("HHCSD020I Socketdevice listener thread started: " + "tid="TIDPAT", pid=%d\n"), + thread_id(), getpid()); + + + obtain_lock(&bind_lock); + + while(sysblk.socktid) + { + release_lock(&bind_lock); + + /* Set the file descriptors for select */ + FD_ZERO (&sockset); + maxfd = add_socket_devices_to_fd_set (&sockset, maxfd); + +#if defined(WIN32) + { + struct timeval tv={0,500000}; /* half a second */ + rc = select ( maxfd+1, &sockset, NULL, NULL, &tv ); + } +#else /*!defined(WIN32)*/ + rc = select ( maxfd+1, &sockset, NULL, NULL, NULL ); +#endif /*!defined(WIN32)*/ + + if (rc < 0 ) + { + if (errno == EINTR) + { + obtain_lock(&bind_lock); + continue; + } + logmsg ( _("HHCSD021E select: %s\n"), strerror(errno)); + break; + } + + /* Check if any sockets have received new connections */ + check_socket_devices_for_connections (&sockset); + + obtain_lock(&bind_lock); + } /* end while */ + + sysblk.socktid = 0; + + release_lock(&bind_lock); + + logmsg (_("HHCSD022I Socketdevice listener thread terminated\n")); + + return NULL; + +} + + +static int sockdev_init_done = 0; +/*-------------------------------------------------------------------*/ +/* bind_device bind a device to a socket (adds entry to our list */ +/* of bound devices) (1=success, 0=failure) */ +/*-------------------------------------------------------------------*/ +int bind_device (DEVBLK* dev, char* spec) +{ + bind_struct* bs; + + if(!sockdev_init_done) + { + init_sockdev(); + sockdev_init_done = 1; + } + + logdebug("bind_device (%4.4X, %s)\n", dev->devnum, spec); + + obtain_lock(&bind_lock); + if(!sysblk.socktid) + { + if ( create_thread (&sysblk.socktid, &sysblk.detattr, + socket_thread, NULL) ) + { + logmsg (_("HHCSD023E Cannot create socketdevice thread: %s\n"), + strerror(errno)); + return 0; + } + } + release_lock(&bind_lock); + + /* Error if device already bound */ + + if (dev->bs) + { + logmsg (_("HHCSD001E Device %4.4X already bound to socket %s\n"), + dev->devnum, dev->bs->spec); + return 0; /* (failure) */ + } + + /* Create a new bind_struct entry */ + + bs = malloc(sizeof(bind_struct)); + + if (!bs) + { + logmsg (_("HHCSD002E bind_device malloc() failed for device %4.4X\n"), + dev->devnum); + return 0; /* (failure) */ + } + + memset(bs,0,sizeof(bind_struct)); + + if (!(bs->spec = safe_strdup(spec))) + { + logmsg (_("HHCSD003E bind_device safe_strdup() failed for device %4.4X\n"), + dev->devnum); + free (bs); + return 0; /* (failure) */ + } + + /* Create a listening socket */ + + if (bs->spec[0] == '/') bs->sd = unix_socket (bs->spec); + else bs->sd = inet_socket (bs->spec); + + if (bs->sd == -1) + { + /* (error message already issued) */ + free (bs); + return 0; /* (failure) */ + } + + /* Chain device and socket to each other */ + + dev->bs = bs; + bs->dev = dev; + + /* Add the new entry to our list of bound devices */ + + obtain_lock(&bind_lock); + InsertListTail(&bind_head,&bs->bind_link); + release_lock(&bind_lock); + + signal_thread (sysblk.socktid, SIGUSR2); + + logmsg (_("HHCSD004I Device %4.4X bound to socket %s\n"), + dev->devnum, dev->bs->spec); + + return 1; /* (success) */ +} + + +/*-------------------------------------------------------------------*/ +/* unbind_device unbind a device from a socket (removes entry from */ +/* our list and discards it) (1=success, 0=failure) */ +/*-------------------------------------------------------------------*/ +int unbind_device (DEVBLK* dev) +{ + bind_struct* bs; + + logdebug("unbind_device(%4.4X)\n", dev->devnum); + + /* Error if device not bound */ + + if (!(bs = dev->bs)) + { + logmsg (_("HHCSD005E Device %4.4X not bound to any socket\n"), + dev->devnum); + return 0; /* (failure) */ + } + + /* Error if someone still connected */ + + if (dev->fd != -1) + { + logmsg (_("HHCSD006E Client %s (%s) still connected to device %4.4X (%s)\n"), + dev->bs->clientip, dev->bs->clientname, dev->devnum, dev->bs->spec); + return 0; /* (failure) */ + } + + /* IMPORTANT! it's bad form to close a listening socket (and it + * happens to crash the Cygwin build) while another thread is still + * listening for connections on that socket (i.e. is in its FD_SET + * 'select' list). Thus we always issue a message (any message) + * immediately AFTER removing the entry from the sockdev (bind_struct) + * list and BEFORE closing our listening socket, thereby forcing + * the panel thread to rebuild its FD_SET 'select' list. (It wakes up + * from its 'select' as a result of our sending it our message and + * then before issuing another 'select' before going back to sleep, + * it then rebuilds its FD_SET 'select' list based on the current + * state of the sockdev (bind_struct) list, and since we just removed + * our entry from that list, the panel thread will thus not add our + * listening socket to its FD_SET 'select' list and thus we can then + * SAFELY close the listening socket). + */ + + /* Remove the entry from our list */ + + obtain_lock(&bind_lock); + RemoveListEntry(&bs->bind_link); + release_lock(&bind_lock); + + logmsg (_("HHCSD007I Device %4.4X unbound from socket %s\n"), + dev->devnum, bs->spec); + + if (bs->sd != -1) + close (bs->sd); + + /* Unchain device and socket from each another */ + + dev->bs = NULL; + bs->dev = NULL; + + /* Discard the entry */ + + if (bs->clientname) + free(bs->clientname); + bs->clientname = NULL; + + if (bs->clientip) + free(bs->clientip); + bs->clientip = NULL; + + free (bs->spec); + free (bs); + + /* ZZ INCOMPLETE + The last socketdevice to be detached should set + sysblk.socktid to zero such that the listener + thread will terminate */ + return 1; /* (success) */ +} diff --git a/sockdev.h b/sockdev.h new file mode 100644 index 0000000..51c4c8c --- /dev/null +++ b/sockdev.h @@ -0,0 +1,5 @@ +/* SOCKDEV.H (c) Copyright Hercules development, 2003 */ +/* Socketdevice support */ + +extern int bind_device (DEVBLK* dev, char* spec); +extern int unbind_device (DEVBLK* dev); diff --git a/tapecopy.c b/tapecopy.c index 143fa0d..d6cfb1f 100644 --- a/tapecopy.c +++ b/tapecopy.c @@ -33,8 +33,6 @@ typedef struct _AWSTAPE_BLKHDR { #define AWSTAPE_FLAG1_TAPEMARK 0x40 /* Tape mark */ #define AWSTAPE_FLAG1_ENDREC 0x20 /* End of record */ -SYSBLK sysblk; /* Currently only used for codepage mapping */ - /*-------------------------------------------------------------------*/ /* Static data areas */ /*-------------------------------------------------------------------*/ @@ -69,14 +67,14 @@ static struct mt_tape_info densinfo[] = { {0x8C, "EXB-8505 compressed"}, {0x90, "EXB-8205 compressed"}, {0, NULL}}; -static BYTE buf[65500]; +static BYTE buf[65535]; /*-------------------------------------------------------------------*/ /* Subroutine to print tape status */ /*-------------------------------------------------------------------*/ static void print_status (BYTE *devname, long stat) { - printf ("HHCTC015I %s status: %8.8lX", devname, stat); + printf (_("HHCTC015I %s status: %8.8lX"), devname, stat); if (GMT_EOF(stat)) printf (" EOF"); if (GMT_BOT(stat)) printf (" BOT"); if (GMT_EOT(stat)) printf (" EOT"); @@ -104,7 +102,7 @@ struct mtget stblk; /* Area for MTIOCGET ioctl */ rc = ioctl (devfd, MTIOCGET, (char*)&stblk); if (rc < 0) { - printf ("HHCTC016E Error reading status of %s: %s\n", + printf (_("HHCTC016E Error reading status of %s: %s\n"), devname, strerror(errno)); return -1; } @@ -145,18 +143,14 @@ struct mtget stblk; /* Area for MTIOCGET ioctl */ long density; /* Tape density code */ BYTE labelrec[81]; /* Standard label (ASCIIZ) */ AWSTAPE_BLKHDR awshdr; /* AWSTAPE block header */ -char *scodepage; - /* set_codepage() uses the logmsg macro which requires msgpipew */ - sysblk.msgpipew = stdout; - if(!sysblk.codepage) - { - if((scodepage = getenv("HERCULES_CP"))) - set_codepage(scodepage); - else - set_codepage("default"); - } +#if defined(ENABLE_NLS) + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); +#endif + set_codepage(NULL); #ifdef EXTERNALGUI if (argc >= 1 && strncmp(argv[argc-1],"EXTERNALGUI",11) == 0) @@ -191,7 +185,7 @@ char *scodepage; devfd = open (devname, O_RDONLY|O_BINARY); if (devfd < 0) { - printf ("HHCTC001E Error opening %s: %s\n", + printf (_("HHCTC001E Error opening %s: %s\n"), devname, strerror(errno)); exit (3); } @@ -200,7 +194,7 @@ char *scodepage; rc = ioctl (devfd, MTIOCGET, (char*)&stblk); if (rc < 0) { - printf ("HHCTC002E Error reading status of %s: %s\n", + printf (_("HHCTC002E Error reading status of %s: %s\n"), devname, strerror(errno)); exit (7); } @@ -210,9 +204,9 @@ char *scodepage; && tapeinfo[i].t_type != stblk.mt_type; i++); if (tapeinfo[i].t_name != NULL) - printf ("HHCTC003I %s device type: %s\n", devname, tapeinfo[i].t_name); + printf (_("HHCTC003I %s device type: %s\n"), devname, tapeinfo[i].t_name); else - printf ("HHCTC003I %s device type: 0x%lX\n", devname, stblk.mt_type); + printf (_("HHCTC003I %s device type: 0x%lX\n"), devname, stblk.mt_type); density = (stblk.mt_dsreg & MT_ST_DENSITY_MASK) >> MT_ST_DENSITY_SHIFT; @@ -221,10 +215,10 @@ char *scodepage; && densinfo[i].t_type != density; i++); if (densinfo[i].t_name != NULL) - printf ("HHCTC004I %s tape density: %s\n", + printf (_("HHCTC004I %s tape density: %s\n"), devname, densinfo[i].t_name); else - printf ("HHCTC004I %s tape density code: 0x%lX\n", devname, density); + printf (_("HHCTC004I %s tape density code: 0x%lX\n"), devname, density); if (stblk.mt_gstat != 0) { @@ -237,7 +231,7 @@ char *scodepage; rc = ioctl (devfd, MTIOCTOP, (char*)&opblk); if (rc < 0) { - printf ("HHCTC005E Error setting attributes for %s: %s\n", + printf (_("HHCTC005E Error setting attributes for %s: %s\n"), devname, strerror(errno)); exit (5); } @@ -248,7 +242,7 @@ char *scodepage; rc = ioctl (devfd, MTIOCTOP, (char*)&opblk); if (rc < 0) { - printf ("HHCTC006E Error rewinding %s: %s\n", + printf (_("HHCTC006E Error rewinding %s: %s\n"), devname, strerror(errno)); exit (6); } @@ -260,7 +254,7 @@ char *scodepage; S_IRUSR | S_IWUSR | S_IRGRP); if (outfd < 0) { - printf ("HHCTC007E Error opening %s: %s\n", + printf (_("HHCTC007E Error opening %s: %s\n"), filename, strerror(errno)); exit (4); } @@ -282,7 +276,7 @@ char *scodepage; len = read (devfd, buf, sizeof(buf)); if (len < 0) { - printf ("HHCTC008E Error reading %s: %s\n", + printf (_("HHCTC008E Error reading %s: %s\n"), devname, strerror(errno)); obtain_status (devname, devfd); exit (8); @@ -292,8 +286,8 @@ char *scodepage; if (len == 0) { /* Print summary of current file */ - printf ("HHCTC009I File %u: Blocks=%u, block size min=%u, " - "max=%u\n", + printf (_("HHCTC009I File %u: Blocks=%u, block size min=%u, " + "max=%u\n"), fileno, blkcount, minblksz, maxblksz); /* Write tape mark to output file */ @@ -311,7 +305,7 @@ char *scodepage; rc = write (outfd, &awshdr, sizeof(AWSTAPE_BLKHDR)); if (rc < (int)sizeof(AWSTAPE_BLKHDR)) { - printf ("HHCTC010E Error writing %s: %s\n", + printf (_("HHCTC010E Error writing %s: %s\n"), filename, strerror(errno)); exit (9); } /* end if(rc) */ @@ -327,7 +321,7 @@ char *scodepage; /* Determine whether end of tape has been read */ rc = obtain_status (devname, devfd); if (rc == 0) continue; - if (rc > 0) printf ("HHCTC011I End of tape\n"); + if (rc > 0) printf (_("HHCTC011I End of tape\n")); break; } /* end if(tapemark) */ @@ -347,7 +341,7 @@ char *scodepage; for (i=0; i < 80; i++) labelrec[i] = guest_to_host(buf[i]); labelrec[i] = '\0'; - printf ("HHCTC012I %s\n", labelrec); + printf (_("HHCTC012I %s\n"), labelrec); } else { @@ -370,7 +364,7 @@ char *scodepage; rc = write (outfd, &awshdr, sizeof(AWSTAPE_BLKHDR)); if (rc < (int)sizeof(AWSTAPE_BLKHDR)) { - printf ("HHCTC013I Error writing %s: %s\n", + printf (_("HHCTC013I Error writing %s: %s\n"), filename, strerror(errno)); exit (10); } /* end if(rc) */ @@ -379,7 +373,7 @@ char *scodepage; rc = write (outfd, buf, len); if (rc < len) { - printf ("HHCTC014I Error writing %s: %s\n", + printf (_("HHCTC014I Error writing %s: %s\n"), filename, strerror(errno)); exit (11); } /* end if(rc) */ diff --git a/tapedev.c b/tapedev.c index 37b7712..e56ce4d 100644 --- a/tapedev.c +++ b/tapedev.c @@ -1,6 +1,8 @@ /* TAPEDEV.C (c) Copyright Roger Bowler, 1999-2003 */ /* JCS - minor changes by John Summerfield */ /* ESA/390 Tape Device Handler */ +/* Original Author : Roger Bowler */ +/* Prime Maintainer : Ivan Warren */ /*-------------------------------------------------------------------*/ /* This module contains device handling functions for emulated */ @@ -13,6 +15,7 @@ /* Files are separated by tapemarks, which consist */ /* of headers with zero block length. */ /* AWSTAPE files are readable and writable. */ +/* */ /* 2. OMATAPE This is the Optical Media Attach device format. */ /* Each physical file on the tape is represented by */ /* a separate flat file. The collection of files that */ @@ -60,139 +63,25 @@ /* SC53-1201 S/370 and S/390 Optical Media Attach/2 Technical Ref */ /*-------------------------------------------------------------------*/ +#include "tapedev.h" #include "hercules.h" +#include "opcode.h" /* Device Attention declaration */ #include "devtype.h" #include "parser.h" +#include <regex.h> -/*-------------------------------------------------------------------*/ -/* Internal macro definitions */ -/*-------------------------------------------------------------------*/ -#define MAX_BLKLEN 65530 /* Maximum I/O buffer size */ -#define TAPE_UNLOADED "*" /* Name for unloaded drive */ - -/*-------------------------------------------------------------------*/ -/* Definitions for 3420/3480 sense bytes */ -/*-------------------------------------------------------------------*/ -#define SENSE1_TAPE_NOISE 0x80 /* Noise */ -#define SENSE1_TAPE_TUA 0x40 /* TU Status A (ready) */ -#define SENSE1_TAPE_TUB 0x20 /* TU Status B (not ready) */ -#define SENSE1_TAPE_7TRK 0x10 /* 7-track feature */ -#define SENSE1_TAPE_LOADPT 0x08 /* Tape is at load point */ -#define SENSE1_TAPE_WRT 0x04 /* Tape is in write status */ -#define SENSE1_TAPE_FP 0x02 /* File protect status */ -#define SENSE1_TAPE_NCA 0x01 /* Not capable */ - -#define SENSE4_TAPE_EOT 0x20 /* Tape indicate (EOT) */ - -#define SENSE5_TAPE_SRDCHK 0x08 /* Start read check */ -#define SENSE5_TAPE_PARTREC 0x04 /* Partial record */ - -#define SENSE7_TAPE_LOADFAIL 0x01 /* Load failure */ - -/*-------------------------------------------------------------------*/ -/* Definitions for 3480 commands */ -/*-------------------------------------------------------------------*/ - -/* Format control byte for Load Display command */ -#define FCB_FS 0xE0 /* Format control bits... */ -#define FCB_FS_NODISP 0x60 /* Do not display messages */ -#define FCB_AM 0x10 /* Alternate messages */ -#define FCB_BM 0x80 /* Blinking message */ -#define FCB_DM 0x40 /* Display low/high message */ - -/* Path state byte for Sense Path Group ID command */ -#define SPG_PATHSTAT 0xC0 /* Pathing status bits... */ -#define SPG_PATHSTAT_RESET 0x00 /* ...reset */ -#define SPG_PATHSTAT_RESV 0x40 /* ...reserved bit setting */ -#define SPG_PATHSTAT_UNGROUPED 0x80 /* ...ungrouped */ -#define SPG_PATHSTAT_GROUPED 0xC0 /* ...grouped */ -#define SPG_PARTSTAT 0x30 /* Partitioning status bits..*/ -#define SPG_PARTSTAT_IENABLED 0x00 /* ...implicitly enabled */ -#define SPG_PARTSTAT_RESV 0x10 /* ...reserved bit setting */ -#define SPG_PARTSTAT_DISABLED 0x20 /* ...disabled */ -#define SPG_PARTSTAT_XENABLED 0x30 /* ...explicitly enabled */ -#define SPG_PATHMODE 0x08 /* Path mode bit... */ -#define SPG_PATHMODE_SINGLE 0x00 /* ...single path mode */ -#define SPG_PATHMODE_RESV 0x08 /* ...reserved bit setting */ -#define SPG_RESERVED 0x07 /* Reserved bits, must be 0 */ -/* Function control byte for Set Path Group ID command */ -#define SPG_SET_MULTIPATH 0x80 /* Set multipath mode */ -#define SPG_SET_COMMAND 0x60 /* Set path command bits... */ -#define SPG_SET_ESTABLISH 0x00 /* ...establish group */ -#define SPG_SET_DISBAND 0x20 /* ...disband group */ -#define SPG_SET_RESIGN 0x40 /* ...resign from group */ -#define SPG_SET_COMMAND_RESV 0x60 /* ...reserved bit setting */ -#define SPG_SET_RESV 0x1F /* Reserved bits, must be 0 */ - -/*-------------------------------------------------------------------*/ -/* Definitions for tape device type field in device block */ -/*-------------------------------------------------------------------*/ -#define TAPEDEVT_AWSTAPE 1 /* AWSTAPE format disk file */ -#define TAPEDEVT_OMATAPE 2 /* OMATAPE format disk files */ -#define TAPEDEVT_SCSITAPE 3 /* Physical SCSI tape */ -#define TAPEDEVT_HET 4 /* HET format disk file */ - -/*-------------------------------------------------------------------*/ -/* Structure definition for tape block headers */ -/*-------------------------------------------------------------------*/ - -/* - * The integer fields in the HET, AWSTAPE and OMATAPE headers are - * encoded in the Intel format (i.e. the bytes of the integer are held - * in reverse order). For this reason the integers are defined as byte - * arrays, and the bytes are fetched individually in order to make - * the code portable across architectures which use either the Intel - * format or the S/370 format. - * - * Block length fields contain the length of the emulated tape block - * and do not include the length of the header. - * - * For the AWSTAPE and HET formats: - * - the first block has a previous block length of zero - * - a tapemark is indicated by a header with a block length of zero - * and a flag byte of X'40' - * - * For the OMATAPE format: - * - the first block has a previous header offset of X'FFFFFFFF' - * - a tapemark is indicated by a header with a block length of - * X'FFFFFFFF' - * - each block is followed by padding bytes if necessary to ensure - * that the next header starts on a 16-byte boundary - * - */ - -typedef struct _AWSTAPE_BLKHDR { - HWORD curblkl; /* Length of this block */ - HWORD prvblkl; /* Length of previous block */ - BYTE flags1; /* Flags byte 1 */ - BYTE flags2; /* Flags byte 2 */ - } AWSTAPE_BLKHDR; - -/* Definitions for AWSTAPE_BLKHDR flags byte 1 */ -#define AWSTAPE_FLAG1_NEWREC 0x80 /* Start of new record */ -#define AWSTAPE_FLAG1_TAPEMARK 0x40 /* Tape mark */ -#define AWSTAPE_FLAG1_ENDREC 0x20 /* End of record */ +#if defined(OPTION_DYNAMIC_LOAD) && defined(WIN32) && !defined(HDL_USE_LIBTOOL) + SYSBLK *psysblk; + #define sysblk (*psysblk) +#endif -typedef struct _OMATAPE_BLKHDR { - FWORD curblkl; /* Length of this block */ - FWORD prvhdro; /* Offset of previous block - header from start of file */ - FWORD omaid; /* OMA identifier (contains - ASCII characters "@HDF") */ - FWORD resv; /* Reserved */ - } OMATAPE_BLKHDR; /*-------------------------------------------------------------------*/ -/* Structure definition for OMA tape descriptor array */ +/* Internal macro definitions */ /*-------------------------------------------------------------------*/ -typedef struct _OMATAPE_DESC { - BYTE filename[256]; /* Filename of data file */ - BYTE format; /* H=HEADERS,T=TEXT,F=FIXED */ - BYTE resv; /* Reserved for alignment */ - U16 blklen; /* Fixed block length */ - } OMATAPE_DESC; - +#define MAX_BLKLEN 65535 /* Maximum I/O buffer size */ +#define TAPE_UNLOADED "*" /* Name for unloaded drive */ /*-------------------------------------------------------------------*/ /* Static data areas */ /*-------------------------------------------------------------------*/ @@ -232,6 +121,13 @@ static PARSER ptab[] = { "method", "%d" }, { "level", "%d" }, { "chunksize", "%d" }, + { "maxsize", "%d" }, + { "maxsizeK", "%d" }, + { "maxsizeM", "%d" }, + { "eotmargin", "%d" }, + { "strictsize", "%d" }, + { "readonly", "%d" }, + { "deonirq", "%d" }, { NULL, NULL }, }; @@ -244,24 +140,277 @@ enum TDPARM_METHOD, TDPARM_LEVEL, TDPARM_CHKSIZE, + TDPARM_MAXSIZE, + TDPARM_MAXSIZEK, + TDPARM_MAXSIZEM, + TDPARM_EOTMARGIN, + TDPARM_STRICTSIZE, + TDPARM_READONLY, + TDPARM_DEONIRQ }; +/*-------------------------------------------------------------------*/ +/* Ivan Warren 20030224 */ +/* Code / Devtype Validity Tables */ +/* SOURCES : GX20-1850-2 (S/370 Reference Summary (3410/3411/3420) */ +/* SOURCES : GX20-0157-1 (370/XA Reference Summary (3420/3422/3430/ */ +/* 3480) */ +/* SOURCES : GA33-1510-0 (S/370 Model 115 FC (for 3410/3411) */ +/* ITEMS MARKED NEED_CHECK Need to be verified */ +/* (especially for a need for a tape to be loaded or not) */ +/*-------------------------------------------------------------------*/ + +/* Forward definitions of functions used in these tables */ + +typedef void TapeDeviceDepSenseFunction (int,DEVBLK *,BYTE *,BYTE); + +static TapeDeviceDepSenseFunction build_sense_3410; +static TapeDeviceDepSenseFunction build_sense_3420; +static TapeDeviceDepSenseFunction build_sense_3480; +static TapeDeviceDepSenseFunction build_sense_Streaming; /* 9347, 9348, 8809 */ +/* +void build_sense_3422(int ERCode,DEVBLK *dev,BYTE *unitstat,BYTE ccwcode); +void build_sense_3430(int ERCode,DEVBLK *dev,BYTE *unitstat,BYTE ccwcode); +*/ +#define build_sense_3422 build_sense_3420 +#define build_sense_3430 build_sense_3420 + +static TapeDeviceDepSenseFunction build_senseX; + +static BYTE TapeCommands3410[256]= + /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ + { 0,1,1,1,2,0,0,5,0,0,0,0,1,0,0,5, /* 00 */ + 0,0,0,4,0,0,0,1,0,0,0,1,0,0,0,1, /* 10 */ + 0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,1, /* 20 */ + 0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,1, /* 30 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */ + 0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */ + 0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0, /* 60 */ + 0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0, /* 70 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 80 */ + 0,0,0,4,0,0,0,1,0,0,0,0,0,0,0,0, /* 90 */ + 0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0, /* A0 */ + 0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0, /* B0 */ + 0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0, /* C0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* D0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* E0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; /* F0 */ + +static BYTE TapeCommands3420[256]= + /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ + { 0,1,1,1,2,0,0,5,0,0,0,2,1,0,0,5, /* 00 */ + 0,0,0,4,0,0,0,1,0,0,0,1,0,0,0,1, /* 10 */ + 0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,1, /* 20 */ + 0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,1, /* 30 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */ + 0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */ + 0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0, /* 60 */ + 0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0, /* 70 */ + 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0, /* 80 */ + 0,0,0,4,0,0,0,1,0,0,0,0,0,0,0,0, /* 90 */ + 0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0, /* A0 */ + 0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0, /* B0 */ + 0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0, /* C0 */ + 0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0, /* D0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* E0 */ + 0,0,0,2,4,0,0,0,0,0,0,0,0,2,0,0}; /* F0 */ + +static BYTE TapeCommands3422[256]= + /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ + { 0,1,1,1,2,0,0,5,0,0,0,2,1,0,0,5, /* 00 */ + 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1, /* 10 */ + 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1, /* 20 */ + 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1, /* 30 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 60 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */ + 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0, /* 80 */ + 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0, /* 90 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* A0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* B0 */ + 0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0, /* C0 */ + 0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0, /* D0 */ + 0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0, /* E0 */ + 0,0,0,2,4,0,0,0,0,0,0,0,0,2,0,0}; /* F0 */ + +static BYTE TapeCommands3430[256]= + /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ + { 0,1,1,1,2,0,0,5,0,0,0,2,1,0,0,5, /* 00 */ + 0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1, /* 10 */ + 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1, /* 20 */ + 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1, /* 30 */ + 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0, /* 40 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 60 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 80 */ + 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0, /* 90 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* A0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* B0 */ + 0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0, /* C0 */ + 0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0, /* D0 */ + 0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0, /* E0 */ + 0,0,0,2,4,0,0,0,0,0,0,0,0,2,0,0}; /* F0 */ + +static BYTE TapeCommands3480[256]= + /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ + { 0,1,1,1,2,0,0,5,0,0,0,2,1,0,0,5, /* 00 */ + 0,0,1,3,2,0,0,1,0,0,0,1,0,0,0,1, /* 10 */ + 0,0,1,3,2,0,0,1,0,0,0,3,0,0,0,1, /* 20 */ + 0,0,0,3,2,0,0,1,0,0,0,3,0,0,0,1, /* 30 */ + 0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1, /* 40 */ + 0,0,0,3,0,0,0,0,0,0,0,3,0,0,0,0, /* 50 */ + 0,0,0,3,2,0,0,0,0,0,0,3,0,0,0,0, /* 60 */ + 0,0,0,3,0,0,0,0,0,0,0,3,0,0,0,0, /* 70 */ + 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0, /* 80 */ + 0,0,0,3,0,0,0,1,0,0,0,0,0,0,0,2, /* 90 */ + 0,0,0,3,0,0,0,0,0,0,0,3,0,0,0,2, /* A0 */ + 0,0,0,3,0,0,0,2,0,0,0,3,0,0,0,0, /* B0 */ + 0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,0, /* C0 */ + 0,0,0,3,0,0,0,0,0,0,0,4,0,0,0,0, /* D0 */ + 0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0, /* E0 */ + 0,0,0,2,4,0,0,0,0,0,0,0,0,2,0,0}; /* F0 */ + +static BYTE TapeCommands9347[256]= + /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ + { 0,1,1,1,2,0,0,5,0,0,0,2,1,0,0,5, /* 00 */ + 0,0,0,4,0,0,0,1,0,0,0,1,0,0,0,1, /* 10 */ + 0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,1, /* 20 */ + 0,0,0,4,0,0,0,1,0,0,0,4,0,0,0,1, /* 30 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */ + 0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */ + 0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0, /* 60 */ + 0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0, /* 70 */ + 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0, /* 80 */ + 0,0,0,4,0,0,0,1,0,0,0,0,0,0,0,0, /* 90 */ + 0,0,0,4,2,0,0,0,0,0,0,4,0,0,0,0, /* A0 */ + 0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0, /* B0 */ + 0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0, /* C0 */ + 0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0, /* D0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* E0 */ + 0,0,0,2,4,0,0,0,0,0,0,0,0,2,0,0}; /* F0 */ + +static TAPEMEDIA_HANDLER tmh_aws; +static TAPEMEDIA_HANDLER tmh_oma; +static TAPEMEDIA_HANDLER tmh_het; +#if !defined(__APPLE__) +static TAPEMEDIA_HANDLER tmh_scsi; +#endif /* !defined(__APPLE__) */ + + +/* Specific device supported CCW codes */ +/* index fetched from TapeDevtypeList[n+1] */ + +static BYTE *TapeCommandTable[]={ + TapeCommands3410, /* 3410/3411 Code table */ + TapeCommands3420, /* 3420 Code Table */ + TapeCommands3422, /* 3422 Code Table */ + TapeCommands3430, /* 3430 Code Table */ + TapeCommands3480, /* 3480 (Maybe all 38K Tapes) Code Table */ + TapeCommands9347, /* 9347 (Maybe all streaming tapes) code table */ + NULL}; + +/* Device type list : */ +/* Format : D/T, Command Table Index in TapeCommandTable, UC on RewUnld, CUE on RewUnld, Sense Build Function Table Index */ +#define TAPEDEVTYPELISTENTRYSIZE 5 /* Number of values per devtype in this table */ +static int TapeDevtypeList[]={0x3410,0,1,0,0, + 0x3411,0,1,0,0, + 0x3420,1,1,1,1, + 0x3422,2,0,0,2, + 0x3430,3,0,0,3, + 0x3480,4,0,0,4, + 0x3490,4,0,0,4, + 0x3590,4,0,0,4, + 0x9347,5,0,0,5, + 0x9348,5,0,0,5, + 0x8809,5,0,0,5, + 0x0000,0,0,0,0}; /* End Marker */ + +static TapeDeviceDepSenseFunction *TapeSenseTable[]={ + build_sense_3410, + build_sense_3420, + build_sense_3422, + build_sense_3430, + build_sense_3480, + build_sense_Streaming, + NULL}; + +/**************************************/ +/* START OF ORIGINAL AWS FUNCTIONS */ +/* ISW Additions */ +/**************************************/ +/*-------------------------------------------------------------------*/ +/* Close an AWSTAPE format file */ +/* New Function added by ISW for consistency with other medias */ +/*-------------------------------------------------------------------*/ +static void close_awstape (DEVBLK *dev) +{ + if(dev->fd>=0) + { + logmsg(_("HHCTA996I %4.4x - AWS Tape %s closed\n"),dev->devnum,dev->filename); + } + close(dev->fd); + strcpy(dev->filename, TAPE_UNLOADED); + dev->fd=-1; + return; +} +/*-------------------------------------------------------------------*/ +/* Rewinds an AWS Tape format file */ +/* New Function added by ISW for consistency with other medias */ +/*-------------------------------------------------------------------*/ +static int rewind_awstape (DEVBLK *dev,BYTE *unitstat,BYTE code) +{ + int rc; + rc=lseek(dev->fd,0,SEEK_SET); + if(rc<0) + { + build_senseX(TAPE_BSENSE_REWINDFAILED,dev,unitstat,code); + return -1; + } + dev->nxtblkpos=0; + dev->prvblkpos=-1; + dev->curfilen=1; + dev->blockid=0; + return 0; +} +/*-------------------------------------------------------------------*/ +/* Determines if a tape has passed a virtual EOT marker */ +/* New Function added by ISW for consistency with other medias */ +/*-------------------------------------------------------------------*/ +static int passedeot_awstape (DEVBLK *dev) +{ + if(dev->nxtblkpos==0) + { + return 0; + } + if(dev->tdparms.maxsize==0) + { + return 0; + } + if(dev->nxtblkpos+dev->tdparms.eotmargin > dev->tdparms.maxsize) + { + return 1; + } + return 0; +} +/**************************************/ +/* START OF ORIGINAL RB AWS FUNCTIONS */ +/**************************************/ /*-------------------------------------------------------------------*/ /* Open an AWSTAPE format file */ /* */ /* If successful, the file descriptor is stored in the device block */ /* and the return value is zero. Otherwise the return value is -1. */ /*-------------------------------------------------------------------*/ -static int open_awstape (DEVBLK *dev, BYTE *unitstat) +static int open_awstape (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ /* Check for no tape in drive */ if (!strcmp (dev->filename, TAPE_UNLOADED)) { - dev->sense[0] = SENSE_IR; - dev->sense[1] = SENSE1_TAPE_TUB; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_TAPEUNLOADED,dev,unitstat,code); return -1; } @@ -282,16 +431,14 @@ int rc; /* Return code */ dev->filename, strerror(errno)); strcpy(dev->filename, TAPE_UNLOADED); - dev->sense[0] = SENSE_IR; - dev->sense[1] = SENSE1_TAPE_TUB; - dev->sense[7] = SENSE7_TAPE_LOADFAIL; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_TAPELOADFAIL,dev,unitstat,code); return -1; } /* Store the file descriptor in the device block */ dev->fd = rc; - return 0; + rc=rewind_awstape(dev,unitstat,code); + return rc; } /* end function open_awstape */ @@ -302,7 +449,7 @@ int rc; /* Return code */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ static int readhdr_awstape (DEVBLK *dev, long blkpos, - AWSTAPE_BLKHDR *buf, BYTE *unitstat) + AWSTAPE_BLKHDR *buf, BYTE *unitstat,BYTE code) { int rc; /* Return code */ @@ -316,8 +463,7 @@ int rc; /* Return code */ blkpos, dev->filename, strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_LOCATEERR,dev,unitstat,code); return -1; } @@ -332,8 +478,7 @@ int rc; /* Return code */ blkpos, dev->filename, strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_READFAIL,dev,unitstat,code); return -1; } @@ -345,23 +490,18 @@ int rc; /* Return code */ blkpos, dev->filename); /* Set unit exception with tape indicate (end of tape) */ - dev->sense[4] = SENSE4_TAPE_EOT; - *unitstat = CSW_CE | CSW_DE | CSW_UX; + build_senseX(TAPE_BSENSE_EMPTYTAPE,dev,unitstat,code); return -1; } /* Handle end of file within block header */ if (rc < (int)sizeof(AWSTAPE_BLKHDR)) { - logmsg (_("HHCTA005E Unexpected end of file in block header " + logmsg (_("HHCTA004E Unexpected end of file in block header " "at offset %8.8lX in file %s\n"), blkpos, dev->filename); - /* Set unit check with data check and partial record */ - dev->sense[0] = SENSE_DC; - dev->sense[1] = SENSE1_TAPE_NOISE; - dev->sense[5] = SENSE5_TAPE_PARTREC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_BLOCKSHORT,dev,unitstat,code); return -1; } @@ -378,7 +518,7 @@ int rc; /* Return code */ /* current file number in the device block is incremented. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int read_awstape (DEVBLK *dev, BYTE *buf, BYTE *unitstat) +static int read_awstape (DEVBLK *dev, BYTE *buf, BYTE *unitstat,BYTE code) { int rc; /* Return code */ AWSTAPE_BLKHDR awshdr; /* AWSTAPE block header */ @@ -389,7 +529,7 @@ U16 blklen; /* Data length of block */ blkpos = dev->nxtblkpos; /* Read the 6-byte block header */ - rc = readhdr_awstape (dev, blkpos, &awshdr, unitstat); + rc = readhdr_awstape (dev, blkpos, &awshdr, unitstat,code); if (rc < 0) return -1; /* Extract the block length from the block header */ @@ -404,7 +544,7 @@ U16 blklen; /* Data length of block */ if (blklen == 0) { dev->curfilen++; - return 0; + return 0; /* UX will be set by caller */ } /* Read data block from tape file */ @@ -413,28 +553,24 @@ U16 blklen; /* Data length of block */ /* Handle read error condition */ if (rc < 0) { - logmsg (_("HHCTA006E Error reading data block " + logmsg (_("HHCTA003E Error reading data block " "at offset %8.8lX in file %s: %s\n"), blkpos, dev->filename, strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_READFAIL,dev,unitstat,code); return -1; } /* Handle end of file within data block */ if (rc < blklen) { - logmsg (_("HHCTA007E Unexpected end of file in data block " + logmsg (_("HHCTA004E Unexpected end of file in data block " "at offset %8.8lX in file %s\n"), blkpos, dev->filename); /* Set unit check with data check and partial record */ - dev->sense[0] = SENSE_DC; - dev->sense[1] = SENSE1_TAPE_NOISE; - dev->sense[5] = SENSE5_TAPE_PARTREC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_BLOCKSHORT,dev,unitstat,code); return -1; } @@ -450,7 +586,7 @@ U16 blklen; /* Data length of block */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ static int write_awstape (DEVBLK *dev, BYTE *buf, U16 blklen, - BYTE *unitstat) + BYTE *unitstat,BYTE code) { int rc; /* Return code */ AWSTAPE_BLKHDR awshdr; /* AWSTAPE block header */ @@ -465,7 +601,7 @@ U16 prvblkl; /* Length of previous block */ if (dev->nxtblkpos > 0) { /* Reread the previous block header */ - rc = readhdr_awstape (dev, dev->prvblkpos, &awshdr, unitstat); + rc = readhdr_awstape (dev, dev->prvblkpos, &awshdr, unitstat,code); if (rc < 0) return -1; /* Extract the block length from the block header */ @@ -481,15 +617,24 @@ U16 prvblkl; /* Length of previous block */ if (rc < 0) { /* Handle seek error condition */ - logmsg (_("HHCTA008E Error seeking to offset %8.8lX " + logmsg (_("HHCTA002E Error seeking to offset %8.8lX " "in file %s: %s\n"), blkpos, dev->filename, strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_LOCATEERR,dev,unitstat,code); return -1; } + /* ISW : Determine if we are passed maxsize */ + if(dev->tdparms.maxsize>0) + { + if(dev->nxtblkpos+blklen+sizeof(awshdr) > dev->tdparms.maxsize) + { + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + return -1; + } + } + /* ISW : End of virtual physical EOT determination */ /* Build the 6-byte block header */ awshdr.curblkl[0] = blklen & 0xFF; @@ -503,14 +648,22 @@ U16 prvblkl; /* Length of previous block */ rc = write (dev->fd, &awshdr, sizeof(awshdr)); if (rc < (int)sizeof(awshdr)) { + if(errno==ENOSPC) + { + /* Disk FULL */ + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + logmsg (_("HHCTA995E Media full condition reached " + "at offset %8.8lX in file %s\n"), + blkpos, dev->filename); + return -1; + } /* Handle write error condition */ logmsg (_("HHCTA009E Error writing block header " "at offset %8.8lX in file %s: %s\n"), blkpos, dev->filename, strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_WRITEFAIL,dev,unitstat,code); return -1; } @@ -522,14 +675,22 @@ U16 prvblkl; /* Length of previous block */ rc = write (dev->fd, buf, blklen); if (rc < blklen) { + if(errno==ENOSPC) + { + /* Disk FULL */ + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + logmsg (_("HHCTA995E Media full condition reached " + "at offset %8.8lX in file %s\n"), + blkpos, dev->filename); + return -1; + } /* Handle write error condition */ logmsg (_("HHCTA010E Error writing data block " "at offset %8.8lX in file %s: %s\n"), blkpos, dev->filename, strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_WRITEFAIL,dev,unitstat,code); return -1; } @@ -544,7 +705,7 @@ U16 prvblkl; /* Length of previous block */ /* If successful, return value is zero. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int write_awsmark (DEVBLK *dev, BYTE *unitstat) +static int write_awsmark (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ AWSTAPE_BLKHDR awshdr; /* AWSTAPE block header */ @@ -559,7 +720,7 @@ U16 prvblkl; /* Length of previous block */ if (dev->nxtblkpos > 0) { /* Reread the previous block header */ - rc = readhdr_awstape (dev, dev->prvblkpos, &awshdr, unitstat); + rc = readhdr_awstape (dev, dev->prvblkpos, &awshdr, unitstat,code); if (rc < 0) return -1; /* Extract the block length from the block header */ @@ -579,11 +740,19 @@ U16 prvblkl; /* Length of previous block */ "in file %s: %s\n"), blkpos, dev->filename, strerror(errno)); - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_LOCATEERR,dev,unitstat,code); return -1; } + /* ISW : Determine if we are passed maxsize */ + if(dev->tdparms.maxsize>0) + { + if(dev->nxtblkpos+sizeof(awshdr) > dev->tdparms.maxsize) + { + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + return -1; + } + } + /* ISW : End of virtual physical EOT determination */ /* Build the 6-byte block header */ awshdr.curblkl[0] = 0; @@ -602,9 +771,7 @@ U16 prvblkl; /* Length of previous block */ "at offset %8.8lX in file %s: %s\n"), blkpos, dev->filename, strerror(errno)); - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_WRITEFAIL,dev,unitstat,code); return -1; } @@ -625,7 +792,7 @@ U16 prvblkl; /* Length of previous block */ /* and the current file number in the device block is incremented. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int fsb_awstape (DEVBLK *dev, BYTE *unitstat) +static int fsb_awstape (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ AWSTAPE_BLKHDR awshdr; /* AWSTAPE block header */ @@ -636,7 +803,7 @@ U16 blklen; /* Data length of block */ blkpos = dev->nxtblkpos; /* Read the 6-byte block header */ - rc = readhdr_awstape (dev, blkpos, &awshdr, unitstat); + rc = readhdr_awstape (dev, blkpos, &awshdr, unitstat,code); if (rc < 0) return -1; /* Extract the block length from the block header */ @@ -666,7 +833,7 @@ U16 blklen; /* Data length of block */ /* and the current file number in the device block is decremented. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int bsb_awstape (DEVBLK *dev, BYTE *unitstat) +static int bsb_awstape (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ AWSTAPE_BLKHDR awshdr; /* AWSTAPE block header */ @@ -677,9 +844,7 @@ long blkpos; /* Offset of block header */ /* Unit check if already at start of tape */ if (dev->nxtblkpos == 0) { - dev->sense[0] = 0; - dev->sense[1] = SENSE1_TAPE_LOADPT; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_LOADPTERR,dev,unitstat,code); return -1; } @@ -687,7 +852,7 @@ long blkpos; /* Offset of block header */ blkpos = dev->prvblkpos; /* Read the 6-byte block header */ - rc = readhdr_awstape (dev, blkpos, &awshdr, unitstat); + rc = readhdr_awstape (dev, blkpos, &awshdr, unitstat,code); if (rc < 0) return -1; /* Extract the block lengths from the block header */ @@ -721,14 +886,14 @@ long blkpos; /* Offset of block header */ /* in the device block is incremented by fsb_awstape. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int fsf_awstape (DEVBLK *dev, BYTE *unitstat) +static int fsf_awstape (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ while (1) { /* Forward space over next block */ - rc = fsb_awstape (dev, unitstat); + rc = fsb_awstape (dev, unitstat,code); if (rc < 0) return -1; /* Exit loop if spaced over a tapemark */ @@ -752,7 +917,7 @@ int rc; /* Return code */ /* in the device block is decremented by bsb_awstape. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int bsf_awstape (DEVBLK *dev, BYTE *unitstat) +static int bsf_awstape (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ @@ -763,7 +928,7 @@ int rc; /* Return code */ break; /* Backspace to previous block position */ - rc = bsb_awstape (dev, unitstat); + rc = bsb_awstape (dev, unitstat,code); if (rc < 0) return -1; /* Exit loop if backspaced over a tapemark */ @@ -776,29 +941,35 @@ int rc; /* Return code */ } /* end function bsf_awstape */ +/************************************/ +/* END OF ORIGINAL RB AWS FUNCTIONS */ +/************************************/ + /*-------------------------------------------------------------------*/ /* Open an HET format file */ /* */ /* If successful, the het control blk is stored in the device block */ /* and the return value is zero. Otherwise the return value is -1. */ /*-------------------------------------------------------------------*/ -static int open_het (DEVBLK *dev, BYTE *unitstat) +static int open_het (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ /* Check for no tape in drive */ if (!strcmp (dev->filename, TAPE_UNLOADED)) { - dev->sense[0] = SENSE_IR; - dev->sense[1] = SENSE1_TAPE_TUB; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_TAPEUNLOADED,dev,unitstat,code); return -1; } /* Open the HET file */ - rc = het_open (&dev->hetb, dev->filename, HETOPEN_CREATE ); + rc = het_open (&dev->hetb, dev->filename, dev->tdparms.logical_readonly ? HETOPEN_READONLY : HETOPEN_CREATE ); if (rc >= 0) { + if(dev->hetb->writeprotect) + { + dev->readonly=1; + } rc = het_cntl (dev->hetb, HETCNTL_SET | HETCNTL_COMPRESS, dev->tdparms.compress); @@ -831,10 +1002,7 @@ int rc; /* Return code */ dev->filename, het_error(rc), strerror(errno)); strcpy(dev->filename, TAPE_UNLOADED); - dev->sense[0] = SENSE_IR; - dev->sense[1] = SENSE1_TAPE_TUB; - dev->sense[7] = SENSE7_TAPE_LOADFAIL; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_TAPELOADFAIL,dev,unitstat,code); return -1; } @@ -858,11 +1026,32 @@ static void close_het (DEVBLK *dev) /* Reinitialize the DEV fields */ dev->fd = -1; + strcpy (dev->filename, TAPE_UNLOADED); return; } /* end function close_het */ +/*-------------------------------------------------------------------*/ +/* Rewind HET format file */ +/* */ +/* The HET file is close and all device block fields reinitialized. */ +/*-------------------------------------------------------------------*/ +static int rewind_het(DEVBLK *dev,BYTE *unitstat,BYTE code) +{ +int rc; + rc = het_rewind (dev->hetb); + if (rc < 0) + { + /* Handle seek error condition */ + logmsg (_("HHCTA075E Error seeking to start of %s: %s(%s)\n"), + dev->filename, het_error(rc), strerror(errno)); + + build_senseX(TAPE_BSENSE_REWINDFAILED,dev,unitstat,code); + return -1; + } + return 0; +} /*-------------------------------------------------------------------*/ /* Read a block from an HET format file */ /* */ @@ -871,7 +1060,7 @@ static void close_het (DEVBLK *dev) /* current file number in the device block is incremented. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int read_het (DEVBLK *dev, BYTE *buf, BYTE *unitstat) +static int read_het (DEVBLK *dev, BYTE *buf, BYTE *unitstat,BYTE code) { int rc; /* Return code */ @@ -893,8 +1082,7 @@ int rc; /* Return code */ dev->hetb->cblk, dev->filename); /* Set unit exception with tape indicate (end of tape) */ - dev->sense[4] = SENSE4_TAPE_EOT; - *unitstat = CSW_CE | CSW_DE | CSW_UX; + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); return -1; } @@ -904,8 +1092,7 @@ int rc; /* Return code */ het_error(rc), strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_READFAIL,dev,unitstat,code); return -1; } @@ -921,10 +1108,21 @@ int rc; /* Return code */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ static int write_het (DEVBLK *dev, BYTE *buf, U16 blklen, - BYTE *unitstat) + BYTE *unitstat,BYTE code) { int rc; /* Return code */ +size_t cursize; /* Current size for size chk */ + /* Check if we have already violated the size limit */ + if(dev->tdparms.maxsize>0) + { + cursize=ftell(dev->hetb->fd); /* WARNING ! Should go in hetlib */ + if(cursize>=dev->tdparms.maxsize) + { + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + return -1; + } + } /* Write the data block */ rc = het_write (dev->hetb, buf, blklen); if (rc < 0) @@ -936,10 +1134,30 @@ int rc; /* Return code */ het_error(rc), strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_WRITEFAIL,dev,unitstat,code); return -1; } + /* Check if we have violated the maxsize limit */ + /* Also check if we are passed EOT marker */ + if(dev->tdparms.maxsize>0) + { + cursize=ftell(dev->hetb->fd); /* WARNING ! Should go in hetlib */ + if(cursize>dev->tdparms.maxsize) + { + logmsg(_("TAPE EOT Handling : max capacity exceeded\n")); + if(dev->tdparms.strictsize) + { + logmsg(_("TAPE EOT Handling : max capacity enforced\n")); + het_bsb(dev->hetb); + cursize=ftell(dev->hetb->fd); /* WARNING ! Should go in hetlib */ + ftruncate( fileno(dev->hetb->fd),cursize); + dev->hetb->truncated=TRUE; /* SHOULD BE IN HETLIB */ + } + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + return -1; + } + } + /* Return normal status */ return 0; @@ -952,7 +1170,7 @@ int rc; /* Return code */ /* If successful, return value is zero. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int write_hetmark (DEVBLK *dev, BYTE *unitstat) +static int write_hetmark (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ @@ -967,8 +1185,7 @@ int rc; /* Return code */ het_error(rc), strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_WRITEFAIL,dev,unitstat,code); return -1; } @@ -985,12 +1202,13 @@ int rc; /* Return code */ /* and the current file number in the device block is incremented. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int fsb_het (DEVBLK *dev, BYTE *unitstat) +static int fsb_het (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ /* Forward space one block */ rc = het_fsb (dev->hetb); + if (rc < 0) { /* Increment file number and return zero if tapemark was read */ @@ -1007,8 +1225,14 @@ int rc; /* Return code */ het_error(rc), strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + if(rc==HETE_EOT) + { + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + } + else + { + build_senseX(TAPE_BSENSE_READFAIL,dev,unitstat,code); + } return -1; } @@ -1027,7 +1251,7 @@ int rc; /* Return code */ /* and the current file number in the device block is decremented. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int bsb_het (DEVBLK *dev, BYTE *unitstat) +static int bsb_het (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ @@ -1046,9 +1270,7 @@ int rc; /* Return code */ /* Unit check if already at start of tape */ if (rc == HETE_BOT) { - dev->sense[0] = 0; - dev->sense[1] = SENSE1_TAPE_LOADPT; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_LOADPTERR,dev,unitstat,code); return -1; } @@ -1058,8 +1280,7 @@ int rc; /* Return code */ het_error(rc), strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_READFAIL,dev,unitstat,code); return -1; } @@ -1077,7 +1298,7 @@ int rc; /* Return code */ /* in the device block is incremented. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int fsf_het (DEVBLK *dev, BYTE *unitstat) +static int fsf_het (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ @@ -1090,9 +1311,14 @@ int rc; /* Return code */ dev->hetb->cblk, dev->filename, het_error(rc), strerror(errno)); - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + if(rc==HETE_EOT) + { + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + } + else + { + build_senseX(TAPE_BSENSE_READFAIL,dev,unitstat,code); + } return -1; } @@ -1104,6 +1330,25 @@ int rc; /* Return code */ return 0; } /* end function fsf_het */ +/*-------------------------------------------------------------------*/ +/* Check HET file is passed the allowed EOT margin */ +/*-------------------------------------------------------------------*/ +static int passedeot_het (DEVBLK *dev) +{ +long cursize; + if(dev->fd>0) + { + if(dev->tdparms.maxsize>0) + { + cursize=ftell(dev->hetb->fd); /* WARNING ! Should go in hetlib */ + if(cursize+dev->tdparms.eotmargin>dev->tdparms.maxsize) + { + return 1; + } + } + } + return 0; +} /*-------------------------------------------------------------------*/ /* Backspace to previous logical file of HET format file */ @@ -1112,7 +1357,7 @@ int rc; /* Return code */ /* in the device block is decremented. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int bsf_het (DEVBLK *dev, BYTE *unitstat) +static int bsf_het (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ @@ -1130,9 +1375,7 @@ int rc; /* Return code */ dev->hetb->cblk, dev->filename, het_error(rc), strerror(errno)); - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_LOCATEERR,dev,unitstat,code); return -1; } @@ -1147,6 +1390,7 @@ int rc; /* Return code */ #if !defined(__APPLE__) /*-------------------------------------------------------------------*/ +/*-------------------------------------------------------------------*/ /* Obtain and display SCSI tape status */ /*-------------------------------------------------------------------*/ static U32 status_scsitape (DEVBLK *dev) @@ -1184,7 +1428,7 @@ BYTE buf[100]; /* Status string (ASCIIZ) */ if (GMT_D_1600(stat)) strcat (buf, " 1600"); if (GMT_D_800(stat)) strcat (buf, " 800"); if (GMT_DR_OPEN(stat)) strcat (buf, " NOTAPE"); - logmsg ("HHCTA023I %s\n", buf); + logmsg (_("HHCTA023I %s\n"), buf); } /* If tape has been ejected, then close the file because @@ -1205,13 +1449,36 @@ BYTE buf[100]; /* Status string (ASCIIZ) */ } /* end function status_scsitape */ +/*-------------------------------------------------------------------*/ +/* Determine if the tape is Ready (Tape drive door status) */ +/*-------------------------------------------------------------------*/ +static int driveready_scsitape(DEVBLK *dev,BYTE *unitstat,BYTE code) +{ + U32 sst; + + UNREFERENCED(unitstat); + UNREFERENCED(code); + + if(dev->fd<0) + { + return(0); + } + sst=status_scsitape(dev); + if(GMT_DR_OPEN(sst)) + { + close(dev->fd); + dev->fd=-1; + return(0); + } + return(1); +} /*-------------------------------------------------------------------*/ /* Open a SCSI tape device */ /* */ /* If successful, the file descriptor is stored in the device block */ /* and the return value is zero. Otherwise the return value is -1. */ /*-------------------------------------------------------------------*/ -static int open_scsitape (DEVBLK *dev, BYTE *unitstat) +static int open_scsitape (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ int i; /* Array subscript */ @@ -1235,10 +1502,7 @@ long density; /* Tape density code */ logmsg (_("HHCTA024E Error opening %s: %s\n"), dev->filename, strerror(errno)); - dev->sense[0] = SENSE_IR; - dev->sense[1] = SENSE1_TAPE_TUB; - dev->sense[7] = SENSE7_TAPE_LOADFAIL; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_ITFERROR,dev,unitstat,code); return -1; } @@ -1252,17 +1516,14 @@ long density; /* Tape density code */ logmsg (_("HHCTA025E Error reading status of %s: %s\n"), dev->filename, strerror(errno)); - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_ITFERROR,dev,unitstat,code); return -1; } /* Intervention required if no tape is mounted */ if (GMT_DR_OPEN(stblk.mt_gstat)) { - dev->sense[0] = SENSE_IR; - dev->sense[1] = SENSE1_TAPE_TUB; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_TAPEUNLOADED,dev,unitstat,code); return -1; } @@ -1299,8 +1560,7 @@ long density; /* Tape density code */ logmsg (_("HHCTA030E Error setting attributes for %s: %s\n"), dev->filename, strerror(errno)); - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_ITFERROR,dev,unitstat,code); return -1; } @@ -1313,8 +1573,7 @@ long density; /* Tape density code */ logmsg (_("HHCTA031E Error rewinding %s: %s\n"), dev->filename, strerror(errno)); - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_ITFERROR,dev,unitstat,code); return -1; } @@ -1330,7 +1589,7 @@ long density; /* Tape density code */ /* current file number in the device block is incremented. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int read_scsitape (DEVBLK *dev, BYTE *buf, BYTE *unitstat) +static int read_scsitape (DEVBLK *dev, BYTE *buf, BYTE *unitstat,BYTE code) { int rc; /* Return code */ @@ -1343,8 +1602,7 @@ int rc; /* Return code */ dev->filename, strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_READFAIL,dev,unitstat,code); return -1; } @@ -1364,9 +1622,10 @@ int rc; /* Return code */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ static int write_scsitape (DEVBLK *dev, BYTE *buf, U16 len, - BYTE *unitstat) + BYTE *unitstat,BYTE code) { int rc; /* Return code */ +U32 stat; /* Write data block to SCSI tape device */ rc = write (dev->fd, buf, len); @@ -1376,9 +1635,26 @@ int rc; /* Return code */ logmsg (_("HHCTA033E Error writing data block to %s: %s\n"), dev->filename, strerror(errno)); - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + switch(errno) + { + case EIO: + stat = status_scsitape (dev); + if(GMT_EOT(stat)) + { + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + } + else + { + build_senseX(TAPE_BSENSE_WRITEFAIL,dev,unitstat,code); + } + break; + case ENOSPC: + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + break; + default: + build_senseX(TAPE_BSENSE_ITFERROR,dev,unitstat,code); + break; + } return -1; } @@ -1393,10 +1669,11 @@ int rc; /* Return code */ /* If successful, return value is zero. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int write_scsimark (DEVBLK *dev, BYTE *unitstat) +static int write_scsimark (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ struct mtop opblk; /* Area for MTIOCTOP ioctl */ +U32 stat; /* Write tape mark to SCSI tape */ opblk.mt_op = MTWEOF; @@ -1409,8 +1686,26 @@ struct mtop opblk; /* Area for MTIOCTOP ioctl */ dev->filename, strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + switch(errno) + { + case EIO: + stat = status_scsitape (dev); + if(GMT_EOT(stat)) + { + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + } + else + { + build_senseX(TAPE_BSENSE_WRITEFAIL,dev,unitstat,code); + } + break; + case ENOSPC: + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + break; + default: + build_senseX(TAPE_BSENSE_ITFERROR,dev,unitstat,code); + break; + } return -1; } @@ -1427,7 +1722,7 @@ struct mtop opblk; /* Area for MTIOCTOP ioctl */ /* and the current file number in the device block is incremented. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int fsb_scsitape (DEVBLK *dev, BYTE *unitstat) +static int fsb_scsitape (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ int fsrerrno; /* Value of errno after MTFSR*/ @@ -1459,8 +1754,26 @@ struct mtop opblk; /* Area for MTIOCTOP ioctl */ dev->filename, strerror(fsrerrno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + switch(errno) + { + case EIO: + stat = status_scsitape (dev); + if(GMT_EOT(stat)) + { + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + } + else + { + build_senseX(TAPE_BSENSE_READFAIL,dev,unitstat,code); + } + break; + case ENOSPC: + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + break; + default: + build_senseX(TAPE_BSENSE_ITFERROR,dev,unitstat,code); + break; + } return -1; } @@ -1479,7 +1792,7 @@ struct mtop opblk; /* Area for MTIOCTOP ioctl */ /* and the current file number in the device block is decremented. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int bsb_scsitape (DEVBLK *dev, BYTE *unitstat) +static int bsb_scsitape (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ int bsrerrno; /* Value of errno after MTBSR*/ @@ -1492,9 +1805,7 @@ struct mtop opblk; /* Area for MTIOCTOP ioctl */ /* Unit check if already at start of tape */ if (GMT_BOT(stat)) { - dev->sense[0] = 0; - dev->sense[1] = SENSE1_TAPE_LOADPT; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_LOADPTERR,dev,unitstat,code); return -1; } @@ -1524,9 +1835,7 @@ struct mtop opblk; /* Area for MTIOCTOP ioctl */ logmsg (_("HHCTA036E Backspace block error on %s: %s\n"), dev->filename, strerror(bsrerrno)); - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_LOCATEERR,dev,unitstat,code); return -1; } @@ -1544,10 +1853,11 @@ struct mtop opblk; /* Area for MTIOCTOP ioctl */ /* number in the device block is incremented. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int fsf_scsitape (DEVBLK *dev, BYTE *unitstat) +static int fsf_scsitape (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ struct mtop opblk; /* Area for MTIOCTOP ioctl */ +U32 stat; /* Forward space file on SCSI tape */ opblk.mt_op = MTFSF; @@ -1559,9 +1869,26 @@ struct mtop opblk; /* Area for MTIOCTOP ioctl */ logmsg (_("HHCTA037E Forward space file error on %s: %s\n"), dev->filename, strerror(errno)); - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + switch(errno) + { + case EIO: + stat = status_scsitape (dev); + if(GMT_EOT(stat)) + { + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + } + else + { + build_senseX(TAPE_BSENSE_READFAIL,dev,unitstat,code); + } + break; + case ENOSPC: + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); + break; + default: + build_senseX(TAPE_BSENSE_ITFERROR,dev,unitstat,code); + break; + } return -1; } @@ -1580,11 +1907,21 @@ struct mtop opblk; /* Area for MTIOCTOP ioctl */ /* number in the device block is decremented. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int bsf_scsitape (DEVBLK *dev, BYTE *unitstat) +static int bsf_scsitape (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ struct mtop opblk; /* Area for MTIOCTOP ioctl */ +U32 stat; + + /* Obtain tape status before backward space */ + stat = status_scsitape (dev); + /* Unit check if already at start of tape */ + if (GMT_BOT(stat)) + { + build_senseX(TAPE_BSENSE_LOADPTERR,dev,unitstat,code); + return -1; + } /* Backspace file on SCSI tape */ opblk.mt_op = MTBSF; opblk.mt_count = 1; @@ -1596,8 +1933,7 @@ struct mtop opblk; /* Area for MTIOCTOP ioctl */ dev->filename, strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_LOCATEERR,dev,unitstat,code); return -1; } @@ -1609,6 +1945,46 @@ struct mtop opblk; /* Area for MTIOCTOP ioctl */ return 0; } /* end function bsf_scsitape */ +/*-------------------------------------------------------------------*/ +/* Rewind an SCSI tape device */ +/*-------------------------------------------------------------------*/ +static int rewind_scsitape(DEVBLK *dev,BYTE *unitstat,BYTE code) +{ +struct mtop opblk; /* Area for MTIOCTOP ioctl */ +int rc; + opblk.mt_op = MTREW; + opblk.mt_count = 1; + rc = ioctl (dev->fd, MTIOCTOP, (char*)&opblk); + if (rc < 0) + { + logmsg (_("HHCTA073E Error rewinding %s: %s\n"), + dev->filename, strerror(errno)); + build_senseX(TAPE_BSENSE_REWINDFAILED,dev,unitstat,code); + return -1; + } /* end if(rc) */ + return 0; +} /* end function rewind_scsitape */ +/*-------------------------------------------------------------------*/ +/* Rewind Unoad an SCSI tape device */ +/*-------------------------------------------------------------------*/ +static void close_scsitape(DEVBLK *dev) +{ +struct mtop opblk; /* Area for MTIOCTOP ioctl */ +int rc; + opblk.mt_op = MTOFFL; + opblk.mt_count = 1; + rc = ioctl (dev->fd, MTIOCTOP, (char*)&opblk); + if (rc < 0) + { + logmsg (_("HHCTA076E Error unloading %s: %s\n"), + dev->filename, strerror(errno)); + close(dev->fd); /* Necessary - MTIO tape cannot be accessed for REW UNLD */ + dev->fd=-1; /* Close anyway */ + } /* end if(rc) */ + close(dev->fd); /* Necessary - MTIO tape cannot be accessed for REW UNLD */ + dev->fd=-1; + return; +} /* end function close_scsitape */ #endif /* !defined(__APPLE__) */ /*-------------------------------------------------------------------*/ @@ -1713,6 +2089,8 @@ BYTE c; /* Work area for sscanf */ { if (tdfbuf[i] == '\n') filecount++; } /* end for(i) */ + /* ISW Add 1 to filecount to add an extra EOT marker */ + filecount++; /* Obtain storage for the tape descriptor array */ tdftab = (OMATAPE_DESC*)malloc (filecount * sizeof(OMATAPE_DESC)); @@ -1725,7 +2103,7 @@ BYTE c; /* Work area for sscanf */ } /* Build the tape descriptor array */ - for (filecount = 1, tdfpos = 0, stmt = 1; ; filecount++) + for (filecount = 0, tdfpos = 0, stmt = 1; ; filecount++) { /* Clear the tape descriptor array entry */ memset (&(tdftab[filecount]), 0, sizeof(OMATAPE_DESC)); @@ -1746,9 +2124,16 @@ BYTE c; /* Work area for sscanf */ tdfbuf[tdfpos] = '\0'; /* Exit if TM or EOT record */ - if (strcasecmp(tdfrec, "TM") == 0 - || strcasecmp(tdfrec, "EOT") == 0) - break; + if (strcasecmp(tdfrec, "TM") == 0) + { + tdftab[filecount].format='X'; + continue; + } + if(strcasecmp(tdfrec, "EOT") == 0) + { + tdftab[filecount].format='E'; + break; + } /* Parse the TDF record */ tdffilenm = strtok (tdfrec, " \t"); @@ -1859,9 +2244,10 @@ BYTE c; /* Work area for sscanf */ } tdfbuf[tdfpos] = c; } /* end for(filecount) */ + tdftab[filecount].format='E'; /* Force an EOT as last entry (filecount is correctly adjusted here) */ /* Save the file count and TDF array pointer in the device block */ - dev->omafiles = filecount; + dev->omafiles = filecount+1; dev->omadesc = tdftab; /* Release the TDF file buffer and exit */ @@ -1877,7 +2263,7 @@ BYTE c; /* Work area for sscanf */ /* If successful, the file descriptor is stored in the device block */ /* and the return value is zero. Otherwise the return value is -1. */ /*-------------------------------------------------------------------*/ -static int open_omatape (DEVBLK *dev, BYTE *unitstat) +static int open_omatape (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ OMATAPE_DESC *omadesc; /* -> OMA descriptor entry */ @@ -1888,27 +2274,44 @@ OMATAPE_DESC *omadesc; /* -> OMA descriptor entry */ rc = read_omadesc (dev); if (rc < 0) { - dev->sense[0] = SENSE_IR; - dev->sense[1] = SENSE1_TAPE_TUB; - dev->sense[7] = SENSE7_TAPE_LOADFAIL; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_TAPELOADFAIL,dev,unitstat,code); return -1; } } /* Unit exception if beyond end of tape */ + /* ISW : CHANGED PROCESSING - RETURN UNDEFINITE Tape Marks */ + /* NOTE : The last entry in the TDF table is ALWAYS */ + /* an EOT Condition */ + /* This is ensured by the TDF reading routine */ +#if 0 if (dev->curfilen >= dev->omafiles) { logmsg (_("HHCTA050E Attempt to access beyond end of tape %s\n"), dev->filename); - *unitstat = CSW_CE | CSW_DE | CSW_UX; + build_senseX(TAPE_BSENSE_ENDOFTAPE,dev,unitstat,code); return -1; } +#else + if(dev->curfilen>dev->omafiles) + { + dev->curfilen=dev->omafiles; + return(0); + } +#endif /* Point to the current file entry in the OMA descriptor table */ omadesc = (OMATAPE_DESC*)(dev->omadesc); - omadesc += dev->curfilen; + omadesc += (dev->curfilen-1); + if(omadesc->format=='X') + { + return 0; + } + if(omadesc->format=='E') + { + return 0; + } /* Open the OMATAPE file */ rc = open (omadesc->filename, O_RDONLY | O_BINARY); @@ -1919,8 +2322,7 @@ OMATAPE_DESC *omadesc; /* -> OMA descriptor entry */ logmsg (_("HHCTA051E Error opening %s: %s\n"), omadesc->filename, strerror(errno)); - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_TAPELOADFAIL,dev,unitstat,code); return -1; } @@ -1942,7 +2344,7 @@ OMATAPE_DESC *omadesc; /* -> OMA descriptor entry */ /*-------------------------------------------------------------------*/ static int readhdr_omaheaders (DEVBLK *dev, OMATAPE_DESC *omadesc, long blkpos, S32 *pcurblkl, S32 *pprvhdro, - S32 *pnxthdro, BYTE *unitstat) + S32 *pnxthdro, BYTE *unitstat,BYTE code) { int rc; /* Return code */ int padding; /* Number of padding bytes */ @@ -1961,8 +2363,7 @@ S32 nxthdro; /* Offset of next header */ blkpos, omadesc->filename, strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_LOCATEERR,dev,unitstat,code); return -1; } @@ -1978,8 +2379,7 @@ S32 nxthdro; /* Offset of next header */ strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_READFAIL,dev,unitstat,code); return -1; } @@ -1991,10 +2391,7 @@ S32 nxthdro; /* Offset of next header */ blkpos, omadesc->filename); /* Set unit check with data check and partial record */ - dev->sense[0] = SENSE_DC; - dev->sense[1] = SENSE1_TAPE_NOISE; - dev->sense[5] = SENSE5_TAPE_PARTREC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_BLOCKSHORT,dev,unitstat,code); return -1; } @@ -2016,9 +2413,7 @@ S32 nxthdro; /* Offset of next header */ "at offset %8.8lX in file %s\n"), blkpos, omadesc->filename); - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_READFAIL,dev,unitstat,code); return -1; } @@ -2046,7 +2441,7 @@ S32 nxthdro; /* Offset of next header */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ static int read_omaheaders (DEVBLK *dev, OMATAPE_DESC *omadesc, - BYTE *buf, BYTE *unitstat) + BYTE *buf, BYTE *unitstat,BYTE code) { int rc; /* Return code */ long blkpos; /* Offset to block header */ @@ -2057,7 +2452,7 @@ S32 nxthdro; /* Offset of next header */ /* Read the 16-byte block header */ blkpos = dev->nxtblkpos; rc = readhdr_omaheaders (dev, omadesc, blkpos, &curblkl, - &prvhdro, &nxthdro, unitstat); + &prvhdro, &nxthdro, unitstat,code); if (rc < 0) return -1; /* Update the offsets of the next and previous blocks */ @@ -2087,8 +2482,7 @@ S32 nxthdro; /* Offset of next header */ strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_READFAIL,dev,unitstat,code); return -1; } @@ -2100,10 +2494,7 @@ S32 nxthdro; /* Offset of next header */ blkpos, omadesc->filename); /* Set unit check with data check and partial record */ - dev->sense[0] = SENSE_DC; - dev->sense[1] = SENSE1_TAPE_NOISE; - dev->sense[5] = SENSE5_TAPE_PARTREC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_BLOCKSHORT,dev,unitstat,code); return -1; } @@ -2122,7 +2513,7 @@ S32 nxthdro; /* Offset of next header */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ static int read_omafixed (DEVBLK *dev, OMATAPE_DESC *omadesc, - BYTE *buf, BYTE *unitstat) + BYTE *buf, BYTE *unitstat,BYTE code) { int rc; /* Return code */ int blklen; /* Block length */ @@ -2141,8 +2532,7 @@ long blkpos; /* Offset of block in file */ blkpos, omadesc->filename, strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_LOCATEERR,dev,unitstat,code); return -1; } @@ -2157,9 +2547,7 @@ long blkpos; /* Offset of block in file */ blkpos, omadesc->filename, strerror(errno)); - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_READFAIL,dev,unitstat,code); return -1; } @@ -2196,7 +2584,7 @@ long blkpos; /* Offset of block in file */ /* operation, or is NULL for a forward space block operation. */ /*-------------------------------------------------------------------*/ static int read_omatext (DEVBLK *dev, OMATAPE_DESC *omadesc, - BYTE *buf, BYTE *unitstat) + BYTE *buf, BYTE *unitstat,BYTE code) { int rc; /* Return code */ int num; /* Number of characters read */ @@ -2217,8 +2605,7 @@ BYTE c; /* Character work area */ blkpos, omadesc->filename, strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_LOCATEERR,dev,unitstat,code); return -1; } @@ -2275,9 +2662,7 @@ BYTE c; /* Character work area */ blkpos, omadesc->filename, strerror(errno)); - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_READFAIL,dev,unitstat,code); return -1; } @@ -2289,10 +2674,7 @@ BYTE c; /* Character work area */ blkpos, omadesc->filename); /* Set unit check with data check and partial record */ - dev->sense[0] = SENSE_DC; - dev->sense[1] = SENSE1_TAPE_NOISE; - dev->sense[5] = SENSE5_TAPE_PARTREC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_BLOCKSHORT,dev,unitstat,code); return -1; } @@ -2304,8 +2686,7 @@ BYTE c; /* Character work area */ blkpos, omadesc->filename); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_BLOCKSHORT,dev,unitstat,code); return -1; } @@ -2318,6 +2699,49 @@ BYTE c; /* Character work area */ } /* end function read_omatext */ +/*-------------------------------------------------------------------*/ +/* Read a block from an OMA - Selection of format done here */ +/* */ +/* If successful, return value is block length read. */ +/* If a tapemark was read, the file is closed, the current file */ +/* number in the device block is incremented so that the next file */ +/* will be opened by the next CCW, and the return value is zero. */ +/* If error, return value is -1 and unitstat is set to CE+DE+UC */ +/* */ +/* The buf parameter points to the I/O buffer during a read */ +/* operation, or is NULL for a forward space block operation. */ +/*-------------------------------------------------------------------*/ +static int read_omatape (DEVBLK *dev, + BYTE *buf, BYTE *unitstat,BYTE code) +{ +int len; +OMATAPE_DESC *omadesc; + omadesc = (OMATAPE_DESC*)(dev->omadesc); + omadesc += (dev->curfilen-1); + + switch (omadesc->format) + { + default: + case 'H': + len = read_omaheaders (dev, omadesc, buf, unitstat,code); + break; + case 'F': + len = read_omafixed (dev, omadesc, buf, unitstat,code); + break; + case 'T': + len = read_omatext (dev, omadesc, buf, unitstat,code); + break; + case 'X': + len=0; + dev->curfilen++; + break; + case 'E': + len=0; + break; + } /* end switch(omadesc->format) */ + return len; +} + /*-------------------------------------------------------------------*/ /* Forward space to next file of OMA tape device */ /* */ @@ -2327,9 +2751,10 @@ BYTE c; /* Character work area */ /* next file will be opened when the next CCW is processed. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int fsf_omatape (DEVBLK *dev, BYTE *unitstat) +static int fsf_omatape (DEVBLK *dev, BYTE *unitstat,BYTE code) { UNREFERENCED(unitstat); + UNREFERENCED(code); /* Close the current OMA file */ close (dev->fd); @@ -2356,7 +2781,7 @@ static int fsf_omatape (DEVBLK *dev, BYTE *unitstat) /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ static int fsb_omaheaders (DEVBLK *dev, OMATAPE_DESC *omadesc, - BYTE *unitstat) + BYTE *unitstat,BYTE code) { int rc; /* Return code */ long blkpos; /* Offset of block header */ @@ -2369,7 +2794,7 @@ S32 nxthdro; /* Offset of next header */ /* Read the 16-byte block header */ rc = readhdr_omaheaders (dev, omadesc, blkpos, &curblkl, - &prvhdro, &nxthdro, unitstat); + &prvhdro, &nxthdro, unitstat,code); if (rc < 0) return -1; /* Check if tapemark was skipped */ @@ -2408,7 +2833,7 @@ S32 nxthdro; /* Offset of next header */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ static int fsb_omafixed (DEVBLK *dev, OMATAPE_DESC *omadesc, - BYTE *unitstat) + BYTE *unitstat,BYTE code) { long eofpos; /* Offset of end of file */ long blkpos; /* Offset of current block */ @@ -2426,8 +2851,7 @@ S32 curblkl; /* Length of current block */ omadesc->filename, strerror(errno)); /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_LOCATEERR,dev,unitstat,code); return -1; } @@ -2468,27 +2892,27 @@ S32 curblkl; /* Length of current block */ /* If forward spaced over end of file, return value is 0. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int fsb_omatape (DEVBLK *dev, BYTE *unitstat) +static int fsb_omatape (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ OMATAPE_DESC *omadesc; /* -> OMA descriptor entry */ /* Point to the current file entry in the OMA descriptor table */ omadesc = (OMATAPE_DESC*)(dev->omadesc); - omadesc += dev->curfilen; + omadesc += (dev->curfilen-1); /* Forward space block depending on OMA file type */ switch (omadesc->format) { default: case 'H': - rc = fsb_omaheaders (dev, omadesc, unitstat); + rc = fsb_omaheaders (dev, omadesc, unitstat,code); break; case 'F': - rc = fsb_omafixed (dev, omadesc, unitstat); + rc = fsb_omafixed (dev, omadesc, unitstat,code); break; case 'T': - rc = read_omatext (dev, omadesc, NULL, unitstat); + rc = read_omatext (dev, omadesc, NULL, unitstat,code); break; } /* end switch(omadesc->format) */ @@ -2508,7 +2932,7 @@ OMATAPE_DESC *omadesc; /* -> OMA descriptor entry */ /* repositioned to just before the tape mark at the end of the file. */ /* If error, return value is -1 and unitstat is set to CE+DE+UC */ /*-------------------------------------------------------------------*/ -static int bsf_omatape (DEVBLK *dev, BYTE *unitstat) +static int bsf_omatape (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ long pos; /* File position */ @@ -2532,10 +2956,10 @@ S32 nxthdro; /* Offset of next header */ /* Point to the current file entry in the OMA descriptor table */ omadesc = (OMATAPE_DESC*)(dev->omadesc); - omadesc += dev->curfilen; + omadesc += (dev->curfilen-1); /* Open the new current file */ - rc = open_omatape (dev, unitstat); + rc = open_omatape (dev, unitstat,code); if (rc < 0) return rc; /* Reposition before tapemark header at end of file, or @@ -2550,6 +2974,7 @@ S32 nxthdro; /* Offset of next header */ omadesc->filename, strerror(errno)); /* Set unit check with equipment check */ + build_senseX(TAPE_BSENSE_LOCATEERR,dev,unitstat,code); dev->sense[0] = SENSE_EC; *unitstat = CSW_CE | CSW_DE | CSW_UC; return -1; @@ -2564,7 +2989,7 @@ S32 nxthdro; /* Offset of next header */ /* For OMA headers files, read the tapemark header and extract the previous block offset */ rc = readhdr_omaheaders (dev, omadesc, pos, &curblkl, - &prvhdro, &nxthdro, unitstat); + &prvhdro, &nxthdro, unitstat,code); if (rc < 0) return -1; dev->prvblkpos = prvhdro; break; @@ -2599,7 +3024,7 @@ S32 nxthdro; /* Offset of next header */ /* attempt to issue more than one consecutive backspace block on */ /* an ASCII text file will fail with unit check status. */ /*-------------------------------------------------------------------*/ -static int bsb_omatape (DEVBLK *dev, BYTE *unitstat) +static int bsb_omatape (DEVBLK *dev, BYTE *unitstat,BYTE code) { int rc; /* Return code */ OMATAPE_DESC *omadesc; /* -> OMA descriptor entry */ @@ -2610,7 +3035,7 @@ S32 nxthdro; /* Offset of next header */ /* Point to the current file entry in the OMA descriptor table */ omadesc = (OMATAPE_DESC*)(dev->omadesc); - omadesc += dev->curfilen; + omadesc += (dev->curfilen-1); /* Backspace file if current position is at start of file */ if (dev->nxtblkpos == 0) @@ -2618,14 +3043,12 @@ S32 nxthdro; /* Offset of next header */ /* Unit check if already at start of tape */ if (dev->curfilen <= 1) { - dev->sense[0] = 0; - dev->sense[1] = SENSE1_TAPE_LOADPT; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_LOADPTERR,dev,unitstat,code); return -1; } /* Perform backspace file operation */ - rc = bsf_omatape (dev, unitstat); + rc = bsf_omatape (dev, unitstat,code); if (rc < 0) return -1; dev->blockid--; @@ -2637,8 +3060,7 @@ S32 nxthdro; /* Offset of next header */ /* Unit check if previous block position is unknown */ if (dev->prvblkpos < 0) { - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_LOADPTERR,dev,unitstat,code); return -1; } @@ -2652,7 +3074,7 @@ S32 nxthdro; /* Offset of next header */ /* For OMA headers files, read the previous block header to extract the block length and new previous block offset */ rc = readhdr_omaheaders (dev, omadesc, blkpos, &curblkl, - &prvhdro, &nxthdro, unitstat); + &prvhdro, &nxthdro, unitstat,code); if (rc < 0) return -1; break; case 'F': @@ -2680,6 +3102,131 @@ S32 nxthdro; /* Offset of next header */ } /* end function bsb_omatape */ + +/*-------------------------------------------------------------------*/ +/* Close an OMA tape file set */ +/* */ +/* All errors are ignored */ +/*-------------------------------------------------------------------*/ +static void close_omatape2(DEVBLK *dev) +{ + close (dev->fd); + dev->fd=-1; + if (dev->omadesc != NULL) + { + free (dev->omadesc); + dev->omadesc = NULL; + } + + /* Reset the device dependent fields */ + dev->nxtblkpos=0; + dev->prvblkpos=-1; + dev->curfilen=1; + dev->blockid=0; + dev->omafiles = 0; + return; +} +/*-------------------------------------------------------------------*/ +/* Close an OMA tape file set */ +/* */ +/* All errors are ignored */ +/* Change the filename to '*' - unloaded */ +/* TAPE REALLY UNLOADED */ +/*-------------------------------------------------------------------*/ +static void close_omatape(DEVBLK *dev) +{ + close_omatape2(dev); + strcpy(dev->filename,TAPE_UNLOADED); + return; +} +/*-------------------------------------------------------------------*/ +/* Rewind an OMA tape file set */ +/* */ +/* All errors are ignored */ +/*-------------------------------------------------------------------*/ +static int rewind_omatape(DEVBLK *dev,BYTE *unitstat,BYTE code) +{ + UNREFERENCED(unitstat); + UNREFERENCED(code); + close_omatape2(dev); + return 0; +} +/*-------------------------------------------------------------------*/ +/* Get 3480/3490/3590 Display text in 'human' form */ +/*-------------------------------------------------------------------*/ +static char *GetDisplayText(DEVBLK *dev) +{ + static BYTE msgbfr[256]; + if(!dev->tdparms.displayfeat) + { + return("** Has no display **"); + } + msgbfr[0]=0; + if(dev->tapedisptype==TAPEDISPLAY_IDLE) + { + if(strcmp(dev->filename,TAPE_UNLOADED)==0) + { + return(" "); + } + if(dev->fd>=0 && !dev->tmh->tapeloaded(dev,NULL,0)) + { + return(" NT RDY "); + } + strcpy(msgbfr," READY "); + strcat(msgbfr,dev->readonly ? "*FP*" : ""); + return(msgbfr); + } + if(dev->tapedispflags & TAPEDISPFLG_ALTERNATE) + { + strcpy(msgbfr,dev->tapemsg1); + strcat(msgbfr,"/"); + strcat(msgbfr,dev->tapemsg2); + } + strcpy(msgbfr,((dev->tapedispflags & TAPEDISPFLG_MSG2) ? dev->tapemsg2 : dev->tapemsg1)); + strcat(msgbfr,((dev->tapedispflags & TAPEDISPFLG_BLINKING) ? " Blinking" : "")); + strcat(msgbfr,((dev->tapedispflags & TAPEDISPFLG_AUTOLOAD) ? " Autoloader" : "")); + return(msgbfr); +} +/*-------------------------------------------------------------------*/ +/* Issue Automatic Mount Requests as defined by the display */ +/*-------------------------------------------------------------------*/ +static void ReqAutoMount(DEVBLK *dev) +{ + char vol[8]; + if(dev->als) + { + /* Disabled when ACL in use */ + return; + } + if(dev->tapedispflags & TAPEDISPFLG_REQMOUNT) + { + if(dev->tapemsg1[0]=='M') + { + if(dev->tapedispflags & TAPEDISPFLG_AUTOLOAD) + { + /* Request for SCRATCH tape */ + logmsg("AUTOMOUNT : Scratch tape needed\n"); + } + else + { + memset(vol,0,sizeof(vol)); + memcpy(vol,&dev->tapemsg1[1],6); + logmsg("AUTOMOUNT : tape Volume %s requested\n",vol); + } + } + dev->tapedispflags &= ~TAPEDISPFLG_REQMOUNT; + } +} +/*-------------------------------------------------------------------*/ +/* Issue a message on the console indicating the display status */ +/*-------------------------------------------------------------------*/ +static void ShowDisplayMessage(DEVBLK *dev) +{ + if(dev->tdparms.displayfeat) + { + logmsg(_("HHCTA100I %4.4X: Now Displays : %s\n"),dev->devnum,GetDisplayText(dev)); + } +} /*-------------------------------------------------------------------*/ /* Issue mount message as result of load display channel command */ /*-------------------------------------------------------------------*/ @@ -2692,103 +3239,528 @@ BYTE fcb; /* Format Control Byte */ /* Pick up format control byte */ fcb = *buf++; - /* Check to see if this is a 'nomessage' message */ - if ((fcb & FCB_FS) != FCB_FS_NODISP) + /* Copy and translate messages */ + memset(msg1,0,9); + memset(msg2,0,9); + for (i = 0; i < 8 && *buf!=0; i++) + msg1[i] = guest_to_host(*buf++); + msg1[8] = '\0'; + for (i = 0; i < 8 && *buf!=0; i++) + msg2[i] = guest_to_host(*buf++); + msg2[8] = '\0'; + switch(fcb & FCB_FS) { - /* Copy and translate messages */ - for (i = 0; i < 8; i++) - msg1[i] = guest_to_host(*buf++); - msg1[8] = '\0'; - for (i = 0; i < 8; i++) - msg2[i] = guest_to_host(*buf++); - msg2[8] = '\0'; - - /* If not both messages are to be shown - then zeroize appropriate message */ - if (!(fcb & FCB_AM)) - { - if (fcb & FCB_DM) - msg1[0] = '\0'; + case FCB_FS_NODISP: + default: + return; + case FCB_FS_READYGO: + dev->tapedispflags=0; + strcpy(dev->tapemsg1,msg1); + strcpy(dev->tapemsg2,msg2); + dev->tapedisptype=TAPEDISPLAY_WAITACT; + break; + case FCB_FS_MOUNT: + dev->tapedispflags=0; + logmsg(_("HHCTA099I %4.4X:Tape Mount Request - (%s)\n"),dev->devnum,msg1); + /* Only load message in display if no tape loaded */ + if(strcmp(dev->filename,TAPE_UNLOADED)==0 || !dev->tmh->tapeloaded(dev,NULL,0)) + { + strcpy(dev->tapemsg1,msg1); + dev->tapemsg2[0]=0; + dev->tapedisptype=TAPEDISPLAY_MOUNT; + dev->tapedispflags=TAPEDISPFLG_REQMOUNT; + } + break; + case FCB_FS_UNMOUNT: + dev->tapedispflags=0; + logmsg(_("HHCTA099I %4.4X:Tape Presence - (%s)\n"),dev->devnum,msg1); + /* Only load message in display if tape loaded */ + if(strcmp(dev->filename,TAPE_UNLOADED)!=0 && dev->tmh->tapeloaded(dev,NULL,0)) + { + strcpy(dev->tapemsg1,msg1); + dev->tapemsg2[0]=0; + dev->tapedisptype=TAPEDISPLAY_UNMOUNT; + } + break; + case FCB_FS_UMOUNTMOUNT: + dev->tapedispflags=0; + logmsg(_("HHCTA099I %4.4X:Tape unmount/mount Request - (%s -> %s)\n"),dev->devnum,msg1,msg2); + /* Only load message1 in display if tape loaded */ + if(strcmp(dev->filename,TAPE_UNLOADED)!=0 && dev->tmh->tapeloaded(dev,NULL,0)) + { + strcpy(dev->tapemsg1,msg1); + strcpy(dev->tapemsg2,msg2); + dev->tapedisptype=TAPEDISPLAY_UMOUNTMOUNT; + } else - msg2[0] = '\0'; - } - - /* Display message on console */ - logmsg (_("HHCTA066I Tape msg %4.4X: %c %s %s\n"), - dev->devnum, - (fcb & FCB_BM) ? '*' : ' ', /* Indicate blinking */ - msg1, - msg2); - - } /* end if(FCB_FS_NODISP) */ - + { + strcpy(dev->tapemsg1,msg2); + dev->tapedisptype=TAPEDISPLAY_MOUNT; + dev->tapedispflags=TAPEDISPFLG_REQMOUNT; + } + break; + } + /* Set the flags */ + dev->tapedispflags|=(((fcb & FCB_AM) ? TAPEDISPFLG_ALTERNATE : 0) | + ((fcb & FCB_BM) ? TAPEDISPFLG_BLINKING : 0 ) | + ((fcb & FCB_DM) ? TAPEDISPFLG_MSG2 : 0 ) | + ((fcb & FCB_AL) ? TAPEDISPFLG_AUTOLOAD : 0 )); + ShowDisplayMessage(dev); + ReqAutoMount(dev); } /* end function issue_mount_message */ +/* ISW : START Of New SENSE handling */ -/*-------------------------------------------------------------------*/ -/* Construct sense bytes */ -/*-------------------------------------------------------------------*/ -static void build_sense (DEVBLK *dev) +/* ISW : Extracted from original build_sense routine */ +int IsAtLoadPoint(DEVBLK *dev) { -U32 stat; /* SCSI tape status bits */ - - /* Indicate intervention required if no file */ - if (!strcmp (dev->filename, TAPE_UNLOADED)) - dev->sense[0] |= SENSE_IR; - +U32 stat; +int ldpt=0; if (!(dev->fd < 0)) { /* Set load point indicator if tape is at load point */ - dev->sense[1] &= ~SENSE1_TAPE_LOADPT; switch (dev->tapedevt) { default: case TAPEDEVT_AWSTAPE: - if (dev->nxtblkpos == 0) - dev->sense[1] |= SENSE1_TAPE_LOADPT; + if (dev->nxtblkpos==0) + { + ldpt=1; + } break; case TAPEDEVT_HET: if (dev->hetb->cblk == 0) - dev->sense[1] |= SENSE1_TAPE_LOADPT; + { + ldpt=1; + } break; -# if !defined(__APPLE__) +# if !defined(__APPLE__) case TAPEDEVT_SCSITAPE: stat = status_scsitape (dev); - if (GMT_BOT(stat)) dev->sense[1] |= SENSE1_TAPE_LOADPT; + if (GMT_BOT(stat)) + { + ldpt=1; + } break; -# endif /* !defined(__APPLE__) */ +# endif /* !defined(__APPLE__) */ case TAPEDEVT_OMATAPE: if (dev->nxtblkpos == 0 && dev->curfilen == 1) - dev->sense[1] |= SENSE1_TAPE_LOADPT; + { + ldpt=1; + } break; } /* end switch(dev->tapedevt) */ } /* !(fd < 0) */ - - /* Indicate Drive online to control unit */ - dev->sense[1] |= SENSE1_TAPE_TUA; - - /* Set file protect indicator if read-only file */ - if (dev->readonly) - dev->sense[1] |= SENSE1_TAPE_FP; - else - dev->sense[1] &= ~SENSE1_TAPE_FP; - - /* Set Error Recovery Action Code */ - if (dev->sense[0] & SENSE_IR) - dev->sense[3] = 0x43; - else if (dev->sense[0] & SENSE_CR) - dev->sense[3] = 0x27; - else if (dev->sense[1] & SENSE1_TAPE_FP) - dev->sense[3] = 0x30; else - dev->sense[3] = 0x29; - - /* Set sense bytes for 3420 */ - if (dev->devtype != 0x3480) { -// dev->sense[4] |= 0x20; + if(strcmp(dev->filename,TAPE_UNLOADED)!=0) + { + /* If the tape has a filename but the tape is not yet */ + /* opened, then we are at loadpoint */ + /* WNG : SCSI tapes should follow a different */ + /* procedure. The tape MAY not be at load point */ + /* but we have no way to tell unless we open */ + /* /dev/nstX device */ + ldpt=1; + } + } + return ldpt; +} +static void build_sense_3480(int ERCode,DEVBLK *dev,BYTE *unitstat,BYTE ccwcode) +{ +int sns4mat; + UNREFERENCED(ccwcode); + sns4mat=0x20; + switch(ERCode) + { + case TAPE_BSENSE_TAPEUNLOADED: + switch(ccwcode) + { + case 0x01: + case 0x02: + case 0x0C: + *unitstat=CSW_CE | CSW_UC; + break; + case 0x03: + *unitstat=CSW_UC; + break; + case 0x0f: + *unitstat=CSW_CE | CSW_UC | CSW_DE | CSW_CUE; + break; + default: + *unitstat=CSW_CE | CSW_UC | CSW_DE; + break; + } + dev->sense[0]=SENSE_IR; + dev->sense[3]=0x43; /* ERA 43 = Int Req */ + break; + case TAPE_BSENSE_TAPEUNLOADED2: /* Not an error */ + *unitstat=CSW_CE|CSW_DE; + dev->sense[0]=SENSE_IR; + dev->sense[3]=0x2B; + sns4mat=0x21; + break; + case TAPE_BSENSE_TAPELOADFAIL: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_IR|0x02; + dev->sense[3]=0x33; /* ERA 33 = Load Failed */ + break; + case TAPE_BSENSE_READFAIL: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_DC; + dev->sense[3]=0x23; + break; + case TAPE_BSENSE_WRITEFAIL: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_DC; + dev->sense[3]=0x25; + break; + case TAPE_BSENSE_BADCOMMAND: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_CR; + dev->sense[3]=0x27; + break; + case TAPE_BSENSE_INCOMPAT: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_CR; + dev->sense[3]=0x29; + break; + case TAPE_BSENSE_WRITEPROTECT: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_CR; + dev->sense[3]=0x30; + break; + case TAPE_BSENSE_EMPTYTAPE: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_DC; + dev->sense[3]=0x31; + break; + case TAPE_BSENSE_ENDOFTAPE: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_EC; + dev->sense[3]=0x38; + break; + case TAPE_BSENSE_LOADPTERR: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=0; + dev->sense[3]=0x39; + break; + case TAPE_BSENSE_FENCED: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_EC|0x02; /* Deffered UC */ + dev->sense[3]=0x47; + break; + case TAPE_BSENSE_BADALGORITHM: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_EC; + if(dev->devtype==0x3490) + { + dev->sense[3]=0x5E; + } + else + { + dev->sense[3]=0x47; + } + break; + case TAPE_BSENSE_LOCATEERR: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_EC; + dev->sense[3]=0x44; + break; + case TAPE_BSENSE_BLOCKSHORT: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_EC; + dev->sense[3]=0x36; + break; + case TAPE_BSENSE_ITFERROR: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_EC; + dev->sense[3]=0x22; + break; + case TAPE_BSENSE_REWINDFAILED: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_EC; + dev->sense[3]=0x2C; /* Generic Equipment Malfunction ERP code */ + break; + case TAPE_BSENSE_READTM: + *unitstat=CSW_CE|CSW_DE|CSW_UX; + break; + case TAPE_BSENSE_UNSOLICITED: + *unitstat=CSW_CE|CSW_DE; + dev->sense[3]=0x00; + break; + case TAPE_BSENSE_STATUSONLY: + default: + *unitstat=CSW_CE|CSW_DE; + break; + } + /* Fill in the common information */ + switch(sns4mat) + { + default: + case 0x20: + case 0x21: + dev->sense[7]=sns4mat; + memset(&dev->sense[8],0,31-8); + break; + } + if(strcmp(dev->filename,TAPE_UNLOADED)==0 || (dev->fd>0 && !dev->tmh->tapeloaded(dev,NULL,0))) + { + dev->sense[0]|=SENSE_IR; + dev->sense[1]|=SENSE1_TAPE_FP; + } + else + { + dev->sense[0]&=~SENSE_IR; + dev->sense[1]|=IsAtLoadPoint(dev)?SENSE1_TAPE_LOADPT:0; + dev->sense[1]|=dev->readonly?SENSE1_TAPE_FP:0; /* FP bit set when tape not ready too */ + } + dev->sense[1]|=SENSE1_TAPE_TUA; + +} +/* Build a sense code for streaming tapes */ +static void build_sense_Streaming(int ERCode,DEVBLK *dev,BYTE *unitstat,BYTE ccwcode) +{ + memset(dev->sense,0,sizeof(dev->sense)); + switch(ERCode) + { + case TAPE_BSENSE_TAPEUNLOADED: + switch(ccwcode) + { + case 0x01: + case 0x02: + case 0x0C: + *unitstat=CSW_CE | CSW_UC | (dev->tdparms.deonirq?CSW_DE:0); + break; + case 0x03: + *unitstat=CSW_UC; + break; + case 0x0f: + /* + *unitstat=CSW_CE | CSW_UC | CSW_DE | CSW_CUE; + */ + *unitstat=CSW_UC | CSW_DE | CSW_CUE; + break; + default: + *unitstat=CSW_CE | CSW_UC | CSW_DE; + break; + } + dev->sense[0]=SENSE_IR; + dev->sense[3]=6; /* Int Req ERAC */ + break; + case TAPE_BSENSE_TAPEUNLOADED2: /* RewUnld op */ + *unitstat=CSW_UC | CSW_DE | CSW_CUE; + /* + *unitstat=CSW_CE | CSW_UC | CSW_DE | CSW_CUE; + */ + dev->sense[0]=SENSE_IR; + dev->sense[3]=6; /* Int Req ERAC */ + break; + case TAPE_BSENSE_REWINDFAILED: + case TAPE_BSENSE_ITFERROR: + dev->sense[0]=SENSE_EC; + dev->sense[3]=0x03; /* Perm Equip Check */ + *unitstat=CSW_CE|CSW_DE|CSW_UC; + break; + case TAPE_BSENSE_TAPELOADFAIL: + case TAPE_BSENSE_LOCATEERR: + case TAPE_BSENSE_ENDOFTAPE: + case TAPE_BSENSE_EMPTYTAPE: + case TAPE_BSENSE_FENCED: + case TAPE_BSENSE_BLOCKSHORT: + case TAPE_BSENSE_INCOMPAT: + dev->sense[0]=SENSE_EC; + dev->sense[3]=0x10; /* PE-ID Burst Check */ + *unitstat=CSW_CE|CSW_DE|CSW_UC; + break; + + case TAPE_BSENSE_BADALGORITHM: + case TAPE_BSENSE_READFAIL: + dev->sense[0]=SENSE_DC; + dev->sense[3]=0x09; /* Read Data Check */ + *unitstat=CSW_CE|CSW_DE|CSW_UC; + break; + case TAPE_BSENSE_WRITEFAIL: + dev->sense[0]=SENSE_DC; + dev->sense[3]=0x07; /* Write Data Check (Media Error) */ + *unitstat=CSW_CE|CSW_DE|CSW_UC; + break; + case TAPE_BSENSE_BADCOMMAND: + dev->sense[0]=SENSE_CR; + dev->sense[3]=0x0C; /* Bad Command */ + *unitstat=CSW_CE|CSW_DE|CSW_UC; + break; + case TAPE_BSENSE_WRITEPROTECT: + dev->sense[0]=SENSE_CR; + dev->sense[3]=0x0B; /* File Protect */ + *unitstat=CSW_CE|CSW_DE|CSW_UC; + break; + case TAPE_BSENSE_LOADPTERR: + dev->sense[0]=SENSE_CR; + dev->sense[3]=0x0D; /* Backspace at Load Point */ + *unitstat=CSW_CE|CSW_DE|CSW_UC; + break; + case TAPE_BSENSE_READTM: + *unitstat=CSW_CE|CSW_DE|CSW_UX; + break; + case TAPE_BSENSE_UNSOLICITED: + *unitstat=CSW_CE|CSW_DE; + break; + case TAPE_BSENSE_STATUSONLY: + *unitstat=CSW_CE|CSW_DE; + break; + + } + if(strcmp(dev->filename,TAPE_UNLOADED)==0 || (dev->fd>0 && !dev->tmh->tapeloaded(dev,NULL,0))) + { + dev->sense[0]|=SENSE_IR; + dev->sense[1]|=SENSE1_TAPE_FP; + dev->sense[1]&=~SENSE1_TAPE_TUA; + dev->sense[1]|=SENSE1_TAPE_TUB; + } + else + { + dev->sense[0]&=~SENSE_IR; + dev->sense[1]|=IsAtLoadPoint(dev)?SENSE1_TAPE_LOADPT:0; + dev->sense[1]|=dev->readonly?SENSE1_TAPE_FP:0; /* FP bit set when tape not ready too */ + dev->sense[1]|=SENSE1_TAPE_TUA; + dev->sense[1]&=~SENSE1_TAPE_TUB; + } + if(dev->tmh->passedeot(dev)) + { + dev->sense[4]|=0x40; + } +} +/* Common routine for 3410/3420 magtape devices */ +static void build_sense_3410_3420(int ERCode,DEVBLK *dev,BYTE *unitstat,BYTE ccwcode) +{ + memset(dev->sense,0,sizeof(dev->sense)); + switch(ERCode) + { + case TAPE_BSENSE_TAPEUNLOADED: + switch(ccwcode) + { + case 0x01: + case 0x02: + case 0x0C: + *unitstat=CSW_CE | CSW_UC | (dev->tdparms.deonirq?CSW_DE:0); + break; + case 0x03: + *unitstat=CSW_UC; + break; + case 0x0f: + /* + *unitstat=CSW_CE | CSW_UC | CSW_DE | CSW_CUE; + */ + *unitstat=CSW_UC | CSW_DE | CSW_CUE; + break; + default: + *unitstat=CSW_CE | CSW_UC | CSW_DE; + break; + } + dev->sense[0]=SENSE_IR; + dev->sense[1]=SENSE1_TAPE_TUB; + break; + case TAPE_BSENSE_TAPEUNLOADED2: /* RewUnld op */ + *unitstat=CSW_UC | CSW_DE | CSW_CUE; + /* + *unitstat=CSW_CE | CSW_UC | CSW_DE | CSW_CUE; + */ + dev->sense[0]=SENSE_IR; + dev->sense[1]=SENSE1_TAPE_TUB; + break; + case TAPE_BSENSE_REWINDFAILED: + case TAPE_BSENSE_FENCED: + case TAPE_BSENSE_EMPTYTAPE: + case TAPE_BSENSE_ENDOFTAPE: + case TAPE_BSENSE_BLOCKSHORT: + /* On 3411/3420 the tape runs off the reel in that case */ + /* this will cause pressure loss in both columns */ + case TAPE_BSENSE_LOCATEERR: + /* Locate error : This is more like improperly formatted tape */ + /* i.e. the tape broke inside the drive */ + /* So EC instead of DC */ + case TAPE_BSENSE_TAPELOADFAIL: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_EC; + dev->sense[1]=SENSE1_TAPE_TUB; + dev->sense[7]=0x60; + break; + case TAPE_BSENSE_ITFERROR: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_EC; + dev->sense[1]=SENSE1_TAPE_TUB; + dev->sense[4]=0x80; /* Tape Unit Reject */ + break; + case TAPE_BSENSE_READFAIL: + case TAPE_BSENSE_BADALGORITHM: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_DC; + dev->sense[3]=0xC0; /* Vertical CRC check & Multitrack error */ + break; + case TAPE_BSENSE_WRITEFAIL: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_DC; + dev->sense[3]=0x60; /* Longitudinal CRC check & Multitrack error */ + break; + case TAPE_BSENSE_BADCOMMAND: + case TAPE_BSENSE_INCOMPAT: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_CR; + dev->sense[4]=0x01; + break; + case TAPE_BSENSE_WRITEPROTECT: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_CR; + break; + case TAPE_BSENSE_LOADPTERR: + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=0; + break; + case TAPE_BSENSE_READTM: + *unitstat=CSW_CE|CSW_DE|CSW_UX; + break; + case TAPE_BSENSE_UNSOLICITED: + *unitstat=CSW_CE|CSW_DE; + break; + case TAPE_BSENSE_STATUSONLY: + *unitstat=CSW_CE|CSW_DE; + break; + + } + if(strcmp(dev->filename,TAPE_UNLOADED)==0 || (dev->fd>0 && !dev->tmh->tapeloaded(dev,NULL,0))) + { + dev->sense[0]|=SENSE_IR; + dev->sense[1]|=SENSE1_TAPE_FP; + } + else + { + dev->sense[0]&=~SENSE_IR; + dev->sense[1]|=IsAtLoadPoint(dev)?SENSE1_TAPE_LOADPT:0; + dev->sense[1]|=dev->readonly?SENSE1_TAPE_FP:0; /* FP bit set when tape not ready too */ + } + if(dev->tmh->passedeot(dev)) + { + dev->sense[4]|=0x40; + } +} +static void build_sense_3410(int ERCode,DEVBLK *dev,BYTE *unitstat,BYTE ccwcode) +{ + build_sense_3410_3420(ERCode,dev,unitstat,ccwcode); + dev->sense[5]&=0x80; + dev->sense[5]|=0x40; + dev->sense[6]=0x22; /* Dual Dens - 3410/3411 Model 2 */ + dev->numsense=9; +} +#define build_sense_3422 build_sense_3420 +#define build_sense_3430 build_sense_3420 + +static void build_sense_3420(int ERCode,DEVBLK *dev,BYTE *unitstat,BYTE ccwcode) +{ + build_sense_3410_3420(ERCode,dev,unitstat,ccwcode); + /* Following stripped from original 'build_sense' */ dev->sense[5] |= 0xC0; dev->sense[6] |= 0x03; dev->sense[13] = 0x80; @@ -2797,29 +3769,108 @@ U32 stat; /* SCSI tape status bits */ dev->sense[16] = 0x01; dev->sense[19] = 0xFF; dev->sense[20] = 0xFF; - } + dev->numsense=24; +} +/*-------------------------------------------------------------------*/ +/* Construct sense bytes and unit status */ +/* note : name changed because semantic changed */ +/* ERCode is the internal Error Recovery code */ +/*-------------------------------------------------------------------*/ +static void +build_senseX (int ERCode,DEVBLK *dev,BYTE *unitstat,BYTE code) +{ +int i; +BYTE usr; +int sense_built; + sense_built=0; + if(unitstat==NULL) + { + unitstat=&usr; + } + for(i=0;TapeDevtypeList[i]!=0;i+=TAPEDEVTYPELISTENTRYSIZE) + { + if(TapeDevtypeList[i]==dev->devtype) + { + TapeSenseTable[TapeDevtypeList[i+4]](ERCode,dev,unitstat,code); + sense_built=1; + /* Set FP & LOADPOINT bit */ + if(dev->tmh->passedeot(dev)) + { + if( + ERCode==TAPE_BSENSE_STATUSONLY && + ( code==0x01 || + code==0x17 || + code==0x1F + ) + ) + { + *unitstat|=CSW_UX; + } + } + } + } + if(!sense_built) + { + *unitstat=CSW_CE|CSW_DE|CSW_UC; + dev->sense[0]=SENSE_EC; + } + if(*unitstat & CSW_UC) + { + dev->sns_pending=1; + } + return; } /* end function build_sense */ -/*-------------------------------------------------------------------*/ -/* Initialize the device handler */ -/*-------------------------------------------------------------------*/ -static int tapedev_init_handler (DEVBLK *dev, int argc, BYTE *argv[]) +/* Tape format determination REGEXPS */ +struct tape_format_entry { + char *fmtreg; /* A regular expression */ + int fmtcode; /* the device code */ + TAPEMEDIA_HANDLER *tmh; /* The media dispatcher */ + char *descr; /* readable description */ +}; +static struct tape_format_entry fmttab[]={ + /* This entry matches a filename ending with .tdf */ + {"\\.tdf$", TAPEDEVT_OMATAPE, &tmh_oma, "Optical Media Attachment (OMA) tape"}, +# if !defined(__APPLE__) + /* This entry matches a filename starting with /dev/ */ + {"^/dev/", TAPEDEVT_SCSITAPE, &tmh_scsi, "SCSI Tape"}, +#endif /* !defined(__APPLE__) */ + /* This entry matches a filename ending with .het */ + {"\\.het$", TAPEDEVT_HET, &tmh_het, "Hercules Formatted Tape"}, + /* This entry matches any other entry */ + {NULL, TAPEDEVT_AWSTAPE, &tmh_aws, "AWS Format tape file "} /* Anything goes */ +}; + +/* mountnewtape : mount a tape in the drive */ +/* Syntax : */ +/* filename [parms] */ +/* where parms are : */ +/* awstape : */ +/* set the HET parms */ +/* be compatible with the*/ +/* R|P/390|IS tape file */ +/* Format (HET files) */ +/* idrc|compress=0|1 : */ +/* Write tape blocks */ +/* with compression */ +/* (std deviation : Read backwrd */ +/* allowed on compressed HET */ +/* tapes while it is not on IDRC */ +/* formated 3480 tapes) */ +/* .. TO DO .. */ +static int mountnewtape(DEVBLK *dev,int argc,BYTE **argv) { -int len; /* Length of file name */ -int i; /* Argument index */ -U16 cutype; /* Control unit type */ -BYTE cumodel; /* Control unit model number */ -BYTE devmodel; /* Device model number */ -BYTE devclass; /* Device class */ -BYTE devtcode; /* Device type code */ -U32 sctlfeat; /* Storage control features */ +int i; /* Loop control */ +regex_t regwrk; /* REGEXP work area */ +regmatch_t regwrk2; /* REGEXP match area */ +char errbfr[1024]; /* Working storage */ +int rc; /* various rtns return codes */ union { U32 num; BYTE str[ 80 ]; } res; /* Parser results */ - /* Release the previous OMA descriptor array if allocated */ if (dev->omadesc != NULL) { @@ -2834,17 +3885,41 @@ union /* Save the file name in the device block */ strcpy (dev->filename, argv[0]); - /* Use the file name to determine the device type */ - len = strlen(dev->filename); - if (len >= 4 && strcasecmp(dev->filename + len - 4, ".tdf") == 0) - dev->tapedevt = TAPEDEVT_OMATAPE; - else if (len >= 4 && strcasecmp(dev->filename + len - 4, ".het") == 0) - dev->tapedevt = TAPEDEVT_HET; - else if (len >= 5 && memcmp(dev->filename, "/dev/", 5) == 0) - dev->tapedevt = TAPEDEVT_SCSITAPE; - else - dev->tapedevt = TAPEDEVT_AWSTAPE; + logmsg(_("Mounted tape %s\n"),dev->filename); + /* Use the file name to determine the device type */ + for(i=0;;i++) + { + dev->tapedevt=fmttab[i].fmtcode; + dev->tmh=fmttab[i].tmh; + if(fmttab[i].fmtreg==NULL) + { + break; + } + rc=regcomp(&regwrk,fmttab[i].fmtreg,REG_ICASE); + if(rc<0) + { + regerror(rc,&regwrk,errbfr,1024); + logmsg (_("HHCTA999E Device %4.4X : Unable to determine tape format type for %s : Internal error : Regcomp error %s on index %d\n"),dev->devnum,dev->filename,errbfr,i); + return -1; + } + rc=regexec(&regwrk,dev->filename,1,&regwrk2,0); + if(rc==REG_NOMATCH) + { + regfree(&regwrk); + continue; + } + if(rc==0) + { + regfree(&regwrk); + break; + } + regerror(rc,&regwrk,errbfr,1024); + logmsg (_("HHCTA999E Device %4.4X : Unable to determine tape format type for %s : Internal error : Regexec error %s on index %d\n"),dev->devnum,dev->filename,errbfr,i); + regfree(&regwrk); + return -1; + } + logmsg (_("HHCTA998I Device %4.4X : %s is a %s\n"),dev->devnum,dev->filename,fmttab[i].descr); /* Initialize device dependent fields */ dev->fd = -1; dev->omadesc = NULL; @@ -2860,15 +3935,17 @@ union dev->tdparms.method = HETDFLT_METHOD; dev->tdparms.level = HETDFLT_LEVEL; dev->tdparms.chksize = HETDFLT_CHKSIZE; + dev->tdparms.maxsize=0; /* No MAX Size */ + dev->tdparms.eotmargin=128*1024; /* 128 EOT MARGIN Default */ /* Process remaining parameters */ for (i = 1; i < argc; i++) { + logmsg (_("XXXXXXXXX Device %4.4X : parameter: '%s'\n"), dev->devnum,argv[i]); switch (parser (&ptab[0], argv[i], &res)) { case TDPARM_NONE: - fprintf (stderr, - "HHCTA067E Unrecognized parameter: '%s'\n", argv[i]); + logmsg (_("HHCTA067E Device %4.4X : %s - Unrecognized parameter: '%s'\n"), dev->devnum,dev->filename,argv[i]); return -1; break; @@ -2885,8 +3962,7 @@ union case TDPARM_METHOD: if (res.num < HETMIN_METHOD || res.num > HETMAX_METHOD) { - fprintf (stderr, - "HHCTA068E Method must be within %u-%u\n", + logmsg(_("HHCTA068E Method must be within %u-%u\n"), HETMIN_METHOD, HETMAX_METHOD); return -1; } @@ -2896,8 +3972,7 @@ union case TDPARM_LEVEL: if (res.num < HETMIN_LEVEL || res.num > HETMAX_LEVEL) { - fprintf (stderr, - "HHCTA069E Level must be within %u-%u\n", + logmsg(_("HHCTA069E Level must be within %u-%u\n"), HETMIN_LEVEL, HETMAX_LEVEL); return -1; } @@ -2907,43 +3982,488 @@ union case TDPARM_CHKSIZE: if (res.num < HETMIN_CHUNKSIZE || res.num > HETMAX_CHUNKSIZE) { - fprintf (stderr, - "HHCTA070E Chunksize must be within %u-%u\n", + logmsg (_("HHCTA070E Chunksize must be within %u-%u\n"), HETMIN_CHUNKSIZE, HETMAX_CHUNKSIZE); return -1; } dev->tdparms.chksize = res.num; break; - default: - fprintf (stderr, - "HHCTA071E Error in '%s' parameter\n", argv[i]); - return -1; + case TDPARM_MAXSIZE: + dev->tdparms.maxsize=res.num; break; - } - } - /* Set number of sense bytes */ - dev->numsense = 24; + case TDPARM_MAXSIZEK: + dev->tdparms.maxsize=res.num*1024; + break; - /* Determine the control unit type and model number */ - if (dev->devtype == 0x3480) - { - cutype = 0x3480; - cumodel = 0x31; - devmodel = 0x31; - devclass = 0x80; - devtcode = 0x80; - sctlfeat = 0x00000200; - } - else + case TDPARM_MAXSIZEM: + dev->tdparms.maxsize=res.num*1024*1024; + break; + + case TDPARM_EOTMARGIN: + dev->tdparms.eotmargin=res.num; + break; + + case TDPARM_STRICTSIZE: + dev->tdparms.strictsize=res.num; + break; + + case TDPARM_READONLY: + dev->tdparms.logical_readonly=(res.num ? 1 : 0 ); + break; + + case TDPARM_DEONIRQ: + dev->tdparms.deonirq=(res.num ? 1 : 0 ); + break; + + default: + logmsg(_("HHCTA071E Error in '%s' parameter\n"), argv[i]); + return -1; + break; + } + } +/* + * Adjust the display if necessary + */ + if(dev->tdparms.displayfeat) { - cutype = 0x3803; - cumodel = 0x02; - devmodel = 0x06; - devclass = 0x80; - devtcode = 0x20; - sctlfeat = 0x00000000; + if(strcmp(dev->filename,TAPE_UNLOADED)==0) + { + if(dev->tapedisptype==TAPEDISPLAY_UMOUNTMOUNT) + { + dev->tapedisptype=TAPEDISPLAY_MOUNT; + dev->tapedispflags|=TAPEDISPFLG_REQMOUNT; + strncpy(dev->tapemsg1,dev->tapemsg2,8); + } + if(dev->tapedisptype==TAPEDISPLAY_UNMOUNT) + { + dev->tapedisptype=TAPEDISPLAY_IDLE; + } + } + else + { + dev->tapedisptype=TAPEDISPLAY_IDLE; + } + ShowDisplayMessage(dev); + } + ReqAutoMount(dev); + return 0; +} +/* AUTOLOADER Feature */ + +/* autoload_global_parms : Appends a blank delimited word */ +/* to the list of parameters that will be passed */ +/* for every tape mounted by the autoloader */ + +static void autoload_global_parms(DEVBLK *dev,char *par) +{ + logmsg(_("TAPE Autoloader - Adding global parm %s\n"),par); + if(dev->al_argv==NULL) + { + dev->al_argv=malloc(sizeof(char *)*256); + dev->al_argc=0; + } + dev->al_argv[dev->al_argc]=(char *)malloc(strlen(par)+sizeof(char)); + strcpy(dev->al_argv[dev->al_argc],par); + dev->al_argc++; +} + +/* autoload_clean_entry : release storage allocated */ +/* for an autoloader slot (except the slot itself */ +static void autoload_clean_entry(DEVBLK *dev,int ix) +{ + int i; + for(i=0;i<dev->als[ix].argc;i++) + { + free(dev->als[ix].argv[i]); + dev->als[ix].argv[i]=NULL; + } + dev->als[ix].argc=0; + if(dev->als[ix].filename!=NULL) + { + free(dev->als[ix].filename); + dev->als[ix].filename=NULL; + } +} + +/* autoload_close : terminate autoloader operations */ +/* release all storage allocated by the autoloader */ +/* facility */ +static void autoload_close(DEVBLK *dev) +{ + int i; + if(dev->al_argv!=NULL) + { + for(i=0;i<dev->al_argc;i++) + { + free(dev->al_argv[i]); + dev->al_argv[i]=NULL; + } + free(dev->al_argv); + dev->al_argv=NULL; + dev->al_argc=0; + } + dev->al_argc=0; + if(dev->als!=NULL) + { + for(i=0;i<dev->alss;i++) + { + autoload_clean_entry(dev,i); + } + free(dev->als); + dev->als=NULL; + dev->alss=0; + } +} + +/* autoload_tape_entry : populate an autoloader slot */ +/* also expands the size of the autoloader */ +static void autoload_tape_entry(DEVBLK *dev,char *fn,char **strtokw) +{ + char *p; + TAPEAUTOLOADENTRY tae; + logmsg(_("TAPE Autoloader : Adding tape entry %s\n"),fn); + memset(&tae,0,sizeof(tae)); + tae.filename=malloc(strlen(fn)+sizeof(char)); + strcpy(tae.filename,fn); + while((p=strtok_r(NULL," \t",strtokw))) + { + if(tae.argv==NULL) + { + tae.argv=malloc(sizeof(char *)*256); + } + tae.argv[tae.argc]=malloc(strlen(p)+sizeof(char)); + strcpy(tae.argv[tae.argc],p); + tae.argc++; + } + if(dev->als==NULL) + { + dev->als=malloc(sizeof(tae)); + dev->alss=0; + } + else + { + dev->als=realloc(dev->als,sizeof(tae)*(dev->alss+1)); + } + memcpy(&dev->als[dev->alss],&tae,sizeof(tae)); + dev->alss++; +} + +/* autoload_init : initialise the Autoloader feature */ +static void autoload_init(DEVBLK *dev,int ac,BYTE **av) +{ + char bfr[4096]; + char *rec; + FILE *aldf; + char *verb; + int i; + char *strtokw; + autoload_close(dev); + if(ac<1) + { + return; + } + if(av[0][0]!='@') + { + return; + } + logmsg(_("TAPE : Autoloader file request fn=%s\n"),&av[0][1]); + if((aldf=fopen(&av[0][1],"r"))==NULL) + { + return; + } + for(i=1;i<ac;i++) + { + autoload_global_parms(dev,av[i]); + } + while((rec=fgets(bfr,4096,aldf))) + { + for(i=(strlen(rec)-1);isspace(rec[i]) && i>=0;i--) + { + rec[i]=0; + } + if(strlen(rec)==0) + { + continue; + } + verb=strtok_r(rec," \t",&strtokw); + if(verb==NULL) + { + continue; + } + if(verb[0]==0) + { + continue; + } + if(verb[0]=='#') + { + continue; + } + if(strcmp(verb,"*")==0) + { + while((verb=strtok_r(NULL," \t",&strtokw))) + { + autoload_global_parms(dev,verb); + } + continue; + } + autoload_tape_entry(dev,verb,&strtokw); + } + fclose(aldf); + return; +} + +/* autoload_mount_tape : mount in the drive the tape */ +/* positionned in the autoloader slot #alix */ +static int autoload_mount_tape(DEVBLK *dev,int alix) +{ + BYTE **pars; + int pcount=1; + int i; + int rc; + if(alix>=dev->alss) + { + return -1; + } + pars=malloc(sizeof(BYTE *)*256); + pars[0]=dev->als[alix].filename; + for(i=0;i<dev->al_argc;i++,pcount++) + { + pars[pcount]=malloc(strlen(dev->al_argv[i])+10); + strcpy(pars[pcount],dev->al_argv[i]); + if(pcount>255) + { + break; + } + } + for(i=0;i<dev->als[alix].argc;i++,pcount++) + { + pars[pcount]=malloc(strlen(dev->als[alix].argv[i])+10); + strcpy(pars[pcount],dev->als[alix].argv[i]); + if(pcount>255) + { + break; + } + } + rc=mountnewtape(dev,pcount,pars); + for(i=1;i<pcount;i++) + { + free(pars[i]); + } + free(pars); + return(rc); +} + +/* autoload_mount_first : mount in the drive the tape */ +/* positionned in the 1st autoloader slot */ +static int autoload_mount_first(DEVBLK *dev) +{ + dev->alsix=0; + return(autoload_mount_tape(dev,0)); +} + +/* autoload_mount_next : mount in the drive the tape */ +/* positionned in the slot after the currently */ +/* mounted tape. if this is the last tape, */ +/* close the autoloader */ +static int autoload_mount_next(DEVBLK *dev) +{ + if(dev->alsix>=dev->alss) + { + autoload_close(dev); + return -1; + } + dev->alsix++; + return(autoload_mount_tape(dev,dev->alsix)); +} + +static void *defered_mounttape(void *db) +{ + int rc; + DEVBLK *dev; + + dev=(DEVBLK *)db; + sleep(1); + obtain_lock(&dev->lock); + rc=1; + if(dev->als!=NULL) + { + rc=autoload_mount_next(dev); + while(rc!=0) + { + if(dev->als==NULL) + { + break; + } + rc=autoload_mount_next(dev); + } + } + release_lock(&dev->lock); + if(rc!=0) + { + return NULL; + } + device_attention(dev,CSW_DE); + return NULL; +} +/*-------------------------------------------------------------------*/ +/* Initialize the device handler */ +/*-------------------------------------------------------------------*/ +static int tapedev_init_handler (DEVBLK *dev, int argc, BYTE *argv[]) +{ +U16 cutype; /* Control unit type */ +BYTE cumodel; /* Control unit model number */ +BYTE devmodel; /* Device model number */ +BYTE devclass; /* Device class */ +BYTE devtcode; /* Device type code */ +U32 sctlfeat; /* Storage control features */ +int haverdc; /* RDC Supported */ +int rc; + + + /* Determine the control unit type and model number */ + /* Support for 3490/3422/3430/8809/9347, etc.. */ + /* Close current tape */ + if(dev->fd>=0) + { + dev->tmh->close(dev); + dev->fd=-1; + } + autoload_close(dev); + haverdc=0; + dev->tdparms.displayfeat=0; + + if(!sscanf(dev->typname,"%hx",&(dev->devtype))) + dev->devtype = 0x3420; + + switch(dev->devtype) + { + case 0x3480: + cutype = 0x3480; + cumodel = 0x31; + devmodel = 0x31; /* Model D31 */ + devclass = 0x80; + devtcode = 0x80; + sctlfeat = 0x000002C0; /* Support Logical Write Protect */ + /* Autoloader installed */ + /* IDRC Supported */ + dev->numdevid = 7; + dev->numsense = 24; + haverdc=1; + dev->tdparms.displayfeat=1; + break; + case 0x3490: + cutype = 0x3490; + cumodel = 0x50; /* Model C10 */ + devmodel = 0x50; + devclass = 0x80; + devtcode = 0x80; /* Valid for 3490 too */ + sctlfeat = 0x000002C0; /* Support Logical Write Protect */ + /* Autoloader installed */ + /* IDRC Supported */ + dev->numdevid = 7; + dev->numsense = 32; + haverdc=1; + dev->tdparms.displayfeat=1; + break; + case 0x3590: + cutype = 0x3590; + cumodel = 0x50; /* Model C10 ?? */ + devmodel = 0x50; + devclass = 0x80; + devtcode = 0x80; /* Valid for 3590 too */ + sctlfeat = 0x000002C0; /* Support Logical Write Protect */ + /* Autoloader installed */ + /* IDRC Supported */ + dev->numdevid = 7; + dev->numsense = 32; + haverdc=1; + dev->tdparms.displayfeat=1; + break; + case 0x3420: + cutype = 0x3803; + cumodel = 0x02; + devmodel = 0x06; + devclass = 0x80; + devtcode = 0x20; + sctlfeat = 0x00000000; + dev->numdevid = 0; /* Actually, doesn't support 0xE4 */ + dev->numsense = 24; + break; + case 0x9347: + cutype = 0x9347; + cumodel = 0x01; + devmodel = 0x01; + devclass = 0x80; + devtcode = 0x20; + sctlfeat = 0x00000000; + dev->numdevid = 7; + dev->numsense = 32; + break; + case 0x9348: + cutype = 0x9348; + cumodel = 0x01; + devmodel = 0x01; + devclass = 0x80; + devtcode = 0x20; + sctlfeat = 0x00000000; + dev->numdevid = 7; + dev->numsense = 32; + break; + case 0x8809: + cutype = 0x8809; + cumodel = 0x01; + devmodel = 0x01; + devclass = 0x80; + devtcode = 0x20; + sctlfeat = 0x00000000; + dev->numdevid = 7; + dev->numsense = 32; + break; + case 0x3410: + case 0x3411: + dev->devtype = 0x3411; /* a 3410 is a 3411 */ + cutype = 0x3115; /* Model 115 IFA */ + cumodel = 0x01; + devmodel = 0x01; + devclass = 0x80; + devtcode = 0x20; + sctlfeat = 0x00000000; + dev->numdevid=0; + dev->numsense = 9; + break; + case 0x3422: + cutype = 0x3422; + cumodel = 0x01; + devmodel = 0x01; + devclass = 0x80; + devtcode = 0x20; + sctlfeat = 0x00000000; + dev->numdevid = 7; + dev->numsense = 32; + break; + case 0x3430: + cutype = 0x3422; + cumodel = 0x01; + devmodel = 0x01; + devclass = 0x80; + devtcode = 0x20; + sctlfeat = 0x00000000; + dev->numdevid = 7; + dev->numsense = 32; + break; + default: + logmsg(_("Unsupported device type specified %4.4x\n"),dev->devtype); + cutype = dev->devtype; /* don't know what to do really */ + cumodel = 0x01; + devmodel = 0x01; + devclass = 0x80; + devtcode = 0x20; + sctlfeat = 0x00000000; + dev->numdevid = 0; /* We don't know */ + dev->numsense = 1; + break; } /* Initialize the device identifier bytes */ @@ -2954,10 +4474,9 @@ union dev->devid[4] = dev->devtype >> 8; dev->devid[5] = dev->devtype & 0xFF; dev->devid[6] = devmodel; - dev->numdevid = 7; /* Initialize the device characteristics bytes */ - if (cutype != 0x3803) + if (haverdc) { memset (dev->devchar, 0, sizeof(dev->devchar)); memcpy (dev->devchar, dev->devid+1, 6); @@ -2979,6 +4498,28 @@ union a single buffer before passing data to the device handler */ dev->cdwmerge = 1; + /* ISW */ + /* Build a 'clear' sense */ + memset(dev->sense,0,sizeof(dev->sense)); + dev->sns_pending=0; + + autoload_init(dev,argc,argv); + if(dev->als!=NULL) + { + rc=autoload_mount_first(dev); + while(rc!=0) + { + if(dev->als==NULL) + { + return -1; + } + rc=autoload_mount_next(dev); + } + } + else + { + return(mountnewtape(dev,argc,(BYTE **)argv)); + } return 0; } /* end function tapedev_init_handler */ @@ -2992,12 +4533,16 @@ static void tapedev_query_device (DEVBLK *dev, BYTE **class, *class = "TAPE"; if (!strcmp (dev->filename, TAPE_UNLOADED)) - snprintf (buffer, buflen, TAPE_UNLOADED); + snprintf (buffer, buflen, "%s %s %s",TAPE_UNLOADED, + dev->tdparms.displayfeat?"Display":"", + dev->tdparms.displayfeat?GetDisplayText(dev):""); else - snprintf (buffer, buflen, "%s%s [%d:%8.8lX]", + snprintf (buffer, buflen, "%s%s [%d:%8.8lX] %s %s", dev->filename, (dev->readonly ? " ro" : ""), - dev->curfilen, dev->nxtblkpos); + dev->curfilen, dev->nxtblkpos, + dev->tdparms.displayfeat?"Display":"", + dev->tdparms.displayfeat?GetDisplayText(dev):""); } /* end function tapedev_query_device */ @@ -3006,43 +4551,69 @@ static void tapedev_query_device (DEVBLK *dev, BYTE **class, /*-------------------------------------------------------------------*/ static int tapedev_close_device ( DEVBLK *dev ) { - /* Close the device file */ - switch (dev->tapedevt) - { - default: - case TAPEDEVT_AWSTAPE: -# if !defined(__APPLE__) - case TAPEDEVT_SCSITAPE: -# endif /* !defined(__APPLE__) */ - case TAPEDEVT_OMATAPE: - close (dev->fd); - break; - - case TAPEDEVT_HET: - close_het (dev); - break; - } /* end switch(dev->tapedevt) */ - dev->fd = -1; - - /* Release the OMA descriptor array if allocated */ - if (dev->omadesc != NULL) - { - free (dev->omadesc); - dev->omadesc = NULL; - } - - /* Reset the device dependent fields */ - dev->omafiles = 0; + autoload_close(dev); + dev->tmh->close(dev); dev->curfilen = 1; dev->nxtblkpos = 0; dev->prvblkpos = -1; dev->curblkrem = 0; dev->curbufoff = 0; dev->blockid = 0; - return 0; } /* end function tapedev_close_device */ +/* START PRELIM_CCW_CHECK */ +/*-------------------------------------------------------------------*/ +/* Ivan Warren 20030224 */ +/* Determine if a CCW code is valid for the Device */ +/* rc = 0 : Command is NOT valid */ +/* rc = 1 : Command is Valid, tape MUST be loaded */ +/* rc = 2 : Command is Valid, tape NEED NOT be loaded */ +/* rc = 3 : Command is Valid, But is a NO-OP (Return CE+DE now) */ +/* rc = 4 : Command is Valid, But is a NO-OP for virtual tapes */ +/* rc = 5 : Command is Valid, Tape Must be loaded - Add DE to status */ +/* rc = 6 : Command is Valid, Tape load attempted - but not an error */ +/* (used for sense and no contingency allegiance exists) */ +/*-------------------------------------------------------------------*/ + +static int TapeCommandIsValid(BYTE code,U16 devtype,BYTE *rustat) +{ +int i; +int tix=0; +int rc; +int devtfound=0; + + /* Find the D/T in the table - if not found, treat as invalid CCW code */ + + *rustat=0; + for(i=0;TapeDevtypeList[i]!=0;i+=TAPEDEVTYPELISTENTRYSIZE) + { + if(TapeDevtypeList[i]==devtype) + { + tix=TapeDevtypeList[i+1]; + devtfound=1; + if(TapeDevtypeList[i+2]) + { + *rustat|=CSW_UC; + } + if(TapeDevtypeList[i+3]) + { + *rustat|=CSW_CUE; + } + break; + } + } + if(!devtfound) + { + return 0; + } + + rc=TapeCommandTable[tix][code]; + return rc; +} + +/* END PRELIM_CCW_CHECK */ + /*-------------------------------------------------------------------*/ /* Execute a Channel Command Word */ /*-------------------------------------------------------------------*/ @@ -3053,9 +4624,9 @@ static void tapedev_execute_ccw (DEVBLK *dev, BYTE code, BYTE flags, int rc; /* Return code */ int len; /* Length of data block */ long num; /* Number of bytes to read */ -OMATAPE_DESC *omadesc; /* -> OMA descriptor entry */ -struct mtop opblk; /* Area for MTIOCTOP ioctl */ long locblock; /* Block Id for Locate Block */ +int drc; /* code disposition */ +BYTE rustat; /* Addl CSW stat on Rewind Unload */ UNREFERENCED(prevcode); UNREFERENCED(ccwseq); @@ -3066,7 +4637,14 @@ long locblock; /* Block Id for Locate Block */ in the buffer which was not used by the previous CCW */ if (chained & CCW_FLAGS_CD) { - memmove (iobuf, iobuf + dev->curbufoff, dev->curblkrem); + if(IS_CCW_RDBACK(code)) + { + /* We don't need to move anything in this case - just set length */ + } + else + { + memmove (iobuf, iobuf + dev->curbufoff, dev->curblkrem); + } num = (count < dev->curblkrem) ? count : dev->curblkrem; *residual = count - num; if (count < dev->curblkrem) *more = 1; @@ -3081,43 +4659,52 @@ long locblock; /* Block Id for Locate Block */ { logmsg(_("HHCTA072E Data chaining not supported for CCW %2.2X\n"), code); - dev->sense[0] = SENSE_CR; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_BADCOMMAND,dev,unitstat,code); return; } /* Open the device file if necessary */ - if (dev->fd < 0 && !IS_CCW_SENSE(code) - && !(code == 0x03 || code == 0x9F || code == 0xAF - || code == 0xB7 || code == 0xC7 || code == 0xDB)) + /* Ivan Warren 2003-02-24 : Change logic in early determination + * of CCW handling - use a determination table + */ + drc=TapeCommandIsValid(code,dev->devtype,&rustat); + switch(drc) { - /* Open the device file according to device type */ - switch (dev->tapedevt) - { - default: - case TAPEDEVT_AWSTAPE: - rc = open_awstape (dev, unitstat); - break; - - case TAPEDEVT_HET: - rc = open_het (dev, unitstat); - break; - -# if !defined(__APPLE__) - case TAPEDEVT_SCSITAPE: - rc = open_scsitape (dev, unitstat); - break; -# endif /* !defined(__APPLE__) */ - - case TAPEDEVT_OMATAPE: - rc = open_omatape (dev, unitstat); - break; - } /* end switch(dev->tapedevt) */ - - dev->blockid = 0; + case 0: /* Unsupported CCW code for D/T */ + build_senseX(TAPE_BSENSE_BADCOMMAND,dev,unitstat,code); + return; + case 1: /* Valid - Must open device */ + case 5: /* Valid - Must open device */ + case 2: /* Valid - need not open device */ + break; + case 3: /* Code is a NO-OP for D/T in any case */ + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); + return; + case 4: /* Code is a NO-OP except for real tape */ + if(dev->tapedevt!=TAPEDEVT_SCSITAPE) + { + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); + return; + } + default: + build_senseX(TAPE_BSENSE_BADCOMMAND,dev,unitstat,code); + break; /* Should NOT occur */ + } - /* Exit with unit status if open was unsuccessful */ - if (rc < 0) return; + if (dev->fd < 0 && (drc==1 || drc==5)) + { + *residual=count; + rc=dev->tmh->open(dev,unitstat,code); + /* Exit with unit status if open was unsuccessful */ + if (rc < 0) { + return; + } + if(!dev->tmh->tapeloaded(dev,unitstat,code)) + { + build_senseX(TAPE_BSENSE_TAPEUNLOADED,dev,unitstat,code); + return; + } + dev->blockid = 0; } /* Process depending on CCW opcode */ @@ -3130,41 +4717,20 @@ long locblock; /* Block Id for Locate Block */ /* Unit check if tape is write-protected */ if (dev->readonly) { - dev->sense[0] = SENSE_CR; - dev->sense[1] = SENSE1_TAPE_FP; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_WRITEPROTECT,dev,unitstat,code); break; } /* Write a block from the tape according to device type */ - switch (dev->tapedevt) - { - default: - case TAPEDEVT_AWSTAPE: - rc = write_awstape (dev, iobuf, count, unitstat); - break; - - case TAPEDEVT_HET: - rc = write_het (dev, iobuf, count, unitstat); - break; - -# if !defined(__APPLE__) - case TAPEDEVT_SCSITAPE: - rc = write_scsitape (dev, iobuf, count, unitstat); - break; -# endif /* !defined(__APPLE__) */ - - } /* end switch(dev->tapedevt) */ - - /* Exit with unit check status if write error condition */ + rc=dev->tmh->write(dev,iobuf,count,unitstat,code); if (rc < 0) + { break; - + } dev->blockid++; - /* Set normal status */ *residual = 0; - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0x02: @@ -3172,53 +4738,18 @@ long locblock; /* Block Id for Locate Block */ /* READ FORWARD */ /*---------------------------------------------------------------*/ /* Read a block from the tape according to device type */ - switch (dev->tapedevt) - { - default: - case TAPEDEVT_AWSTAPE: - len = read_awstape (dev, iobuf, unitstat); - break; - - case TAPEDEVT_HET: - len = read_het (dev, iobuf, unitstat); - break; - -# if !defined(__APPLE__) - case TAPEDEVT_SCSITAPE: - len = read_scsitape (dev, iobuf, unitstat); - break; -# endif /* !defined(__APPLE__) */ - - case TAPEDEVT_OMATAPE: - omadesc = (OMATAPE_DESC*)(dev->omadesc); - omadesc += dev->curfilen; - - switch (omadesc->format) - { - default: - case 'H': - len = read_omaheaders (dev, omadesc, iobuf, unitstat); - break; - case 'F': - len = read_omafixed (dev, omadesc, iobuf, unitstat); - break; - case 'T': - len = read_omatext (dev, omadesc, iobuf, unitstat); - break; - } /* end switch(omadesc->format) */ - - break; - - } /* end switch(dev->tapedevt) */ + len=dev->tmh->read(dev,iobuf,unitstat,code); /* Exit with unit check status if read error condition */ if (len < 0) + { break; + } /* Calculate number of bytes to read and residual byte count */ num = (count < len) ? count : len; *residual = count - num; - if (count < dev->curblkrem) *more = 1; + if(count < len) *more = 1; /* Save size and offset of data not used by this CCW */ dev->curblkrem = len - num; @@ -3229,12 +4760,13 @@ long locblock; /* Block Id for Locate Block */ /* Exit with unit exception status if tapemark was read */ if (len == 0) { - *unitstat = CSW_CE | CSW_DE | CSW_UX; - break; + build_senseX(TAPE_BSENSE_READTM,dev,unitstat,code); + } + else + { + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); } - /* Set normal status */ - *unitstat = CSW_CE | CSW_DE; break; case 0x03: @@ -3242,85 +4774,22 @@ long locblock; /* Block Id for Locate Block */ /* CONTROL NO-OPERATION */ /*---------------------------------------------------------------*/ *residual = 0; - *unitstat = CSW_CE | CSW_DE; - if (((0x3480 == dev->devtype) || (0x3490 == dev->devtype)) - && (strcmp(dev->filename,TAPE_UNLOADED) == 0)) - *unitstat |= CSW_UC; + /* NOTE : UC+IR is already set for NO-OP on 3480 if tape not ready */ + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0x07: /*---------------------------------------------------------------*/ /* REWIND */ /*---------------------------------------------------------------*/ -# if !defined(__APPLE__) - /* For SCSI tape, issue rewind command */ - if (dev->tapedevt == TAPEDEVT_SCSITAPE) - { - opblk.mt_op = MTREW; - opblk.mt_count = 1; - rc = ioctl (dev->fd, MTIOCTOP, (char*)&opblk); - if (rc < 0) - { - logmsg (_("HHCTA073E Error rewinding %s: %s\n"), - dev->filename, strerror(errno)); - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; - break; - } /* end if(rc) */ - } /* end if(SCSITAPE) */ -# endif /* !defined(__APPLE__) */ - - /* For OMA tape, close the current file */ - if (dev->tapedevt == TAPEDEVT_OMATAPE) - { - close (dev->fd); - dev->fd = -1; - } /* end if(OMATAPE) */ - - /* For AWSTAPE file, seek to start of file */ - if (dev->tapedevt == TAPEDEVT_AWSTAPE) - { - rc = lseek (dev->fd, 0, SEEK_SET); - if (rc < 0) - { - /* Handle seek error condition */ - logmsg (_("HHCTA074E Error seeking to start of %s: %s\n"), - dev->filename, strerror(errno)); - - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; - break; - } - } /* end if(AWSTAPE) */ - - /* For HET file, just rewind it */ - if (dev->tapedevt == TAPEDEVT_HET) + if(dev->tmh->rewind(dev,unitstat,code)<0) { - rc = het_rewind (dev->hetb); - if (rc < 0) - { - /* Handle seek error condition */ - logmsg (_("HHCTA075E Error seeking to start of %s: %s(%s)\n"), - dev->filename, het_error(rc), strerror(errno)); - - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; break; - } - } /* end if(HET) */ - + } /* Reset position counters to start of file */ - dev->curfilen = 1; - dev->nxtblkpos = 0; - dev->prvblkpos = -1; - - dev->blockid = 0; - /* Set unit status */ *residual = 0; - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0x0C: @@ -3328,89 +4797,31 @@ long locblock; /* Block Id for Locate Block */ /* READ BACKWARD */ /*---------------------------------------------------------------*/ /* Backspace to previous block according to device type */ - switch (dev->tapedevt) - { - default: - case TAPEDEVT_AWSTAPE: - rc = bsb_awstape (dev, unitstat); - break; - - case TAPEDEVT_HET: - rc = bsb_het (dev, unitstat); - break; - -# if !defined(__APPLE__) - case TAPEDEVT_SCSITAPE: - rc = bsb_scsitape (dev, unitstat); - break; -# endif /* !defined(__APPLE__) */ - - case TAPEDEVT_OMATAPE: - rc = bsb_omatape (dev, unitstat); - break; - - } /* end switch(dev->tapedevt) */ - - /* Exit with unit check status if error condition */ + rc=dev->tmh->bsb(dev,unitstat,code); if (rc < 0) + { break; + } /* Exit with unit exception status if tapemark was sensed */ if (rc == 0) { *residual = 0; - *unitstat = CSW_CE | CSW_DE | CSW_UX; + build_senseX(TAPE_BSENSE_READTM,dev,unitstat,code); break; } - - /* Read a block from the tape according to device type */ - switch (dev->tapedevt) - { - default: - case TAPEDEVT_AWSTAPE: - len = read_awstape (dev, iobuf, unitstat); - break; - - case TAPEDEVT_HET: - len = read_het (dev, iobuf, unitstat); - break; - -# if !defined(__APPLE__) - case TAPEDEVT_SCSITAPE: - len = read_scsitape (dev, iobuf, unitstat); - break; -# endif /* !defined(__APPLE__) */ - - case TAPEDEVT_OMATAPE: - omadesc = (OMATAPE_DESC*)(dev->omadesc); - omadesc += dev->curfilen; - - switch (omadesc->format) - { - default: - case 'H': - len = read_omaheaders (dev, omadesc, iobuf, unitstat); - break; - case 'F': - len = read_omafixed (dev, omadesc, iobuf, unitstat); - break; - case 'T': - len = read_omatext (dev, omadesc, iobuf, unitstat); - break; - } /* end switch(omadesc->format) */ - - break; - - } /* end switch(dev->tapedevt) */ + len=dev->tmh->read(dev,iobuf,unitstat,code); /* Exit with unit check status if read error condition */ if (len < 0) + { break; + } /* Calculate number of bytes to read and residual byte count */ num = (count < len) ? count : len; *residual = count - num; - if (count < dev->curblkrem) *more = 1; + if (count < len) *more = 1; /* Save size and offset of data not used by this CCW */ dev->curblkrem = len - num; @@ -3419,83 +4830,35 @@ long locblock; /* Block Id for Locate Block */ dev->blockid++; /* Backspace to previous block according to device type */ - switch (dev->tapedevt) - { - default: - case TAPEDEVT_AWSTAPE: - rc = bsb_awstape (dev, unitstat); - break; - - case TAPEDEVT_HET: - rc = bsb_het (dev, unitstat); - break; - -# if !defined(__APPLE__) - case TAPEDEVT_SCSITAPE: - rc = bsb_scsitape (dev, unitstat); - break; -# endif /* !defined(__APPLE__) */ - - case TAPEDEVT_OMATAPE: - rc = bsb_omatape (dev, unitstat); - break; - - } /* end switch(dev->tapedevt) */ + rc=dev->tmh->bsb(dev,unitstat,code); /* Exit with unit check status if error condition */ if (rc < 0) + { break; + } /* Set normal status */ - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0x0F: /*---------------------------------------------------------------*/ /* REWIND UNLOAD */ /*---------------------------------------------------------------*/ -# if !defined(__APPLE__) - /* For SCSI tape, issue rewind unload command */ - if (dev->tapedevt == TAPEDEVT_SCSITAPE) + if(dev->tapedisptype==TAPEDISPLAY_UMOUNTMOUNT) { - opblk.mt_op = MTOFFL; - opblk.mt_count = 1; - rc = ioctl (dev->fd, MTIOCTOP, (char*)&opblk); - if (rc < 0) - { - logmsg (_("HHCTA076E Error unloading %s: %s\n"), - dev->filename, strerror(errno)); - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; - break; - } /* end if(rc) */ - } /* end if(SCSITAPE) */ -# endif /* !defined(__APPLE__) */ - - if ((dev->tapedevt == TAPEDEVT_AWSTAPE) || - (dev->tapedevt == TAPEDEVT_HET)) - { - strcpy(dev->filename, TAPE_UNLOADED); - logmsg (_("HHCTA077I Tape %4.4X unloaded\n"), - dev->devnum); + dev->tapedisptype=TAPEDISPLAY_MOUNT; + dev->tapedispflags|=TAPEDISPFLG_REQMOUNT; + strcpy(dev->tapemsg1,dev->tapemsg2); } - - /* Close the file and reset position counters */ - switch (dev->tapedevt) + if(dev->tapedisptype==TAPEDISPLAY_UNMOUNT) { - default: - case TAPEDEVT_AWSTAPE: -# if !defined(__APPLE__) - case TAPEDEVT_SCSITAPE: -# endif /* !defined(__APPLE__) */ - case TAPEDEVT_OMATAPE: - close (dev->fd); - break; - - case TAPEDEVT_HET: - close_het (dev); - break; - } /* end switch(dev->tapedevt) */ + dev->tapedisptype=TAPEDISPLAY_IDLE; + } + dev->tmh->close(dev); + logmsg (_("HHCTA077I Tape %4.4X unloaded\n"),dev->devnum); + ShowDisplayMessage(dev); dev->fd = -1; dev->curfilen = 1; @@ -3504,87 +4867,73 @@ long locblock; /* Block Id for Locate Block */ dev->blockid = 0; - /* Set unit status */ *residual = 0; - *unitstat = CSW_CE | CSW_DE; - break; - - case 0x17: - /*---------------------------------------------------------------*/ - /* ERASE GAP */ - /*---------------------------------------------------------------*/ - /* Unit check if tape is write-protected */ - if (dev->readonly) + /* Status may require tweaking according to D/T */ + /* this is what TAPEUNLOADED2 does */ + rc=1; + build_senseX(TAPE_BSENSE_TAPEUNLOADED2,dev,unitstat,code); + if(dev->als!=NULL) { - dev->sense[0] = SENSE_CR; - dev->sense[1] = SENSE1_TAPE_FP; - *unitstat = CSW_CE | CSW_DE | CSW_UC; - break; + TID dummy_tid; + create_thread(&dummy_tid,&sysblk.detattr,defered_mounttape,(dev)); } - - /* Set normal status */ - *residual = 0; - *unitstat = CSW_CE | CSW_DE; + ReqAutoMount(dev); break; - case 0x1F: + case 0x17: /*---------------------------------------------------------------*/ - /* WRITE TAPE MARK */ + /* ERASE GAP */ /*---------------------------------------------------------------*/ /* Unit check if tape is write-protected */ if (dev->readonly) { - dev->sense[0] = SENSE_CR; - dev->sense[1] = SENSE1_TAPE_FP; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_WRITEPROTECT,dev,unitstat,code); break; } - /* Write a tapemark according to device type */ - switch (dev->tapedevt) - { - default: - case TAPEDEVT_AWSTAPE: - rc = write_awsmark (dev, unitstat); - break; - - case TAPEDEVT_HET: - rc = write_hetmark (dev, unitstat); - break; - -# if !defined(__APPLE__) - case TAPEDEVT_SCSITAPE: - rc = write_scsimark (dev, unitstat); - break; -# endif /* !defined(__APPLE__) */ - - } /* end switch(dev->tapedevt) */ + /* Set normal status */ + *residual = 0; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); + break; - /* Exit with unit check status if write error condition */ - if (rc < 0) + case 0x1F: + /*---------------------------------------------------------------*/ + /* WRITE TAPE MARK */ + /*---------------------------------------------------------------*/ + /* Unit check if tape is write-protected */ + if (dev->readonly) + { + build_senseX(TAPE_BSENSE_WRITEPROTECT,dev,unitstat,code); break; + } + rc=dev->tmh->wtm(dev,unitstat,code); + if(rc<0) + { + break; + } - /* Increment current file number */ dev->curfilen++; - dev->blockid++; - /* Set normal status */ *residual = 0; - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0x22: /*---------------------------------------------------------------*/ /* READ BLOCK ID */ /*---------------------------------------------------------------*/ + /* ISW : Removed 3480 check - checked performed previously */ /* Only valid on 3480 devices */ + /* if (dev->devtype != 0x3480) { dev->sense[0] = SENSE_CR; *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_sense(dev); break; } + */ /* Calculate number of bytes and residual byte count */ len = 2*sizeof(dev->blockid); @@ -3602,7 +4951,7 @@ long locblock; /* Block Id for Locate Block */ iobuf[6] = (dev->blockid >> 8 ) & 0xFF; iobuf[7] = (dev->blockid ) & 0xFF; - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0x27: @@ -3610,44 +4959,24 @@ long locblock; /* Block Id for Locate Block */ /* BACKSPACE BLOCK */ /*---------------------------------------------------------------*/ /* Backspace to previous block according to device type */ - switch (dev->tapedevt) - { - default: - case TAPEDEVT_AWSTAPE: - rc = bsb_awstape (dev, unitstat); - break; - - case TAPEDEVT_HET: - rc = bsb_het (dev, unitstat); - break; - -# if !defined(__APPLE__) - case TAPEDEVT_SCSITAPE: - rc = bsb_scsitape (dev, unitstat); - break; -# endif /* !defined(__APPLE__) */ - - case TAPEDEVT_OMATAPE: - rc = bsb_omatape (dev, unitstat); - break; - - } /* end switch(dev->tapedevt) */ - + rc=dev->tmh->bsb(dev,unitstat,code); /* Exit with unit check status if error condition */ if (rc < 0) + { break; + } /* Exit with unit exception status if tapemark was sensed */ if (rc == 0) { *residual = 0; - *unitstat = CSW_CE | CSW_DE | CSW_UX; + build_senseX(TAPE_BSENSE_READTM,dev,unitstat,code); break; } /* Set normal status */ *residual = 0; - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0x2F: @@ -3655,216 +4984,104 @@ long locblock; /* Block Id for Locate Block */ /* BACKSPACE FILE */ /*---------------------------------------------------------------*/ /* Backspace to previous file according to device type */ - switch (dev->tapedevt) - { - default: - case TAPEDEVT_AWSTAPE: - rc = bsf_awstape (dev, unitstat); - break; - - case TAPEDEVT_HET: - rc = bsf_het (dev, unitstat); - break; - -# if !defined(__APPLE__) - case TAPEDEVT_SCSITAPE: - rc = bsf_scsitape (dev, unitstat); - break; -# endif /* !defined(__APPLE__) */ - - case TAPEDEVT_OMATAPE: - rc = bsf_omatape (dev, unitstat); - break; - - } /* end switch(dev->tapedevt) */ + rc=dev->tmh->bsf(dev,unitstat,code); /* Exit with unit check status if error condition */ if (rc < 0) + { break; + } /* Set normal status */ *residual = 0; - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0x37: /*---------------------------------------------------------------*/ /* FORWARD SPACE BLOCK */ /*---------------------------------------------------------------*/ - /* Forward space to next block according to device type */ - switch (dev->tapedevt) - { - default: - case TAPEDEVT_AWSTAPE: - rc = fsb_awstape (dev, unitstat); - break; - - case TAPEDEVT_HET: - rc = fsb_het (dev, unitstat); - break; - -# if !defined(__APPLE__) - case TAPEDEVT_SCSITAPE: - rc = fsb_scsitape (dev, unitstat); - break; -# endif /* !defined(__APPLE__) */ - - case TAPEDEVT_OMATAPE: - rc = fsb_omatape (dev, unitstat); - break; - - } /* end switch(dev->tapedevt) */ - + /* Forward to next block according to device type */ + rc=dev->tmh->fsb(dev,unitstat,code); /* Exit with unit check status if error condition */ if (rc < 0) + { break; + } /* Exit with unit exception status if tapemark was sensed */ if (rc == 0) { *residual = 0; - *unitstat = CSW_CE | CSW_DE | CSW_UX; + build_senseX(TAPE_BSENSE_READTM,dev,unitstat,code); break; } /* Set normal status */ *residual = 0; - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0x3F: /*---------------------------------------------------------------*/ /* FORWARD SPACE FILE */ /*---------------------------------------------------------------*/ - /* Forward space to next file according to device type */ - switch (dev->tapedevt) - { - default: - case TAPEDEVT_AWSTAPE: - rc = fsf_awstape (dev, unitstat); - break; - - case TAPEDEVT_HET: - rc = fsf_het (dev, unitstat); - break; - -# if !defined(__APPLE__) - case TAPEDEVT_SCSITAPE: - rc = fsf_scsitape (dev, unitstat); - break; -# endif /* !defined(__APPLE__) */ - - case TAPEDEVT_OMATAPE: - rc = fsf_omatape (dev, unitstat); - break; - - } /* end switch(dev->tapedevt) */ + /* Forward to next file according to device type */ + rc=dev->tmh->fsf(dev,unitstat,code); /* Exit with unit check status if error condition */ if (rc < 0) + { break; + } /* Set normal status */ *residual = 0; - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0x43: /*---------------------------------------------------------------*/ /* SYNCHRONIZE */ /*---------------------------------------------------------------*/ - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0x4F: /*---------------------------------------------------------------*/ /* LOCATE BLOCK */ /*---------------------------------------------------------------*/ - /* Only valid on 3480 devices */ - if (dev->devtype != 0x3480) - { - dev->sense[0] = SENSE_CR; - *unitstat = CSW_CE | CSW_DE | CSW_UC; - break; - } - - /* Not valid for OMA tape */ - if (dev->tapedevt == TAPEDEVT_OMATAPE) - { - dev->sense[0] = SENSE_CR; - *unitstat = CSW_CE | CSW_DE | CSW_UC; - break; - } /* Check for minimum count field */ if (count < sizeof(dev->blockid)) { - dev->sense[0] = SENSE_CR; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_BADCOMMAND,dev,unitstat,code); break; } /* Block to seek */ len = sizeof(locblock); + /* locblock = ((U32)(iobuf[3]) << 24) | ((U32)(iobuf[2]) << 16) | ((U32)(iobuf[1]) << 8); + */ + /* Endianness issues with LOCATE BLOCK command */ + /* suggested by a user who prefers to remain anonymous */ + /* updated by ISW */ + locblock = ((U32)(iobuf[1] & 0x3f) << 16) + | ((U32)(iobuf[2]) << 8) + | ((U32)(iobuf[3])); /* Calculate residual byte count */ num = (count < len) ? count : len; *residual = count - num; -# if !defined(__APPLE__) - /* For SCSI tape, issue rewind command */ - if (dev->tapedevt == TAPEDEVT_SCSITAPE) - { - opblk.mt_op = MTREW; - opblk.mt_count = 1; - rc = ioctl (dev->fd, MTIOCTOP, (char*)&opblk); - if (rc < 0) - { - logmsg (_("HHCTA078E Error rewinding %s: %s\n"), - dev->filename, strerror(errno)); - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; - break; - } /* end if(rc) */ - } /* end if(SCSITAPE) */ -# endif /* !defined(__APPLE__) */ - - /* For AWSTAPE file, seek to start of file */ - if (dev->tapedevt == TAPEDEVT_AWSTAPE) - { - rc = lseek (dev->fd, 0, SEEK_SET); - if (rc < 0) - { - /* Handle seek error condition */ - logmsg (_("HHCTA079E Error seeking to start of %s: %s\n"), - dev->filename, strerror(errno)); - - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; - break; - } - } /* end if(AWSTAPE) */ - - /* For HET file, issue rewind */ - if (dev->tapedevt == TAPEDEVT_HET) + rc=dev->tmh->rewind(dev,unitstat,code); + if(rc<0) { - rc = het_rewind (dev->hetb); - if (rc < 0) - { - /* Handle seek error condition */ - logmsg (_("HHCTA080E Error seeking to start of %s: %s(%s)\n"), - dev->filename, het_error(rc), strerror(errno)); - - /* Set unit check with equipment check */ - dev->sense[0] = SENSE_EC; - *unitstat = CSW_CE | CSW_DE | CSW_UC; break; - } - } /* end if(HET) */ + } /* Reset position counters to start of file */ dev->curfilen = 1; @@ -3877,40 +5094,16 @@ long locblock; /* Block Id for Locate Block */ logmsg(_("HHCTA081I Locate block 0x%8.8lX on %4.4X\n"), locblock, dev->devnum); - switch (dev->tapedevt) + while(dev->blockid < locblock && ( rc >= 0 )) { - default: - case TAPEDEVT_AWSTAPE: - rc = 0; - while ((dev->blockid < locblock) && (rc >= 0)) - rc = fsb_awstape(dev, unitstat); - break; - - case TAPEDEVT_HET: - rc = 0; - while ((dev->blockid < locblock) && (rc >= 0)) - rc = fsb_het (dev, unitstat); - break; - -# if !defined(__APPLE__) - case TAPEDEVT_SCSITAPE: - rc = 0; - while ((dev->blockid < locblock) && (rc >= 0)) - rc = fsb_scsitape(dev, unitstat); - break; -# endif /* !defined(__APPLE__) */ - - } /* end switch(dev->tapedevt) */ - + rc=dev->tmh->fsb(dev,unitstat,code); + } if (rc < 0) { - /* Set Unit Check with Equipment Check */ - dev->sense[1] = SENSE1_PER; - *unitstat = CSW_CE | CSW_DE | CSW_UC; break; } + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); - *unitstat = CSW_CE | CSW_DE; break; case 0x77: @@ -3918,8 +5111,7 @@ long locblock; /* Block Id for Locate Block */ /* PERFORM SUBSYSTEM FUNCTION */ /*---------------------------------------------------------------*/ /* Not yet implemented */ - *residual = 0; - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_BADCOMMAND,dev,unitstat,code); break; case 0xCB: /* 9-track 800 bpi */ @@ -3948,7 +5140,27 @@ long locblock; /* Block Id for Locate Block */ /* MODE SET */ /*---------------------------------------------------------------*/ *residual = 0; - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); + break; + + case 0xA4: + /*---------------------------------------------------------------*/ + /* Read and Reset Buffered Log (9347) */ + /*---------------------------------------------------------------*/ + /* Calculate residual byte count */ + num = (count < dev->numsense) ? count : dev->numsense; + *residual = count - num; + if (count < dev->numsense) *more = 1; + + /* Reset SENSE Data */ + memset (dev->sense, 0, sizeof(dev->sense)); + *unitstat=CSW_CE|CSW_DE; + + /* Copy device Buffered log data (Bunch of 0s for now) */ + memcpy (iobuf, dev->sense, num); + + /* Indicate Contengency Allegiance has been cleared */ + dev->sns_pending=0; break; case 0x04: @@ -3960,14 +5172,25 @@ long locblock; /* Block Id for Locate Block */ *residual = count - num; if (count < dev->numsense) *more = 1; + /* If a sense is pending, use it. */ + /* Otherwise, build a STATUS sense */ + + if(!dev->sns_pending) + { + build_senseX(TAPE_BSENSE_UNSOLICITED,dev,unitstat,code); + } + *unitstat=CSW_CE|CSW_DE; /* Need to do that ourselves because */ + /* we might not have gone through */ + /* build_senseX */ + /* Copy device sense bytes to channel I/O buffer */ memcpy (iobuf, dev->sense, num); /* Clear the device sense bytes */ memset (dev->sense, 0, sizeof(dev->sense)); - /* Return unit status */ - *unitstat = CSW_CE | CSW_DE; + /* Indicate Contengency Allegiance has been cleared */ + dev->sns_pending=0; break; case 0x24: @@ -3987,7 +5210,7 @@ long locblock; /* Block Id for Locate Block */ dev->numsense < (U32)num ? dev->numsense : (U32)num); /* Return unit status */ - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0xE4: @@ -3995,10 +5218,10 @@ long locblock; /* Block Id for Locate Block */ /* SENSE ID */ /*---------------------------------------------------------------*/ /* SENSE ID did not exist on the 3803 */ - if (dev->devtype != 0x3480) + /* Changed logic : numdevid is 0 if 0xE4 not supported */ + if (dev->numdevid==0) { - dev->sense[0] = SENSE_CR; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_BADCOMMAND,dev,unitstat,code); break; } @@ -4011,20 +5234,13 @@ long locblock; /* Block Id for Locate Block */ memcpy (iobuf, dev->devid, num); /* Return unit status */ - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0x34: /*---------------------------------------------------------------*/ /* SENSE PATH GROUP ID */ /*---------------------------------------------------------------*/ - /* Command reject if path group feature is not available */ - if (dev->devtype != 0x3480) - { - dev->sense[0] = SENSE_CR; - *unitstat = CSW_CE | CSW_DE | CSW_UC; - break; - } /* Calculate residual byte count */ num = (count < 12) ? count : 12; @@ -4032,15 +5248,21 @@ long locblock; /* Block Id for Locate Block */ if (count < 12) *more = 1; /* Byte 0 is the path group state byte */ + /* iobuf[0] = SPG_PATHSTAT_RESET | SPG_PARTSTAT_IENABLED | SPG_PATHMODE_SINGLE; + */ + iobuf[0]=dev->pgstat; /* Bytes 1-11 contain the path group identifier */ - memcpy (iobuf+1, dev->pgid, 11); + if(num>1) + { + memcpy (iobuf+1, dev->pgid, num-1); + } /* Return unit status */ - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0xAF: @@ -4048,12 +5270,15 @@ long locblock; /* Block Id for Locate Block */ /* SET PATH GROUP ID */ /*---------------------------------------------------------------*/ /* Command reject if path group feature is not available */ + /* Following check removed - performed earlier */ + /* if (dev->devtype != 0x3480) { dev->sense[0] = SENSE_CR; *unitstat = CSW_CE | CSW_DE | CSW_UC; break; } + */ /* Calculate residual byte count */ num = (count < 12) ? count : 12; @@ -4062,14 +5287,14 @@ long locblock; /* Block Id for Locate Block */ /* Control information length must be at least 12 bytes */ if (count < 12) { - dev->sense[0] = SENSE_CR; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_BADCOMMAND,dev,unitstat,code); break; } /* Byte 0 is the path group state byte */ - if ((iobuf[0] & SPG_SET_COMMAND) == SPG_SET_ESTABLISH) + switch((iobuf[0] & SPG_SET_COMMAND)) { + case SPG_SET_ESTABLISH: /* Only accept the new pathgroup id when 1) it has not yet been set (ie contains zeros) or 2) It is set, but we are setting the same value */ @@ -4077,18 +5302,25 @@ long locblock; /* Block Id for Locate Block */ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 11) && memcmp(dev->pgid, iobuf+1, 11)) { - dev->sense[0] = SENSE_CR; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_BADCOMMAND,dev,unitstat,code); break; } - - /* Bytes 1-11 contain the path group identifier */ /* Bytes 1-11 contain the path group identifier */ memcpy (dev->pgid, iobuf+1, 11); + dev->pgstat=SPG_PATHSTAT_GROUPED|SPG_PARTSTAT_IENABLED; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); + break; + case SPG_SET_RESIGN: + default: + dev->pgstat=0; + memset(dev->pgid,0,11); + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); + break; + case SPG_SET_DISBAND: + dev->pgstat=0; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); + break; } - - /* Return unit status */ - *unitstat = CSW_CE | CSW_DE; break; case 0x64: @@ -4098,8 +5330,7 @@ long locblock; /* Block Id for Locate Block */ /* Command reject if device characteristics not available */ if (dev->numdevchar == 0) { - dev->sense[0] = SENSE_CR; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_BADCOMMAND,dev,unitstat,code); break; } @@ -4112,20 +5343,13 @@ long locblock; /* Block Id for Locate Block */ memcpy (iobuf, dev->devchar, num); /* Return unit status */ - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0x9F: /*---------------------------------------------------------------*/ /* LOAD DISPLAY */ /*---------------------------------------------------------------*/ - /* Command reject if load display is not available */ - if (dev->devtype != 0x3480) - { - dev->sense[0] = SENSE_CR; - *unitstat = CSW_CE | CSW_DE | CSW_UC; - break; - } /* Calculate residual byte count */ num = (count < 17) ? count : 17; @@ -4135,22 +5359,44 @@ long locblock; /* Block Id for Locate Block */ issue_mount_msg (dev, iobuf); /* Return unit status */ - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; case 0xB7: - case 0xC7: /*---------------------------------------------------------------*/ - /* ASSIGN/UNASSIGN */ + /* ASSIGN */ /*---------------------------------------------------------------*/ - /* Command reject if path assignment is not supported */ - if (dev->devtype != 0x3480) + + /* Calculate residual byte count */ + num = (count < 11) ? count : 11; + *residual = count - num; + + /* Control information length must be at least 11 bytes */ + if (count < 11) { - dev->sense[0] = SENSE_CR; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_BADCOMMAND,dev,unitstat,code); + break; + } + if((memcmp(iobuf,"\00\00\00\00\00\00\00\00\00\00",11)==0) + || (memcmp(iobuf,dev->pgid,11)==0)) + { + dev->pgstat|=SPG_PARTSTAT_XENABLED; /* Set Explicit Partition Enabled */ + } + else + { + build_senseX(TAPE_BSENSE_BADCOMMAND,dev,unitstat,code); break; } + /* Return unit status */ + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); + break; + + case 0xC7: + /*---------------------------------------------------------------*/ + /* UNASSIGN */ + /*---------------------------------------------------------------*/ + /* Calculate residual byte count */ num = (count < 11) ? count : 11; *residual = count - num; @@ -4158,13 +5404,14 @@ long locblock; /* Block Id for Locate Block */ /* Control information length must be at least 11 bytes */ if (count < 11) { - dev->sense[0] = SENSE_CR; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_BADCOMMAND,dev,unitstat,code); break; } + dev->pgstat=0; /* Reset to All Implicitly enabled */ + memset(dev->pgid,0,11); /* Reset Path group ID password */ /* Return unit status */ - *unitstat = CSW_CE | CSW_DE; + build_senseX(TAPE_BSENSE_STATUSONLY,dev,unitstat,code); break; default: @@ -4172,21 +5419,172 @@ long locblock; /* Block Id for Locate Block */ /* INVALID OPERATION */ /*---------------------------------------------------------------*/ /* Set command reject sense byte, and unit check status */ - dev->sense[0] = SENSE_CR; - *unitstat = CSW_CE | CSW_DE | CSW_UC; + build_senseX(TAPE_BSENSE_BADCOMMAND,dev,unitstat,code); } /* end switch(code) */ - /* Build sense bytes */ - build_sense (dev); - } /* end function tapedev_execute_ccw */ +/* +typedef struct _TAPEMEDIA_HANDLER { + int *open(DEVBLK *,BYTE *unitstat,BYTE code); + int *close(DEVBLK *,BYTE *unitstat,BYTE code); + int *read(DEVBLK *,BYTE *buf,BYTE *unitstat,BYTE code); + int *write(DEVBLK *,BYTE *buf,U16 blklen,BYTE *unitstat,BYTE code); + int *rewind(DEVBLK *,BYTE *unitstat,BYTE code); + int *bsb(DEVBLK *,BYTE *unitstat,BYTE code); + int *fsb(DEVBLK *,BYTE *unitstat,BYTE code); + int *bsf(DEVBLK *,BYTE *unitstat,BYTE code); + int *fsf(DEVBLK *,BYTE *unitstat,BYTE code); + int *wtm(DEVBLK *,BYTE *unitstat,BYTE code); +} TAPEMEDIA_HANDLER; +*/ +static int return_true3(DEVBLK *dev,BYTE *unitstat,BYTE code) +{ + UNREFERENCED(dev); + UNREFERENCED(unitstat); + UNREFERENCED(code); + return 1; +} +static int return_false1(DEVBLK *dev) +{ + UNREFERENCED(dev); + return 0; +} +static int write_READONLY(DEVBLK *dev,BYTE *unitstat,BYTE code) +{ + build_senseX(TAPE_BSENSE_WRITEPROTECT,dev,unitstat,code); + return -1; +} +static int write_READONLY5(DEVBLK *dev,BYTE *bfr,U16 blklen,BYTE *unitstat,BYTE code) +{ + UNREFERENCED(bfr); + UNREFERENCED(blklen); + build_senseX(TAPE_BSENSE_WRITEPROTECT,dev,unitstat,code); + return -1; +} +static TAPEMEDIA_HANDLER tmh_aws = { + &open_awstape, + &close_awstape, + &read_awstape, + &write_awstape, + &rewind_awstape, + &bsb_awstape, + &fsb_awstape, + &bsf_awstape, + &fsf_awstape, + &write_awsmark, + NULL, /* DSE */ + NULL, /* ERG */ + &return_true3, + passedeot_awstape}; /* Get Open Status */ + +static TAPEMEDIA_HANDLER tmh_het = { + &open_het, + &close_het, + &read_het, + &write_het, + &rewind_het, + &bsb_het, + &fsb_het, + &bsf_het, + &fsf_het, + &write_hetmark, + NULL, /* DSE */ + NULL, /* ERG */ + &return_true3, + passedeot_het}; /* Get Open Status */ + +# if !defined(__APPLE__) +static TAPEMEDIA_HANDLER tmh_scsi = { + &open_scsitape, + &close_scsitape, + &read_scsitape, + &write_scsitape, + &rewind_scsitape, + &bsb_scsitape, + &fsb_scsitape, + &bsf_scsitape, + &fsf_scsitape, + &write_scsimark, + NULL, /* DSE */ + NULL, /* ERG */ + &driveready_scsitape, /* Tape door opened */ + &return_false1}; /* Passed EOT marker */ +# endif /* !defined(__APPLE__) */ + +static TAPEMEDIA_HANDLER tmh_oma = { + &open_omatape, + &close_omatape, + &read_omatape, + &write_READONLY5, /* WRITE */ + &rewind_omatape, + &bsb_omatape, + &fsb_omatape, + &bsf_omatape, + &fsf_omatape, + &write_READONLY, /* WTM */ + &write_READONLY, /* DSE */ + &write_READONLY, /* ERG */ + &return_true3, + &return_false1}; + + +#if defined(OPTION_DYNAMIC_LOAD) +static +#endif + DEVHND tapedev_device_hndinfo = { &tapedev_init_handler, &tapedev_execute_ccw, &tapedev_close_device, &tapedev_query_device, - NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + +/* Libtool static name colision resolution */ +/* note : lt_dlopen will look for symbol & modulename_LTX_symbol */ +#if !defined(HDL_BUILD_SHARED) && defined(HDL_USE_LIBTOOL) +#define hdl_ddev hdt3420_LTX_hdl_ddev +#define hdl_depc hdt3420_LTX_hdl_depc +#define hdl_reso hdt3420_LTX_hdl_reso +#define hdl_init hdt3420_LTX_hdl_init +#define hdl_fini hdt3420_LTX_hdl_fini +#endif + +#if defined(OPTION_DYNAMIC_LOAD) +HDL_DEPENDENCY_SECTION; +{ + HDL_DEPENDENCY(HERCULES); + HDL_DEPENDENCY(DEVBLK); + HDL_DEPENDENCY(SYSBLK); +} +END_DEPENDENCY_SECTION; + + +#if defined(WIN32) && !defined(HDL_USE_LIBTOOL) +#undef sysblk +HDL_RESOLVER_SECTION; +{ + HDL_RESOLVE_PTRVAR( psysblk, sysblk ); +} +END_RESOLVER_SECTION; +#endif + + +HDL_DEVICE_SECTION; +{ + HDL_DEVICE(3410, tapedev_device_hndinfo ); + HDL_DEVICE(3411, tapedev_device_hndinfo ); + HDL_DEVICE(3420, tapedev_device_hndinfo ); + HDL_DEVICE(3480, tapedev_device_hndinfo ); + HDL_DEVICE(3490, tapedev_device_hndinfo ); + HDL_DEVICE(9347, tapedev_device_hndinfo ); + HDL_DEVICE(9348, tapedev_device_hndinfo ); + HDL_DEVICE(8809, tapedev_device_hndinfo ); + HDL_DEVICE(3422, tapedev_device_hndinfo ); + HDL_DEVICE(3430, tapedev_device_hndinfo ); +} +END_DEVICE_SECTION; +#endif diff --git a/tapedev.h b/tapedev.h new file mode 100644 index 0000000..71a1f4e --- /dev/null +++ b/tapedev.h @@ -0,0 +1,199 @@ +#ifndef __TAPEDEV_H__ +#define __TAPEDEV_H__ +#include "hercules.h" +/*-------------------------------------------------------------------*/ +/* Definitions for 3420/3480 sense bytes */ +/*-------------------------------------------------------------------*/ +#define SENSE1_TAPE_NOISE 0x80 /* Noise */ +#define SENSE1_TAPE_TUA 0x40 /* TU Status A (ready) */ +#define SENSE1_TAPE_TUB 0x20 /* TU Status B (not ready) */ +#define SENSE1_TAPE_7TRK 0x10 /* 7-track feature */ +#define SENSE1_TAPE_LOADPT 0x08 /* Tape is at load point */ +#define SENSE1_TAPE_WRT 0x04 /* Tape is in write status */ +#define SENSE1_TAPE_FP 0x02 /* File protect status */ +#define SENSE1_TAPE_NCA 0x01 /* Not capable */ + +#define SENSE4_TAPE_EOT 0x20 /* Tape indicate (EOT) */ + +#define SENSE5_TAPE_SRDCHK 0x08 /* Start read check */ +#define SENSE5_TAPE_PARTREC 0x04 /* Partial record */ + +#define SENSE7_TAPE_LOADFAIL 0x01 /* Load failure */ + +/*-------------------------------------------------------------------*/ +/* ISW : Internal code to build Device Dependent Sense */ +/*-------------------------------------------------------------------*/ +#define TAPE_BSENSE_TAPEUNLOADED 0 /* I/O Attempted but no tape loaded */ +#define TAPE_BSENSE_TAPELOADFAIL 1 /* I/O and load failed */ +#define TAPE_BSENSE_READFAIL 2 /* Error reading block */ +#define TAPE_BSENSE_WRITEFAIL 3 /* Error writing block */ +#define TAPE_BSENSE_BADCOMMAND 4 /* The CCW code is not known */ + /* or sequence error */ +#define TAPE_BSENSE_INCOMPAT 5 /* The CCW code is known but is */ + /* not unsupported */ +#define TAPE_BSENSE_WRITEPROTECT 6 /* The Write CCW code was issued */ + /* to a read-only media */ +#define TAPE_BSENSE_EMPTYTAPE 7 /* A read was issued but the tape */ + /* is empty */ +#define TAPE_BSENSE_ENDOFTAPE 8 /* A read was issued past the end + of the tape or a write was issued + and there is no space left */ +#define TAPE_BSENSE_LOADPTERR 9 /* A BSF/BSR/RdBW was attempted at + BOT */ +#define TAPE_BSENSE_FENCED 10 /* Media damaged - unload/reload + required */ +#define TAPE_BSENSE_BADALGORITHM 11 /* Bad compression - + HET tape compressed with an + unsuported method */ +#define TAPE_BSENSE_TAPEUNLOADED2 12 /* Sucessful Rewind Unload operation */ +#define TAPE_BSENSE_STATUSONLY 13 /* No exception occured */ +#define TAPE_BSENSE_LOCATEERR 14 /* Cannot find a block or TM */ +#define TAPE_BSENSE_READTM 15 /* A Tape Mark was read */ +/* #define TAPE_BSENSE_WRITEPASSEOT 16 *//* Tape has passed the EOT marker on a write operation */ +/* WRITEPASSEOT retired : checked in STATUSONLY when code is a tape motion write op (write/wtm/erg) */ +#define TAPE_BSENSE_BLOCKSHORT 17 /* Short Tape block */ +#define TAPE_BSENSE_ITFERROR 18 /* Interface error (scsi tape driver unexpected err) */ +#define TAPE_BSENSE_REWINDFAILED 19 /* Rewind operation failed */ +#define TAPE_BSENSE_UNSOLICITED 20 /* Sense without UC */ +/*-------------------------------------------------------------------*/ +/* Definitions for 3480 commands */ +/*-------------------------------------------------------------------*/ + +/* Format control byte for Load Display command */ +#define FCB_FS 0xE0 /* Format control bits... */ +#define FCB_FS_NODISP 0x60 /* Do not display messages */ +#define FCB_FS_READYGO 0x00 /* Display msg until motion */ +#define FCB_FS_UNMOUNT 0x20 /* Display msg until unld */ + /* no-op if no tape loaded */ +#define FCB_FS_MOUNT 0x40 /* Display msg until loaded */ + /* no-op if tape loaded in dr*/ +#define FCB_FS_UMOUNTMOUNT 0xE0 /* Display msg 1 Until */ + /* Tape is unloaded, then */ + /* msg 2 until tape is loaded*/ + /* msg 1 not displayed if */ + /* no tape is loaded in drive*/ +#define FCB_AM 0x10 /* Alternate messages */ +#define FCB_BM 0x08 /* Blinking message */ +#define FCB_DM 0x04 /* Display low/high message */ +#define FCB_RESV 0x02 /* Reserved */ +#define FCB_AL 0x01 /* Activate AutoLoader on */ + /* Mount/Unmount msgs */ + +/* Path state byte for Sense Path Group ID command */ +#define SPG_PATHSTAT 0xC0 /* Pathing status bits... */ +#define SPG_PATHSTAT_RESET 0x00 /* ...reset */ +#define SPG_PATHSTAT_RESV 0x40 /* ...reserved bit setting */ +#define SPG_PATHSTAT_UNGROUPED 0x80 /* ...ungrouped */ +#define SPG_PATHSTAT_GROUPED 0xC0 /* ...grouped */ +#define SPG_PARTSTAT 0x30 /* Partitioning status bits..*/ +#define SPG_PARTSTAT_IENABLED 0x00 /* ...implicitly enabled */ +#define SPG_PARTSTAT_RESV 0x10 /* ...reserved bit setting */ +#define SPG_PARTSTAT_DISABLED 0x20 /* ...disabled */ +#define SPG_PARTSTAT_XENABLED 0x30 /* ...explicitly enabled */ +#define SPG_PATHMODE 0x08 /* Path mode bit... */ +#define SPG_PATHMODE_SINGLE 0x00 /* ...single path mode */ +#define SPG_PATHMODE_RESV 0x08 /* ...reserved bit setting */ +#define SPG_RESERVED 0x07 /* Reserved bits, must be 0 */ + +/* Function control byte for Set Path Group ID command */ +#define SPG_SET_MULTIPATH 0x80 /* Set multipath mode */ +#define SPG_SET_COMMAND 0x60 /* Set path command bits... */ +#define SPG_SET_ESTABLISH 0x00 /* ...establish group */ +#define SPG_SET_DISBAND 0x20 /* ...disband group */ +#define SPG_SET_RESIGN 0x40 /* ...resign from group */ +#define SPG_SET_COMMAND_RESV 0x60 /* ...reserved bit setting */ +#define SPG_SET_RESV 0x1F /* Reserved bits, must be 0 */ + +/*-------------------------------------------------------------------*/ +/* Definitions for tape device type field in device block */ +/*-------------------------------------------------------------------*/ +#define TAPEDEVT_AWSTAPE 1 /* AWSTAPE format disk file */ +#define TAPEDEVT_OMATAPE 2 /* OMATAPE format disk files */ +#define TAPEDEVT_SCSITAPE 3 /* Physical SCSI tape */ +#define TAPEDEVT_HET 4 /* HET format disk file */ + +/*-------------------------------------------------------------------*/ +/* Structure definition for tape block headers */ +/*-------------------------------------------------------------------*/ + +/* + * The integer fields in the HET, AWSTAPE and OMATAPE headers are + * encoded in the Intel format (i.e. the bytes of the integer are held + * in reverse order). For this reason the integers are defined as byte + * arrays, and the bytes are fetched individually in order to make + * the code portable across architectures which use either the Intel + * format or the S/370 format. + * + * Block length fields contain the length of the emulated tape block + * and do not include the length of the header. + * + * For the AWSTAPE and HET formats: + * - the first block has a previous block length of zero + * - a tapemark is indicated by a header with a block length of zero + * and a flag byte of X'40' + * + * For the OMATAPE format: + * - the first block has a previous header offset of X'FFFFFFFF' + * - a tapemark is indicated by a header with a block length of + * X'FFFFFFFF' + * - each block is followed by padding bytes if necessary to ensure + * that the next header starts on a 16-byte boundary + * + */ + +typedef struct _AWSTAPE_BLKHDR { + HWORD curblkl; /* Length of this block */ + HWORD prvblkl; /* Length of previous block */ + BYTE flags1; /* Flags byte 1 */ + BYTE flags2; /* Flags byte 2 */ + } AWSTAPE_BLKHDR; + +/* Definitions for AWSTAPE_BLKHDR flags byte 1 */ +#define AWSTAPE_FLAG1_NEWREC 0x80 /* Start of new record */ +#define AWSTAPE_FLAG1_TAPEMARK 0x40 /* Tape mark */ +#define AWSTAPE_FLAG1_ENDREC 0x20 /* End of record */ + +typedef struct _OMATAPE_BLKHDR { + FWORD curblkl; /* Length of this block */ + FWORD prvhdro; /* Offset of previous block + header from start of file */ + FWORD omaid; /* OMA identifier (contains + ASCII characters "@HDF") */ + FWORD resv; /* Reserved */ + } OMATAPE_BLKHDR; + +/*-------------------------------------------------------------------*/ +/* Structure definition for OMA tape descriptor array */ +/*-------------------------------------------------------------------*/ +typedef struct _OMATAPE_DESC { + int fd; /* File Descriptor for the file */ + BYTE filename[256]; /* Filename of data file */ + BYTE format; /* H=HEADERS,T=TEXT,F=FIXED,X=Tape Mark */ + BYTE resv; /* Reserved for alignment */ + U16 blklen; /* Fixed block length */ + } OMATAPE_DESC; + +typedef struct _TAPEMEDIA_HANDLER { + int (* open)(DEVBLK *,BYTE *unitstat,BYTE code); + void (* close)(DEVBLK *); + int (* read)(DEVBLK *,BYTE *buf,BYTE *unitstat,BYTE code); + int (* write)(DEVBLK *,BYTE *buf,U16 blklen,BYTE *unitstat,BYTE code); + int (* rewind)(DEVBLK *,BYTE *unitstat,BYTE code); + int (* bsb)(DEVBLK *,BYTE *unitstat,BYTE code); + int (* fsb)(DEVBLK *,BYTE *unitstat,BYTE code); + int (* bsf)(DEVBLK *,BYTE *unitstat,BYTE code); + int (* fsf)(DEVBLK *,BYTE *unitstat,BYTE code); + int (* wtm)(DEVBLK *,BYTE *unitstat,BYTE code); + int (* dse)(DEVBLK *,BYTE *unitstat,BYTE code); + int (* erg)(DEVBLK *,BYTE *unitstat,BYTE code); + int (* tapeloaded)(DEVBLK *,BYTE *unitstat,BYTE code); + int (* passedeot)(DEVBLK *); +} TAPEMEDIA_HANDLER; + +typedef struct _TAPEAUTOLOADENTRY { + BYTE *filename; + int argc; + char **argv; +} TAPEAUTOLOADENTRY; + +#endif diff --git a/tapemap.c b/tapemap.c index 7d76916..25f07b3 100644 --- a/tapemap.c +++ b/tapemap.c @@ -43,8 +43,6 @@ long curpos = 0; long prevpos = 0; #endif /*EXTERNALGUI*/ -SYSBLK sysblk; /* Currently only used for codepage mapping */ - /*-------------------------------------------------------------------*/ /* TAPEMAP main entry point */ /*-------------------------------------------------------------------*/ @@ -62,18 +60,8 @@ int minblksz; /* Minimum block size */ int maxblksz; /* Maximum block size */ BYTE labelrec[81]; /* Standard label (ASCIIZ) */ AWSTAPE_BLKHDR awshdr; /* AWSTAPE block header */ -char *scodepage; - - /* set_codepage() uses the logmsg macro which requires msgpipew */ - sysblk.msgpipew = stdout; - if(!sysblk.codepage) - { - if((scodepage = getenv("HERCULES_CP"))) - set_codepage(scodepage); - else - set_codepage("default"); - } + set_codepage(NULL); #ifdef EXTERNALGUI if (argc >= 1 && strncmp(argv[argc-1],"EXTERNALGUI",11) == 0) diff --git a/tapesplt.c b/tapesplt.c index 1461511..393278a 100644 --- a/tapesplt.c +++ b/tapesplt.c @@ -31,9 +31,7 @@ static BYTE vollbl[] = "\xE5\xD6\xD3"; /* EBCDIC characters "VOL" */ static BYTE hdrlbl[] = "\xC8\xC4\xD9"; /* EBCDIC characters "HDR" */ static BYTE eoflbl[] = "\xC5\xD6\xC6"; /* EBCDIC characters "EOF" */ static BYTE eovlbl[] = "\xC5\xD6\xE5"; /* EBCDIC characters "EOV" */ -static BYTE buf[65500]; - -SYSBLK sysblk; /* Currently only used for codepage mapping */ +static BYTE buf[65536]; #ifdef EXTERNALGUI /* Special flag to indicate whether or not we're being @@ -69,18 +67,8 @@ int outfilecount; /* Current # files copied */ int files2copy; /* Current # files to copy */ BYTE labelrec[81]; /* Standard label (ASCIIZ) */ AWSTAPE_BLKHDR awshdr; /* AWSTAPE block header */ -char *scodepage; - - /* set_codepage() uses the logmsg macro which requires msgpipew */ - sysblk.msgpipew = stdout; - if(!sysblk.codepage) - { - if((scodepage = getenv("HERCULES_CP"))) - set_codepage(scodepage); - else - set_codepage("default"); - } + set_codepage(NULL); #ifdef EXTERNALGUI if (argc >= 1 && strncmp(argv[argc-1],"EXTERNALGUI",11) == 0) diff --git a/timer.c b/timer.c index 288164a..a2cf77c 100644 --- a/timer.c +++ b/timer.c @@ -9,6 +9,8 @@ #include "feat390.h" #include "feat370.h" +int ecpsvm_testvtimer(REGS *,int); + void check_timer_event(void); /*-------------------------------------------------------------------*/ @@ -85,8 +87,8 @@ REGS *regs; /* -> CPU register context */ PSA_3XX *psa; /* -> Prefixed storage area */ S32 itimer; /* Interval timer value */ S32 olditimer; /* Previous interval timer */ -#if defined(OPTION_MIPS_COUNTING) && defined(_FEATURE_SIE) -int itimer_diff; /* TOD difference in TU */ +#if defined(OPTION_MIPS_COUNTING) && ( defined(_FEATURE_SIE) || defined(_FEATURE_ECPSVM) ) +S32 itimer_diff; /* TOD difference in TU */ #endif U32 intmask = 0; /* Interrupt CPU mask */ @@ -176,9 +178,11 @@ U32 intmask = 0; /* Interrupt CPU mask */ * [3] Check for interval timer interrupt * *-------------------------------------------*/ -#if defined(OPTION_MIPS_COUNTING) && defined(_FEATURE_SIE) - /* Calculate diff in interval timer units */ - itimer_diff = (int)((3*sysblk.todclock_diff)/625); +#if defined(OPTION_MIPS_COUNTING) && ( defined(_FEATURE_SIE) || defined(_FEATURE_ECPSVM) ) + /* Calculate diff in interval timer units plus rounding to improve accuracy */ + itimer_diff = (S32) ((((6*sysblk.todclock_diff)/625)+1) >> 1); + if (itimer_diff <= 0) /* Handle gettimeofday low */ + itimer_diff = 1; /* resolution problems */ #endif if(regs->arch_mode == ARCH_370) @@ -189,7 +193,7 @@ U32 intmask = 0; /* Interrupt CPU mask */ /* Decrement the location 80 timer */ FETCH_FW(itimer,psa->inttimer); olditimer = itimer; - + /* The interval timer is decremented as though bit 23 is decremented by one every 1/300 of a second. This comes out to subtracting 768 (X'300') every 1/100 of a second. @@ -198,20 +202,35 @@ U32 intmask = 0; /* Interrupt CPU mask */ comes out to 75 on the Alpha, with its 1024/second tick interval. See 370 POO page 4-29. (ESA doesn't even have an interval timer.) */ -#if defined(OPTION_MIPS_COUNTING) && defined(_FEATURE_SIE) +#if defined(OPTION_MIPS_COUNTING) && ( defined(_FEATURE_SIE) || defined(_FEATURE_ECPSVM) ) itimer -= itimer_diff; #else itimer -= 76800 / CLK_TCK; #endif STORE_FW(psa->inttimer,itimer); - + /* Set interrupt flag and interval timer interrupt pending if the interval timer went from positive to negative */ if (itimer < 0 && olditimer >= 0) { +#if defined(_FEATURE_ECPSVM) + regs->rtimerint=1; /* To resolve concurrent V/R Int Timer Ints */ +#endif + ON_IC_ITIMER(regs); + intmask |= regs->cpumask; + } +#if defined(_FEATURE_ECPSVM) +#if defined(OPTION_MIPS_COUNTING) + if(ecpsvm_testvtimer(regs,itimer_diff)==0) +#else /* OPTION_MIPS_COUNTING */ + if(ecpsvm_testvtimer(regs,76800 / CLK_TCK)==0) +#endif /* OPTION_MIPS_COUNTING */ + { ON_IC_ITIMER(regs); intmask |= regs->cpumask; } +#endif /* _FEATURE_ECPSVM */ + } /*if(regs->arch_mode == ARCH_370)*/ #if defined(_FEATURE_SIE) @@ -224,7 +243,7 @@ U32 intmask = 0; /* Interrupt CPU mask */ /* Decrement the location 80 timer */ FETCH_FW(itimer,regs->guestregs->sie_psa->inttimer); olditimer = itimer; - + #if defined(OPTION_MIPS_COUNTING) itimer -= itimer_diff; #else @@ -243,6 +262,7 @@ U32 intmask = 0; /* Interrupt CPU mask */ } #endif /*defined(_FEATURE_SIE)*/ + } /* end for(cpu) */ /* If a timer interrupt condition was detected for any CPU @@ -280,9 +300,21 @@ struct timeval tv; /* Structure for gettimeofday and select function calls */ UNREFERENCED(argp); + /* Set root mode in order to set priority */ + SETMODE(ROOT); + + /* Set CPU thread priority */ + if (setpriority(PRIO_PROCESS, 0, sysblk.todprio)) + logmsg (_("HHCTT001W Timer thread set priority %d failed: %s\n"), + sysblk.todprio, strerror(errno)); + + /* Back to user mode */ + SETMODE(USER); + /* Display thread started message on control panel */ - logmsg (_("HHCCP012I Timer thread started: tid="TIDPAT", pid=%d\n"), - thread_id(), getpid()); + logmsg (_("HHCTT002I Timer thread started: tid="TIDPAT", pid=%d, " + "priority=%d\n"), + thread_id(), getpid(), getpriority(PRIO_PROCESS,0)); #ifdef OPTION_TODCLOCK_DRAG_FACTOR /* Get current time */ @@ -328,6 +360,11 @@ struct timeval tv; /* Structure for gettimeofday now = now * 1000000 + tv.tv_usec; interval = (int)(now - then); +#if defined(OPTION_SHARED_DEVICES) + sysblk.shrdrate = sysblk.shrdcount; + sysblk.shrdcount = 0; +#endif + for (cpu = 0; cpu < MAX_CPU_ENGINES; cpu++) { /* Point to the CPU register context */ @@ -382,7 +419,7 @@ struct timeval tv; /* Structure for gettimeofday } /* end while */ - logmsg (_("HHCCP013I Timer thread ended\n")); + logmsg (_("HHCTT003I Timer thread ended\n")); return NULL; diff --git a/tt32api.h b/tt32api.h index e41eb93..81b620f 100644 --- a/tt32api.h +++ b/tt32api.h @@ -9,22 +9,36 @@ * ********************************************************************************** - Copyright 2002, Software Development Laboratories (aka "Fish" (David B. Trout)). - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that:(1) source code distributions - retain the above copyright notice and this paragraph in its entirety, (2) - distributions including binary code include the above copyright notice and - this paragraph in its entirety in the documentation or other materials provided - with the distribution, and (3) all advertising materials mentioning features - or use of this software display the following acknowledgement: "This product - includes software developed by Software Development Laboratories (aka "Fish" - (David B. Trout))." Neither the name Software Development Laboratories nor the - name "Fish" nor the name David B. Trout may be used to endorse or promote - products derived from this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE. + Copyright (c) 2002-2003, + Software Development Laboratories (aka "Fish" (David B. Trout)). + + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + o Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + o Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + o Neither the name of Software Development Laboratories nor the name "Fish" + nor the name David B. Trout nor the names of any of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. ********************************************************************************** * @@ -34,6 +48,8 @@ * -------- --------- ------------------------------------------------------- * * 12/22/01 1.0.0 Created. + * 07/20/02 2.0.0 (JAP) LCS modifications/enhancements. + * 07/02/03 2.0.2 (Fish) use std 'uint32_t' type instead of Win32 DWORD * \**********************************************************************************/ @@ -55,48 +71,49 @@ extern "C" struct tt32ctl { - union + union { - char ctln_name[IFNAMSIZ]; // Interface name, e.g. "en0". + char ctln_name[IFNAMSIZ]; // Interface name, e.g. "en0". } tt32_ctln; union { - int ctlu_devbuffsize; // Kernel buffer size - int ctlu_iobuffsize; // Read buffer size - int ctlu_readtimeout; // Read timeout value + int ctlu_devbuffsize; // Kernel buffer size + int ctlu_iobuffsize; // Read buffer size + int ctlu_readtimeout; // Read timeout value } tt32_ctlu; }; -#define tt32ctl_name tt32_ctln.ctln_name -#define tt32ctl_devbuffsize tt32_ctlu.ctlu_devbuffsize -#define tt32ctl_iobuffsize tt32_ctlu.ctlu_iobuffsize -#define tt32ctl_readtimeout tt32_ctlu.ctlu_readtimeout +#define tt32ctl_name tt32_ctln.ctln_name +#define tt32ctl_devbuffsize tt32_ctlu.ctlu_devbuffsize +#define tt32ctl_iobuffsize tt32_ctlu.ctlu_iobuffsize +#define tt32ctl_readtimeout tt32_ctlu.ctlu_readtimeout typedef struct _tagTT32STATS { - DWORD dwStructSize; // size of this structure - DWORD dwKernelBuffSize; // size of kernel capture buffer - DWORD dwReadBuffSize; // size of dll I/O buffer - DWORD dwMaxBytesReceived; // max dll I/O bytes received + uint32_t dwStructSize; // size of this structure + uint32_t dwKernelBuffSize; // size of kernel capture buffer + uint32_t dwReadBuffSize; // size of dll I/O buffer + uint32_t dwMaxBytesReceived; // max dll I/O bytes received - __int64 n64WriteCalls; // total #of write requests - __int64 n64WriteIOs; // total #of write I/Os + int64_t n64WriteCalls; // total #of write requests + int64_t n64WriteIOs; // total #of write I/Os - __int64 n64ReadCalls; // total #of read requests - __int64 n64ReadIOs; // total #of read I/Os + int64_t n64ReadCalls; // total #of read requests + int64_t n64ReadIOs; // total #of read I/Os - __int64 n64PacketsRead; // total #of packets read - __int64 n64PacketsWritten; // total #of packets written + int64_t n64PacketsRead; // total #of packets read + int64_t n64PacketsWritten; // total #of packets written - __int64 n64BytesRead; // total #of bytes read - __int64 n64BytesWritten; // total #of bytes written + int64_t n64BytesRead; // total #of bytes read + int64_t n64BytesWritten; // total #of bytes written - __int64 n64InternalPackets; // total #of packets handled internally - __int64 n64IgnoredPackets; // total #of packets ignored + int64_t n64InternalPackets; // total #of packets handled internally + int64_t n64IgnoredPackets; // total #of packets ignored } TT32STATS, *PTT32STATS; + #ifndef EXPORT #define EXPORT /*(we must be importing instead of exporting)*/ #endif @@ -120,9 +137,9 @@ extern int WINAPI EXPORT tuntap32_ioctl (int fd, int request extern int WINAPI EXPORT tuntap32_get_stats (int fd, TT32STATS* stats); extern const char* WINAPI EXPORT tuntap32_get_default_iface (); -// For compatability with previous releases -extern int WINAPI EXPORT tuntap32_open_ip_tuntap (char* virtualipaddr, char* gatewayipaddr, - u_long capturebuffersize, u_long iobuffersize); +// For compatability with previous releases (do not use if at all possible!) +extern int WINAPI EXPORT tuntap32_open_ip_tuntap (char* virtualipaddr, char* gatewayipaddr, + u_long capturebuffersize, u_long iobuffersize); extern int WINAPI EXPORT tuntap32_write_ip_tun (int fd, u_char* buffer, u_long len); extern int WINAPI EXPORT tuntap32_read_ip_tap (int fd, u_char* buffer, u_long len, u_long timeout); extern int WINAPI EXPORT tuntap32_close_ip_tuntap (int fd); @@ -143,7 +160,7 @@ typedef int (WINAPI *ptuntap32_ioctl) (int,int,char*); typedef int (WINAPI *ptuntap32_get_stats) (int fd, TT32STATS* stats); typedef const char* (WINAPI *ptuntap32_get_default_iface)(); -// For compatability with previous releases +// For compatability with previous releases (do not use if at all possible!) typedef int (WINAPI *ptuntap32_open_ip_tuntap) (char*,char*,u_long,u_long); typedef int (WINAPI *ptuntap32_write_ip_tun) (int,u_char*,u_long); typedef int (WINAPI *ptuntap32_read_ip_tap) (int,u_char*,u_long,u_long); diff --git a/tuntap.c b/tuntap.c index 6d9b38a..18f8b3c 100644 --- a/tuntap.c +++ b/tuntap.c @@ -33,6 +33,19 @@ static int IFC_IOCtl( int fd, int iRequest, char* argp ); #endif // !defined( WIN32 ) +static int ifc_fd[2] = { -1, -1 }; +static pid_t ifc_pid = 0; + + +static void tuntap_term(void) +{ + close(ifc_fd[0]); + close(ifc_fd[1]); + ifc_fd[0] = ifc_fd[1] = -1; + kill(ifc_pid, SIGINT); +} + + // ==================================================================== // Primary Module Entry Points // ==================================================================== @@ -536,7 +549,6 @@ static int IFC_IOCtl( int fd, int iRequest, char* argp ) { char* pszCfgCmd; // Interface config command int rc; - pid_t ifc_pid = 0; CTLREQ ctlreq; UNREFERENCED( fd ); @@ -557,9 +569,9 @@ static int IFC_IOCtl( int fd, int iRequest, char* argp ) memcpy( &ctlreq.iru.ifreq, argp, sizeof( struct ifreq ) ); } - if( sysblk.ifcfd[0] == -1 && sysblk.ifcfd[1] == -1 ) + if( ifc_fd[0] == -1 && ifc_fd[1] == -1 ) { - if( socketpair( AF_UNIX, SOCK_STREAM, 0, sysblk.ifcfd ) < 0 ) + if( socketpair( AF_UNIX, SOCK_STREAM, 0, ifc_fd ) < 0 ) { logmsg( _("HHCTU025E Call to socketpair failed: %s\n"), strerror( errno ) ); @@ -583,9 +595,24 @@ static int IFC_IOCtl( int fd, int iRequest, char* argp ) // The child process executes the configuration command if( ifc_pid == 0 ) { - dup2( sysblk.ifcfd[1], STDIN_FILENO ); - dup2( fileno( sysblk.msgpipew ), STDOUT_FILENO ); - dup2( fileno( sysblk.msgpipew ), STDERR_FILENO ); + /* @ISW@ Close all file descriptors + * (except ifc_fd[1] and STDOUT FILENO) + * (otherwise some devices are never closed) + * (ex: SCSI tape devices can never be re-opened) + */ + struct rlimit rlim; + int i; + getrlimit(RLIMIT_NOFILE,&rlim); + for(i=0;(unsigned int)i<rlim.rlim_max;i++) + { + if(i!=ifc_fd[1] && i!=STDOUT_FILENO) + { + close(i); + } + } + /* @ISW@ Close spurious FDs END */ + dup2( ifc_fd[1], STDIN_FILENO ); + dup2( STDOUT_FILENO, STDERR_FILENO ); // Execute the interface configuration command rc = execlp( pszCfgCmd, pszCfgCmd, NULL ); @@ -597,13 +624,14 @@ static int IFC_IOCtl( int fd, int iRequest, char* argp ) exit( 127 ); } - sysblk.ifcpid = ifc_pid; + /* Terminate TunTap on shutdown */ + hdl_adsc(tuntap_term, NULL); } // Populate some common fields ctlreq.iType = 1; - write( sysblk.ifcfd[0], &ctlreq, CTLREQ_SIZE ); + write( ifc_fd[0], &ctlreq, CTLREQ_SIZE ); return 0; } diff --git a/util/Makefile.am b/util/Makefile.am index 99f2fba..04cd62a 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -1,5 +1,5 @@ bin_SCRIPTS = dasdlist -dist_pkgdata_DATA = cckddump.hla rawstape.jcl tapeconv.jcl zzsacard.bin +dist_pkgdata_DATA = cckddump.hla awswrite.jcl rawstape.jcl tapeconv.jcl zzsacard.bin EXTRA_DIST = dasdlist dasdlist.bat diff --git a/util/Makefile.in b/util/Makefile.in index 305d794..723a185 100644 --- a/util/Makefile.in +++ b/util/Makefile.in @@ -65,16 +65,27 @@ EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ PATH_SEPARATOR = @PATH_SEPARATOR@ AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +EGREP = @EGREP@ +F77 = @F77@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ HAVE_LIB = @HAVE_LIB@ +INCLTDL = @INCLTDL@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ @@ -82,16 +93,23 @@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LIB = @LIB@ +LIBADD_DL = @LIBADD_DL@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ +LIBLTDL = @LIBLTDL@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LN_S = @LN_S@ LTLIB = @LTLIB@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ MAINT = @MAINT@ MKINSTALLDIRS = @MKINSTALLDIRS@ +OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POSUB = @POSUB@ RANLIB = @RANLIB@ +RC = @RC@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ @@ -99,9 +117,10 @@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ +modexecdir = @modexecdir@ bin_SCRIPTS = dasdlist -dist_pkgdata_DATA = cckddump.hla rawstape.jcl tapeconv.jcl zzsacard.bin +dist_pkgdata_DATA = cckddump.hla awswrite.jcl rawstape.jcl tapeconv.jcl zzsacard.bin EXTRA_DIST = dasdlist dasdlist.bat subdir = util @@ -143,6 +162,15 @@ uninstall-binSCRIPTS: echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool uninstall-info-am: dist_pkgdataDATA_INSTALL = $(INSTALL_DATA) install-dist_pkgdataDATA: $(dist_pkgdata_DATA) @@ -224,11 +252,11 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic mostlyclean-am +clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -distclean-am: clean-am distclean-generic +distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am @@ -254,20 +282,21 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-generic +mostlyclean-am: mostlyclean-generic mostlyclean-libtool uninstall-am: uninstall-binSCRIPTS uninstall-dist_pkgdataDATA \ uninstall-info-am -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am info info-am install \ - install-am install-binSCRIPTS install-data install-data-am \ - install-dist_pkgdataDATA install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - uninstall uninstall-am uninstall-binSCRIPTS \ - uninstall-dist_pkgdataDATA uninstall-info-am +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am info info-am install install-am install-binSCRIPTS \ + install-data install-data-am install-dist_pkgdataDATA \ + install-exec install-exec-am install-info install-info-am \ + install-man install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool uninstall \ + uninstall-am uninstall-binSCRIPTS uninstall-dist_pkgdataDATA \ + uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/util/awswrite.jcl b/util/awswrite.jcl new file mode 100644 index 0000000..6af0b37 --- /dev/null +++ b/util/awswrite.jcl @@ -0,0 +1,379 @@ +//IBMUSERA JOB CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1) +//ASMCLG PROC +//IEUASM EXEC PGM=ASMA90,PARM='NOOBJECT,DECK',REGION=4M +//SYSPRINT DD SYSOUT=* +//SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR +// DD DSN=SYS1.MODGEN,DISP=SHR +//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(5,5)) +//SYSPUNCH DD DSN=&&OBJSET,DISP=(,PASS),UNIT=SYSDA, +// SPACE=(TRK,(5,5)),DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120) +//IEWL EXEC PGM=IEWL,PARM='LIST,LET,NCAL,MAP', +// COND=(0,NE,IEUASM),REGION=4M +//SYSPRINT DD SYSOUT=* +//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(5,5)) +//SYSLIN DD DSN=&&OBJSET,DISP=(OLD,DELETE) +//SYSLMOD DD DSN=&&GOSET(GO),DISP=(,PASS),UNIT=SYSDA, +// SPACE=(TRK,(5,5,5)),DCB=(RECFM=U,BLKSIZE=6144) +//GO EXEC PGM=*.IEWL.SYSLMOD,COND=((0,NE,IEUASM),(0,NE,IEWL)) +//SYSPRINT DD SYSOUT=* +//AWSIN DD DSN=&SYSUID..XXXXXX.AWSTAPE,DISP=SHR +//TAPEOUT DD UNIT=3480,VOL=SER=XXXXXX,LABEL=(1,BLP,EXPDT=98000) +// PEND +//ASMCLG EXEC ASMCLG +AWSWRITE TITLE 'Copy AWSTAPE file to physical tape' +AWSWRITE CSECT +***** PROGRAM DESCRIPTION +* +* This program copies an AWSTAPE file (a tape image on disk) +* to a physical tape. The exact structure of the tape image +* (all files including data blocks and tape marks) is copied +* to the physical tape. +* +* The JCL for running this program is: +* +* //AWSWRIT EXEC PGM=AWSWRITE +* //SYSPRINT DD SYSOUT=* +* //AWSIN DD DSN=file.awstape,DISP=SHR +* //TAPEOUT DD UNIT=3480,VOL=SER=XXXXXX,LABEL=(1,BLP) +* +* Notes: +* 1. The input file AWSIN can be any record format (fixed, +* variable, or undefined) and can have any record length +* 2. The output tape is written with BLP, therefore the +* job must be run under a job class which allows BLP +* processing. The JES2PARM parameter BLP=YES in the +* JOBCLASS statement allows a job to use BLP. +* This can be modified dynamically by using the command +* $TJOBCLASS(A),BLP=YES +* +* AWSWRITE was created by Roger Bowler, September 2003 +* and placed in the public domain. +***** +AWSWRITE CSECT + SAVE (14,12),,AWSWRITE-Roger-Bowler-2003 + LR R12,R15 Establish base register + USING AWSWRITE,R12 + LA R15,AWSSAVEA Point to new savearea + ST R13,4(,R15) Establish forward/ + ST R15,8(,R13) backward pointers + LR R13,R15 Activate new savearea + L R1,0(,R1) Point to PARM area + LH R2,0(,R1) Pick up PARM length + LA R3,2(,R1) Point to PARM text + CH R2,=H'4' Could it be PARM=TEST? + BNE NOTTEST No, skip + CLC 0(4,R3),=C'TEST' Is it PARM=TEST? + BNE NOTTEST No, skip + MVI TESTFLAG,X'FF' Yes, set TEST flag +NOTTEST EQU * +*** +* Open the DCBs +*** + MVC RETCODE,=F'16' Prime return code for failure + OPEN (SYSPRINT,OUTPUT) Open listing dataset + TM SYSPRINT+48,X'10' Listing DCB open? + BZ EXIT No, exit with return code 16 + OPEN (AWSIN,INPUT) Open input dataset + TM AWSIN+48,X'10' Input DCB open? + BZ TERMINE No, exit with return code 16 + CLI TESTFLAG,X'FF' Is it PARM=TEST? + BE NOOPENT Yes, do not open tape + OPEN (TAPEOUT,OUTPUT) Open output dataset + TM TAPEOUT+48,X'10' Output DCB open? + BZ TERMINE No, exit with return code 16 +NOOPENT EQU * + MVC RETCODE,=F'0' Prime return code for success +*** +* Obtain a 64K output buffer +*** + GETMAIN R,LV=MAXBLKL Obtain 64K storage area + ST R1,OUTBUFP Save address of output buffer + XC OUTBLKL,OUTBLKL Clear output block length + XC INDATAP,INDATAP Clear input data pointer + XC INDATAL,INDATAL Clear input data length +*** +* Read a 6-byte AWSTAPE block header from the input file +*** +NEXTHDR EQU * + LA R4,AWSHDR Address of buffer for header + LA R5,AWSHDRL Length of AWSTAPE header + BAL R10,READIN Read 6-byte header from AWSIN + CLC AWSHDR(6),=XL6'00' Is it all zero? + BE LOGEOF Yes, treat as logical end-of-file + TM AWSFLG1,AWSF1TM Is this a tape mark? + BO WRITETM Yes, go write a tape mark +*** +* Obtain length of logical data block which follows +*** + SR R2,R2 Clear length register + ICM R2,B'0001',AWSBLKL Load input block length... + ICM R2,B'0010',AWSBLKL+1 ...in reverse byte order +*** +* Determine where to read logical data block into output buffer +*** + TM AWSFLG1,AWSF1BB Is it start of a physical block? + BZ BEGBLK1 No, append to data in buffer + XC OUTBLKL,OUTBLKL Yes, clear output block length +BEGBLK1 DS 0H + L R1,OUTBLKL Calculate... + ALR R1,R2 ...new output block length + CL R1,=A(MAXBLKL) Does data exceed buffer length? + BNL BADBLKL Yes, error +*** +* Read a logical data block from the input file +*** + L R4,OUTBUFP Point to start of buffer + AL R4,OUTBLKL Point past data already in buffer + LR R5,R2 Load logical data block length + BAL R10,READIN Read logical data block + L R1,OUTBLKL Calculate... + ALR R1,R5 ...new output block length + ST R1,OUTBLKL Update new output block length + TM AWSFLG1,AWSF1EB End of physical block? + BZ NEXTHDR No, read next input header +*** +* Write a physical data block to the tape +*** + L R1,OUTBLKL Load output block length + CVD R1,DWORK Convert block length to decimal + MVC MSGDBL(6),=X'402020202120' + ED MSGDBL(6),DWORK+5 Edit block length into message + MVC MSGDBV,MSGDBV-1 Clear label area in message + CH R1,=H'80' Is it an 80-byte block? + BNE NOTLABL No, cannot be a standard label + L R1,OUTBUFP Point to output buffer + CLC 0(3,R1),=C'VOL' Could it be a standard label? + BE PRTLABL Yes, list it + CLC 0(3,R1),=C'HDR' Could it be a standard label? + BE PRTLABL Yes, list it + CLC 0(3,R1),=C'EOF' Could it be a standard label? + BE PRTLABL Yes, list it + CLC 0(3,R1),=C'UHL' Could it be a standard label? + BE PRTLABL Yes, list it + CLC 0(3,R1),=C'UTL' Could it be a standard label? + BNE NOTLABL No, skip +PRTLABL EQU * + MVC MSGDBV,0(R1) Copy standard label to message +NOTLABL EQU * + PUT SYSPRINT,MSGDB Write diagnostic message + MVI CCW,X'01' Set CCW command = Write + L R1,OUTBUFP Point to output buffer + STCM R1,B'0111',CCW+1 Save 24-bit buffer address in CCW + MVI CCW+4,X'20' Set CCW flags = SLI + L R1,OUTBLKL Load length of data in buffer + STH R1,CCW+6 Save 16-bit data length in CCW + BAL R10,EXCPIO Perform I/O via EXCP + B NEXTHDR Read next input header +*** +* Write a tape mark to the tape +*** +WRITETM DS 0H + L R2,=A(MSGTM) Point to tape mark message + PUT SYSPRINT,(R2) Write diagnostic message + MVI CCW,X'1F' Set CCW command = Write Tape Mark + XC CCW+1(3),CCW+1 Zeroise CCW data address + MVI CCW+4,X'20' Set CCW flags = SLI + MVC CCW+6(2),=H'1' Set CCW data length non-zero + BAL R10,EXCPIO Perform I/O via EXCP + B NEXTHDR Read next input header +*** +* Fatal error routines +*** +BADBLKL DS 0H + L R2,=A(ERRMSG1) Data block exceeds 64K-1 + PUT SYSPRINT,(R2) Write error message + MVC RETCODE,=F'12' Set bad return code + B TERMINE Exit with bad return code +OUTIOER DS 0H + UNPK ERRM2CCW(9),CCW(5) + TR ERRM2CCW(8),HEXTAB-240 + MVI ERRM2CCW+8,C' ' + UNPK ERRM2CCW+9(9),CCW+4(5) + TR ERRM2CCW+9(8),HEXTAB-240 + MVI ERRM2CCW+17,C',' + UNPK ERRM2ECB(3),ECB(2) + TR ERRM2CCW(2),HEXTAB-240 + MVI ERRM2CCW+2,C',' + UNPK ERRM2CSW(9),IOBCSW(5) + TR ERRM2CSW(8),HEXTAB-240 + MVI ERRM2CSW+8,C' ' + UNPK ERRM2CSW+9(9),IOBCSW+4(5) + TR ERRM2CSW+9(8),HEXTAB-240 + MVI ERRM2CSW+17,C',' + UNPK ERRM2SNS(5),IOBSENSE(3) + TR ERRM2SNS(4),HEXTAB-240 + MVI ERRM2SNS+4,C' ' + PUT SYSPRINT,ERRMSG2 Print I/O error message + MVC RETCODE,=F'8' Set bad return code + B TERMINE Exit with bad return code +*** +* Termination routines +*** +READEOF DS 0H + L R2,=A(MSGPEOF) Physical end-of-file on AWSIN + PUT SYSPRINT,(R2) Write diagnostic message + B TERMINE +LOGEOF DS 0H + L R2,=A(MSGLEOF) Logical end-of-file on AWSIN + PUT SYSPRINT,(R2) Write diagnostic message +TERMINE DS 0H + ICM R1,B'1111',OUTBUFP Load output buffer address + BZ NOFREEM Skip if no buffer allocated + FREEMAIN R,A=(1),LV=MAXBLKL Release storage area +NOFREEM EQU * + CLOSE (AWSIN,,TAPEOUT) Close input/output DCBs + CLOSE (SYSPRINT) Close listing dataset +EXIT EQU * + L R13,4(,R13) Load HSA pointer + L R15,RETCODE Load return code + L R14,12(,R13) Restore... + LM R0,R12,20(R13) ...registers + BR R14 Exit from AWSWRITE +*** +* Subroutine to read a given number of bytes from the input file +* +* Input: R4 = Destination buffer address +* R5 = Number of bytes to read +*** +READIN DS 0H + STM R4,R5,READSAVE Save work registers +READCONT EQU * + CL R5,INDATAL Enough data in input buffer? + BNH READMOVE Yes, copy it +* Copy as much data as is available from the input buffer + LR R0,R4 R0 = destination buffer address + L R1,INDATAL R1 = length of input data + L R14,INDATAP R14 => data in input buffer + L R15,INDATAL R15 = length of input data + MVCL R0,R14 Copy data from input buffer + LR R4,R0 R4 = updated destination addr + SL R5,INDATAL R5 = updated length remaining +* Read the next input record into the input buffer + GET AWSIN Get-locate input record + SR R0,R0 Clear for insert + ICM R0,B'0011',AWSLRECL R0 = record length from DCB + TM AWSRECFM,DCBRECU Is it RECFM=U ? + BO READNOTV Yes, skip + TM AWSRECFM,DCBRECV Is it RECFM=V or RECFM=VB ? + BNO READNOTV No, skip +* For RECFM=V or RECFM=VB there is a 4-byte RDW preceding the data + ICM R0,B'0011',0(R1) Load record length from RDW + SH R0,=H'4' Subtract length of RDW + LA R1,4(,R1) Skip over the RDW +READNOTV EQU * + ST R0,INDATAL Save input data length + ST R1,INDATAP Save input data pointer + B READCONT Go back and move more data +READMOVE EQU * +* Copy data from the input buffer to the destination buffer + L R14,INDATAP R14 => data in input buffer + L R15,INDATAL R15 = length of input data + MVCL R4,R14 Copy data from input buffer + ST R14,INDATAP Save updated input data pointer + ST R15,INDATAL Save updated input data length + LM R4,R5,READSAVE Restore work registers + BR R10 Return from READIN subroutine +*** +* Subroutine to write to tape using EXCP +*** +EXCPIO DS 0H + CLI TESTFLAG,X'FF' Is it PARM=TEST? + BE EXCPRET Yes, bypass tape I/O + MVI ECB,X'00' Clear ECB completion code + EXCP IOB Start channel program + WAIT ECB=ECB Wait for I/O completion + CLI ECB,X'7F' I/O completed successfully? + BNE OUTIOER No, take error exit +EXCPRET EQU * + BR R10 Return from EXCPIO subroutine + EJECT +* +* AWSTAPE 6-byte logical block header +* +AWSHDR DS 0H +AWSBLKL DS XL2 Logical block length (reversed) +AWSPRVL DS XL2 Previous block length (reversed) +AWSFLG1 DS X Flags... +AWSF1BB EQU X'80' ...beginning of physical block +AWSF1TM EQU X'40' ...tape mark +AWSF1EB EQU X'20' ...end of physical block +AWSFLG2 DS X Flags (unused) +AWSHDRL EQU *-AWSHDR Length of AWSTAPE block header +MAXBLKL EQU 65536 Maximum block size 64K +* +* Data areas for EXCP I/O to tape +* +CCW CCW X'01',0,X'20',0 Write Data CCW +ECB DC F'0' Event Control Block +IOB DS 0F Input Output Block... +IOBFLAGS DC XL2'0' ...IOB flags +IOBSENSE DC XL2'0' ...IOB sense bytes +IOBECBPT DC A(ECB) ...ECB pointer +IOBCSW DC 2F'0' ...CSW after I/O +IOBSTART DC A(CCW) ...CCW pointer +IOBDCBPT DC A(TAPEOUT) ...DCB pointer +IOBRESTR DC A(0) +IOBINCAM DC H'1' ...Block count increment +IOBERRCT DC H'0' ...Error counter +* +* Static data areas +* + LTORG +DWORK DC D'0' Doubleword work area +RETCODE DC F'0' Program final return code +INDATAP DC A(0) Pointer to next byte of input data +INDATAL DC F'0' No.of input data bytes remaining +OUTBUFP DC A(0) Address of output buffer +OUTBLKL DC F'0' Length of data in output buffer +AWSSAVEA DS 18F New savearea +READSAVE DS 2F Savearea for READIN subroutine +TESTFLAG DC X'00' X'FF' if PARM=TEST specified + PRINT NOGEN +SYSPRINT DCB DSORG=PS,MACRF=PM,DDNAME=SYSPRINT, + RECFM=FBA,LRECL=133,BLKSIZE=133 +AWSIN DCB DSORG=PS,MACRF=GL,DDNAME=AWSIN,EODAD=READEOF +AWSLRECL EQU DCBLRECL-IHADCB+AWSIN +AWSRECFM EQU DCBRECFM-IHADCB+AWSIN +TAPEOUT DCB DSORG=PS,MACRF=E,DDNAME=TAPEOUT,DEVD=TA +HEXTAB DC C'0123456789ABCDEF' +* +* Messages +* +ERRMSG1 DC CL133' *** Error *** Data block length exceeds 64K-1' +ERRMSG2 DC CL133' ' + ORG ERRMSG2 + DC C' *** Error *** ' + DC C'CCW=' +ERRM2CCW DC C'xxxxxxxx xxxxxxxx,' + DC C'ECBCC=' +ERRM2ECB DC C'xx,' + DC C'CSW=' +ERRM2CSW DC C'xxxxxxxx xxxxxxxx,' + DC C'SENSE=' +ERRM2SNS DC C'xxxx ' + ORG +MSGTM DC CL133' ** Tape Mark **' +MSGDB DC CL133' Data Block: nnnnn bytes' +MSGDBL EQU MSGDB+12,6 +MSGDBV EQU MSGDB+30,80 +MSGPEOF DC CL133' Terminated at end-of-file on AWSIN' +MSGLEOF DC CL133' Terminated by zero header on AWSIN' +R0 EQU 0 +R1 EQU 1 +R2 EQU 2 +R3 EQU 3 +R4 EQU 4 +R5 EQU 5 +R6 EQU 6 +R7 EQU 7 +R8 EQU 8 +R9 EQU 9 +R10 EQU 10 +R11 EQU 11 +R12 EQU 12 +R13 EQU 13 +R14 EQU 14 +R15 EQU 15 + DCBD DSORG=PS,DEVD=TA + END +// diff --git a/version.c b/version.c index 49d2793..6672515 100644 --- a/version.c +++ b/version.c @@ -10,10 +10,21 @@ #include <config.h> #endif +#define _IMPORT +#if defined(WIN32) +#if defined(HDL_BUILD_SHARED) +#undef _IMPORT +#define _IMPORT __declspec(dllimport) +#endif +#endif + #include "hercnls.h" #include "feature.h" #include "hostinfo.h" #include "version.h" +#if defined(EXTERNALGUI) +extern _IMPORT int extgui; +#endif /*--------------------------------*/ /* "Unusual" build options... */ @@ -49,7 +60,7 @@ static const char *build_info[] = { "Win32 (Windows) build", #else #if defined(NO_SETUID) - "No setuid support" + "No setuid support", #else "Using " #if defined(HAVE_SETRESUID) @@ -63,23 +74,21 @@ static const char *build_info[] = { #endif #endif -#if defined(HAVE_LINUX_IF_TUN_H) - "Linux TUN driver support", +#if defined(OPTION_FTHREADS) + "Using fthreads instead of pthreads", #endif - -#if defined(OPTION_W32_CTCI) - "Windows CTCI-W32 support", +#if defined(OPTION_DYNAMIC_LOAD) + "With Dynamic loading support", +#else + "Without Dynamic loading support", #endif - -#if defined(NOTHREAD) - "No threading support", +#if defined(HDL_BUILD_SHARED) + "Using shared libraries", #else - #if defined(OPTION_FTHREADS) - "Using fthreads instead of pthreads", - #endif + "Using static libraries", #endif -#if !defined(EXTERNALGUI) && defined(WIN32) +#if !defined(EXTERNALGUI) "No external GUI support", #endif @@ -116,7 +125,9 @@ static const char *build_info[] = { }; #if defined(EXTERNALGUI) +#if 0 extern int extgui; /* external gui present */ +#endif #endif /*EXTERNALGUI*/ /*-------------------------------------------------------------------*/ diff --git a/version.h b/version.h index e034ad4..e3ffcfe 100644 --- a/version.h +++ b/version.h @@ -14,6 +14,9 @@ #define VERSION Unknown /* Unkown version number */ #endif +#define HDL_VERS_HERCULES VERSION +#define HDL_SIZE_HERCULES sizeof(VERSION) + void display_version(FILE *f, char *prog); #define HERCULES_COPYRIGHT \ diff --git a/vm.c b/vm.c index 32699f9..4542810 100644 --- a/vm.c +++ b/vm.c @@ -173,6 +173,8 @@ BYTE unitstat = 0; /* Device status */ BYTE chanstat = 0; /* Subchannel status */ BYTE skey1, skey2; /* Storage keys of first and last byte of I/O buffer */ +//FIXME: code not right for shared devices + UNREFERENCED(r2); /* Register R1 contains the real address of the parameter list */ @@ -276,7 +278,7 @@ BYTE skey1, skey2; /* Storage keys of first and #endif /*FEATURE_CHANNEL_SUBSYSTEM*/ /* Return code 5 and condition code 1 if device is busy */ - if (dev->busy || dev->pending) + if (dev->busy || dev->pending || dev->pcipending) { release_lock (&dev->lock); regs->GR_L(15) = 5; @@ -368,9 +370,7 @@ BYTE skey1, skey2; /* Storage keys of first and } /* end for(blkcount) */ /* Reset the device busy indicator */ - obtain_lock (&dev->lock); dev->busy = 0; - release_lock (&dev->lock); /* Store the block count in the parameter list */ ioparm.blkcount[0] = (blkcount >> 24) & 0xFF; @@ -431,6 +431,8 @@ BYTE accum; /* Work area */ BYTE unitstat = 0; /* Device status */ BYTE chanstat = 0; /* Subchannel status */ +//FIXME: code not right for shared devices + UNREFERENCED(r2); /* Register R1 contains the real address of the parameter list */ @@ -509,7 +511,7 @@ BYTE chanstat = 0; /* Subchannel status */ return 0; } - /* Obtain the device lock */ + /* Obtain the interrupt lock */ obtain_lock (&dev->lock); #ifdef FEATURE_CHANNEL_SUBSYSTEM @@ -524,7 +526,7 @@ BYTE chanstat = 0; /* Subchannel status */ #endif /*FEATURE_CHANNEL_SUBSYSTEM*/ /* Return code 5 and condition code 1 if device is busy */ - if (dev->busy || dev->pending) + if (dev->busy || dev->pending || dev->pcipending) { release_lock (&dev->lock); regs->GR_L(15) = 5; @@ -568,8 +570,7 @@ BYTE chanstat = 0; /* Subchannel status */ /* Clear the interrupt pending and device busy conditions */ obtain_lock (&dev->lock); - dev->pending = 0; - dev->busy = 0; + dev->busy = dev->pending = 0; dev->scsw.flag2 = 0; dev->scsw.flag3 = 0; release_lock (&dev->lock); @@ -715,7 +716,7 @@ BYTE c; /* Character work area */ idlen = sizeof(buf); /* Store the extended identification code at operand address */ - ARCH_DEP(vstorec) (buf, idlen-1, idaddr, r1, regs); + ARCH_DEP(vstorec) (buf, idlen-1, idaddr, USE_REAL_ADDR, regs); /* Deduct number of bytes from the R2 register */ regs->GR_L(r2) -= idlen; @@ -741,6 +742,9 @@ BYTE cmdflags; /* Command flags */ #define CMDFLAGS_RESERVED 0x1F /* Reserved bits, must be 0 */ BYTE buf[256]; /* Command buffer (ASCIIZ) */ BYTE resp[256]; /* Response buffer (ASCIIZ) */ +BYTE *dresp; /* Default response (ASCIIZ) */ +int freeresp; /* Flag to free resp bfr */ +int j,k; /* Obtain command address from R1 register */ cmdaddr = regs->GR_L(r1); @@ -770,37 +774,78 @@ BYTE resp[256]; /* Response buffer (ASCIIZ) */ } /* Obtain the command string from storage */ - ARCH_DEP(vfetchc) (buf, cmdlen-1, cmdaddr, r1, regs); + ARCH_DEP(vfetchc) (buf, cmdlen-1, cmdaddr, USE_REAL_ADDR, regs); - /* Display the command on the console */ + /* Translate EBCDIC command to ASCII */ for (i = 0; i < cmdlen; i++) + { buf[i] = guest_to_host(buf[i]); + } buf[i] = '\0'; - logmsg ("HHC660I %s\n", buf); + dresp=""; + freeresp=0; + + if(buf && *buf) + { +#ifdef FEATURE_HERCULES_DIAGCALLS + if(sysblk.diag8cmd) + { + logmsg (_("HHCVM001I *%s* panel command issued by guest\n"), buf); + if (cmdflags & CMDFLAGS_RESPONSE) + { + dresp=log_capture(panel_command,buf); + if(dresp!=NULL) + { + freeresp=1; + } + else + { + dresp=""; + } + } + else + { + panel_command(buf); + logmsg (_("HHCVM002I *%s* command complete\n"), buf); + } + } + else + dresp=_("HHCVM003I Host command processing disabled by configuration statement"); +#else + dresp=_("HHCVM004E Host command processing not included in engine build"); +#endif + } /* Store the response and set length if response requested */ if (cmdflags & CMDFLAGS_RESPONSE) { - strcpy (resp, "HHC661I Command complete"); - resplen = strlen(resp); + if(!freeresp) + { + strncpy (resp, dresp,256); + dresp=resp; + } + resplen = strlen(dresp); for (i = 0; i < resplen; i++) - resp[i] = host_to_guest(resp[i]); + dresp[i] = host_to_guest(dresp[i]); respadr = regs->GR_L(r1+1); maxrlen = regs->GR_L(r2+1); - if (resplen <= maxrlen) + i=(resplen<=maxrlen) ? resplen : maxrlen; + j=0; + while(i>0) { - ARCH_DEP(vstorec) (resp, resplen-1, respadr, r1+1, regs); - regs->GR_L(r2+1) = resplen; - cc = 0; - } - else - { - ARCH_DEP(vstorec) (resp, maxrlen-1, respadr, r1+1, regs); - regs->GR_L(r2+1) = resplen - maxrlen; - cc = 1; + k=(i<255 ? i : 255); + ARCH_DEP(vstorec) (&dresp[j], k , respadr+j, USE_REAL_ADDR, regs); + i-=k; + j+=k; } + regs->GR_L(r2+1) = (resplen<=maxrlen) ? resplen : resplen-maxrlen; + cc = (resplen<=maxrlen) ? 0 : 1; + } + if(freeresp) + { + free(dresp); } /* Set R2 register to CP completion code */ @@ -1029,6 +1074,13 @@ int b2; /* Effective addr base */ VADR effective_addr2; /* Effective address */ S(inst, execflag, regs, b2, effective_addr2); +#if defined(FEATURE_ECPSVM) + if(ecpsvm_doiucv(regs,b2,effective_addr2)==0) + { + return; + } +#endif + /* Program check if in problem state, the IUCV instruction generates an operation exception diff --git a/vstore.h b/vstore.h index 5fe88a2..b92778d 100644 --- a/vstore.h +++ b/vstore.h @@ -283,6 +283,10 @@ BYTE len1; /* Length to end of page */ BYTE len2; /* Length after next page */ BYTE akey; /* Bits 0-3=key, 4-7=zeroes */ +#ifdef FEATURE_INTERVAL_TIMER +int intaccess = 0; /* Access interval timer */ +#endif /*FEATURE_INTERVAL_TIMER*/ + /* Obtain current access key from PSW */ akey = regs->psw.pkey; @@ -290,6 +294,17 @@ BYTE akey; /* Bits 0-3=key, 4-7=zeroes */ addr2 = (addr + len) & ADDRESS_MAXWRAP(regs); addr2 &= ~0x7FF; +#ifdef FEATURE_INTERVAL_TIMER + /* Check for interval timer access */ + if (addr == 80) + if (len == 3) + { + intaccess = 1; + obtain_lock( &sysblk.todlock ); + update_TOD_clock (); + } +#endif /*FEATURE_INTERVAL_TIMER*/ + /* Copy data from real storage in either one or two parts depending on whether operand crosses a page boundary (Page boundary set at 800 to catch FPO crosser too) */ @@ -304,6 +319,16 @@ BYTE akey; /* Bits 0-3=key, 4-7=zeroes */ memcpy (dest, regs->mainstor+addr, len1); memcpy (dest+len1, regs->mainstor+addr2, len2); } + +#ifdef FEATURE_INTERVAL_TIMER + /* Release todlock, if held */ + if (intaccess) + { + release_lock( &sysblk.todlock ); + intaccess = 0; + } +#endif /*FEATURE_INTERVAL_TIMER*/ + } /* end function ARCH_DEP(vfetchc) */ /*-------------------------------------------------------------------*/ @@ -400,7 +425,19 @@ BYTE akey; /* Bits 0-3=key, 4-7=zeroes */ /* Fetch 4 bytes when operand does not cross page boundary (Page boundary test at 800 to catch FPO crosser too) */ if((abs & 0x000007FF) <= (2048 - 4)) +#ifdef FEATURE_INTERVAL_TIMER + { + if (abs == 80) + { + obtain_lock( &sysblk.todlock ); + update_TOD_clock (); + release_lock( &sysblk.todlock ); + } +#endif /*FEATURE_INTERVAL_TIMER*/ return fetch_fw(regs->mainstor + abs); +#ifdef FEATURE_INTERVAL_TIMER + } +#endif /*FEATURE_INTERVAL_TIMER*/ /* Operand is not fullword aligned and may cross a page boundary */ @@ -556,7 +593,6 @@ BYTE akey; /* Bits 0-3=key, 4-7=zeroes */ if ((addr & 0x7FF) <= (0x800 - 6)) { abs = LOGICAL_TO_ABS (addr, 0, regs, ACCTYPE_INSTFETCH, akey); -#if defined(OPTION_AIA_BUFFER) #if defined(FEATURE_PER) if( !EN_IC_PER(regs) ) #endif /*defined(FEATURE_PER)*/ @@ -568,14 +604,12 @@ BYTE akey; /* Bits 0-3=key, 4-7=zeroes */ else INVALIDATE_AIA(regs); #endif /*defined(FEATURE_PER)*/ -#endif /*defined(OPTION_AIA_BUFFER)*/ memcpy (dest, regs->mainstor+abs, 6); return; } /* Fetch first two bytes of instruction */ abs = LOGICAL_TO_ABS (addr, 0, regs, ACCTYPE_INSTFETCH, akey); -#if defined(OPTION_AIA_BUFFER) #if defined(FEATURE_PER) if( !EN_IC_PER(regs) ) #endif /*defined(FEATURE_PER)*/ @@ -587,7 +621,6 @@ BYTE akey; /* Bits 0-3=key, 4-7=zeroes */ else INVALIDATE_AIA(regs); #endif /*defined(FEATURE_PER)*/ -#endif /*defined(OPTION_AIA_BUFFER)*/ memcpy (dest, regs->mainstor+abs, 2); /* Return if two-byte instruction */ @@ -704,11 +737,15 @@ BYTE *a1, *a2; #ifdef FEATURE_INTERVAL_TIMER /* Special case for mvc to/from interval timer */ - if ( (len == 3) && ((abs1 == 0x50) || (abs2 == 0x50)) && ~((abs1 | abs2) & 3) ) + if ( ((len == 3) || (len == 7)) && + ((abs1 == 0x50) || (abs2 == 0x50)) && + ~((abs1 | abs2) & 3) ) { - /* We've got a 4-byte wide, 4-byte aligned access of the interval timer */ + /* We've got a 4/8-byte wide, 4/8-byte aligned access of the interval timer */ obtain_lock( &sysblk.todlock ); + if (abs2 == 0x50) + update_TOD_clock (); *(U32 *)&regs->mainstor[abs1] = *(U32 *)&regs->mainstor[abs2]; release_lock( &sysblk.todlock ); @@ -722,7 +759,7 @@ BYTE *a1, *a2; a1 = regs->mainstor+abs1; a2 = regs->mainstor+abs2; for (i = 0; i < len + 1; i++) a1 [i] = a2 [i]; -/* +/* for (i = 0; i < len + 1; i++) regs->mainstor[abs1++] = regs->mainstor[abs2++]; */ diff --git a/w32chan.c b/w32chan.c index c523b18..86f4f4d 100644 --- a/w32chan.c +++ b/w32chan.c @@ -20,9 +20,12 @@ int dummy = 0; #include <stdarg.h> // (need "va_list", etc) #include <stdio.h> // (need "FILE", "vfprintf", etc) #include <malloc.h> // (need "malloc", etc) +#include "logger.h" #include "fthreads.h" // (need "fthread_create") #include "w32chan.h" // (function prototypes for this module) #include "linklist.h" // (linked list macros) +#include "hercnls.h" // (need NLS support) +#include "hscutl.h" // (need setpriority) ///////////////////////////////////////////////////////////////////////////// // (helper macros...) @@ -59,12 +62,6 @@ int dummy = 0; #endif // defined(FISH_HANG) -#define logmsg(fmt...) \ -{ \ - fprintf(ios_msgpipew, fmt); \ - fflush(ios_msgpipew); \ -} - #define IsEventSet(hEventHandle) (WaitForSingleObject(hEventHandle,0) == WAIT_OBJECT_0) ///////////////////////////////////////////////////////////////////////////// @@ -91,10 +88,9 @@ int dummy = 0; ///////////////////////////////////////////////////////////////////////////// // i/o scheduler variables... (some private, some externally visible) -FILE* ios_msgpipew = NULL; -int ios_arch_mode = 0; -int ios_devthread_priority = THREAD_PRIORITY_NORMAL; -int ios_devthread_timeout = 30; +int ios_arch_mode = 0; // current architecture mode +int ios_devthread_timeout = 30; // max device thread wait time +int* ios_devthread_prio = NULL; // pointer to sysblk.devprio LIST_ENTRY ThreadListHeadListEntry; // anchor for DEVTHREADPARMS linked list CRITICAL_SECTION IOSchedulerLock; // lock for accessing above list @@ -111,16 +107,14 @@ int ios_devtunavail = 0; // #of times 'idle' thread unavailable void InitIOScheduler ( - FILE* msgpipew, // (for issuing msgs to Herc console) int arch_mode, // (for calling execute_ccw_chain) - int devt_priority, // (for calling fthread_create) + int* devt_prio, // (ptr to device thread priority) int devt_timeout, // (MAX_DEVICE_THREAD_IDLE_SECS) long devt_max // (maximum #of device threads allowed) ) { - ios_msgpipew = msgpipew; ios_arch_mode = arch_mode; - ios_devthread_priority = devt_priority; + ios_devthread_prio = devt_prio; ios_devthread_timeout = devt_timeout; ios_devtmax = devt_max; @@ -150,6 +144,7 @@ typedef struct _DevIORequest { LIST_ENTRY IORequestListLinkingListEntry; // (just a link in the chain) void* pDevBlk; // (ptr to device block) + int* pnDevPrio; // (ptr to device i/o priority) unsigned short wDevNum; // (device number for debugging) } DEVIOREQUEST; @@ -160,6 +155,7 @@ DEVIOREQUEST; DEVTHREADPARMS* SelectDeviceThread(); DEVTHREADPARMS* CreateDeviceThread(unsigned short wDevNum); +void AdjustThreadPriority(int* pCurPrio, int* pNewPrio); void* DeviceThread(void* pThreadParms); void RemoveDeadThreadsFromList(); void RemoveThisThreadFromOurList(DEVTHREADPARMS* pThreadParms); @@ -168,7 +164,7 @@ void RemoveThisThreadFromOurList(DEVTHREADPARMS* pThreadParms); // Schedule a DeviceThread for this i/o request... (called by the 'startio' // function whenever the startio or start subchannel instruction is executed) -int ScheduleIORequest(void* pDevBlk, unsigned short wDevNum) +int ScheduleIORequest(void* pDevBlk, unsigned short wDevNum, int* pnDevPrio) { ///////////////////////////////////////////////////////////////// // PROGRAMMING NOTE: The various errors that can occur in this @@ -189,7 +185,7 @@ int ScheduleIORequest(void* pDevBlk, unsigned short wDevNum) if (!pIORequest) { - logmsg("HHC762I malloc(DEVIOREQUEST) failed; device=%4.4X, strerror=\"%s\"\n", + logmsg(_("HHC762I malloc(DEVIOREQUEST) failed; device=%4.4X, strerror=\"%s\"\n"), wDevNum,strerror(errno)); return 2; } @@ -197,6 +193,7 @@ int ScheduleIORequest(void* pDevBlk, unsigned short wDevNum) InitializeListLink(&pIORequest->IORequestListLinkingListEntry); pIORequest->pDevBlk = pDevBlk; pIORequest->wDevNum = wDevNum; + pIORequest->pnDevPrio = pnDevPrio; // Schedule a device_thread to process this i/o request @@ -251,7 +248,7 @@ int ScheduleIORequest(void* pDevBlk, unsigned short wDevNum) if (ios_devtmax && ios_devtnbr >= ios_devtmax) // max threads already created? { - logmsg("HHC765I *WARNING* max device threads exceeded.\n"); + logmsg(_("HHC765I *WARNING* max device threads exceeded.\n")); ios_devtunavail++; // (count occurrences) } @@ -348,7 +345,7 @@ DEVTHREADPARMS* CreateDeviceThread(unsigned short wDevNum) if (!pThreadParms) { - logmsg("HHC761I malloc(DEVTHREADPARMS) failed; device=%4.4X, strerror=\"%s\"\n", + logmsg(_("HHC761I malloc(DEVTHREADPARMS) failed; device=%4.4X, strerror=\"%s\"\n"), wDevNum,strerror(errno)); return NULL; // (error) } @@ -357,7 +354,7 @@ DEVTHREADPARMS* CreateDeviceThread(unsigned short wDevNum) if (!pThreadParms->hShutdownEvent) { - logmsg("HHC763I CreateEvent(hShutdownEvent) failed; device=%4.4X, strerror=\"%s\"\n", + logmsg(_("HHC763I CreateEvent(hShutdownEvent) failed; device=%4.4X, strerror=\"%s\"\n"), wDevNum,strerror(errno)); free(pThreadParms); return NULL; // (error) @@ -367,7 +364,7 @@ DEVTHREADPARMS* CreateDeviceThread(unsigned short wDevNum) if (!pThreadParms->hRequestQueuedEvent) { - logmsg("HHC764I CreateEvent(hRequestQueuedEvent) failed; device=%4.4X, strerror=\"%s\"\n", + logmsg(_("HHC764I CreateEvent(hRequestQueuedEvent) failed; device=%4.4X, strerror=\"%s\"\n"), wDevNum,strerror(errno)); MyCloseHandle(pThreadParms->hShutdownEvent); free(pThreadParms); @@ -383,12 +380,12 @@ DEVTHREADPARMS* CreateDeviceThread(unsigned short wDevNum) pThreadParms->dwThreadID = 0; #ifdef FISH_HANG - if (fthread_create(__FILE__,__LINE__,&dwThreadID,NULL,DeviceThread,pThreadParms,ios_devthread_priority) != 0) + if (fthread_create(__FILE__,__LINE__,&dwThreadID,NULL,DeviceThread,pThreadParms) != 0) #else - if (fthread_create(&dwThreadID,NULL,DeviceThread,pThreadParms,ios_devthread_priority) != 0) + if (fthread_create(&dwThreadID,NULL,DeviceThread,pThreadParms) != 0) #endif { - logmsg("HHC760I fthread_create(DeviceThread) failed; device=%4.4X, strerror=\"%s\"\n", + logmsg(_("HHC760I fthread_create(DeviceThread) failed; device=%4.4X, strerror=\"%s\"\n"), wDevNum,strerror(errno)); MyCloseHandle(pThreadParms->hShutdownEvent); MyCloseHandle(pThreadParms->hRequestQueuedEvent); @@ -408,6 +405,18 @@ DEVTHREADPARMS* CreateDeviceThread(unsigned short wDevNum) return pThreadParms; // (success) } +///////////////////////////////////////////////////////////////////////////// +// helper function to set a thread's priority to its proper value + +void AdjustThreadPriority(int* pCurPrio, int* pNewPrio) +{ + if (*pCurPrio != *pNewPrio) + { + setpriority(PRIO_PROCESS, 0, *pNewPrio); + *pCurPrio = *pNewPrio; + } +} + ///////////////////////////////////////////////////////////////////////////// // the device_thread itself... (processes queued i/o request // by calling "execute_ccw_chain" function in channel.c...) @@ -420,11 +429,16 @@ void* DeviceThread (void* pArg) LIST_ENTRY* pListEntry; // (work) DEVIOREQUEST* pIORequest; // ptr to i/o request void* pDevBlk; // ptr to device block + int* pnDevPrio; // ptr to device i/o priority + int nCurPrio; // current thread priority pThreadParms = (DEVTHREADPARMS*) pArg; pThreadParms->dwThreadID = GetCurrentThreadId(); + nCurPrio = getpriority(PRIO_PROCESS, 0); + AdjustThreadPriority(&nCurPrio,ios_devthread_prio); + for (;;) { // Wait for an i/o request to be queued... @@ -433,6 +447,7 @@ void* DeviceThread (void* pArg) MyWaitForSingleObject(pThreadParms->hRequestQueuedEvent,ios_devthread_timeout * 1000); InterlockedDecrement(&ios_devtwait); + if (IsEventSet(pThreadParms->hShutdownEvent)) break; // Lock our queue so it doesn't change while we take a look at it... @@ -461,14 +476,23 @@ void* DeviceThread (void* pArg) UnlockThreadParms(pThreadParms); // (done with thread parms for now) pIORequest = CONTAINING_RECORD(pListEntry,DEVIOREQUEST,IORequestListLinkingListEntry); - pDevBlk = pIORequest->pDevBlk; // (this is all we need) + pDevBlk = pIORequest->pDevBlk; // (need ptr to devblk) + pnDevPrio = pIORequest->pnDevPrio; // (need ptr to devprio) free(pIORequest); // (not needed anymore) // Process the i/o request by calling the proper 'execute_ccw_chain' // function (based on architectural mode) in source module channel.c + // Set thread priority to requested device level + AdjustThreadPriority(&nCurPrio,pnDevPrio); + call_execute_ccw_chain(ios_arch_mode, pDevBlk); // (process i/o request) + // Reset thread priority, if necessary + if (nCurPrio > *ios_devthread_prio) + AdjustThreadPriority(&nCurPrio,ios_devthread_prio); + + //////////////////////////////////////////////////////////////////////////// // // * * * I M P O R T A N T * * * diff --git a/w32chan.h b/w32chan.h index c2ff4d1..f6ed56b 100644 --- a/w32chan.h +++ b/w32chan.h @@ -17,14 +17,13 @@ extern void InitIOScheduler // initialize i/o scheduler vars // then on, just set the variables directly as needed. ( - FILE* msgpipew, // (for issuing msgs to Herc console) int arch_mode, // (for calling execute_ccw_chain) - int devt_priority, // (for calling fthread_create) + int* devt_prio, // (ptr to device thread priority) int devt_timeout, // (maximum device thread wait time) long devt_max // (maximum #of device threads allowed) ); -extern int ScheduleIORequest(void* pDevBlk, unsigned short wDevNum); +extern int ScheduleIORequest(void* pDevBlk, unsigned short wDevNum, int* pnDevPrio); extern void TrimDeviceThreads(); extern void KillAllDeviceThreads(); @@ -38,7 +37,6 @@ extern void PrintAllDEVTHREADPARMSs(); ///////////////////////////////////////////////////////////////////////////// // I/O Scheduler variables... -extern FILE* ios_msgpipew; // pipe write handle (for logging messages) extern long ios_devtwait; // #of threads currently idle extern int ios_devtnbr; // #of threads currently active extern int ios_devthwm; // max #of threads that WERE active diff --git a/w32ctca.c b/w32ctca.c index d33d897..2cab193 100644 --- a/w32ctca.c +++ b/w32ctca.c @@ -24,12 +24,14 @@ int w32ctca_dummy = 0; #include <stdio.h> #include <stdarg.h> #include <ctype.h> +#include "logger.h" #include "w32ctca.h" #if !defined( IFNAMSIZ ) #define IFNAMSIZ 16 #endif +#include "htypes.h" // (tt32api.h needs uint32_t) #include "tt32api.h" // (exported TunTap32.dll functions) /////////////////////////////////////////////////////////////////////////////////////////// @@ -37,14 +39,6 @@ int w32ctca_dummy = 0; LPCTSTR FormatLastErrorMessage(DWORD dwLastError, LPTSTR pszErrMsgBuff, DWORD dwBuffSize); -#define logmsg(fmt...) \ -do \ -{ \ - fprintf(g_tt32_msgpipew, fmt); \ - fflush(g_tt32_msgpipew); \ -} \ -while(0) - #define IsEventSet(hEventHandle) (WaitForSingleObject(hEventHandle,0) == WAIT_OBJECT_0) #if defined(DEBUG) || defined(_DEBUG) @@ -84,7 +78,6 @@ ptuntap32_get_stats g_tt32_pfn_get_stats = NULL; ptuntap32_set_debug_output_func g_tt32_pfn_set_debug_output_func = NULL; CRITICAL_SECTION g_tt32_lock; // (lock for accessing above variables) -FILE* g_tt32_msgpipew = NULL; // (so we can issue msgs to Herc console) /////////////////////////////////////////////////////////////////////////////////////////// // One-time initialization... (called by Herc startup) @@ -95,12 +88,10 @@ BOOL tt32_loaddll(); // (forward reference) // // -void tt32_init( FILE* msgpipew ) +void tt32_init() { InitializeCriticalSection(&g_tt32_lock); - g_tt32_msgpipew = msgpipew; - if (!g_tt32_dllname[0]) { char* tt32_dllname; @@ -111,7 +102,6 @@ void tt32_init( FILE* msgpipew ) strncpy(g_tt32_dllname,tt32_dllname,sizeof(g_tt32_dllname)); } - tt32_loaddll(); // (try loading the dll now) } // @@ -173,7 +163,7 @@ int tt32_ioctl( int fd, int iRequest, char* argp ) const char* tt32_get_default_iface() { - if (!tt32_loaddll()) return NULL; + if (!tt32_loaddll()) return "00-00-5E-80-00-00"; return g_tt32_pfn_get_default_iface(); } @@ -190,7 +180,10 @@ int display_tt32_stats( int fd ) memset(&stats,0,sizeof(stats)); stats.dwStructSize = sizeof(stats); - if (g_tt32_pfn_get_stats(fd,&stats) < (int)(sizeof(stats))) return -1; + /* ZZ FIXME: Temp workaround of bug in TunTap32.dll's + "CTunTap::GetIFaceStats" function. Remove once fixed. */ +// if (g_tt32_pfn_get_stats(fd,&stats) < (int)(sizeof(stats))) return -1; + g_tt32_pfn_get_stats(fd,&stats); logmsg ( @@ -245,6 +238,14 @@ void __cdecl tt32_output_debug_string(const char* debug_string) BOOL tt32_loaddll() { +static int tt32_init_done = 0; + + if(!tt32_init_done) + { + tt32_init(); + tt32_init_done = 1; + } + TCHAR szErrMsgBuff[MAX_ERR_MSG_LEN]; EnterCriticalSection(&g_tt32_lock); @@ -336,10 +337,9 @@ BOOL tt32_loaddll() #endif // defined(DEBUG) || defined(_DEBUG) - logmsg("%s v%s;\n%s\n", + logmsg("%s version %s initiated\n", g_tt32_dllname, - g_tt32_pfn_version_string(), - g_tt32_pfn_copyright_string()); + g_tt32_pfn_version_string()); return TRUE; diff --git a/w32ctca.h b/w32ctca.h index d7f0ccb..4497975 100644 --- a/w32ctca.h +++ b/w32ctca.h @@ -14,11 +14,9 @@ #define DEF_TT32_DLLNAME "TunTap32.dll" extern char g_tt32_dllname [MAX_TT32_DLLNAMELEN]; -extern FILE* g_tt32_msgpipew; extern void tt32_init ( - FILE* msgpipew // (needed for issuing msgs to Herc console) ); #define MIN_TT32DRV_BUFFSIZE_K ( 128)