Windows, UNIX, Mac, and other system platforms

Source: Internet
Author: User

I am studying C ++ recently.ProgramTransplantation from Windows platform to Unix platform, refer to the macro definition file of QT

 

Windows, UNIX, Mac, and other macro definitions of various system platforms. You can refer to them when porting them.

# Ifndef qglobal_h <br/> # define qglobal_h </P> <p> # define qt_version_str "3.1.2" <br/>/* <br/> qt_version is (Major <16) + (minor <8) + patch. <br/> */<br/> # define qt_version 0x030102 </P> <p>/* <br/> the operating system, must be one: (q_ OS _x) </P> <p> macx-Mac OS x <br/> mac9-Mac OS 9 <br/> msdos-MS-DOS and Windows <br/> os2-OS/2 <br/> os2emx-xfree86 on OS/2 (not pm) <br/> Win32-Win32 (win Dows 95/98/me and Windows NT/2000/XP) <br/> cygwin-cygwin <br/> Solaris-Sun Solaris <br/> HPUX-HP-UX <br/> Ultrix-Dec Ultrix <br/> Linux-Linux <br/> FreeBSD-FreeBSD <br/> NetBSD-NetBSD <br/> OpenBSD-OpenBSD <br/> bsdi-BSD/OS <br/> IRIX-SGI IRIX <br/> OSF -HP Tru64 UNIX <br/> SCO-SCO openserver 5 <br/> unixware-unixware 7, open UNIX 8 <br/> Aix-Aix <br/> Hurd-GNU Hurd <br/> dgux-DG/u X <br/> reliant-reliant UNIX <br/> Dynix-Dynix/PTX <br/> QNX-QNX <br/> qnx6-qnx rtp 6.1 <br/> Lynx- lynxos <br/> bsd4-any BSD 4.4 system <br/> Unix-Any unix bsd/sysv System <br/> */</P> <p> # If defined (_ apple __) & defined (_ gnuc _) <br/> # define q_ OS _macx <br/> # Elif defined (_ MacOSX __) <br/> # define q_ OS _macx <br/> # Elif defined (Macintosh) <br/> # define q_ OS _mac9 <br/> # Elif defined (_ cygwin __) <Br/> # define q_ OS _cygwin <br/> # Elif defined (msdos) | defined (_ msdos) <br/> # define q_ OS _msdos <br/> # Elif defined (_ os2 _) <br/> # If defined (_ emx __) <br/> # define q_ OS _os2emx <br/> # else <br/> # define q_ OS _os2 <br/> # endif <br/> # Elif! Defined (sag_com) & (defined (win64) | defined (_ win64) | defined (_ win64 __)) <br/> # define q_ OS _win32 <br/> # define q_ OS _win64 <br/> # Elif! Defined (sag_com) & (defined (win32) | defined (_ Win32) | defined (_ Win32 _) | defined (_ nt __)) <br/> # define q_ OS _win32 <br/> # Elif defined (_ mwerks _) & defined (_ intel __) <br/> # define q_ OS _win32 <br/> # Elif defined (_ Sun) | defined (Sun) <br/> # define q_ OS _solaris <br/> # Elif defined (HPUX) | defined (_ HPUX) <br/> # define q_ OS _hpux <br/> # Elif defined (_ Ultrix) | defined (Ultrix) <br/> # define Q _ OS _ultrix <br/> # Elif defined (SINIX) <br/> # define q_ OS _reliant <br/> # Elif defined (_ Linux _) | defined (_ Linux) <br/> # define q_ OS _linux <br/> # Elif defined (_ FreeBSD __) <br/> # define q_ OS _freebsd <br/> # define q_ OS _bsd4 <br/> # Elif defined (_ NetBSD __) <br/> # define q_ OS _netbsd <br/> # define q_ OS _bsd4 <br/> # Elif defined (_ OpenBSD __) <br/> # define q_ OS _openbsd <br/> # define q_ OS _bsd4 <br/> # Elif defi Ned (_ bsdi _) <br/> # define q_ OS _bsdi <br/> # define q_ OS _bsd4 <br/> # Elif defined (_ SGI) <br/> # define q_ OS _irix <br/> # Elif defined (_ OSF _) <br/> # define q_ OS _osf <br/> # Elif defined (_ AIX) <br/> # define q_ OS _aix <br/> # Elif defined (_ Lynx __) <br/> # define q_ OS _lynx <br/> # Elif defined (_ gnu_hurd __) <br/> # define q_ OS _hurd <br/> # Elif defined (_ dgux _) <br/> # define q_ OS _dgux <br/> # Elif defined (_ qnxnt O _) <br/> # define q_ OS _qnx6 <br/> # Elif defined (_ QNX __) <br/> # define q_ OS _qnx <br/> # Elif defined (_ sequent _) <br/> # define q_ OS _dynix <br/> # Elif defined (_ sco_ds) /* SCO openserver 5 + GCC */<br/> # define q_ OS _sco <br/> # Elif defined (_ uslc __) /* All SCO platforms + udk or oudk */<br/> # define q_ OS _unixware <br/> # define q_ OS _unixware7 <br/> # Elif defined (_ svr4 __) & defined (i386)/* Open UNIX 8 + GCC */<br/> # define q_ OS _unixware <br/> # define q_ OS _unixware7 <br/> # else <br/> # error "QT has not been ported to this OS- talk to qt-bugs@trolltech.com "<br/> # endif </P> <p> # If defined (q_ OS _mac9) | defined (q_ OS _macx) <br/> # define q_ OS _mac <br/> # endif </P> <p> # If defined (q_ OS _mac9) | defined (q_ OS _msdos) | defined (q_ OS _os2) | defined (q_ OS _win32) | defined (q_ OS _win64) <br/> # UNDEF q_ OS _unix <br /> # Elif! Defined (q_ OS _unix) <br/> # define q_ OS _unix <br/> # endif

 

========================================================== ======================================

Extension reference:

 

Information available in qglobal. h

Related Article

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.