4197 ! ! |
4197 ! ! |
4198 |
4198 |
4199 !AbstractOperatingSystem class methodsFor:'os queries'! |
4199 !AbstractOperatingSystem class methodsFor:'os queries'! |
4200 |
4200 |
4201 getCCDefine |
4201 getCCDefine |
|
4202 <resource: #obsolete> |
|
4203 |
4202 "return a string which was used to identify the C-Compiler used |
4204 "return a string which was used to identify the C-Compiler used |
4203 when STX was compiled, and which should be passed down when compiling methods. |
4205 when STX was compiled, and which should be passed down when compiling methods. |
4204 For example, on linux, this is '__GNUC__'; |
4206 For example, on linux, this is '__GNUC__'; |
4205 on windows, this is either '__MSC__' or '__BORLANDC__'" |
4207 on windows, this could be '__VISUALC__', '__BORLANDC__' or '__MINGW__'" |
4206 |
4208 |
4207 %{ /* NOCONTEXT */ |
4209 self obsoleteMethodWarning. |
4208 #ifndef CC_DEFINE |
4210 ^ STCCompilerInterface getCCDefine |
4209 # ifdef __win32__ |
4211 |
4210 # if defined( __BORLANDC__ ) |
|
4211 # define CC_DEFINE "__BORLANDC__" |
|
4212 # else |
|
4213 # if defined( __VISUALC__ ) |
|
4214 # define CC_DEFINE "__VISUALC__" |
|
4215 # else |
|
4216 # if defined( __MINGW64__ ) |
|
4217 # define CC_DEFINE "__MINGW64__" |
|
4218 # else |
|
4219 # if defined( __MINGW32__ ) |
|
4220 # define CC_DEFINE "__MINGW32__" |
|
4221 # else |
|
4222 # define CC_DEFINE "__CC__" |
|
4223 # endif |
|
4224 # endif |
|
4225 # endif |
|
4226 # endif |
|
4227 # else /* not __win32__ */ |
|
4228 # ifdef __CLANG__ |
|
4229 # define CC_DEFINE "__CLANG__" |
|
4230 # else |
|
4231 # ifdef __GNUC__ |
|
4232 # define CC_DEFINE "__GNUC__" |
|
4233 # else |
|
4234 # define CC_DEFINE "__CC__" |
|
4235 # endif |
|
4236 # endif |
|
4237 # endif |
|
4238 #endif |
|
4239 RETURN ( __MKSTRING(CC_DEFINE)); |
|
4240 %} |
|
4241 " |
4212 " |
4242 OperatingSystem getCCDefine |
4213 OperatingSystem getCCDefine |
4243 " |
4214 " |
4244 ! |
4215 ! |
4245 |
4216 |
4246 getCPUDefine |
4217 getCPUDefine |
|
4218 <resource: #obsolete> |
4247 "return a string which was used to identify this CPU type when STX was |
4219 "return a string which was used to identify this CPU type when STX was |
4248 compiled, and which should be passed down when compiling methods. |
4220 compiled, and which should be passed down when compiling methods. |
4249 For example, on linux, this may be '-Di386'; on a vax, this would be '-Dvax'. |
4221 For example, on linux, this may be '-D__x86__'; on a vax, this would be '-D__vax__'. |
4250 This is normally not of interest to 'normal' users; however, it is passed |
4222 This is normally not of interest to 'normal' users; however, it is passed |
4251 down to the c-compiler when methods are incrementally compiled to machine code." |
4223 down to the c-compiler when methods are incrementally compiled to machine code." |
4252 |
4224 |
4253 %{ /* NOCONTEXT */ |
4225 self obsoleteMethodWarning. |
4254 # ifndef CPU_DEFINE |
4226 ^ STCCompilerInterface getCPUDefine |
4255 # define CPU_DEFINE "-DunknownCPU" |
4227 |
4256 # endif |
|
4257 |
|
4258 RETURN ( __MKSTRING(CPU_DEFINE)); |
|
4259 %} |
|
4260 " |
4228 " |
4261 OperatingSystem getCPUDefine |
4229 OperatingSystem getCPUDefine |
4262 " |
4230 " |
4263 ! |
4231 ! |
4264 |
4232 |
4477 |
4445 |
4478 self subclassResponsibility |
4446 self subclassResponsibility |
4479 ! |
4447 ! |
4480 |
4448 |
4481 getOSDefine |
4449 getOSDefine |
|
4450 <resource: #obsolete> |
|
4451 |
4482 "return a string which was used to identify this machine when stx was |
4452 "return a string which was used to identify this machine when stx was |
4483 compiled, and which should be passed down when compiling methods. |
4453 compiled, and which should be passed down when compiling methods. |
4484 For example, on linux, this is '-DLINUX'." |
4454 For example, on linux, this is '-D__linux__'." |
4485 |
4455 |
4486 %{ /* NOCONTEXT */ |
4456 self obsoleteMethodWarning. |
4487 |
4457 ^ STCCompilerInterface getOSDefine |
4488 #ifndef OS_DEFINE |
4458 |
4489 # ifdef __win32__ |
|
4490 # define OS_DEFINE "-D__win32__" |
|
4491 # endif |
|
4492 |
|
4493 # ifndef OS_DEFINE |
|
4494 # define OS_DEFINE "-DunknownOS" |
|
4495 # endif |
|
4496 #endif |
|
4497 |
|
4498 RETURN ( __MKSTRING(OS_DEFINE)); |
|
4499 |
|
4500 #undef OS_DEFINE |
|
4501 %} |
|
4502 " |
4459 " |
4503 OperatingSystem getOSDefine |
4460 OperatingSystem getOSDefine |
4504 " |
4461 " |
4505 ! |
4462 ! |
4506 |
4463 |
4658 OperatingSystem getOSType |
4615 OperatingSystem getOSType |
4659 " |
4616 " |
4660 ! |
4617 ! |
4661 |
4618 |
4662 getPlatformDefine |
4619 getPlatformDefine |
|
4620 <resource: #obsolete> |
|
4621 |
4663 "return a string which defines the platform, |
4622 "return a string which defines the platform, |
4664 and which should be passed down when compiling methods. |
4623 and which should be passed down when compiling methods. |
4665 For example, on all unices, this is '-DUNIX'." |
4624 For example, on all unices, this is '-DUNIX'." |
4666 |
4625 |
4667 %{ /* NOCONTEXT */ |
4626 %{ /* NOCONTEXT */ |