C Program Common symbol definition header file

Source: Internet
Author: User
Tags definition header microsoft c

C Program Common symbol definition header file, also includes 10 kinds of C compilation environment detection: DOS (MSC, BC), VMS, as/400, four Unix, etc.

/*
Cmndef. H--Common #define SYMBOLS for C functions
M.l.y 1996.08, 1999.06, 2000.07.19, 2000.12.03

MODIFIED (YYYY. Mm. Cdn
M.l.y 1996.08-creation
M.l.y 1999.06-add Ascii_mode/ebcdic_mode
M.l.y 2000.07.19-add Os_code, Ebcdic_code/ascii_code
M.l.y 2000.12.03-add CCOS
*/

#ifndef Cmndef_h_include
# define Cmndef_h_include

#ifndef Usg_type
# define Usg_type
typedef unsigned char USGC;
typedef unsigned short USGS;
typedef unsigned int usgi;
typedef unsigned long USGL;
#endif

#ifndef YES
# define YES 1
# define NO 0
#endif

#ifndef TRUE
# define TRUE 1
# define FALSE 0
#endif

#ifndef on
# define on 1
# define off 0
#endif

#ifndef NUL
# define NUL '
#endif

#ifndef Ascii_mode
# define Ascii_mode 1
# define Ebcdic_mode 2
#endif

#ifndef Ascii_code
# define Ascii_code 1
# define Ebcdic_code 2

# if __OS400__/* as/400 *
# define Os_code Ebcdic_code
# Else
# define Os_code ascii_code/* DOS, UNIX, ... * *
# endif
#endif

# if __OS400__/* as/400 *
# define MAX (A,b) ((a) > (b))? (a): (b))
# define MIN (A,b) (((a) < (b))? (a): (b))
# endif

#ifndef CCOS

#define CCOS_UNKNOWN 0
#define CCOS_MSDOS_MSC 1
#define CCOS_MSDOS_TC_BC 2
#define CCOS_HP3000_MPE 3
#define CCOS_HP9000_UX 4
#define CCOS_DEC_VAX_VMS 5
#define CCOS_DEC_ALPHA_VMS 6
#define CCOS_IBM_OS400 7
#define CCOS_TANDEM_NONSTOPUX 8
#define CCOS_SCO_UNIX 9
#define CCOS_NCR_UNIX 10

#if defined (MSDOS) & Defined (_msc_ver)/* Microsoft C * *
# define CCOS Ccos_msdos_msc
#endif
#if defined (__msdos__) &/* Turbo C/BC */\
(Defined (__TURBOC__) | defined (__BORLANDC__))
# define CCOS CCOS_MSDOS_TC_BC
#endif
#if __hppa & __hp3000s900 & __MPEXL/* HP 3000 * *
# define CCOS Ccos_hp3000_mpe
#endif
#if VAX & VAX & VMS & VMS/DEC VAX */\
& Vaxc & Vaxc & vax11c & vax11c\
& Defined (vms_version) & Defined (vms_version)
# define CCOS Ccos_dec_vax_vms
#endif
#if __vms & __vms * DEC Alpha */\
& __vaxc & __vaxc & __vax11c & __vax11c\
& __DECC & Defined (__vms_version) & Defined (__vms_version) \
& __alpha_axp & __alpha & __alpha & __32bits
# define CCOS Ccos_dec_alpha_vms
#endif
#if __os400__/* as/400 * *
# define CCOS ccos_ibm_os400
#endif
#if MIPS & __mips & host_mips & __host_mips/* Tandem */\
& Unix & __unix & __nonstopux\
& SYSTYPE_SVR4 & _SYSTYPE_SVR4 & Language_c & _language_c
# define CCOS Ccos_tandem_nonstopux
#endif
#if (hp9000s200 | hp9000s300 | __hp9000s300 * HP 9000 */\
| hp9000s500 | hp9000s800 | __hp9000s800 | HP9000IPC) \
& (Hppa | __hppa) & (_pa_risc1_0 | _pa_risc1_1) \
& (Unix | __unix) & (Hpux | __hpux)
# define CCOS Ccos_hp9000_ux
#endif
#if i386 & m_i386 & Unix & __unix & M_unix/* SCO UNIX */\
& (_sco_coff | _sco_elf)
# define CCOS Ccos_sco_unix
#endif
#if i386 & _i386 & Unix & __highc__ & _ATT4 * NCR UNIX * *
# define CCOS Ccos_ncr_unix
#endif

#endif/* CCOS * *

#ifndef CCOS
# error ' Unknown machine, OS, and C compiler! '
#endif/* CCOS * *

#endif/* cmndef_h_include * *

/* End of File */

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.