diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-02-10 21:39:00 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-02-10 21:39:00 +0200 |
commit | 8fa5942d22ce45d6cb07ab773efc523a855eedac (patch) | |
tree | 0f76a9d832b5c48820669c7a13181188553eb9a6 | |
parent | 17fa9fed5d5a2830509002d95420023ab8b9483e (diff) | |
download | egawk-8fa5942d22ce45d6cb07ab773efc523a855eedac.tar.gz egawk-8fa5942d22ce45d6cb07ab773efc523a855eedac.tar.bz2 egawk-8fa5942d22ce45d6cb07ab773efc523a855eedac.zip |
More OS/2 changes.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | awk.h | 14 | ||||
-rw-r--r-- | doc/ChangeLog | 4 | ||||
-rw-r--r-- | doc/gawk.info | 114 | ||||
-rw-r--r-- | doc/gawk.texi | 21 | ||||
-rw-r--r-- | field.c | 1 | ||||
-rw-r--r-- | io.c | 1 | ||||
-rw-r--r-- | main.c | 2 | ||||
-rw-r--r-- | protos.h | 38 |
9 files changed, 120 insertions, 86 deletions
@@ -1,3 +1,14 @@ +Thu Feb 10 21:31:36 2011 Andreas Buening <andreas.buening@nexgo.de> + + * main.c (load_procinfo): Fix warning about unsed variables in + don't have multiple groups. + * protos.h: Move decls for many standard functions here if + they aren't in the header files (OS/2) and bracket inside + #ifndef STD_HEADERS. + * io.c (devopen): Remove decl of strtoul. + * field.c (set_FIELDWIDTHS): Same. + * awk.h: Always include protos.h. + Tue Feb 8 22:46:22 2011 Arnold D. Robbins <arnold@skeeve.com> * array.c, builtin.c, eval.c: Equalize message strings and @@ -135,10 +135,10 @@ typedef int off_t; #ifdef STDC_HEADERS #include <stdlib.h> -#else /* not STDC_HEADERS */ -#include "protos.h" #endif /* not STDC_HEADERS */ +#include "protos.h" + #ifdef HAVE_STRING_H #include <string.h> #ifdef NEED_MEMORY_H @@ -167,11 +167,6 @@ typedef int off_t; #error "you lose: you need a system with vfprintf" #endif /* HAVE_VPRINTF */ -#ifndef HAVE_SNPRINTF -/* will use replacement version */ -extern int snprintf(char *restrict buf, size_t len, const char *restrict fmt, ...); -#endif - #ifndef HAVE_SETLOCALE #define setlocale(locale, val) /* nothing */ #endif /* HAVE_SETLOCALE */ @@ -185,11 +180,6 @@ extern void *memset_ulong(void *dest, int val, unsigned long l); #define memset memset_ulong #endif -#ifndef HAVE_STRNCASECMP -extern int strcasecmp(const char *s1, const char *s2); -extern int strncasecmp(const char *s1, const char *s2, register size_t n); -#endif - /* use this as lintwarn("...") this is a hack but it gives us the right semantics */ #define lintwarn (*(set_loc(__FILE__, __LINE__),lintfunc)) diff --git a/doc/ChangeLog b/doc/ChangeLog index 7dea18a2..12a4de21 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +Thu Feb 10 21:31:36 2011 Andreas Buening <andreas.buening@nexgo.de> + + * gawk.texi: Update OS/2 information. + Thu Feb 10 21:06:14 2011 Arnold D. Robbins <arnold@skeeve.com> * lflashlight-small.xpic: Renamed from lflashlight.small.xpic. diff --git a/doc/gawk.info b/doc/gawk.info index aa1d9ab2..51f91d5d 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -20317,6 +20317,7 @@ needed for the build may be found at MS-Windows binary of `gawk', type `make mingw32'. The 32 bit EMX version of `gawk' works "out of the box" under OS/2. +However, it is highly recommended to use GCC 2.95.3 for the compilation. In principle, it is possible to compile `gawk' the following way: $ ./configure @@ -20325,23 +20326,17 @@ In principle, it is possible to compile `gawk' the following way: This is not recommended, though. To get an OMF executable you should use the following commands at your `sh' prompt: - $ CPPFLAGS="-D__ST_MT_ERRNO__" - $ export CPPFLAGS $ CFLAGS="-O2 -Zomf -Zmt" $ export CFLAGS $ LDFLAGS="-s -Zcrtdll -Zlinker /exepack:2 -Zlinker /pm:vio -Zstack 0x6000" $ export LDFLAGS $ RANLIB="echo" $ export RANLIB - $ ./configure --prefix=c:/usr --without-included-gettext + $ ./configure --prefix=c:/usr $ make AR=emxomfar - These are just suggestions. You may use any other set of -(self-consistent) environment variables and compiler flags. - - To get an FHS-compliant file hierarchy it is recommended to use the -additional `configure' options `--infodir=c:/usr/share/info', -`--mandir=c:/usr/share/man' and `--libexecdir=c:/usr/lib'. + These are just suggestions for use with GCC 2.x. You may use any +other set of (self-consistent) environment variables and compiler flags. If you use GCC 2.95 it is recommended to use also: @@ -20350,8 +20345,6 @@ additional `configure' options `--infodir=c:/usr/share/info', You can also get an `a.out' executable if you prefer: - $ CPPFLAGS="-D__ST_MT_ERRNO__" - $ export CPPFLAGS $ CFLAGS="-O2 -Zmt" $ export CFLAGS $ LDFLAGS="-s -Zstack 0x6000" @@ -20360,12 +20353,12 @@ additional `configure' options `--infodir=c:/usr/share/info', $ ./configure --prefix=c:/usr $ make - NOTE: Versions later than GCC 2.95, i.e., GCC 3.x using the - Innotek libc were not tested. + NOTE: Compilation of `a.out' executables also works with GCC 3.2. + Versions later than GCC 3.2 have not been tested successfully. `make install' works as expected with the EMX build. - NOTE: Most OS/2 ports of GNU `make' are not able to handle the + NOTE: Ancient OS/2 ports of GNU `make' are not able to handle the Makefiles of this package. If you encounter any problems with `make', try GNU Make 3.79.1 or later versions. You should find the latest version on `ftp://hobbes.nmsu.edu/pub/os2/'. @@ -25012,8 +25005,7 @@ Index * compiling gawk for Cygwin: Cygwin. (line 6) * compiling gawk for MS-DOS and MS-Windows: PC Compiling. (line 13) * compiling gawk for VMS: VMS Compilation. (line 6) -* compiling gawk with EMX for OS/2 and MS-Windows: PC Compiling. - (line 28) +* compiling gawk with EMX for OS/2: PC Compiling. (line 28) * compl() function (gawk): Bitwise Functions. (line 42) * complement, bitwise: Bitwise Functions. (line 25) * compound statements, control statements and: Statements. (line 10) @@ -27448,50 +27440,50 @@ Node: Non-Unix Installation807700 Node: PC Installation808158 Node: PC Binary Installation809457 Node: PC Compiling811305 -Node: PC Testing814451 -Node: PC Using815627 -Node: Cygwin819812 -Node: MSYS820809 -Node: VMS Installation821323 -Node: VMS Compilation821927 -Node: VMS Installation Details823504 -Node: VMS Running825134 -Node: VMS POSIX826731 -Node: VMS Old Gawk828029 -Node: Bugs828501 -Node: Other Versions832366 -Node: Notes837645 -Node: Compatibility Mode838337 -Node: Additions839120 -Node: Accessing The Source839932 -Node: Adding Code841355 -Node: New Ports846903 -Node: Dynamic Extensions851016 -Node: Internals852392 -Node: Plugin License861508 -Node: Sample Library862142 -Node: Internal File Description862828 -Node: Internal File Ops866535 -Ref: Internal File Ops-Footnote-1871303 -Node: Using Internal File Ops871451 -Node: Future Extensions873828 -Node: Basic Concepts876332 -Node: Basic High Level877089 -Ref: Basic High Level-Footnote-1881124 -Node: Basic Data Typing881309 -Node: Floating Point Issues885834 -Node: String Conversion Precision886917 -Ref: String Conversion Precision-Footnote-1888611 -Node: Unexpected Results888720 -Node: POSIX Floating Point Problems890546 -Ref: POSIX Floating Point Problems-Footnote-1894242 -Node: Glossary894280 -Node: Copying918379 -Node: GNU Free Documentation License955936 -Node: next-edition981080 -Node: unresolved981432 -Node: revision981932 -Node: consistency982355 -Node: Index985854 +Node: PC Testing814249 +Node: PC Using815425 +Node: Cygwin819610 +Node: MSYS820607 +Node: VMS Installation821121 +Node: VMS Compilation821725 +Node: VMS Installation Details823302 +Node: VMS Running824932 +Node: VMS POSIX826529 +Node: VMS Old Gawk827827 +Node: Bugs828299 +Node: Other Versions832164 +Node: Notes837443 +Node: Compatibility Mode838135 +Node: Additions838918 +Node: Accessing The Source839730 +Node: Adding Code841153 +Node: New Ports846701 +Node: Dynamic Extensions850814 +Node: Internals852190 +Node: Plugin License861306 +Node: Sample Library861940 +Node: Internal File Description862626 +Node: Internal File Ops866333 +Ref: Internal File Ops-Footnote-1871101 +Node: Using Internal File Ops871249 +Node: Future Extensions873626 +Node: Basic Concepts876130 +Node: Basic High Level876887 +Ref: Basic High Level-Footnote-1880922 +Node: Basic Data Typing881107 +Node: Floating Point Issues885632 +Node: String Conversion Precision886715 +Ref: String Conversion Precision-Footnote-1888409 +Node: Unexpected Results888518 +Node: POSIX Floating Point Problems890344 +Ref: POSIX Floating Point Problems-Footnote-1894040 +Node: Glossary894078 +Node: Copying918177 +Node: GNU Free Documentation License955734 +Node: next-edition980878 +Node: unresolved981230 +Node: revision981730 +Node: consistency982153 +Node: Index985652 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 6a7822b6..4b8fc19a 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -27317,8 +27317,9 @@ build @command{gawk} using the DJGPP tools, enter @samp{make djgpp}. @uref{ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/}.) To build a native MS-Windows binary of @command{gawk}, type @samp{make mingw32}. -@cindex compiling @command{gawk} with EMX for OS/2 and MS-Windows +@cindex compiling @command{gawk} with EMX for OS/2 The 32 bit EMX version of @command{gawk} works ``out of the box'' under OS/2. +However, it is highly recommended to use GCC 2.95.3 for the compilation. In principle, it is possible to compile @command{gawk} the following way: @example @@ -27330,24 +27331,24 @@ This is not recommended, though. To get an OMF executable you should use the following commands at your @command{sh} prompt: @example -$ @kbd{CPPFLAGS="-D__ST_MT_ERRNO__"} -$ @kbd{export CPPFLAGS} $ @kbd{CFLAGS="-O2 -Zomf -Zmt"} $ @kbd{export CFLAGS} $ @kbd{LDFLAGS="-s -Zcrtdll -Zlinker /exepack:2 -Zlinker /pm:vio -Zstack 0x6000"} $ @kbd{export LDFLAGS} $ @kbd{RANLIB="echo"} $ @kbd{export RANLIB} -$ @kbd{./configure --prefix=c:/usr --without-included-gettext} +$ @kbd{./configure --prefix=c:/usr} $ @kbd{make AR=emxomfar} @end example -These are just suggestions. You may use any other set of (self-consistent) -environment variables and compiler flags. +These are just suggestions for use with GCC 2.x. You may use any other set of +(self-consistent) environment variables and compiler flags. +@ignore To get an FHS-compliant file hierarchy it is recommended to use the additional @command{configure} options @option{--infodir=c:/usr/share/info}, @option{--mandir=c:/usr/share/man} and @option{--libexecdir=c:/usr/lib}. +@end ignore @ignore The internal @code{gettext} library tends to be problematic. It is therefore recommended @@ -27365,8 +27366,6 @@ $ @kbd{export LIBS} You can also get an @code{a.out} executable if you prefer: @example -$ @kbd{CPPFLAGS="-D__ST_MT_ERRNO__"} -$ @kbd{export CPPFLAGS} $ @kbd{CFLAGS="-O2 -Zmt"} $ @kbd{export CFLAGS} $ @kbd{LDFLAGS="-s -Zstack 0x6000"} @@ -27378,14 +27377,14 @@ $ @kbd{make} @end example @quotation NOTE -Versions later than GCC 2.95, i.e., GCC 3.x using the Innotek libc -were not tested. +Compilation of @code{a.out} executables also works with GCC 3.2. +Versions later than GCC 3.2 have not been tested successfully. @end quotation @samp{make install} works as expected with the EMX build. @quotation NOTE -Most OS/2 ports of GNU @command{make} are not able to handle +Ancient OS/2 ports of GNU @command{make} are not able to handle the Makefiles of this package. If you encounter any problems with @command{make}, try GNU Make 3.79.1 or later versions. You should find the latest version on @@ -1076,7 +1076,6 @@ set_FIELDWIDTHS() int i; static int fw_alloc = 4; static short warned = FALSE; - extern unsigned long strtoul(const char *, char **endptr, int base); int fatal_error = FALSE; if (do_lint && ! warned) { @@ -1367,7 +1367,6 @@ devopen(const char *name, const char *mode) int flag = 0; int len; int family; - extern unsigned long strtoul(const char *, char **endptr, int base); flag = str2mode(mode); @@ -1047,8 +1047,10 @@ load_environ() static NODE * load_procinfo() { +#if defined (HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0 int i; char name[100]; +#endif AWKNUM value; PROCINFO_node = install_symbol(estrdup("PROCINFO", 8), @@ -23,6 +23,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#ifndef STDC_HEADERS + #define aptr_t void * /* arbitrary pointer type */ extern aptr_t malloc(MALLOC_ARG_T); extern aptr_t realloc(aptr_t, MALLOC_ARG_T); @@ -105,6 +107,42 @@ extern void _exit(int); #undef aptr_t +#endif /* STDC_HEADERS */ + + +/* prototypes for missing functions defined in missing_d/ */ + +#ifndef HAVE_STRNCASECMP +extern int strcasecmp(const char *s1, const char *s2); +extern int strncasecmp(const char *s1, const char *s2, register size_t n); +#endif + +#ifndef HAVE_STRTOUL +extern unsigned long int strtoul(const char *, char **endptr, int base); +#endif + +#ifndef HAVE_TZSET +extern void tzset(); +#endif + +#ifndef HAVE_MKTIME +extern time_t mktime(struct tm *tp); +#endif + +#ifndef HAVE_SNPRINTF +extern int snprintf(char *restrict buf, size_t len, const char *restrict fmt, ...); +#endif + +#ifndef HAVE_USLEEP +extern int usleep(unsigned int); +#endif + +#ifndef HAVE_SETENV +extern int setenv(const char *, const char *, int); +extern int unsetenv(const char *); +#endif + #if !defined(HAVE_STRCOLL) extern int strcoll(const char *, const char *); #endif + |