Age | Commit message (Collapse) | Author | Files | Lines |
|
Some 32 bit systems may require explicit use of stat64, etc.
Fixes #263
|
|
_fullpath isn't necessarily available, so check for it
symlink() isn't useful enough on Windows to use
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Fixes #91
|
|
On some systems, 1024 isn't enough so use PATH_MAX if available.
Fixes: #247
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Although the interface is different ('$handle stat' vs 'chan configure -stat')
the behaviour is the same.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The command line processing was wrong such that 'file delete -force abc'
would also try to delete files named 'delete' and '-force' in the current directory.
If the current directory was writable, this would succeed, but it not writable
this would fail and so the desired target was not deleted.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
jim.h now includes JIM_ABI_VERSION that should be incremented whenever
the ABI changes. Then all loadable modules should call Jim_CheckAbiVersion()
to make sure they are loaded against the correct version.
Add Jim_PackageProvideCheck() that does both Jim_CheckAbiVersion()
and Jim_PackageProvide() to simplify the implementation of loadable extensions.
Also rename the "big" sqlite3 extension to just sqlite to avoid a naming conflict with
the smaller jim-sqlite3 extension.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
While -D__MINGW_USE_VC2005_COMPAT enables a 64-bit time_t,
it is necessary to explicitly use _stat64 to access the stat
structure containing 64 bit times.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Mostly just avoiding running certain tests, but also:
- rename() won't overwrite an existing file on Windows
- ensure that eof returns 0 or 1
- in aio.test, create and read the file in binary mode
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This subcommand was missing as it wasn't part of the original Tcl 6.7
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
e.g. file tail /abc/def/ => def
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Note that actual support is dependent upon the underlying operating
system and filesystem.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Needed to make file join work with msys2
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
- fix popen [open "|pipeline ..."] to return meaningful status in close
(but note that stderr is not captured)
- popen pipelines can now be used as the target of exec redirection
- overally improvements to exec on windows. Now crt file descriptors
are used throughout
- add support for [pid], [wait] and popen on windows
- os.wait is now wait, and integrates with [exec ... &] to be able
to wait for running background tasks
- [socket pipe] is now also [pipe] and is supported on windows
- [file tempfile] is supported on windows
- move duplicated code between jim-aio.c and jim-exec.c to jimiocompat.c
- Fix [exec] on windows to match unix semantics wrt sharing the parent stream
unless redirected rather than using /dev/null
- On windows redirect to or from /dev/null is automatically converted to NUL:
- If signal support is disabled, implement a minimal Jim_SignalId() for exec and wait
- aio now supports getfd, to return the underlying file descriptor.
This is used by exec to support redirection, and allows popen channels
to support exec redirection.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Mainly, [file join] should leave the trailing slash
on c:/
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Currently only on systems that support both hard and symbolic links.
Update docs for 'file link' and some other [file] commands
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This applies to [exec] and [file tempfile]
Reported-by: Jakub Wilk
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Set umask so that temp files are created with
permissions 0600.
Courtesy of coverity.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Courtesy of coverity
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Andy <jimdevel@hummypkg.org.uk>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Sweep through and clean up all (most) of the comments in the code.
While there, adjust some variable and function names to be more consistent,
and make a few small code changes - again, mostly for consistency.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The varname is now optional. The return value is a dictionary.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Implement support for the -directory option to the [glob]
command. The -tails option is accepted for Tcl compatibility,
but ignored; the command always behaves as if -tails were given.
|
|
Because file normalize uses realpath(), the path must exist.
This is not 100% compatible with Tcl which can also normalize
nonexistent paths.
Don't ignore the error from realpath()
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The Intel C Compiler
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Simplifies the process of building loadable extensions
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
For better compatibility c89 compatibility.
Also simplify jim-subcmd. Remove -usage and command descriptions.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Jim_EvalObjPrefix now accepts an arbitrary Jim_Obj as a prefix,
with Jim_EvalPrefix being equivalent to the older version.
|
|
Allows a file to be "touched"
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Although [dict unset] should not complain about
being unable to unset a missing element, unset via array
syntax (dict sugar) should - to be compatible with Tcl.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
In particular, file join / anything
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Will recursively remove directories, even if not empty.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Convert some paths from backslashes to forward slashes
Handle splitting/joining paths which look like z:/abc/def
Identify the platform as mingw
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
- Check for mkdir with one arg at configure time
- mingw can't really do select(), so support only time events in eventloop
- Declare dlerror() to be compatible with mingw
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
It is very common to get the string value
without the length. Jim_String() is a macro which does that.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Ensure that no public headers include the autoconf
header, jimautoconf.h, as it leads to problems
with redefined symbols.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Per v0.51, don't refer to the FreeBSD licence
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Especially for eCos, mingw32 and cygwin
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
All C extensions must call Jim_PackageProvide()
make-c-ext ensures that Tcl extensions call Jim_PackageProvide()
if compiled in.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|