diff options
Diffstat (limited to 'README_d')
-rw-r--r-- | README_d/README.multibyte | 22 | ||||
-rw-r--r-- | README_d/README.pc | 46 | ||||
-rw-r--r-- | README_d/README.pcdynamic | 93 |
3 files changed, 138 insertions, 23 deletions
diff --git a/README_d/README.multibyte b/README_d/README.multibyte new file mode 100644 index 00000000..6bc973a6 --- /dev/null +++ b/README_d/README.multibyte @@ -0,0 +1,22 @@ +Wed Jun 18 16:47:31 IDT 2003 +============================ + +Multibyte locales can cause occasional weirdness, in particular with +ranges inside brackets: /[....]/. Something that works great for ASCII +will choke for, e.g., en_US.UTF-8. One such program is test/gsubtst5.awk. + +By default, the test suite runs with LC_ALL=C and LANG=C. You +can change this by doing (from a Bourne-style shell): + + $ GAWKLOCALE=some_locale make check + +Then the test suite will set LC_ALL and LANG to the given locale. + +As of this writing, this works for en_US.UTF-8, and all tests +pass except gsubtst5. + +For the normal case of RS = "\n", the locale is largely irrelevant. +For other single byte record separators, using LC_ALL=C will give you +much better performance when reading records. Otherwise, gawk has to +make several function calls, *per input character* to find the record +terminator. You have been warned. diff --git a/README_d/README.pc b/README_d/README.pc index 5218508b..5022596b 100644 --- a/README_d/README.pc +++ b/README_d/README.pc @@ -1,10 +1,10 @@ -This is the README for GNU awk 3.1 under Win32, OS/2, and DOS. +This is the README for GNU awk 3.1 under Windows32, OS/2, and DOS. - Gawk has been compiled and tested under OS/2, DOS, and Win32 using + Gawk has been compiled and tested under OS/2, DOS, and Windows32 using the GNU development tools from DJ Delorie (DJGPP; DOS with special support for long filenames under Win95), Eberhard Mattes (EMX; OS/2, -DOS, and Win32 with rsxnt), and Jan-Jaap van der Heijden and Mumit Khan -(Mingw32; Win32). Microsoft Visual C/C++ can be used to build a Win32 +DOS, and Windows32 with rsxnt), and Jan-Jaap van der Heijden and Mumit Khan +(Mingw32; Windows32). Microsoft Visual C/C++ can be used to build a Windows32 version for Windows 9x/NT, and MSC can be used to build 16-bit versions for DOS and OS/2. (As of 3.1.2, the MSC version doesn't work, but the maintainer for it is working on fixing it.) @@ -28,7 +28,7 @@ Building gawk ------------- Building on DOS or Windows environments can be troublesome, in part due -to shell limitations, the long filename issue, and various Win32 pipe +to shell limitations, the long filename issue, and various Windows32 pipe considerations. The situation is somewhat better on OS/2. The general recommendation is to use tools (especially make) which are compatible or built with the compiler to be used on gawk. @@ -95,7 +95,7 @@ djgpp collection. The GNUish Project was designed to bring GNU-like programs to small systems running OS/2 and DOS. Binary distributions of gawk are maintained in GNUish, and include 16bit OS/2 and DOS, 32bit djgpp, -and Win32 versions. Information on GNUish is available via +and Windows32 versions. Information on GNUish is available via http://www.simtel.net/simtel.net/ or @@ -107,7 +107,7 @@ Kai Uwe Rommel <rommel@leo.org> maintains a (mostly OS/2) collection at http://www.leo.org/archiv/os2 or ftp://ftp.leo.org -It contains emx-compiled (32bit) versions of gawk for OS/2, DOS, and Win32, +It contains emx-compiled (32bit) versions of gawk for OS/2, DOS, and Windows32, along with many OS/2 utilities. The djgpp collection at @@ -139,12 +139,12 @@ application"). djgpp | DPMI DPMI DPMI DPMI,NoLFN DPMI emx(1) | N N N N OS2 emxbnd(2) | VCPI,DPMI DPMI DPMI,NoLFN DPMI,NoLFN DPMI,OS2 - emxnt(3) | N N Win32 Win32 N + emxnt(3) | N N Windows32 Windows32 N msc(4) | 16 16 16,NoLFN 16,NoLFN 16,DOS msc6bnd | 16 16 16,NoLFN 16,NoLFN 16,DOS,OS2 msc6os2 | N N N N 16,OS2 - vcWin32 | N N Win32 Win32 N - mingw32 | N N Win32 Win32 N + vcWin32 | N N Windows32 Windows32 N + mingw32 | N N Windows32 Windows32 N (1) Requires emxrt. @@ -174,23 +174,23 @@ application"). OS2 Runs as an OS/2 application. - rsxnt Runtimes for use with DPMI or Win32. + rsxnt Runtimes for use with DPMI or Windows32. VCPI Virtual Control Program Interface; program runs as a DOS app. Memory managers (such as emm386) may need adjustment. VCPI cannot be used under OS/2, Win/WfW, Win-95, or NT. See also DPMI. - Win32 Uses/supports Win32 features (such as long filenames). +Windows32 Uses/supports Windows32 features (such as long filenames). -Reportedly, NTEmacs (another Win32 program) can run programs such as -Win32-gawk asynchronously. Similarly, as native OS/2 versions are a -plus under OS/2 even for command-line programs, native Win32 versions +Reportedly, NTEmacs (another Windows32 program) can run programs such as +Windows32-gawk asynchronously. Similarly, as native OS/2 versions are a +plus under OS/2 even for command-line programs, native Windows32 versions may be desired under NT and Win95. -Users interested in Win32 applications may also wish to examine the +Users interested in Windows32 applications may also wish to examine the Cygnus cygwin project at http://sources.redhat.com/cygwin/ or the -Mingw32 work at http://www.mingw.org. Win32 gawk will often require -that utilities run from within gawk be Win32 (e.g., the tests place this +Mingw32 work at http://www.mingw.org. Windows32 gawk will often require +that utilities run from within gawk be Windows32 (e.g., the tests place this requirement on the cat utility). @@ -237,7 +237,7 @@ continues to be a problem. Stewartson's shell may be the best choice for emx-compiled programs (although djgpp-bash almost works with emx on DOS). GNU make is recommended if using djgpp-bash. -Beginning with 3.0.4, the MSC (DOS/Win32) and Mingw32 versions write +Beginning with 3.0.4, the MSC (DOS/Windows32) and Mingw32 versions write pipe and system() commands to a temporary file, and then execute with SHELL or COMSPEC. The current mechanism defaults to dos-style shell conventions unless the shell is one of sh, bash, csh, tcsh, sh32, @@ -245,7 +245,7 @@ sh16, or ksh. 4. GNU make is available at LEO for OS/2, in the djgpp collection -for DOS, and in the Mingw32 collection for Win32. +for DOS, and in the Mingw32 collection for Windows32. dmake is by Dennis Vadura (dvadura@watdragon.uwaterloo.ca), CS Dept., University of Waterloo. OS/2 and DOS versions can be found as @@ -358,7 +358,7 @@ reading, and he was always willing to answer our questions (even when we didn't read the relevant portions of the FAQ :). We are indebted to Juan Grigera <juan@biophnet.unlp.edu.ar> for the -Visual C++ target, and for additional help on changes for Win32. +Visual C++ target, and for additional help on changes for Windows32. ---- @@ -370,10 +370,10 @@ or gawk-maintainer@unixos2.org (OS/2 version) Darrel Hankerson, hankedr@mail.auburn.edu -Support for Win32 started in gawk-3.0.3. Reports on +Support for Windows32 started in gawk-3.0.3. Reports on the Visual C++ version (vcWin32) may be sent to Juan Grigera, juan@biophnet.unlp.edu.ar (Visual C++ version) -with a copy to Scott Deifik. Other Win32 reports may go to Darrel +with a copy to Scott Deifik. Other Windows32 reports may go to Darrel Hankerson. diff --git a/README_d/README.pcdynamic b/README_d/README.pcdynamic new file mode 100644 index 00000000..678206e6 --- /dev/null +++ b/README_d/README.pcdynamic @@ -0,0 +1,93 @@ +This is the README for dynamic extension support for GNU awk 3.1.2 under Windows32 +This part of the README is directed to the gawk maintainers. + +The implementation consists of + +pc/dlfcn.h +pc/dlfcn.c + An implementation of the POSIX dynamic loading functions for Windows32. + Bugs and limitations: + the RTLD_* flags are ignored + passing NULL as the module name is not really supported. + dlerror() doesn't always generate useful output. + +pc/w32dynamic.patch + A patch to pc/Makefile. This adds macros to allow dynamic loading + to be compiled in. The macros (DYN_EXP, DYN_OBJ, DYN_FLAGS, and + DYN_MAKEXP) are commented-out by default (which is the default on + Unix as well). I've added definitions only for MS VC and MinGW. + I also added support for pgawk under MS VC and MinGW. + +pc/gawkw32.def + A list of functions to export from gawk.exe. Every function used + in an extension DLL needs to be in this file. I've added the ones + required by the provided examples, but some thought should go into + determining a useful set of API functions. From a maintenance + perspective, it's important that the ordinals (the number following @) + never change. You can use an existing DLL with a gawk.exe which has + new exported functions, but if you change the ordinal of an existing + function, you have to recompile all the extensions that use it. + +extension/Makefile.pc + A make file which compiles a few of the extension examples. + Only readfile, ordchr, and arrayparm are built, since the + other functions didn't compile without sizeable modifications. + +extension/pcext.def + A module definition file which exports dlload. + +extension/w32dynamic.patch + A patch to readfile.c to have it open files in binary mode. Without + this, the bytes read doesn't always match the file size. + +w32dynamic.patch + A patch to awk.h. This makes the temporary variable _t static and + adds an attribute to some data declarations when WIN32_EXTENSION is + defined. The issue is that data imported from a separate module has + a different level of indirection from the same data in the + original module. The difference can be made transparent by adding + __declspec(dllimport)) to the declarations used in the importing module. + Since _t doesn't actually have to be shared, I've just made it + static to the extension module and avoided the problem. + +README_d/README.pcdynamic + This file. + +The remainder of the file is intended for people installing and using gawk +and probably ought to be added to README.pc +--- +To compile gawk with dynamic extension support, uncomment the +definitions of DYN_FLAGS, DYN_EXP, DYN_OBJ, and DYN_MAKEXP in the +configuration section of Makefile. There are two definitions for +DYN_MAKEXP -- pick the one that matches your target. + +To build some of the example extension libraries, cd to the extension +directory and copy Makefile.pc to Makefile. You can then build using the same +two targets. To run the example awk scripts, you'll need to either change the +call to the `extension' function to match the name of the library (for +instance, change "./ordchr.so" to "ordchr.dll" or simply "ordchr"), or rename +the library to match the call (for instance, rename ordchr.dll to ordchr.so). + +If you build gawk.exe with one compiler but want to build an extension library +with the other, you need to copy the import library. Visual C uses a library +called gawk.lib, while MinGW uses a library called libgawk.a. These files +are equivalent and will interoperate if you give them the correct name. +The resulting shared libraries are also interoperable. + +To create your own extension library, you can use the examples as models, but +you're essentially on your own. Post to comp.lang.awk or send e-mail to +ptjm@interlog.com if you have problems getting started. If you need to access +functions or variables which are not exported by gawk.exe, add them to +gawkw32.def and rebuild. You should also add ATTRIBUTE_EXPORTED to the +declaration in awk.h of any variables you add to gawkw32.def. + +Note that extension libraries have the name of the awk executable embedded in +them at link time, so they will work only with gawk.exe. In particular, they won't +work if you rename gawk.exe to awk.exe or if you try to use pgawk.exe. You can +perform profiling by temporarily renaming pgawk.exe to gawk.exe. You can resolve +this problem by changing the program name in the definition of DYN_MAKEXP for +your compiler. + +On Windows32, libraries are sought first in the current directory, then in the +directory containing gawk.exe, and finally through the PATH environment +variable. |