security/nss/coreconf/nsinstall/pathsub.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/coreconf/nsinstall/pathsub.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,48 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#ifndef pathsub_h___
     1.9 +#define pathsub_h___
    1.10 +/*
    1.11 +** Pathname subroutines.
    1.12 +**
    1.13 +** Brendan Eich, 8/29/95
    1.14 +*/
    1.15 +#include <limits.h>
    1.16 +#include <sys/types.h>
    1.17 +
    1.18 +#if SUNOS4
    1.19 +#include "sunos4.h"
    1.20 +#endif
    1.21 +
    1.22 +#ifndef PATH_MAX
    1.23 +#define PATH_MAX 1024
    1.24 +#endif
    1.25 +
    1.26 +/*
    1.27 + * Just keep sane lengths
    1.28 + */
    1.29 +#undef NAME_MAX
    1.30 +#define NAME_MAX 256
    1.31 +
    1.32 +extern char *program;
    1.33 +
    1.34 +extern void fail(char *format, ...);
    1.35 +extern char *getcomponent(char *path, char *name);
    1.36 +extern char *ino2name(ino_t ino, char *dir);
    1.37 +extern void *xmalloc(size_t size);
    1.38 +extern char *xstrdup(char *s);
    1.39 +extern char *xbasename(char *path);
    1.40 +extern void xchdir(char *dir);
    1.41 +
    1.42 +/* Relate absolute pathnames from and to returning the result in outpath. */
    1.43 +extern int relatepaths(char *from, char *to, char *outpath);
    1.44 +
    1.45 +/* NOTE: changes current working directory -- caveat emptor */
    1.46 +extern void reversepath(char *inpath, char *name, int len, char *outpath);
    1.47 +
    1.48 +/* stats every directory in path, reports results. */
    1.49 +extern void diagnosePath(const char * path);
    1.50 +
    1.51 +#endif /* pathsub_h___ */

mercurial