Merged with /trunk jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 09 Apr 2010 19:02:18 +0100
branchjv
changeset 17758 a6670a2296fd
parent 17757 73caeb68bf1f
child 17759 ed6ccf3b537d
Merged with /trunk
Behavior.st
Class.st
ExternalAddress.st
ExternalBytes.st
ProjectDefinition.st
SmallInteger.st
Smalltalk.st
UnixOperatingSystem.st
stx_libbasic.st
--- a/Behavior.st	Thu Apr 08 18:25:02 2010 +0100
+++ b/Behavior.st	Fri Apr 09 19:02:18 2010 +0100
@@ -93,16 +93,16 @@
 virtualMachineRelationship
 "
     Expert info follows:
-
+    --------------------
     NOTICE:
-	the stuff described below may not be available on other
-	Smalltalk implementations; be aware that these error mechanisms
-	are ST/X specials and applications using these (tricks) may
-	not be portable to other systems.
+        the stuff described below may not be available on other
+        Smalltalk implementations; be aware that these error mechanisms
+        are ST/X specials and applications using these (tricks) may
+        not be portable to other systems.
 
     WARNING:
-	do not try the examples below on (some) other smalltalk systems;
-	it has been reported, that some crash badly when doing this .... ;-)
+        do not try the examples below on (some) other smalltalk systems;
+        it has been reported, that some crash badly when doing this .... ;-)
 
     Instances of Behavior and subclasses (i.e. in sloppy words: classes)
     play a special role w.r.t. the VM. Only objects whose class-slot is marked
@@ -113,14 +113,14 @@
 
 
     Why is this so:
-
+    ---------------
     the above lets every object play the role of a class,
     which has been flagged as behaviorLike in its class's flag.
     Thus, you can create arbitrary new classLike objects and have the VM
     play with them.
     This may offer the flexibility to create a totally different object scheme
     on top of ST/X (for example: Self like objects) where any object can play
-    a classRole for another object.
+    a classRole for another object or even for itself.
 
     [A concrete application of this is found in the Structure class,
      which creates objects which are their own class !!
@@ -132,9 +132,9 @@
     object, the VM EXPECTS the object selector and methodDictionaries to be found
     at the instance positions as defined here.
     (i.e. instanceVariables with contents and semantic corresponding to
-	superclass
-	flags
-	methodDictionary
+        superclass
+        flags
+        methodDictionary
      must be present and have the same instVar-index as here).
 
     The VM (and the system) may crash badly, if this is not the case.
@@ -149,7 +149,7 @@
 
 
     Vice versa, defining 'dumb classes', which have the behaviorLike bit turned
-    of may be useful as well; if a message is sent to an instance of such
+    off may be useful as well; if a message is sent to an instance of such
     a thingy, the VM performs a recovery sequence, which is much like the
     #doesNotUnderstand: mechanism - however, since the instance is no good
     receiver of such a message, a #cannotSendMessage:to: is now sent to the
@@ -167,111 +167,132 @@
 
 
     Examples (only of theoretical interest):
-	take away the behaviorLike-flag from a class.
-	-> The instances will not understand any messages, since the VM will
-	   not recognize its class as being a class ...
-
-	|newMeta notRecognizedAsClass someInstance|
-
-	newMeta := Metaclass new.
-	newMeta flags:0.
-
-	notRecognizedAsClass := newMeta new.
-
-	someInstance := notRecognizedAsClass new.
-	someInstance perform:#isNil
+    ----------------------------------------
+        take away the behaviorLike-flag from a class.
+        -> The instances will not understand any messages, since the VM will
+           not recognize its class as being a class ...
+
+        |newMeta notRecognizedAsClass someInstance|
+
+        newMeta := Metaclass new.
+        newMeta flags:0.
+
+        notRecognizedAsClass := newMeta new.
+
+        someInstance := notRecognizedAsClass new.
+        someInstance perform:#isNil
 
 
     Of course, this is an exception which can be handled ...:
     Example:
 
-	|newMeta notRecognizedAsClass someInstance|
-
-	newMeta := Metaclass new.
-	newMeta flags:0.
-
-	notRecognizedAsClass := newMeta new.
-
-	someInstance := notRecognizedAsClass new.
-	Object errorSignal handle:[:ex |
-	    ex return
-	] do:[
-	    someInstance perform:#isNil
-	]
+        |newMeta notRecognizedAsClass someInstance|
+
+        newMeta := Metaclass new.
+        newMeta flags:0.
+
+        notRecognizedAsClass := newMeta new.
+
+        someInstance := notRecognizedAsClass new.
+        Object errorSignal handle:[:ex |
+            ex return
+        ] do:[
+            someInstance perform:#isNil
+        ]
 
 
     likewise, a doesNotUnderstand-notUnderstood can be handled:
     Example:
 
-	|newMeta funnyClass someInstance|
-
-	newMeta := Metaclass new.
-
-	funnyClass := newMeta new.
-	funnyClass setSuperclass:nil.
-
-	someInstance := funnyClass new.
-	Object errorSignal handle:[:ex |
-	     ex return
-	] do:[
-	    someInstance perform:#isNil
-	]
+        |newMeta funnyClass someInstance|
+
+        newMeta := Metaclass new.
+
+        funnyClass := newMeta new.
+        funnyClass setSuperclass:nil.
+
+        someInstance := funnyClass new.
+        Object errorSignal handle:[:ex |
+             ex return
+        ] do:[
+            someInstance perform:#isNil
+        ]
 
 
     more examples, which try to trick the VM ;-):
-	badly playing around with a classes internals ...
-
-	|newClass someInstance|
-
-	newClass := Class new.
-	newClass setSuperclass:nil.
-	someInstance := newClass new.
-	someInstance inspect
-
-
-	|newClass someInstance|
-
-	newClass := Class new.
-	newClass setSuperclass:newClass.
-	someInstance := newClass new.
-	someInstance inspect
-
-
-	|newClass someInstance|
-
-	newClass := Class new.
-	newClass setSuperclass:1.
-	someInstance := newClass new.
-	someInstance inspect
+        badly playing around with a classes internals ...
+
+        |newClass someInstance|
+
+        newClass := Class new.
+        newClass setSuperclass:nil.
+        someInstance := newClass new.
+        someInstance inspect
+
+
+        |newClass someInstance|
+
+        newClass := Class new.
+        newClass setSuperclass:newClass.
+        someInstance := newClass new.
+        someInstance inspect
+
+
+        |newClass someInstance|
+
+        newClass := Class new.
+        newClass setSuperclass:1.
+        someInstance := newClass new.
+        someInstance inspect
+
+
+    Example:
+        creating totally anonymous classes:
+
+        |newClass someInstance|
+
+        newClass := Class new.
+        someInstance := newClass new.
+        someInstance inspect
 
 
     Example:
