|
From: <sv...@va...> - 2009-04-27 04:35:41
|
Author: njn
Date: 2009-04-27 05:35:28 +0100 (Mon, 27 Apr 2009)
New Revision: 9644
Log:
Tweak some comments.
Modified:
branches/DARWIN/coregrind/m_libcfile.c
branches/DARWIN/coregrind/pub_core_libcfile.h
branches/DARWIN/include/pub_tool_basics.h
Modified: branches/DARWIN/coregrind/m_libcfile.c
===================================================================
--- branches/DARWIN/coregrind/m_libcfile.c 2009-04-27 03:27:31 UTC (rev 9643)
+++ branches/DARWIN/coregrind/m_libcfile.c 2009-04-27 04:35:28 UTC (rev 9644)
@@ -582,9 +582,10 @@
return 0;
}
-/* Note this moves (or at least, is believed to move) the file pointer
+/* DDD: Note this moves (or at least, is believed to move) the file pointer
on Linux and AIX5 but doesn't on Darwin. This inconsistency should
- be fixed. */
+ be fixed. (In other words, why isn't the Linux/AIX5 version implemented in
+ terms of pread()?) */
SysRes VG_(pread) ( Int fd, void* buf, Int count, OffT offset )
{
SysRes res;
Modified: branches/DARWIN/coregrind/pub_core_libcfile.h
===================================================================
--- branches/DARWIN/coregrind/pub_core_libcfile.h 2009-04-27 03:27:31 UTC (rev 9643)
+++ branches/DARWIN/coregrind/pub_core_libcfile.h 2009-04-27 04:35:28 UTC (rev 9644)
@@ -82,9 +82,10 @@
extern Int VG_(check_executable)(/*OUT*/Bool* is_setuid,
const HChar* f, Bool allow_setuid);
-/* Note this moves (or at least, is believed to move) the file pointer
+/* DDD: Note this moves (or at least, is believed to move) the file pointer
on Linux and AIX5 but doesn't on Darwin. This inconsistency should
- be fixed. */
+ be fixed. (In other words, why isn't the Linux/AIX5 version implemented in
+ terms of pread()?) */
extern SysRes VG_(pread) ( Int fd, void* buf, Int count, OffT offset );
/* Create and open (-rw------) a tmp file name incorporating said arg.
Modified: branches/DARWIN/include/pub_tool_basics.h
===================================================================
--- branches/DARWIN/include/pub_tool_basics.h 2009-04-27 03:27:31 UTC (rev 9643)
+++ branches/DARWIN/include/pub_tool_basics.h 2009-04-27 04:35:28 UTC (rev 9644)
@@ -112,13 +112,12 @@
// - off_t is "used for file sizes".
// At one point we were using it for memory offsets, but PtrdiffT should be
// used in those cases.
-// DDD: on Linux and AIX, off_t is a signed word-sized int. On Darwin it's
-// always a signed 64-bit int. Need to find a way to remove this #if.
-// Killing OffT in favour of Off64T everywhere might work.
+// Nb: on Linux and AIX, off_t is a signed word-sized int. On Darwin it's
+// always a signed 64-bit int. So we defined our own Off64T as well.
#if defined(VGO_linux) || defined(VGO_aix5)
typedef Word OffT; // 32 64
#elif defined(VGO_darwin)
-typedef Long OffT; // 32 64
+typedef Long OffT; // 64 64
#else
# error Unknown OS
#endif
|