OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [ada/] [mkdir.c] - Blame information for rev 797

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 706 jeremybenn
/****************************************************************************
2
 *                                                                          *
3
 *                         GNAT COMPILER COMPONENTS                         *
4
 *                                                                          *
5
 *                                 M K D I R                                *
6
 *                                                                          *
7
 *                          C Implementation File                           *
8
 *                                                                          *
9
 *             Copyright (C) 2002-2009, Free Software Foundation, Inc.      *
10
 *                                                                          *
11
 * GNAT is free software;  you can  redistribute it  and/or modify it under *
12
 * terms of the  GNU General Public License as published  by the Free Soft- *
13
 * ware  Foundation;  either version 3,  or (at your option) any later ver- *
14
 * sion.  GNAT is distributed in the hope that it will be useful, but WITH- *
15
 * OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY *
16
 * or FITNESS FOR A PARTICULAR PURPOSE.                                     *
17
 *                                                                          *
18
 * As a special exception under Section 7 of GPL version 3, you are granted *
19
 * additional permissions described in the GCC Runtime Library Exception,   *
20
 * version 3.1, as published by the Free Software Foundation.               *
21
 *                                                                          *
22
 * You should have received a copy of the GNU General Public License and    *
23
 * a copy of the GCC Runtime Library Exception along with this program;     *
24
 * see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    *
25
 * <http://www.gnu.org/licenses/>.                                          *
26
 *                                                                          *
27
 * GNAT was originally developed  by the GNAT team at  New York University. *
28
 * Extensive contributions were provided by Ada Core Technologies Inc.      *
29
 *                                                                          *
30
 ****************************************************************************/
31
 
32
#ifdef __vxworks
33
#include "vxWorks.h"
34
#include <version.h>
35
#endif /* __vxworks */
36
 
37
#ifdef IN_RTS
38
#include "tconfig.h"
39
#include "tsystem.h"
40
#include <sys/stat.h>
41
#else
42
#include "config.h"
43
#include "system.h"
44
#endif
45
 
46
#ifdef __MINGW32__
47
#include "mingw32.h"
48
#include <windows.h>
49
#ifdef MAXPATHLEN
50
#define GNAT_MAX_PATH_LEN MAXPATHLEN
51
#else
52
#define GNAT_MAX_PATH_LEN 256
53
#endif
54
#endif
55
 
56
#include "adaint.h"
57
 
58
/*  This function provides a portable binding to the mkdir function.  */
59
 
60
int
61
__gnat_mkdir (char *dir_name)
62
{
63
#if defined (__vxworks) && !(defined (__RTP__) && (_WRS_VXWORKS_MINOR != 0))
64
  return mkdir (dir_name);
65
#elif defined (__MINGW32__)
66
  TCHAR wname [GNAT_MAX_PATH_LEN + 2];
67
 
68
  S2WSC (wname, dir_name, GNAT_MAX_PATH_LEN + 2);
69
  return _tmkdir (wname);
70
#else
71
  return mkdir (dir_name, S_IRWXU | S_IRWXG | S_IRWXO);
72
#endif
73
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.