[ tcl-Bugs-942170 ] HAVE_ST_BLOCKS missing in configure

View: New views
1 Messages — Rating Filter:   Alert me  

[ tcl-Bugs-942170 ] HAVE_ST_BLOCKS missing in configure

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bugs item #942170, was opened at 2004-04-26 01:33
Message generated for change (Comment added) made by stwo
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110894&aid=942170&group_id=10894

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: 53. Configuration and Build Tools
Group: obsolete: 8.4.6
Status: Open
Resolution: Remind
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Stuart Cassoff (stwo)
Summary: HAVE_ST_BLOCKS missing in configure

Initial Comment:
Hi,
 
  in the tcl8.4.6 source-code are lines like
 
noadmin@win01:.> find . -type f | xargs grep BLOCKS
./generic/tclTest.c:#   ifdef HAVE_ST_BLOCKS
./generic/tclTest.c:#   ifdef HAVE_ST_BLOCKS
./generic/tclIOUtil.c:#ifdef HAVE_ST_BLOCKS
./generic/tclIOUtil.c:#ifdef HAVE_ST_BLOCKS
./generic/tclIOUtil.c:#ifdef HAVE_ST_BLOCKS
./generic/tclCmdAH.c:#ifdef HAVE_ST_BLOCKS
 
ths "configure" entries are missing
 
 
mfg
 
  aotto

----------------------------------------------------------------------

>Comment By: Stuart Cassoff (stwo)
Date: 2009-11-05 12:02

Message:
USE_OBSOLETE_FS_HOOKS enables old code which also uses  HAVE_ST_BLOCKS.
If HAVE_ST_BLOCKS is enabled then the C function Tcl_Stat and the Tcl
command [file stat] will return a 'blocks' field.
This has been around since 8.4.0 and seeing as no one seems to be missing
it, I'd agree that it should be purged.
But! The implementation of TIP 316 has now added: Tcl_GetBlocksFromStat -
Returns the st_blocks field as an unsigned wide integer.
If HAVE_ST_BLOCKS isn't defined then a guess is made.
So perhaps HAVE_ST_BLOCKS should be properly configured and used.
The function StoreStatData in generic/tclICmdAH.c could be modified to use
the TIP 316 functions.
Have all the 'stat' functions/commands return the same fields.
As it is now, if HAVE_ST_BLOCKS were to be enabled then the result of
[file stat] would contain an 'extra' field. This causes a test failure
since the test suite doesn't account for the 'blocks' field either.

----------------------------------------------------------------------

Comment By: Don Porter (dgp)
Date: 2009-11-05 07:57

Message:

Support for the obsolete FS hooks is already
purged from the HEAD, so if HAVE_ST_BLOCKS
is only for their sake, they ought to be purged too.


----------------------------------------------------------------------

Comment By: Matthias Kraft (matzek)
Date: 2009-11-05 00:35

Message:
Oh ... and the code came in with the implementation of TIP 72.

----------------------------------------------------------------------

Comment By: Matthias Kraft (matzek)
Date: 2009-11-05 00:33

Message:
Summing up some conversation on the chat about this topic, today:

* To enable this code one apparently has to provide the defines
HAVE_ST_BLOCKS and USE_OBSOLETE_FS_HOOKS. Neither one is provided via the
autoconf stuff.

* If I read the commentary in tclIOUtil.c correctly, this was never
released and is only in there for backward compatibility for TclPro.

* st_blocks itself is relatively useless (IMHO), one have to KNOW the
block size of the file system. It is not a part of POSIX, but is an X/Open
System Interface. Besides this POSIX documents for sys/stat.h:

"The unit for the st_blocks member of the stat structure is not defined
within IEEE Std 1003.1-2001. In some implementations it is 512 bytes. It
may differ on a file system basis. There is no correlation between values
of the st_blocks and st_blksize, and the f_bsize (from <sys/statvfs.h>)
structure members.

Traditionally, some implementations defined the multiplier for st_blocks
in <sys/param.h> as the symbol DEV_BSIZE."

-- Matthias Kraft

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110894&aid=942170&group_id=10894

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Tcl-Bugs mailing list
Tcl-Bugs@...
https://lists.sourceforge.net/lists/listinfo/tcl-bugs