Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: src/trusted/service_runtime/fs/xdr.c

Issue 10512008: Remove some unused code that fails to compile with -Wundef (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/trusted/service_runtime/fs/xdr.h ('k') | src/trusted/service_runtime/service_runtime.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2008 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file.
5 */
6
7 /*
8 * NaCl file system mini XDR-like serialization of basic file system types.
9 */
10 #include "native_client/src/shared/platform/nacl_log.h"
11
12 #include "native_client/src/trusted/service_runtime/include/machine/_types.h"
13 #include "native_client/src/trusted/service_runtime/fs/fs.h"
14 #include "native_client/src/trusted/service_runtime/fs/xdr.h"
15
16 /*
17 * XDR externalization / internalization code for larger data types
18 * for which the encoder/decoder should not be inlined.
19 */
20
21 /* macro used in all externalization/internalization functions */
22 #define Ext(T, mem) do { \
23 bump += nacl_ext_ ## T(buf + bump, dp->mem); \
24 } while (0)
25
26 #define Int(T, mem) do { \
27 bump += nacl_int_ ## T(buf + bump, &dp->mem); \
28 } while (0)
29
30 #define S(T, mem) do { bump += sizeof(T); } while (0)
31
32 #define G(Tag, Macro) \
33 size_t NaCl ## Macro ## Tag(char *buf, struct Tag *dp) { \
34 size_t bump = 0; \
35 Macro(dev_t, dev); \
36 Macro(ino_t, ino); \
37 Macro(mode_t, mode); \
38 Macro(uid_t, uid); \
39 Macro(gid_t, gid); \
40 Macro(nlink_t, nlink); \
41 Macro(off_t, size); \
42 Macro(time_t, atime); \
43 Macro(time_t, mtime); \
44 Macro(time_t, ctime); \
45 \
46 return bump; \
47 }
48
49 #define F(StructTag) G(StructTag, Ext) G(StructTag, Int)
50
51 F(NaClFileAttr)
52
53 #undef F
54 #undef G
OLDNEW
« no previous file with comments | « src/trusted/service_runtime/fs/xdr.h ('k') | src/trusted/service_runtime/service_runtime.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698