Main Page | Class List | Directories | File List | Class Members | File Members

pcconf.c

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 2004, 2005, 2006 John E. Davis
00003 
00004 This file is part of the S-Lang Library.
00005 
00006 The S-Lang Library is free software; you can redistribute it and/or
00007 modify it under the terms of the GNU General Public License as
00008 published by the Free Software Foundation; either version 2 of the
00009 License, or (at your option) any later version.
00010 
00011 The S-Lang Library is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 General Public License for more details.
00015 
00016 You should have received a copy of the GNU General Public License
00017 along with this library; if not, write to the Free Software
00018 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
00019 USA.  
00020 */
00021 
00022 #include "slinclud.h"
00023 
00024 static void print (char *symbol, int is_defined)
00025 {
00026    if (is_defined)
00027      fprintf (stdout, "%s is defined\n", symbol);
00028    else
00029      fprintf (stdout, "%s is NOT defined\n", symbol);
00030 }
00031 
00032 int main (int argc, char **argv)
00033 {
00034    print ("__MSDOS__",
00035 #ifdef __MSDOS__
00036           1
00037 #else
00038           0
00039 #endif
00040           );
00041 
00042    print ("IBMPC_SYSTEM",
00043 #ifdef IBMPC_SYSTEM
00044           1
00045 #else
00046           0
00047 #endif
00048           );
00049 
00050    print ("REAL_UNIX_SYSTEM",
00051 #ifdef REAL_UNIX_SYSTEM
00052           1
00053 #else
00054           0
00055 #endif
00056           );
00057 
00058    print ("__os2__",
00059 #ifdef __os2__
00060           1
00061 #else
00062           0
00063 #endif
00064           );
00065 
00066    print ("__WIN32__",
00067 #ifdef __WIN32__
00068           1
00069 #else
00070           0
00071 #endif
00072           );
00073 
00074    print ("__unix__",
00075 #ifdef __unix__
00076           1
00077 #else
00078           0
00079 #endif
00080           );
00081 
00082    print ("__GO32__",
00083 #ifdef __GO32__
00084           1
00085 #else
00086           0
00087 #endif
00088           );
00089 
00090    print ("__DJGPP__",
00091 #ifdef __DJGPP__
00092           1
00093 #else
00094           0
00095 #endif
00096           );
00097 
00098    print ("__MSDOS_16BIT__",
00099 #ifdef __MSDOS_16BIT__
00100           1
00101 #else
00102           0
00103 #endif
00104           );
00105 
00106    return 0;
00107 }

© sourcejam.com 2005-2008