-
Notifications
You must be signed in to change notification settings - Fork 50
/
config.h
34 lines (25 loc) · 812 Bytes
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* Copyright (c) 1994 Sun Wu, Udi Manber, Burra Gopal. All Rights Reserved. */
/*
* Definitions in this file will be visible throughout glimpse source code.
* Any global flags or macros can should be defined here.
*/
#if defined(__NeXT__)
#define getcwd(buf,size) getwd(buf) /* NB: unchecked target size--could overflow; BG: Ok since buffers are usually >= 256B */
#define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG))
#define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
#endif
#ifdef _WIN32
#ifndef S_ISDIR
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
#endif
#ifndef S_ISREG
#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
#endif
#else
#ifndef S_ISREG
#define S_ISREG(mode) (0100000&(mode))
#endif
#ifndef S_ISDIR
#define S_ISDIR(mode) (0040000&(mode))
#endif
#endif