--- a/AbstractOperatingSystem.st Thu Dec 20 11:48:59 2012 +0000
+++ b/AbstractOperatingSystem.st Sat Jan 19 01:30:00 2013 +0000
@@ -673,11 +673,15 @@
(as kept in an osErrorHolder)."
Resources isNil ifTrue:[
- "/ do not care to load resource strings, if the error happens durig early initialization
+ "/ do not care to load resource strings, if the error happens during early initialization
Smalltalk isInitialized ifFalse:[
^ errorSymbol
].
- self initResources.
+ "/ avoid endless recursion
+ Error handle:[:ex |
+ ] do:[
+ self initResources.
+ ].
Resources isNil ifTrue:[
^ errorSymbol
]
@@ -1715,14 +1719,14 @@
hardwiring any 'cd ..' command strings into your applictions."
^ self
- executeCommand:aCommandString
- inputFrom:nil
- outputTo:outStreamOrNil
- errorTo:nil
- auxFrom:nil
- inDirectory:aDirectory
- lineWise:false
- onError:[:status| false]
+ executeCommand:aCommandString
+ inputFrom:nil
+ outputTo:outStreamOrNil
+ errorTo:nil
+ auxFrom:nil
+ inDirectory:aDirectory
+ lineWise:false
+ onError:[:status| false]
"
OperatingSystem executeCommand:'tdump date.obj' inDirectory:'c:\winstx\stx\libbasic\objbc'.
@@ -1850,8 +1854,8 @@
OperatingSystem canExecuteCommand:'cvs'
OperatingSystem canExecuteCommand:'diff'
OperatingSystem canExecuteCommand:'cvs.exe'
- OperatingSystem canExecuteCommand:'hg'
- OperatingSystem pathOfCommand:'hg'
+ OperatingSystem canExecuteCommand:'hg'
+ OperatingSystem pathOfCommand:'hg'
"
"Created: / 04-11-1995 / 19:13:54 / cg"
@@ -3223,10 +3227,12 @@
%{ /* NOCONTEXT */
#ifndef CC_DEFINE
# ifdef WIN32
-# ifdef __BORLANDC__
+# if defined( __BORLANDC__ )
# define CC_DEFINE "__BORLANDC__"
-# else
-# define CC_DEFINE "__MSC__"
+# elif defined( __VISUALC__ )
+# define CC_DEFINE "__VISUALC__"
+# elif defined( __MINGW64__ )
+# define CC_DEFINE "__MINGW64__"
# endif
# else
# ifdef __GNUC__
@@ -3281,6 +3287,9 @@
# ifdef __i386__
# define CPU_SYMBOL @symbol(i386)
# endif
+# ifdef __x86_64__
+# define CPU_SYMBOL @symbol(x86_64)
+# endif
# ifdef __i860__
# define CPU_SYMBOL @symbol(i860)
# endif
@@ -3569,6 +3578,10 @@
# define OS_SYMBOL @symbol(osf)
# endif
+# ifdef __osx__
+# define OS_SYMBOL @symbol(osx)
+# endif
+
/*
* no concrete info; become somewhat vague ...
*/
@@ -4110,7 +4123,7 @@
!AbstractOperatingSystem class methodsFor:'path queries'!
-decodePath:encodedPathName
+decodePath:encodedPathName
"decode the pathName as returned by system calls.
E.g. linux system calls return sigle byte strings only,
so the pathName has been UTF-8 decoded."
@@ -4254,17 +4267,17 @@
"/
appPath := self pathOfSTXExecutable.
appPath notNil ifTrue:[
- appDir := appPath asFilename directory.
- appPath := appDir pathName.
- (sysPath includes:appPath) ifFalse:[
- sysPath add:appPath.
- ].
- appDir baseName = 'bin' ifTrue:[
- appPath := appDir directory pathName.
- (sysPath includes:appPath) ifFalse:[
- sysPath add:appPath.
- ].
- ].
+ appDir := appPath asFilename directory.
+ appPath := appDir pathName.
+ (sysPath includes:appPath) ifFalse:[
+ sysPath add:appPath.
+ ].
+ appDir baseName = 'bin' ifTrue:[
+ appPath := appDir directory pathName.
+ (sysPath includes:appPath) ifFalse:[
+ sysPath add:appPath.
+ ].
+ ].
].
"/
@@ -4272,55 +4285,55 @@
"/
homePath := self getHomeDirectory.
homePath notNil ifTrue:[
- "/
- "/ a users private smalltalk directory in its home (login) directory
- "/
- OperatingSystem isUNIXlike ifTrue:[
- priv := '.smalltalk'.
- ] ifFalse:[
- priv := 'smalltalk'.
- ].
- userPrivateSTXDir := homePath asFilename construct:priv.
- (userPrivateSTXDir isDirectory) ifTrue:[
- userPrivateSTXDir := userPrivateSTXDir pathName.
- (sysPath includes:userPrivateSTXDir) ifFalse:[
- sysPath add:userPrivateSTXDir
- ]
- ].
+ "/
+ "/ a users private smalltalk directory in its home (login) directory
+ "/
+ OperatingSystem isUNIXlike ifTrue:[
+ priv := '.smalltalk'.
+ ] ifFalse:[
+ priv := 'smalltalk'.
+ ].
+ userPrivateSTXDir := homePath asFilename construct:priv.
+ (userPrivateSTXDir isDirectory) ifTrue:[
+ userPrivateSTXDir := userPrivateSTXDir pathName.
+ (sysPath includes:userPrivateSTXDir) ifFalse:[
+ sysPath add:userPrivateSTXDir
+ ]
+ ].
].
"/
"/ SMALLTALK_LIBDIR, STX_LIBDIR and STX_TOPDIR from the environment
"/
#(
- 'SMALLTALK_LIBDIR'
- 'STX_LIBDIR'
- 'STX_TOPDIR'
+ 'SMALLTALK_LIBDIR'
+ 'STX_LIBDIR'
+ 'STX_TOPDIR'
) do:[:each |
- p := OperatingSystem decodePath:(OperatingSystem getEnvironment:each).
- p notNil ifTrue:[
- p := p asFilename pathName.
- (p asFilename isDirectory) ifTrue:[
- (sysPath includes:p) ifFalse:[
- sysPath add:p
- ]
- ]
- ].
+ p := OperatingSystem decodePath:(OperatingSystem getEnvironment:each).
+ p notNil ifTrue:[
+ p := p asFilename pathName.
+ (p asFilename isDirectory) ifTrue:[
+ (sysPath includes:p) ifFalse:[
+ sysPath add:p
+ ]
+ ]
+ ].
].
^ sysPath
"
- OperatingSystem defaultSystemPath
+ OperatingSystem defaultSystemPath
"
"Modified: / 24.12.1999 / 00:30:27 / cg"
!
-encodePath:pathName
+encodePath:pathName
"encode the pathName for use with system calls.
E.g. linux system calls accept sigle byte strings only,
so the pathName has been UTF-8 encoded, before using it in a system call."
-
+
^ pathName
! !
@@ -7146,11 +7159,12 @@
!AbstractOperatingSystem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.222 2012/12/13 13:52:25 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.224 2013-01-16 10:30:10 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.222 2012/12/13 13:52:25 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.224 2013-01-16 10:30:10 cg Exp $'
! !
+
AbstractOperatingSystem initialize!