Closed Bug 63357 Opened 24 years ago Closed 23 years ago

xpcom/io/nsIFileStream.h should be removed

Categories

(Core :: XPCOM, defect)

All
Mac System 8.5
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: sfraser_bugs, Assigned: dougt)

Details

nsIFileStream.h contains some stream-related stuff that is duplicated in the 
header generated from netwerk/base/public/nsIFileStreams.h. e.g. they both have 
#define NS_IFILEINPUTSTREAM_IID
defining this to a different IID! This is build and runtime bustage waiting to 
happen.
I had to make this patch to use both nsIFileStream.h and nsIFileStreams.h:

Index: mozilla/xpcom/io/nsIFileStream.h
===================================================================
RCS file: /cvsroot/mozilla/xpcom/io/nsIFileStream.h,v
retrieving revision 1.9
diff -u -2 -r1.9 nsIFileStream.h
--- nsIFileStream.h	1999/11/06 03:38:36	1.9
+++ nsIFileStream.h	2000/12/20 00:27:49
@@ -74,4 +74,8 @@
 }; // class nsIRandomAccessStore
 
+
+#ifndef NO_XPCOM_FILE_STREAMS   // hack to work around duplicate class 
definitions in here
+                                // and mozilla/netwerks/base/nsIFileStreams.idl
+
 /* a6cf90e6-15b3-11d2-932e-00805f8add32 */
 #define NS_IFILEINPUTSTREAM_IID \
@@ -107,4 +111,6 @@
     static const nsIID& GetIID() { static nsIID iid = NS_IFILEOUTPUTSTREAM_IID; 
return iid; }
 }; // class nsIFileOutputStream
+
+#endif // NO_XPCOM_FILE_STREAMS
 
 //------------------------------------------------------------------------------
----------
Target Milestone: --- → Future
I renamed the classes and IDL #defines.  There shouldn't be a problem anymore. 
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.