AbstractOperatingSystem.st
changeset 6530 fb683e5bfe04
parent 6421 58dca33cf0fc
child 6536 bcbce3402340
equal deleted inserted replaced
6529:1d928f8c721a 6530:fb683e5bfe04
  3030     |cpu|
  3030     |cpu|
  3031     
  3031     
  3032 %{  /* NOCONTEXT */
  3032 %{  /* NOCONTEXT */
  3033 
  3033 
  3034 #   ifdef vax
  3034 #   ifdef vax
  3035 #    define CPU_STRING "vax"
  3035 #    define CPU_SYMBOL @symbol(vax)
  3036 #   endif
  3036 #   endif
  3037 #   ifdef mips
  3037 #   ifdef mips
  3038 #    define CPU_STRING "mips"
  3038 #    define CPU_SYMBOL @symbol(mips)
  3039 #   endif
  3039 #   endif
  3040 #   ifdef i386
  3040 #   ifdef i386
  3041 #    define CPU_STRING "i386"
  3041 #    define CPU_SYMBOL @symbol(i386)
  3042 #   endif
  3042 #   endif
  3043 #   ifdef i860
  3043 #   ifdef i860
  3044 #    define CPU_STRING "i860"
  3044 #    define CPU_SYMBOL @symbol(i860)
  3045 #   endif
  3045 #   endif
  3046 #   ifdef ns32k
  3046 #   ifdef ns32k
  3047 #    define CPU_STRING "ns32k"
  3047 #    define CPU_SYMBOL @symbol(ns32k)
  3048 #   endif
  3048 #   endif
  3049 #   ifdef mc68k
  3049 #   ifdef mc68k
  3050 #    define CPU_STRING "mc68k"
  3050 #    define CPU_SYMBOL @symbol(mc68k)
  3051 #   endif
  3051 #   endif
  3052 #   ifdef mc88k
  3052 #   ifdef mc88k
  3053 #    define CPU_STRING "mc88k"
  3053 #    define CPU_SYMBOL @symbol(mc88k)
  3054 #   endif
  3054 #   endif
  3055 #   ifdef sparc
  3055 #   ifdef sparc
  3056 #    define CPU_STRING "sparc"
  3056 #    define CPU_SYMBOL @symbol(sparc)
  3057 #   endif
  3057 #   endif
  3058 #   ifdef hppa
  3058 #   ifdef hppa
  3059 #    define CPU_STRING "hppa"
  3059 #    define CPU_SYMBOL @symbol(hppa)
  3060 #   endif
  3060 #   endif
  3061 #   ifdef rs6000
  3061 #   ifdef rs6000
  3062 #    define CPU_STRING "rs6000"
  3062 #    define CPU_SYMBOL @symbol(rs6000)
  3063 #   endif
  3063 #   endif
  3064 #   ifdef powerPC
  3064 #   ifdef powerPC
  3065 #    define CPU_STRING "powerPC"
  3065 #    define CPU_SYMBOL @symbol(powerPC)
  3066 #   endif
  3066 #   endif
  3067 #   ifdef alpha
  3067 #   ifdef alpha
  3068 #    define CPU_STRING "alpha"
  3068 #    define CPU_SYMBOL @symbol(alpha)
  3069 #   endif
  3069 #   endif
  3070 #   ifdef transputer
  3070 #   ifdef transputer
  3071 #    define CPU_STRING "transputer"
  3071 #    define CPU_SYMBOL @symbol(transputer)
  3072 #   endif
  3072 #   endif
  3073 #   ifdef ibm370
  3073 #   ifdef ibm370
  3074 #    define CPU_STRING "ibm370"
  3074 #    define CPU_SYMBOL @symbol(ibm370)
  3075 #   endif
  3075 #   endif
  3076 
  3076 
  3077 #   ifndef CPU_STRING
  3077 #   ifndef CPU_SYMBOL
  3078 #    define CPU_STRING "unknown"
  3078 #    define CPU_SYMBOL @symbol(unknown)
  3079 #   endif
  3079 #   endif
  3080 
  3080 
  3081     cpu = __MKSTRING(CPU_STRING);
  3081     cpu = CPU_SYMBOL;
  3082 #   undef CPU_STRING
  3082 #   undef CPU_SYMBOL
  3083 %}.
  3083 %}.
  3084     ^ cpu
  3084     ^ cpu
  3085 
  3085 
  3086     "
  3086     "
  3087      OperatingSystem getCPUType
  3087      OperatingSystem getCPUType
  3221     |os|
  3221     |os|
  3222 
  3222 
  3223 %{  /* NOCONTEXT */
  3223 %{  /* NOCONTEXT */
  3224 
  3224 
  3225 #   ifdef MSDOS
  3225 #   ifdef MSDOS
  3226 #    define OS_STRING "msdos"
  3226 #    define OS_SYMBOL @symbol(msdos)
  3227 #   endif
  3227 #   endif
  3228 
  3228 
  3229 #   ifdef WIN32
  3229 #   ifdef WIN32
  3230 #    define OS_STRING "win32"
  3230 #    define OS_SYMBOL @symbol(win32)
  3231 #   endif
  3231 #   endif
  3232 
  3232 
  3233 #   ifdef MSWINDOWS
  3233 #   ifdef MSWINDOWS
  3234 #    define OS_STRING "mswindows"
  3234 #    define OS_SYMBOL @symbol(mswindows)
  3235 #   endif
  3235 #   endif
  3236 
  3236 
  3237 #   ifdef VMS
  3237 #   ifdef VMS
  3238 #    ifdef __openVMS__
  3238 #    ifdef __openVMS__
  3239 #     define OS_STRING "openVMS"
  3239 #     define OS_SYMBOL @symbol(openVMS)
  3240 #    else
  3240 #    else
  3241 #     define OS_STRING "VMS"
  3241 #     define OS_SYMBOL @symbol(VMS)
  3242 #    endif
  3242 #    endif
  3243 #   endif
  3243 #   endif
  3244 
  3244 
  3245 #   ifdef MVS /* ;-) */
  3245 #   ifdef MVS /* ;-) */
  3246 #    define OS_STRING "mvs"
  3246 #    define OS_SYMBOL @symbol(mvs)
  3247 #   endif
  3247 #   endif
  3248 
  3248 
  3249 #   ifdef OS2
  3249 #   ifdef OS2
  3250 #    define OS_STRING "os2"
  3250 #    define OS_SYMBOL @symbol(os2)
  3251 #   endif
  3251 #   endif
  3252 
  3252 
  3253 #   ifdef sinix
  3253 #   ifdef sinix
  3254 #    define OS_STRING "sinix"
  3254 #    define OS_SYMBOL @symbol(sinix)
  3255 #   endif
  3255 #   endif
  3256 
  3256 
  3257 #   ifdef ultrix
  3257 #   ifdef ultrix
  3258 #    define OS_STRING "ultrix"
  3258 #    define OS_SYMBOL @symbol(ultrix)
  3259 #   endif
  3259 #   endif
  3260 
  3260 
  3261 #   ifdef sco
  3261 #   ifdef sco
  3262 #    define OS_STRING "sco"
  3262 #    define OS_SYMBOL @symbol(sco)
  3263 #   endif
  3263 #   endif
  3264 
  3264 
  3265 #   ifdef hpux
  3265 #   ifdef hpux
  3266 #    define OS_STRING "hpux"
  3266 #    define OS_SYMBOL @symbol(hpux)
  3267 #   endif
  3267 #   endif
  3268 
  3268 
  3269 #   ifdef LINUX
  3269 #   ifdef LINUX
  3270 #    define OS_STRING "linux"
  3270 #    define OS_SYMBOL @symbol(linux)
  3271 #   endif
  3271 #   endif
  3272 
  3272 
  3273 #   ifdef sunos
  3273 #   ifdef sunos
  3274 #    define OS_STRING "sunos"
  3274 #    define OS_SYMBOL @symbol(sunos)
  3275 #   endif
  3275 #   endif
  3276 
  3276 
  3277 #   ifdef solaris
  3277 #   ifdef solaris
  3278 #    define OS_STRING "solaris"
  3278 #    define OS_SYMBOL @symbol(solaris)
  3279 #   endif
  3279 #   endif
  3280 
  3280 
  3281 #   ifdef IRIS
  3281 #   ifdef IRIS
  3282 #    define OS_STRING "irix"
  3282 #    define OS_SYMBOL @symbol(irix)
  3283 #   endif
  3283 #   endif
  3284 
  3284 
  3285 #   ifdef aix
  3285 #   ifdef aix
  3286 #    define OS_STRING "aix"
  3286 #    define OS_SYMBOL @symbol(aix)
  3287 #   endif
  3287 #   endif
  3288 
  3288 
  3289 #   ifdef realIX
  3289 #   ifdef realIX
  3290 #    define OS_STRING "realIX"
  3290 #    define OS_SYMBOL @symbol(realIX)
  3291 #   endif
  3291 #   endif
  3292 
  3292 
  3293 #   ifdef __osf__
  3293 #   ifdef __osf__
  3294 #    define OS_STRING "osf"
  3294 #    define OS_SYMBOL @symbol(osf)
  3295 #   endif
  3295 #   endif
  3296 
  3296 
  3297     /*
  3297     /*
  3298      * no concrete info; become somewhat vague ...
  3298      * no concrete info; become somewhat vague ...
  3299      */
  3299      */
  3300 #   ifndef OS_STRING
  3300 #   ifndef OS_SYMBOL
  3301 #    ifdef MACH
  3301 #    ifdef MACH
  3302 #     define OS_STRING "mach"
  3302 #     define OS_SYMBOL @symbol(mach)
  3303 #    endif
  3303 #    endif
  3304 #   endif
  3304 #   endif
  3305 
  3305 
  3306 #   ifndef OS_STRING
  3306 #   ifndef OS_SYMBOL
  3307 #    ifdef BSD
  3307 #    ifdef BSD
  3308 #     define OS_STRING "bsd"
  3308 #     define OS_SYMBOL @symbol(bsd)
  3309 #    endif
  3309 #    endif
  3310 
  3310 
  3311 #    ifdef SYSV
  3311 #    ifdef SYSV
  3312 #     ifdef SYSV3
  3312 #     ifdef SYSV3
  3313 #      define OS_STRING "sys5_3"
  3313 #      define OS_SYMBOL @symbol(sys5_3)
  3314 #     else
  3314 #     else
  3315 #      ifdef SYSV4
  3315 #      ifdef SYSV4
  3316 #       define OS_STRING "sys5_4"
  3316 #       define OS_SYMBOL @symbol(sys5_4)
  3317 #      else
  3317 #      else
  3318 #       define OS_STRING "sys5"
  3318 #       define OS_SYMBOL @symbol(sys5)
  3319 #      endif
  3319 #      endif
  3320 #     endif
  3320 #     endif
  3321 #    endif
  3321 #    endif
  3322 #   endif
  3322 #   endif
  3323 
  3323 
  3324     /*
  3324     /*
  3325      * become very vague ...
  3325      * become very vague ...
  3326      */
  3326      */
  3327 #   ifndef OS_STRING
  3327 #   ifndef OS_SYMBOL
  3328 #    ifdef POSIX
  3328 #    ifdef POSIX
  3329 #     define OS_STRING "posix"
  3329 #     define OS_SYMBOL @symbol(posix)
  3330 #    endif
  3330 #    endif
  3331 #   endif
  3331 #   endif
  3332 #   ifndef OS_STRING
  3332 #   ifndef OS_SYMBOL
  3333 #    ifdef UNIX
  3333 #    ifdef UNIX
  3334 #     define OS_STRING "unix"
  3334 #     define OS_SYMBOL @symbol(unix)
  3335 #    endif
  3335 #    endif
  3336 #   endif
  3336 #   endif
  3337 
  3337 
  3338 #   ifndef OS_STRING
  3338 #   ifndef OS_SYMBOL
  3339 #    define OS_STRING "unknown"
  3339 #    define OS_SYMBOL @symbol(unknown)
  3340 #   endif
  3340 #   endif
  3341 
  3341 
  3342     os = __MKSTRING(OS_STRING);
  3342     os = OS_SYMBOL;
  3343 
  3343 
  3344 #   undef OS_STRING
  3344 #   undef OS_SYMBOL
  3345 %}.
  3345 %}.
  3346     ^ os
  3346     ^ os
  3347 
  3347 
  3348     "
  3348     "
  3349      OperatingSystem getOSType
  3349      OperatingSystem getOSType
  4460 ! !
  4460 ! !
  4461 
  4461 
  4462 !AbstractOperatingSystem class methodsFor:'documentation'!
  4462 !AbstractOperatingSystem class methodsFor:'documentation'!
  4463 
  4463 
  4464 version
  4464 version
  4465     ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.62 2002-02-26 13:02:26 cg Exp $'
  4465     ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.63 2002-05-06 07:37:15 stefan Exp $'
  4466 ! !
  4466 ! !
  4467 AbstractOperatingSystem initialize!
  4467 AbstractOperatingSystem initialize!