blocxx
Paths.hpp
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright (C) 2005, Quest Software, Inc. All rights reserved.
3 * Copyright (C) 2006, Novell, Inc. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * * Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of
14 * Quest Software, Inc.,
15 * nor Novell, Inc.,
16 * nor the names of its contributors or employees may be used to
17 * endorse or promote products derived from this software without
18 * specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
31 *******************************************************************************/
32 
33 
38 #ifndef BLOCXX_PATHS_HPP_INCLUDE_GUARD_
39 #define BLOCXX_PATHS_HPP_INCLUDE_GUARD_
40 
41 #include "blocxx/BLOCXX_config.h"
42 
43 // The purpose of this file is to portably provide system paths from paths.h (BSD derived)
44 
45 #ifdef BLOCXX_HAVE_PATHS_H
46 #include <paths.h>
47 
48 // Standard paths for busted systems that have paths.h but don't define all the
49 // neccessary paths.
50 #if !defined(BLOCXX_HAVE_DECL__PATH_DEFPATH) || (BLOCXX_HAVE_DECL__PATH_DEFPATH == 0)
51 #define _PATH_DEFPATH "/usr/bin:/bin"
52 #endif
53 #if !defined(BLOCXX_HAVE_DECL__PATH_STDPATH) || (BLOCXX_HAVE_DECL__PATH_STDPATH == 0)
54 #define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
55 #endif
56 
57 #else
58 
59 #ifndef BLOCXX_WIN32
60 #define _PATH_DEFPATH "/usr/bin:/bin"
61 #define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
62 #else
63 #define _PATH_DEFPATH "%WINDIR%;%WINDIR%/system32"
64 #define _PATH_STDPATH _PATH_DEFPATH
65 #endif
66 
67 #define _PATH_BSHELL "/bin/sh"
68 #define _PATH_CONSOLE "/dev/console"
69 #define _PATH_CSHELL "/bin/csh"
70 #define _PATH_DEVDB "/var/run/dev.db"
71 #define _PATH_DEVNULL "/dev/null"
72 #define _PATH_DRUM "/dev/drum"
73 #define _PATH_KLOG "/proc/kmsg"
74 #define _PATH_KMEM "/dev/kmem"
75 #define _PATH_LASTLOG "/var/log/lastlog"
76 #define _PATH_MAILDIR "/var/mail"
77 #define _PATH_MAN "/usr/share/man"
78 #define _PATH_MEM "/dev/mem"
79 #define _PATH_MNTTAB "/etc/fstab"
80 #define _PATH_MOUNTED "/etc/mtab"
81 #define _PATH_NOLOGIN "/etc/nologin"
82 #define _PATH_PRESERVE "/var/lib"
83 #define _PATH_RWHODIR "/var/spool/rwho"
84 #define _PATH_SENDMAIL "/usr/sbin/sendmail"
85 #define _PATH_SHADOW "/etc/shadow"
86 #define _PATH_SHELLS "/etc/shells"
87 #define _PATH_TTY "/dev/tty"
88 #define _PATH_UNIX "/boot/vmlinux"
89 #define _PATH_UTMP "/var/run/utmp"
90 #define _PATH_VI "/bin/vi"
91 #define _PATH_WTMP "/var/log/wtmp"
92 #define _PATH_DEV "/dev/"
93 #define _PATH_TMP "/tmp/"
94 #define _PATH_VARDB "/var/db/"
95 #define _PATH_VARRUN "/var/run/"
96 #define _PATH_VARTMP "/var/tmp/"
97 
98 
99 
100 #endif
101 
102 #endif
103