-	creating totally anonymous classes:
-
-	|newClass someInstance|
-
-	newClass := Class new.
-	someInstance := newClass new.
-	someInstance inspect
-
-
-    Example:
-	creating totally anonymous metaclasses:
-
-	|newMeta newClass someInstance|
-
-	newMeta := Metaclass new.
-	newClass := newMeta new.
-	someInstance := newClass new.
-	someInstance inspect
+        creating totally anonymous metaclasses:
+
+        |newMeta newClass someInstance|
+
+        newMeta := Metaclass new.
+        newClass := newMeta new.
+        someInstance := newClass new.
+        someInstance inspect
 
 
     PS: if you experiment with new behaviorLike objects, you may want
-	to turn off the VM's debugPrintouts
-	with:
-		'Smalltalk debugPrinting:false'
-	and:
-		'Smalltalk infoPrinting:false'
+        to turn off the VM's debugPrintouts
+        with:
+                'Smalltalk debugPrinting:false'
+        and:
+                'Smalltalk infoPrinting:false'
+
+    Meta-Object-Protocol support:
+    -----------------------------
+    the above tricks do not affect the inline caches, and are therefore somewhat slow.
+    Another hook is the lookupObject which, if non-nil, is consulted to do the lookup
+    instead of the hardwired VM lookup algorithm, and provide a method as return value.
+    This method (if non-nil) will be put into the inline-and polymorph caches for speedy
+    call the next time. If non-nil, the lookup object is sent the:
+            lookupMethodForSelector:aSelector 
+            directedTo:searchClass 
+            for:aReceiver 
+            withArguments:argArrayOrNil 
+            from:sendingContext
+    message.
+    'searchClass' is the object class or any of its superclasses (for directed/super sends).
+    You can return any arbitrary method there - for example to implement multiple inheritance,
+    selector namespace tricks or multi-dispatch on argument types (double dispatch for a method).
+    Be aware, that the returned method is cached, and the lookup is not consulted again for the
+    same receiver/callsite combination. So the returned method should check if it's ok to be called
+    again (maybe, a synthetic method is generated and returned).
 "
 ! !
 
@@ -1131,7 +1152,6 @@
 ! !
 
 
-
 !Behavior methodsFor:'accessing'!
 
 addSelector:newSelector withMethod:newMethod
@@ -1257,14 +1277,6 @@
     ^ lookupObject
 !
 
-setLookupObject:aMethodLookupObject
-    "set the lookupObject (Jan's MetaObjectProtocol support) or nil.
-     If non-nil, no lookup is performed by the VM, instead the lookupObject
-     has to provide a method object for message sends."
-
-    lookupObject := aMethodLookupObject
-!
-
 methodDictionary
     "return the receivers method dictionary."
 
@@ -1318,51 +1330,18 @@
     "Modified: 12.11.1996 / 11:31:51 / cg"
 !
 
+setLookupObject:aMethodLookupObject
+    "set the lookupObject (Jan's MetaObjectProtocol support) or nil.
+     If non-nil, no lookup is performed by the VM, instead the lookupObject
+     has to provide a method object for message sends."
+
+    lookupObject := aMethodLookupObject
+!
+
 superclass
     "return the receivers superclass"
 
     ^ superclass
-!
-
-superclass:aClass
-    "set the superclass - this actually creates a new class,
-     recompiling all methods for the new one. The receiving class stays
-     around anonymous to allow existing instances some life.
-     This may change in the future (adjusting existing instances)"
-
-    |owner ns name|
-
-    Class flushSubclassInfo.
-
-    "must flush caches since lookup chain changes"
-    ObjectMemory flushCaches.
-
-    "/ for correct recompilation, just create a new class ...
-    "/ but care to avoid a nameSpace change, by giving my
-    "/ full name and answering with Smalltalk to a nameSpace query.
-
-    (owner := self owningClass) notNil ifTrue:[
-	ns := owner.
-	name := self nameWithoutPrefix asSymbol
-    ] ifFalse:[
-	ns := Smalltalk.
-	name := self name
-    ].
-
-    Class classRedefinitionNotification answer:#keep do:[
-	Class nameSpaceQuerySignal answer:ns
-	do:[
-	    aClass
-		perform:(self definitionSelector)
-		withArguments:(Array with:name
-			       with:(self instanceVariableString)
-			       with:(self classVariableString)
-			       with:'' "/ pool
-			       with:(self category)).
-	]
-    ]
-
-    "Modified: / 20.6.1998 / 18:17:37 / cg"
 ! !
 
 
@@ -1819,13 +1798,21 @@
 !
 
 whichClassSatisfies: aBlock
-    |superclass|
-
-    (aBlock value: self) ifTrue: [^self].
-    superclass := self superclass.
-    ^ superclass isNil
-		ifTrue: [nil]
-		ifFalse: [superclass whichClassSatisfies: aBlock]
+    "return the first class along the superclass-chain, which satisfies aBlock.
+     Return nil, if there is none."
+
+    |cls|
+
+    cls := self.
+    [cls notNil] whileTrue:[
+        (aBlock value: cls) ifTrue: [^ cls].
+        cls := cls superclass.
+    ].
+    ^ nil
+
+    "
+     SimpleView whichClassSatisfies:[:cls | cls instanceVariableNames includes:'gc']
+    "
 !
 
 withAllSubclassesDo:aBlock
@@ -3101,26 +3088,43 @@
 isSubclassOf:aClass
     "return true, if I am a subclass of the argument, aClass"
 
