Home | History | Annotate | Line # | Download | only in common
      1 /* Target errno mappings for newlib/libgloss environment.
      2    Copyright 1995-2024 Free Software Foundation, Inc.
      3    Contributed by Mike Frysinger.
      4 
      5    This file is part of simulators.
      6 
      7    This program is free software; you can redistribute it and/or modify
      8    it under the terms of the GNU General Public License as published by
      9    the Free Software Foundation; either version 3 of the License, or
     10    (at your option) any later version.
     11 
     12    This program is distributed in the hope that it will be useful,
     13    but WITHOUT ANY WARRANTY; without even the implied warranty of
     14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15    GNU General Public License for more details.
     16 
     17    You should have received a copy of the GNU General Public License
     18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
     19 
     20 /* This must come before any other includes.  */
     21 #include "defs.h"
     22 
     23 #include <fcntl.h>
     24 
     25 #include "sim/callback.h"
     26 
     27 /* This file is kept up-to-date via the gennltvals.py script.  Do not edit
     28    anything between the START & END comment blocks below.  */
     29 
     30 CB_TARGET_DEFS_MAP cb_init_open_map[] = {
     31   /* gennltvals: START */
     32 #ifdef O_ACCMODE
     33   { "O_ACCMODE", O_ACCMODE, (0|1|2) },
     34 #endif
     35 #ifdef O_APPEND
     36   { "O_APPEND", O_APPEND, 0x0008 },
     37 #endif
     38 #ifdef O_CLOEXEC
     39   { "O_CLOEXEC", O_CLOEXEC, 0x40000 },
     40 #endif
     41 #ifdef O_CREAT
     42   { "O_CREAT", O_CREAT, 0x0200 },
     43 #endif
     44 #ifdef O_DIRECT
     45   { "O_DIRECT", O_DIRECT, 0x80000 },
     46 #endif
     47 #ifdef O_DIRECTORY
     48   { "O_DIRECTORY", O_DIRECTORY, 0x200000 },
     49 #endif
     50 #ifdef O_EXCL
     51   { "O_EXCL", O_EXCL, 0x0800 },
     52 #endif
     53 #ifdef O_EXEC
     54   { "O_EXEC", O_EXEC, 0x400000 },
     55 #endif
     56 #ifdef O_NOCTTY
     57   { "O_NOCTTY", O_NOCTTY, 0x8000 },
     58 #endif
     59 #ifdef O_NOFOLLOW
     60   { "O_NOFOLLOW", O_NOFOLLOW, 0x100000 },
     61 #endif
     62 #ifdef O_NONBLOCK
     63   { "O_NONBLOCK", O_NONBLOCK, 0x4000 },
     64 #endif
     65 #ifdef O_RDONLY
     66   { "O_RDONLY", O_RDONLY, 0 },
     67 #endif
     68 #ifdef O_RDWR
     69   { "O_RDWR", O_RDWR, 2 },
     70 #endif
     71 #ifdef O_SEARCH
     72   { "O_SEARCH", O_SEARCH, 0x400000 },
     73 #endif
     74 #ifdef O_SYNC
     75   { "O_SYNC", O_SYNC, 0x2000 },
     76 #endif
     77 #ifdef O_TRUNC
     78   { "O_TRUNC", O_TRUNC, 0x0400 },
     79 #endif
     80 #ifdef O_WRONLY
     81   { "O_WRONLY", O_WRONLY, 1 },
     82 #endif
     83   /* gennltvals: END */
     84   { NULL, -1, -1 },
     85 };
     86