Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef pathsub_h___ |
michael@0 | 7 | #define pathsub_h___ |
michael@0 | 8 | /* |
michael@0 | 9 | ** Pathname subroutines. |
michael@0 | 10 | ** |
michael@0 | 11 | ** Brendan Eich, 8/29/95 |
michael@0 | 12 | */ |
michael@0 | 13 | #include <limits.h> |
michael@0 | 14 | #include <sys/types.h> |
michael@0 | 15 | |
michael@0 | 16 | #ifndef PATH_MAX |
michael@0 | 17 | #define PATH_MAX 1024 |
michael@0 | 18 | #endif |
michael@0 | 19 | |
michael@0 | 20 | /* |
michael@0 | 21 | * Just prevent stupidity |
michael@0 | 22 | */ |
michael@0 | 23 | #undef NAME_MAX |
michael@0 | 24 | #define NAME_MAX 256 |
michael@0 | 25 | |
michael@0 | 26 | extern char *program; |
michael@0 | 27 | |
michael@0 | 28 | extern void fail(char *format, ...); |
michael@0 | 29 | extern char *getcomponent(char *path, char *name); |
michael@0 | 30 | extern char *ino2name(ino_t ino); |
michael@0 | 31 | extern void *xmalloc(size_t size); |
michael@0 | 32 | extern char *xstrdup(char *s); |
michael@0 | 33 | extern char *xbasename(char *path); |
michael@0 | 34 | extern void xchdir(char *dir); |
michael@0 | 35 | |
michael@0 | 36 | /* Relate absolute pathnames from and to returning the result in outpath. */ |
michael@0 | 37 | extern int relatepaths(char *from, char *to, char *outpath); |
michael@0 | 38 | |
michael@0 | 39 | /* XXX changes current working directory -- caveat emptor */ |
michael@0 | 40 | extern void reversepath(char *inpath, char *name, int len, char *outpath); |
michael@0 | 41 | |
michael@0 | 42 | #endif /* pathsub_h___ */ |