* New version 2.21.999
[alpine.git] / pith / osdep / canaccess.h
blob61996fb2a31c1f4872522121d34322e6b12af123
1 /*
2 * $Id: canaccess.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2013-2018 Eduardo Chappa
6 * Copyright 2006 University of Washington
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #ifndef PITH_OSDEP_CANACCESS_INCLUDED
18 #define PITH_OSDEP_CANACCESS_INCLUDED
21 #define EXECUTE_ACCESS 0x01 /* These five are */
22 #define WRITE_ACCESS 0x02 /* for the calls */
23 #define READ_ACCESS 0x04 /* to access() */
24 #define ACCESS_EXISTS 0x00 /* <etc> */
25 #define EDIT_ACCESS (WRITE_ACCESS + READ_ACCESS)
28 * These flags are used in calls to so_get.
29 * They're OR'd together with the ACCESS flags above but
30 * are otherwise unrelated.
31 */
32 #define OWNER_ONLY 0x08 /* open with mode 0600 */
34 * If the storage object being written to needs to be converted to
35 * the character set of the user's locale, then use this flag. For
36 * example, when exporting to a file. Do not use this if the data
37 * will eventually go to the display because the data is expected
38 * to remain as UTF-8 until it gets to Writechar where it will be
39 * converted.
41 #define WRITE_TO_LOCALE 0x10 /* convert to locale-specific charset */
42 #define READ_FROM_LOCALE 0x20 /* convert from locale-specific charset */
46 * Exported Prototypes
48 int can_access(char *, int);
49 int can_access_in_path(char *, char *, int);
52 #endif /* PITH_OSDEP_CANACCESS_INCLUDED */