security/nss/coreconf/nsinstall/pathsub.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #ifndef pathsub_h___
michael@0 6 #define pathsub_h___
michael@0 7 /*
michael@0 8 ** Pathname subroutines.
michael@0 9 **
michael@0 10 ** Brendan Eich, 8/29/95
michael@0 11 */
michael@0 12 #include <limits.h>
michael@0 13 #include <sys/types.h>
michael@0 14
michael@0 15 #if SUNOS4
michael@0 16 #include "sunos4.h"
michael@0 17 #endif
michael@0 18
michael@0 19 #ifndef PATH_MAX
michael@0 20 #define PATH_MAX 1024
michael@0 21 #endif
michael@0 22
michael@0 23 /*
michael@0 24 * Just keep sane lengths
michael@0 25 */
michael@0 26 #undef NAME_MAX
michael@0 27 #define NAME_MAX 256
michael@0 28
michael@0 29 extern char *program;
michael@0 30
michael@0 31 extern void fail(char *format, ...);
michael@0 32 extern char *getcomponent(char *path, char *name);
michael@0 33 extern char *ino2name(ino_t ino, char *dir);
michael@0 34 extern void *xmalloc(size_t size);
michael@0 35 extern char *xstrdup(char *s);
michael@0 36 extern char *xbasename(char *path);
michael@0 37 extern void xchdir(char *dir);
michael@0 38
michael@0 39 /* Relate absolute pathnames from and to returning the result in outpath. */
michael@0 40 extern int relatepaths(char *from, char *to, char *outpath);
michael@0 41
michael@0 42 /* NOTE: changes current working directory -- caveat emptor */
michael@0 43 extern void reversepath(char *inpath, char *name, int len, char *outpath);
michael@0 44
michael@0 45 /* stats every directory in path, reports results. */
michael@0 46 extern void diagnosePath(const char * path);
michael@0 47
michael@0 48 #endif /* pathsub_h___ */

mercurial