Debian Codegraph @

src/compat/mkdir.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2000,2001 Ross Combs ([email protected])
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18 #ifndef INCLUDED_MKDIR_PROTOS
19 #define INCLUDED_MKDIR_PROTOS
20
21 /* Unix puts this in unistd.h, Borland/Win32 puts it in dir.h, MSVC++/Win32 puts it in direct.h */
22 /* Windows and MacOS also typically take only one argument */
23 #ifdef HAVE_SYS_TYPES_H
24 # include <sys/types.h>
25 #endif
26 #ifdef HAVE_SYS_STAT_H
27 # include <sys/stat.h>
28 #endif
29 #ifdef HAVE_DIR_H
30 # include <dir.h>
31 #endif
32 #ifdef HAVE_DIRECT_H
33 # include <direct.h>
34 #endif
35 #ifdef HAVE_UNISTD_H
36 # include <unistd.h>
37 #endif
38
39 #ifdef MKDIR_TAKES_ONE_ARG
40 # ifdef HAVE_MKDIR
41 # define p_mkdir(A,B) mkdir(A)
42 # else
43 # ifdef HAVE__MKDIR
44 # define p_mkdir(A,B) _mkdir(A)
45 # else
46 # error "This program requires either mkdir() or _mkdir()"
47 # endif
48 # endif
49 #else
50 # ifdef HAVE_MKDIR
51 # define p_mkdir mkdir
52 # else
53 # ifdef HAVE__MKDIR
54 # define p_mkdir _mkdir
55 # else
56 # error "This program requires either mkdir() or _mkdir()"
57 # endif
58 # endif
59 #endif
60
61 #endif