summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>1999-04-19 22:17:08 +0000
committerwtc%netscape.com <devnull@localhost>1999-04-19 22:17:08 +0000
commit69f0de239cea00623fab1e86a6b81154f64451c5 (patch)
treeeca41e7ab0109dda30028303e3e7d377d84f01ac
parentaab012797cb4a147adc77de8479fd22708b68077 (diff)
downloadnspr-hg-69f0de239cea00623fab1e86a6b81154f64451c5.tar.gz
Bugzilla bug #4741: add lib version info to libplds3 and libprstrms3.
Bugzilla bug #5284: the lib version structures for libnspr3 and libplc3 are incorrectly named (still referring to libnspr21 and libplc21). Modified files: lib/ds/Makefile, lib/prstreams/Makefile, lib/libc/src/Makefile, lib/libc/src/plvrsion.c, pr/src/Makefile, pr/src/prvrsion.c Added files: lib/ds/plvrsion.c, lib/prstreams/plvrsion.c
-rw-r--r--lib/ds/Makefile46
-rw-r--r--lib/ds/plvrsion.c89
-rw-r--r--lib/libc/src/Makefile10
-rw-r--r--lib/libc/src/plvrsion.c4
-rw-r--r--lib/prstreams/Makefile51
-rw-r--r--lib/prstreams/plvrsion.c89
-rw-r--r--pr/src/Makefile8
-rw-r--r--pr/src/prvrsion.c4
8 files changed, 282 insertions, 19 deletions
diff --git a/lib/ds/Makefile b/lib/ds/Makefile
index fde8cae4..32d463fe 100644
--- a/lib/ds/Makefile
+++ b/lib/ds/Makefile
@@ -34,6 +34,7 @@ CSRCS = \
plarena.c \
plevent.c \
plhash.c \
+ plvrsion.c \
$(NULL)
HEADERS = \
@@ -105,6 +106,51 @@ RELEASE_LIBS = $(TARGETS)
include $(MOD_DEPTH)/config/rules.mk
#
+# Version information generation (begin)
+#
+ECHO = echo
+TINC = $(OBJDIR)/_pl_bld.h
+PROD = $(notdir $(SHARED_LIBRARY))
+NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
+SH_DATE = $(shell date)
+SH_NOW = $(shell $(NOW))
+
+ifeq ($(OS_ARCH), WINNT)
+ifeq ($(OS_TARGET),OS2)
+ SUF =
+else
+ SUF = i64
+endif
+else
+ SUF = LL
+endif
+
+$(TINC):
+ @$(MAKE_OBJDIR)
+ @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+ @if test ! -z "$(SH_NOW)"; then \
+ $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+ else \
+ true; \
+ fi
+ @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
+
+
+$(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+ifeq ($(OS_ARCH), WINNT)
+ifdef XP_OS2_EMX
+ $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) plvrsion.c
+else
+ $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) plvrsion.c
+endif
+else
+ $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) plvrsion.c
+endif
+#
+# Version information generation (end)
+#
+
+#
# The Client build wants the shared libraries in $(DIST)/bin,
# so we also install them there.
#
diff --git a/lib/ds/plvrsion.c b/lib/ds/plvrsion.c
new file mode 100644
index 00000000..452922ad
--- /dev/null
+++ b/lib/ds/plvrsion.c
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * The contents of this file are subject to the Netscape Public License
+ * Version 1.0 (the "NPL"); you may not use this file except in
+ * compliance with the NPL. You may obtain a copy of the NPL at
+ * http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the NPL is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+ * for the specific language governing rights and limitations under the
+ * NPL.
+ *
+ * The Initial Developer of this code under the NPL is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All Rights
+ * Reserved.
+ */
+
+#include "prinit.h"
+#include "prvrsion.h"
+
+/************************************************************************/
+/**************************IDENTITY AND VERSIONING***********************/
+/************************************************************************/
+#include "_pl_bld.h"
+#if !defined(_BUILD_TIME)
+#ifdef HAVE_LONG_LONG
+#define _BUILD_TIME 0
+#else
+#define _BUILD_TIME {0, 0}
+#endif
+#endif
+#if !defined(_BUILD_STRING)
+#define _BUILD_STRING ""
+#endif
+#if !defined(_PRODUCTION)
+#define _PRODUCTION ""
+#endif
+
+static PRVersionDescription prVersionDescription_libplds3 =
+{
+ /* version */ 2, /* this is the only one supported */
+ /* buildTime */ _BUILD_TIME, /* usecs since midnight 1/1/1970 GMT */
+ /* buildTimeString */ _BUILD_STRING, /* ditto, but human readable */
+ /* vMajor */ PR_VMAJOR, /* NSPR's version number */
+ /* vMinor */ PR_VMINOR, /* and minor version */
+ /* vPatch */ PR_VPATCH, /* and patch */
+ /* beta */ PR_BETA, /* beta build boolean */
+#if defined(DEBUG)
+ /* debug */ PR_TRUE, /* a debug build */
+#else
+ /* debug */ PR_FALSE, /* an optomized build */
+#endif
+ /* special */ PR_FALSE, /* they're all special, but ... */
+ /* filename */ _PRODUCTION, /* the produced library name */
+ /* description */ "Portable runtime", /* what we are */
+ /* security */ "N/A", /* not applicable here */
+ /* copywrite */ "Copyright (c) 1998 Netscape Communications Corporation. All Rights Reserved",
+ /* comment */ "http://www.mozilla.org/NPL/",
+ /* specialString */ ""
+};
+
+#ifdef XP_UNIX
+
+/*
+ * Version information for the 'ident' and 'what commands
+ */
+static char rcsid[] = "$Version: NSPR " PR_VERSION " " _BUILD_STRING " $";
+static char sccsid[] = "@(#)NSPR " PR_VERSION " " _BUILD_STRING;
+
+#endif /* XP_UNIX */
+
+PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint()
+{
+#ifdef XP_UNIX
+ /*
+ * Add dummy references to rcsid and sccsid to prevent them
+ * from being optimized away as unused variables.
+ */
+ const char *dummy;
+
+ dummy = rcsid;
+ dummy = sccsid;
+#endif
+ return &prVersionDescription_libplds3;
+} /* versionEntryPointType */
+
+/* plvrsion.c */
+
diff --git a/lib/libc/src/Makefile b/lib/libc/src/Makefile
index 34e82da2..000c969b 100644
--- a/lib/libc/src/Makefile
+++ b/lib/libc/src/Makefile
@@ -109,18 +109,14 @@ include $(MOD_DEPTH)/config/rules.mk
#
ECHO = echo
TINC = $(OBJDIR)/_pl_bld.h
-ifeq ($(OS_TARGET),OS2)
-PROD = nspr$(MOD_VERSION).$(DLL_SUFFIX)
-else
-PROD = plc$(MOD_VERSION).$(DLL_SUFFIX)
-endif
+PROD = $(notdir $(SHARED_LIBRARY))
NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
SH_DATE = $(shell date)
SH_NOW = $(shell $(NOW))
ifeq ($(OS_ARCH), WINNT)
ifeq ($(OS_TARGET),OS2)
- SUF =
+ SUF =
else
SUF = i64
endif
@@ -128,8 +124,6 @@ else
SUF = LL
endif
-GARBAGE += $(TINC)
-
$(TINC):
@$(MAKE_OBJDIR)
@$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
diff --git a/lib/libc/src/plvrsion.c b/lib/libc/src/plvrsion.c
index 663d2dde..0abfce7c 100644
--- a/lib/libc/src/plvrsion.c
+++ b/lib/libc/src/plvrsion.c
@@ -37,7 +37,7 @@
#define _PRODUCTION ""
#endif
-static PRVersionDescription prVersionDescription_libplc21 =
+static PRVersionDescription prVersionDescription_libplc3 =
{
/* version */ 2, /* this is the only one supported */
/* buildTime */ _BUILD_TIME, /* usecs since midnight 1/1/1970 GMT */
@@ -82,7 +82,7 @@ PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint()
dummy = rcsid;
dummy = sccsid;
#endif
- return &prVersionDescription_libplc21;
+ return &prVersionDescription_libplc3;
} /* versionEntryPointType */
/* plvrsion.c */
diff --git a/lib/prstreams/Makefile b/lib/prstreams/Makefile
index 1a9b9ff8..68ec5c83 100644
--- a/lib/prstreams/Makefile
+++ b/lib/prstreams/Makefile
@@ -45,11 +45,15 @@ INCLUDES = -I$(DIST)/include -I../../../include
HEADERS = *.h
+CSRCS = \
+ plvrsion.c \
+ $(NULL)
+
CXXSRCS = \
prstrms.cpp \
$(NULL)
-OBJS = $(addprefix $(OBJDIR)/,$(CXXSRCS:.cpp=.$(OBJ_SUFFIX)))
+OBJS = $(addprefix $(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX)) $(CXXSRCS:.cpp=.$(OBJ_SUFFIX)))
ifeq ($(OS_ARCH), WINNT)
ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
@@ -115,6 +119,51 @@ RELEASE_LIBS = $(TARGETS)
include $(MOD_DEPTH)/config/rules.mk
+#
+# Version information generation (begin)
+#
+ECHO = echo
+TINC = $(OBJDIR)/_pl_bld.h
+PROD = $(notdir $(SHARED_LIBRARY))
+NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
+SH_DATE = $(shell date)
+SH_NOW = $(shell $(NOW))
+
+ifeq ($(OS_ARCH), WINNT)
+ifeq ($(OS_TARGET),OS2)
+ SUF =
+else
+ SUF = i64
+endif
+else
+ SUF = LL
+endif
+
+$(TINC):
+ @$(MAKE_OBJDIR)
+ @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+ @if test ! -z "$(SH_NOW)"; then \
+ $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+ else \
+ true; \
+ fi
+ @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
+
+
+$(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+ifeq ($(OS_ARCH), WINNT)
+ifdef XP_OS2_EMX
+ $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) plvrsion.c
+else
+ $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) plvrsion.c
+endif
+else
+ $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) plvrsion.c
+endif
+#
+# Version information generation (end)
+#
+
export:: $(TARGETS) $(HEADERS)
$(INSTALL) -m 444 $(HEADERS) $(DIST)/include
$(INSTALL) -m 444 $(TARGETS) $(DIST)/lib
diff --git a/lib/prstreams/plvrsion.c b/lib/prstreams/plvrsion.c
new file mode 100644
index 00000000..d4a7b8fd
--- /dev/null
+++ b/lib/prstreams/plvrsion.c
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * The contents of this file are subject to the Netscape Public License
+ * Version 1.0 (the "NPL"); you may not use this file except in
+ * compliance with the NPL. You may obtain a copy of the NPL at
+ * http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the NPL is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+ * for the specific language governing rights and limitations under the
+ * NPL.
+ *
+ * The Initial Developer of this code under the NPL is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All Rights
+ * Reserved.
+ */
+
+#include "prinit.h"
+#include "prvrsion.h"
+
+/************************************************************************/
+/**************************IDENTITY AND VERSIONING***********************/
+/************************************************************************/
+#include "_pl_bld.h"
+#if !defined(_BUILD_TIME)
+#ifdef HAVE_LONG_LONG
+#define _BUILD_TIME 0
+#else
+#define _BUILD_TIME {0, 0}
+#endif
+#endif
+#if !defined(_BUILD_STRING)
+#define _BUILD_STRING ""
+#endif
+#if !defined(_PRODUCTION)
+#define _PRODUCTION ""
+#endif
+
+static PRVersionDescription prVersionDescription_libprstrms3 =
+{
+ /* version */ 2, /* this is the only one supported */
+ /* buildTime */ _BUILD_TIME, /* usecs since midnight 1/1/1970 GMT */
+ /* buildTimeString */ _BUILD_STRING, /* ditto, but human readable */
+ /* vMajor */ PR_VMAJOR, /* NSPR's version number */
+ /* vMinor */ PR_VMINOR, /* and minor version */
+ /* vPatch */ PR_VPATCH, /* and patch */
+ /* beta */ PR_BETA, /* beta build boolean */
+#if defined(DEBUG)
+ /* debug */ PR_TRUE, /* a debug build */
+#else
+ /* debug */ PR_FALSE, /* an optomized build */
+#endif
+ /* special */ PR_FALSE, /* they're all special, but ... */
+ /* filename */ _PRODUCTION, /* the produced library name */
+ /* description */ "Portable runtime", /* what we are */
+ /* security */ "N/A", /* not applicable here */
+ /* copywrite */ "Copyright (c) 1998 Netscape Communications Corporation. All Rights Reserved",
+ /* comment */ "http://www.mozilla.org/NPL/",
+ /* specialString */ ""
+};
+
+#ifdef XP_UNIX
+
+/*
+ * Version information for the 'ident' and 'what commands
+ */
+static char rcsid[] = "$Version: NSPR " PR_VERSION " " _BUILD_STRING " $";
+static char sccsid[] = "@(#)NSPR " PR_VERSION " " _BUILD_STRING;
+
+#endif /* XP_UNIX */
+
+PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint()
+{
+#ifdef XP_UNIX
+ /*
+ * Add dummy references to rcsid and sccsid to prevent them
+ * from being optimized away as unused variables.
+ */
+ const char *dummy;
+
+ dummy = rcsid;
+ dummy = sccsid;
+#endif
+ return &prVersionDescription_libprstrms3;
+} /* versionEntryPointType */
+
+/* plvrsion.c */
+
diff --git a/pr/src/Makefile b/pr/src/Makefile
index 336de2fa..986b12e9 100644
--- a/pr/src/Makefile
+++ b/pr/src/Makefile
@@ -341,18 +341,14 @@ endif
ECHO = echo
INCLUDES = -I$(DIST)/include
TINC = $(OBJDIR)/_pr_bld.h
-ifeq ($(OS_TARGET),OS2)
-PROD = nspr$(MOD_VERSION).$(DLL_SUFFIX)
-else
-PROD = libnspr$(MOD_VERSION).$(DLL_SUFFIX)
-endif
+PROD = $(notdir $(SHARED_LIBRARY))
NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
SH_DATE = $(shell date)
SH_NOW = $(shell $(NOW))
ifeq ($(OS_ARCH), WINNT)
ifeq ($(OS_TARGET),OS2)
- SUF =
+ SUF =
else
SUF = i64
endif
diff --git a/pr/src/prvrsion.c b/pr/src/prvrsion.c
index 87aac981..3f00ad92 100644
--- a/pr/src/prvrsion.c
+++ b/pr/src/prvrsion.c
@@ -37,7 +37,7 @@
#define _PRODUCTION ""
#endif
-static PRVersionDescription prVersionDescription_libnsrp21 =
+static PRVersionDescription prVersionDescription_libnspr3 =
{
/* version */ 2, /* this is the only one supported */
/* buildTime */ _BUILD_TIME, /* usecs since midnight 1/1/1970 GMT */
@@ -82,7 +82,7 @@ PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint(void)
dummy = rcsid;
dummy = sccsid;
#endif
- return &prVersionDescription_libnsrp21;
+ return &prVersionDescription_libnspr3;
} /* versionEntryPointType */
/* prvrsion.c */