-    |theClass|
-
-    theClass := superclass.
-    [theClass notNil] whileTrue:[
-	(theClass == aClass) ifTrue:[^ true].
-%{
-	if (__isBehaviorLike(theClass)) {
-	    theClass = __ClassInstPtr(theClass)->c_superclass;
-	} else {
-	    theClass = nil;
-	}
+%{  /* NOCONTEXT */
+    OBJ __theClass = __INST(superclass);
+
+    while (__theClass != nil) {
+        if (__theClass == aClass) {
+            RETURN(true);
+        }
+        if (__isBehaviorLike(__theClass)) {
+            __theClass = __ClassInstPtr(__theClass)->c_superclass;
+        } else {
+            __theClass = nil;
+        }
+    }
+    RETURN (false);
 %}.
-"/        theClass := theClass superclass.
-    ].
-    ^ false
+
+"/    |theClass|
+"/
+"/    theClass := superclass.
+"/    [theClass notNil] whileTrue:[
+"/        (theClass == aClass) ifTrue:[^ true].
+"/%{
+"/        if (__isBehaviorLike(theClass)) {
+"/            theClass = __ClassInstPtr(theClass)->c_superclass;
+"/        } else {
+"/            theClass = nil;
+"/        }
+"/%}.
+"/"/        theClass := theClass superclass.
+"/    ].
+"/    ^ false
 
     "
-     String isSubclassOf:Collection
-     LinkedList isSubclassOf:Array
+     String isSubclassOf:Collection 
+     LinkedList isSubclassOf:Array  
      1 isSubclassOf:Number              <- will fail since 1 is no class
+     Number isSubclassOf:1              
     "
 !
 
@@ -4482,15 +4486,20 @@
     "Modified: 3.6.1996 / 16:03:33 / stefan"
 !
 
-whichClassDefinesClassVar: aString
-	^self whichClassSatisfies:
-			[:aClass |
-			(aClass classVarNames collect: [:each | each asString])
-				includes: aString asString]
+whichClassDefinesClassVar:aStringOrText
+    |name|
+
+    name := aStringOrText asString string.
+    ^ self whichClassSatisfies:[:aClass | aClass classVarNames includes:name]
+
+    "
+     TextView whichClassDefinesClassVar:'CachedScales' 
+     TextView whichClassDefinesClassVar:'xxx' 
+    "
 !
 
 whichClassDefinesInstVar: aString
-	^self whichClassSatisfies: [:aClass | aClass instVarNames includes: aString]
+    ^ self whichClassSatisfies: [:aClass | aClass instVarNames includes: aString]
 !
 
 whichSelectorsAssign: instVarName
@@ -4612,15 +4621,16 @@
 !Behavior class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Behavior.st 10510 2010-04-08 17:25:02Z vranyj1 $'
+    ^ '$Id: Behavior.st 10512 2010-04-09 18:02:18Z vranyj1 $'
 !
 
 version_CVS
-    ^ 'Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.300 2010/04/07 14:52:07 cg Exp §'
+    ^ 'Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.303 2010/04/08 11:10:54 cg Exp §'
 !
 
 version_SVN
-    ^ '$Id: Behavior.st 10510 2010-04-08 17:25:02Z vranyj1 $'
+    ^ '$Id: Behavior.st 10512 2010-04-09 18:02:18Z vranyj1 $'
 ! !
 
 
+
--- a/Class.st	Thu Apr 08 18:25:02 2010 +0100
+++ b/Class.st	Fri Apr 09 19:02:18 2010 +0100
@@ -377,6 +377,9 @@
      This is private protocol"
 
     SubclassInfo := nil.
+    self allSubInstancesDo:[:cls |
+        cls flushSubclasses
+    ].
 
     "
      Class flushSubclassInfo
@@ -393,7 +396,8 @@
     aClass notNil ifTrue:[
         SubclassInfo notNil ifTrue:[
             SubclassInfo removeKey:aClass ifAbsent:[]
-        ]
+        ].
+        aClass flushSubclasses
     ].
 
     "
@@ -414,22 +418,22 @@
 
     |d|
 
-    SubclassInfo notNil ifTrue:[^ SubclassInfo].
-
-    d := IdentityDictionary new.
-    Smalltalk allClassesDo:[:aClass |
-        |superCls setToAddSubclass|
-
-        superCls := aClass superclass.
-        superCls notNil ifTrue:[
-            setToAddSubclass := d at:superCls ifAbsent:nil.
-            setToAddSubclass isNil ifTrue:[
-                d at:superCls put:(Set with:aClass).
-            ] ifFalse:[
-                setToAddSubclass add:aClass
-            ]
-        ]
-    ].
+"/    SubclassInfo notNil ifTrue:[^ SubclassInfo].
+"/
+"/    d := IdentityDictionary new.
+"/    Smalltalk allClassesDo:[:aClass |
+"/        |superCls setToAddSubclass|
+"/
+"/        superCls := aClass superclass.
+"/        superCls notNil ifTrue:[
+"/            setToAddSubclass := d at:superCls ifAbsent:nil.
+"/            setToAddSubclass isNil ifTrue:[
+"/                d at:superCls put:(Set with:aClass).
+"/            ] ifFalse:[
+"/                setToAddSubclass add:aClass
+"/            ]
+"/        ]
+"/    ].
     SubclassInfo := d.
     ^ d
 
@@ -1591,6 +1595,46 @@
 
     "Created: / 07-12-1995 / 13:16:46 / cg"
     "Modified: / 05-12-2006 / 22:04:26 / cg"
+!
+
+superclass:aClass
+    "set the superclass - this actually creates a new class,
+     recompiling all methods for the new one. The receiving class stays
+     around anonymously to allow existing instances some life.
+     This may change in the future (adjusting existing instances)"
+
+    |owner ns name|
+
+    "must flush caches since lookup chain changes"
+    ObjectMemory flushCaches.
+
+    "/ for correct recompilation, just create a new class ...
+    "/ but care to avoid a nameSpace change, by giving my
+    "/ full name and answering with Smalltalk to a nameSpace query.
+
+    (owner := self owningClass) notNil ifTrue:[
+        ns := owner.
+        name := self nameWithoutPrefix asSymbol
+    ] ifFalse:[
+        ns := Smalltalk.
+        name := self name
+    ].
+
+    Class classRedefinitionNotification answer:#keep do:[
+        Class nameSpaceQuerySignal 
+            answer:ns
+            do:[
+                aClass
+                    perform:(self definitionSelector)
+                    withArguments:(Array with:name
+                                   with:(self instanceVariableString)
+                                   with:(self classVariableString)
+                                   with:'' "/ pool
+                                   with:(self category)).
+            ]
+    ]
+
+    "Modified: / 20.6.1998 / 18:17:37 / cg"
 ! !
 
 !Class methodsFor:'adding & removing'!
@@ -1991,34 +2035,13 @@
      This will only enumerate globally known classes - for anonymous
      behaviors, you have to walk over all instances of Behavior."
 
