Commit Graph

123 Commits

Author SHA1 Message Date
marco
7eeb4ab539 * also return fasymbolic if dir is found.
* update getattr to also return fasymbolic
  Patch by Dimitri B. Mantis #16817	

git-svn-id: trunk@18043 -
2011-08-01 11:36:28 +00:00
michael
a201f07420 * Added share mode argument to FileCreate call
git-svn-id: trunk@17548 -
2011-05-23 21:11:07 +00:00
michael
be484359b8 * Corrected fix for FileAge
git-svn-id: trunk@17224 -
2011-04-02 15:28:24 +00:00
michael
9747f7f0cd * Do not allow fileage for directories (15873)
git-svn-id: trunk@17221 -
2011-04-02 10:43:39 +00:00
marco
be98b13554 * fix for 11263, changed fileread and fd_zero to out using $modeswitch.
git-svn-id: trunk@14965 -
2010-03-01 22:35:14 +00:00
marco
8e9a7e14ad * Revised yesterday solution to a more general one. Executeprocess gets
another parameter, a set type with flags, default = []

git-svn-id: trunk@14572 -
2010-01-07 20:49:28 +00:00
Jonas Maebe
722d48c8c2 * only return an error if locking a file fails when the file is already
locked, but not when another error occurs (such as EsysNOLCK, because
    this error may always be returned if the kernel doesn't support
    locking, in which case programs such as fpcmake no longer work on
    such systems)

git-svn-id: trunk@14350 -
2009-12-07 13:30:19 +00:00
michael
01ed4a6745 * Implemented OnBeep to install custom beep handler
git-svn-id: trunk@14254 -
2009-11-22 17:33:56 +00:00
Jonas Maebe
25463000ac * do not mark all found files with Find* as "faHidden" if the search path
starts with './' (mantis #14020)
  * also mark files whose name starts with '.' that are found in subdirectories
    as faHidden (not reported, but was due to a similar error)
  - removed some unused variables related to the Find* functionality

git-svn-id: trunk@13307 -
2009-06-21 10:21:06 +00:00
michael
9538da64f9 * Change so that when FindFirst initially returns nonzero, FindClose is no longer needed (Windows compatible)
git-svn-id: trunk@13209 -
2009-05-29 07:24:02 +00:00
Jonas Maebe
f6d452c2c0 * remove the RTL's installed signal handlers at the end of the system
unit's initialization code in case we're in a library
  + implemented InquireSignal(), AbandonSignalHandler(), HookSignal() and
    UnhookSignal() in the sysutils unit
  * for Kylix compatibility, these routines support operating on
    SIGINT and SIGQUIT as well, although they are not hooked by default
    by FPC. The run time errors/exception codes for these signals are
    resp. 217 and 233 (same as in Kylix; I changed ENoWideStringSupport
    to 234).
  * changed the BSD syscall version of fpsigaction to use pointer
    rather than "var" arguments (compatible with other targets, and
    required to be able to pass nil arguments inside the system unit)
  -> together fixes mantis #12704

git-svn-id: trunk@13077 -
2009-05-02 09:40:44 +00:00
Jonas Maebe
99a02a93ca * also consider the search attributes for findfirst if the name does
not contain wildcards + test
  * don't return true from FindGetFileInfo if the file name is ok, but the
    search attributes don't match (resulted in returning multiple times the
    name of the previous entry that did fulfill all requirements)

