summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcls%seawood.org <devnull@localhost>1999-09-21 19:54:57 +0000
committercls%seawood.org <devnull@localhost>1999-09-21 19:54:57 +0000
commit9600ce85b22f8ea3f1d9c0c7a0c08ad8266d8abe (patch)
treebd496cb0a4a07bb55f647bc39b5164875a4d90e9
parenta22e26a24feb1c59c121699cbcb367b5c065660e (diff)
downloadnspr-hg-unlabeled-3.13.14.tar.gz
Patch provided by Lee Iverson <leei@ai.sri.com>unlabeled-3.13.14
Ensure that unmodified include files & symlinks are not modified. Added --disable-shared option. Resurrect use of OS_LIBS & EXTRA_LIBS. Add check for -ldl. Added nsprincl.sh & nsprincl.mk to build.
-rw-r--r--config/nsinstall.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/config/nsinstall.c b/config/nsinstall.c
index 56d4d304..8799e255 100644
--- a/config/nsinstall.c
+++ b/config/nsinstall.c
@@ -314,10 +314,13 @@ main(int argc, char **argv)
}
/* Check for a pre-existing symlink with identical content. */
- if (exists &&
- (!S_ISLNK(tosb.st_mode) ||
- readlink(toname, buf, sizeof buf) != len ||
- strncmp(buf, name, len) != 0)) {
+ if (exists) {
+ if (S_ISLNK(tosb.st_mode) &&
+ readlink(toname, buf, sizeof buf) == len &&
+ strncmp(buf, name, len) == 0) {
+ /*fprintf(stderr,"link exists: %s => %.*s\n", toname, len, buf);*/
+ continue;
+ }
(void) (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname);
exists = 0;
}