Mercurial > hg > octave-lojdl > gnulib-hg
annotate lib/sys_file.in.h @ 16229:daac1ca4c436
inttypes: Modernize.
* lib/inttypes.in.h (strtoimax, strtoumax): Use the C++ safe idioms.
* modules/inttypes-incomplete (Depends-on): Add snippet/c++defs.
(Makefile.am): Update inttypes.h rule.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Thu, 05 Jan 2012 18:42:08 +0100 |
parents | 8250f2777afc |
children | bb182ee4a09d |
rev | line source |
---|---|
10598 | 1 /* Provide a more complete sys/file.h. |
2 | |
16201
8250f2777afc
maint: update all copyright year number ranges
Jim Meyering <meyering@redhat.com>
parents:
14840
diff
changeset
|
3 Copyright (C) 2007-2012 Free Software Foundation, Inc. |
10598 | 4 |
5 This program is free software; you can redistribute it and/or modify | |
6 it under the terms of the GNU General Public License as published by | |
7 the Free Software Foundation; either version 2, or (at your option) | |
8 any later version. | |
9 | |
10 This program is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 GNU General Public License for more details. | |
14 | |
15 You should have received a copy of the GNU General Public License | |
16 along with this program; if not, write to the Free Software Foundation, | |
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | |
18 | |
19 /* Written by Richard W.M. Jones. */ | |
20 | |
14840
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
21 #ifndef _@GUARD_PREFIX@_SYS_FILE_H |
13055
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12766
diff
changeset
|
22 |
13094
2ed0fc659db8
Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents:
13055
diff
changeset
|
23 #if __GNUC__ >= 3 |
2ed0fc659db8
Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents:
13055
diff
changeset
|
24 @PRAGMA_SYSTEM_HEADER@ |
2ed0fc659db8
Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents:
13055
diff
changeset
|
25 #endif |
13761
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
26 @PRAGMA_COLUMNS@ |
13094
2ed0fc659db8
Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents:
13055
diff
changeset
|
27 |
10598 | 28 /* The include_next requires a split double-inclusion guard. */ |
13094
2ed0fc659db8
Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents:
13055
diff
changeset
|
29 #if @HAVE_SYS_FILE_H@ |
2ed0fc659db8
Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents:
13055
diff
changeset
|
30 # @INCLUDE_NEXT@ @NEXT_SYS_FILE_H@ |
2ed0fc659db8
Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents:
13055
diff
changeset
|
31 #endif |
10598 | 32 |
14840
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
33 #ifndef _@GUARD_PREFIX@_SYS_FILE_H |
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
34 #define _@GUARD_PREFIX@_SYS_FILE_H |
10598 | 35 |
12522
9c72e4d90613
tests: test more substitute headers
Eric Blake <ebb9@byu.net>
parents:
12518
diff
changeset
|
36 #ifndef LOCK_SH |
9c72e4d90613
tests: test more substitute headers
Eric Blake <ebb9@byu.net>
parents:
12518
diff
changeset
|
37 /* Operations for the 'flock' call (same as Linux kernel constants). */ |
9c72e4d90613
tests: test more substitute headers
Eric Blake <ebb9@byu.net>
parents:
12518
diff
changeset
|
38 # define LOCK_SH 1 /* Shared lock. */ |
9c72e4d90613
tests: test more substitute headers
Eric Blake <ebb9@byu.net>
parents:
12518
diff
changeset
|
39 # define LOCK_EX 2 /* Exclusive lock. */ |
9c72e4d90613
tests: test more substitute headers
Eric Blake <ebb9@byu.net>
parents:
12518
diff
changeset
|
40 # define LOCK_UN 8 /* Unlock. */ |
9c72e4d90613
tests: test more substitute headers
Eric Blake <ebb9@byu.net>
parents:
12518
diff
changeset
|
41 |
9c72e4d90613
tests: test more substitute headers
Eric Blake <ebb9@byu.net>
parents:
12518
diff
changeset
|
42 /* Can be OR'd in to one of the above. */ |
9c72e4d90613
tests: test more substitute headers
Eric Blake <ebb9@byu.net>
parents:
12518
diff
changeset
|
43 # define LOCK_NB 4 /* Don't block when locking. */ |
9c72e4d90613
tests: test more substitute headers
Eric Blake <ebb9@byu.net>
parents:
12518
diff
changeset
|
44 #endif |
10598 | 45 |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
46 /* The definition of _GL_WARN_ON_USE is copied here. */ |
12524
8db404cb2e51
link-warning: make usage consistent
Eric Blake <ebb9@byu.net>
parents:
12522
diff
changeset
|
47 |
10598 | 48 #if @GNULIB_FLOCK@ |
49 /* Apply or remove advisory locks on an open file. | |
50 Return 0 if successful, otherwise -1 and errno set. */ | |
51 # if !@HAVE_FLOCK@ | |
52 extern int flock (int fd, int operation); | |
53 # endif | |
54 #elif defined GNULIB_POSIXCHECK | |
55 # undef flock | |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
56 # if HAVE_RAW_DECL_FLOCK |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
57 _GL_WARN_ON_USE (flock, "flock is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
58 "use gnulib module flock for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
59 # endif |
10598 | 60 #endif |
61 | |
62 | |
14840
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
63 #endif /* _@GUARD_PREFIX@_SYS_FILE_H */ |
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
64 #endif /* _@GUARD_PREFIX@_SYS_FILE_H */ |