summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixChan.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* filesystemvincentdarley2001-08-301-11/+8
|
* Unix channels now have the right type associated with them [bug #219137]dkf2001-06-181-29/+58
| | | | A couple of nasty faults/assumptions in unixInit.test are fixed too.
* * unix/tclUnixChan.c: updated channel types to stricthobbs2000-10-281-31/+43
| | | | | TCL_CHANNEL_VERSION_2 style to avoid compiler warnings. They work either way, but this avoids compiler warnings (that worries people).
* 2000-05-02 Andreas Kupries <a.kupries@westend.com>kupries2000-05-021-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Overall changes: (1) Implementation of joinable threads for all platforms. (2) Additional API's for channels. Required to allow the thread extension to move channels between threads. * generic/tcl.decls (lines 1360f): Added Tcl_JoinThread, Tcl_IsChannelShared, Tcl_IsChannelRegistered, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting and Tcl_ClearChannelHandlers (slots 394 to 400). * generic/tclIO.c: Implemented Tcl_IsChannelRegistered, Tcl_IsChannelShared, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting and Tcl_ClearChannelHandlers. Tcl_CutChannel uses code from CloseChannel. Replaced this code by a call to Tcl_CutChannel. Replaced several code fragments adding channels to the channel list with calls to Tcl_SpliceChannel. Removed now unused variables from CloseChannel and Tcl_UnstackChannel. Tcl_ClearChannelHandlers uses code from Tcl_Close. Replaced this code by a call to Tcl_ClearChannelHandlers. Removed now unused variables from Tcl_Close. Added the subcommands 'cut', 'forgetch', 'splice' and 'isshared' to the test code (TclTestChannelCmd). * unix/tclUnixThread.c: Implemented Tcl_JoinThread using the pthread-functionality. * win/tclWinThrd.c: Fixed several small typos in comments. Implemented Tcl_JoinThread using a platform independent emulation layer (see generic/tclThreadJoin.c below). Added 'joinLock' to serialize Tcl_CreateThread and TclpExitThread to prevent a race for joinable threads. * mac/tclMacThrd.c: Implemented Tcl_JoinThread using a platform independent emulation layer (see generic/tclThreadJoin.c below). Due to the cooperative nature of threading on this platform the race mentioned above is not present. * generic/tclThreadJoin.c: New file. Contains a platform independent emulation layer helping in the implementation of joinable threads for the win and mac platforms. * generic/tclInt.h: Added declarations for TclJoinThread, TclRememberJoinableThread and TclSignalExitThread. These procedures define the API of the emulation layer for joinable threads (see generic/tclThreadJoin.c above). * win/Makefile.in: * win/makefile.vc: Added generic/tclTheadJoin.o to the rules. * mac/: I don't know to which file generic/tclTheadJoin.o has to be added to so that it compiles. Sorry. * unix/tclUnixChan.c: #ifdef'd the thread-local list of file channels as it prevents us from transfering channels. To restore this we may need an extended interface to drivers in the future. Target: 9.0. Found while testing the new transfer of channels. The information in this list for a channel was left behind and then crashed the system during finalization. * generic/tclThreadTest.c: Added -joinable flag to 'testthread create'. Added subcommand 'testthread join'. * doc/CrtChannel.3: Added documentation for Tcl_IsChannelRegistered, Tcl_IsChannelShared, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting and Tcl_ClearChannelHandlers. * doc/Thread.3: Added documentation for Tcl_JoinThread. * tests/thread.test: Added tests for joining of threads.
* have to allow for strchr being a macro in TtyParseProchobbs2000-04-191-5/+6
|
* * README:hobbs2000-04-191-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tcl.h: * tools/tcl.wse.in: * unix/configure.in: * unix/tcl.spec: * win/configure.in: * win/README.binary: bumped version to 8.3.1 * win/tcl.hpj.in: updated copyright date * generic/tclEnv.c: environment support for Mac OS/X * unix/tclUnixPort.h: environment support for Mac OS/X * unix/tclLoadDyld.c: new file for Mac OS/X dl functions * unix/Makefile.in: added install-strip target; bindir, libdir, mandir, includedir vars; tclLoadDyld.c target [Bug: 2527] * unix/tclUnixChan.c (CreateSocket): force a socket back into blocking mode (default state) after a -async connect succeeds. [Bug: 4388] * generic/tclEvent.c (TclInitSubsystems): Moved tclLibraryPath to thread-local storage to prevent thread-related race condition. [Bug: 5033] * unix/tclAppInit.c (main): removed #ifdef TCL_TEST that sets the library path as it was unnecessary and conflicts with move of tclLibraryPath to thread-local storage.
* * unix/tclUnixChan.c (TtyParseMode): Only allow setting mark/spacehobbs2000-04-151-3/+18
| | | | parity on platforms that support it [Bug: 5089]
* * unix/tclUnixChan.c: Added (off_t) type casts in lseek() callericm2000-03-271-2/+2
| | | | | | | | [Bug: 4409]. * unix/tclLoadAout.c: * unix/tclUnixPipe.c: Added (off_t) type casts in lseek() calls [Bug: 4410].
* * unix/tcl.m4: modified EXTRA_CFLAGS to add -DHAVE_TZSET forhobbs2000-01-261-4/+4
| | | | | | | | OSF1-V* and ULTRIX-4.* when not using gcc. Also added higher min stack size for OSF1-V* when building with threads. [Bug: 4063] * unix/tclUnixChan.c (CreateSocketAddress): changed comparison with -1 to 0xFFFFFFFF, to ensure 32 bit comparison even on 64 bit systems. [Bug: 3878]