mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-21 15:57:31 +09:00
Replace NSS with Pale Moon's
This commit is contained in:
parent
ff1e5e48bf
commit
8c2e376f94
2870 changed files with 1762232 additions and 1374220 deletions
|
|
@ -20,6 +20,7 @@ include $(DEPTH)/coreconf/config.mk
|
|||
|
||||
ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
|
||||
PROGRAM =
|
||||
TARGETS =
|
||||
else
|
||||
TARGETS = $(PROGRAM)
|
||||
INSTALL = true
|
||||
|
|
@ -33,10 +34,14 @@ ifdef NATIVE_FLAGS
|
|||
OS_CFLAGS=$(NATIVE_FLAGS)
|
||||
endif
|
||||
|
||||
ifdef NATIVE_LDFLAGS
|
||||
LDFLAGS=$(NATIVE_LDFLAGS)
|
||||
endif
|
||||
|
||||
include $(DEPTH)/coreconf/rules.mk
|
||||
|
||||
# Redefine MAKE_OBJDIR for just this directory
|
||||
define MAKE_OBJDIR
|
||||
if test ! -d $(@D); then rm -rf $(@D); mkdir $(@D); fi
|
||||
if test ! -d $(@D); then mkdir -p $(@D); fi
|
||||
endef
|
||||
|
||||
|
|
|
|||
|
|
@ -26,16 +26,12 @@ typedef unsigned int mode_t;
|
|||
|
||||
#define HAVE_LCHOWN
|
||||
|
||||
#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) || defined(NTO) || defined(DARWIN) || defined(BEOS) || defined(__riscos__)
|
||||
#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) || defined(NTO) || defined(DARWIN) || defined(__riscos__)
|
||||
#undef HAVE_LCHOWN
|
||||
#endif
|
||||
|
||||
#define HAVE_FCHMOD
|
||||
|
||||
#if defined(BEOS)
|
||||
#undef HAVE_FCHMOD
|
||||
#endif
|
||||
|
||||
#ifdef LINUX
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
|
@ -88,8 +84,8 @@ mkdirs(char *path, mode_t mode)
|
|||
char * cp;
|
||||
int rv;
|
||||
struct stat sb;
|
||||
|
||||
if (!path || !path[0])
|
||||
|
||||
if (!path || !path[0])
|
||||
fail("Null pointer or empty string passed to mkdirs()");
|
||||
while (*path == '/' && path[1] == '/')
|
||||
path++;
|
||||
|
|
@ -107,7 +103,7 @@ mkdirs(char *path, mode_t mode)
|
|||
if (errno != EEXIST)
|
||||
fail("mkdirs cannot make %s", path);
|
||||
fprintf(stderr, "directory creation race: %s\n", path);
|
||||
if (!stat(path, &sb) && S_ISDIR(sb.st_mode))
|
||||
if (!stat(path, &sb) && S_ISDIR(sb.st_mode))
|
||||
rv = 0;
|
||||
}
|
||||
return rv;
|
||||
|
|
@ -120,7 +116,7 @@ touid(char *owner)
|
|||
uid_t uid;
|
||||
char *cp;
|
||||
|
||||
if (!owner || !owner[0])
|
||||
if (!owner || !owner[0])
|
||||
fail("Null pointer or empty string passed to touid()");
|
||||
pw = getpwnam(owner);
|
||||
if (pw)
|
||||
|
|
@ -138,7 +134,7 @@ togid(char *group)
|
|||
gid_t gid;
|
||||
char *cp;
|
||||
|
||||
if (!group || !group[0])
|
||||
if (!group || !group[0])
|
||||
fail("Null pointer or empty string passed to togid()");
|
||||
gr = getgrnam(group);
|
||||
if (gr)
|
||||
|
|
@ -259,8 +255,9 @@ main(int argc, char **argv)
|
|||
len = strlen(name);
|
||||
base = xbasename(name);
|
||||
bnlen = strlen(base);
|
||||
toname = (char*)xmalloc(tdlen + 1 + bnlen + 1);
|
||||
sprintf(toname, "%s/%s", todir, base);
|
||||
size_t toname_len = tdlen + 1 + bnlen + 1;
|
||||
toname = (char*)xmalloc(toname_len);
|
||||
snprintf(toname, toname_len, "%s/%s", todir, base);
|
||||
retry:
|
||||
exists = (lstat(toname, &tosb) == 0);
|
||||
|
||||
|
|
@ -274,7 +271,7 @@ retry:
|
|||
}
|
||||
if (!exists && mkdir(toname, mode) < 0) {
|
||||
/* we probably have two nsinstall programs in a race here. */
|
||||
if (errno == EEXIST && !stat(toname, &sb) &&
|
||||
if (errno == EEXIST && !stat(toname, &sb) &&
|
||||
S_ISDIR(sb.st_mode)) {
|
||||
fprintf(stderr, "directory creation race: %s\n", toname);
|
||||
goto retry;
|
||||
|
|
@ -292,7 +289,7 @@ retry:
|
|||
/* -L implies -l and prefixes names with a $cwd arg. */
|
||||
len += lplen + 1;
|
||||
linkname = (char*)xmalloc(len + 1);
|
||||
sprintf(linkname, "%s/%s", linkprefix, name);
|
||||
snprintf(linkname, len+1, "%s/%s", linkprefix, name);
|
||||
} else if (dorelsymlink) {
|
||||
/* Symlink the relative path from todir to source name. */
|
||||
linkname = (char*)xmalloc(PATH_MAX);
|
||||
|
|
@ -348,7 +345,7 @@ retry:
|
|||
fromfd = open(name, O_RDONLY);
|
||||
if (fromfd < 0 || fstat(fromfd, &sb) < 0)
|
||||
fail("cannot access %s", name);
|
||||
if (exists &&
|
||||
if (exists &&
|
||||
(!S_ISREG(tosb.st_mode) || access(toname, W_OK) < 0)) {
|
||||
int rmrv;
|
||||
rmrv = (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ fail(char *format, ...)
|
|||
fprintf(stderr, ": %s", strerror(errno));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
putc('\n', stderr);
|
||||
abort();
|
||||
exit(1);
|
||||
|
|
@ -123,7 +123,7 @@ xmalloc(size_t size)
|
|||
char *
|
||||
xstrdup(char *s)
|
||||
{
|
||||
if (!s || !s[0])
|
||||
if (!s || !s[0])
|
||||
fail("Null pointer or empty string passed to xstrdup()");
|
||||
return strcpy((char*)xmalloc(strlen(s) + 1), s);
|
||||
}
|
||||
|
|
@ -133,7 +133,7 @@ xbasename(char *path)
|
|||
{
|
||||
char *cp;
|
||||
|
||||
if (!path || !path[0])
|
||||
if (!path || !path[0])
|
||||
fail("Null pointer or empty string passed to xbasename()");
|
||||
while ((cp = strrchr(path, '/')) && cp[1] == '\0')
|
||||
*cp = '\0';
|
||||
|
|
@ -144,7 +144,7 @@ xbasename(char *path)
|
|||
void
|
||||
xchdir(char *dir)
|
||||
{
|
||||
if (!dir || !dir[0])
|
||||
if (!dir || !dir[0])
|
||||
fail("Null pointer or empty string passed to xchdir()");
|
||||
if (chdir(dir) < 0)
|
||||
fail("cannot change directory to %s", dir);
|
||||
|
|
@ -181,7 +181,7 @@ relatepaths(char *from, char *to, char *outpath)
|
|||
len += 3;
|
||||
}
|
||||
while ((cp = getcomponent(cp, buf)) != 0) {
|
||||
sprintf(outpath + len, "%s/", buf);
|
||||
snprintf(outpath + len, PATH_MAX - len, "%s/", buf);
|
||||
len += strlen(outpath + len);
|
||||
}
|
||||
}
|
||||
|
|
@ -228,7 +228,7 @@ diagnosePath(const char * path)
|
|||
struct stat sb;
|
||||
char buf[BUFSIZ];
|
||||
|
||||
if (!path || !path[0])
|
||||
if (!path || !path[0])
|
||||
fail("Null pointer or empty string passed to mkdirs()");
|
||||
myPath = strdup(path);
|
||||
if (!myPath)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue