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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgo/] [runtime/] [go-nosys.c] - Blame information for rev 747

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 747 jeremybenn
/* go-nosys.c -- functions missing from system.
2
 
3
   Copyright 2012 The Go Authors. All rights reserved.
4
   Use of this source code is governed by a BSD-style
5
   license that can be found in the LICENSE file.  */
6
 
7
/* This file exists to provide definitions for functions that are
8
   missing from libc, according to the configure script.  This permits
9
   the Go syscall package to not worry about whether the functions
10
   exist or not.  */
11
 
12
#include "config.h"
13
 
14
#include <errno.h>
15
#include <fcntl.h>
16
#include <stdint.h>
17
#include <sys/types.h>
18
#include <sys/stat.h>
19
#include <sys/time.h>
20
#include <unistd.h>
21
 
22
#ifndef HAVE_OFF64_T
23
typedef signed int off64_t __attribute__ ((mode (DI)));
24
#endif
25
 
26
#ifndef HAVE_LOFF_T
27
typedef off64_t loff_t;
28
#endif
29
 
30
#ifndef HAVE_EPOLL_CREATE1
31
int
32
epoll_create1 (int flags __attribute__ ((unused)))
33
{
34
  errno = ENOSYS;
35
  return -1;
36
}
37
#endif
38
 
39
#ifndef HAVE_FACCESSAT
40
int
41
faccessat (int fd __attribute__ ((unused)),
42
           const char *pathname __attribute__ ((unused)),
43
           int mode __attribute__ ((unused)),
44
           int flags __attribute__ ((unused)))
45
{
46
  errno = ENOSYS;
47
  return -1;
48
}
49
#endif
50
 
51
#ifndef HAVE_FALLOCATE
52
int
53
fallocate (int fd __attribute__ ((unused)),
54
           int mode __attribute__ ((unused)),
55
           off_t offset __attribute__ ((unused)),
56
           off_t len __attribute__ ((unused)))
57
{
58
  errno = ENOSYS;
59
  return -1;
60
}
61
#endif
62
 
63
#ifndef HAVE_FCHMODAT
64
int
65
fchmodat (int dirfd __attribute__ ((unused)),
66
          const char *pathname __attribute__ ((unused)),
67
          mode_t mode __attribute__ ((unused)),
68
          int flags __attribute__ ((unused)))
69
{
70
  errno = ENOSYS;
71
  return -1;
72
}
73
#endif
74
 
75
#ifndef HAVE_FCHOWNAT
76
int
77
fchownat (int dirfd __attribute__ ((unused)),
78
          const char *pathname __attribute__ ((unused)),
79
          uid_t owner __attribute__ ((unused)),
80
          gid_t group __attribute__ ((unused)),
81
          int flags __attribute__ ((unused)))
82
{
83
  errno = ENOSYS;
84
  return -1;
85
}
86
#endif
87
 
88
#ifndef HAVE_FUTIMESAT
89
int
90
futimesat (int dirfd __attribute__ ((unused)),
91
           const char *pathname __attribute__ ((unused)),
92
           const struct timeval times[2] __attribute__ ((unused)))
93
{
94
  errno = ENOSYS;
95
  return -1;
96
}
97
#endif
98
 
99
#ifndef HAVE_INOTIFY_ADD_WATCH
100
int
101
inotify_add_watch (int fd __attribute__ ((unused)),
102
                   const char* pathname __attribute__ ((unused)),
103
                   uint32_t mask __attribute__ ((unused)))
104
{
105
  errno = ENOSYS;
106
  return -1;
107
}
108
#endif
109
 
110
#ifndef HAVE_INOTIFY_INIT
111
int
112
inotify_init (void)
113
{
114
  errno = ENOSYS;
115
  return -1;
116
}
117
#endif
118
 
119
#ifndef HAVE_INOTIFY_RM_WATCH
120
int
121
inotify_rm_watch (int fd __attribute__ ((unused)),
122
                  uint32_t wd __attribute__ ((unused)))
123
{
124
  errno = ENOSYS;
125
  return -1;
126
}
127
#endif
128
 
129
#ifndef HAVE_MKDIRAT
130
int
131
mkdirat (int dirfd __attribute__ ((unused)),
132
         const char *pathname __attribute__ ((unused)),
133
         mode_t mode __attribute__ ((unused)))
134
{
135
  errno = ENOSYS;
136
  return -1;
137
}
138
#endif
139
 
140
#ifndef HAVE_MKNODAT
141
int
142
mknodat (int dirfd __attribute__ ((unused)),
143
         const char *pathname __attribute__ ((unused)),
144
         mode_t mode __attribute__ ((unused)),
145
         dev_t dev __attribute__ ((unused)))
146
{
147
  errno = ENOSYS;
148
  return -1;
149
}
150
#endif
151
 
152
#ifndef HAVE_OPENAT
153
int
154
openat (int dirfd __attribute__ ((unused)),
155
        const char *pathname __attribute__ ((unused)),
156
        int oflag __attribute__ ((unused)),
157
        ...)
158
{
159
  errno = ENOSYS;
160
  return -1;
161
}
162
#endif
163
 
164
#ifndef HAVE_RENAMEAT
165
int
166
renameat (int olddirfd __attribute__ ((unused)),
167
          const char *oldpath __attribute__ ((unused)),
168
          int newdirfd __attribute__ ((unused)),
169
          const char *newpath __attribute__ ((unused)))
170
{
171
  errno = ENOSYS;
172
  return -1;
173
}
174
#endif
175
 
176
#ifndef HAVE_SPLICE
177
int
178
splice (int fd __attribute__ ((unused)),
179
        loff_t *off_in __attribute__ ((unused)),
180
        int fd_out __attribute__ ((unused)),
181
        loff_t *off_out __attribute__ ((unused)),
182
        size_t len __attribute__ ((unused)),
183
        unsigned int flags __attribute__ ((unused)))
184
{
185
  errno = ENOSYS;
186
  return -1;
187
}
188
#endif
189
 
190
#ifndef HAVE_TEE
191
int
192
tee (int fd_in __attribute__ ((unused)),
193
     int fd_out __attribute__ ((unused)),
194
     size_t len __attribute__ ((unused)),
195
     unsigned int flags __attribute__ ((unused)))
196
{
197
  errno = ENOSYS;
198
  return -1;
199
}
200
#endif
201
 
202
#ifndef HAVE_UNLINKAT
203
int
204
unlinkat (int dirfd __attribute__ ((unused)),
205
          const char *pathname __attribute__ ((unused)),
206
          int flags __attribute__ ((unused)))
207
{
208
  errno = ENOSYS;
209
  return -1;
210
}
211
#endif
212
 
213
#ifndef HAVE_UNSHARE
214
int
215
unshare (int flags __attribute__ ((unused)))
216
{
217
  errno = ENOSYS;
218
  return -1;
219
}
220
#endif

powered by: WebSVN 2.1.0

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