This is arch.h in view mode; [Download] [Up]
/* * This file contains the current known set of flags and constants for the * known architectures. */ #include <mach/machine.h> /* NEXTSTEP 3.2 doesn't define some of the constants we need */ #ifndef CPU_SUBTYPE_SPARC_ALL #define CPU_SUBTYPE_SPARC_ALL ((cpu_subtype_t) 0) #endif #ifndef CPU_SUBTYPE_HPPA_7100LC #define CPU_SUBTYPE_HPPA_7100LC ((cpu_subtype_t) 1) #endif #if 0 #include "bytesex.h" #endif /* * The structure describing an architecture flag with the string of the flag * name, and the cputype and cpusubtype. */ struct arch_flag { char *name; cpu_type_t cputype; cpu_subtype_t cpusubtype; }; /* * get_arch_from_flag() is passed a name of an architecture flag and returns * zero if that flag is not known and non-zero if the flag is known. * If the pointer to the arch_flag is not NULL it is filled in with the * arch_flag struct that matches the name. */ extern int get_arch_from_flag( char *name, struct arch_flag *arch_flag); /* * get_arch_from_host() gets the architecture from the host this is running on * and returns zero if the architecture is not known and zero if the * architecture is known. If the parameters family_arch_flag and * specific_arch_flag are not NULL they get fill in with the family * architecture and specific architecure for the host. If the architecture * is unknown and the parameters are not NULL then all fields are set to zero. */ extern int get_arch_from_host( struct arch_flag *family_arch_flag, struct arch_flag *specific_arch_flag); /* * get_arch_flags() returns a pointer to an array of all currently know * architecture flags (terminated with an entry with all zeros). */ extern const struct arch_flag *get_arch_flags( void); /* * arch_usage() is called when an unknown architecture flag is encountered. * It prints the currently know architecture flags on stderr. */ extern void arch_usage( void); /* * set_arch_flag_name() sets the name field of the specified arch_flag to * match it's cputype and cpusubtype. The string is allocated via malloc by * the routines in "allocate.h" and errors are handled by the routines in * "error.h". */ extern void set_arch_flag_name( struct arch_flag *p); /* * get_arch_family_from_cputype() returns the family architecture for the * specified cputype if known. If unknown it returns NULL. */ extern const struct arch_flag *get_arch_family_from_cputype( cpu_type_t cputype);
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.