-    |coll|
-
-    "/ use cached information (avoid class hierarchy search)
-    "/ if possible
-    SubclassInfo isNil ifTrue:[
-        Class subclassInfo   "/ creates SubclassInfo as side effect
-    ].
-    SubclassInfo notNil ifTrue:[
-        coll := SubclassInfo at:self ifAbsent:nil.
-        coll notNil ifTrue:[
-            coll do:aBlock.
-            ^ self
-        ].
+    "/ use cached information (avoid class hierarchy search), if possible
+    subclasses notNil ifTrue:[
+        subclasses do:aBlock
+    ] ifFalse:[
+        super subclassesDo:aBlock
     ].
 
-    coll := OrderedCollection new.
-    Smalltalk allClassesDo:[:aClass |
-        (aClass superclass == self) ifTrue:[
-            coll add:aClass
-        ]
-    ].
-
-    SubclassInfo notNil ifTrue:[
-        SubclassInfo at:self put:coll.
-    ].
-
-    coll do:aBlock.
-
     "
      Collection subclassesDo:[:c | Transcript showCR:(c name)]
     "
@@ -3504,6 +3527,10 @@
     "Modified: / 06-03-2007 / 11:54:53 / cg"
 !
 
+flushSubclasses
+    subclasses := nil
+!
+
 hasExtensions
     "return true, if there are methods in the receiver, which belong to
      a different package (i.e. package of class ~= package of method).
@@ -3655,24 +3682,11 @@
 subclasses
     "return a collection of the direct subclasses of the receiver"
 
-    |newColl|
-
-    "/ use cached information (avoid class hierarchy search)
-    "/ if possible
-
-    SubclassInfo notNil ifTrue:[
-        newColl := SubclassInfo at:self ifAbsent:nil.
-        newColl notNil ifTrue:[^ newColl asOrderedCollection]
+    "/ use cached information (avoid class hierarchy search), if possible
+    subclasses isNil ifTrue:[
+        subclasses := super subclasses asArray.
     ].
-
-    newColl := OrderedCollection new.
-    self subclassesDo:[:aClass |
-        newColl add:aClass
-    ].
-    SubclassInfo notNil ifTrue:[
-        SubclassInfo at:self put:newColl.
-    ].
-    ^ newColl
+    ^ subclasses
 
     "
      Class flushSubclassInfo.
@@ -5033,11 +5047,11 @@
 !Class class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Class.st 10510 2010-04-08 17:25:02Z vranyj1 $'
+    ^ '$Id: Class.st 10512 2010-04-09 18:02:18Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/Class.st,v 1.568 2010/04/06 15:33:20 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/Class.st,v 1.570 2010/04/07 18:21:18 cg Exp §'
 ! !
 
 
@@ -5045,3 +5059,4 @@
 
 
 
+
--- a/ExternalAddress.st	Thu Apr 08 18:25:02 2010 +0100
+++ b/ExternalAddress.st	Fri Apr 09 19:02:18 2010 +0100
@@ -151,9 +151,7 @@
 instVarAt:index
     "redefined to suppress direct access to my address, which is a non-object"
 
-    index == 1 ifTrue:[
-        ^ self address
-    ].
+    index == 1 ifTrue:[^ self address].
     ^ super instVarAt:index
 
     "Created: / 3.9.1999 / 13:47:03 / ps"
@@ -306,11 +304,12 @@
 !ExternalAddress class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ExternalAddress.st 10489 2009-12-27 20:16:54Z vranyj1 $'
+    ^ '$Id: ExternalAddress.st 10512 2010-04-09 18:02:18Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/ExternalAddress.st,v 1.24 2009/12/07 15:58:16 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/ExternalAddress.st,v 1.25 2010/04/08 11:57:19 cg Exp §'
 ! !
 
 
+
--- a/ExternalBytes.st	Thu Apr 08 18:25:02 2010 +0100
+++ b/ExternalBytes.st	Fri Apr 09 19:02:18 2010 +0100
@@ -746,9 +746,7 @@
 instVarAt:index
     "redefined to suppress direct access to my address, which is a non-object"
 
-    index == 1 ifTrue:[
-	^ self address
-    ].
+    index == 1 ifTrue:[^ self address].
     ^ super instVarAt:index
 ! !
 
@@ -1281,13 +1279,14 @@
 !ExternalBytes class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ExternalBytes.st 10508 2010-03-21 19:37:43Z vranyj1 $'
+    ^ '$Id: ExternalBytes.st 10512 2010-04-09 18:02:18Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/ExternalBytes.st,v 1.77 2010/03/12 14:35:17 stefan Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/ExternalBytes.st,v 1.78 2010/04/08 11:57:17 cg Exp §'
 ! !
 
 ExternalBytes initialize!
 
 
+
--- a/ProjectDefinition.st	Thu Apr 08 18:25:02 2010 +0100
+++ b/ProjectDefinition.st	Fri Apr 09 19:02:18 2010 +0100
@@ -4464,6 +4464,7 @@
         self superclass: ApplicationDefinition.
         ^ self
     ].
+
     typeOrNil = NonGUIApplicationType ifTrue:[
         self compile:
 'isGUIApplication
@@ -4476,6 +4477,7 @@
         self superclass: ApplicationDefinition.
         ^ self
     ].                
+
     self theMetaclass removeSelector: #isGUIApplication.
     self superclass: LibraryDefinition.
     ^ self.
@@ -5376,18 +5378,19 @@
 !ProjectDefinition class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ProjectDefinition.st 10510 2010-04-08 17:25:02Z vranyj1 $'
+    ^ '$Id: ProjectDefinition.st 10512 2010-04-09 18:02:18Z vranyj1 $'
 !
 
 version_CVS
-    ^ 'Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.311 2010/03/24 11:21:23 sr Exp §'
+    ^ 'Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.312 2010/04/07 17:51:24 cg Exp §'
 !
 
 version_SVN
-    ^ '$Id: ProjectDefinition.st 10510 2010-04-08 17:25:02Z vranyj1 $'
+    ^ '$Id: ProjectDefinition.st 10512 2010-04-09 18:02:18Z vranyj1 $'
 ! !
 
 ProjectDefinition initialize!
 
 
 
+
--- a/SmallInteger.st	Thu Apr 08 18:25:02 2010 +0100
+++ b/SmallInteger.st	Fri Apr 09 19:02:18 2010 +0100
@@ -1983,6 +1983,30 @@
     ^ 20
 !
 
+signExtended24BitValue
+    "return a smallInteger from sign-extending the 24'th bit.
+     May be useful for communication interfaces"
+
+%{  /* NOCONTEXT */
+    INT i = __intVal(self);
+
+    if (i & 0x800000) {
+        i = i | ~0xFFFFFFL;
+    } else {
+        i = i & 0x7FFFFF;
+    }
+
+    RETURN (__mkSmallInteger(i));
+%}.
+    ^ self primitiveFailed
+
+    "
+     16rFFFFFF signExtended24BitValue
+     16r800000 signExtended24BitValue
+     16r7FFFFF signExtended24BitValue
+    "
+!
+
 signExtendedByteValue
     "return a smallInteger from sign-extending the 8'th bit.
      May be useful for communication interfaces"
@@ -1991,9 +2015,9 @@
     INT i = __intVal(self);
 
     if (i & 0x80) {
-	i = i | ~0xFFL;
+        i = i | ~0xFFL;
     } else {
-	i = i & 0x7F;
+        i = i & 0x7F;
     }
 
     RETURN (__mkSmallInteger(i));
@@ -2001,8 +2025,9 @@
     ^ self primitiveFailed
 
     "
-     16rFF signExtendedByteValue
-     16r7F signExtendedByteValue
+     16rFF signExtendedByteValue 
+     16r80 signExtendedByteValue 
+     16r7F signExtendedByteValue 
     "
 !
 
@@ -2014,9 +2039,9 @@
     INT i = __intVal(self);
 
     if (i & 0x8000) {
-	i = i | ~0xFFFFL;
+        i = i | ~0xFFFFL;
     } else {
-	i = i & 0x7FFF;
+        i = i & 0x7FFF;
     }
 
     RETURN (__mkSmallInteger(i));
@@ -2024,8 +2049,9 @@
     ^ self primitiveFailed
 
     "
-     16rFFFF signExtendedShortValue
-     16r7FFF signExtendedShortValue
+     16rFFFF signExtendedShortValue 
+     16r8000 signExtendedShortValue 
+     16r7FFF signExtendedShortValue 
     "
 ! !
 
@@ -3772,13 +3798,14 @@
 !SmallInteger class methodsFor:'documentation'!
 
 version
-    ^ '$Id: SmallInteger.st 10508 2010-03-21 19:37:43Z vranyj1 $'
+    ^ '$Id: SmallInteger.st 10512 2010-04-09 18:02:18Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.183 2010/03/12 14:12:29 stefan Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.184 2010/04/09 10:48:56 cg Exp §'
 ! !
 
 
 
 
+
--- a/Smalltalk.st	Thu Apr 08 18:25:02 2010 +0100
+++ b/Smalltalk.st	Fri Apr 09 19:02:18 2010 +0100
@@ -566,7 +566,7 @@
 
     |idx|
 
-    NumberOfClassesHint := 4500.
+    NumberOfClassesHint := 10000.
 
     Initializing := true.
 
@@ -1713,7 +1713,7 @@
 
     |already|
 
-    already := IdentitySet new:NumberOfClassesHint*3.
+    already := IdentitySet new:NumberOfClassesHint*2.
     self allClassesDo:[:eachClass | 
         |cls|
 
@@ -7290,7 +7290,7 @@
      ST/X revision Naming is:
         <major>.<minor>.<revision>.<release>"
 
-    ^ 5
+    ^ 6
 
     "
      Smalltalk majorVersionNr
@@ -7310,7 +7310,7 @@
      ST/X revision Naming is:
         <major>.<minor>.<revision>.<release>"
 
-    ^ 4
+    ^ 1
 
     "
      Smalltalk minorVersionNr
@@ -7347,10 +7347,11 @@
      ST/X revision Naming is:
         <major>.<minor>.<revision>.<release>"
 
-    ^ 2
+    ^ 1
 
     "
      Smalltalk releaseNr
+     Smalltalk versionString
     "
 
     "Created: / 10-12-1995 / 01:42:19 / cg"
@@ -7368,7 +7369,7 @@
      ST/X revision Naming is:
         <major>.<minor>.<revision>.<release>"
 
-    ^ 6
+    ^ 1
 
     "
      Smalltalk revisionNr
@@ -7460,15 +7461,15 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Smalltalk.st 10510 2010-04-08 17:25:02Z vranyj1 $'
+    ^ '$Id: Smalltalk.st 10512 2010-04-09 18:02:18Z vranyj1 $'
 !
 
 version_CVS
-    ^ 'Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.931 2010/03/26 12:05:10 cg Exp §'
+    ^ 'Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.933 2010/04/09 14:08:00 cg Exp §'
 !
 
 version_SVN
-    ^ '$Id: Smalltalk.st 10510 2010-04-08 17:25:02Z vranyj1 $'
+    ^ '$Id: Smalltalk.st 10512 2010-04-09 18:02:18Z vranyj1 $'
 ! !
 
 
@@ -7476,3 +7477,4 @@
 
 
 
+
--- a/UnixOperatingSystem.st	Thu Apr 08 18:25:02 2010 +0100
+++ b/UnixOperatingSystem.st	Fri Apr 09 19:02:18 2010 +0100
@@ -9040,6 +9040,93 @@
     "
 !
 
+primUserInfoOf:aNameOrID
+    "return a dictionary filled with userinfo. The argument can be either
+     a string with the users name or its numeric id.
+     Notice, that not all systems provide (all of) this info;
+     DOS systems return nothing;
+     non-SYSV4 systems have no age/comment.
+     Portable applications may want to check the systemType and NOT depend
+     on all keys to be present in the returned dictionary.
+     Another notice: on some systems (SYSV4), the gecos field includes multiple
+     entries (i.e. not just the name), separated by commas. You may want to
+     extract any substring, up to the first comma to get the real life name."
+
+    |returnArray|
+
+%{ /* UNLIMITEDSTACK */  /* Don't know whether NIS, LDAP or whatever is consulted */
+#if !defined(NO_PWD)
+    struct passwd *result = 0;
+    int ret;
+    int idx = 0;
+    OBJ tmp;
+
+#if defined(_POSIX_SOURCE)
+    char buf[4096];
+    struct passwd pwd;
+
+    if (__isStringLike(aNameOrID)) {
+        getpwnam_r(__stringVal(aNameOrID), &pwd, buf, sizeof(buf), &result);
+    } else if (__isSmallInteger(aNameOrID)) {
+        getpwuid_r(__intVal(aNameOrID), &pwd, buf, sizeof(buf), &result);
+    }
+#else
+    if (__isStringLike(aNameOrID)) {
+        result = getpwnam(__stringVal(aNameOrID));
+    } else if (__isSmallInteger(aNameOrID)) {
+        result = getpwuid(__intVal(aNameOrID));
+    }
+#endif /* ! _POSIX_SOURCE */
+
+    if (result) {
+        returnArray = __MKARRAY(20);
+        tmp = __MKSTRING(result->pw_name);
+        __arrayVal(returnArray)[idx++] = @symbol(name);
+        __arrayVal(returnArray)[idx++] = tmp; __STORE(returnArray, tmp);
+#  ifndef NO_PWD_PASSWD
+        tmp = __MKSTRING(result->pw_passwd);
+        __arrayVal(returnArray)[idx++] = @symbol(passwd);
+        __arrayVal(returnArray)[idx++] = tmp; __STORE(returnArray, tmp);
+#  endif
+#  ifdef SYSV4
+        tmp = __MKSTRING(result->pw_age);
+        __arrayVal(returnArray)[idx++] = @symbol(age);
+        __arrayVal(returnArray)[idx++] = tmp; __STORE(returnArray, tmp);
+        tmp = __MKSTRING(result->pw_comment);
+        __arrayVal(returnArray)[idx++] = @symbol(comment);
+        __arrayVal(returnArray)[idx++] = tmp; __STORE(returnArray, tmp);
+#  endif
+        tmp = __MKSTRING(result->pw_dir);
+        __arrayVal(returnArray)[idx++] = @symbol(dir);
+        __arrayVal(returnArray)[idx++] = tmp; __STORE(returnArray, tmp);
+#  ifndef NO_PWD_GECOS
+        tmp = __MKSTRING(result->pw_gecos);
+        __arrayVal(returnArray)[idx++] = @symbol(gecos);
+        __arrayVal(returnArray)[idx++] = tmp; __STORE(returnArray, tmp);
+#  endif
+        tmp = __MKSTRING(result->pw_shell);
+        __arrayVal(returnArray)[idx++] = @symbol(shell);
+        __arrayVal(returnArray)[idx++] = tmp; __STORE(returnArray, tmp);
+
+        __arrayVal(returnArray)[idx++] = @symbol(uid);
+        __arrayVal(returnArray)[idx++] = __mkSmallInteger(result->pw_uid);
+
+        __arrayVal(returnArray)[idx++] = @symbol(gid);
+        __arrayVal(returnArray)[idx++] = __mkSmallInteger(result->pw_gid);
+    }
+# endif /* ! NO_PWD */
+%}.
+    ^ returnArray
+
+    "
+     OperatingSystem primUserInfoOf:'root'
+     OperatingSystem primUserInfoOf:1
+     OperatingSystem primUserInfoOf:'cg'
+     OperatingSystem primUserInfoOf:'fooBar'
+     OperatingSystem primUserInfoOf:(OperatingSystem getUserID)
+    "
+!
+
 userInfoOf:aNameOrID
     "{ Pragma: +optSpace }"
 
@@ -9054,71 +9141,36 @@
      entries (i.e. not just the name), separated by commas. You may want to
      extract any substring, up to the first comma to get the real life name."
 
-    |info name passw uid gid age comment
-     gecos dir shell|
-
-%{
-# ifndef NO_PWD
-    struct passwd *buf;
-    int ret;
-
-    if (__isStringLike(aNameOrID)) {
-	buf = getpwnam(__stringVal(aNameOrID));
-    } else if (__isSmallInteger(aNameOrID)) {
-	buf = getpwuid(__intVal(aNameOrID));
-    } else {
-	buf = (struct passwd *)0;
-    }
-    if (buf) {
-	name = __MKSTRING(buf->pw_name);
-#  ifndef NO_PWD_PASSWD
-	passw = __MKSTRING(buf->pw_passwd);
-#  endif
-#  ifdef SYSV4
-	age = __MKSTRING(buf->pw_age);
-	comment = __MKSTRING(buf->pw_comment);
-#  endif
-	dir = __MKSTRING(buf->pw_dir);
-#  ifndef NO_PWD_GECOS
-	gecos = __MKSTRING(buf->pw_gecos);
-#  endif
-	shell = __MKSTRING(buf->pw_shell);
-
-	uid = __mkSmallInteger(buf->pw_uid);
-	gid = __mkSmallInteger(buf->pw_gid);
-    }
-# endif /* has PWD */
-%}.
+    |infoArray info name dir|
+
+    infoArray := self primUserInfoOf:aNameOrID.
     info := IdentityDictionary new.
+
+    infoArray notNil ifTrue:[    
+        infoArray pairWiseDo:[:key :value|
+            key notNil ifTrue:[
+                info at:key put:value.
+                key == #name ifTrue:[name := value].
+                key == #dir  ifTrue:[dir := value].
+            ].
+        ].
+    ].
+
     name isNil ifTrue:[
-	aNameOrID == self getUserID ifTrue:[
-	    name := self getLoginName
-	].
-    ].
-    name notNil ifTrue:[
-	info at:#name put:name.
-    ] ifFalse:[
-	info at:#name put:'unknown'
-    ].
-    passw notNil ifTrue:[info at:#passwd put:passw].
-    age notNil ifTrue:[info at:#age put:age].
-    comment notNil ifTrue:[info at:#comment put:comment].
-    gecos notNil ifTrue:[info at:#gecos put:gecos].
-    shell notNil ifTrue:[info at:#shell put:shell].
+        info at:#name put:#unknown
+    ].
     dir isNil ifTrue:[
-	aNameOrID == self getUserID ifTrue:[
-	    dir := self getHomeDirectory
-	]
-    ].
-    dir notNil ifTrue:[info at:#dir put:dir].
-    uid notNil ifTrue:[info at:#uid put:uid].
-    gid  notNil ifTrue:[info at:#gid put:gid].
+        aNameOrID == self getUserID ifTrue:[
+            info at:#dir put:self getHomeDirectory
+        ]
+    ].
+
     ^ info
 
     "
      OperatingSystem userInfoOf:'root'
      OperatingSystem userInfoOf:1
-     OperatingSystem userInfoOf:'claus'
+     OperatingSystem userInfoOf:'cg'
      OperatingSystem userInfoOf:'fooBar'
      OperatingSystem userInfoOf:(OperatingSystem getUserID)
     "
@@ -11218,9 +11270,9 @@
     proto := self protocolCodeOf:protoArg.
     serviceNameArg notNil ifTrue:[
         serviceName := serviceNameArg printString.      "convert integer port numbers"
-    ]. "ifFalse:[serviveName := nil]"
-
-%{ /* STACK:32000 */
+    ].
+
+%{ /* STACK: 100000 */  /* Don't know whether DNS, NIS, LDAP or whatever is consulted */
 #undef xxAI_NUMERICHOST /* remove xx to test gethost...() path */
 
 
@@ -11541,15 +11593,17 @@
     1 to:result size do:[:i |
         |entry dom info|
 
-        info := SocketAddressInfo new.
         entry := result at:i.
-        info flags:(entry at:1).
-        info domain:(dom := OperatingSystem domainSymbolOf:(entry at:2)).
-        info type:(OperatingSystem socketTypeSymbolOf:(entry at:3)).
-        info protocol:(self protocolSymbolOf:(entry at:4)).
-        info socketAddress:((SocketAddress newDomain:dom) fromBytes:(entry at:5)).
-        info canonicalName:(entry at:6).
-        result at:i put:info
+
+        info := SocketAddressInfo new
+            flags:(entry at:1);
+            domain:(dom := OperatingSystem domainSymbolOf:(entry at:2));
+            type:(OperatingSystem socketTypeSymbolOf:(entry at:3));
+            protocol:(self protocolSymbolOf:(entry at:4));
+            socketAddress:((SocketAddress newDomain:dom) fromBytes:(entry at:5));
+            canonicalName:(entry at:6).
+
+        result at:i put:info.
     ].
     ^ result
 
@@ -11585,7 +11639,7 @@
 
     |error errorString hostName serviceName|
 
-%{  /* STACK:32000 */
+%{ /* STACK: 100000 */  /* Don't know whether DNS, NIS, LDAP or whatever is consulted */
 
 #undef xxNI_NUMERICHOST /* remove xx to test gethost...() path */
 
@@ -11605,20 +11659,20 @@
     int nInstBytes, sockAddrSize;
 
     if (wantHostName == true) {
-	hp = host;
-	hsz = sizeof(host);
+        hp = host;
+        hsz = sizeof(host);
     }
     if (wantServiceName == true) {
-	sp = service;
-	ssz = sizeof(service);
+        sp = service;
+        ssz = sizeof(service);
     }
     if (hp == 0 && sp == 0) {
-	error = @symbol(badArgument);
-	goto err;
+        error = @symbol(badArgument);
+        goto err;
     }
     if (!__isBytes(socketAddress)) {
-	error = @symbol(badArgument1);
-	goto err;
+        error = @symbol(badArgument1);
+        goto err;
     }
 
     nInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(__qClass(socketAddress))->c_ninstvars));
@@ -11626,187 +11680,187 @@
     sockAddrSize -= nInstBytes;
 
     if (!__isSmallInteger(flags)) {
-	error = @symbol(badArgument5);
-	goto err;
+        error = @symbol(badArgument5);
+        goto err;
     }
     __flags = __intVal(flags);
 
 #if defined(NI_NUMERICHOST)
     if (useDatagram == true) {
-	__flags |= NI_DGRAM;
+        __flags |= NI_DGRAM;
     }
 
     {
-	bp = (char *)(__byteArrayVal(socketAddress));
-	bp += nInstBytes;
-	__BEGIN_INTERRUPTABLE__
-	ret = getnameinfo((struct sockaddr *)bp, sockAddrSize,
-			  hp, hsz, sp, ssz, __flags);
-	__END_INTERRUPTABLE__
+        bp = (char *)(__byteArrayVal(socketAddress));
+        bp += nInstBytes;
+        __BEGIN_INTERRUPTABLE__
+        ret = getnameinfo((struct sockaddr *)bp, sockAddrSize,
+                          hp, hsz, sp, ssz, __flags);
+        __END_INTERRUPTABLE__
     } while (ret == EAI_SYSTEM && errno == EINTR);
     if (ret != 0) {
-	switch (ret) {
-	case EAI_FAMILY:
-	    error = @symbol(badProtocol);
-	    break;
-	case EAI_SOCKTYPE:
-	    error = @symbol(badSocketType);
-	    break;
-	case EAI_BADFLAGS:
-	    error = @symbol(badFlags);
-	    break;
-	case EAI_NONAME:
-	    error = @symbol(unknownHost);
-	    break;
-	case EAI_SERVICE:
-	    error = @symbol(unknownService);
-	    break;
+        switch (ret) {
+        case EAI_FAMILY:
+            error = @symbol(badProtocol);
+            break;
+        case EAI_SOCKTYPE:
+            error = @symbol(badSocketType);
+            break;
+        case EAI_BADFLAGS:
+            error = @symbol(badFlags);
+            break;
+        case EAI_NONAME:
+            error = @symbol(unknownHost);
+            break;
+        case EAI_SERVICE:
+            error = @symbol(unknownService);
+            break;
 #ifdef EAI_ADDRFAMILY
-	case EAI_ADDRFAMILY :
-	    error = @symbol(unknownHostForProtocol);
-	    break;
+        case EAI_ADDRFAMILY :
+            error = @symbol(unknownHostForProtocol);
+            break;
 #endif
 #ifdef EAI_NODATA
-	case EAI_NODATA:
-	    error = @symbol(noAddress);
-	    break;
-#endif
-	case EAI_MEMORY:
-	    error = @symbol(allocationFailure);
-	    break;
-	case EAI_FAIL:
-	    error = @symbol(permanentFailure);
-	    break;
-	case EAI_AGAIN:
-	    error = @symbol(tryAgain);
-	    break;
-	case EAI_SYSTEM:
-	    error = @symbol(systemError);
-	    break;
-	default:
-	    error = @symbol(unknownError);
-	}
-	errorString = __MKSTRING(gai_strerror(ret));
-	goto err;
+        case EAI_NODATA:
+            error = @symbol(noAddress);
+            break;
+#endif
+        case EAI_MEMORY:
+            error = @symbol(allocationFailure);
+            break;
+        case EAI_FAIL:
+            error = @symbol(permanentFailure);
+            break;
+        case EAI_AGAIN:
+            error = @symbol(tryAgain);
+            break;
+        case EAI_SYSTEM:
+            error = @symbol(systemError);
+            break;
+        default:
+            error = @symbol(unknownError);
+        }
+        errorString = __MKSTRING(gai_strerror(ret));
+        goto err;
     }
 # else /* ! NI_NUMERICHOST */
     {
-	/*
-	 * Do it using gethostbyaddr()
-	 */
-	struct sockaddr_in *sa;
-
-	if (sockAddrSize < sizeof(*sa)) {
-	    error = @symbol(badArgument1);
-	    goto err;
-	}
-	bp = (char *)(__byteArrayVal(socketAddress));
-	bp += nInstBytes;
-	sa = (struct sockaddr_in *)bp;
-
-	if (sp) {
-	    struct servent *servp;
-	    char *__proto = 0;
-
-	    __proto = (useDatagram == true ? "udp" : "tcp");
-
-	    servp = getservbyport(sa->sin_port, __proto);
-	    if (servp) {
-		sp = servp->s_name;
-	    }
-	}
-	if (hp) {
-	    struct hostent *hostp;
+        /*
+         * Do it using gethostbyaddr()
+         */
+        struct sockaddr_in *sa;
+
+        if (sockAddrSize < sizeof(*sa)) {
+            error = @symbol(badArgument1);
+            goto err;
+        }
+        bp = (char *)(__byteArrayVal(socketAddress));
+        bp += nInstBytes;
+        sa = (struct sockaddr_in *)bp;
+
+        if (sp) {
+            struct servent *servp;
+            char *__proto = 0;
+
+            __proto = (useDatagram == true ? "udp" : "tcp");
+
+            servp = getservbyport(sa->sin_port, __proto);
+            if (servp) {
+                sp = servp->s_name;
+            }
+        }
+        if (hp) {
+            struct hostent *hostp;
 #  ifdef USE_H_ERRNO
-	    do {
-		bp = (char *)(__byteArrayVal(socketAddress));
-		bp += nInstBytes;
-		sa = (struct sockaddr_in *)bp;
-
-		/* __BEGIN_INTERRUPTABLE__ is dangerous, because gethostbyname uses a static data area
-		 */
-		hostp = gethostbyaddr((char *)&sa->sin_addr, sockAddrSize, sa->sin_family);
-		/* __END_INTERRUPTABLE__ */
-	    } while ((hostp == NULL)
-		      && ((h_errno == TRY_AGAIN)
-			  || errno == EINTR
+            do {
+                bp = (char *)(__byteArrayVal(socketAddress));
+                bp += nInstBytes;
+                sa = (struct sockaddr_in *)bp;
+
+                /* __BEGIN_INTERRUPTABLE__ is dangerous, because gethostbyname uses a static data area
+                 */
+                hostp = gethostbyaddr((char *)&sa->sin_addr, sockAddrSize, sa->sin_family);
+                /* __END_INTERRUPTABLE__ */
+            } while ((hostp == NULL)
+                      && ((h_errno == TRY_AGAIN)
+                          || errno == EINTR
 #   ifdef IRIX5_3
-			  || (errno == ECONNREFUSED)
+                          || (errno == ECONNREFUSED)
 #   endif
-			 )
-	    );
-	    if (hostp == 0) {
-		switch (h_errno) {
-		case HOST_NOT_FOUND:
-		    errorString = @symbol(unknownHost);
-		    break;
-		case NO_ADDRESS:
-		    errorString = @symbol(noAddress);
-		    break;
-		case NO_RECOVERY:
-		    errorString = @symbol(permanentFailure);
-		    break;
-		case TRY_AGAIN:
-		    errorString = @symbol(tryAgain);
-		    break;
-		default:
-		    errorString = @symbol(unknownError);
-		    break;
-		}
-		error = __mkSmallInteger(h_errno);
-		goto err;
-	    }
+                         )
+            );
+            if (hostp == 0) {
+                switch (h_errno) {
+                case HOST_NOT_FOUND:
+                    errorString = @symbol(unknownHost);
+                    break;
+                case NO_ADDRESS:
+                    errorString = @symbol(noAddress);
+                    break;
+                case NO_RECOVERY:
+                    errorString = @symbol(permanentFailure);
+                    break;
+                case TRY_AGAIN:
+                    errorString = @symbol(tryAgain);
+                    break;
+                default:
+                    errorString = @symbol(unknownError);
+                    break;
+                }
+                error = __mkSmallInteger(h_errno);
+                goto err;
+            }
 #  else /* !USE_H_ERRNO */
-	    hostp = gethostbyaddr(sa->sin_addr, sockAddrSize, sa->sin_family);
-	    if (hostp == 0) {
-		errorString = @symbol(unknownHost);
-		error = __mkSmallInteger(-1);
-		goto err;
-	    }
+            hostp = gethostbyaddr(sa->sin_addr, sockAddrSize, sa->sin_family);
+            if (hostp == 0) {
+                errorString = @symbol(unknownHost);
+                error = __mkSmallInteger(-1);
+                goto err;
+            }
 #  endif /* !USE_H_ERRNO*/
-	    hp = hostp->h_name;
-	}
+            hp = hostp->h_name;
+        }
     }
 # endif /* ! NI_NUMERICHOST */
 
     if (hp)
-	hostName = __MKSTRING(hp);
+        hostName = __MKSTRING(hp);
     if (sp)
-	serviceName = __MKSTRING(sp);
+        serviceName = __MKSTRING(sp);
 err:;
 #else
     error = @symbol(notImplemented);
 #endif
 %}.
     error notNil ifTrue:[
-	^ (HostAddressLookupError new
-		parameter:error;
-		messageText:' - ', errorString;
-		request:thisContext message) raiseRequest.
+        ^ (HostAddressLookupError new
+                parameter:error;
+                messageText:' - ', errorString;
+                request:thisContext message) raiseRequest.
     ].
 
     ^ Array with:hostName with:serviceName
 
     "
      self getNameInfo:
-	(self getAddressInfo:'localhost' serviceName:'echo'
-		domain:#inet type:#stream protocol:nil flags:nil) first socketAddress
-	 wantHostName:true wantServiceName:true datagram:false flags:0
+        (self getAddressInfo:'localhost' serviceName:'echo'
+                domain:#inet type:#stream protocol:nil flags:nil) first socketAddress
+         wantHostName:true wantServiceName:true datagram:false flags:0
 
      self getNameInfo:
-	(self getAddressInfo:'exept.exept.de' serviceName:'echo'
-		domain:#inet type:#stream protocol:nil flags:nil) first socketAddress
-	 wantHostName:true wantServiceName:true datagram:false flags:0
+        (self getAddressInfo:'exept.de' serviceName:'echo'
+                domain:#inet type:#stream protocol:nil flags:nil) first socketAddress
+         wantHostName:true wantServiceName:true datagram:false flags:0
 
      self getNameInfo:
-	(self getAddressInfo:'217.172.183.25' serviceName:'22'
-		domain:#inet type:#stream protocol:nil flags:nil) first socketAddress
-	 wantHostName:true wantServiceName:true datagram:false flags:0
+        (self getAddressInfo:'217.172.183.25' serviceName:'22'
+                domain:#inet type:#stream protocol:nil flags:nil) first socketAddress
+         wantHostName:true wantServiceName:true datagram:false flags:0
 
      self getNameInfo:
-	(self getAddressInfo:'1.2.3.4' serviceName:'22'
-		domain:#inet type:#stream protocol:nil flags:nil) first socketAddress
-	 wantHostName:true wantServiceName:true datagram:false flags:0
+        (self getAddressInfo:'1.2.3.4' serviceName:'22'
+                domain:#inet type:#stream protocol:nil flags:nil) first socketAddress
+         wantHostName:true wantServiceName:true datagram:false flags:0
     "
 ! !
 
@@ -12651,11 +12705,11 @@
 !UnixOperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Id: UnixOperatingSystem.st 10510 2010-04-08 17:25:02Z vranyj1 $'
+    ^ '$Id: UnixOperatingSystem.st 10512 2010-04-09 18:02:18Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.268 2010/04/01 09:36:44 stefan Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.270 2010/04/08 11:51:40 stefan Exp §'
 ! !
 
 UnixOperatingSystem initialize!
@@ -12663,3 +12717,4 @@
 
 
 
+
--- a/stx_libbasic.st	Thu Apr 08 18:25:02 2010 +0100
+++ b/stx_libbasic.st	Fri Apr 09 19:02:18 2010 +0100
@@ -532,13 +532,13 @@
     "Return a SVN revision number of myself.
      This number is updated after a commit"
 
-    ^ "$SVN-Revision:"'10508M'"$"
+    ^ "$SVN-Revision:"'10510M'"$"
 ! !
 
 !stx_libbasic class methodsFor:'documentation'!
 
 version
-    ^ '$Id: stx_libbasic.st 10510 2010-04-08 17:25:02Z vranyj1 $'
+    ^ '$Id: stx_libbasic.st 10512 2010-04-09 18:02:18Z vranyj1 $'
 !
 
 version_CVS
@@ -546,6 +546,6 @@
 !
 
 version_SVN
-    ^ '$Id: stx_libbasic.st 10510 2010-04-08 17:25:02Z vranyj1 $'
+    ^ '$Id: stx_libbasic.st 10512 2010-04-09 18:02:18Z vranyj1 $'
 ! !