--- a/ExternalStream.st Thu Apr 26 14:18:44 2001 +0200
+++ b/ExternalStream.st Thu Apr 26 15:03:31 2001 +0200
@@ -1998,13 +1998,23 @@
OBJ fp;
if ((fp = __INST(filePointer)) != nil) {
- FILEPOINTER f;
-
- f = __FILEVal(fp);
- RETURN ( __MKINT(fileno(f)) );
+ FILEPOINTER f;
+
+ f = __FILEVal(fp);
+ RETURN ( __MKINT(fileno(f)) );
}
%}.
- ^ self errorNotOpen
+ filePointer isNil ifTrue:[^ self errorNotOpen].
+ ^ self fileDescriptorOfFile:filePointer
+!
+
+fileDescriptorOfFile:filePointer
+ "for migration to rel5 only:
+ return the fileDescriptor of the argument filePointer -
+ notice: this one returns the underlying OSs fileDescriptor -
+ this may not be available on all platforms (i.e. non unix systems)."
+
+ self primitiveFailed
!
filePointer
@@ -5633,6 +5643,6 @@
!ExternalStream class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.226 2001-04-26 12:18:44 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.227 2001-04-26 13:03:31 cg Exp $'
! !
ExternalStream initialize!