summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog18
-rw-r--r--ChangeLogs/ChangeLog-02a18
-rw-r--r--ChangeLogs/ChangeLog-03a18
-rw-r--r--ace/FILE.cpp16
-rw-r--r--ace/Filecache.cpp10
-rw-r--r--ace/Filecache.h2
-rw-r--r--ace/OS.cpp2
-rw-r--r--ace/OS.h6
-rw-r--r--ace/OS.i16
9 files changed, 74 insertions, 32 deletions
diff --git a/ChangeLog b/ChangeLog
index 7e82de7602e..b5e4c465c74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+Wed Jan 24 14:44:12 2001 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * ace/FILE.cpp:
+ * ace/Filecache.cpp:
+ * ace/Filecache.h:
+ * ace/OS.h:
+ * ace/OS.i:
+ * ace/OS.cpp: Changed the signature of <stat>, <fstat>, and
+ <lstat> to use ACE_stat instead of "struct stat". Also changed
+ to use _fstat and _stat on win32 instead of <fstat> and <stat>
+ directly. Also replaced several use of "struct stat" to
+ ACE_stat. Thanks to Mike Anderson <manderson@sonusnet.com> for
+ reporting this. [Bug 762]
+
Wed Jan 24 16:13:10 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* ace/OS_Dirent.cpp: Fixed a bug in the readdir_emulation() method.
@@ -5,8 +19,8 @@ Wed Jan 24 16:13:10 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* ace/Connector.{h,cpp}: Added a new connector() accessor to
return the underlying ACE_PEER_CONNECTOR. Thanks to Pedro
- Brandao <pbrandao@inescn.pt> for suggesting this.
-
+ Brandao <pbrandao@inescn.pt> for suggesting this.
+
Wed Jan 24 10:17:03 2001 Carlos O'Ryan <coryan@uci.edu>
* ace/Makefile:
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 7e82de7602e..b5e4c465c74 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,17 @@
+Wed Jan 24 14:44:12 2001 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * ace/FILE.cpp:
+ * ace/Filecache.cpp:
+ * ace/Filecache.h:
+ * ace/OS.h:
+ * ace/OS.i:
+ * ace/OS.cpp: Changed the signature of <stat>, <fstat>, and
+ <lstat> to use ACE_stat instead of "struct stat". Also changed
+ to use _fstat and _stat on win32 instead of <fstat> and <stat>
+ directly. Also replaced several use of "struct stat" to
+ ACE_stat. Thanks to Mike Anderson <manderson@sonusnet.com> for
+ reporting this. [Bug 762]
+
Wed Jan 24 16:13:10 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* ace/OS_Dirent.cpp: Fixed a bug in the readdir_emulation() method.
@@ -5,8 +19,8 @@ Wed Jan 24 16:13:10 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* ace/Connector.{h,cpp}: Added a new connector() accessor to
return the underlying ACE_PEER_CONNECTOR. Thanks to Pedro
- Brandao <pbrandao@inescn.pt> for suggesting this.
-
+ Brandao <pbrandao@inescn.pt> for suggesting this.
+
Wed Jan 24 10:17:03 2001 Carlos O'Ryan <coryan@uci.edu>
* ace/Makefile:
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 7e82de7602e..b5e4c465c74 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,17 @@
+Wed Jan 24 14:44:12 2001 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * ace/FILE.cpp:
+ * ace/Filecache.cpp:
+ * ace/Filecache.h:
+ * ace/OS.h:
+ * ace/OS.i:
+ * ace/OS.cpp: Changed the signature of <stat>, <fstat>, and
+ <lstat> to use ACE_stat instead of "struct stat". Also changed
+ to use _fstat and _stat on win32 instead of <fstat> and <stat>
+ directly. Also replaced several use of "struct stat" to
+ ACE_stat. Thanks to Mike Anderson <manderson@sonusnet.com> for
+ reporting this. [Bug 762]
+
Wed Jan 24 16:13:10 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* ace/OS_Dirent.cpp: Fixed a bug in the readdir_emulation() method.
@@ -5,8 +19,8 @@ Wed Jan 24 16:13:10 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* ace/Connector.{h,cpp}: Added a new connector() accessor to
return the underlying ACE_PEER_CONNECTOR. Thanks to Pedro
- Brandao <pbrandao@inescn.pt> for suggesting this.
-
+ Brandao <pbrandao@inescn.pt> for suggesting this.
+
Wed Jan 24 10:17:03 2001 Carlos O'Ryan <coryan@uci.edu>
* ace/Makefile:
diff --git a/ace/FILE.cpp b/ace/FILE.cpp
index a3d6d5a5e52..e6e5445f6a8 100644
--- a/ace/FILE.cpp
+++ b/ace/FILE.cpp
@@ -2,7 +2,7 @@
// $Id$
/* Defines the member functions for the base class of the ACE_IO_SAP
- ACE_FILE abstraction. */
+ ACE_FILE abstraction. */
#include "ace/FILE.h"
@@ -21,7 +21,7 @@ ACE_FILE::dump (void) const
ACE_IO_SAP::dump ();
}
-// This is the do-nothing constructor.
+// This is the do-nothing constructor.
ACE_FILE::ACE_FILE (void)
{
@@ -43,9 +43,9 @@ int
ACE_FILE::get_info (ACE_FILE_Info *finfo)
{
ACE_TRACE ("ACE_FILE::get_info");
- struct stat filestatus;
+ ACE_stat filestatus;
- int result = ACE_OS::fstat (this->get_handle (),
+ int result = ACE_OS::fstat (this->get_handle (),
&filestatus);
if (result == 0)
@@ -93,18 +93,18 @@ ACE_FILE::tell (void)
{
ACE_TRACE ("ACE_FILE::position");
return ACE_OS::lseek (this->get_handle (), 0, SEEK_CUR);
-}
+}
off_t
ACE_FILE::position (void)
{
ACE_TRACE ("ACE_FILE::position");
return this->tell ();
-}
+}
// Return the local endpoint address.
-int
+int
ACE_FILE::get_local_addr (ACE_Addr &addr) const
{
ACE_TRACE ("ACE_FILE::get_local_addr");
@@ -125,7 +125,7 @@ ACE_FILE::get_local_addr (ACE_Addr &addr) const
// Return the same result as <get_local_addr>.
-int
+int
ACE_FILE::get_remote_addr (ACE_Addr &addr) const
{
ACE_TRACE ("ACE_FILE::get_remote_addr");
diff --git a/ace/Filecache.cpp b/ace/Filecache.cpp
index 719d8bfe65e..b37a9ca20da 100644
--- a/ace/Filecache.cpp
+++ b/ace/Filecache.cpp
@@ -18,13 +18,13 @@ ACE_RCSID(ace, Filecache, "$Id$")
#if defined (ACE_WIN32)
// See if you can get rid of some of these.
#define READ_FLAGS (FILE_FLAG_SEQUENTIAL_SCAN | \
- FILE_FLAG_OVERLAPPED | \
- O_RDONLY)
+ FILE_FLAG_OVERLAPPED | \
+ O_RDONLY)
// static const int RCOPY_FLAGS = (FILE_FLAG_SEQUENTIAL_SCAN |
// O_RDONLY);
#define WRITE_FLAGS (FILE_FLAG_SEQUENTIAL_SCAN | \
- FILE_FLAG_OVERLAPPED | \
- O_RDWR | O_CREAT | O_TRUNC)
+ FILE_FLAG_OVERLAPPED | \
+ O_RDWR | O_CREAT | O_TRUNC)
// static const int WCOPY_FLAGS = (FILE_FLAG_SEQUENTIAL_SCAN |
// O_RDWR | O_CREAT | O_TRUNC);
#else
@@ -720,7 +720,7 @@ ACE_Filecache_Object::update (void) const
{
// The existence of the object means a read lock is being held.
int result;
- struct stat statbuf;
+ ACE_stat statbuf;
if (ACE_OS::stat (this->filename_, &statbuf) == -1)
result = 1;
diff --git a/ace/Filecache.h b/ace/Filecache.h
index d7870691c01..7e8df017878 100644
--- a/ace/Filecache.h
+++ b/ace/Filecache.h
@@ -329,7 +329,7 @@ private:
ACE_HANDLE handle_;
/// Used to compare against the real file to test if an update is needed.
- struct stat stat_;
+ ACE_stat stat_;
size_t size_;
/// Status indicators.
diff --git a/ace/OS.cpp b/ace/OS.cpp
index 517eda1bfba..c0351a767f0 100644
--- a/ace/OS.cpp
+++ b/ace/OS.cpp
@@ -4609,7 +4609,7 @@ ACE_OS::mktemp (ACE_TCHAR *s)
else
{
ACE_TCHAR unique_letter = ACE_LIB_TEXT ('a');
- struct stat sb;
+ ACE_stat sb;
// Find an unused filename for this process. It is assumed
// that the user will open the file immediately after
diff --git a/ace/OS.h b/ace/OS.h
index f57a5fb71a3..dafec97c360 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -5390,7 +5390,7 @@ public:
# endif /* fdopen */
static FILE *fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode);
static ACE_TCHAR *fgets (ACE_TCHAR *buf, int size, FILE *fp);
- static int stat (const ACE_TCHAR *file, struct stat *);
+ static int stat (const ACE_TCHAR *file, ACE_stat *);
static int truncate (const ACE_TCHAR *filename, off_t length);
static int fprintf (FILE *fp, const char *format, ...);
@@ -5429,9 +5429,9 @@ public:
long offset,
int ptrname);
static int fstat (ACE_HANDLE,
- struct stat *);
+ ACE_stat *);
static int lstat (const char *,
- struct stat *);
+ ACE_stat *);
static int ftruncate (ACE_HANDLE,
off_t);
static size_t fwrite (const void *ptr,
diff --git a/ace/OS.i b/ace/OS.i
index 01578686ae9..c663cb097f6 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -619,7 +619,7 @@ extern "C" char *mktemp (char *);
# endif /* VXWORKS */
ACE_INLINE int
-ACE_OS::fstat (ACE_HANDLE handle, struct stat *stp)
+ACE_OS::fstat (ACE_HANDLE handle, ACE_stat *stp)
{
ACE_OS_TRACE ("ACE_OS::fstat");
#if defined (ACE_HAS_PACE)
@@ -637,13 +637,13 @@ ACE_OS::fstat (ACE_HANDLE handle, struct stat *stp)
// causes compile and runtime problems.
ACE_OSCALL_RETURN (::_fxstat (_STAT_VER, handle, stp), int, -1);
# else /* !ACE_HAS_X86_STAT_MACROS */
- ACE_OSCALL_RETURN (::fstat (handle, stp), int, -1);
+ ACE_OSCALL_RETURN (::_fstat (handle, stp), int, -1);
# endif /* !ACE_HAS_X86_STAT_MACROS */
#endif /* defined (ACE_HAS_PACE) */
}
ACE_INLINE int
-ACE_OS::lstat (const char *file, struct stat *stp)
+ACE_OS::lstat (const char *file, ACE_stat *stp)
{
ACE_OS_TRACE ("ACE_OS::lstat");
# if defined (ACE_LACKS_LSTAT) || \
@@ -657,7 +657,7 @@ ACE_OS::lstat (const char *file, struct stat *stp)
// wrapper for _lxstat().
ACE_OSCALL_RETURN (::_lxstat (_STAT_VER, file, stp), int, -1);
#else /* !ACE_HAS_X86_STAT_MACROS */
- ACE_OSCALL_RETURN (::lstat (file, stp), int, -1);
+ ACE_OSCALL_RETURN (::_lstat (file, stp), int, -1);
#endif /* !ACE_HAS_X86_STAT_MACROS */
# endif /* VXWORKS */
}
@@ -878,7 +878,7 @@ ACE_OS::umask (mode_t cmask)
}
ACE_INLINE int
-ACE_OS::fstat (ACE_HANDLE handle, struct stat *stp)
+ACE_OS::fstat (ACE_HANDLE handle, ACE_stat *stp)
{
ACE_OS_TRACE ("ACE_OS::fstat");
#if defined (ACE_HAS_PACE)
@@ -915,7 +915,7 @@ ACE_OS::fstat (ACE_HANDLE handle, struct stat *stp)
int retval = -1;
int fd = ::_open_osfhandle ((long) handle, 0);
if (fd != -1)
- retval = ::_fstat (fd, (struct _stat *) stp);
+ retval = ::_fstat (fd, stp);
::_close (fd);
// Remember to close the file handle.
@@ -1014,7 +1014,7 @@ ACE_OS::gettimeofday (void)
}
ACE_INLINE int
-ACE_OS::stat (const ACE_TCHAR *file, struct stat *stp)
+ACE_OS::stat (const ACE_TCHAR *file, ACE_stat *stp)
{
ACE_OS_TRACE ("ACE_OS::stat");
#if defined (ACE_HAS_PACE)
@@ -1059,7 +1059,7 @@ ACE_OS::stat (const ACE_TCHAR *file, struct stat *stp)
#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
ACE_OSCALL_RETURN (::_wstat (file, (struct _stat *) stp), int, -1);
#else /* VXWORKS */
- ACE_OSCALL_RETURN (::stat (file, stp), int, -1);
+ ACE_OSCALL_RETURN (::_stat (file, stp), int, -1);
#endif /* ACE_HAS_PACE */
}