aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix inconsistency in system vs pipes in non-socket Windows builds.Eli Zaretskii2013-06-241-4/+4
| | | | | | | io.c: Move #include "popen.h" out of the HAVE_SOCKETS condition, as this is needed for non-sockets builds as well. See http://lists.gnu.org/archive/html/bug-gawk/2013-06/msg00014.html for the details of the problem this caused.
* Minor fix for io.c for VMS.Arnold D. Robbins2013-06-151-0/+6
|
* Improve fix for debugger on Windows.Arnold D. Robbins2013-06-111-4/+11
|
* Minor change in io.c:iop_finish.Arnold D. Robbins2013-06-091-3/+3
|
* Minor cleanups for init_socket function.Arnold D. Robbins2013-06-031-2/+1
|
* Support |& on MS-Windows, both for sockets and for pipes.Eli Zaretskii2013-06-011-32/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | io.c (SHUT_RD) [SD_RECEIVE]: Define to SD_RECEIVE. (SHUT_WR) [SD_SEND]: Define to SD_SEND. (SHUT_RDWR) [SD_BOTH]: Define to SD_BOTH. (FD_TO_SOCKET, closemaybesocket) [!FD_TO_SOCKET]: New macros. (SOCKET_TO_FD, SOCKET) [!SOCKET_TO_FD]: New macros. (PIPES_SIMULATED): Define only for DJGPP. (pipe) [__MINGW32__]: Define to call _pipe, unless PIPES_SIMULATED is defined. (init_io) [HAVE_SOCKETS]: Call init_sockets. (iop_close, socketopen): Call closemaybesocket instead of close. (redirect) [__MINGW32__]: Call wait_any with a non-zero argument. (devopen) [__EMX__ || __MINGW32__]: Don't call stat on network pseudo-filenames. (two_way_open) [HAVE_SOCKETS]: Switch input and output to binary mode if appropriate. (two_way_open) [!PIPES_SIMULATED]: Use the __EMX__ code for MinGW as well. [__MINGW32__] Call spawnl to invoke $ComSpec and pass it a suitably quoted command line. (two_way_open) [__MINGW32__]: Wait only for a specified process ID. If successful, update the exit status of the exited process. Don't use signals that are undefined on MinGW. (two_way_open) [!PIPES_SIMULATED]: Use the __EMX__ code for MinGW as well. (min): Define only if not already defined. (read_with_timeout) [__MINGW32__]: Allow reading from sockets with timeout. (gawk_fclose) [__MINGW32__]: Close the underlying socket as well. getopt.c: Include stdlib.h for MinGW as well. pc/popen.h (SIGKILL) [__MINGW32__]: Define. (kill, quote_cmd): New prototypes. pc/popen.c: Include popen.h and errno.h. (popen, pclose, system): Undefine macros. (WIN32_LEAN_AND_MEAN) [__MINGW32__]: Define and include windows.h. (kill, quote_cmd) [!PIPES_SIMULATED]: New functions. (os_popen): Make the function definition match its prototype exactly. pc/gawkmisc.pc [HAVE_SOCKETS]: Include socket.h and windows.h. (socket, setsockopt, bind, connect, listen, accept, recvfrom) (shutdown): Undefine macros. (os_close_on_exec) [__MINGW32__]: Non-trivial implementation. (init_sockets, socket_to_fd, w32_socket, w32_setsockopt) (w32_bind, w32_connect, w32_listen, w32_accept, valid_socket) (w32_closesocket, w32_recvfrom, w32_shutdown) [HAVE_SOCKETS]: New functions for MinGW, emulate Posix sockets specified by file descriptors. pc/config.h (HAVE_GETADDRINFO, HAVE_SOCKADDR_STORAGE) (HAVE_SOCKETS) [__MINGW32__]: Define. pc/config.sed (HAVE_GETADDRINFO, HAVE_SOCKADDR_STORAGE) (HAVE_SOCKETS) [__MINGW32__]: Define. pc/Makefile.tst (fmtspcl): Announce expected failure only if not built with MPFR. (inetecht, inetdayt): For MinGW, warn about time-outs. (beginfile1, clos1way, getlndir): Announce expected failure only with DJGPP. (exit): Describe the failure on MinGW. (readdir): Explain why test might fail with bad ls.exe. pc/Makefile (mingw32, mingw32-readline, mingw32-mpfr) (mingw32-readline-mpfr): Add -lws2_32 to the link flags. (gawkmisc$O): Depend on socket.h. (io$O): Depend on socket.h and in.h. (popen$O): New dependency. posix/gawkmisc.c (init_sockets): New dummy function. extension/filefuncs.c [_WIN32]: Define WIN32_LEAN_AND_MEAN before including windows.h. extension/readdir.c [__MINGW32__]: Define WIN32_LEAN_AND_MEAN before including windows.h. extension/filefuncs.c [HAVE_GETSYSTEMTIMEASFILETIME]: Define WIN32_LEAN_AND_MEAN before including windows.h. test/clos1way.awk: Don't use features of Posix shells, to allow this test to work on Windows. test/beginfile2.sh: Leave one blank between the left quote and the following slash. Use non-absolute name for a non-existent file. This is to avoid breakage on Windows due to MSYS transformation of Posix style /foo/bar absolute file names. test/beginfile2.ok: Adapt to changes in beginfile2.sh.
* Minor fix in io.c.Arnold D. Robbins2013-05-301-1/+11
|
* Move FAKE_FD_VALUE out of gawkapi.h.Arnold D. Robbins2013-05-201-0/+4
|
* Fix building, installing, and testing extensions on MS-Windows.Eli Zaretskii2013-05-141-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test/Makefile.in (mpfr-tests, shlib-tests): Add a blank character between ' and /FOO/ in Gawk command lines, for the benefit of testing under MSYS Bash. test/filefuncs.awk (BEGIN): Call 'stat' on gawkapi.o, not on gawk, which does not exist on systems that produce gawk.exe. README_D/README.pc: Update the pc build and test instructions. pc/Makefile.tst (AWK): Set AWKLIBPATH so extensions could be found. (LS): New variable. (check): Add back shlib-tests and shlib-msg-end. (readdir): Add a warning regarding inode reporting by ls.exe. (fts, fork, fork2): Add message about expected failure on MinGW. pc/Makefile (install): Install the extensions. (install-strip): Likewise. pc/Makefile.ext: New file. io.c (devopen) [__EMX__ || __MINGW32__]: Produce EISDIR on MinGW when an attempt to open() a directory fails. (two_way_open) [__EMX__ || __MINGW32__]: When trying to open() a directory fails with EISDIR, assign FAKE_FD_VALUE to the file descriptor and attributes of a directory to its mode bits. This is needed to support the readdir extension. gawkapi.h (FAKE_FD_VALUE): New macro, used in io.h and in extension/gawkdirfd.h. extension/rwarray.c [__MINGW32__]: Include winsock2.h instead of arpa/inet.h. extension/readdir.c [__MINGW32__]: Include windows.h. Include gawkapi.h before gawkdirfd.h, since the former defines FAKE_FD_VALUE needed by the latter. (ftype): Accept an additional argument, the directory that is being read. Callers changed. [!DT_BLK]: Produce the file's type by calling 'stat' on it, if the dirent structure doesn't provide that. (get_inode): New function, to produce inode values on MS-Windows. (dir_get_record): Use it. extension/inplace.c (chown, link) [__MINGW32__]: Redirect to existing library functions. (mkstemp) [__MINGW32__]: New function, for MinGW, which doesn't have it in its library. (do_inplace_end) [__MINGW32__]: Remove the old file before renaming the new, since 'rename' on Windows cannot overwrite existing files. extension/gawkdirfd.h (ENOTSUP): Define to ENOSYS if not already defined. (DIR_TO_FD): If not defined yet, define to FAKE_FD_VALUE. extension/filefuncs.c (get_inode) [_WIN32]: New function, produces the file index used on Windows as its inode. (fill_stat_array) [_WIN32]: Use it.
* Fix several tests on MinGW which were broken by a HACK in io.c.Eli Zaretskii2013-04-281-4/+0
| | | | | | io.c (redirect): Remove the HACK that called close_one when errno was zero in the MinGW build. This prevents failure in several tests in the test suite, e.g., closebad.
* Typo fix in comment in io.c.Arnold D. Robbins2013-04-241-1/+1
|
* Update copyright dates on modified files.Arnold D. Robbins2013-01-151-1/+1
|
* Set name field for io extensions.Arnold D. Robbins2013-01-061-0/+4
|
* Move read_func from IOBUF into awk_input_buf_t.Arnold D. Robbins2012-12-191-4/+7
|
* Make bitflag checking consistent everywhere.Arnold D. Robbins2012-12-091-7/+7
|
* Merge branch 'gawk-4.0-stable'Arnold D. Robbins2012-12-091-6/+11
|\
| * Use posix_openpt() if available.Arnold D. Robbins2012-12-091-2/+7
| |
| * Change BINMODE to use symbolic values.Arnold D. Robbins2012-12-091-4/+4
| |
* | Clean up of awk.h.Arnold D. Robbins2012-11-221-0/+8
| |
* | VMS updates. Should now build, pass some tests.Arnold D. Robbins2012-11-141-0/+2
| |
* | Initial changes for VMS building.Arnold D. Robbins2012-11-121-3/+0
| |
* | Some VMS fixes.Arnold D. Robbins2012-11-101-3/+6
| |
* | Add output and two-way processors to API. Update Mac config stuff.Arnold D. Robbins2012-08-241-40/+225
| |
* | Move struct stat into IOBUF_PUBLIC.Arnold D. Robbins2012-08-081-5/+6
| |
* | Finish reworking input parsers.Arnold D. Robbins2012-08-011-56/+132
| |
* | Update input_parser interface for RT.Arnold D. Robbins2012-07-291-30/+23
| |
* | Merge branch 'extgawk' of ssh://git.sv.gnu.org/srv/git/gawk into extgawkArnold D. Robbins2012-07-291-2/+5
|\ \
| * | Issue a warning if the parser take_control_of function fails.Andrew J. Schorr2012-07-271-2/+5
| | |
* | | Finish work on iop management. New readdir test.Arnold D. Robbins2012-07-291-37/+67
|/ /
* | Fix bug in API set_RT, bug in readdir.c.Arnold D. Robbins2012-07-271-5/+9
| |
* | Add set_RT to API and to readdir extension.Arnold D. Robbins2012-07-261-1/+25
| |
* | Document the parser interface and remove some excessive readdir paranoia.Andrew J. Schorr2012-07-261-3/+2
| |
* | Remove translation of errno strings from API.Arnold D. Robbins2012-07-251-1/+1
| |
* | Start refactoring iop handling. Add readdir extension.Arnold D. Robbins2012-07-251-63/+66
| |
* | Hide private parts of IOBUF from extensions.Andrew J. Schorr2012-06-241-31/+35
| |
* | Add -i option, append .awk if initial search fails, and allow -f repeats.Andrew J. Schorr2012-05-191-0/+8
| |
* | Move to use of bool type, true, false, everywhere.Arnold D. Robbins2012-05-111-73/+73
| |
* | Merge remote branch 'origin/xgawk-build'Arnold D. Robbins2012-05-091-15/+1
|\ \
| * | Update ERRNO API.Andrew J. Schorr2012-04-011-12/+10
| | |
* | | Merge branch 'xgawk'Arnold D. Robbins2012-05-091-46/+70
|\ \ \
| * | | Update ERRNO API.Andrew J. Schorr2012-04-011-12/+10
| |/ /
| * | Some minor style edits in code and doc.Arnold D. Robbins2012-03-261-1/+1
| | |
| * | Fix some coding style issues and a typo in a comment.Andrew J. Schorr2012-03-241-13/+13
| | |
| * | - Add new environment variable AWKLIBPATH to use when searching for sharedAndrew J. Schorr2012-03-201-37/+47
| | | | | | | | | | | | | | | | | | | | | | | | libraries. - Instead of hardcoding the default ".so" suffix for shared libraries, use autoconf to get the right value for this platform. - Build and install some of the bundled shared library extensions so that they will now be available using the default AWKLIBPATH.
* | | Cleanups in io.c and improve RS as regexp.Arnold D. Robbins2012-04-261-250/+233
| | |
* | | Merge branch 'master' into gawk_mpfr.john haque2012-04-171-1/+1
|\ \ \
| * | | Minor edits.Arnold D. Robbins2012-03-221-1/+1
| |/ /
* | | MPFR fixes from Eli.john haque2012-04-161-0/+4
| | |
* | | MPFR related documentation updates and code cleanups.john haque2012-04-021-6/+6
| | |
* | | Add arbitrary-precision arithmetic on integers.john haque2012-03-191-10/+12
| | |