git-svn-id: trunk@13074 -
2009-05-01 16:03:56 +00:00
Jonas Maebe
8b53f8c41a * fixed a bunch of cases where ESysEINTR wasn't handled
git-svn-id: trunk@12924 -
2009-03-19 21:46:12 +00:00
Jonas Maebe
f7003119d0 * fixed AddDisk() in sysutils and dos units, and fixed memory leaks
related to this functionality, based on analysis/patch by Michael
    Kamburelis (mantis #9985)

git-svn-id: trunk@12814 -
2009-02-27 22:02:24 +00:00
florian
475cd9926d * couple of small haiku fixes by Olivier Coursiere
git-svn-id: trunk@12739 -
2009-02-14 10:36:12 +00:00
Jonas Maebe
6f12cb03db * if no locking is specified, also request an exclusive lock for solaris
in case the file is opened as read/write (instead of only if opened as
    write-only)

git-svn-id: trunk@12685 -
2009-02-04 11:41:18 +00:00
Jonas Maebe
78f6e5ff6e * fixed fmShareDenyNone for Solaris
git-svn-id: trunk@12684 -
2009-02-04 10:13:46 +00:00
Jonas Maebe
6581c8dec5 * hopefully final fix to unix locking: specifying no locking mode again
means "exclusive lock" where supported (not on Solaris when opening
    a file in read-only mode)

git-svn-id: trunk@12675 -
2009-02-03 13:34:56 +00:00
Jonas Maebe
f9556bad39 * fixed ESysEIntr checking for fpflock
git-svn-id: trunk@12635 -
2009-01-31 21:12:17 +00:00
Jonas Maebe
4a829da2fc * fixed fileopen when not specifying any sharing (should not perform any
locking at all) (= fmShareCompat, as that one is 0)
  * fixed test for this change (and for fmShareDenyNone)

git-svn-id: trunk@12634 -
2009-01-31 18:46:11 +00:00
Jonas Maebe
9fabb0b127 * fixed file locking of files opened as read- or write-only on solaris
(locking is based on fcntl there, and that one cannot create an
     exclusive lock for a read-only file or a shared lock for a write-only
     file)

git-svn-id: trunk@12633 -
2009-01-31 18:11:58 +00:00
Jonas Maebe
57ff980bc3 * hopefully fixed beos compilation after r12630 (it doesn't have flock)
git-svn-id: trunk@12631 -
2009-01-30 16:09:08 +00:00
Jonas Maebe
a730ee7f10 + support for file locking for *nix systems based on flock (mantis #13012)
git-svn-id: trunk@12630 -
2009-01-30 15:08:30 +00:00
marco
52bb5ac229 * removed some old 1.0.x ->2.0.x transitional code (executeprocess)
git-svn-id: trunk@12238 -
2008-11-26 23:08:17 +00:00
michael
7a058a9bf2 * Added overloaded call for fplstat which has var argument (as for stat)
* Implemented support for faSymlink, as per 9915

git-svn-id: trunk@11681 -
2008-09-01 09:17:58 +00:00
joost
acff7f60bd * Add path-delimiters properly in GetAppConfigDir and GetAppConfigFile
git-svn-id: trunk@11384 -
2008-07-15 13:12:42 +00:00
Almindor
6433f8c38b * fix DiskFree and DiskSize to check for Drive argument
git-svn-id: trunk@11226 -
2008-06-14 11:19:51 +00:00
michael
26575472b6 * Added GetUSerDir function (ID 11338)
git-svn-id: trunk@11074 -
2008-05-24 11:50:26 +00:00
micha
83b7f81f81 + add no-fpu support to compiler/rtl for powerpc-linux (-Cfnone)
git-svn-id: trunk@10422 -
2008-03-02 12:59:02 +00:00
peter
95d0ce1270 * VendorName function added to allow an extra subdirectory
to group multiple products
  * OnGetVendorName hook, like OnGetApplicationName
  * use COMMON_APPPATH for global config files under windows

git-svn-id: trunk@10072 -
2008-01-27 21:40:55 +00:00
marco
827d380691 * pchar(pointer()) isms that were safe.
git-svn-id: trunk@8672 -
2007-09-28 21:57:45 +00:00
daniel
5acd85f447 * Revert 6964
git-svn-id: trunk@7000 -
2007-03-25 17:55:47 +00:00
daniel
8127fb7a05 * Switch to classic field names to prevent further messing with compatibility.
git-svn-id: trunk@6964 -
2007-03-23 22:35:12 +00:00
Jonas Maebe
95474a2d38 * fixed memory leak in executeprocess for FPC_USE_FPEXEC
git-svn-id: trunk@6826 -
2007-03-13 18:54:27 +00:00
Tomas Hajny
b06b453ee1 * check for 64-bit support in FileTruncate based on TOff definition
git-svn-id: trunk@6746 -
2007-03-06 20:33:28 +00:00
Jonas Maebe
6a7321c318 * enabled 64 bit filetruncate
git-svn-id: trunk@6739 -
2007-03-06 10:17:03 +00:00
peter
7fb4c0675a * fixed compile error
git-svn-id: trunk@6732 -
2007-03-06 07:13:20 +00:00
Tomas Hajny
5e1a7997ee + FileTruncate allows 64-bit parameter
git-svn-id: trunk@6727 -
2007-03-05 23:47:10 +00:00
michael
ea0fc335d1 * Fixed FileExists for >2GB files
git-svn-id: trunk@5929 -
2007-01-12 19:36:24 +00:00
Jonas Maebe
87a4372d7f * enable vfork for solaris
git-svn-id: trunk@5557 -
2006-12-08 10:20:38 +00:00
micha
0043aff24d * fix linux/sysutils 64 bit file handling: make off_t 64 bit
git-svn-id: trunk@5152 -
2006-11-01 16:32:12 +00:00
micha
0c5124c295 * fix compilation of sysutils, partly revert patch from peter which was a modified version of my patch
git-svn-id: trunk@4863 -
2006-10-11 18:19:06 +00:00
peter
d9bcee0cbe * don't allocate unixfinddata if we search only one file, patch from neli
git-svn-id: trunk@4855 -
2006-10-11 07:04:45 +00:00
Almindor
d107c6649c * fixes a findfirst bug (thanks to jesusrmx)
git-svn-id: trunk@4807 -
2006-10-05 20:28:53 +00:00
peter
25fe773e25 * FindFirst/FindNext replaced with optimized versions based on the
code in the dos unit.

git-svn-id: trunk@4772 -
2006-10-02 21:06:50 +00:00
michael
dc0e8428a6 + Fixed rights parameter in TFileStream.Create and FileCreate
git-svn-id: trunk@3862 -
2006-06-13 22:01:49 +00:00
michael
e73bc0b772 + Made AddDisk a function, returning the current number of drives.
git-svn-id: trunk@3816 -
2006-06-06 20:54:21 +00:00
michael
305e4142ff + Fixed FileGetAttr so hidden is correctly detected
git-svn-id: trunk@3790 -
2006-06-04 14:18:55 +00:00
Tomas Hajny
a9b515c0bf * fexpand defines kept in platform specific sysutils.pp
git-svn-id: trunk@3726 -
2006-05-28 21:29:26 +00:00
peter
da85b3db8c * fix linux build
git-svn-id: trunk@3626 -
2006-05-22 06:57:41 +00:00