summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixChan.c
Commit message (Collapse)AuthorAgeFilesLines
* Added fixes for Tcl Bug 999544 (ported from core-8-4-branch).vasiljevic2006-09-061-1/+23
|
* * unix/tclUnixChan.c (TclUnixWaitForFile): with timeout < 0, if select()das2006-08-181-1/+4
| | | | | returns early (e.g. due to a signal), call it again instead of returning a timeout result. Fixes intermittent event-13.8 failures.
* * doc/CrtChannel.3: Added TCL_CHANNEL_VERSION_5, made itandreas_kupries2006-03-271-4/+4
| | | | | | | | | | | | | | * generic/tcl.h: the version where the "truncateProc" * generic/tclIO.c: is defined at, and moved all channel * generic/tclIOGT.c: drivers of Tcl to v5. * generic/tclIORChan.c: * unix/tclUnixChan.c: * unix/tclUnixPipe.c: * win/tclWinChan.c: * win/tclWinConsole.c: * win/tclWinPipe.c: * win/tclWinSerial.c: * win/tclWinSock.c:
* backing out last change, Tcl_Panic will be declared to never returndas2006-03-251-2/+2
|
* handle Tcl_Panic potentially returning. coverity bug 46das2006-03-251-1/+2
|
* Minor simplification of forward declarationsdkf2006-02-021-5/+3
|
* Improved commenting of a tricky bit of TclpOpenFileChanneldkf2006-01-261-13/+11
|
* * unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),das2005-11-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to configure (flag can't be present twice, so can't be in both CFLAGS and LDFLAGS during configure), don't use -prebind when deploying on 10.4, define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542). (SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete autoconf macros. Sync with tk/unix/tcl.m4. * unix/configure.in: fix obsolete autoconf macros, sync gratuitous formatting/ordering differences with tk/unix/configure.in. * unix/Makefile.in: add CFLAGS to tclsh/tcltest link to make executable linking the same as during configure (needed to avoid loosing any linker relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS). Avoid concurrent linking of tclsh and compiling of tclTestInit.o or xtTestInit.o during parallel make. (checkstubs, checkdoc, checkexports): dependency and Darwin fixes (dist): add new macosx files. * unix/tclLoadDyld.c (TclpDlopen): use NSADDIMAGE_OPTION_WITH_SEARCHING on second NSAddImage only. [Bug 1204237] (TclGuessPackageName): should not be MODULE_SCOPE. (TclpLoadMemory): ppc64 and endian (i386) fixes, add support for loading universal (fat) bundles from memory. * unix/tclUnixFCmd.c: * macosx/tclMacOSXFCmd.c: ppc64 and endian (i386) fixes. (TclMacOSXCopyFileAttributes): add support for new Tiger copyfile() API to enable copying of xattrs & ACLs by [file copy]. * generic/tcl.h: add Darwin specifc configure overrides for TCL_WIDE defines to support fat compiles of ppc and ppc64 at the same time, (replaces Darwin CVS fix by emoy, rdar://3693001). add/correct location of version numbers in macosx files. * generic/tclInt.h: clarify fat compile comment. * unix/tclUnixPort.h: add Darwin specifc configure overrides to support fat compiles, where configure runs only once for multiple architectures (replaces Darwin CVS fix by emoy, rdar://3693001). * macosx/tclMacOSXBundle.c: * macosx/tclMacOSXNotify.c: * unix/tclUnixNotfy.c: * unix/tclUnixPort.h: fix #include order to support compile time override of HAVE_COREFOUNDATION in tclUnixPort.h when building for ppc64 * macosx/Tcl.pbproj/default.pbxuser (new file): * macosx/Tcl.pbproj/jingham.pbxuser: * macosx/Tcl.pbproj/project.pbxproj: * macosx/Tcl.xcode/default.pbxuser (new file): * macosx/Tcl.xcode/project.pbxproj (new file): * macosx/Tcl.xcodeproj/default.pbxuser (new file): * macosx/Tcl.xcodeproj/project.pbxproj (new file): new/updated projects for Xcode 2.2 on 10.4, Xcode 1.5 on 10.3 & ProjectBuilder on 10.2, with native tcltest targets and support for universal (fat) compiles. * macosx/README: clarification/cleanup, document new Xcode projects and universal (fat) builds via CFLAGS (i.e. all of ppc ppc64 i386 at once). * unix/Makefile.in: * unix/aclocal.m4: * unix/configure.in: * unix/dltest/Makefile.in: * macosx/configure.ac (new file): add support for inclusion of unix/configure.in by macosx/configure.ac, allows generation of a config headers enabled configure script in macosx (required by Xcode projects). * macosx/GNUmakefile: rename from Makefile to avoid overwriting by configure run in tcl/macosx, add support for reusing configure cache, build target fixes, remove GENERIC_FLAGS override now handled by tcl.m4. * generic/tcl.decls: add Tcl_Main declaration as comment to avoid 'checkstubs' target complaining about it missing from stubs. * generic/regex.h: * generic/tclDate.c: * generic/tclEnv.c: * generic/tclGetDate.y: * generic/tclIOUtil.c: * generic/tclObj.c: * generic/tclStubInit.c: * generic/tclStubLib.c: * generic/tclPathObj.c: * generic/tclThreadAlloc.c: * generic/tclThreadStorage.c: * generic/tclTrace.c: * generic/tclVar.c: * generic/tommath.h: * tools/fix_tommath_h.tcl: * unix/tclUnixFCmd.c: ensure externally visible symbols not contained in stubs table are declared as MODULE_SCOPE (or as static if not used outside of own source file). These changes allow 'make checkstubs' to complete without error on Darwin with gcc 4. * generic/rege_dfa.c (getvacant): * generic/regexec.c (cfind): * generic/tclCompExpr.c (CompileSubExpr): * generic/tclNamesp.c (NamespaceEnsembleCmd): * unix/tclUnixChan.c (TclUnixWaitForFile): initialise variables to silence gcc 4 warnings. * generic/tclExecute.c (TclExecuteByteCode): fix unused variable warning when NO_WIDE_TYPE is defined. * generic/regguts.h: only #define NDEBUG if not already #defined. * unix/tclUnixNotfy.c: * macosx/tclMacOSXNotify.c: sync whitespace & comments. * unix/tclUnixPort.h: * win/tclWinPort.h: remove declaration of obsolete&unused TclpMutex API. * unix/configure: * unix/tclConfig.h.in: regen.
* More bits of ANSIfyingdkf2005-11-111-7/+7
|
* Revised code to build in situations where strchr(.,.) is a macro.dgp2005-10-211-5/+3
|
* ANSI-fy declarations and NULL handlingdkf2005-10-211-316/+299
|
* * unix/tclUnixSock.c (InitializeHostName): Synchronized use ofandreas_kupries2005-09-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | static modifier in declaration and definition of function. * unix/tclUnixChan.c (FileTruncateProc): Synchronized use of static modifier in declaration and definition of function. * generic/tclResult.c (ReleaseKeys): Synchronized use of static modifier in declaration and definition of function. * generic/tclListObj.c (NewListIntRep): Synchronized use of static modifier in declaration and definition of function. * generic/tclEncoding.c (InitializeEncodingSearchPath): Synchronized use of static modifier in declaration and definition of function. * generic/tclEncoding.c (FillEncodingFileMap): Synchronized use of static modifier in declaration and definition of function. * generic/tclIORChan.c (RcNewHandle): Synchronized use of static modifier in declaration and definition of function.
* Getting more systematic about styledkf2005-07-201-382/+411
|
* TIP#208 implementationdkf2005-06-061-2/+49
| | | | It's crude (especially in the tests and docs department) and incomplete (no truncation on non-POSIX platforms).
* * generic/tclInt.decls:das2005-05-141-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclTest.c: * generic/tclUtil.c: * win/tclWin32Dll.c: fixed link error due to direct access by tclTest.c to the MODULE_SCOPE tclPlatform global: renamed existing TclWinGetPlatform() accessor to TclGetPlatform() and moved it to generic code so that it can be used by on all platforms where MODULE_SCOPE is enforced. * macosx/tclMacOSXBundle.c: * unix/tclUnixInit.c: * unix/tcl.m4 (Darwin): made use of CoreFoundation API configurable and added test of CoreFoundation availablility to allow building on ppc64, replaced HAVE_CFBUNDLE by HAVE_COREFOUNDATION; test for availability of Tiger or later OSSpinLockLock API. * unix/tclUnixNotfy.c: * unix/Makefile.in: * macosx/tclMacOSXNotify.c (new file): when CoreFoundation is available, use new CFRunLoop based notifier: allows easy integration with other event loops on Mac OS X, in particular the TkAqua Carbon event loop is now integrated via a standard tcl event source (instead of TkAqua upon loading having to finalize the exsting notifier and replace it with its custom version). [Patch 1202052] * tests/unixNotfy.test: don't run unthreaded tests on Darwin since notifier may be using threads even in unthreaded core. * unix/tclUnixPort.h: * unix/tcl.m4 (Darwin): test for thread-unsafe realpath durning configure, as Darwin 7 and later realpath is threadsafe. * macosx/Makefile: enable configure caching. * unix/configure.in: wrap tclConfig.h header in #ifndef _TCLCONFIG so that it can be included more than once without warnings from gcc4.0 (as happens e.g. when including both tclInt.h and tclPort.h) * macosx/tclMacOSXBundle.c: * unix/tclUnixChan.c: * unix/tclLoadDyld.c: * unix/tclUnixInit.c: fixed gcc 4.0 warnings. * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59 * generic/tclIntDecls.h: * generic/tclIntPlatDecls.h: * generic/tclStubInit.c: make genstubs
* Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
|
* * doc/DString.3: Eliminated use of identifier "string" in Tcl'sdgp2005-05-031-8/+8
| | | | | | | | | | | | | * doc/Environment.3: public C API to avoid conflict/confusion with * doc/Eval.3: the std::string of C++. * doc/ExprLong.3, doc/ExprLongObj.3, doc/GetInt.3, doc/GetOpnFl.3: * doc/ParseCmd.3, doc/RegExp.3, doc/SetResult.3, doc/StrMatch.3: * doc/Utf.3, generic/tcl.decls, generic/tclBasic.c, generic/tclEnv.c: * generic/tclGet.c, generic/tclParse.c, generic/tclParseExpr.c: * generic/tclRegexp.c, generic/tclResult.c, generic/tclUtf.c: * generic/tclUtil.c, unix/tclUnixChan.c: * generic/tclDecls.h: `make genstubs`
* TIP#218 IMPLEMENTATIONandreas_kupries2005-01-271-36/+62
| | | | | | | | | | | | | | | | | | | | * generic/tclDecls.h: Regenerated from tcl.decls. * generic/tclStubInit.c: * doc/CrtChannel.3: Documentation of extended API, * generic/tcl.decls: extended testsuite, and * generic/tcl.h: implementation. Removal of old * generic/tclIO.c: driver-specific TclpCut/Splice * generic/tclInt.h: functions. Replaced with generic * tests/io.test: thread-action calls through the * unix/tclUnixChan.c: new hooks. Update of all builtin * unix/tclUnixPipe.c: channel drivers to version 4. * unix/tclUnixSock.c: Windows drivers extended to * win/tclWinChan.c: manage thread state in a thread * win/tclWinConsole.c: action handler. * win/tclWinPipe.c: * win/tclWinSerial.c: * win/tclWinSock.c:
* * unix/tclUnixChan.c (TtySetOptionProc): fixed crash configuringhobbs2004-11-171-10/+10
| | | | -ttycontrol on a channel. [Bug 1067708]
* * unix/tclUnixChan.c: [Bug 727786]. Exterminated the code markedandreas_kupries2004-11-101-104/+4
| | | | | DEPRECATED. This code has not been used in over a year now, and we have no complaints.
* Put braces round if bodies...dkf2004-10-061-4/+6
|
* Made compiling with -Wstrict-prototypes -Wmissing-prototypes much cleaner.dkf2004-05-271-1/+5
| | | | Also added support for [FRQ 951168] but left that switched off by default.
* * Applied [SF Tcl Patch 868853], fixing a mem leak inandreas_kupries2004-05-041-1/+10
| | | | | TtySetOptionProc. Report and Patch provided by Stuart Cassoff <stwo@users.sf.net>.
* Patch 922727 committed. Implements three changes:dgp2004-04-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: Reworked the Tcl header files into a clean * unix/tclUnixPort.h: hierarchy where tcl.h < tclPort.h < tclInt.h * win/tclWinInt.h: and every C source file should #include * win/tclWinPort.h: at most one of those files to satisfy its declaration needs. tclWinInt.h and tclWinPort.h also better organized so that tclWinPort.h includes the Windows implementation of cross-platform declarations, while tclWinInt.h makes declarations that are available on Windows only. * generic/tclBinary.c (TCL_NO_MATH): Deleted the generic/tclMath.h * generic/tclMath.h (removed): header file. The internal Tcl * macosx/Makefile (PRIVATE_HEADERS): header, tclInt.h, has a * win/tcl.dsp: #include <math.h> directly, and file external to Tcl needing libm should do the same. * win/Makefile.in (WIN_OBJS): Deleted the win/tclWinMtherr.c file. * win/makefile.bc (TCLOBJS): It's a vestige from matherr() days * win/makefile.vc (TCLOBJS): gone by. * win/tcl.dsp: * win/tclWinMtherr.c (removed):
* * generic/tclNamesp.c: Added temporary pointer variables to workrmax2004-03-181-4/+9
| | | | | * generic/tclStubLib.c: around warnings related to * unix/tclUnixChan.c: strict aliasing with GCC 3.3.
* Fix memleak with long hostnames. [Bug 888777]dkf2004-02-251-1/+3
|
* All uses of 'panic' (the macro) changeddavygrvy2003-12-241-6/+7
| | | | | | | to 'Tcl_Panic' (the function). The #define of panic in tcl.h clearly states it is deprecated in the comments. [Patch 865264]
* Changes from Victor Wagner <vitus@45.free.net> for DJGPP support.davygrvy2003-11-181-1/+4
|
* * unix/tclUnixChan.c (Tcl_MakeFileChannel): Applied [Patch 813606]andreas_kupries2003-10-231-5/+8
| | | | | | fixing [Bug 813087]. Detection of sockets was off for Mac OS X which implements pipes as local sockets. The new code ensures that only IP sockets are detected as such.
* * unix/tclUnixChan.c (Tcl_MakeTcpClientChannel): addhobbs2003-02-211-6/+33
| | | | | | MakeTcpClientChannelMode that takes actual mode flags to avoid hang on OS X (may be OS X bug, but patch works x-plat). [Bug #689835] (steffen)
* * generic/tclIO.c (Tcl_CutChannel, Tcl_SpliceChannel):mdejong2003-01-261-14/+104
| | | | | | | | | | | | | | | | Invoke TclpCutFileChannel and TclpSpliceFileChannel. * generic/tclInt.h: Declare TclpCutFileChannel and TclpSpliceFileChannel. * unix/tclUnixChan.c (FileCloseProc, TclpOpenFileChannel, Tcl_MakeFileChannel, TclpCutFileChannel, TclpSpliceFileChannel): Implement thread load data cut and splice for file channels. This avoids an invalid memory ref when compiled with -DDEPRECATED. * win/tclWinChan.c (FileCloseProc, TclpCutFileChannel, TclpSpliceFileChannel): Implement thread load data cut and splice for file channels. This avoids an invalid memory ref that was showing up in the thread extension.
* * generic/tclEvent.c (TclInExit, TclInThreadExit):mdejong2002-11-071-2/+2
| | | | | | | | | | | | | | | Split out functionality of TclInExit to make it clear which one should be called in each situation. * generic/tclInt.decls: Declare TclInThreadExit. * generic/tclIntDecls.h: Regen. * generic/tclStubInit.c: Regen. * mac/tclMacChan.c (StdIOClose): * unix/tclUnixChan.c (FileCloseProc): * win/tclWinChan.c (FileCloseProc): * win/tclWinConsole.c (ConsoleCloseProc): * win/tclWinPipe.c (TclpCloseFile): * win/tclWinSerial.c (SerialCloseProc): Invoke the new TclInThreadExit method instead of TclInExit.
* * unix/tclUnixChan.c (Tcl_MakeTcpClientChannel): make sure to inithobbs2002-09-031-1/+2
| | | | flags field of TcpState ptr to 0.
* * unix/tcl.m4 (SC_SERIAL_PORT): Fixed detection for cases whenrmax2002-07-291-5/+5
| | | | | | | | | | | | | configure's stdin is not a tty. * unix/tclUnixPort.h: * generic/tclIOSock.c: Changed size_t to socklen_t in socket-related function calls. * unix/configure.in: Added test and fallback definition for socklen_t. * unix/configure: generated.
* fs cleanupvincentdarley2002-07-081-21/+4
|
* Changed all the Tcl_Platform* symbols to TclOS*; they weren't public so theirdkf2002-06-281-12/+21
| | | | names were really badly chosen. Also prevented a double-#def.
* TIP#91 implementation; makes old style channels binary compatible withdkf2002-05-241-11/+71
| | | | new TIP#72-enabled Tcl. See http://purl.org/tcl/tip/91 for details.
* More tidying up; tclUnixChan.c now builds with GCC without warnings.dkf2002-05-141-480/+456
|
* Stop Solaris from generating a warning; the second argument to ioctl has beendkf2002-05-131-2/+6
| | | | observed to be either signed (Solaris) or unsigned (Linux)...
* * unix/tclUnixChan.c: initial remedy for [Bug #525783] flushhobbs2002-03-051-4/+23
| | | | | | problem introduced by TIP #35. This may not satisfy true serial channels, but it restores the correct flushing of std* channels on exit.
* * unix/tclUnixChan.c (TclpOpenFileChannel): Added code to regonizeandreas_kupries2002-02-271-2/+8
| | | | | | | | | | "/dev/tty" (by name) and to not handle it as tty / serial line. This is the controlling terminal and is special. Setting it into raw mode as is done for other tty's is a bad idea. This is a hackish fix for expect SGF Bug #520624. The fix has limitation: Tcl_MakeFileChannel handles tty's specially too, but is unable to recognize /dev/tty as it only gets a file descriptor, and no name for it.
* * unix/tclUnixChan.c: added Unix implementation of TIP #35, serialhobbs2002-02-261-16/+385
| | | | port support. [Patch #438509] (schroedter)
* TIP#72 implementation. See ChangeLog for details.dkf2002-02-151-15/+16
| | | | | This version builds clean on Solaris/SPARC, with GCC and CC, both with and without threads and both in 32-bit and 64-bit mode.
* * unix/tclUnixChan.c (FileOutputProc): Fixed [bug 465765] reportedandreas_kupries2002-02-041-1/+11
| | | | | | | | by Dale Talcott <daletalcott@users.sourceforge.net>. Avoid to write nothing into a file as STREAM based implementations will consider this a EOF (if the file is a pipe). Not done in the generic layer as this type of writing is actually useful to check the state of a socket.
* * Updated socket interfaces according to TIP 27. Updated callers.dgp2002-01-231-11/+11
|
* * More TIP 27 updates in tclIOUtil.c and tclIndexObj.c that weredgp2002-01-171-2/+2
| | | | | | | overlooked before. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes a source incompatibility in the tablePtr arguments of the Tcl_GetIndexFromObj* routines.
* * Updated APIs in generic/tclIOUtil.c and generic/tclPosixStr.cdgp2002-01-151-2/+2
| | | | according to the guidelines of TIP 27. Updated callers. [Patch 499196]
* * Updated APIs in the file generic/tclIO.c according to the guidelinesdgp2002-01-151-14/+14
| | | | | | | | | | | of TIP 27. Several minor documentation corrections as well. * Updated channel driver interface according to the guidelines of TIP 27. See also [Bug 500348]. * Moved Tcl_EolTranslation enum declaration from generic/tcl.h to generic/tclInt.h (renamed to TclEolTranslation). It is not used anywhere in Tcl's public interface.
* added TIP#73 patch #483500 from Kevin Kenny.hobbs2001-11-211-3/+3
| | | | This deprecates TclpGetTime in favor of new Tcl_GetTime.
* Fix for bug 471374; Tcl only resets serial ports on exit now if it hasdkf2001-10-251-15/+29
| | | | updated their settings first.