root/branches/mcstas-1.x/port.h

Revision 1879, 1.7 KB (checked in by pkwi, 5 years ago)

Only define HAVE_STR_CASECMP when undefined on Win32 (removes warning message when running the mingw compiler from linux

Line 
1/*******************************************************************************
2*
3* McStas, neutron ray-tracing package
4*         Copyright 1997-2002, All rights reserved
5*         Risoe National Laboratory, Roskilde, Denmark
6*         Institut Laue Langevin, Grenoble, France
7*
8* Kernel: port.h
9*
10* %Identification
11* Written by: K.N.
12* Date: Nov 11, 1998
13* Origin: Risoe
14* Release: McStas 1.6
15* Version: $Revision: 1.18 $
16*
17* Header file for portability related stuff.
18*
19* $Id: port.h,v 1.18 2007-03-09 08:48:58 pkwi Exp $
20*
21*******************************************************************************/
22
23/* Machintosh specific compiler defines. */
24#ifdef __dest_os
25#if (__dest_os == __mac_os)
26#define MAC
27#endif
28#endif
29
30/* File system details. */
31#ifndef MC_PATHSEP_C
32#ifdef WIN32
33#define MC_PATHSEP_S "\\"
34#define MC_PATHSEP_C '\\'
35#define CURRENT_DIR_S "."
36#else  /* !WIN32 */
37#ifdef MAC
38#define MC_PATHSEP_S ":"
39#define MC_PATHSEP_C ':'
40#define CURRENT_DIR_S ""        /* Apparently no Mac equivalent for this. */
41#else  /* !WIN32 && !MAC */
42#define MC_PATHSEP_S "/"
43#define MC_PATHSEP_C '/'
44#define CURRENT_DIR_S "."
45#endif /* !MAC */
46#endif /* !WIN32 */
47#endif /* MC_PATHSEP_C */
48
49#ifndef MCSTAS
50#ifdef WIN32
51#define MCSTAS "C:\\mcstas\\lib"
52#else  /* !WIN32 */
53#ifdef MAC
54#define MCSTAS ":mcstas:lib" /* ToDo: What to put here? */
55#else  /* !MAC */
56#define MCSTAS "/usr/local/lib/mcstas"
57#endif /* !MAC */
58#endif /* !WIN32 */
59#endif /* MCSTAS */
60
61#ifdef WIN32
62#define PACKAGE_BUGREPORT "www.mcstas.org"
63#ifndef HAVE_STRCASECMP
64#define HAVE_STRCASECMP
65#endif
66#endif
67#ifndef HAVE_STRCASECMP
68int strcasecmp(char *, char *);
69#endif
70
71#ifndef HAVE_FDOPEN
72#include <stdio.h>
73FILE *fdopen(int descr, const char *mode);
74#endif /* HAVE_FDOPEN */
Note: See TracBrowser for help on using the browser.